/* MODUS - Radical Modern CSS (High Contrast & Clean) */

:root {
    --ds-primary: #2563eb;
    --ds-primary-hover: #1d4ed8;
    --ds-primary-light: #eff6ff;
    --ds-secondary: #ef4444;
    --ds-text: #0f172a;
    --ds-text-muted: #475569;
    --ds-bg: #ffffff;
    --ds-surface: #ffffff;
    --ds-surface-2: #f8fafc;
    --ds-border: #e2e8f0;
    --ds-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --ds-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--ds-text);
    background-color: var(--ds-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.force-light {
    color-scheme: light;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.2;
    color: var(--ds-text);
    margin-bottom: 1rem;
}

/* Navbar */
.navbar-modus {
    background: #ffffff !important;
    border-bottom: 1px solid var(--ds-border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--ds-text) !important;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

.nav-link {
    font-weight: 600;
    color: var(--ds-text-muted) !important;
    padding: 0.5rem 1rem !important;
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--ds-primary) !important;
}

/* Mobile brand center + logo-only */
@media (max-width: 576px) {
    .navbar-modus .container {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        position: relative;
    }
    .navbar-modus .navbar-brand {
        grid-column: 2;
        margin: 0 auto;
        justify-content: center;
        margin-top: 6px;
    }
    .navbar-modus .navbar-toggler {
        grid-column: 3;
        justify-self: end;
    }
    .navbar-modus .navbar-collapse,
    .navbar-modus .collapsing,
    .navbar-modus .collapse {
        position: fixed;
        top: 72px;
        left: 12px;
        right: 12px;
        background: rgba(255, 255, 255, 0.85);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(226, 232, 240, 0.85);
        border-radius: 16px;
        box-shadow: 0 24px 48px rgba(2, 6, 23, 0.14);
        padding: 14px 12px;
        z-index: 1080;
        height: auto !important;
        transition: opacity .2s ease, transform .2s ease;
        transform-origin: top center;
        transform: translateY(-8px) scale(0.98);
        opacity: 0;
        display: block;
        pointer-events: none;
        will-change: transform, opacity;
    }
    .navbar-modus .navbar-collapse.show {
        transform: translateY(0) scale(1);
        opacity: 1;
        pointer-events: auto;
    }
    .navbar-modus .collapsing {
        transform: translateY(-8px) scale(0.98);
        opacity: 0;
        transition: none !important;
        height: auto !important;
        overflow: visible !important;
    }
    .navbar-modus .collapse { display: block !important; }
    .navbar-modus .navbar-nav {
        display: grid;
        gap: 10px;
        text-align: center;
        justify-items: center;
    }
    .navbar-modus .navbar-nav .nav-link {
        display: block;
        padding: 12px 14px !important;
        min-width: 180px;
        border-radius: 12px;
        font-weight: 700;
        font-size: 1.05rem;
        color: #0f172a !important;
    }
    .navbar-modus .navbar-nav .nav-link:hover {
        background: #f1f5f9;
        color: #2563eb !important;
    }
    .navbar-modus .navbar-collapse .btn {
        width: 100%;
        border-radius: 12px;
        font-weight: 700;
    }
    .navbar-modus {
        padding: 12px 0 16px;
    }
    .navbar-modus .navbar-brand span {
        display: none;
    }
    .navbar-modus .navbar-brand img.site-logo {
        height: 64px;
        width: auto;
    }
}

/* App Shell (Logged-in UI) */
/* ── APP SHELL ── */
.app-shell { display: flex; min-height: 100vh; background: #f8fafc; overflow-x: hidden; }

/* Sidebar */
.app-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 260px;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    padding: 16px 12px;
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    z-index: 1045;
    display: flex;
    flex-direction: column;
}

/* Overlay */
.app-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.45);
    z-index: 1044;
    backdrop-filter: blur(2px);
}
body.sidebar-open .app-overlay { display: block; }
body.sidebar-open .app-sidebar { transform: translateX(0); }
body.sidebar-open { overflow: hidden; }

/* Brand */
.app-brand { display: flex; align-items: center; justify-content: center; padding: 14px 10px; text-decoration: none; flex-shrink: 0; }
.app-brand-logo { height: 52px; width: auto; }
.app-brand-text { display: none; }

/* Nav */
.app-nav { display: grid; gap: 4px; margin-top: 10px; flex: 1; }
.app-nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 12px; border-radius: 10px;
    color: #475569; text-decoration: none; font-size: .9rem; font-weight: 500;
    transition: background .18s, color .18s;
    white-space: nowrap;
}
.app-nav-item i { width: 18px; text-align: center; color: #2563eb; flex-shrink: 0; }
.app-nav-item:hover { background: #f1f5f9; color: #2563eb; }
.app-nav-item.active { background: #eff6ff; color: #2563eb; font-weight: 600; }
.app-nav-item.active i { color: #2563eb; }

/* Sidebar footer */
.app-sidebar-footer { margin-top: auto; padding: 12px 0 4px; border-top: 1px solid #e2e8f0; flex-shrink: 0; }
.app-user { display: flex; align-items: center; gap: 10px; padding: 4px 4px 8px; }
.app-user-avatar {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    background: #eff6ff; color: #2563eb; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .9rem;
}
.app-user-meta { line-height: 1.2; min-width: 0; }
.app-user-name { font-weight: 700; color: #0f172a; font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-user-subtitle { font-size: .75rem; color: #64748b; }
.app-logout { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 6px 8px; border-radius: 8px; font-weight: 600; font-size: .85rem; color: #ef4444; text-decoration: none; transition: background .18s; }
.app-logout:hover { background: #fef2f2; color: #dc2626; }

/* Main */
.app-main { flex: 1; min-width: 0; margin-left: 0; display: flex; flex-direction: column; }

/* Topbar */
.app-topbar {
    position: sticky; top: 0;
    display: flex; align-items: center; justify-content: space-between;
    background: #ffffff; border-bottom: 1px solid #e2e8f0;
    padding: 10px 16px; z-index: 1030;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    gap: 12px;
}
.app-topbar-title { font-weight: 700; color: #0f172a; font-size: .95rem; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-topbar-link { color: #475569; text-decoration: none; font-weight: 600; font-size: .875rem; white-space: nowrap; }
.app-topbar-link:hover { color: #2563eb; }
.app-topbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.app-sidebar-toggle {
    border: 1px solid #e2e8f0; background: #f8fafc;
    border-radius: 8px; padding: 6px 10px;
    font-size: 1rem; color: #334155; cursor: pointer; flex-shrink: 0;
    transition: background .18s;
}
.app-sidebar-toggle:hover { background: #f1f5f9; }

/* Mesaj okunmamış badge */
.msg-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    border-radius: 999px;
    font-size: .58rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
    color: #fff;
    box-shadow: 0 1px 4px rgba(239, 68, 68, .3);
    letter-spacing: .01em;
    vertical-align: middle;
    position: relative;
    top: -1px;
    transition: transform .2s ease, opacity .2s ease;
}
.msg-badge.d-none { display: none !important; }

/* Topbar badge — absolute konumlu */
.msg-badge-topbar {
    position: absolute;
    top: -5px;
    right: -7px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    font-size: .58rem;
    font-weight: 700;
    line-height: 16px;
    background: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
    color: #fff;
    box-shadow: 0 2px 5px rgba(239, 68, 68, .4);
    border: 2px solid #fff;
    pointer-events: none;
}
.msg-badge-topbar.d-none { display: none !important; }

/* Topbar mesaj butonu */
.app-topbar-msg-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
    text-decoration: none;
    transition: background .18s, color .18s;
    flex-shrink: 0;
}
.app-topbar-msg-btn:hover { background: #e2e8f0; color: #2563eb; }
.app-topbar-msg-btn i { font-size: .95rem; }

/* Content */
.app-content { padding: 24px; flex: 1; }
.app-footer { background: #ffffff; border-top: 1px solid #e2e8f0; }
.app-footer-inner { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; color: #475569; font-size: .8rem; }
.app-footer-meta a { color: #64748b; text-decoration: none; }

/* app-main tam yükseklik — chat sayfası için gerekli */
.app-main { display: flex; flex-direction: column; }
.app-content { display: flex; flex-direction: column; }

/* Desktop: sidebar always visible */
@media (min-width: 992px) {
    .app-sidebar { transform: none !important; }
    .app-main { margin-left: 260px; }
    .app-overlay { display: none !important; }
    body.sidebar-open { overflow: auto; }
}

/* Tablet */
@media (max-width: 991.98px) {
    .app-content { padding: 16px; }
}

/* ── YARDIMCI SINIFLAR ── */
.min-w-0 { min-width: 0; }

/* Hızlı erişim — masaüstü */
.quick-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
}
.quick-actions-bar .btn {
    font-size: .8rem;
    padding: 7px 14px;
    font-weight: 600;
    border-radius: 8px;
    text-transform: none;
    letter-spacing: 0;
}

/* ── MOBİL: Sakin Paneli ── */
@media (max-width: 768px) {
    html, body { overflow-x: hidden !important; }

    /* Content padding */
    .app-content { padding: 12px !important; }

    /* Topbar */
    .app-topbar {
        padding: 0 12px !important;
        height: 56px !important;
        min-height: 56px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,.08) !important;
    }

    /* ── PANEL SAYFASI ── */

    /* Sayfa başlığı + daire bilgisi */
    .app-content h1 { font-size: 1.4rem !important; margin-bottom: 2px !important; }
    .app-content h1 + div { font-size: .8rem !important; }

    /* Hızlı erişim butonları — 2 sütun grid */
    .app-content .quick-actions-bar {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        padding: 12px !important;
    }
    .app-content .quick-actions-bar .btn {
        font-size: .78rem !important;
        padding: 10px 8px !important;
        justify-content: flex-start !important;
        border-radius: 10px !important;
        font-weight: 600 !important;
        text-transform: none !important;
        letter-spacing: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* Stat kartları — 1 sütun */
    .app-content .stat-cards-row > [class*="col-"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    .app-content .stat-cards-row .card-body {
        padding: 1rem !important;
    }
    .app-content .stat-cards-row .h3 {
        font-size: 1.5rem !important;
    }
    .app-content .stat-cards-row .feature-icon {
        width: 48px !important;
        height: 48px !important;
        font-size: 1.25rem !important;
        border-radius: 12px !important;
    }
    .app-content .stat-cards-row .text-muted {
        font-size: .8rem !important;
    }

    /* Alt kartlar (duyurular + bakım) — tek sütun */
    .app-content .bottom-cards-row > [class*="col-"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* Genel kart düzeltmeleri */
    .app-content .card { border-radius: 12px !important; }
    .app-content .card-body { padding: .875rem !important; }
    .app-content .card-header { padding: .75rem .875rem !important; }

    /* feature-icon genel */
    .app-content .feature-icon {
        width: 48px !important;
        height: 48px !important;
        font-size: 1.25rem !important;
        border-radius: 12px !important;
        flex-shrink: 0 !important;
    }

    /* Butonlar */
    .app-content .btn { font-size: .875rem !important; padding: .6rem 1rem !important; }
    .app-content .d-grid .btn { padding: .65rem 1rem !important; }

    /* Tüm row'lar tek sütun */
    .app-content .row > .col-md-4,
    .app-content .row > .col-md-5,
    .app-content .row > .col-md-6,
    .app-content .row > .col-md-7,
    .app-content .row > .col-md-8,
    .app-content .row > .col-md-12,
    .app-content .row > .col-lg-4,
    .app-content .row > .col-lg-5,
    .app-content .row > .col-lg-7,
    .app-content .row > .col-lg-8 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* Tablolar → kart görünümü */
    .app-content .table-responsive table thead { display: none !important; }
    .app-content .table-responsive table,
    .app-content .table-responsive table tbody,
    .app-content .table-responsive table tr { display: block !important; width: 100% !important; }
    .app-content .table-responsive table tbody tr {
        margin-bottom: .75rem !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 10px !important;
        padding: .75rem !important;
        background: #fff !important;
        box-shadow: 0 1px 4px rgba(0,0,0,.05) !important;
    }
    .app-content .table-responsive table tbody td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: .4rem .25rem !important;
        border-bottom: 1px solid #f1f5f9 !important;
        border-left: none !important; border-right: none !important; border-top: none !important;
        font-size: .875rem !important;
        white-space: normal !important;
        gap: 8px !important;
    }
    .app-content .table-responsive table tbody td:last-child {
        border-bottom: none !important;
        justify-content: flex-end !important;
        padding-top: .6rem !important;
    }
    .app-content .table-responsive table tbody td::before {
        content: attr(data-label) !important;
        font-weight: 600 !important;
        color: #64748b !important;
        font-size: .72rem !important;
        text-transform: uppercase !important;
        flex-shrink: 0 !important;
        padding-right: .5rem !important;
        min-width: 80px !important;
    }

    /* Formlar — iOS zoom önleme */
    .app-content .form-control,
    .app-content .form-select,
    .app-content textarea { font-size: 16px !important; }

    /* Modal */
    .modal-dialog { margin: 8px !important; max-width: calc(100vw - 16px) !important; }
    .modal-body { padding: 1rem !important; }

    /* Sayfalama */
    .pagination { flex-wrap: wrap !important; justify-content: center !important; gap: 4px !important; }

    /* Sayfa başlığı + buton satırı */
    .app-content .page-header-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    .app-content .page-header-row .btn {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Aidat sayfası — daire bilgisi + borç kartları */
    .app-content .row > .col-md-4.mb-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    .app-content .row > .col-md-8 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* Arıza sayfası — form + tablo */
    .app-content .row > .col-md-5,
    .app-content .row > .col-md-7 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* Mesajlar — chat yüksekliği */
    .app-content .chat-card {
        height: calc(100vh - 120px) !important;
        min-height: 400px !important;
    }

    /* Ziyaretçi/Araç kartları — 1 sütun */
    .app-content .row.g-4 > .col-md-6.col-lg-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* List group */
    .app-content .list-group-item { padding: .75rem .5rem !important; }
}

/* Landing Hero */
.landing-hero {
    padding: 80px 0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid var(--ds-border);
}

.metrics-bar {
    margin-top: -24px;
    position: relative;
    z-index: 5;
    background: #ffffff;
    border: 1px solid var(--ds-border);
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.06);
    padding: 18px 22px;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
}

.metric-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--ds-primary-light);
    color: var(--ds-primary);
    font-size: 18px;
}

.metric-text {
    font-weight: 700;
    color: #0f172a;
}

.landing-badge {
    display: inline-block;
    background: var(--ds-primary-light);
    color: var(--ds-primary);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    border: 1px solid #dbeafe;
}

.landing-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.landing-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--ds-text-muted);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

/* Cards */
.landing-card {
    background: #ffffff;
    border: 1px solid var(--ds-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--ds-shadow-lg);
}

.landing-mini {
    background: var(--ds-surface-2);
    border: 1px solid var(--ds-border);
    padding: 1.25rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    transition: all 0.2s;
}

.landing-mini:hover {
    background: #ffffff;
    border-color: var(--ds-primary);
    transform: translateY(-4px);
    box-shadow: var(--ds-shadow);
}

.landing-mini-icon {
    width: 48px;
    height: 48px;
    background: var(--ds-primary-light);
    color: var(--ds-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.landing-mini-title {
    font-weight: 700;
    color: var(--ds-text);
}

.landing-mini-sub {
    font-size: 0.875rem;
    color: var(--ds-text-muted);
}

/* Feature Cards */
.feature-card {
    background: #ffffff;
    border: 1px solid var(--ds-border);
    padding: 2.5rem;
    border-radius: 24px;
    height: 100%;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--ds-shadow-lg);
    border-color: var(--ds-primary);
}

.feature-card-icon {
    width: 64px;
    height: 64px;
    background: var(--ds-primary-light);
    color: var(--ds-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    border-radius: 12px;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--ds-primary);
    border: none;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

.btn-primary:hover {
    background: var(--ds-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.23);
}

.btn-outline-light {
    background: transparent;
    border: 2px solid var(--ds-border);
    color: var(--ds-text-muted) !important;
}

.btn-outline-light:hover {
    background: var(--ds-surface-2);
    border-color: var(--ds-text-muted);
    color: var(--ds-text) !important;
}

/* Feature Icons & Backgrounds */
.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.bg-primary { background-color: var(--ds-primary) !important; }
.bg-danger { background-color: var(--ds-secondary) !important; }
.bg-info { background-color: #0ea5e9 !important; }
.text-white { color: #ffffff !important; }

/* Footer */
footer {
    background: var(--ds-text);
    color: #ffffff;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

footer h5, footer h6 { color: #ffffff; }
footer p, footer a { color: #cbd5e1; text-decoration: none; }
footer a:hover { color: #ffffff; text-decoration: underline; }

/* Mobile Optimizations */
@media (max-width: 768px) {
    .landing-hero {
        padding: 40px 0;
        text-align: center;
    }
    .landing-subtitle {
        margin-inline: auto;
    }
    .landing-card {
        margin-top: 2rem;
        padding: 1.5rem;
    }
    .landing-card-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    body.force-light .landing-hero .btn {
        width: 100%;
    }
    body.force-light .landing-title {
        font-size: 2rem;
    }
    body.force-light .landing-subtitle {
        font-size: 1rem;
    }
}

/* Dark Mode (disabled for body.force-light) */
@media (prefers-color-scheme: dark) {
    body:not(.force-light) {
        --ds-bg: #0f172a;
        --ds-surface: #1e293b;
        --ds-surface-2: #334155;
        --ds-border: #334155;
        --ds-text: #f8fafc;
        --ds-text-muted: #cbd5e1;
        background-color: var(--ds-bg);
        color: var(--ds-text);
    }
    body:not(.force-light) .navbar-modus { background: #1e293b !important; border-bottom-color: #334155; }
    body:not(.force-light) .landing-hero { background: #0f172a; border-bottom-color: #1e293b; }
    body:not(.force-light) .landing-card,
    body:not(.force-light) .feature-card { background: #1e293b; border-color: #334155; }
    body:not(.force-light) .landing-mini { background: #334155; border-color: #475569; }
    body:not(.force-light) .landing-mini:hover { background: #475569; }
    body:not(.force-light) .btn-outline-light { border-color: #475569; color: #cbd5e1 !important; }
}

/* Current project feature compatibility - visual base remains MODUS working backup. */
.btn .ripple-effect {
    position: absolute; border-radius: 50%;
    background: rgba(255,255,255,0.35);
    transform: scale(0); animation: ripple .5s ease-out; pointer-events: none;
}

/* ── SCROLL-TO-TOP ── */
.scroll-top-btn {
    position: fixed; bottom: 28px; right: 28px; z-index: 1050;
    width: 50px; height: 50px; border-radius: 16px;
    background: var(--ds-primary); color: #fff; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
    box-shadow: 0 4px 20px rgba(37,99,235,0.35);
    opacity: 0; transform: translateY(24px) scale(0.8);
    transition: all .4s var(--ds-spring); pointer-events: none;
}

.scroll-top-btn.visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.scroll-top-btn:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 8px 32px rgba(37,99,235,0.4);
}

/* ── SCROLL PROGRESS ── */
.scroll-progress {
    position: fixed; top: 0; left: 0; z-index: 10000;
    width: 0%; height: 3px;
    background: linear-gradient(90deg, var(--ds-primary), #7c3aed, var(--ds-primary));
    background-size: 200% 100%;
    animation: progressShimmer 2s linear infinite;
    pointer-events: none; border-radius: 0 2px 2px 0;
}

/* ── TOAST ── */
.toast-container {
    position: fixed; top: 24px; right: 24px; z-index: 9999;
    display: flex; flex-direction: column; gap: 12px; pointer-events: none;
}

.toast-msg {
    min-width: 320px; max-width: 420px;
    background: rgba(11,17,32,0.92);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    color: var(--ds-text);
    border: 1px solid var(--ds-border);
    border-radius: 18px; padding: 16px 20px;
    box-shadow: var(--ds-shadow-lg), 0 0 40px rgba(37,99,235,0.04);
    display: flex; align-items: center; gap: 14px;
    font-size: .875rem; font-weight: 500;
    pointer-events: auto;
    animation: toastIn .4s var(--ds-spring);
    position: relative; overflow: hidden;
}

.toast-msg.removing { animation: toastOut .3s ease forwards; }

.toast-msg .toast-icon {
    width: 36px; height: 36px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: .85rem;
    transition: transform .3s var(--ds-spring);
}

.toast-msg:hover .toast-icon { transform: scale(1.1) rotate(-5deg); }

.toast-msg.toast-success .toast-icon { background: rgba(5,150,105,0.15); color: #34d399; }

.toast-msg.toast-error .toast-icon { background: rgba(220,38,38,0.15); color: #f87171; }

.toast-msg.toast-info .toast-icon { background: rgba(37,99,235,0.15); color: #60a5fa; }

.toast-msg .toast-close {
    margin-left: auto; background: none; border: none;
    color: var(--ds-text-muted); cursor: pointer; font-size: 1rem;
    padding: 4px 8px; border-radius: 8px; transition: all .2s;
}

.toast-msg .toast-close:hover { background: rgba(255,255,255,0.06); color: var(--ds-text); }

.toast-msg .toast-progress {
    position: absolute; bottom: 0; left: 0; height: 3px;
    border-radius: 0 0 18px 18px;
    background: linear-gradient(90deg, var(--ds-primary), #7c3aed);
    animation: toastProgress 4s linear forwards;
}

/* ── SKELETON ── */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.8s ease-in-out infinite;
    border-radius: 10px; min-height: 16px;
}

.skeleton-text { height: 14px; margin-bottom: 10px; width: 80%; }

.skeleton-title { height: 24px; margin-bottom: 14px; width: 50%; }

.skeleton-avatar { width: 42px; height: 42px; border-radius: 50%; }

.skeleton-card { height: 140px; border-radius: var(--ds-radius); }

/* ── SCROLL REVEAL ── */
.reveal { opacity: 0; transform: translateY(32px); transition: all .7s cubic-bezier(.4,0,.2,1); }

.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-left { opacity: 0; transform: translateX(-32px); transition: all .7s cubic-bezier(.4,0,.2,1); }

.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right { opacity: 0; transform: translateX(32px); transition: all .7s cubic-bezier(.4,0,.2,1); }

.reveal-right.visible { opacity: 1; transform: translateX(0); }

.reveal-scale { opacity: 0; transform: scale(0.92); transition: all .6s var(--ds-spring); }

.reveal-scale.visible { opacity: 1; transform: scale(1); }

.stagger > *:nth-child(1) { transition-delay: 0s; }

.stagger > *:nth-child(2) { transition-delay: .06s; }

.stagger > *:nth-child(3) { transition-delay: .12s; }

.stagger > *:nth-child(4) { transition-delay: .18s; }

.stagger > *:nth-child(5) { transition-delay: .24s; }

.stagger > *:nth-child(6) { transition-delay: .3s; }

.stagger > *:nth-child(7) { transition-delay: .36s; }

.stagger > *:nth-child(8) { transition-delay: .42s; }

.form-label { color: var(--ds-text-muted); font-weight: 600; }

.form-error { animation: formShake .4s ease; border-color: #ef4444 !important; }

.app-content, .landing-hero, .auth-shell {
    animation: pageReveal .5s cubic-bezier(.4,0,.2,1) both;
}

/* ── SKIP LINK ── */
.skip-link {
    position: fixed; top: -100%; left: 16px; z-index: 99999;
    background: #2563eb; color: #fff;
    padding: 12px 24px; border-radius: 0 0 14px 14px;
    font-weight: 700; font-size: .9rem; text-decoration: none;
    transition: top .25s var(--ds-spring);
}

.skip-link:focus { top: 0; }

/* ── TOUCH TARGETS ── */
.btn, .nav-link, .form-check-input, .form-select, .form-control,
.app-nav-item, .app-sidebar-toggle, .app-topbar-msg-btn,
.list-group-item-action, .page-link { min-height: 44px; }

.user-select-none { user-select: none; -webkit-user-select: none; }

.shadow-sm { box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important; }

.list-group-item, .list-group-item-action {
    background: rgba(255,255,255,0.04);
    border-color: var(--ds-border);
    color: var(--ds-text-secondary);
}

.list-group-item-action:hover {
    background: rgba(255,255,255,0.06);
    color: var(--ds-text);
}

/* ── PAGINATION ── */
.page-link {
    border-radius: 10px;
    margin: 0 2px;
    border: 1px solid var(--ds-border);
    transition: all .2s var(--ds-transition);
    background: rgba(255,255,255,0.04);
    color: var(--ds-text-muted);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
    color: #fff;
}

.page-link:hover {
    background: rgba(255,255,255,0.08);
    color: var(--ds-text-secondary);
}

.page-item.disabled .page-link {
    background: rgba(255,255,255,0.02);
    color: #475569;
}

/* ── DROPDOWN ── */
.dropdown-menu {
    border: 1px solid var(--ds-border);
    border-radius: 14px;
    box-shadow: var(--ds-shadow-lg);
    backdrop-filter: blur(24px);
    background: rgba(11,17,32,0.95);
    padding: 6px;
    overflow: hidden;
}

.dropdown-item {
    border-radius: 10px;
    padding: 8px 14px;
    transition: all .15s;
    color: var(--ds-text-muted);
}

.dropdown-item:hover {
    background: rgba(37,99,235,0.1);
    color: #60a5fa;
}

/* ── MODAL ── */
.modal-content {
    border: 1px solid var(--ds-border);
    border-radius: 20px;
    box-shadow: var(--ds-shadow-xl);
    backdrop-filter: blur(24px);
    background: rgba(11,17,32,0.95);
}

.modal-header {
    border-bottom: 1px solid var(--ds-border);
    padding: 1.25rem 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--ds-border);
}

/* ── PROGRESS ── */
.progress {
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
}

.progress-bar {
    border-radius: 10px;
    transition: width .6s var(--ds-transition);
}

/* ── NAV TABS ── */
.nav-tabs {
    border-bottom: 1px solid var(--ds-border);
}

.nav-tabs .nav-link {
    border-radius: 10px 10px 0 0;
    border: 1px solid transparent;
    color: var(--ds-text-muted);
    font-weight: 500;
    transition: all .2s;
}

.nav-tabs .nav-link:hover {
    color: var(--ds-text-secondary);
    border-color: transparent;
}

.nav-tabs .nav-link.active {
    background: rgba(255,255,255,0.04);
    border-color: var(--ds-border);
    border-bottom-color: transparent;
    color: #60a5fa;
    font-weight: 600;
}

@media (max-width: 480px) {
.scroll-top-btn { bottom: 16px; right: 16px; width: 44px; height: 44px; }
}

@keyframes ripple { to { transform: scale(4); opacity: 0; } }

@keyframes progressShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes toastIn { from { opacity: 0; transform: translateX(60px) scale(0.92); } }

@keyframes toastOut { to { opacity: 0; transform: translateX(60px) scale(0.92); } }

@keyframes toastProgress { from { width: 100%; } to { width: 0%; } }

@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

@keyframes formShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* MODUS working-backup palette overrides */
:root {
    --ds-primary: #2563eb;
    --ds-primary-hover: #1d4ed8;
    --ds-primary-light: #eff6ff;
    --ds-primary-rgb: 37,99,235;
    --ds-secondary: #ef4444;
    --ds-success: #16a34a;
    --ds-warning: #f59e0b;
    --ds-info: #0ea5e9;
    --ds-text: #0f172a;
    --ds-text-secondary: #334155;
    --ds-text-muted: #475569;
    --ds-bg: #ffffff;
    --ds-surface: #ffffff;
    --ds-surface-2: #f8fafc;
    --ds-border: #e2e8f0;
    --ds-border-hover: #cbd5e1;
    --ds-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --ds-shadow-md: 0 8px 18px rgba(15, 23, 42, 0.08);
    --ds-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --ds-shadow-xl: 0 24px 48px -12px rgba(15, 23, 42, 0.14);
    --ds-shadow-glow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

html,
body {
    color-scheme: light;
}

body {
    background: var(--ds-bg) !important;
    color: var(--ds-text);
}

body::before,
.site-grid-overlay {
    display: none !important;
}

::selection {
    background: rgba(37, 99, 235, 0.18);
    color: var(--ds-text);
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--ds-text);
    letter-spacing: 0;
}

a {
    color: var(--ds-primary);
}

a:hover {
    color: var(--ds-primary-hover);
}

.navbar-modus {
    background: #ffffff !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid var(--ds-border);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.navbar-modus.scrolled {
    background: #ffffff !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.navbar-brand {
    color: var(--ds-text) !important;
}

.navbar-brand img {
    filter: none;
}

.nav-link {
    color: var(--ds-text-muted) !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--ds-primary) !important;
}

.card:not(.bg-primary):not(.bg-success):not(.bg-danger):not(.bg-warning):not(.bg-info):not(.bg-secondary):not(.bg-dark),
.modal-content,
.dropdown-menu,
.landing-card,
.service-card,
.feature-card,
.pricing-card,
.testimonial-card,
.blog-card,
.contact-card,
.dashboard-card,
.stat-card {
    background: #ffffff !important;
    color: var(--ds-text);
    border: 1px solid var(--ds-border) !important;
    box-shadow: var(--ds-shadow) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.card-header:not(.bg-primary):not(.bg-success):not(.bg-danger):not(.bg-warning):not(.bg-info):not(.bg-secondary):not(.bg-dark),
.modal-header:not(.bg-primary):not(.bg-success):not(.bg-danger):not(.bg-warning):not(.bg-info):not(.bg-secondary):not(.bg-dark),
.dropdown-header {
    background: #f8fafc !important;
    color: var(--ds-text) !important;
    border-bottom: 1px solid var(--ds-border) !important;
}

.table {
    color: var(--ds-text);
}

.table th {
    background: #f8fafc !important;
    color: #475569 !important;
    border-bottom-color: var(--ds-border) !important;
}

.table td {
    border-color: var(--ds-border) !important;
}

.table-hover tbody tr:hover td,
.admin-panel .table tbody tr:hover td {
    background: #f8fafc !important;
}

.form-control,
.form-select,
.input-group-text {
    background-color: #ffffff !important;
    color: var(--ds-text) !important;
    border-color: var(--ds-border) !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ds-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15) !important;
}

.text-muted,
.text-secondary {
    color: var(--ds-text-muted) !important;
}

#section-quick-access a.btn {
    background: #ffffff !important;
    border-color: var(--ds-border) !important;
    color: var(--ds-text-secondary) !important;
    box-shadow: var(--ds-shadow) !important;
    backdrop-filter: none;
}

#section-quick-access a.btn:hover {
    background: var(--ds-primary-light) !important;
    border-color: rgba(37, 99, 235, 0.22) !important;
}

#section-quick-access a.btn .badge.bg-white {
    background-color: #ffffff !important;
}
