:root {
    --page-max-width: 1800px;
    --bg-950: #020617;
    --bg-900: #0f172a;
    --bg-800: #111c33;
    --bg-700: #1e2b4a;
    --bg-100: #f8f9fc;
    --accent: #6366f1;
    --accent-strong: #8b5cf6;
    --accent-soft: rgba(99, 102, 241, 0.14);
    --accent-soft-strong: rgba(99, 102, 241, 0.25);
    --text-primary: #0f172a;
    --text-inverse: #f8fafc;
    --text-muted: #64748b;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-strong: rgba(255, 255, 255, 0.92);
    --surface-glass: rgba(255, 255, 255, 0.65);
    --border-light: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.16);
    --shadow-lg: 0 32px 60px rgba(15, 23, 42, 0.16);
    --shadow-card: 0 24px 40px rgba(148, 163, 184, 0.22);
    --radius-lg: 22px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --transition: 220ms cubic-bezier(.4, 0, .2, 1);
    --success: #10b981;
    --warning: #f59e0b;
    --error: #f87171;
    --info: #3b82f6;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: inherit;
    background: linear-gradient(140deg, #f8fafc 0%, #eef2ff 38%, #e0e7ff 100%);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: stretch;
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 18%, rgba(236, 72, 153, 0.15), transparent 55%),
        radial-gradient(circle at 85% 18%, rgba(56, 189, 248, 0.18), transparent 60%),
        radial-gradient(circle at 40% 80%, rgba(99, 102, 241, 0.2), transparent 60%);
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(248, 250, 252, 0.6);
    backdrop-filter: blur(40px);
    z-index: -1;
}

a {
    color: inherit;
    text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

button {
    font: inherit;
}

input, button {
    transition: background var(--transition), box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}

/* Layout shell */
.app-shell {
    width: min(var(--page-max-width), calc(100% - 48px));
    height: calc(100vh - 48px);
    margin: 24px;
    background: rgba(255, 255, 255, 0.72);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.app-shell__body {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    height: 100%;
    /*overflow-y: auto;*/
}

.sidebar {
    background: linear-gradient(200deg, rgba(15, 23, 42, 0.94), rgba(17, 24, 39, 0.82));
    color: var(--text-inverse);
    padding: 36px 28px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    height: calc(100vh - 48px);       /* teljes képernyő magasság */
    overflow: hidden;    /* biztosan ne görögjön */
}


.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand__accent {
    width: 12px;
    height: 52px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--accent), var(--accent-strong));
    box-shadow: 0 14px 28px rgba(99, 102, 241, 0.45);
}

.brand__title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.brand__subtitle {
    margin: 4px 0 0 0;
    color: rgba(80, 80, 80, 0.5);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.nav__item {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    background: rgba(15, 23, 42, 0.35);
    color: rgba(226, 232, 240, 0.75);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.nav__item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, rgba(99, 102, 241, 0.3), transparent 55%);
    opacity: 0;
    transition: opacity var(--transition);
    z-index: -1;
}

.nav__item:hover {
    color: var(--text-inverse);
    transform: translateX(4px);
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.32);
}

.nav__item:hover::before {
    opacity: 0.4;
}

.nav__item--active {
    color: var(--text-inverse);
    background: var(--accent-soft);
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 18px 28px rgba(99, 102, 241, 0.32);
}

.nav__item--active::before {
    opacity: 0.6;
}

.nav__item--logout {
    margin-top: 12px;
    background: rgba(248, 113, 113, 0.18);
    color: var(--error);
    border-color: rgba(248, 113, 113, 0.35);
}

.nav__item--logout::before {
    background: linear-gradient(120deg, rgba(248, 113, 113, 0.35), transparent 60%);
}

.nav__item--logout:hover {
    color: var(--text-inverse);
    background: rgba(248, 113, 113, 0.28);
    box-shadow: 0 18px 32px rgba(248, 113, 113, 0.28);
}

.sidebar__footer {
    margin-top: auto;
    padding: 18px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.42);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar__upgrade-title {
    margin: 0;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.82);
}

.sidebar__upgrade-body {
    margin: 0;
    font-size: 0.93rem;
    color: rgba(226, 232, 240, 0.72);
    line-height: 1.4;
}

.sidebar__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-inverse);
    font-weight: 600;
}

.sidebar__button:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.workspace {
    background: rgba(255, 255, 255, 0.75);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(24px);
    flex: 1 1 auto;
    overflow-y: auto;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 36px 16px;
    gap: 24px;
}

.topbar__title h1 {
    margin: 0;
    font-size: 1.6rem;
}

.topbar__title p {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.topbar__search {
    position: relative;
}

.topbar__search input {
    width: 260px;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.86);
}

.topbar__search input:hover,
.topbar__search input:focus {
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.topbar__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar__icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: none;
    background: rgba(15, 23, 42, 0.08);
    cursor: pointer;
    position: relative;
}

.topbar__icon::after {
    content: '';
    position: absolute;
    inset: 50%;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    border-radius: 4px;
    transform: translate(-50%, -50%) rotate(45deg);
}

.topbar__icon:hover {
    background: rgba(99, 102, 241, 0.18);
    transform: translateY(-2px);
}

.profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 12px 24px rgba(148, 163, 184, 0.18);
}

.profile__avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-inverse);
    font-weight: 700;
}

.profile__meta {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
}

.profile__meta span:last-child {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.content {
    flex: 1;
    padding: 0 36px 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section--welcome {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 28px 32px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.section--welcome h1 {
    margin: 0 0 8px 0;
    font-size: 1.9rem;
}

.section--welcome p {
    margin: 0;
    color: var(--text-muted);
}

.section--grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.resources-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.section--split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.section__header h2 {
    margin: 0;
    font-size: 1.4rem;
}

.section__header p {
    margin: 6px 0 0;
    color: var(--text-muted);
}

.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.metric-card {
    position: relative;
    overflow: hidden;
    gap: 12px;
    text-align: center;
    --metric-color: var(--accent);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 24px 44px rgba(148, 163, 184, 0.2);
    padding: 24px 24px 20px;
}

.metric-card__header {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 600;
}

.metric-card__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.metric-card__value {
    font-size: clamp(2rem, 3vw, 2.4rem);
    font-weight: 700;
    color: var(--text-primary);
}

.metric-card__meta {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.metric-card__chart {
    height: 72px;
}

.metric-card__footer {
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.metric-spark {
    width: 100%;
    height: 100%;
}

.metric-spark__line {
    fill: none;
    stroke: var(--metric-color);
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.metric-spark__fill {
    stroke: none;
}

.metric-card .metric-spark__stop--start {
    stop-color: var(--metric-color);
    stop-opacity: 0.32;
}

.metric-card .metric-spark__stop--end {
    stop-color: var(--metric-color);
    stop-opacity: 0;
}

.card--metric {
    position: relative;
    overflow: hidden;
}

.card--metric::after {
    content: '';
    position: absolute;
    inset: auto 24px -36px;
    height: 118px;
    border-radius: 999px;
    background: radial-gradient(circle at top, rgba(99, 102, 241, 0.2), transparent 70%);
}

.card__label {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.card__value {
    margin: 0;
    font-size: 2.3rem;
    font-weight: 700;
}

.card__delta {
    margin: 0;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
}

.card__delta::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 999px;
}

.card__delta--up::before { background: var(--success); }
.card__delta--down::before { background: var(--error); }
.card__delta--stable::before { background: var(--warning); }

.card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.card__tag {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.primary-button {
    padding: 12px 24px;
    border-radius: 999px;
    background: linear-gradient(120deg, var(--accent), var(--accent-strong));
    color: var(--text-inverse);
    border: none;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 18px 32px rgba(99, 102, 241, 0.32);
}

.primary-button:hover {
    transform: translateY(-2px);
}

.ghost-button {
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(99, 102, 241, 0.4);
    background: transparent;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
}

.ghost-button:hover {
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent-strong);
}

.list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.list__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: rgba(99, 102, 241, 0.08);
    font-size: 0.92rem;
}

.list__status {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.22);
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.list__status--urgent { background: rgba(248, 113, 113, 0.18); color: var(--error); }
.list__status--muted { background: rgba(148, 163, 184, 0.18); }

.chart {
    position: relative;
    min-height: 220px;
    border-radius: var(--radius-md);
    background: linear-gradient(160deg, rgba(99, 102, 241, 0.18), rgba(14, 116, 144, 0.1));
    overflow: hidden;
}

.chart__grid {
    position: absolute;
    inset: 16px;
    border: 1px dashed rgba(99, 102, 241, 0.24);
    border-radius: var(--radius-sm);
}

.chart__line {
    position: absolute;
    bottom: 32px;
    left: 48px;
    right: 48px;
    height: 118px;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(120deg, rgba(99, 102, 241, 0.55), rgba(139, 92, 246, 0.4));
    box-shadow: 0 18px 32px rgba(99, 102, 241, 0.28);
}

/* Tables */
.table {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.table__header,
.table__row {
    display: grid;
    grid-template-columns: 1.6fr 1.2fr 1fr 1fr;
    gap: 12px;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    align-items: center;
}

.table__header {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent);
    font-weight: 600;
}

.table__row {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: 0 16px 28px rgba(148, 163, 184, 0.18);
    font-size: 0.92rem;
    color: var(--text-primary);
}

.table__cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table__cell--actions {
    justify-content: flex-end;
}

.table__cell--port {
    justify-content: flex-start;
}

.table__cell--status {
    justify-content: flex-start;
    gap: 8px;
}

.table__cell--status .status {
    margin: 0;
}

.table__port {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    background: rgba(15, 23, 42, 0.08);
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.table__service {
    font-weight: 600;
}

.table--ports .table__header,
.table--ports .table__row {
    grid-template-columns: 0.6fr 1.6fr 1fr 1fr;
}

.table--ports .table__row {
    background: rgba(248, 250, 252, 0.82);
}

.table--ports .table__row:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 34px rgba(99, 102, 241, 0.14);
}

.table__input {
    width: 100%;
}

.table__row--form {
    background: rgba(99, 102, 241, 0.08);
    border: 1px dashed rgba(99, 102, 241, 0.25);
    box-shadow: none;
}

.table__row--form .table__cell {
    align-items: stretch;
}

.table__hint {
    font-size: 0.85rem;
}

.table__row--form .button {
    align-self: center;
}

.table__field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
}

.table__field-group .table__hint {
    font-weight: 500;
}

.table--port-manage .table__header,
.table--port-manage .table__row {
    grid-template-columns: 0.6fr 1.8fr 1fr;
}

.table--port-manage .table__row {
    background: rgba(255, 255, 255, 0.86);
}

.table--port-manage .table__row--manageable:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 32px rgba(15, 23, 42, 0.18);
}

.table--port-manage .table__row--form:hover {
    transform: none;
}

.table--port-manage .table__row--manageable .button {
    min-width: 110px;
}

.table--processes .table__header,
.table--processes .table__row {
    grid-template-columns: 0.5fr 1.4fr 1fr 1fr;
    gap: 16px;
}

.process-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.process__name {
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.process__meter {
    display: flex;
    align-items: center;
    gap: 12px;
}

.process__meter-track {
    position: relative;
    flex: 1 1 auto;
    height: 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.2);
    overflow: hidden;
}

.process__meter-fill {
    position: absolute;
    inset: 0;
    width: calc(var(--percent) * 1%);
    background: linear-gradient(120deg, var(--meter-color), rgba(255, 255, 255, 0.32));
    border-radius: inherit;
    transition: width 0.4s ease;
}

.process__meter-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 52px;
    text-align: right;
}

.table--logs .table__header,
.table--logs .table__row {
    grid-template-columns: 1.2fr 0.8fr 1fr 1.6fr 0.8fr 1fr 0.9fr;
}

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.status--success { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.status--warning { background: rgba(245, 158, 11, 0.22); color: var(--warning); }
.status--error { background: rgba(248, 113, 113, 0.22); color: var(--error); }
.status--info { background: rgba(59, 130, 246, 0.18); color: var(--info); }

/* Filter chips */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.chip:hover {
    background: rgba(99, 102, 241, 0.18);
    color: var(--accent);
}

.chip--active {
    background: rgba(99, 102, 241, 0.24);
    color: var(--accent);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.24);
}

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 600;
    cursor: pointer;
    background: rgba(99, 102, 241, 0.18);
    color: var(--accent);
}

.button:hover {
    background: rgba(99, 102, 241, 0.28);
}

.button--primary {
    background: linear-gradient(120deg, var(--accent), var(--accent-strong));
    color: var(--text-inverse);
}

.button--primary:hover {
    transform: translateY(-2px);
}

.button--ghost {
    background: transparent;
    border: 1px solid rgba(99, 102, 241, 0.4);
}

.button--danger {
    background: rgba(248, 113, 113, 0.18);
    color: var(--error);
}

.button--danger:hover {
    background: rgba(248, 113, 113, 0.26);
}

.button--success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.button--success:hover {
    background: rgba(16, 185, 129, 0.3);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.service-card {
    position: relative;
    padding: 22px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 18px 28px rgba(148, 163, 184, 0.2);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 44px rgba(99, 102, 241, 0.22);
}

.service-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.service-card__meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.service-card__actions {
    display: flex;
    gap: 10px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.12);
}

.status-dot.online { background: var(--success); }
.status-dot.offline { background: var(--error); }

.service-detail {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.service-detail__stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.service-detail__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.log-view {
    background: #0b1220;
    color: #9ef089;
    border-radius: var(--radius-sm);
    padding: 16px;
    max-height: 480px;
    overflow: auto;
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.85rem;
}

/* Auth */
body.auth {
    align-items: center;
    justify-content: center;
    padding: 32px;
    overflow: auto;
}

.auth-card {
    width: min(360px, 100%);
    padding: 36px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 28px 56px rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.16);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-card__header h1 {
    margin: 0;
    font-size: 1.8rem;
}

.auth-card__header p {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.input:hover,
.input:focus {
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
}

.alert--error {
    background: rgba(248, 113, 113, 0.16);
    color: var(--error);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.auth-card__footer {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Utilities */
.muted {
    color: var(--text-muted);
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Responsiveness */
@media (max-width: 1080px) {
    .app-shell__body {
        grid-template-columns: 240px minmax(0, 1fr);
    }

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

@media (max-width: 920px) {
    .app-shell {
        margin: 16px;
        width: min(var(--page-max-width), calc(100% - 32px));
        height: calc(100vh - 32px);
    }

    .app-shell__body {
        grid-template-columns: minmax(0, 1fr);
    }

    .sidebar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 20px 24px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    .nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
    }

    .sidebar__footer {
        display: none;
    }

    .workspace {
        min-height: auto;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar__search input {
        width: 100%;
    }

    .content {
        padding: 0 24px 32px;
    }
}

@media (max-width: 620px) {
    .app-shell {
        margin: 12px;
        width: min(var(--page-max-width), calc(100% - 24px));
        height: calc(100vh - 24px);
    }

    .metric-card__layout {
        flex-direction: column;
        align-items: flex-start;
    }

    .metric-gauge {
        width: 90px;
        height: 90px;
    }

    .section--welcome {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

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

    .topbar__actions {
        justify-content: space-between;
    }

    .table__header,
    .table__row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .table--logs .table__header,
    .table--logs .table__row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    body {
        display: block;
        overflow: auto;
        padding: 0;
        align-items: stretch;
        justify-content: flex-start;
    }

    .app-shell {
        margin: 0;
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        height: auto;
        border-radius: 0;
        box-shadow: none;
    }

    .app-shell__body {
        display: flex;
        flex-direction: column;
        height: auto;
    }

    .sidebar {
        position: sticky;
        top: 0;
        z-index: 30;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 16px 20px;
        height: auto;
        overflow: visible;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.16);
        box-shadow: none;
    }

    .nav {
        flex-direction: column;
        gap: 10px;
    }

    .nav__item {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 16px;
        font-size: 0.95rem;
    }

    .sidebar__footer {
        display: none;
    }

    .workspace {
        min-height: auto;
        backdrop-filter: none;
    }

    .topbar {
        padding: 20px;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .topbar__search input {
        width: 100%;
    }

    .topbar__actions {
        width: 100%;
        justify-content: flex-start;
        gap: 12px;
        flex-wrap: wrap;
    }

    .profile {
        width: 100%;
        justify-content: space-between;
        gap: 12px;
    }

    .content {
        padding: 0 20px 28px;
    }

    .section--welcome {
        align-items: flex-start;
    }

    .section--grid,
    .resources-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 20px;
    }

    .table__header,
    .table__row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .table__header {
        position: sticky;
        top: 0;
        z-index: 5;
    }

    body.auth {
        padding: 24px 16px;
        align-items: stretch;
        justify-content: flex-start;
    }

    .auth-card {
        margin: 0 auto;
        padding: 24px 20px;
        box-shadow: none;
        border-radius: var(--radius-md);
    }
}

@media (max-width: 480px) {
    .sidebar {
        padding: 14px 16px;
    }

    .nav {
        gap: 8px;
    }

    .nav__item {
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .topbar {
        padding: 18px 16px 14px;
    }

    .topbar__actions {
        gap: 10px;
    }

    .profile {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .profile__meta {
        font-size: 0.85rem;
    }

    .content {
        padding: 0 16px 24px;
        gap: 24px;
    }

    .section--welcome {
        padding: 22px 20px;
    }

    .table__header,
    .table__row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .table__row {
        padding: 12px 14px;
    }

    .services-grid {
        gap: 16px;
    }

    .primary-button,
    .ghost-button,
    .sidebar__button {
        width: 100%;
        text-align: center;
    }

    .auth-card {
        padding: 20px 16px;
    }
}
