﻿/* =========================================================
   SYSTEM SETTINGS PAGE - SEPARATE CSS
========================================================= */

.df-system-page {
    max-width: 1780px;
    width: 100%;
    margin: 0 auto;
}

.df-system-heading {
    margin-bottom: 22px;
}

/* Tabs */

.df-system-tabs {
    min-height: 58px;
    padding: 0 18px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 28px;
    overflow-x: auto;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.035), transparent 42%), var(--df-card);
    border: 1px solid var(--df-border, var(--df-card-border));
    box-shadow: var(--df-shadow);
}

    .df-system-tabs button {
        height: 58px;
        border: 0;
        background: transparent;
        color: var(--df-text);
        font-size: 14px;
        white-space: nowrap;
        position: relative;
        opacity: .82;
    }

        .df-system-tabs button.active {
            color: var(--df-primary);
            opacity: 1;
        }

            .df-system-tabs button.active::after {
                content: "";
                position: absolute;
                left: 0;
                right: 0;
                bottom: -1px;
                height: 2px;
                border-radius: 999px;
                background: var(--df-primary);
                box-shadow: 0 0 16px rgba(24, 214, 232, .35);
            }

/* Layout */

.df-system-main-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1.7fr) minmax(380px, 0.95fr) !important;
    gap: 18px !important;
    align-items: start !important;
    margin-bottom: 18px !important;
}

.df-system-left,
.df-system-right {
    display: grid !important;
    gap: 18px !important;
}

.df-system-card,
.df-system-health-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.035), transparent 42%), var(--df-card) !important;
    border: 1px solid var(--df-border, var(--df-card-border)) !important;
    border-radius: 18px !important;
    box-shadow: var(--df-shadow) !important;
    color: var(--df-text) !important;
    overflow: hidden !important;
}

.df-system-card-header {
    min-height: 58px !important;
    padding: 18px 22px 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
}

    .df-system-card-header h3 {
        margin: 0 !important;
        font-size: 18px !important;
        font-weight: 850 !important;
        color: var(--df-text) !important;
    }

/* Setting rows */

.df-system-setting-list {
    padding: 8px 22px 20px;
    display: grid;
}

.df-system-setting-row {
    min-height: 76px;
    padding: 14px 0;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) minmax(180px, auto) 24px;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid var(--df-line, rgba(148,163,184,.14));
}

    .df-system-setting-row:last-child {
        border-bottom: 0;
    }

.df-system-setting-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 24px;
}

    .df-system-setting-icon.blue {
        background: rgba(38, 140, 255, .14);
        color: var(--df-blue);
    }

    .df-system-setting-icon.green {
        background: rgba(34, 197, 94, .14);
        color: var(--df-success);
    }

    .df-system-setting-icon.purple {
        background: rgba(139, 92, 246, .15);
        color: var(--df-purple);
    }

    .df-system-setting-icon.amber {
        background: rgba(245, 158, 11, .16);
        color: var(--df-amber);
    }

    .df-system-setting-icon.cyan {
        background: rgba(24, 214, 232, .13);
        color: var(--df-primary);
    }

.df-system-setting-text strong {
    display: block;
    color: var(--df-text);
    font-size: 14px;
    font-weight: 850;
    margin-bottom: 5px;
}

.df-system-setting-text span {
    display: block;
    color: var(--df-muted);
    font-size: 13px;
    line-height: 1.45;
}

.df-system-setting-value {
    color: var(--df-text);
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-line;
    text-align: left;
}

.df-system-chevron {
    color: var(--df-primary);
}

/* Inputs */

.df-system-page .rz-dropdown,
.df-system-page .rz-textbox {
    background: rgba(148, 163, 184, 0.06) !important;
    border: 1px solid var(--df-border, var(--df-card-border)) !important;
    color: var(--df-text) !important;
    border-radius: 12px !important;
}

.df-system-select {
    width: 180px !important;
}

/* Switch */

.df-system-switch {
    width: 46px;
    height: 24px;
    position: relative;
    display: inline-block;
    justify-self: end;
}

    .df-system-switch input {
        display: none;
    }

    .df-system-switch span {
        position: absolute;
        inset: 0;
        cursor: pointer;
        border-radius: 999px;
        background: rgba(148, 163, 184, .22);
        border: 1px solid rgba(148, 163, 184, .18);
        transition: .2s ease;
    }

        .df-system-switch span::before {
            content: "";
            position: absolute;
            width: 18px;
            height: 18px;
            left: 3px;
            top: 2px;
            border-radius: 999px;
            background: #fff;
            transition: .2s ease;
        }

    .df-system-switch input:checked + span {
        background: linear-gradient(135deg, var(--df-primary), var(--df-blue));
        border-color: rgba(24, 214, 232, .5);
        box-shadow: 0 0 16px rgba(24, 214, 232, .22);
    }

        .df-system-switch input:checked + span::before {
            transform: translateX(21px);
        }

/* Right info cards */

.df-system-info-icon {
    color: var(--df-muted);
}

.df-system-info-list {
    padding: 4px 22px 18px;
    display: grid;
}

.df-system-info-row {
    min-height: 36px;
    padding: 10px 0;
    border-bottom: 1px solid var(--df-line, rgba(148,163,184,.14));
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 14px;
}

    .df-system-info-row:last-child {
        border-bottom: 0;
    }

    .df-system-info-row span {
        color: var(--df-text);
        opacity: .9;
        font-size: 14px;
    }

    .df-system-info-row strong {
        color: var(--df-text);
        font-size: 14px;
        font-weight: 700;
        text-align: right;
    }

        .df-system-info-row strong.success {
            color: var(--df-success);
        }

/* Services */

.df-system-service-list {
    padding: 6px 22px 6px;
    display: grid;
}

.df-system-service-row {
    min-height: 34px;
    padding: 9px 0;
    border-bottom: 1px solid var(--df-line, rgba(148,163,184,.14));
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
}

    .df-system-service-row:last-child {
        border-bottom: 0;
    }

    .df-system-service-row > div {
        display: flex;
        align-items: center;
        gap: 14px;
        color: var(--df-text);
        font-size: 14px;
    }

    .df-system-service-row .rz-icon {
        color: var(--df-muted);
        font-size: 18px;
    }

    .df-system-service-row strong {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        color: var(--df-text);
        font-size: 14px;
        font-weight: 700;
    }

        .df-system-service-row strong i {
            width: 10px;
            height: 10px;
            border-radius: 999px;
            background: var(--df-success);
            box-shadow: 0 0 12px rgba(34,197,94,.35);
        }

/* Links and buttons */

.df-system-card-link {
    margin: 0 22px 18px;
    padding: 14px 0 0;
    border-top: 1px solid var(--df-line, rgba(148,163,184,.14));
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--df-primary);
    font-size: 14px;
}

.df-system-backup-actions {
    padding: 0 22px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.df-system-primary-btn {
    border-radius: 10px !important;
    background: linear-gradient(135deg, var(--df-primary), var(--df-blue)) !important;
    color: white !important;
    border: 0 !important;
}

.df-system-light-btn {
    border-radius: 10px !important;
    background: rgba(148, 163, 184, 0.06) !important;
    border: 1px solid var(--df-border, var(--df-card-border)) !important;
    color: var(--df-text) !important;
}

/* Health bar */

.df-system-health-card {
    min-height: 94px;
    padding: 18px 22px;
    display: grid;
    grid-template-columns: minmax(280px, 1.3fr) repeat(4, minmax(150px, 1fr));
    align-items: center;
    gap: 0;
    border-color: rgba(38, 140, 255, .72) !important;
    box-shadow: 0 0 0 1px rgba(38, 140, 255, .18), var(--df-shadow) !important;
}

.df-system-health-intro {
    display: flex;
    align-items: center;
    gap: 16px;
}

.df-system-health-icon {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(38, 140, 255, .16);
    color: var(--df-blue);
    font-size: 26px;
}

.df-system-health-intro strong {
    display: block;
    color: var(--df-text);
    font-size: 16px;
    margin-bottom: 4px;
}

.df-system-health-intro span {
    display: block;
    color: var(--df-success);
    font-size: 14px;
    font-weight: 750;
}

.df-system-health-intro small {
    display: block;
    color: var(--df-muted);
    font-size: 12px;
    margin-top: 2px;
}

.df-system-health-metric {
    min-height: 54px;
    padding: 0 28px;
    border-left: 1px solid var(--df-line, rgba(148,163,184,.14));
    display: grid;
    grid-template-columns: 1fr 90px;
    grid-template-rows: auto auto;
    column-gap: 12px;
    align-items: end;
}

    .df-system-health-metric span {
        color: var(--df-muted);
        font-size: 13px;
    }

    .df-system-health-metric strong {
        color: var(--df-text);
        font-size: 18px;
        font-weight: 850;
    }

    .df-system-health-metric svg {
        grid-column: 2;
        grid-row: 1 / span 2;
        width: 90px;
        height: 30px;
    }

/* Responsive */

@media (max-width: 1500px) {
    .df-system-main-grid {
        grid-template-columns: 1fr !important;
    }

    .df-system-health-card {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .df-system-health-intro {
        grid-column: span 2;
    }

    .df-system-health-metric {
        border-left: 0;
        border-top: 1px solid var(--df-line, rgba(148,163,184,.14));
        padding: 16px 0 0;
    }
}

@media (max-width: 900px) {
    .df-system-setting-row {
        grid-template-columns: 48px 1fr;
    }

    .df-system-setting-value,
    .df-system-select,
    .df-system-switch,
    .df-system-chevron {
        grid-column: 2;
        justify-self: start;
    }

    .df-system-health-card {
        grid-template-columns: 1fr;
    }

    .df-system-health-intro {
        grid-column: auto;
    }

    .df-system-health-metric {
        grid-template-columns: 1fr 90px;
    }
}

/* =========================================================
   SYSTEM SETTINGS - SERVER MANAGEMENT EXTENSIONS
========================================================= */

.df-system-heading {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 18px !important;
}

/* Incident classification */

.df-system-incident-layout {
    display: grid;
    gap: 18px;
}

.df-system-incident-intro,
.df-system-incident-selector-card {
    overflow: visible !important;
}

.df-system-incident-count {
    padding: 7px 11px;
    border: 1px solid rgba(24, 214, 232, .28);
    border-radius: 999px;
    color: var(--df-primary);
    background: rgba(24, 214, 232, .08);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.df-system-incident-core-grid {
    padding: 10px 22px 4px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.df-system-incident-core,
.df-system-incident-option {
    border: 1px solid var(--df-border, var(--df-card-border));
    background: rgba(148, 163, 184, .045);
    border-radius: 12px;
}

.df-system-incident-core {
    min-height: 70px;
    padding: 14px 16px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.df-system-incident-core strong,
.df-system-incident-core small {
    display: block;
}

.df-system-incident-core strong { color: var(--df-text); }
.df-system-incident-core small { color: var(--df-muted); margin-top: 4px; }
.df-system-incident-core .rzi { color: var(--df-primary); }

.df-system-incident-note {
    margin: 12px 22px 20px;
    color: var(--df-muted);
    line-height: 1.55;
    font-size: 13px;
}

.df-system-text-action {
    border: 0;
    background: transparent;
    color: var(--df-primary);
    font-weight: 800;
    cursor: pointer;
}

.df-system-incident-options {
    padding: 10px 22px 22px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.df-system-incident-options.analytics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.df-system-incident-option {
    min-height: 66px;
    padding: 11px 12px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-content: center;
    gap: 3px 9px;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.df-system-incident-option:hover {
    transform: translateY(-1px);
    border-color: rgba(24, 214, 232, .34);
}

.df-system-incident-option.selected {
    border-color: rgba(24, 214, 232, .48);
    background: rgba(24, 214, 232, .09);
    box-shadow: inset 0 0 0 1px rgba(24, 214, 232, .08);
}

.df-system-incident-option.locked { cursor: default; }
.df-system-incident-option span { color: var(--df-text); font-weight: 750; font-size: 13px; }
.df-system-incident-option code {
    grid-column: 2;
    color: var(--df-muted);
    background: transparent;
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.df-system-incident-option input,
.df-system-incident-core input {
    width: 17px;
    height: 17px;
    accent-color: var(--df-primary);
}

@media (max-width: 1300px) {
    .df-system-incident-options.analytics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
    .df-system-incident-options,
    .df-system-incident-options.analytics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .df-system-incident-core-grid,
    .df-system-incident-options,
    .df-system-incident-options.analytics { grid-template-columns: 1fr; }
}

.df-system-heading-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.df-system-alert {
    margin-bottom: 18px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
}

.df-system-card-header small {
    display: block;
    margin-top: 4px;
    color: var(--df-muted);
    font-size: 12px;
    font-weight: 600;
}

.df-system-server-summary-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 18px !important;
    margin-bottom: 18px !important;
}

.df-system-mini-card {
    min-height: 104px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.035), transparent 42%), var(--df-card);
    border: 1px solid var(--df-border, var(--df-card-border));
    box-shadow: var(--df-shadow);
    color: var(--df-text);
    overflow: hidden;
}

.df-system-mini-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    font-size: 24px;
}

    .df-system-mini-icon.blue {
        background: rgba(38, 140, 255, .14);
        color: var(--df-blue);
    }

    .df-system-mini-icon.green {
        background: rgba(34, 197, 94, .14);
        color: var(--df-success);
    }

    .df-system-mini-icon.red {
        background: rgba(239, 68, 68, .14);
        color: var(--df-danger, #ef4444);
    }

    .df-system-mini-icon.amber {
        background: rgba(245, 158, 11, .16);
        color: var(--df-amber);
    }

    .df-system-mini-icon.cyan {
        background: rgba(24, 214, 232, .13);
        color: var(--df-primary);
    }

    .df-system-mini-icon.purple {
        background: rgba(139, 92, 246, .15);
        color: var(--df-purple);
    }

.df-system-mini-card span {
    display: block;
    color: var(--df-muted);
    font-size: 13px;
    font-weight: 700;
}

.df-system-mini-card strong {
    display: block;
    margin-top: 4px;
    color: var(--df-text);
    font-size: 20px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
}

.df-system-mini-card small {
    display: block;
    margin-top: 4px;
    color: var(--df-muted);
    font-size: 12px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 280px;
}

.df-system-server-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr) !important;
    gap: 18px !important;
    align-items: start !important;
    margin-bottom: 18px !important;
}

.df-system-form-grid {
    padding: 8px 22px 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.df-system-form-field {
    display: grid;
    gap: 7px;
}

    .df-system-form-field.wide {
        grid-column: 1 / -1;
    }

    .df-system-form-field label {
        color: var(--df-muted);
        font-size: 12px;
        font-weight: 800;
    }

    .df-system-form-field small {
        color: var(--df-muted);
        font-size: 11px;
        line-height: 1.35;
    }

.df-system-toggle-grid {
    padding: 16px 22px 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.df-system-check-row {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--df-text);
    font-size: 13px;
    font-weight: 750;
    margin: 0;
}

    .df-system-check-row.wide {
        grid-column: 1 / -1;
    }

.df-system-form-actions {
    padding: 18px 22px 22px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.df-system-diagnostic-list {
    padding: 8px 22px 20px;
    display: grid;
    gap: 12px;
}

.df-system-diagnostic-row {
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--df-line, rgba(148, 163, 184, .14));
    background: rgba(148, 163, 184, .045);
    display: grid;
    gap: 12px;
}

.df-system-diagnostic-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

    .df-system-diagnostic-main strong {
        display: block;
        color: var(--df-text);
        font-size: 14px;
        font-weight: 900;
    }

    .df-system-diagnostic-main small {
        display: block;
        margin-top: 3px;
        color: var(--df-muted);
        font-size: 12px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.df-system-status-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    flex: 0 0 auto;
}

    .df-system-status-dot.online {
        background: var(--df-success);
        box-shadow: 0 0 0 5px rgba(34, 197, 94, .14);
    }

    .df-system-status-dot.offline {
        background: #ef4444;
        box-shadow: 0 0 0 5px rgba(239, 68, 68, .14);
    }

.df-system-diagnostic-values {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

    .df-system-diagnostic-values span,
    .df-system-diagnostic-values strong {
        padding: 5px 9px;
        border-radius: 999px;
        border: 1px solid rgba(148, 163, 184, .16);
        background: rgba(148, 163, 184, .07);
        color: var(--df-text);
        font-size: 11px;
        font-weight: 800;
    }

    .df-system-diagnostic-values strong.success {
        color: var(--df-success);
        background: rgba(34, 197, 94, .1);
        border-color: rgba(34, 197, 94, .18);
    }

    .df-system-diagnostic-values strong.danger {
        color: #ef4444;
        background: rgba(239, 68, 68, .1);
        border-color: rgba(239, 68, 68, .18);
    }

.df-system-diagnostic-error {
    color: #fca5a5;
    font-size: 12px;
    line-height: 1.4;
}

.df-system-empty-state {
    min-height: 170px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    color: var(--df-muted);
    text-align: center;
    border-radius: 14px;
    border: 1px dashed rgba(148, 163, 184, .25);
}

    .df-system-empty-state .rz-icon {
        font-size: 34px;
        color: var(--df-primary);
    }

    .df-system-empty-state strong {
        color: var(--df-text);
        font-size: 15px;
    }

    .df-system-empty-state span {
        color: var(--df-muted);
        font-size: 12px;
    }

.df-system-server-table-card {
    margin-bottom: 18px;
}

.df-system-servers-grid {
    margin: 0 22px 22px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
}

.df-system-page .rz-datatable,
.df-system-page .rz-grid-table,
.df-system-page .rz-data-grid {
    background: transparent !important;
}

.df-system-grid-edit-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(90px, 1fr));
    gap: 8px;
}

.df-system-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .02em;
}

    .df-system-status-pill.online {
        color: var(--df-success);
        background: rgba(34, 197, 94, .12);
        border: 1px solid rgba(34, 197, 94, .22);
    }

    .df-system-status-pill.offline {
        color: #ef4444;
        background: rgba(239, 68, 68, .12);
        border: 1px solid rgba(239, 68, 68, .22);
    }

    .df-system-status-pill.unknown {
        color: var(--df-muted);
        background: rgba(148, 163, 184, .1);
        border: 1px solid rgba(148, 163, 184, .2);
    }

.df-system-info-row strong.warning,
.df-system-service-row strong.warning {
    color: var(--df-amber) !important;
}

.df-system-info-row strong.danger,
.df-system-service-row strong.danger {
    color: #ef4444 !important;
}

.df-system-service-row strong.warning i {
    background: var(--df-amber);
    box-shadow: 0 0 12px rgba(245, 158, 11, .35);
}

.df-system-service-row strong.danger i {
    background: #ef4444;
    box-shadow: 0 0 12px rgba(239, 68, 68, .35);
}

.df-system-card-link-button {
    width: calc(100% - 44px);
    border: 0;
    background: transparent;
    cursor: pointer;
}

.df-system-muted {
    color: var(--df-muted);
}

.df-system-tab-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px !important;
    align-items: start !important;
}

@media (max-width: 1300px) {
    .df-system-server-summary-grid,
    .df-system-server-grid,
    .df-system-tab-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 900px) {
    .df-system-heading {
        display: grid !important;
    }

    .df-system-form-grid,
    .df-system-toggle-grid {
        grid-template-columns: 1fr;
    }

    .df-system-server-summary-grid {
        grid-template-columns: 1fr !important;
    }

    .df-system-mini-card strong,
    .df-system-mini-card small {
        max-width: 100%;
    }
}

.df-system-edit-grid {
    align-items: start;
}

.df-system-tab-card-wide {
    grid-column: span 2;
}

.df-system-inline-actions {
    display: flex;
    justify-content: flex-end;
    padding: 14px 0 2px;
}

.df-system-form-field small {
    display: block;
    margin-top: 6px;
    color: var(--df-muted, #8fa3b7);
    font-size: 11px;
}

@media (max-width: 1100px) {
    .df-system-tab-card-wide {
        grid-column: span 1;
    }
}
