/* candidate/assets/css/admin.css -> admin/assets/css/admin.css */

/* Global Variables & Theming */
:root {
    /* Corporate Admin Color Palette */
    --primary-brand: #3b82f6;       /* Blue 500 */
    --hover-brand: #2563eb;         /* Blue 600 */
    --sidebar-bg: #0f172a;          /* Slate 900 - Dark mode sidebar */
    --sidebar-text: #94a3b8;        /* Slate 400 */
    --sidebar-active-bg: rgba(255, 255, 255, 0.1);
    --sidebar-active-text: #ffffff;
    
    --bg-body: #f8fafc;             /* Slate 50 */
    --text-dark: #1e293b;           /* Slate 800 */
    --text-muted: #64748b;          /* Slate 500 */
    
    --border-color: #e2e8f0;        /* Slate 200 */
    
    /* Layout Dimensions */
    --sidebar-width: 260px;
    --topbar-height: 75px;
    --transition-speed: 0.3s;
}

/* Base Body Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Logical Reset For Translations */
.ms-n1 { margin-inline-start: -0.25rem !important; margin-left: 0 !important; }
.pe-4 { padding-inline-end: 1.5rem !important; padding-right: 0 !important; }
.ms-2 { margin-inline-start: 0.5rem !important; margin-left: 0 !important; }
.me-2 { margin-inline-end: 0.5rem !important; margin-right: 0 !important; }
.ms-1 { margin-inline-start: 0.25rem !important; margin-left: 0 !important; }

/* Custom Font Weights */
.fw-medium { font-weight: 500; }
.fs-7 { font-size: 0.9rem; }
.fs-8 { font-size: 0.8rem; }
.fs-9 { font-size: 0.7rem; }
.tracking-wide { letter-spacing: 0.05em; }

/* Transitions & Hover Effects */
.transition-all { transition: all var(--transition-speed) ease; }
.hover-opacity:hover { opacity: 0.8; }
.hover-lift:hover { transform: translateY(-3px); }
.cursor-pointer { cursor: pointer; }

/* ---------------------------------------------------
    SIDEBAR SYSTEM (Dark Theme)
----------------------------------------------------- */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    inset-inline-start: 0; 
    z-index: 1000;
    transition: transform var(--transition-speed) ease;
    background-color: var(--sidebar-bg) !important;
    color: var(--sidebar-text);
    border-inline-end: 1px solid rgba(255,255,255,0.05);
}

.brand-text { color: #ffffff !important; }
.sidebar-header { border-bottom: 1px solid rgba(255,255,255,0.05); }
.sidebar-footer { border-top: 1px solid rgba(255,255,255,0.05); }

/* Sidebar Navigation Items */
.sidebar-menu .nav-link {
    color: var(--sidebar-text) !important;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.sidebar-menu .nav-link:hover {
    background-color: rgba(255,255,255,0.05) !important;
    color: #ffffff !important;
}

.sidebar-menu .nav-link.active {
    background-color: var(--primary-brand) !important;
    color: #ffffff !important;
    font-weight: 600;
}

.sidebar-icon {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

/* ---------------------------------------------------
    MAIN CONTENT WRAPPER
----------------------------------------------------- */
.main-wrapper {
    margin-inline-start: var(--sidebar-width);
    transition: margin var(--transition-speed) ease;
}

.topbar {
    height: var(--topbar-height);
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-toggle-hide::after {
    display: none !important;
}

/* Mobile Sidebar Behavior */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(calc(var(--sidebar-width) * -1));
    }
    
    /* Logical flip for RTL mobile */
    html[dir="rtl"] .sidebar {
        transform: translateX(var(--sidebar-width));
    }

    .sidebar.show {
        transform: translateX(0);
    }
    html[dir="rtl"] .sidebar.show {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-inline-start: 0;
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
}

/* Admin Dashboard Specific Cards */
.admin-stat-card {
    border: none;
    border-radius: 1rem;
    background-color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.admin-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

/* Custom Badges */
.badge-soft-success { background-color: rgba(16, 185, 129, 0.1); color: #059669; }
.badge-soft-primary { background-color: rgba(59, 130, 246, 0.1); color: #2563eb; }
.badge-soft-warning { background-color: rgba(245, 158, 11, 0.1); color: #d97706; }
.badge-soft-danger { background-color: rgba(239, 68, 68, 0.1); color: #dc2626; }

/* ---------------------------------------------------
    PHASE 4: PREMIUM POLISH & INTERACTIONS
----------------------------------------------------- */

/* Subtly animated and deeper cards */
.card {
    border: 1px solid rgba(0,0,0,0.03) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
    backdrop-filter: blur(5px);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* More premium Sidebar Gradient */
.sidebar {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%) !important;
    border-inline-end: 1px solid rgba(255,255,255,0.02);
    box-shadow: 2px 0 20px rgba(0,0,0,0.1);
}

/* Premium Buttons */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

/* Elegant Table Rows */
.table-hover tbody tr {
    transition: all 0.2s ease-in-out;
}

.table-hover tbody tr:hover {
    background-color: #ffffff;
    transform: scale(1.002) translateX(2px);
    box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.05);
    z-index: 2;
    position: relative;
    border-radius: 8px;
}

/* Sidebar Nav Adjustments for SaaS Look */
.sidebar-menu .nav-link {
    color: #9ca3af !important;
    border-radius: 8px;
    margin-bottom: 6px;
    padding: 10px 16px;
    transition: all 0.2s ease;
}
.sidebar-menu .nav-link:hover {
    color: #f3f4f6 !important;
    background: #1f2937;
}
.sidebar-menu .nav-link.active {
    background-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: none;
    font-weight: 500;
}

/* ---------------------------------------------------
    PIXEL-PERFECT SAAS CLONE OVERRIDES
----------------------------------------------------- */

/* Dark Slate Premium Sidebar */
.sidebar {
    background: #111827 !important;
    border-right: 1px solid #1f2937 !important;
    box-shadow: none;
}

.sidebar .brand-text {
    color: #ffffff !important;
}

/* Brand Icon */
.sidebar .logo-icon {
    background: #2563eb !important;
    color: #ffffff !important;
}

/* Airy Body Background */
.main-wrapper {
    background-color: #f8fafc !important; 
}

/* Soft Crisp Cards */
.card {
    background: #ffffff;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.03) !important;
}

/* Action Soft Buttons */
.action-soft {
    border: none;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
}
.action-soft:hover { transform: translateY(-1px); }
.action-soft-primary { background: #eff6ff; color: #2563eb; }
.action-soft-success { background: #f0fdf4; color: #16a34a; }
.action-soft-danger { background: #fef2f2; color: #dc2626; }
.action-soft-warning { background: #fffbeb; color: #d97706; }

/* Stat Cards Hover Lift + Deeper Shadow */
.admin-stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.08) !important;
    border-color: rgba(59, 130, 246, 0.1) !important;
}

/* Add custom scrollbar for better feel across elements */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
