/* ============================================================
   CF-Guard — Modern Glassmorphism Theme
   ──────────────────────────────────────────────────────────
   ✦ Variable fonts: Manrope (body) + Bricolage Grotesque (heads)
   ✦ Aurora ambient background (pseudo-elements only)
   ✦ Glass cards with backdrop blur + edge highlight
   ✦ Animated success check (gold ring + green tick pop)
   ✦ All animations GPU-friendly (transform/opacity)
   ============================================================ */

/* ---------------- 1. Variable Fonts (local) ---------------- */
@font-face {
    font-family: 'Manrope';
    src: url('../vendor/fonts/manrope-variable.woff2') format('woff2-variations'),
         url('../vendor/fonts/manrope-variable.woff2') format('woff2');
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Bricolage Grotesque';
    src: url('../vendor/fonts/bricolage-variable.woff2') format('woff2-variations'),
         url('../vendor/fonts/bricolage-variable.woff2') format('woff2');
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

/* ---------------- 2. Design Tokens — Clean Blue (QrSistemi tarzı) ---------------- */
:root {
    /* Background — clean off-white */
    --bg-base:      #f4f6fb;
    --bg-deeper:    #e7ecf5;
    --bg-veil:      rgba(244, 246, 251, 0.55);

    /* Glass layer — pure white */
    --glass-bg:        rgba(255, 255, 255, 0.78);
    --glass-bg-strong: rgba(255, 255, 255, 0.92);
    --glass-bg-input:  rgba(248, 250, 254, 0.88);
    --glass-border:    rgba(99, 122, 175, 0.16);
    --glass-border-strong: rgba(99, 122, 175, 0.24);
    --glass-shine:     rgba(255, 255, 255, 0.9);

    /* Text — deep navy */
    --text-primary:   #16203a;
    --text-secondary: #5a6a88;
    --text-muted:     #8a96b0;

    /* Brand — clean professional blue */
    --c-blue:        #2f6dff;
    --c-blue-light:  #5b89ff;
    --c-blue-deep:   #1e54e6;
    --c-purple:      #6b7fb5;
    --c-cyan:        #4fb6d6;

    /* No gold — neutral slate replaces gold tokens */
    --c-gold:        #6b7fb5;
    --c-gold-warm:   #5567a0;
    --c-gold-soft:   #d6dfef;

    /* Status */
    --c-green:       #16b270;
    --c-green-deep:  #0d8c56;
    --c-red:         #ef4761;
    --c-red-deep:    #d62647;
    --c-yellow:      #f59e0b;
    --c-pink:        #b96cbf;

    /* Gradients — blue family only */
    --grad-blue:   linear-gradient(135deg, #2f6dff 0%, #5b89ff 100%);
    --grad-purple: linear-gradient(135deg, #1e54e6 0%, #5b89ff 100%);
    --grad-gold:   linear-gradient(135deg, #6b7fb5 0%, #8a96b0 100%);
    --grad-green:  linear-gradient(135deg, #16b270 0%, #4ade80 100%);
    --grad-red:    linear-gradient(135deg, #ef4761 0%, #f87171 100%);
    --grad-aurora: linear-gradient(135deg, #2f6dff 0%, #5b89ff 50%, #d6dfef 100%);

    /* Shadows — soft cool */
    --shadow-glass: 0 14px 38px -16px rgba(22, 44, 96, 0.18),
                    0 2px 6px rgba(22, 44, 96, 0.05),
                    inset 0 1px 0 rgba(255, 255, 255, 0.7);
    --shadow-glass-hover: 0 26px 56px -20px rgba(22, 44, 96, 0.28),
                          inset 0 1px 0 rgba(255, 255, 255, 0.85);
    --shadow-glow-blue: 0 0 24px rgba(47, 109, 255, 0.22);
    --shadow-glow-gold: 0 0 24px rgba(99, 122, 175, 0.2);

    /* Geometry */
    --radius-sm: 10px;
    --radius:    16px;
    --radius-lg: 22px;
    --radius-pill: 999px;
}

/* ---------------- 3. Reset + Base ---------------- */
*, *::before, *::after {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html { background: var(--bg-base); }
body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    font-weight: 400;
    font-feature-settings: "ss01", "cv11";
    letter-spacing: -0.005em;
    color: var(--text-primary);
    background: var(--bg-base);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ---------------- 4. Aurora Background (pseudo only) ---------------- */
/* Three softly drifting orbs + grain texture — no HTML changes */

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: -2;
    border-radius: 50%;
    filter: blur(140px);
    pointer-events: none;
    will-change: transform;
}

/* Very subtle blue orbs — cool, professional */
body::before {
    width: 70vw;
    height: 70vw;
    top: -25%;
    left: -20%;
    background: radial-gradient(circle, var(--c-blue) 0%, transparent 60%);
    opacity: 0.10;
    animation: aurora-1 38s ease-in-out infinite alternate;
}

body::after {
    width: 60vw;
    height: 60vw;
    bottom: -25%;
    right: -20%;
    background: radial-gradient(circle, var(--c-blue-light) 0%, transparent 60%);
    opacity: 0.09;
    animation: aurora-2 44s ease-in-out infinite alternate;
}

/* Very subtle cool vignette */
html::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(ellipse at center, transparent 0%, rgba(22, 44, 96, 0.06) 100%);
}

/* No grain — clean, crisp look */
html::after { display: none; }

@keyframes aurora-1 {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(8vw, 6vh) scale(1.08); }
    100% { transform: translate(-4vw, 4vh) scale(0.96); }
}
@keyframes aurora-2 {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(-6vw, -5vh) scale(1.05); }
    100% { transform: translate(6vw, 4vh) scale(0.94); }
}
@keyframes aurora-3 {
    0%   { transform: translate(0, 0) scale(0.9); }
    50%  { transform: translate(12vw, -8vh) scale(1.1); }
    100% { transform: translate(-10vw, 8vh) scale(0.95); }
}

@media (prefers-reduced-motion: reduce) {
    body::before, body::after {
        animation: none;
    }
}

/* ---------------- 5. Typography ---------------- */
h1, h2, h3, h4, h5, h6,
.page-header h1,
.modal-title,
.sidebar-brand,
.card-header span,
.login-logo h1 {
    font-family: 'Bricolage Grotesque', 'Manrope', system-ui, serif;
    font-weight: 600;
    font-variation-settings: 'wdth' 100, 'opsz' 16;
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: var(--text-primary);
}

h1 { font-size: 2rem; font-weight: 600; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

a               { color: var(--c-blue-deep); text-decoration: none; transition: color .15s; font-weight: 500; }
a:hover         { color: var(--c-gold-warm); }
hr              { border-color: var(--glass-border); opacity: .5; }
code            {
    color: var(--c-blue-deep);
    background: rgba(47, 109, 255, 0.10);
    padding: 2px 8px;
    border-radius: 6px;
    font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
    font-size: 0.85em;
    font-weight: 500;
}
strong { font-weight: 700; }

.text-muted     { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-secondary) !important; }
::selection     { background: var(--c-blue); color: #fff; }

.lead {
    color: var(--text-secondary);
    font-size: .98rem;
    font-weight: 400;
}

/* ---------------- 6. Layout ---------------- */
.app-layout {
    display: flex;
    min-height: 100vh;
    /* NO position/z-index — would create stacking context,
       which traps Bootstrap modals UNDER the body-level backdrop */
}
.app-main {
    flex: 1;
    min-width: 0;
    padding: 32px 36px 80px;
}
.app-content { max-width: 1500px; }

/* ---------------- 7. Sidebar (Glass) ---------------- */
.sidebar {
    width: 260px;
    background: rgba(255, 253, 248, 0.78);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    border-right: 1px solid var(--glass-border);
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 1px 0 24px rgba(124, 87, 40, 0.06);
}

.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 6px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: var(--glass-border-strong); }

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 16px 22px;
    margin-bottom: 8px;
    font-family: 'Bricolage Grotesque', 'Manrope', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    border-bottom: 1px solid var(--glass-border);
    position: relative;
}
.sidebar-brand > span {
    background: linear-gradient(95deg, var(--c-blue-deep) 0%, var(--c-blue) 60%, var(--c-blue-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.sidebar-brand i {
    color: var(--c-blue);
    font-size: 1.7rem;
    filter: drop-shadow(0 2px 8px rgba(47, 109, 255, 0.35));
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.sidebar-brand:hover i { transform: rotate(-8deg) scale(1.05); }
/* subtle accent line under the brand */
.sidebar-brand::after {
    content: "";
    position: absolute;
    left: 16px;
    bottom: -1px;
    width: 36px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--c-blue), transparent);
}
/* Close button on mobile drawer */
.sidebar-brand .btn-close { opacity: .65; }
.sidebar-brand .btn-close:hover { opacity: 1; }

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: .93rem;
    font-weight: 500;
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
    border-left: 2px solid transparent;
    position: relative;
}
.sidebar-nav a i {
    font-size: 1.05rem;
    width: 22px;
    text-align: center;
    opacity: .75;
    transition: all .25s;
}
.sidebar-nav a:hover {
    background: rgba(47, 109, 255, 0.08);
    color: var(--text-primary);
    transform: translateX(2px);
}
.sidebar-nav a:hover i { opacity: 1; transform: scale(1.1); }

.sidebar-nav a.active {
    background: linear-gradient(90deg,
        rgba(47, 109, 255, 0.16) 0%,
        rgba(47, 109, 255, 0.04) 100%);
    color: var(--c-blue-deep);
    font-weight: 600;
    border-left-color: var(--c-blue);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.sidebar-nav a.active i {
    opacity: 1;
    color: var(--c-blue);
    filter: drop-shadow(0 0 6px rgba(47, 109, 255, 0.4));
}

.sidebar-footer {
    margin-top: auto;
    padding: 18px 12px 8px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: .85rem;
}

/* ---------------- 8. Page Header ---------------- */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 16px;
    flex-wrap: wrap;
}
.page-header h1 {
    font-size: 1.85rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.03em;
}
.page-header h1 i {
    background: var(--grad-aurora);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 16px rgba(47, 109, 255, 0.4));
}
.page-header .lead {
    color: var(--text-muted);
    font-size: .95rem;
    margin: 6px 0 0;
}
.system-status {
    color: var(--c-green);
    font-size: .9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(52, 211, 153, 0.1);
    border-radius: var(--radius-pill);
    border: 1px solid rgba(52, 211, 153, 0.25);
}
.system-status::before {
    content: "";
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--c-green);
    box-shadow: 0 0 12px var(--c-green);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.6; transform: scale(0.85); }
}

/* ---------------- 9. Glass Cards ---------------- */
.card {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-glass);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    transition: transform .25s cubic-bezier(.4, 0, .2, 1), box-shadow .25s;
}
/* Top edge highlight — must not block clicks */
.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-shine) 20%, var(--glass-shine) 80%, transparent);
    pointer-events: none;
    z-index: 1;
}
.card > * { position: relative; z-index: 2; }   /* card content above the shine line */
.card:hover {
    box-shadow: var(--shadow-glass-hover);
}

.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--glass-border) !important;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-family: 'Bricolage Grotesque', sans-serif;
    letter-spacing: -0.015em;
}
.card-header i {
    margin-right: 8px;
    color: var(--c-blue-light);
    filter: drop-shadow(0 0 8px rgba(47, 109, 255, 0.35));
}
.card-body { padding: 22px; }

/* ---------------- 10. Stat Cards ---------------- */
.stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}
@media (max-width: 1100px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .stat-row { grid-template-columns: 1fr; } }

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px 26px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-glass);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1), box-shadow .3s;
}
.stat-card::before {
    content: "";
    position: absolute;
    top: 0; left: 12%; right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-shine), transparent);
    pointer-events: none;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glass-hover);
}
.stat-card .icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    color: #fff;
    margin-bottom: 16px;
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.stat-card .icon::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 14px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.4), rgba(255,255,255,0.0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.stat-card .num {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
    font-variation-settings: 'wdth' 95;
}
.stat-card .lbl {
    color: var(--text-muted);
    font-size: .88rem;
    font-weight: 500;
    margin-top: 10px;
    letter-spacing: 0.01em;
}
.stat-card.blue   .icon { background: var(--grad-blue);   }
.stat-card.blue   .num  { color: var(--c-blue-light); }
.stat-card.purple .icon { background: var(--grad-purple); }
.stat-card.purple .num  { color: #c4b5fd; }
.stat-card.red    .icon { background: var(--grad-red);    }
.stat-card.red    .num  { color: #fca5a5; }
.stat-card.green  .icon { background: var(--grad-green);  }
.stat-card.green  .num  { color: #6ee7b7; }

/* ---------------- 11. Form Controls ---------------- */
.form-control, .form-select {
    background: #ffffff !important;
    border: 1.5px solid rgba(99, 122, 175, 0.38) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    padding: 11px 16px;
    font-size: .93rem;
    font-family: inherit;
    transition: border-color .2s ease, box-shadow .2s ease;
    box-shadow: 0 1px 2px rgba(22, 44, 96, 0.04);
}
.form-control:hover, .form-select:hover {
    border-color: rgba(99, 122, 175, 0.55) !important;
}
.form-control:focus, .form-select:focus {
    border-color: var(--c-blue) !important;
    box-shadow: 0 0 0 4px rgba(47, 109, 255, 0.18),
                0 1px 2px rgba(22, 44, 96, 0.06) !important;
    background: #ffffff !important;
    color: var(--text-primary) !important;
    outline: none;
}
::placeholder { color: rgba(90, 106, 136, 0.5) !important; opacity: 1; }

.form-label {
    color: var(--text-primary);
    font-size: .88rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.005em;
}
.form-text {
    color: var(--text-muted);
    font-size: .82rem;
    margin-top: 6px;
    line-height: 1.5;
}
.form-check-input {
    background-color: #ffffff;
    border: 1.5px solid rgba(99, 122, 175, 0.45);
    width: 1.2em; height: 1.2em;
    margin-top: 0.15em;
    transition: all .2s;
}
.form-check-input:checked {
    background-color: var(--c-blue);
    border-color: var(--c-blue);
    box-shadow: 0 2px 6px rgba(47, 109, 255, 0.35);
}
.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(47, 109, 255, 0.2);
    border-color: var(--c-blue);
}
.form-check-label {
    color: var(--text-primary);
    font-size: .92rem;
    padding-left: 4px;
}

/* ---------------- 12. Buttons ---------------- */
.btn {
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    font-size: .9rem;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.005em;
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent 50%);
    opacity: 0;
    transition: opacity .25s;
    pointer-events: none;
}
.btn:hover::after { opacity: 1; }

.btn-primary {
    background: var(--grad-blue);
    border-color: var(--c-blue);
    color: #fff;
    box-shadow: 0 4px 16px rgba(47, 109, 255, 0.35);
}
.btn-primary:hover {
    background: var(--grad-blue);
    border-color: var(--c-blue-light);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(47, 109, 255, 0.5);
}
.btn-success {
    background: linear-gradient(135deg, #0d8c56 0%, #16a571 45%, #22c55e 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 11px 22px;
    box-shadow:
        0 6px 18px rgba(13, 140, 86, 0.32),
        0 2px 4px rgba(13, 140, 86, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    transition: transform .25s cubic-bezier(.4, 0, .2, 1),
                box-shadow .25s ease;
}
/* Shimmer sweep on hover */
.btn-success::before {
    content: "";
    position: absolute;
    top: 0; left: -30%;
    width: 35%; height: 100%;
    background: linear-gradient(110deg,
        transparent 0%,
        rgba(255, 255, 255, 0.32) 50%,
        transparent 100%);
    transform: skewX(-20deg);
    transition: left .7s cubic-bezier(.4, 0, .2, 1);
    pointer-events: none;
    z-index: 1;
}
.btn-success::after {
    /* keep gradient overlay clickable */
    background: none;
}
.btn-success > * { position: relative; z-index: 2; }
.btn-success i {
    margin-right: 4px;
    display: inline-block;
    transform-origin: center;
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}

.btn-success:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow:
        0 12px 28px rgba(13, 140, 86, 0.48),
        0 4px 8px rgba(13, 140, 86, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}
.btn-success:hover::before { left: 130%; }
.btn-success:hover i { transform: scale(1.18) rotate(-4deg); }
.btn-success:active {
    transform: translateY(0);
    box-shadow:
        0 4px 12px rgba(13, 140, 86, 0.32),
        inset 0 2px 4px rgba(0, 0, 0, 0.18);
}
.btn-success:focus-visible {
    outline: none;
    box-shadow:
        0 6px 18px rgba(13, 140, 86, 0.32),
        0 0 0 4px rgba(34, 197, 94, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-success:disabled,
.btn-success.disabled {
    background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
    box-shadow: none;
    transform: none;
    opacity: 0.65;
}
.btn-danger {
    background: var(--grad-red);
    border-color: var(--c-red);
    color: #fff;
}
.btn-warning {
    background: var(--grad-gold);
    border-color: var(--c-gold-warm);
    color: #1c1404;
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.35);
}
.btn-warning:hover { color: #1c1404; transform: translateY(-1px); }

.btn-outline-light {
    color: var(--text-secondary);
    border-color: var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(8px);
}
.btn-outline-light:hover {
    background: rgba(47, 109, 255, 0.1);
    border-color: var(--c-blue);
    color: var(--text-primary);
}
.btn-link { color: var(--c-blue-light); }
.btn-link:hover { color: var(--c-gold); }

.btn-sm { padding: 6px 12px; font-size: .82rem; }

/* ---------------- 13. Tables ---------------- */
.table {
    color: var(--text-primary);
    border-color: var(--glass-border);
    margin-bottom: 0;
    font-size: .92rem;
}
.table > :not(caption) > * > * {
    background-color: transparent !important;
    border-bottom-color: var(--glass-border);
    padding: 14px 20px;
    color: inherit;
}
.table thead th {
    color: var(--text-muted);
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    border-bottom: 1px solid var(--glass-border) !important;
    background: rgba(255, 255, 255, 0.02) !important;
}
.table tbody tr {
    transition: background .15s ease;
}
.table tbody tr:hover > * {
    background: rgba(47, 109, 255, 0.05) !important;
}

/* ---------------- 14. Badges ---------------- */
.badge {
    font-weight: 600;
    padding: 5px 11px;
    border-radius: var(--radius-pill);
    font-size: .76rem;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    font-family: 'Manrope', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.badge i { font-size: .85em; }

.badge-active   { background: rgba(52, 211, 153, 0.15);  color: var(--c-green);     border-color: rgba(52, 211, 153, 0.3); }
.badge-phishing { background: rgba(248, 113, 113, 0.15); color: var(--c-red);       border-color: rgba(248, 113, 113, 0.3); }
.badge-pending  { background: rgba(250, 204, 21, 0.15);  color: var(--c-yellow);    border-color: rgba(250, 204, 21, 0.3); }
.badge-invalid  { background: rgba(248, 113, 113, 0.15); color: var(--c-red);       border-color: rgba(248, 113, 113, 0.3); }
.badge-passive  { background: rgba(122, 130, 173, 0.18); color: var(--text-muted);  border-color: rgba(122, 130, 173, 0.25); }
.badge-info     { background: rgba(103, 232, 249, 0.12); color: var(--c-cyan);      border-color: rgba(103, 232, 249, 0.25); }

/* ---------------- 15. Modals (Glass) ---------------- */
.modal { z-index: 1060; }
.modal-backdrop { z-index: 1055; }
.modal-backdrop.show { opacity: 0.4; }    /* no blur — was blocking interactivity */

.modal-dialog { z-index: 1061; position: relative; }

.modal-content {
    background: #ffffff;
    border: 1px solid var(--glass-border-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 80px rgba(22, 44, 96, 0.25),
                0 8px 24px rgba(22, 44, 96, 0.1);
    color: var(--text-primary);
    position: relative;
    z-index: 1062;
}
.modal-content::before {
    content: "";
    position: absolute;
    top: 0; left: 15%; right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(47, 109, 255, 0.3), transparent);
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    pointer-events: none;          /* don't swallow clicks */
}
.modal-header {
    border-bottom: 1px solid var(--glass-border);
    padding: 18px 22px;
}
.modal-footer {
    border-top: 1px solid var(--glass-border);
    padding: 16px 22px;
}
.modal-title {
    font-weight: 600;
    font-size: 1.08rem;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}
.btn-close {
    opacity: .55;
    transition: opacity .2s, transform .2s;
}
.btn-close:hover { opacity: 1; transform: rotate(90deg); }

/* ---------------- 16. Alerts ---------------- */
.alert {
    border-radius: var(--radius);
    border: 1px solid transparent;
    padding: 14px 18px;
    font-size: .92rem;
    line-height: 1.55;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.alert strong { color: inherit; font-weight: 700; }
.alert code   { background: rgba(0,0,0,0.06); color: inherit; }
.alert .form-text { color: inherit; opacity: 0.85; }
.alert ol, .alert ul { margin-bottom: 0; padding-left: 1.2rem; }

.alert-info {
    background: rgba(47, 109, 255, 0.07);
    border-color: rgba(47, 109, 255, 0.32);
    color: #1546b8;
}
.alert-warning {
    background: rgba(245, 158, 11, 0.10);
    border-color: rgba(245, 158, 11, 0.38);
    color: #854008;
}
.alert-danger {
    background: rgba(239, 71, 97, 0.09);
    border-color: rgba(239, 71, 97, 0.35);
    color: #a01730;
}
.alert-success {
    background: rgba(22, 178, 112, 0.09);
    border-color: rgba(22, 178, 112, 0.35);
    color: #0a6b40;
}

/* ---------------- 17. Toast (animated success) ---------------- */
.cfg-toasts {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
}
.cfg-toast {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border-strong);
    border-radius: var(--radius);
    padding: 14px 18px;
    box-shadow: var(--shadow-glass);
    font-size: .92rem;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    animation: toast-slide .35s cubic-bezier(.4, 0, .2, 1);
    position: relative;
    overflow: hidden;
}
.cfg-toast::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
}
.cfg-toast > i {
    font-size: 1.25rem;
    margin-top: 1px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    animation: tick-pop .55s cubic-bezier(.34, 1.56, .64, 1);
}
.cfg-toast.ok   { color: var(--text-primary); }
.cfg-toast.ok::before  { background: var(--grad-green); }
.cfg-toast.ok > i  {
    color: var(--c-green);
}
/* Gold ring expanding around success tick */
.cfg-toast.ok > i::after {
    content: "";
    position: absolute;
    inset: -6px;
    border: 2px solid var(--c-gold);
    border-radius: 50%;
    animation: ring-expand 1.1s ease-out backwards;
    pointer-events: none;
}

.cfg-toast.err::before { background: var(--grad-red); }
.cfg-toast.err > i { color: var(--c-red); }
.cfg-toast.info::before { background: var(--grad-blue); }
.cfg-toast.info > i { color: var(--c-blue-light); }

@keyframes toast-slide {
    from { transform: translateX(40px); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
@keyframes tick-pop {
    0%   { transform: scale(0) rotate(-25deg); opacity: 0; }
    60%  { transform: scale(1.25) rotate(0deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes ring-expand {
    0%   { transform: scale(0.5); opacity: 0; }
    35%  { opacity: 1; }
    100% { transform: scale(2.2); opacity: 0; }
}

/* ---------------- 18. Login Screen ---------------- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: transparent;
}
.login-card {
    width: 100%;
    max-width: 440px;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(32px) saturate(180%);
    -webkit-backdrop-filter: blur(32px) saturate(180%);
    border: 1px solid var(--glass-border-strong);
    border-radius: 24px;
    padding: 42px 38px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}
.login-card::before {
    content: "";
    position: absolute;
    top: 0; left: 15%; right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
}
.login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}
.login-logo .badge-icon {
    width: 72px; height: 72px;
    border-radius: 20px;
    background: var(--grad-aurora);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    margin-bottom: 16px;
    box-shadow: 0 12px 32px rgba(47, 109, 255, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
}
.login-logo .badge-icon::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.5), transparent 50%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    padding: 2px;
    pointer-events: none;
}
.login-logo h1 {
    font-size: 1.55rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(90deg, var(--c-blue-light), var(--c-gold-soft));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.025em;
}
.login-logo p {
    color: var(--text-muted);
    font-size: .9rem;
    margin: 6px 0 0;
}

/* ---------------- 19. Install Page ---------------- */
.install-page { background: transparent; min-height: 100vh; position: relative; }
.install-logo {
    width: 80px; height: 80px;
    border-radius: 22px;
    background: var(--grad-aurora);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    color: #fff;
    box-shadow: 0 16px 40px rgba(47, 109, 255, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.install-page pre {
    background: rgba(31, 26, 20, 0.92);
    color: #f5e3bd;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: .82rem;
    border: 1px solid var(--glass-border);
}
pre {
    background: rgba(31, 26, 20, 0.92);
    color: #f5e3bd;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: .85rem;
    border: 1px solid var(--glass-border);
}

/* ---------------- 20. Empty States ---------------- */
.empty-state {
    text-align: center;
    padding: 90px 24px;
    color: var(--text-muted);
}
.empty-state .icon-wrap {
    width: 92px; height: 92px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    color: var(--c-blue-light);
    margin-bottom: 20px;
    box-shadow: var(--shadow-glass);
    animation: float-up 4s ease-in-out infinite;
}
.empty-state h5 {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 600;
    font-family: 'Bricolage Grotesque', sans-serif;
}
@keyframes float-up {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

/* ---------------- 21. CF Tabs ---------------- */
.cf-tabs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--glass-border);
}
.cf-tab a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-size: .93rem;
    font-weight: 600;
    font-family: 'Bricolage Grotesque', sans-serif;
    letter-spacing: -0.005em;
    transition: all .2s ease;
}
.cf-tab a:hover { color: var(--text-primary); }
.cf-tab a.active {
    color: var(--c-blue-light);
    border-bottom-color: var(--c-blue);
    text-shadow: 0 0 24px rgba(47, 109, 255, 0.4);
}
.cf-tab-content {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

/* ---------------- 22. CF Shield + Avatars ---------------- */
.cf-avatar {
    width: 84px; height: 84px;
    border-radius: 50%;
    background: var(--grad-aurora);
    color: #fff;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 32px rgba(47, 109, 255, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.cf-avatar-sm {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--grad-purple);
    color: #fff;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: .9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.cf-shield {
    width: 96px; height: 96px;
    border-radius: 26px;
    background: var(--grad-red);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 20px;
    box-shadow: 0 16px 40px rgba(248, 113, 113, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: shield-glow 3s ease-in-out infinite;
}
@keyframes shield-glow {
    0%, 100% { box-shadow: 0 16px 40px rgba(248, 113, 113, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
    50%      { box-shadow: 0 16px 60px rgba(248, 113, 113, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
}
.empty-state-lg { padding: 100px 24px; }
.empty-state-lg h5 { font-size: 1.1rem; }

/* ---------------- 23. Monitor pulse ---------------- */
.mon-pulse {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--text-muted);
    display: inline-block;
    transition: all .3s ease;
}
.mon-pulse.active {
    background: var(--c-green);
    box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.2),
                0 0 16px var(--c-green);
    animation: mon-pulse 1s ease;
}
@keyframes mon-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.4); }
}

/* ---------------- 24. DataTables ---------------- */
.dataTables_wrapper { color: var(--text-primary); }
.cf-dt-top, .cf-dt-bot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    gap: 12px;
    flex-wrap: wrap;
}
.cf-dt-top { border-bottom: 1px solid var(--glass-border); }
.cf-dt-bot { border-top: 1px solid var(--glass-border); }
.cf-dt-search input,
.cf-dt-len select {
    background: var(--glass-bg-input) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    padding: 7px 12px !important;
    font-size: .88rem;
}
.cf-dt-search label, .cf-dt-len label {
    color: var(--text-muted);
    font-size: .84rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.cf-dt-info { color: var(--text-muted); font-size: .84rem; }

/* Sort arrows via Bootstrap Icons */
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    background-image: none !important;
    position: relative;
    cursor: pointer;
    padding-right: 28px !important;
}
table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::after {
    font-family: "bootstrap-icons";
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    font-size: .85rem;
    opacity: .35;
    transition: opacity .15s, color .15s;
}
table.dataTable thead .sorting::after      { content: "\f570"; }
table.dataTable thead .sorting_asc::after  { content: "\f235"; opacity: 1; color: var(--c-blue-light); }
table.dataTable thead .sorting_desc::after { content: "\f229"; opacity: 1; color: var(--c-blue-light); }

.dataTables_wrapper .pagination { margin: 0; gap: 5px; }
.dataTables_wrapper .page-link {
    background: transparent !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-secondary) !important;
    border-radius: 8px !important;
    padding: 6px 12px;
    font-size: .85rem;
    font-weight: 500;
    transition: all .15s ease;
}
.dataTables_wrapper .page-link:hover {
    background: rgba(47, 109, 255, 0.1) !important;
    color: var(--text-primary) !important;
    border-color: var(--c-blue) !important;
}
.dataTables_wrapper .page-item.active .page-link {
    background: var(--grad-blue) !important;
    border-color: var(--c-blue) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(47, 109, 255, 0.4);
}
.dataTables_wrapper .page-item.disabled .page-link {
    background: transparent !important;
    color: var(--text-muted) !important;
    opacity: .4;
}

/* ---------------- 25. Misc ---------------- */
.divider {
    height: 1px;
    background: var(--glass-border);
    margin: 20px 0;
}
.kbd {
    background: rgba(47, 109, 255, 0.10);
    border: 1px solid var(--glass-border);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: .78rem;
    color: var(--c-blue-deep);
    font-family: ui-monospace, Menlo, monospace;
    font-weight: 500;
}

/* Spinners */
.spinner-border {
    border-color: var(--c-blue-light);
    border-right-color: transparent;
}

/* Input group buttons */
.input-group .btn {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.input-group .form-control {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important;
}

/* ============================================================
   26. MOBILE TOPBAR + OFFCANVAS SIDEBAR
   ============================================================ */

/* Mobile topbar — only visible below lg (<992px) */
.mobile-topbar {
    display: none;
    position: sticky;
    top: 0;
    z-index: 1020;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid var(--glass-border);
    /* iOS safe area */
    padding-top: calc(12px + env(safe-area-inset-top));
    padding-left: calc(16px + env(safe-area-inset-left));
    padding-right: calc(16px + env(safe-area-inset-right));
}
.mobile-topbar .hamburger,
.mobile-topbar .mobile-logout {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: 10px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: background .15s, border-color .15s;
    /* iOS tap target */
    -webkit-tap-highlight-color: transparent;
}
.mobile-topbar .hamburger:active,
.mobile-topbar .mobile-logout:active {
    background: rgba(47, 109, 255, 0.08);
    border-color: var(--c-blue);
}
.mobile-topbar .mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    background: linear-gradient(90deg, var(--c-blue-deep), var(--c-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}
.mobile-topbar .mobile-brand i {
    -webkit-text-fill-color: var(--c-blue);
    font-size: 1.35rem;
}
.mobile-topbar .mobile-logout {
    color: var(--c-red);
    border-color: rgba(239, 71, 97, 0.25);
}

/* Offcanvas-lg behavior — Bootstrap handles class swap */
@media (max-width: 991.98px) {
    .mobile-topbar { display: flex; }

    /* Sidebar becomes drawer */
    .sidebar.offcanvas-lg {
        position: fixed;
        top: 0; left: 0;
        height: 100vh;
        width: 280px !important;
        max-width: 85vw;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform .3s cubic-bezier(.4, 0, .2, 1);
        visibility: hidden;
        box-shadow: 4px 0 32px rgba(22, 44, 96, 0.18);
    }
    .sidebar.offcanvas-lg.showing,
    .sidebar.offcanvas-lg.show {
        transform: translateX(0);
        visibility: visible;
    }
    .sidebar.offcanvas-lg.hiding {
        transform: translateX(-100%);
    }

    /* Drawer header tweaks */
    .sidebar .offcanvas-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 18px 18px 12px;
    }

    /* Body adjustments for mobile */
    .app-layout { display: block; }
    .app-main {
        padding: 18px 16px 60px;
        padding-bottom: calc(60px + env(safe-area-inset-bottom));
    }

    /* Larger touch targets */
    .sidebar-nav a {
        padding: 14px 16px;
        font-size: 1rem;
    }
    .sidebar-nav a i { font-size: 1.2rem; }

    /* Page header more compact */
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        margin-bottom: 20px;
    }
    .page-header h1 { font-size: 1.45rem; }

    /* Stat cards — single column on phone */
    .stat-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-card { padding: 18px 18px; }
    .stat-card .num { font-size: 1.9rem; }

    /* Card body padding */
    .card-body { padding: 16px; }
    .card-header { padding: 14px 16px; font-size: .98rem; }

    /* Form controls — bigger touch */
    .form-control, .form-select { padding: 12px 14px; font-size: 16px; }  /* 16px stops iOS zoom on focus */
    .btn { padding: 11px 18px; }

    /* Modal: full width on phone */
    .modal-dialog { margin: 12px; }
    .modal-content { border-radius: 18px; }

    /* DataTables responsive — let it scroll horizontally */
    .dataTables_wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* Tab strip scrollable */
    .cf-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
    .cf-tab a { white-space: nowrap; padding: 12px 14px; font-size: .88rem; }
}

/* Very small phones (≤480px) */
@media (max-width: 480px) {
    .stat-row { grid-template-columns: 1fr; }
    .page-header h1 { font-size: 1.3rem; }
    .login-card { padding: 28px 22px; border-radius: 18px; }
    .mobile-topbar { padding-left: 12px; padding-right: 12px; }
    .mobile-topbar .hamburger,
    .mobile-topbar .mobile-logout { width: 40px; height: 40px; font-size: 1.2rem; }
}

/* iOS specific — prevent body scroll lock issues with offcanvas */
body.offcanvas-open { overflow: hidden; }

/* Android Chrome address bar — viewport height fix */
.login-page { min-height: 100vh; min-height: 100dvh; }

/* ============================================================
   27. CF token guide (collapse inside modal)
   ============================================================ */
.cf-help-toggle {
    color: var(--c-blue);
    font-weight: 500;
    cursor: pointer;
    transition: color .15s;
}
.cf-help-toggle:hover { color: var(--c-blue-deep); }
.cf-help-toggle i { font-size: .95rem; }
.cf-help-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
    transition: transform .25s;
}

.cf-perm-table {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: 4px;
    overflow-x: auto;
}
.cf-perm-table table { color: inherit; margin: 0; }
.cf-perm-table thead th {
    background: rgba(47, 109, 255, 0.08);
    color: var(--c-blue-deep);
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    font-size: .76rem;
    padding: 6px 10px;
    border: none !important;
}
.cf-perm-table tbody td {
    padding: 6px 10px;
    border-bottom: 1px solid rgba(0,0,0,0.06) !important;
    background: transparent !important;
    color: inherit;
}
.cf-perm-table tbody tr:last-child td { border-bottom: none !important; }

/* DataTables empty state — when no records exist */
table.dataTable.no-footer .dataTables_empty,
table.dataTable td.dataTables_empty {
    padding: 60px 24px !important;
    color: var(--text-muted);
    font-size: 1rem;
    text-align: center;
    background: transparent !important;
}
table.dataTable td.dataTables_empty::before {
    content: "\F4FB";                       /* bi-database */
    font-family: "bootstrap-icons";
    display: block;
    font-size: 2.4rem;
    color: var(--c-blue-light);
    opacity: 0.5;
    margin-bottom: 10px;
    line-height: 1;
}

/* Alert içindeki <code>'lar daha okunaklı */
.alert code {
    font-size: .82rem;
    padding: 2px 6px;
    background: rgba(0,0,0,0.06);
    color: inherit;
    border-radius: 4px;
    word-break: break-word;
}
