:root {
    font-family: Inter, system-ui, sans-serif;
    color: #1f2937;
    background: #f3f4f6;
}

* { box-sizing: border-box; }

body { margin: 0; }

.topbar {
    background: #111827;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 5%;
}

.brand {
    color: white;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
}

.subtitle {
    color: #9ca3af;
    margin-left: 12px;
}

nav a {
    color: #d1d5db;
    margin-left: 18px;
    text-decoration: none;
}

nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

nav a { margin-left: 0; }

.logout-form { margin: 0; }

.nav-button {
    padding: 0;
    background: transparent;
    color: #d1d5db;
    border-radius: 0;
}

.container {
    width: min(1200px, 92%);
    margin: 30px auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 22px;
}

h1, h2 { margin-top: 0; }

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 22px;
}

.stat, .card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

.stat {
    padding: 22px;
    display: flex;
    flex-direction: column;
}

.stat strong { font-size: 30px; }

.card {
    padding: 24px;
    margin-bottom: 22px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 13px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

th { color: #4b5563; font-size: 13px; }

.button, button {
    display: inline-block;
    border: 0;
    border-radius: 8px;
    padding: 10px 16px;
    background: #2563eb;
    color: white;
    text-decoration: none;
    cursor: pointer;
}

.button.secondary { background: #6b7280; }
.button.ghost { border: 1px solid #cbd5e1; background: white; color: #334155; }

.danger { background: #b91c1c; }

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    background: #e5e7eb;
}

.badge.activo { background: #dcfce7; color: #166534; }
.badge.mantenimiento { background: #fef3c7; color: #92400e; }
.badge.inactivo { background: #fee2e2; color: #991b1b; }

pre {
    white-space: pre-wrap;
    word-break: break-word;
    background: #111827;
    color: #f9fafb;
    padding: 14px;
    border-radius: 8px;
}

label, dt {
    font-weight: 700;
}

dt { margin-top: 12px; }
dd { margin-left: 0; }

input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
}

.form-card { max-width: 850px; margin-left: auto; margin-right: auto; }

.message {
    background: #dcfce7;
    border: 1px solid #86efac;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 18px;
}

.message.warning {
    background: #fef3c7;
    border-color: #f59e0b;
}

.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 10%, rgba(37, 99, 235, .35), transparent 35%),
        linear-gradient(135deg, #081120, #111827 55%, #172554);
    color: white;
}

.login-shell {
    min-height: 100vh;
    width: min(1080px, 90%);
    margin: auto;
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 70px;
    align-items: center;
}

.login-intro h1 {
    max-width: 650px;
    margin: 16px 0;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1;
    letter-spacing: -.04em;
}

.login-intro p {
    max-width: 590px;
    color: #cbd5e1;
    font-size: 19px;
    line-height: 1.6;
}

.eyebrow {
    color: #93c5fd;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .16em;
}

.login-features {
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
    color: #dbeafe;
}

.login-features li { margin: 13px 0; }
.login-features li::before { content: "✓"; color: #60a5fa; margin-right: 10px; }

.login-card {
    padding: 36px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 18px;
    background: rgba(255, 255, 255, .97);
    color: #111827;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .3);
}

.login-mark {
    width: 52px;
    height: 52px;
    margin-bottom: 24px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #2563eb;
    color: white;
    font-size: 13px;
    font-weight: 800;
}

.login-card h2 { margin-bottom: 6px; font-size: 28px; }
.muted { color: #6b7280; }
.field { margin: 20px 0; }
.field label { display: block; margin-bottom: 8px; }
.login-submit { width: 100%; margin-top: 8px; font-size: 16px; }

.form-error {
    margin: 18px 0;
    padding: 12px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fef2f2;
    color: #991b1b;
}

.security-page { max-width: 1180px; margin: 0 auto; }

.security-hero {
    display: flex;
    justify-content: space-between;
    gap: 32px;
    align-items: flex-end;
    margin-bottom: 24px;
}

.security-hero h1 {
    margin: 8px 0;
    font-size: clamp(32px, 4vw, 48px);
    letter-spacing: -.035em;
}

.security-hero p, .section-heading p {
    margin: 0;
    color: #64748b;
}

.eyebrow.dark { color: #2563eb; }

.region-chip {
    min-width: 150px;
    padding: 13px 16px;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #eff6ff;
}

.region-chip small, .region-chip strong { display: block; }
.region-chip small { color: #64748b; font-size: 11px; }
.region-dot { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 5px #dcfce7; }

.security-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.security-stat {
    padding: 17px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: white;
}

.security-stat span { color: #64748b; }
.security-stat strong { font-size: 22px; color: #0f172a; }
.security-card { padding: 0; overflow: hidden; }

.section-heading {
    padding: 24px 26px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}

.section-heading h2 { margin-bottom: 5px; }
.policy-legend { display: flex; align-items: center; gap: 7px; color: #64748b; font-size: 12px; white-space: nowrap; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; margin-left: 8px; }
.legend-dot.restricted { background: #2563eb; }
.legend-dot.public { background: #16a34a; }

.security-table th { padding: 13px 18px; background: #f8fafc; color: #64748b; }
.security-table td { padding: 16px 18px; }
.security-table tbody tr:hover { background: #f8fafc; }
.security-table td:first-child strong, .security-table td:first-child small { display: block; }
.security-table td:first-child small { margin-top: 4px; color: #94a3b8; }
.security-table code { padding: 5px 7px; border-radius: 6px; background: #f1f5f9; color: #334155; font-size: 12px; }

.access-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.access-pill.restricted { background: #dbeafe; color: #1d4ed8; }
.access-pill.public { background: #dcfce7; color: #15803d; }

.security-notice {
    margin: 22px 26px;
    padding: 14px 16px;
    display: flex;
    gap: 13px;
    align-items: flex-start;
    border: 1px solid #fde68a;
    border-radius: 10px;
    background: #fffbeb;
    color: #78350f;
}

.notice-icon {
    flex: 0 0 23px;
    height: 23px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f59e0b;
    color: white;
    font-weight: 800;
}

.security-notice p { margin: 3px 0 0; color: #92400e; }
#aws-rules-form { padding: 0 26px 26px; }

.confirm-row {
    padding: 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    cursor: pointer;
}

.confirm-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: #2563eb; }
.confirm-row span, .confirm-row small { display: block; }
.confirm-row small { margin-top: 3px; color: #64748b; font-weight: 400; }
.security-actions { margin-top: 18px; }

.loading-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, .72);
    backdrop-filter: blur(6px);
}

.loading-modal[hidden] { display: none; }
.modal-open { overflow: hidden; }

.loading-panel {
    width: min(460px, 100%);
    padding: 38px;
    border-radius: 18px;
    background: white;
    text-align: center;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .35);
}

.loading-panel h2 { margin: 10px 0; font-size: 27px; }
.loading-panel p { color: #64748b; line-height: 1.55; }

.spinner {
    width: 54px;
    height: 54px;
    margin: 0 auto 22px;
    border: 5px solid #dbeafe;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

.loading-steps {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 11px;
}

.loading-steps span { padding: 6px 8px; border-radius: 999px; background: #f1f5f9; }
.loading-steps .active { background: #dbeafe; color: #1d4ed8; font-weight: 700; }
button:disabled { cursor: wait; opacity: .72; }

@keyframes spin { to { transform: rotate(360deg); } }

.dashboard-page { max-width: 1180px; margin: 0 auto; }

.dashboard-hero {
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    gap: 30px;
    align-items: flex-end;
}

.dashboard-hero h1 {
    margin: 8px 0;
    font-size: clamp(34px, 4vw, 50px);
    letter-spacing: -.04em;
}

.dashboard-hero p { margin: 0; color: #64748b; font-size: 17px; }
.dashboard-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.dashboard-stats {
    margin-bottom: 18px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.metric-card {
    min-height: 138px;
    padding: 22px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: white;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .04);
}

.metric-card span, .metric-card strong, .metric-card small { display: block; }
.metric-card > div > span { color: #64748b; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.metric-card strong { margin: 8px 0 2px; color: #0f172a; font-size: 36px; line-height: 1; }
.metric-card small { color: #94a3b8; }

.metric-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    display: grid;
    place-content: center;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
}

.metric-card.primary .metric-icon { background: #dbeafe; color: #1d4ed8; }
.metric-card.success .metric-icon { background: #dcfce7; color: #15803d; font-size: 20px; }
.metric-card.warning .metric-icon { background: #fef3c7; color: #b45309; font-size: 20px; }

.dashboard-card { padding: 0; overflow: hidden; }
.table-count {
    align-self: center;
    min-width: 82px;
    min-height: 30px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}
.dashboard-table th { padding: 13px 18px; background: #f8fafc; color: #64748b; }
.dashboard-table td { padding: 16px 18px; }
.dashboard-table tbody tr { transition: background .15s ease; }
.dashboard-table tbody tr:hover { background: #f8fafc; }
.dashboard-table td:first-child strong, .dashboard-table td:first-child small { display: block; }
.dashboard-table td:first-child small { margin-top: 4px; color: #94a3b8; }
.dashboard-table code { padding: 5px 7px; border-radius: 6px; background: #f1f5f9; color: #334155; }

.version-pill {
    display: inline-block;
    padding: 5px 9px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: white;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.ip-access-list {
    max-width: 280px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.ip-access-pill {
    padding: 4px 7px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 6px;
    background: #dbeafe;
    color: #1d4ed8;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.ip-access-pill i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.ip-access-pill.public { background: #dcfce7; color: #15803d; font-family: inherit; }
.ip-empty { color: #94a3b8; font-size: 12px; }

.status-pill, .result-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-pill.activo, .result-pill.exitosa { background: #dcfce7; color: #15803d; }
.status-pill.mantenimiento, .result-pill.observaciones, .result-pill.pendiente { background: #fef3c7; color: #b45309; }
.status-pill.inactivo, .result-pill.fallida, .result-pill.revertida { background: #fee2e2; color: #b91c1c; }
.result-pill.ejecutando { background: #dbeafe; color: #1d4ed8; }
.row-action { text-align: right; white-space: nowrap; }
.row-action a { color: #2563eb; font-size: 13px; font-weight: 700; text-decoration: none; }
.row-action a:hover { text-decoration: underline; }
.empty-state { padding: 38px !important; color: #94a3b8; text-align: center !important; }

.server-page { max-width: 1180px; margin: 0 auto; }

.server-hero {
    margin-bottom: 22px;
    display: flex;
    justify-content: space-between;
    gap: 28px;
    align-items: flex-end;
}

.server-hero h1 {
    margin: 8px 0;
    font-size: clamp(32px, 4vw, 48px);
    letter-spacing: -.04em;
}

.server-hero p { margin: 0; color: #64748b; font-size: 17px; }
.server-hero p span { margin: 0 5px; color: #cbd5e1; }
.server-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.server-summary {
    margin-bottom: 18px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: white;
    overflow: hidden;
}

.server-summary article {
    min-width: 0;
    padding: 18px 20px;
    border-right: 1px solid #e2e8f0;
}

.server-summary article:last-child { border-right: 0; }
.server-summary article > span, .server-summary article > strong { display: block; }
.server-summary article > span { margin-bottom: 7px; color: #64748b; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.server-summary article > strong:not(.status-pill) { overflow: hidden; color: #0f172a; text-overflow: ellipsis; white-space: nowrap; }

.server-grid {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 18px;
}

.server-grid .card { margin-bottom: 18px; }
.card-title-row { margin-bottom: 22px; display: flex; justify-content: space-between; }
.card-title-row h2 { margin: 6px 0 0; }

.info-list { margin: 0; }
.info-list > div { padding: 13px 0; border-bottom: 1px solid #f1f5f9; }
.info-list > div:last-child { border-bottom: 0; }
.info-list dt { margin: 0 0 5px; color: #64748b; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.info-list dd { color: #0f172a; }
.info-list code { padding: 4px 6px; border-radius: 5px; background: #f1f5f9; color: #334155; }

.command-block { margin-top: 17px; }
.deployment-action { margin-top: 22px; padding-top: 22px; border-top: 1px solid #e2e8f0; scroll-margin-top: 24px; }
.deployment-action h3 { margin: 0 0 8px; font-size: 17px; color: #0f172a; }
.deployment-action > p { margin: 0 0 18px; color: #64748b; font-size: 14px; line-height: 1.6; }
.deployment-submit { width: 100%; padding: 14px 20px; font-size: 15px; font-weight: 700; }
.deployment-feedback { margin-top: 16px; padding: 16px; border: 1px solid #bfdbfe; border-radius: 10px; background: #eff6ff; }
.deployment-feedback[hidden], .deployment-feedback [hidden] { display: none; }
.deployment-feedback p { margin: 0 0 12px; color: #1e40af; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-line; }
.deployment-progress { display: block; width: 100%; height: 10px; border: none; border-radius: 999px; accent-color: #2563eb; }
.deployment-feedback[data-state="success"] { border-color: #86efac; background: #f0fdf4; }
.deployment-feedback[data-state="success"] p { color: #166534; }
.deployment-feedback[data-state="success"] .deployment-progress { accent-color: #16a34a; }
.deployment-feedback[data-state="error"] { border-color: #fecaca; background: #fef2f2; }
.deployment-feedback[data-state="error"] p { color: #991b1b; }
.deployment-history-link { display: inline-block; margin-top: 12px; color: #1d4ed8; font-size: 13px; font-weight: 700; }
.configured-ips-policy { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 24px; background: #eff6ff; border-top: 1px solid #dbeafe; color: #1e40af; font-size: 13px; }
.configured-ip-accesses { display: flex; gap: 6px; flex-wrap: wrap; }
.configured-ips-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 24px; border-top: 1px solid #e2e8f0; color: #64748b; }
.configured-ips-footer a { font-size: 13px; font-weight: 700; color: #1d4ed8; text-decoration: none; }
.deployment-history { margin-bottom: 24px; scroll-margin-top: 24px; }
.deployment-history > summary { cursor: pointer; padding: 15px 0; font-size: 14px; font-weight: 700; color: #475569; }
.deployment-history[open] > summary { margin-bottom: 8px; }
.command-block:first-of-type { margin-top: 0; }
.command-heading { margin-bottom: 7px; display: flex; justify-content: space-between; align-items: center; }
.command-heading span { color: #475569; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.command-block pre { margin: 0; padding: 15px; border: 1px solid #1e293b; box-shadow: inset 0 1px rgba(255, 255, 255, .04); font-size: 12px; }

.copy-button {
    padding: 5px 9px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: white;
    color: #475569;
    font-size: 11px;
}

.copy-button:hover { background: #f1f5f9; }
.ssh-connect { margin-top: 14px; }
.ssh-connect form { margin: 0; }
.ssh-connect-button { min-width: 124px; font-size: 14px; font-weight: 700; }
.ssh-connect-button:hover { background: #1d4ed8; }
.ssh-connect-button:disabled { cursor: wait; opacity: .65; }
.ssh-connect-help, .ssh-connect-status { margin: 10px 0 0; font-size: 13px; line-height: 1.6; color: #64748b; }
.ssh-connect-help a { display: inline-block; color: #1d4ed8; text-underline-offset: 3px; }
.ssh-connect-status { color: #334155; }
.ssh-connect-status[data-state="error"] { color: #b91c1c; }
.history-card { margin-top: 0; }
.history-description td { padding-top: 0; background: #f8fafc; color: #64748b; font-size: 13px; }

.danger-zone {
    margin-top: 18px;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    border: 1px solid #fecaca;
    border-radius: 12px;
    background: #fff7f7;
}

.danger-zone strong { color: #991b1b; }
.danger-zone p { margin: 4px 0 0; color: #b45353; }

.offices-page { max-width: 1180px; margin: 0 auto; }
.offices-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: 18px; }
.office-presets { margin-bottom: 28px; }
.office-presets h2 { margin: 6px 0 8px; }
.office-presets .offices-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.office-presets .office-form-card { display: flex; flex-direction: column; align-items: flex-start; }
.office-presets .office-form-card h3 { margin: 0 0 10px; }
.office-presets .office-form-card p { margin: 0 0 20px; color: #475569; line-height: 1.6; overflow-wrap: anywhere; }
.office-presets .office-form-card form { margin-top: auto; }
.office-presets-note { margin: 12px 0 0; font-size: 13px; line-height: 1.6; }
.office-form-card, .offices-list-card { margin-bottom: 0; }
.office-form-card .muted { margin-top: -10px; }
.office-submit { width: 100%; margin-top: 20px; text-align: center; }

.server-selector {
    margin: 22px 0 0;
    padding: 0;
    border: 0;
}

.server-selector legend { margin-bottom: 10px; font-weight: 700; }
.server-selector > div { display: grid; gap: 8px; }
.server-selector label {
    padding: 11px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #f8fafc;
    font-weight: 500;
    cursor: pointer;
}

.server-selector input { width: 17px; height: 17px; accent-color: #2563eb; }
.server-selector small { display: block; margin-top: 9px; color: #64748b; }
.office-list { border-top: 1px solid #e2e8f0; }

.office-item {
    padding: 17px 0;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}

.office-item:last-child { border-bottom: 0; }
.office-main { min-width: 0; display: flex; gap: 12px; align-items: center; }
.office-main strong { display: block; }

.office-domains {
    margin-top: 5px;
    display: grid;
    gap: 3px;
    color: #64748b;
    font-size: 12px;
}

.office-domains span {
    display: block;
    overflow-wrap: anywhere;
}

.office-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: grid;
    place-content: center;
    border-radius: 11px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.office-status { display: flex; gap: 9px; align-items: center; }
.access-pill.pending { background: #f1f5f9; color: #64748b; }
.office-help { margin: 18px 0 0; }

.detail-row td {
    background: #f9fafb;
    color: #4b5563;
}

@media (max-width: 800px) {
    .grid, .stats { grid-template-columns: 1fr; }
    .topbar, .page-header { align-items: flex-start; flex-direction: column; }
    nav a { margin-left: 0; margin-right: 12px; }
    .login-shell {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 55px 0;
    }
    .login-intro h1 { font-size: 44px; }
    .security-hero, .section-heading { align-items: flex-start; flex-direction: column; }
    .security-stats { grid-template-columns: 1fr; }
    .region-chip { width: 100%; }
    .security-table th, .security-table td { padding: 13px; }
    .policy-legend { flex-wrap: wrap; }
    .loading-steps { flex-direction: column; }
    .dashboard-hero { align-items: flex-start; flex-direction: column; }
    .dashboard-stats { grid-template-columns: 1fr; }
    .dashboard-actions { width: 100%; }
    .dashboard-actions .button { flex: 1; text-align: center; }
    .server-hero { align-items: flex-start; flex-direction: column; }
    .server-actions { width: 100%; }
    .server-actions .button { flex: 1; text-align: center; }
    .server-summary { grid-template-columns: 1fr 1fr; }
    .server-summary article:nth-child(2) { border-right: 0; }
    .server-summary article:nth-child(-n+2) { border-bottom: 1px solid #e2e8f0; }
    .server-grid { grid-template-columns: 1fr; }
    .danger-zone { align-items: flex-start; flex-direction: column; }
    .offices-grid { grid-template-columns: 1fr; }
    .office-presets .offices-grid { grid-template-columns: 1fr; }
    .office-item, .office-status { align-items: flex-start; flex-direction: column; }
    .office-status { padding-left: 54px; }
}
