/* NBFC Loan Management Admin Panel - Premium Modern Fintech Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    /* Color Palette - Fintech Dark Mode Default */
    --bg-primary: #0a0e17;
    --bg-secondary: #0f172a;
    --bg-card: #141e33;
    --bg-card-hover: #1a2744;
    --bg-surface: #1e293b;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(59, 130, 246, 0.4);

    --primary: #3b82f6;
    --primary-gradient: linear-gradient(135deg, #2563eb, #3b82f6, #60a5fa);
    --accent: #06b6d4;
    --emerald: #10b981;
    --emerald-glow: rgba(16, 185, 129, 0.25);
    --warning: #f59e0b;
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.25);
    --purple: #8b5cf6;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --sidebar-width: 270px;
    --header-height: 70px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.35);
}

[data-theme="light"] {
    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-surface: #e2e8f0;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(59, 130, 246, 0.5);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.5;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6, .brand-font {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
}

/* PRELOADER STYLING */
#nbfc-preloader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: radial-gradient(circle at center, #0f172a 0%, #060911 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#nbfc-preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.preloader-icon-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader-glow-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #3b82f6;
    border-right-color: #06b6d4;
    animation: spinRing 1.2s linear infinite;
}

.preloader-glow-ring.inner {
    inset: 8px;
    border: 2px solid transparent;
    border-bottom-color: #10b981;
    border-left-color: #8b5cf6;
    animation: spinRingReverse 1.5s linear infinite;
}

.preloader-core {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    font-size: 22px;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.preloader-title {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(90deg, #ffffff, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.preloader-sub {
    font-size: 13px;
    color: #64748b;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: -12px;
}

.preloader-bar {
    width: 220px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    margin-top: 25px;
    overflow: hidden;
    position: relative;
}

.preloader-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, #3b82f6, #06b6d4, #10b981);
    border-radius: 99px;
    animation: preloaderProgress 1.4s ease-in-out infinite;
}

@keyframes spinRing {
    to { transform: rotate(360deg); }
}

@keyframes spinRingReverse {
    to { transform: rotate(-360deg); }
}

@keyframes preloaderProgress {
    0% { left: -40%; width: 30%; }
    50% { width: 60%; }
    100% { left: 100%; width: 30%; }
}

/* APP LAYOUT */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.app-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    transition: var(--transition);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}

.brand-logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.brand-text-wrap {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.brand-subtitle {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 14px 12px 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link i {
    font-size: 17px;
    width: 22px;
    text-align: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.nav-link:hover i {
    color: var(--primary);
    transform: scale(1.1);
}

.nav-link.active {
    color: #ffffff;
    background: var(--primary-gradient);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
}

.nav-link.active i {
    color: #ffffff;
}

.nav-badge {
    margin-left: auto;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 99px;
    font-weight: 700;
}

.badge-pulse {
    background: rgba(16, 185, 129, 0.2);
    color: var(--emerald);
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-alert {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.security-status-box {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sec-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.2);
    color: var(--emerald);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.sec-info {
    font-size: 12px;
}

.sec-info strong {
    display: block;
    color: var(--emerald);
    font-size: 12.5px;
}

.sec-info span {
    color: var(--text-muted);
    font-size: 11px;
}

/* MAIN CONTENT */
.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* TOPBAR / HEADER */
.app-topbar {
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 900;
    backdrop-filter: blur(10px);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar-search {
    position: relative;
    width: 320px;
}

.topbar-search input {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 99px;
    padding: 9px 18px 9px 40px;
    font-size: 13.5px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.topbar-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.topbar-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.global-sync-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 99px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--emerald);
}

.global-sync-indicator.sync-off {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--emerald);
    box-shadow: 0 0 10px var(--emerald);
    animation: dotPulse 1.8s infinite;
}

.pulse-dot.dot-off {
    background: var(--danger);
    box-shadow: 0 0 10px var(--danger);
    animation: none;
}

@keyframes dotPulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.icon-btn:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

/* USER PROFILE PILL */
.admin-profile-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 5px 12px 5px 6px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 99px;
    cursor: pointer;
    transition: var(--transition);
}

.admin-profile-pill:hover {
    border-color: var(--primary);
}

.admin-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 13px;
}

.admin-meta {
    display: flex;
    flex-direction: column;
}

.admin-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.admin-role {
    font-size: 11px;
    color: var(--primary);
    font-weight: 500;
}

/* CONTENT CONTAINER */
.page-content {
    padding: 28px;
    flex: 1;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
}

.page-subtitle {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.btn-emerald {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12.5px;
    border-radius: 6px;
}

/* CARDS & GRIDS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 26px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 90px;
    height: 90px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12), transparent 70%);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.6);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--primary); }
.stat-icon.green { background: rgba(16, 185, 129, 0.15); color: var(--emerald); }
.stat-icon.amber { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.15); color: var(--purple); }
.stat-icon.cyan { background: rgba(6, 182, 212, 0.15); color: var(--accent); }

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 4px 0 2px;
    font-family: 'Outfit', sans-serif;
}

.stat-meta {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-up { color: var(--emerald); font-weight: 600; }
.meta-down { color: var(--danger); font-weight: 600; }

/* DATA TABLES & CARDS */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--primary);
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.fin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13.5px;
}

.fin-table th {
    background: rgba(255, 255, 255, 0.02);
    padding: 14px 20px;
    font-weight: 700;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.fin-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    vertical-align: middle;
}

.fin-table tbody tr {
    transition: var(--transition);
}

.fin-table tbody tr:hover {
    background: var(--bg-card-hover);
}

/* TOGGLE SWITCH - SYNC ON / OFF */
.sync-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 10px;
}

.sync-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.slider-pill {
    position: relative;
    width: 48px;
    height: 24px;
    background-color: #334155;
    border-radius: 99px;
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.slider-pill:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

input:checked + .slider-pill {
    background-color: var(--emerald);
    box-shadow: 0 0 12px var(--emerald-glow);
}

input:checked + .slider-pill:before {
    transform: translateX(24px);
}

.switch-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.switch-label.on { color: var(--emerald); }
.switch-label.off { color: var(--danger); }

/* BADGES & PILLS */
.risk-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 700;
}

.badge-risk-low {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-risk-mod {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-risk-high {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-risk-crit {
    background: rgba(185, 28, 28, 0.3);
    color: #fca5a5;
    border: 1px solid #ef4444;
    animation: criticalAlert 1.5s infinite;
}

@keyframes criticalAlert {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.loan-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
}

.status-applied { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.status-review { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); }
.status-approved { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.status-disbursed { background: rgba(6, 182, 212, 0.15); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.3); }
.status-completed { background: rgba(100, 116, 139, 0.2); color: #cbd5e1; border: 1px solid rgba(100, 116, 139, 0.3); }
.status-overdue { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }
.status-rejected { background: rgba(153, 27, 27, 0.25); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.4); }

/* SMS CATEGORY PILLS */
.sms-cat-pill {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.cat-credit { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.cat-debit { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.cat-loan { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.cat-otp { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }
.cat-bill { background: rgba(236, 72, 153, 0.2); color: #f472b6; }
.cat-personal { background: rgba(100, 116, 139, 0.2); color: #94a3b8; }

/* TOAST NOTIFICATION CONTAINER */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 300px;
    background: #1e293b;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 13.5px;
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success { border-left: 4px solid var(--emerald); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-info { border-left: 4px solid var(--primary); }

/* LIGHTBOX MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    padding: 24px;
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* FORM CONTROLS */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

/* GALLERY GRID */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.media-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.media-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.media-thumb {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: #0f172a;
}

.media-info {
    padding: 12px;
}

.media-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-meta {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .app-sidebar {
        transform: translateX(-100%);
    }
    .app-sidebar.show-mobile {
        transform: translateX(0);
    }
    .app-main {
        margin-left: 0;
    }
    .topbar-search {
        display: none;
    }
}
