/* ============================================================
   CUSTOM THEME - Deep Navy Glassmorphism
   ============================================================
   
   COLOR REFERENCE GUIDE - तुम्हारे सभी रंग यहाँ हैं:
   
   ❌ COLORS TO CHANGE:
   -->  --dd-primary: #6366f1        [buttons, borders, accents, glows]
   -->  --dd-accent: #8b5cf6         [gradient backgrounds]
   -->  --dd-success: #10b981        [green - success state]
   -->  --dd-warning: #eab308        [yellow - warning state]
   -->  --dd-danger: #f43f5e         [pink - error state]
   -->  --dd-info: #d40606           [red - info state]
   
   🎨 HARDCODED COLORS IN CSS:
   -->  rgba(99, 102, 241, ...)      [Primary (indigo) with transparency]
            0.35 = selection bg, 0.2 = sidebar active, 0.15 = glow, 0.12 = borders, 
            0.1 = hover, 0.08 = table header, 0.06 = card header, 0.3 = scrollbar
   -->  rgba(139, 92, 246, ...)      [Accent (violet) with transparency]
            0.15 = sidebar active gradient
   -->  rgba(16, 185, 129, ...)      [Success (green) with transparency]
            0.15 = success icon bg, 0.25 = alert border, 0.12 = alert bg
   -->  rgba(234, 179, 8, ...)       [Warning (yellow) with transparency]
            0.15 = warning icon bg, 0.25 = alert border, 0.12 = alert bg
   -->  rgba(244, 63, 94, ...)       [Danger (pink) with transparency]
            0.25 = danger button shadow, 0.35 = danger hover, 0.15 = danger icon bg
   -->  rgba(6, 182, 212, ...)       [Info/cyan with transparency]
            0.15 = info icon bg
   -->  rgba(255, 255, 255, ...)     [White with transparency for glass effect]
            0.04 = form input bg, 0.06 = border, 0.08 = hover
   -->  rgba(0, 0, 0, ...)           [Black with transparency for shadows]
            0.3 = shadow, 0.25 = shadow, 0.2 = card shadow, 0.4 = dropdown
   -->  #0d1526                      [Sidebar gradient end color (darker navy)]
   -->  #131b2e                      [Navbar gradient end color]
   -->  #e11d48                      [Danger hover color]
   -->  #f59e0b                      [Warning hover color]
   -->  #0891b2                      [Info hover color (cyan)]
   -->  #059669                      [Success hover color]
   -->  #22d3ee                      [Link hover color (cyan)]
   
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* ========== BACKGROUND COLORS ========== */
    --dd-body: #0b1121;                    /* Main page background (dark navy) - Page ka pura background */
    --dd-surface: #111827;                 /* Cards, containers, modals (dark gray) - Cards aur boxes */ 
    --dd-surface-2: #1e293b;               /* Alt surfaces, form inputs (lighter gray) - Forms ke liye */
    --dd-sidebar: #0f172a;                 /* Left sidebar background (very dark) - Sidebar menu */
    --dd-navbar: #0f172a;                  /* Top navbar background (very dark) - Navbar */
    
    /* ========== PRIMARY & ACCENT COLORS ========== */
    --dd-primary: #6366f1;                 /* Main brand color (indigo) - Buttons, links, highlights */
    --dd-primary-hover: #4f46e5;           /* Primary hover state (darker indigo) - Jab hover karo */
    --dd-accent: #8b5cf6;                  /* Accent color (violet) - Gradients aur special effects */
    --dd-secondary: #ffffff;               /* Secondary text/links (white) - Links ke liye */
    
    /* ========== STATUS COLORS ========== */
    --dd-success: #10b981;                 /* Success/positive state (green) - Success messages */
    --dd-warning: #eab308;                 /* Warning state (yellow) - Warning alerts */
    --dd-danger: #f43f5e;                  /* Error/danger state (pink) - Error messages */
    --dd-info: #d40606;                    /* Info state (red) - Info badges */
    
    /* ========== TEXT COLORS ========== */
    --dd-text: #e2e8f0;                    /* Main text color (light gray) - Normal text */
    --dd-text-muted: #94a3b8;              /* Muted/secondary text (medium gray) - Dim text */
    
    /* ========== BORDERS & EFFECTS ========== */
    --dd-border: rgba(99, 102, 241, 0.12); /* Primary border + transparency (indigo tint) - Card borders */
    --dd-border-light: rgba(171, 2, 2, 0.537); /* Light border (white transparency) - Subtle lines */
    --dd-glass: rgba(17, 24, 39, 0.75);    /* Glassmorphism effect (translucent) - Glass effect */
    --dd-glass-border: rgba(99, 102, 241, 0.18); /* Border on hover (indigo glow) - Hover effect */
    
    /* ========== SPACING & EFFECTS ========== */
    --dd-radius: 14px;                     /* Large border radius - Big buttons, cards */
    --dd-radius-sm: 10px;                  /* Small border radius - Small buttons, inputs */
    --dd-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); /* Main shadow effect - Card shadows */
    --dd-glow: 0 0 20px rgba(99, 102, 241, 0.15); /* Glow effect (indigo) - Hover glow */
}

/* ---- Global ---- */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    background-color: var(--dd-body) !important;
    color: var(--dd-text);
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: rgba(99, 102, 241, 0.35); /* Primary (indigo) selection highlight */
    color: #fff;
}

/* ---- Background glow accents ---- */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.07;
    pointer-events: none;
    z-index: 0;
}
body::before {
    width: 500px; height: 500px;
    top: -150px; left: -150px;
    background: var(--dd-primary);
}
body::after {
    width: 400px; height: 400px;
    bottom: -100px; right: -100px;
    background: var(--dd-accent);
}

/* ---- Card & Surface overrides ---- */
.bg-dark,
.card,
.sidebar,
.navbar {
    background-color: var(--dd-surface) !important;
}

.card {
    border: 1px solid var(--dd-border) !important;
    border-radius: var(--dd-radius) !important;
    box-shadow: var(--dd-shadow);
    backdrop-filter: blur(10px);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    border-color: var(--dd-glass-border);
    box-shadow: var(--dd-shadow), var(--dd-glow);
}

.card-header {
    background: rgba(99, 102, 241, 0.06) !important; /* Card header bg - very light indigo */
    border-bottom: 1px solid var(--dd-border) !important;
    border-radius: var(--dd-radius) var(--dd-radius) 0 0 !important;
}

.card-body { position: relative; z-index: 1; }

/* ---- Layout ---- */
@media (min-width: 991.98px) {
    main { padding-left: 260px; }
}

@media (max-width: 991.98px) {
    .sidebar { width: 100%; }
}

@media only screen and (max-width: 767px) {
    .navbar-brand { font-size: calc(15px + 0.390625vw); }
}

@media (min-width: 1200px) {
    .h3, h3 { font-size: 1.4rem; }
}

/* ---- Sidebar ---- */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    padding: 62px 0 0;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
    width: 260px;
    z-index: 600;
    background: linear-gradient(180deg, var(--dd-sidebar) 0%, #0d1526 100%) !important; /* Sidebar gradient - darker navy at bottom */
    border-right: 1px solid var(--dd-border);
}

.sidebar .list-group-item {
    background: transparent !important;
    border: none !important;
    color: var(--dd-text-muted) !important;
    padding: 0.65rem 1rem;
    margin: 2px 0;
    border-radius: var(--dd-radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    letter-spacing: 0.01em;
}

.sidebar .list-group-item:hover {
    background: rgba(99, 102, 241, 0.08) !important; /* Sidebar item hover - 8% indigo */
    color: var(--dd-text) !important;
    transform: translateX(4px);
}

.sidebar .list-group-item.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.15)) !important; /* Active item - indigo to violet gradient */
    color: #fff !important;
    border-radius: var(--dd-radius-sm);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2); /* Active item shadow - indigo glow */
    border-left: 3px solid var(--dd-primary) !important;
}

.sidebar .list-group-item i {
    width: 22px;
    text-align: center;
    font-size: 0.95rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.sidebar .list-group-item:hover i,
.sidebar .list-group-item.active i {
    opacity: 1;
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 62px);
    padding-top: 0.5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar-sticky::-webkit-scrollbar {
    width: 4px;
}
.sidebar-sticky::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-sticky::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3); /* Scrollbar - 30% indigo */
    border-radius: 4px;
}

/* ---- Navbar ---- */
.navbar,
#main-navbar {
    background: linear-gradient(135deg, var(--dd-navbar), #131b2e) !important; /* Navbar gradient - darker navy at right */
    border-bottom: 1px solid var(--dd-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    min-height: 62px;
}

.navbar-brand {
    font-weight: 700 !important;
    letter-spacing: -0.02em;
    font-size: 1.2rem !important;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand i {
    background: linear-gradient(135deg, var(--dd-primary), var(--dd-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.3rem;
}

.nav-link, .dropdown-item { transition: color 0.2s; }
.dropdown-menu {
    background: var(--dd-surface) !important;
    border: 1px solid var(--dd-border) !important;
    border-radius: var(--dd-radius-sm) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4) !important;
}
.dropdown-item { color: var(--dd-text) !important; }
.dropdown-item:hover {
    background: rgba(99, 102, 241, 0.1) !important; /* Dropdown hover - 10% indigo */
    color: #fff !important;
}

/* ---- Links ---- */
a:not(.sidenav-link):not(.btn):not(.dropdown-item):not(.nav-link):not(.navbar-brand):not(.page-link):not(.carousel-control-prev):not(.carousel-control-next) {
    color: var(--dd-secondary);
    transition: color 0.2s;
}

a:not(.sidenav-link):not(.btn):not(.dropdown-item):not(.nav-link):not(.navbar-brand):not(.page-link):not(.carousel-control-prev):not(.carousel-control-next):hover {
    color: #22d3ee; /* Link hover color - cyan */
}

/* ---- Forms ---- */
.form-outline .form-control {
    background: rgba(255, 255, 255, 0.04) !important; /* Form input bg - 4% white transparency */
    color: var(--dd-text) !important;
    border-color: var(--dd-border) !important;
    border-radius: var(--dd-radius-sm);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-outline .form-control:focus {
    border-color: var(--dd-primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important; /* Form focus glow - indigo */
}

.form-label {
    color: var(--dd-text-muted) !important;
}

.form-control,
.form-select,
.select,
textarea.form-control {
    background: rgba(255, 255, 255, 0.04) !important; /* Form fields - 4% white */
    color: var(--dd-text) !important;
    border: 1px solid var(--dd-border) !important;
    border-radius: var(--dd-radius-sm) !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--dd-primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important; /* Form focus shadow */
}

/* ---- Buttons ---- */
.btn-primary {
    background: linear-gradient(135deg, var(--dd-primary), var(--dd-accent)) !important; /* Indigo to violet gradient */
    border: none !important;
    color: #fff !important;
    font-weight: 600;
    border-radius: var(--dd-radius-sm) !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3); /* Indigo button shadow */
    transition: all 0.25s ease;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4); /* Button hover glow */
    filter: brightness(1.1);
}

.btn-danger {
    background: linear-gradient(135deg, var(--dd-danger), #e11d48) !important; /* Pink to red gradient */
    border: none !important;
    font-weight: 600;
    border-radius: var(--dd-radius-sm) !important;
    box-shadow: 0 4px 14px rgba(244, 63, 94, 0.25); /* Pink shadow */
}
.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.35); /* Danger hover glow */
}

.btn-warning {
    background: linear-gradient(135deg, var(--dd-warning), #f59e0b) !important; /* Yellow gradient */
    border: none !important;
    color: #0f172a !important;
    font-weight: 600;
    border-radius: var(--dd-radius-sm) !important;
}

.btn-info {
    background: linear-gradient(135deg, var(--dd-info), #0891b2) !important; /* Red to cyan gradient */
    border: none !important;
    font-weight: 600;
    border-radius: var(--dd-radius-sm) !important;
}

.btn-success {
    background: linear-gradient(135deg, var(--dd-success), #059669) !important; /* Green gradient */
    border: none !important;
    font-weight: 600;
    border-radius: var(--dd-radius-sm) !important;
}

.btn-light {
    background: var(--dd-surface-2) !important;
    color: var(--dd-text) !important;
    border: 1px solid var(--dd-border) !important;
    font-weight: 500;
    border-radius: var(--dd-radius-sm) !important;
}
.btn-light:hover {
    background: rgba(99, 102, 241, 0.1) !important; /* Light button hover - indigo */
    border-color: var(--dd-glass-border) !important;
}

/* ---- Embed button (specific styling) ---- */
.btn-embed.btn-outline-primary {
    /* explicit blue outline */
    border: 1.5px solid #0d6efd !important; /* bootstrap primary blue */
    color: #0d6efd !important;
    background: transparent !important;
    box-shadow: none !important;
}
.btn-embed.btn-outline-primary:hover {
    background: rgba(13, 110, 253, 0.06) !important;
    border-color: #0b5ed7 !important;
}
.btn-embed.btn-primary {
    /* filled blue state */
    background: linear-gradient(135deg, #0d6efd, #0b5ed7) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(13, 110, 253, 0.3);
}
.btn-embed.btn-primary:hover {
    filter: brightness(1.05);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
}

/* ---- Tables ---- */
.table {
    color: var(--dd-text) !important;
    --bs-table-bg: transparent;
    --mdb-table-bg: transparent;
}
.table thead th {
    background: rgba(99, 102, 241, 0.08) !important;
    color: var(--dd-text-muted) !important;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--dd-border) !important;
    padding: 0.75rem 0.6rem;
}
.table tbody tr {
    border-bottom: 1px solid var(--dd-border-light);
    transition: background 0.2s;
}
.table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05) !important;
}
.table td {
    padding: 0.65rem 0.6rem;
    font-size: 0.9rem;
    vertical-align: middle;
}

/* ---- Modals ---- */
.modal-content {
    background: var(--dd-surface) !important;
    border: 1px solid var(--dd-border) !important;
    border-radius: var(--dd-radius) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.modal-header {
    border-bottom: 1px solid var(--dd-border) !important;
}
.modal-footer {
    border-top: 1px solid var(--dd-border) !important;
}
.modal-title { color: var(--dd-text) !important; }
.btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

/* ---- Alerts ---- */
.alert-primary {
    background: rgba(99, 102, 241, 0.12) !important;
    border-color: rgba(99, 102, 241, 0.25) !important;
    color: #a5b4fc !important;
    border-radius: var(--dd-radius-sm) !important;
}
.alert-success {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.25) !important;
    color: #6ee7b7 !important;
    border-radius: var(--dd-radius-sm) !important;
}
.alert-danger {
    background: rgba(244, 63, 94, 0.12) !important;
    border-color: rgba(244, 63, 94, 0.25) !important;
    color: #fda4af !important;
    border-radius: var(--dd-radius-sm) !important;
}
.alert-warning {
    background: rgba(234, 179, 8, 0.12) !important;
    border-color: rgba(234, 179, 8, 0.25) !important;
    color: #fde047 !important;
    border-radius: var(--dd-radius-sm) !important;
}

/* ---- Pagination ---- */
.pagination .page-link {
    background: var(--dd-surface) !important;
    border-color: var(--dd-border) !important;
    color: var(--dd-text-muted) !important;
    min-width: 44px;
    text-align: center;
    border-radius: 8px !important;
    margin: 0 2px;
    transition: all 0.2s;
}
.pagination .page-link:hover,
.pagination .active .page-link {
    background: var(--dd-primary) !important;
    border-color: rgba(255, 255, 255, 0.24) !important;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.pagination .active .page-link {
    font-weight: 700;
}
.pagination .page-link:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14);
}
.pagination .disabled .page-link {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: var(--dd-border) !important;
    color: var(--dd-text-muted) !important;
    box-shadow: none;
}

/* ---- Floating selection actions ---- */
.selection-menu {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    z-index: 1080;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
    width: min(100%, 720px);
    max-width: calc(100vw - 1.5rem);
    padding: 0.85rem 1rem;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.45);
    backdrop-filter: blur(16px);
}
.selection-menu .btn {
    margin: 0 !important;
}
.selection-menu .selection-action {
    width: 52px;
    height: 52px;
    padding: 0 !important;
    border-radius: 14px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}
.selection-menu .selection-action i {
    line-height: 1;
}
body.has-selection-menu {
    padding-bottom: 118px;
}

.navbar-profile-trigger {
    padding: 0.25rem 0.35rem !important;
}
.navbar-profile-avatar {
    width: 38px;
    height: 38px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.28);
}
.navbar-app-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-left: 0.85rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

@media (max-width: 576px) {
    .selection-menu {
        bottom: 14px;
        padding: 0.75rem;
        border-radius: 16px;
        gap: 0.55rem;
    }
    .selection-menu .selection-action {
        width: 48px;
        height: 48px;
        flex: 0 0 auto;
    }
    .navbar-app-brand {
        margin-left: 0.55rem;
        font-size: 0.95rem;
        max-width: calc(100vw - 150px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* ---- Scrollbar (global) ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--dd-body); }
::-webkit-scrollbar-thumb { background: rgba(99, 102, 241, 0.3); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99, 102, 241, 0.5); }

/* ---- hr ---- */
hr { border-color: var(--dd-border) !important; opacity: 1; }

/* ---- List group ---- */
.list-group-item {
    background: transparent !important;
    border-color: var(--dd-border) !important;
    color: var(--dd-text) !important;
}

/* ---- Stat cards (dashboard/status) ---- */
.stat-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--dd-radius) !important;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    border-radius: 50%;
    filter: blur(30px);
    opacity: 0.15;
    pointer-events: none;
}
.stat-card.stat-success::before { background: var(--dd-success); }
.stat-card.stat-warning::before { background: var(--dd-warning); }
.stat-card.stat-danger::before { background: var(--dd-danger); }
.stat-card.stat-primary::before { background: var(--dd-primary); }
.stat-card.stat-info::before { background: var(--dd-info); }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.stat-icon.si-success { background: rgba(16, 185, 129, 0.15); color: var(--dd-success); }
.stat-icon.si-warning { background: rgba(234, 179, 8, 0.15); color: var(--dd-warning); }
.stat-icon.si-danger { background: rgba(244, 63, 94, 0.15); color: var(--dd-danger); }
.stat-icon.si-primary { background: rgba(99, 102, 241, 0.15); color: var(--dd-primary); }
.stat-icon.si-info { background: rgba(6, 182, 212, 0.15); color: var(--dd-info); }

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--dd-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ---- Feature card styling ---- */
.feature-card {
    border: 1px solid var(--dd-border) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15);
    border-color: var(--dd-glass-border) !important;
}

.feature-card-body {
    text-align: center !important;
    padding: 2rem 1.5rem !important;
}

.feature-icon-wrap {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.feature-icon-wrap.fi-primary { background: rgba(99, 102, 241, 0.12); }
.feature-icon-wrap.fi-danger { background: rgba(244, 63, 94, 0.12); }
.feature-icon-wrap.fi-info { background: rgba(6, 182, 212, 0.12); }
.feature-icon-wrap.fi-success { background: rgba(16, 185, 129, 0.12); }
.feature-icon-wrap.fi-warning { background: rgba(234, 179, 8, 0.12); }
.feature-icon-wrap.fi-accent { background: rgba(139, 92, 246, 0.12); }

.feature-icon {
    font-size: 2.2rem !important;
    display: inline-block !important;
    text-align: center;
    line-height: 1;
}

.feature-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--dd-text);
    text-align: center;
    letter-spacing: -0.01em;
}

.feature-desc {
    font-size: 0.88rem;
    color: var(--dd-text-muted);
    line-height: 1.6;
    max-width: 360px;
    margin: 0 auto;
    text-align: center;
}

/* New feature accent colors */
.text-purple { color: var(--dd-accent) !important; }
.text-primary { color: var(--dd-primary) !important; }
.text-danger { color: var(--dd-danger) !important; }
.text-success { color: var(--dd-success) !important; }
.text-warning { color: var(--dd-warning) !important; }
.text-info { color: var(--dd-info) !important; }

@media (max-width: 576px) {
    .feature-card-body { padding: 1.5rem 1rem !important; }
    .feature-icon-wrap { width: 64px; height: 64px; border-radius: 16px; }
    .feature-icon { font-size: 1.8rem !important; }
    .feature-title { font-size: 1rem; }
    .feature-desc { font-size: 0.82rem; }
}

/* ---- Login page dark form ---- */
.login-card {
    background: var(--dd-surface) !important;
    border: 1px solid var(--dd-border) !important;
    border-radius: var(--dd-radius) !important;
    box-shadow: var(--dd-shadow);
}
.login-card .form-control {
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--dd-text) !important;
    border-color: var(--dd-border) !important;
}
.login-card .form-label {
    color: var(--dd-text-muted) !important;
}
.login-card .form-check-label {
    color: var(--dd-text-muted) !important;
}

/* ---- Setting page styles ---- */
.custom-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}
.custom-switch .custom-toggle { opacity: 0; width: 0; height: 0; }
.custom-switch .custom-slider {
    position: absolute; cursor: pointer; inset: 0;
    background-color: #334155; transition: .3s; border-radius: 34px;
}
.custom-switch .custom-slider:before {
    position: absolute; content: ""; height: 16px; width: 16px;
    left: 2px; bottom: 2px; background: #fff; transition: .3s; border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 0, 0, .15);
}
.custom-switch .custom-toggle:checked + .custom-slider { background: var(--dd-primary); }
.custom-switch .custom-toggle:checked + .custom-slider:before { transform: translateX(16px); }

.setting-toggles {
    display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.setting-toggle-item {
    display: flex; align-items: center; gap: 8px;
    background: rgba(99, 102, 241, 0.06); border: 1px solid var(--dd-border);
    border-radius: var(--dd-radius-sm); padding: 6px 12px; font-size: .82rem;
}
.toggle-label { white-space: nowrap; color: var(--dd-text-muted); }

.srv-card {
    background: rgba(99, 102, 241, 0.04); border: 1px solid var(--dd-border);
    border-radius: var(--dd-radius-sm); padding: 10px 12px; margin-bottom: 8px;
    transition: border-color 0.2s;
}
.srv-card:hover { border-color: var(--dd-glass-border); }
.srv-card-top {
    display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.srv-order {
    background: rgba(99, 102, 241, 0.15); border-radius: 6px;
    min-width: 24px; text-align: center; font-weight: 700;
    font-size: .8rem; padding: 2px 6px; flex-shrink: 0;
    color: var(--dd-primary);
}
.srv-name { flex: 1; font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srv-arrows { display: flex; gap: 10px; flex-shrink: 0; font-size: .85rem; }
.srv-card-bottom {
    display: flex; align-items: center; justify-content: space-between;
}

/* ---- Home hero section ---- */
.hero-section {
    padding: 3rem 1.5rem;
    text-align: center;
}
.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--dd-text), var(--dd-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-desc {
    color: var(--dd-text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* ---- Checkbox override ---- */
.form-check-input {
    background-color: var(--dd-surface-2) !important;
    border-color: var(--dd-border) !important;
}
.form-check-input:checked {
    background-color: var(--dd-primary) !important;
    border-color: var(--dd-primary) !important;
}

/* ---- Select (MDB) ---- */
.select-input.form-control {
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--dd-text) !important;
}

/* ---- File/Embed page (public-file) color matching ---- */
.public-file-card {
    background: var(--dd-glass) !important;
    border-color: var(--dd-border) !important;
}
.public-file-header {
    background: rgba(99, 102, 241, 0.06) !important;
}
.public-file-info-item {
    background: rgba(99, 102, 241, 0.06) !important;
    border-color: var(--dd-border) !important;
}

/* ---- Misc ---- */
.text-light { color: var(--dd-text) !important; }
.text-muted { color: var(--dd-text-muted) !important; }
p { color: var(--dd-text); }