/*!
 * Starnet24 – Markenanpassungen für das Kundencenter (auf op-theme.css aufgesetzt)
 * Farben, Rundungen und Schatten wie auf starnet24.ch.
 */
:root {
    --sn-gradient: linear-gradient(135deg, #0697e0, #25d1f4);
    --sn-ink: #090e1a;

    --op-bg: #f8fafc;
    --op-surface: #ffffff;
    --op-surface-2: #f8fafc;
    --op-surface-3: #f2f5f8;
    --op-text: #151d28;
    --op-text-2: #3d4a5c;
    --op-text-3: #627084;
    --op-border: #e0e5eb;
    --op-border-strong: #c9d2dd;

    --op-radius-sm: 8px;
    --op-radius: 12px;
    --op-radius-lg: 16px;
    --op-shadow: 0 4px 20px -4px rgba(54, 72, 99, .08);
    --op-shadow-lg: 0 20px 50px -25px rgba(54, 72, 99, .3);
}

html[data-op-mode="dark"] {
    --op-primary: #34baf4;
    --sn-gradient: linear-gradient(135deg, #34baf4, #17c0d6);
    --op-bg: #17191c;
    --op-surface: #212327;
    --op-surface-2: #1c1e22;
    --op-surface-3: #2f3237;
    --op-text: #edf0f2;
    --op-text-2: #c3cad3;
    --op-text-3: #a9b1bc;
    --op-border: #3e4147;
    --op-border-strong: #4a4e55;
}

/* Hintergrund wie die Website: zarte blaue Lichter */
html:not([data-op-mode="dark"]) body.op-app {
    background:
        radial-gradient(70% 60% at 80% 10%, rgba(6, 151, 224, .06), transparent 60%),
        radial-gradient(50% 50% at 0% 90%, rgba(37, 209, 244, .06), transparent 60%),
        linear-gradient(180deg, #ffffff, #f8fafc) fixed;
}

/* Hauptknöpfe mit dem Starnet-Verlauf */
.op .btn-primary, .op .btn-success,
.op .btn-primary:not(:disabled):not(.disabled):active,
.op .btn-success:not(:disabled):not(.disabled):active {
    background: var(--sn-gradient) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 10px 24px -14px rgba(6, 151, 224, .9);
}
.op .btn-primary:hover, .op .btn-success:hover { filter: brightness(1.05); }

/* Login: Markenseite im Starnet-Blau */
.op-auth-aside {
    background:
        radial-gradient(700px 500px at 0% 0%, rgba(255, 255, 255, .14), transparent 60%),
        radial-gradient(600px 400px at 100% 100%, rgba(37, 209, 244, .25), transparent 60%),
        linear-gradient(160deg, #0697e0 0%, #0a5f9e 55%, var(--sn-ink) 100%);
}
/* Logo auf heller Plakette, damit es auf Blau gut lesbar ist */
.op-auth-aside .op-brand {
    align-self: flex-start;
    background: #fff;
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 10px 30px -15px rgba(0, 0, 0, .5);
}
.op-auth-aside .op-brand .op-logo-dark { display: none !important; }
.op-auth-aside .op-brand .op-logo-light { display: block !important; }
.op-usp i { background: rgba(255, 255, 255, .16); color: #ffc61a; }

/* Ringe als Funkwellen statt Planetenbahnen */
.op-orbit span:nth-child(1)::after { display: none; }

/* Gelber Akzent wie auf der Website (Badges, aktive Zähler) */
.op .badge-warning, .op .badge-accent { background: #ffc61a !important; color: #151d28 !important; }

/* Logo im Dunkelmodus etwas aufhellen (Outline-Logo auf dunkler Fläche) */
html[data-op-mode="dark"] .op-sidebar .op-logo,
html[data-op-mode="dark"] .op-topbar .op-logo { filter: drop-shadow(0 0 1px rgba(255, 255, 255, .35)); }

/* Übersicht: Zähler-Kacheln (Blesta setzt die Farben inline) im Starnet-Stil */
.op .row.cards > [class*="col-"] > a { display: block; text-decoration: none; }
.op .row.cards .card {
    position: relative; overflow: hidden;
    border: 1px solid var(--op-border) !important;
    border-radius: var(--op-radius-lg) !important;
    box-shadow: var(--op-shadow);
    transition: transform .15s ease, box-shadow .15s ease;
}
.op .row.cards .card::before {
    content: ""; position: absolute; inset: 0; z-index: 0;
    background: var(--op-surface);
}
.op .row.cards .card::after {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; z-index: 1;
    background: var(--sn-gradient);
}
.op .row.cards .card .card-content { position: relative; z-index: 2; }
.op .row.cards .card .card-value {
    color: var(--op-primary) !important; font-weight: 700;
}
.op .row.cards .card .card-label { color: var(--op-text-2) !important; font-weight: 500; }
.op .row.cards > [class*="col-"] > a:hover .card {
    transform: translateY(-2px); box-shadow: var(--op-shadow-lg);
}

.op .row.cards .card .card-label { overflow-wrap: normal; word-break: normal; hyphens: auto; }
@media (max-width: 1199.98px) {
    .op .row.cards .card .card-content { padding: 16px 14px 14px !important; }
    .op .row.cards .card .card-value { font-size: 2rem !important; }
    .op .row.cards .card .card-label { font-size: 13.5px; }
}


/* ================================================================== */
/* Dunkelmodus (Farben wie die Website im Dark Mode)                    */
/* ================================================================== */
html[data-op-mode="dark"] {
    --op-bg: #16181b;
    --op-surface: #1f2226;
    --op-surface-2: #1b1d21;
    --op-surface-3: #2a2e33;
    --op-border: #33373d;
    --op-border-strong: #454a52;
    --sn-gradient: linear-gradient(135deg, #0a7cc0, #0b9fc4);
}
html[data-op-mode="dark"] body.op-app { background: var(--op-bg) !important; }
html[data-op-mode="dark"] .op .btn-primary, html[data-op-mode="dark"] .op .btn-success { box-shadow: none; }

/* Tabellen: Blesta färbt Zellen hell ein */
html[data-op-mode="dark"] .op .table td,
html[data-op-mode="dark"] .op .table th,
html[data-op-mode="dark"] .op .table tr { background-color: transparent !important; color: var(--op-text) !important; border-color: var(--op-border) !important; }
html[data-op-mode="dark"] .op .table thead th { background-color: var(--op-surface-3) !important; color: var(--op-text-2) !important; }
html[data-op-mode="dark"] .op .table thead th a { color: var(--op-text-2) !important; }
html[data-op-mode="dark"] .op .table-striped tbody tr:nth-of-type(odd) td,
html[data-op-mode="dark"] .op .table-striped-alt tbody tr:nth-of-type(4n+1) td { background-color: rgba(255, 255, 255, .025) !important; }
html[data-op-mode="dark"] .op .table-hover tbody tr:hover td { background-color: rgba(255, 255, 255, .05) !important; }
html[data-op-mode="dark"] .op .table tr.expand_details td,
html[data-op-mode="dark"] .op .table .expand_details { background-color: var(--op-surface-2) !important; }

/* Karten, Kopfzeilen, Listen, Formulare */
html[data-op-mode="dark"] .op .card, html[data-op-mode="dark"] .op .panel,
html[data-op-mode="dark"] .op .content_section { background-color: var(--op-surface) !important; border-color: var(--op-border) !important; color: var(--op-text); }
html[data-op-mode="dark"] .op .card-header, html[data-op-mode="dark"] .op .panel-heading,
html[data-op-mode="dark"] .op .card-footer, html[data-op-mode="dark"] .op .panel-footer { background-color: var(--op-surface-2) !important; border-color: var(--op-border) !important; color: var(--op-text) !important; }
html[data-op-mode="dark"] .op .list-group-item { background-color: var(--op-surface) !important; border-color: var(--op-border) !important; color: var(--op-text) !important; }
html[data-op-mode="dark"] .op .list-group-item.active { background: var(--sn-gradient) !important; color: #fff !important; }
html[data-op-mode="dark"] .op .form-control, html[data-op-mode="dark"] .op .custom-select,
html[data-op-mode="dark"] .op select, html[data-op-mode="dark"] .op textarea { background-color: var(--op-surface-2) !important; border-color: var(--op-border-strong) !important; color: var(--op-text) !important; }
html[data-op-mode="dark"] .op .form-control:disabled, html[data-op-mode="dark"] .op .form-control[readonly] { background-color: var(--op-surface-3) !important; }
html[data-op-mode="dark"] .op .btn-light, html[data-op-mode="dark"] .op .btn-default, html[data-op-mode="dark"] .op .btn-secondary,
html[data-op-mode="dark"] .op .btn-outline-secondary { background: var(--op-surface-3) !important; border-color: var(--op-border-strong) !important; color: var(--op-text) !important; }
html[data-op-mode="dark"] .op .btn-light:hover, html[data-op-mode="dark"] .op .btn-default:hover { background: #353a40 !important; }
html[data-op-mode="dark"] .op .bg-light, html[data-op-mode="dark"] .op .bg-white, html[data-op-mode="dark"] .op .well { background-color: var(--op-surface-2) !important; color: var(--op-text) !important; }
html[data-op-mode="dark"] .op .dropdown-menu { background: var(--op-surface) !important; border-color: var(--op-border) !important; }
html[data-op-mode="dark"] .op .dropdown-item { color: var(--op-text) !important; }
html[data-op-mode="dark"] .op .dropdown-item:hover { background: var(--op-surface-3) !important; }
html[data-op-mode="dark"] .op .modal-content { background: var(--op-surface) !important; border-color: var(--op-border) !important; color: var(--op-text); }
html[data-op-mode="dark"] .op .page-link { background: var(--op-surface) !important; border-color: var(--op-border) !important; color: var(--op-text-2) !important; }
html[data-op-mode="dark"] .op .page-item.active .page-link { background: var(--sn-gradient) !important; color: #fff !important; }
html[data-op-mode="dark"] .op .text-muted, html[data-op-mode="dark"] .op small { color: var(--op-text-3) !important; }
html[data-op-mode="dark"] .op hr { border-color: var(--op-border) !important; }
html[data-op-mode="dark"] .op .alert-info { background: rgba(10, 124, 192, .15) !important; border-color: rgba(10, 124, 192, .4) !important; color: #cde9fb !important; }
html[data-op-mode="dark"] .op .alert-info a:not(.btn) { color: #7fd0ff !important; }
html[data-op-mode="dark"] .op .badge-light, html[data-op-mode="dark"] .op .badge-secondary { background: var(--op-surface-3) !important; color: var(--op-text) !important; }
html[data-op-mode="dark"] .op-sidebar-head .op-logo { filter: none; }

/* Hinweisleiste «Als Kunde angemeldet» mit Rückkehr zur Verwaltung */
.op-staff-bar {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin: 0; padding: 10px 24px;
    background: #fff4cc; color: #5c4400; border-bottom: 1px solid #f2d67a;
    font-size: 14px; font-weight: 500;
}
.op-staff-bar > i { color: #b8860b; }
.op-staff-bar .op-staff-btn { margin-left: auto; background: #151d28; color: #fff !important; border: 0; border-radius: 8px; }
.op-staff-bar .op-staff-btn:hover { background: #000; }
html[data-op-mode="dark"] .op-staff-bar { background: #3a3110; color: #ffe08a; border-color: #5a4a14; }
html[data-op-mode="dark"] .op-staff-bar .op-staff-btn { background: #ffc61a; color: #151d28 !important; }
