/**
 * AixSCP Theme Blue
 * Klassisches Hosting-Control-Panel-Design auf Basis der AixSCP-Komponenten.
 * Vollständig lokal, ohne Inline-Styles, externe Ressourcen oder CSP-Ausnahmen.
 */

html.panel-theme-aixscp-theme-blue {
    --sb-w: 270px;
    --sb-w-col: 84px;
    --nb-h: 66px;
    --ft-h: 58px;

    --sb-teal: #1d4f7a;
    --sb-teal-dark: #173f62;
    --sb-teal-darker: #153b5d;
    --sb-teal-light: #d9e8f4;
    --sb-teal-bg: #e8f0f7;
    --sb-teal-grad: linear-gradient(135deg, #2a6b9f 0%, #1d4f7a 100%);
    --sb-teal-grad-h: linear-gradient(135deg, #1d4f7a 0%, #153b5d 100%);

    --sb-dark: #173f62;
    --sb-dark-alt: #1d4f7a;
    --sb-dark-hover: rgba(255, 255, 255, .10);
    --sb-text-muted: #9db5c8;
    --sb-border: #c2ccd6;
    --sb-bg: #edf1f4;
    --sb-card-shadow: 0 8px 24px rgba(29, 54, 76, .08);
    --sb-card-shadow-h: 0 10px 26px rgba(29, 54, 76, .14);

    --aix-blue: #1d4f7a;
    --aix-blue-dark: #153b5d;
    --aix-blue-soft: #e8f0f7;
    --aix-silver: #d7dee5;
    --aix-border: #c2ccd6;
    --aix-orange: #ef9b21;
    --aix-panel-bg: #ffffff;
    --aix-panel-header: linear-gradient(180deg, #f8fafc 0%, #e8edf2 100%);
    --aix-text: #243442;
    --aix-muted: #657482;

    /* ECharts-Gauges und Sparklines folgen dem aktiven Panel-Theme. */
    --dashboard-gauge-normal: #287bb5;
    --dashboard-gauge-warning: #d98208;
    --dashboard-gauge-danger: #dc3545;
    --dashboard-gauge-track: #d8e3ed;
    --dashboard-gauge-track-dark: #2b4050;
    --dashboard-gauge-muted: #657482;
    --dashboard-gauge-muted-dark: #9fb0bd;
    --dashboard-gauge-tooltip-background: #ffffff;
    --dashboard-gauge-tooltip-background-dark: #18252f;
    --dashboard-gauge-tooltip-text: #243442;
    --dashboard-gauge-tooltip-text-dark: #e5edf3;
    --dashboard-gauge-anchor-border: #ffffff;
    --dashboard-gauge-anchor-border-dark: #18252f;
}

html.panel-theme-aixscp-theme-blue body {
    color: var(--aix-text);
    background-color: var(--sb-bg);
    background-image: linear-gradient(rgba(29, 79, 122, .035) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(29, 79, 122, .035) 1px, transparent 1px);
    background-size: 24px 24px;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

html.panel-theme-aixscp-theme-blue #sidebar {
    background: linear-gradient(180deg, #173f62 0%, #123650 100%);
    border-right: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 5px 0 18px rgba(10, 30, 45, .14);
}

html.panel-theme-aixscp-theme-blue .sidebar-brand {
    border-bottom-color: rgba(255, 255, 255, .12);
    background: rgba(0, 0, 0, .06);
}

html.panel-theme-aixscp-theme-blue .sidebar-brand-icon,
html.panel-theme-aixscp-theme-blue .navbar-brand-icon {
    color: var(--aix-orange);
}

html.panel-theme-aixscp-theme-blue .sidebar-brand .sidebar-label {
    font-size: 1rem;
    letter-spacing: .02em;
}

html.panel-theme-aixscp-theme-blue .sidebar-section-title {
    color: rgba(255, 255, 255, .48);
    font-weight: 700;
    letter-spacing: .12em;
}

html.panel-theme-aixscp-theme-blue #sidebar .nav-link {
    min-height: 48px;
    margin-bottom: 5px;
    padding: 8px 13px;
    gap: 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #dce8f2 !important;
}

html.panel-theme-aixscp-theme-blue #sidebar .nav-link i {
    width: 36px;
    color: rgba(220, 232, 242, .72);
    font-size: 1.12rem;
}

html.panel-theme-aixscp-theme-blue #sidebar .nav-link:hover {
    color: #fff !important;
    border-color: rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .10);
}

html.panel-theme-aixscp-theme-blue #sidebar .nav-link:hover i,
html.panel-theme-aixscp-theme-blue #sidebar .nav-link.active i {
    color: #fff;
}

html.panel-theme-aixscp-theme-blue #sidebar .nav-link.active {
    color: #fff !important;
    border-color: rgba(255, 255, 255, .16);
    background: linear-gradient(90deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .07));
    box-shadow: inset 3px 0 0 var(--aix-orange);
}

html.panel-theme-aixscp-theme-blue .sidebar-actions {
    border-top-color: rgba(255, 255, 255, .12);
    padding: .55rem .65rem;
}

html.panel-theme-aixscp-theme-blue .sidebar-action-btn {
    min-height: 44px;
    gap: 14px;
    border: 1px solid transparent;
    border-radius: 8px;
}

html.panel-theme-aixscp-theme-blue .sidebar-action-btn i {
    width: 36px;
}

html.panel-theme-aixscp-theme-blue .sidebar-action-btn:hover {
    border-color: rgba(255, 255, 255, .12);
}

html.panel-theme-aixscp-theme-blue body.sb-collapsed #sidebar .nav-link,
html.panel-theme-aixscp-theme-blue body.sb-collapsed .sidebar-action-btn {
    padding-right: 10px;
    padding-left: 10px;
}

html.panel-theme-aixscp-theme-blue body.sb-collapsed #sidebar .nav-link i,
html.panel-theme-aixscp-theme-blue body.sb-collapsed .sidebar-action-btn i {
    width: 36px;
}

html.panel-theme-aixscp-theme-blue #main-navbar.navbar.bg-dark {
    background: linear-gradient(90deg, var(--aix-blue-dark), var(--aix-blue)) !important;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
    box-shadow: 0 4px 18px rgba(13, 37, 56, .18);
}

html.panel-theme-aixscp-theme-blue .navbar-user-toggle {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
}

html.panel-theme-aixscp-theme-blue .navbar-user-toggle:hover,
html.panel-theme-aixscp-theme-blue .navbar-user-toggle:focus {
    color: #fff;
    background: rgba(255, 255, 255, .16);
}

html.panel-theme-aixscp-theme-blue .avatar-circle,
html.panel-theme-aixscp-theme-blue .avatar-circle-lg {
    background: linear-gradient(145deg, #f4aa3b, #d98208);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}

html.panel-theme-aixscp-theme-blue .page-wrapper {
    padding-top: 1.35rem;
}

html.panel-theme-aixscp-theme-blue .card,
html.panel-theme-aixscp-theme-blue .card-teal,
html.panel-theme-aixscp-theme-blue .card-stat .card-body,
html.panel-theme-aixscp-theme-blue .page-header,
html.panel-theme-aixscp-theme-blue .aix-page-header,
html.panel-theme-aixscp-theme-blue .settings-section-group {
    border-color: var(--aix-border) !important;
    border-radius: 8px;
    background: var(--aix-panel-bg) !important;
    box-shadow: var(--sb-card-shadow);
}

html.panel-theme-aixscp-theme-blue .card:hover {
    box-shadow: var(--sb-card-shadow-h);
}

html.panel-theme-aixscp-theme-blue .card-header,
html.panel-theme-aixscp-theme-blue .settings-form-heading {
    color: var(--aix-text);
    border-color: var(--aix-border);
    background: var(--aix-panel-header);
}

html.panel-theme-aixscp-theme-blue .page-header,
html.panel-theme-aixscp-theme-blue .aix-page-header {
    border-left: 4px solid var(--aix-blue) !important;
}

html.panel-theme-aixscp-theme-blue .aix-page-header__icon,
html.panel-theme-aixscp-theme-blue .settings-page-icon,
html.panel-theme-aixscp-theme-blue .settings-form-heading-icon,
html.panel-theme-aixscp-theme-blue .settings-test-mail-icon {
    color: var(--aix-blue);
    border-color: rgba(29, 79, 122, .24);
    border-radius: 8px;
    background: var(--aix-blue-soft);
}

html.panel-theme-aixscp-theme-blue .btn-primary {
    color: #fff;
    border-color: var(--aix-blue-dark);
    background: linear-gradient(145deg, var(--aix-blue), var(--aix-blue-dark));
}

html.panel-theme-aixscp-theme-blue .btn-primary:hover,
html.panel-theme-aixscp-theme-blue .btn-primary:focus {
    color: #fff;
    border-color: #102f49;
    background: linear-gradient(145deg, #173f62, #102f49);
}

html.panel-theme-aixscp-theme-blue .btn-outline-primary {
    color: var(--aix-blue);
    border-color: var(--aix-blue);
}

html.panel-theme-aixscp-theme-blue .btn-outline-primary:hover,
html.panel-theme-aixscp-theme-blue .btn-outline-primary:focus {
    color: #fff;
    border-color: var(--aix-blue-dark);
    background: var(--aix-blue);
}

html.panel-theme-aixscp-theme-blue .text-primary {
    color: var(--aix-blue) !important;
}

html.panel-theme-aixscp-theme-blue .progress-bar {
    background: linear-gradient(90deg, #2a6b9f, #1d4f7a);
}

html.panel-theme-aixscp-theme-blue .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--aix-text);
    --bs-table-border-color: var(--aix-border);
}

html.panel-theme-aixscp-theme-blue .table thead th {
    color: var(--aix-muted);
    border-color: var(--aix-border);
    background: #eef3f7;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

html.panel-theme-aixscp-theme-blue .main-footer {
    color: var(--aix-muted);
    border-color: var(--aix-border);
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 -4px 16px rgba(29, 54, 76, .04);
}

html.panel-theme-aixscp-theme-blue .footer-brand {
    color: var(--aix-blue-dark);
}

html.panel-theme-aixscp-theme-blue .footer-brand-icon,
html.panel-theme-aixscp-theme-blue .footer-link {
    color: var(--aix-orange);
}

html.panel-theme-aixscp-theme-blue .system-admin-modal,
html.panel-theme-aixscp-theme-blue .modal-content {
    border-color: var(--aix-border);
    border-radius: 8px;
}

html.panel-theme-aixscp-theme-blue .system-admin-modal-header {
    background: linear-gradient(90deg, var(--aix-blue-dark), var(--aix-blue));
}

html.panel-theme-aixscp-theme-blue .system-admin-modal-icon {
    color: #fff;
    border-color: rgba(255, 255, 255, .25);
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
}

html.panel-theme-aixscp-theme-blue .system-admin-card {
    border-color: var(--aix-border);
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(29, 54, 76, .05);
}

html.panel-theme-aixscp-theme-blue .system-admin-card:hover,
html.panel-theme-aixscp-theme-blue .system-admin-card.active {
    border-color: rgba(29, 79, 122, .55);
    background: var(--aix-blue-soft);
    box-shadow: 0 9px 22px rgba(29, 54, 76, .12);
}

html.panel-theme-aixscp-theme-blue .system-admin-card-icon {
    color: var(--aix-blue);
    border-radius: 8px;
    background: var(--aix-blue-soft);
}


html.panel-theme-aixscp-theme-blue .settings-tabs {
    border-color: var(--aix-border);
    background: var(--aix-blue-soft);
}

html.panel-theme-aixscp-theme-blue .settings-tab {
    color: var(--aix-muted);
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

html.panel-theme-aixscp-theme-blue .settings-tab:hover,
html.panel-theme-aixscp-theme-blue .settings-tab:focus-visible {
    color: var(--aix-text);
    background: rgba(29, 79, 122, .07) !important;
}

html.panel-theme-aixscp-theme-blue .settings-tab.is-active {
    color: var(--aix-blue);
    background: var(--aix-panel-bg) !important;
    box-shadow: 0 .08rem .28rem rgba(29, 54, 76, .12) !important;
}

html.panel-theme-aixscp-theme-blue .settings-theme-option:has(.settings-theme-radio:checked) {
    border-color: var(--aix-blue);
    box-shadow: 0 0 0 3px rgba(29, 79, 122, .12);
}

html.panel-theme-aixscp-theme-blue .settings-theme-option:has(.settings-theme-radio:checked) .settings-theme-check {
    border-color: #d98208;
    background: linear-gradient(145deg, #f4aa3b, #d98208);
}

html.panel-theme-aixscp-theme-blue .form-control,
html.panel-theme-aixscp-theme-blue .form-select,
html.panel-theme-aixscp-theme-blue .input-group-text {
    border-color: var(--aix-border);
    border-radius: 6px;
}

html.panel-theme-aixscp-theme-blue .form-control:focus,
html.panel-theme-aixscp-theme-blue .form-select:focus {
    border-color: var(--aix-blue);
    box-shadow: 0 0 0 .2rem rgba(29, 79, 122, .14);
}

html.panel-theme-aixscp-theme-blue .dropdown-menu {
    border-color: var(--aix-border);
    border-radius: 8px;
    box-shadow: var(--sb-card-shadow);
}

/* Bootstrap-Darkmode bleibt unabhängig vom ausgewählten Panel-Theme. */
html.panel-theme-aixscp-theme-blue[data-bs-theme="dark"] {
    --aix-panel-bg: #18252f;
    --aix-panel-header: linear-gradient(180deg, #22333f 0%, #1a2933 100%);
    --aix-text: #e5edf3;
    --aix-muted: #9fb0bd;
    --aix-border: #3b4d5b;
    --aix-blue-soft: #183449;
    --sb-bg: #0f1921;
    --sb-border: #3b4d5b;
}

html.panel-theme-aixscp-theme-blue[data-bs-theme="dark"] body {
    color: var(--aix-text);
    background-color: var(--sb-bg);
}

html.panel-theme-aixscp-theme-blue[data-bs-theme="dark"] .card,
html.panel-theme-aixscp-theme-blue[data-bs-theme="dark"] .card-teal,
html.panel-theme-aixscp-theme-blue[data-bs-theme="dark"] .card-stat .card-body,
html.panel-theme-aixscp-theme-blue[data-bs-theme="dark"] .page-header,
html.panel-theme-aixscp-theme-blue[data-bs-theme="dark"] .aix-page-header,
html.panel-theme-aixscp-theme-blue[data-bs-theme="dark"] .settings-section-group,
html.panel-theme-aixscp-theme-blue[data-bs-theme="dark"] .system-admin-card,
html.panel-theme-aixscp-theme-blue[data-bs-theme="dark"] .settings-theme-option,
html.panel-theme-aixscp-theme-blue[data-bs-theme="dark"] .modal-content {
    color: var(--aix-text);
    border-color: var(--aix-border) !important;
    background: var(--aix-panel-bg) !important;
}

html.panel-theme-aixscp-theme-blue[data-bs-theme="dark"] .settings-tabs {
    border-color: var(--aix-border);
    background: rgba(255, 255, 255, .035);
}

html.panel-theme-aixscp-theme-blue[data-bs-theme="dark"] .settings-tab {
    color: var(--aix-muted);
    background: transparent !important;
}

html.panel-theme-aixscp-theme-blue[data-bs-theme="dark"] .settings-tab.is-active,
html.panel-theme-aixscp-theme-blue[data-bs-theme="dark"] .settings-tab:hover,
html.panel-theme-aixscp-theme-blue[data-bs-theme="dark"] .settings-tab:focus-visible {
    color: var(--aix-text);
    background: rgba(255, 255, 255, .07) !important;
}

html.panel-theme-aixscp-theme-blue[data-bs-theme="dark"] .card-header,
html.panel-theme-aixscp-theme-blue[data-bs-theme="dark"] .settings-form-heading,
html.panel-theme-aixscp-theme-blue[data-bs-theme="dark"] .table thead th {
    color: var(--aix-text);
    border-color: var(--aix-border);
    background: var(--aix-panel-header);
}

html.panel-theme-aixscp-theme-blue[data-bs-theme="dark"] .main-footer {
    border-color: var(--aix-border);
    background: rgba(24, 37, 47, .94);
}

html.panel-theme-aixscp-theme-blue[data-bs-theme="dark"] .footer-brand {
    color: #e5edf3;
}

html.panel-theme-aixscp-theme-blue[data-bs-theme="dark"] .form-control,
html.panel-theme-aixscp-theme-blue[data-bs-theme="dark"] .form-select,
html.panel-theme-aixscp-theme-blue[data-bs-theme="dark"] .input-group-text {
    color: var(--aix-text);
    border-color: var(--aix-border);
    background: #18252f;
}

@media (max-width: 767.98px) {
    html.panel-theme-aixscp-theme-blue body,
    html.panel-theme-aixscp-theme-blue body.sb-collapsed {
        padding-left: 0;
    }

    html.panel-theme-aixscp-theme-blue #sidebar {
        width: var(--sb-w) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.panel-theme-aixscp-theme-blue *,
    html.panel-theme-aixscp-theme-blue *::before,
    html.panel-theme-aixscp-theme-blue *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Seitenbezogene Akzente der vereinheitlichten Verwaltungsansichten. */
html.panel-theme-aixscp-theme-blue .dns-domain-card,
html.panel-theme-aixscp-theme-blue .cronjobs-content-card {
    border-left-color: var(--aix-blue) !important;
}

html.panel-theme-aixscp-theme-blue .dns-policy-card {
    border-left-color: var(--aix-blue) !important;
    background: color-mix(in srgb, var(--aix-blue-soft) 58%, var(--aix-panel-bg)) !important;
    box-shadow: none;
}

html.panel-theme-aixscp-theme-blue .dns-dkim-card {
    border-left-color: var(--aix-orange) !important;
    background: color-mix(in srgb, var(--aix-blue-soft) 42%, var(--aix-panel-bg)) !important;
    box-shadow: none;
}

html.panel-theme-aixscp-theme-blue .fm-action-bar {
    border-left-color: var(--aix-blue);
    background: linear-gradient(90deg, color-mix(in srgb, var(--aix-blue-soft) 74%, var(--aix-panel-bg)), var(--aix-panel-bg));
}

html.panel-theme-aixscp-theme-blue .cronjobs-tabs {
    background: color-mix(in srgb, var(--aix-blue-soft) 52%, var(--aix-panel-bg));
}

/* Professionelle Login-Ansicht und Footer-Signatur im Blue-Theme. */
html.panel-theme-aixscp-theme-blue body.login-bg {
    --login-accent: #ef9b21;
    --login-accent-strong: #d98208;
    --login-accent-soft: rgba(239, 155, 33, .12);
    --login-brand-start: #102f49;
    --login-brand-end: #1d4f7a;
    --login-page-start: #edf2f6;
    --login-page-end: #dce6ee;
    --login-surface: #ffffff;
    --login-surface-muted: #f5f8fa;
    --login-border: #d8e2ea;
    --login-text: #243442;
    --login-muted: #657482;
    --login-input-bg: #f6f9fb;
    --login-input-border: #cbd7e1;
    --login-button-start: #2a6b9f;
    --login-button-end: #1d4f7a;
    --login-button-shadow: rgba(29, 79, 122, .25);
    --login-footer: #5f7180;

    background-color: var(--login-page-end);
    background-image: linear-gradient(
        145deg,
        var(--login-brand-start) 0%,
        var(--login-brand-end) 46%,
        var(--login-page-start) 78%,
        var(--login-page-end) 100%
    );
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
}

html.panel-theme-aixscp-theme-blue .footer-heart {
    color: var(--aix-orange);
}
