* {
    box-sizing: border-box;
}

:root {
    --bg: #f3f6fb;
    --panel: #ffffff;
    --text: #172033;
    --muted: #748096;
    --border: #e2e8f2;
    --navy: #172033;
    --green: #22a06b;
    --yellow: #e2a400;
    --red: #d94b4b;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background: var(--bg);
    color: var(--text);
}

body {
    min-width: 320px;
}

.topbar {
    height: 72px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 20;
}

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

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy);
    color: #ffffff;
    font-weight: 800;
}

.brand-title {
    font-size: 18px;
    font-weight: 800;
}

.collect-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--green);
    font-size: 13px;
    font-weight: 700;
}

.collect-status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
}

.logout-button {
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #ffffff;
    color: var(--text);
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.logout-button:hover {
    background: #f7f9fc;
}

.dashboard-shell {
    max-width: 1440px;
    margin: 0 auto;
    padding: 30px;
}

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

.dashboard-title h1 {
    margin: 0 0 7px;
    font-size: 28px;
    letter-spacing: -0.5px;
}

.dashboard-title p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.server-health {
    min-width: 160px;
    text-align: right;
}

.server-health-label {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 5px;
}

.server-health-value {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 17px;
    font-weight: 800;
    color: var(--green);
}

.server-health-value::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.metric-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 5px 18px rgba(31, 45, 68, 0.04);
}

.metric-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.metric-name {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.metric-state {
    font-size: 12px;
    font-weight: 800;
}

.state-normal {
    color: var(--green);
}

.state-warning {
    color: var(--yellow);
}

.state-danger {
    color: var(--red);
}

.metric-value {
    margin-bottom: 5px;
    font-size: 35px;
    font-weight: 800;
    letter-spacing: -1px;
}

.metric-sub {
    min-height: 20px;
    color: var(--muted);
    font-size: 14px;
}

.progress {
    width: 100%;
    height: 7px;
    margin-top: 18px;
    overflow: hidden;
    background: #edf1f6;
    border-radius: 999px;
}

.progress-bar {
    height: 100%;
    border-radius: inherit;
    background: var(--green);
}

.progress-bar.warning {
    background: var(--yellow);
}

.progress-bar.danger {
    background: var(--red);
}

.info-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

.info-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 5px 18px rgba(31, 45, 68, 0.04);
}

.info-card h2 {
    margin: 0 0 18px;
    font-size: 17px;
}

.load-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.load-item {
    padding: 15px;
    border-radius: 13px;
    background: #f7f9fc;
}

.load-label {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 6px;
}

.load-value {
    font-size: 22px;
    font-weight: 800;
}

.uptime-number {
    font-size: 31px;
    font-weight: 800;
    margin-bottom: 5px;
}

.uptime-sub {
    color: var(--muted);
    font-size: 14px;
}

.section-placeholder {
    margin-top: 16px;
    padding: 22px;
    border: 1px dashed #cad3e1;
    border-radius: 18px;
    color: var(--muted);
    background: rgba(255,255,255,0.45);
}

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px;
    box-shadow: 0 20px 60px rgba(20,32,55,0.09);
}

.brand-mark {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--navy);
    color: #ffffff;
    font-weight: 800;
    margin-bottom: 22px;
}

.login-card h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

.login-description {
    margin: 0 0 28px;
    color: var(--muted);
}

.login-card label {
    display: block;
    margin: 16px 0 7px;
    font-size: 14px;
    font-weight: 700;
}

.login-card input[type="text"],
.login-card input[type="password"] {
    width: 100%;
    height: 48px;
    border: 1px solid #d4dce8;
    border-radius: 10px;
    padding: 0 13px;
    font-size: 16px;
}

.login-card button {
    width: 100%;
    height: 50px;
    margin-top: 24px;
    border: 0;
    border-radius: 10px;
    background: var(--navy);
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
}

.alert {
    padding: 12px 14px;
    margin: 18px 0;
    border-radius: 10px;
    background: #fff3f3;
    color: #a02525;
    font-size: 14px;
}

@media (max-width: 1000px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 640px) {
    .topbar {
        padding: 0 16px;
    }

    .collect-status {
        display: none;
    }

    .dashboard-shell {
        padding: 22px 16px;
    }

    .dashboard-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .server-health {
        text-align: left;
    }

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

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

    .login-card {
        padding: 28px 22px;
    }
}

/* SERVICE STATUS SECTION */

.service-section {
    margin-top: 18px;
    padding: 24px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 5px 18px rgba(31,45,68,0.04);
}

.service-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.service-section-header h2 {
    margin: 0 0 6px;
    font-size: 19px;
}

.service-section-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.service-summary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 999px;
    background: #f3f6fa;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.service-summary::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.service-summary.state-normal {
    color: var(--green);
    background: #edf9f4;
}

.service-summary.state-warning {
    color: var(--yellow);
    background: #fff8e5;
}

.service-summary.state-danger {
    color: var(--red);
    background: #fff0f0;
}

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

.service-card {
    padding: 18px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 15px;
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 9px 24px rgba(31,45,68,0.07);
}

.service-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.service-name {
    margin-bottom: 5px;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
}

.service-domain {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
    word-break: break-all;
}

.service-state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 800;
}

.service-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.service-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 17px;
    padding-top: 14px;
    border-top: 1px solid #edf1f6;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}


.service-loading,
.service-load-error {
    grid-column: 1 / -1;
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #ccd5e2;
    border-radius: 14px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 14px;
}

.service-load-error {
    color: var(--red);
    background: #fff7f7;
    border-color: #efcaca;
}

@media (max-width: 640px) {
    .service-section {
        padding: 18px;
    }

    .service-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

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

/* SERVICE GRID RESPONSIVE V2 */

@media (min-width: 1201px) {
    .service-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (min-width: 901px) and (max-width: 1200px) {
    .service-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 641px) and (max-width: 900px) {
    .service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* SSL STATUS SECTION */

.ssl-section {
    margin-top: 18px;
    padding: 24px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 5px 18px rgba(31,45,68,0.04);
}

.ssl-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.ssl-section-header h2 {
    margin: 0 0 6px;
    font-size: 19px;
}

.ssl-section-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.ssl-summary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 999px;
    background: #f3f6fa;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.ssl-summary::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.ssl-summary.state-normal {
    color: var(--green);
    background: #edf9f4;
}

.ssl-summary.state-warning {
    color: var(--yellow);
    background: #fff8e5;
}

.ssl-summary.state-danger {
    color: var(--red);
    background: #fff0f0;
}

.ssl-table {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 15px;
}

.ssl-table-head,
.ssl-row {
    display: grid;
    grid-template-columns:
        minmax(260px, 2fr)
        110px
        120px
        140px;
    gap: 14px;
    align-items: center;
}

.ssl-table-head {
    padding: 13px 18px;
    background: #f7f9fc;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.ssl-row {
    padding: 15px 18px;
    border-top: 1px solid #edf1f6;
    background: #ffffff;
}

.ssl-domain {
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    word-break: break-all;
}

.ssl-state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
}

.ssl-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.ssl-days {
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
}

.ssl-expiry {
    color: var(--muted);
    font-size: 13px;
}

.ssl-loading,
.ssl-load-error {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--muted);
    background: #ffffff;
    font-size: 14px;
}

.ssl-load-error {
    color: var(--red);
    background: #fff7f7;
}


@media (max-width: 760px) {
    .ssl-section {
        padding: 18px;
    }

    .ssl-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .ssl-table-head {
        display: none;
    }

    .ssl-row {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "domain state"
            "days expiry";
        gap: 9px 14px;
        padding: 16px;
    }

    .ssl-domain {
        grid-area: domain;
    }

    .ssl-state {
        grid-area: state;
        justify-self: end;
    }

    .ssl-days {
        grid-area: days;
    }

    .ssl-expiry {
        grid-area: expiry;
        justify-self: end;
    }
}

/* WEB RUNTIME SECTION */

.runtime-section {
    margin-top: 18px;
    padding: 24px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 5px 18px rgba(31,45,68,0.04);
}

.runtime-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.runtime-section-header h2 {
    margin: 0 0 6px;
    font-size: 19px;
}

.runtime-section-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.runtime-summary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 999px;
    background: #f3f6fa;
    font-size: 13px;
    font-weight: 800;
}

.runtime-summary::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.runtime-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.runtime-card {
    position: relative;
    padding: 20px;
    min-height: 150px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 15px;
}


.runtime-card-title {
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.runtime-status {
    position: absolute;
    top: 20px;
    right: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
}

.runtime-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.runtime-main {
    margin-top: 24px;
    color: var(--text);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.runtime-sub {
    margin-top: 7px;
    color: var(--muted);
    font-size: 13px;
}

.extension-panel {
    margin-top: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #f8fafc;
}

.extension-title {
    margin-bottom: 14px;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

.extension-grid {
    display: grid;
    grid-template-columns: repeat(
        5,
        minmax(0, 1fr)
    );
    gap: 10px;
}

.extension-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.extension-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
}

.extension-item.loaded .extension-dot {
    background: var(--green);
}

.extension-item.missing {
    color: var(--red);
}

.extension-item.missing .extension-dot {
    background: var(--red);
}


.runtime-summary.state-normal {
    color: var(--green);
    background: #edf9f4;
}

.runtime-summary.state-warning {
    color: var(--yellow);
    background: #fff8e5;
}

.runtime-summary.state-danger {
    color: var(--red);
    background: #fff0f0;
}

@media (max-width: 900px) {
    .extension-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .runtime-section {
        padding: 18px;
    }

    .runtime-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .extension-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .runtime-main {
        font-size: 21px;
    }
}

/* DATABASE STATUS SECTION */

.database-section {
    margin-top: 18px;
    padding: 24px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 5px 18px rgba(31,45,68,0.04);
}

.database-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.database-section-header h2 {
    margin: 0 0 6px;
    font-size: 19px;
}

.database-section-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.database-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 999px;
    background: #f3f6fa;
    font-size: 13px;
    font-weight: 800;
}

.database-status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.database-status.state-normal {
    color: var(--green);
    background: #edf9f4;
}

.database-status.state-warning {
    color: var(--yellow);
    background: #fff8e5;
}

.database-status.state-danger {
    color: var(--red);
    background: #fff0f0;
}

.database-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.database-card {
    padding: 20px;
    min-height: 138px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 15px;
}

.database-card-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.database-card-value {
    margin-top: 22px;
    color: var(--text);
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.database-card-sub {
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
}

.database-meta {
    margin-top: 14px;
    padding: 12px 15px;
    border-radius: 11px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}


.database-table-wrap {
    margin-top: 14px;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #ffffff;
}

.database-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    table-layout: fixed;
}

.database-table th,
.database-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}

.database-table th {
    background: #f8fafc;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.database-table td {
    color: var(--text);
    font-size: 13px;
}

.database-table th:first-child,
.database-table td:first-child {
    width: 68%;
}

.database-table th:nth-child(2),
.database-table td:nth-child(2) {
    width: 14%;
    text-align: right;
}

.database-table th:nth-child(3),
.database-table td:nth-child(3) {
    width: 18%;
    text-align: right;
}

.database-table tbody tr:last-child td {
    border-bottom: 0;
}

.database-name-cell {
    overflow-wrap: anywhere;
    font-weight: 700;
}

.database-number-cell {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}


@media (max-width: 1100px) {
    .database-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .database-section {
        padding: 18px;
    }

    .database-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .database-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .database-card {
        min-height: 128px;
        padding: 17px;
    }

    .database-card-value {
        margin-top: 18px;
        font-size: 22px;
    }

    .database-meta {
        line-height: 1.6;
    }
}

@media (max-width: 560px) {
    .database-cards {
        grid-template-columns: 1fr;
    }

    .database-card {
        min-height: 116px;
    }

    .database-table {
        min-width: 540px;
    }
}

/* VHOST STATUS SECTION */

.vhost-section {
    margin-top: 18px;
    padding: 24px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 5px 18px rgba(31,45,68,0.04);
}

.vhost-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.vhost-section-header h2 {
    margin: 0 0 6px;
    font-size: 19px;
}

.vhost-section-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.vhost-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 999px;
    background: #f3f6fa;
    font-size: 13px;
    font-weight: 800;
}

.vhost-status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.vhost-status.state-normal {
    color: var(--green);
    background: #edf9f4;
}

.vhost-status.state-warning {
    color: var(--yellow);
    background: #fff8e5;
}

.vhost-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.vhost-card {
    padding: 20px;
    min-height: 138px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 15px;
}

.vhost-card-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.vhost-card-value {
    margin-top: 22px;
    color: var(--text);
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.vhost-card-sub {
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
}

.vhost-summary {
    margin-top: 14px;
    padding: 12px 15px;
    border-radius: 11px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}


.vhost-table-wrap {
    margin-top: 14px;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #ffffff;
}

.vhost-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    table-layout: fixed;
}

.vhost-table th,
.vhost-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}

.vhost-table th {
    background: #f8fafc;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.vhost-table td {
    color: var(--text);
    font-size: 13px;
}

.vhost-table th:nth-child(1),
.vhost-table td:nth-child(1) {
    width: 28%;
}

.vhost-table th:nth-child(2),
.vhost-table td:nth-child(2) {
    width: 11%;
    text-align: center;
}

.vhost-table th:nth-child(3),
.vhost-table td:nth-child(3) {
    width: 11%;
    text-align: center;
}

.vhost-table th:nth-child(4),
.vhost-table td:nth-child(4) {
    width: 36%;
}

.vhost-table th:nth-child(5),
.vhost-table td:nth-child(5) {
    width: 14%;
    text-align: center;
}

.vhost-table tbody tr:last-child td {
    border-bottom: 0;
}

.vhost-domain-cell {
    font-weight: 800;
    overflow-wrap: anywhere;
}

.vhost-alias {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.vhost-root-cell {
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.vhost-protocol-cell,
.vhost-status-cell {
    white-space: nowrap;
}

.vhost-protocol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.vhost-protocol.enabled {
    color: var(--green);
    background: #edf9f4;
}

.vhost-protocol.disabled {
    color: var(--muted);
    background: #f3f6fa;
}

.vhost-row-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.vhost-row-status.normal {
    color: var(--green);
    background: #edf9f4;
}

.vhost-row-status.warning {
    color: var(--yellow);
    background: #fff8e5;
}

.vhost-row-status.http-only {
    color: #52677e;
    background: #eef3f8;
}

.vhost-warning-row td {
    background: #fffdf6;
}

.vhost-warning-row td:first-child {
    box-shadow: inset 3px 0 0 var(--yellow);
}


@media (max-width: 1100px) {
    .vhost-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .vhost-section {
        padding: 18px;
    }

    .vhost-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .vhost-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vhost-card {
        min-height: 128px;
        padding: 17px;
    }

    .vhost-card-value {
        margin-top: 18px;
        font-size: 22px;
    }

    .vhost-summary {
        line-height: 1.6;
    }
}

@media (max-width: 560px) {
    .vhost-cards {
        grid-template-columns: 1fr;
    }

    .vhost-card {
        min-height: 116px;
    }

    .vhost-table {
        min-width: 820px;
    }
}

/* STORAGE STATUS SECTION */

.storage-section {
    margin-top: 18px;
    padding: 24px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 5px 18px rgba(31,45,68,0.04);
}

.storage-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.storage-section-header h2 {
    margin: 0 0 6px;
    font-size: 19px;
}

.storage-section-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.storage-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 999px;
    background: #f3f6fa;
    font-size: 13px;
    font-weight: 800;
}

.storage-status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.storage-status.state-normal {
    color: var(--green);
    background: #edf9f4;
}

.storage-status.state-warning {
    color: var(--yellow);
    background: #fff8e5;
}

.storage-status.state-danger {
    color: var(--red);
    background: #fff0f0;
}

.storage-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.storage-card {
    padding: 20px;
    min-height: 138px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 15px;
}

.storage-card-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.storage-card-value {
    margin-top: 22px;
    color: var(--text);
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.storage-card-sub {
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
}

.storage-progress-panel {
    margin-top: 14px;
    padding: 16px 18px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 13px;
}

.storage-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.storage-progress-header strong {
    color: var(--text);
    font-size: 13px;
}

.storage-progress-track {
    width: 100%;
    height: 9px;
    overflow: hidden;
    background: #e9eef4;
    border-radius: 999px;
}

.storage-progress-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    transition: width 0.35s ease;
}

.storage-progress-fill.state-normal {
    background: var(--green);
}

.storage-progress-fill.state-warning {
    background: var(--yellow);
}

.storage-progress-fill.state-danger {
    background: var(--red);
}

.storage-summary {
    margin-top: 14px;
    padding: 12px 15px;
    border-radius: 11px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}


.storage-subsection {
    margin-top: 18px;
}

.storage-subsection-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 10px;
}

.storage-subsection-header h3 {
    margin: 0;
    color: var(--text);
    font-size: 15px;
}

.storage-subsection-header p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.storage-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #ffffff;
}

.storage-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    table-layout: fixed;
}

.storage-table th,
.storage-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}

.storage-table th {
    background: #f8fafc;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.storage-table td {
    color: var(--text);
    font-size: 13px;
}

.storage-table tbody tr:last-child td {
    border-bottom: 0;
}

.storage-table:not(.storage-backup-table)
th:first-child,
.storage-table:not(.storage-backup-table)
td:first-child {
    width: 68%;
}

.storage-table:not(.storage-backup-table)
th:nth-child(2),
.storage-table:not(.storage-backup-table)
td:nth-child(2) {
    width: 14%;
    text-align: right;
}

.storage-table:not(.storage-backup-table)
th:nth-child(3),
.storage-table:not(.storage-backup-table)
td:nth-child(3) {
    width: 18%;
    text-align: right;
}

.storage-backup-table {
    min-width: 760px;
}

.storage-backup-table th:first-child,
.storage-backup-table td:first-child {
    width: 48%;
}

.storage-backup-table th:nth-child(2),
.storage-backup-table td:nth-child(2) {
    width: 10%;
    text-align: right;
}

.storage-backup-table th:nth-child(3),
.storage-backup-table td:nth-child(3) {
    width: 14%;
    text-align: right;
}

.storage-backup-table th:nth-child(4),
.storage-backup-table td:nth-child(4) {
    width: 28%;
    text-align: right;
}

.storage-name-cell {
    overflow-wrap: anywhere;
    font-weight: 700;
}

.storage-number-cell {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.storage-date-cell {
    white-space: nowrap;
    color: var(--muted) !important;
    font-size: 12px !important;
}


@media (max-width: 1100px) {
    .storage-cards {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .storage-section {
        padding: 18px;
    }

    .storage-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .storage-cards {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .storage-card {
        min-height: 128px;
        padding: 17px;
    }

    .storage-card-value {
        margin-top: 18px;
        font-size: 22px;
    }

    .storage-subsection-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .storage-summary {
        line-height: 1.6;
    }
}

@media (max-width: 560px) {
    .storage-cards {
        grid-template-columns: 1fr;
    }

    .storage-card {
        min-height: 116px;
    }

    .storage-table {
        min-width: 560px;
    }

    .storage-backup-table {
        min-width: 700px;
    }
}
