:root {
    --bg-main: #eef3f9;
    --bg-shade: #dde8f7;
    --panel: #ffffff;
    --line: #d6deed;
    --text-main: #142033;
    --text-soft: #586886;
    --brand: #0f4da8;
    --brand-strong: #0b3b82;
    --brand-soft: #e4eeff;
    --ok: #106e42;
    --ok-bg: #e5f5ec;
    --down: #a33434;
    --down-bg: #fbeaea;
    --shadow: 0 20px 50px rgba(13, 31, 66, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    background: radial-gradient(circle at 15% -15%, #d2e4ff 0%, transparent 40%),
        radial-gradient(circle at 85% -10%, #dbe8ff 0%, transparent 35%),
        linear-gradient(180deg, var(--bg-main) 0%, var(--bg-shade) 100%);
    color: var(--text-main);
    font-family: "Trebuchet MS", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 34px 22px 44px;
}

.backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    opacity: 0.38;
}

.blob-1 {
    width: 360px;
    height: 360px;
    top: -150px;
    left: -120px;
    background: radial-gradient(circle at 30% 30%, #8ab6ff 0%, #9ec2f5 48%, transparent 75%);
}

.blob-2 {
    width: 340px;
    height: 340px;
    top: -120px;
    right: -140px;
    background: radial-gradient(circle at 40% 40%, #9bc8e8 0%, #a8ccf8 50%, transparent 75%);
}

.hero,
.notice,
.summary,
.portal-layout,
.empty {
    position: relative;
    z-index: 1;
}

.hero {
    margin-bottom: 20px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: var(--brand-soft);
    color: var(--brand-strong);
}

.hero h1 {
    margin: 12px 0 0;
    font-size: clamp(1.8rem, 1.4rem + 1.3vw, 2.6rem);
    line-height: 1.1;
}

.hero p {
    margin: 10px 0 0;
    font-size: 1.03rem;
    color: var(--text-soft);
}

.notice {
    margin-bottom: 18px;
    padding: 13px 15px;
    border-radius: 12px;
    border: 1px solid #efc1c1;
    background: #fff3f3;
    color: #7b2626;
    font-weight: 600;
}

.summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.summary-card {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.summary-card span {
    display: block;
    margin-bottom: 4px;
    color: var(--text-soft);
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 700;
}

.summary-card strong {
    font-size: 1.7rem;
    line-height: 1;
}

.summary-ok {
    border-color: #c9ead7;
    background: linear-gradient(180deg, #ffffff 0%, #f4fbf7 100%);
}

.summary-down {
    border-color: #f0cdcd;
    background: linear-gradient(180deg, #ffffff 0%, #fff7f7 100%);
}

.empty {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.portal-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 18px;
}

.app-list,
.app-detail {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.app-list {
    padding: 14px;
}

.app-list h2 {
    margin: 2px 4px 12px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-soft);
}

.app-list-items {
    display: grid;
    gap: 9px;
}

.app-mini {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    text-decoration: none;
    border: 1px solid #dbe4f2;
    border-radius: 10px;
    padding: 9px 10px;
    background: #f9fbff;
    color: var(--text-main);
}

.app-mini-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    min-width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1;
    color: var(--brand-strong);
    background: #dbe8fd;
    border: 1px solid #b8cef6;
}

.app-mini-body {
    display: block;
    min-width: 0;
}

.app-mini-title {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.25;
}

.app-mini-meta {
    display: block;
    margin-top: 4px;
    font-size: 0.74rem;
    color: var(--text-soft);
    font-family: "Consolas", "Menlo", "Lucida Console", monospace;
}

.app-mini.active {
    border-color: #9fb9e9;
    background: #eaf2ff;
}

.app-mini.active .app-mini-index {
    color: #ffffff;
    background: var(--brand);
    border-color: var(--brand-strong);
}

.app-mini.ok {
    box-shadow: inset 3px 0 0 var(--ok);
}

.app-mini.down {
    box-shadow: inset 3px 0 0 var(--down);
}

.app-detail {
    padding: 18px;
}

.detail-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.detail-head h2 {
    margin: 0;
    font-size: 1.22rem;
    line-height: 1.2;
}

.deployment-name {
    margin: 6px 0 0;
    font-size: 0.82rem;
    color: var(--text-soft);
    font-family: "Consolas", "Menlo", "Lucida Console", monospace;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status.ok {
    color: var(--ok);
    background: var(--ok-bg);
}

.status.ok .status-dot {
    background: var(--ok);
}

.status.down {
    color: var(--down);
    background: var(--down-bg);
}

.status.down .status-dot {
    background: var(--down);
}

.detail-grid {
    margin-top: 12px;
    margin: 0;
    display: grid;
    gap: 10px;
}

.meta-row {
    padding: 10px 11px;
    border-radius: 10px;
    border: 1px solid #e6ecf7;
    background: #f9fbff;
}

.app-detail dt {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.app-detail dd {
    margin: 5px 0 0;
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

.context-root {
    font-family: "Consolas", "Menlo", "Lucida Console", monospace;
}

.open-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-top: auto;
    min-height: 42px;
    border-radius: 11px;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #ffffff;
    background: linear-gradient(180deg, #1763cb 0%, #0f4da8 100%);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.open-link:hover,
.open-link:focus {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(19, 77, 163, 0.3);
    background: linear-gradient(180deg, #1557b4 0%, #0d418e 100%);
}

.empty {
    padding: 18px;
    color: var(--text-soft);
    font-weight: 600;
}

@media (max-width: 860px) {
    .container {
        padding: 24px 14px 36px;
    }

    .summary {
        grid-template-columns: 1fr;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .portal-layout {
        grid-template-columns: 1fr;
    }
}
