/* ============================================================
   MIGRAMENTORS BACKOFFICE — ortaq dizayn sistemi (migro3)
   Brand Book v1.0 · glass-morphism · lavanda/kral göyü/mint/narıncı
   Bütün panellərdə (admin, operator, director, consultant, mentor, expert) eyni.
   ============================================================ */

:root {
    --primary-50: #f5f3ff;
    --primary-100: #ede9fe;
    --primary-200: #ddd6fe;
    --primary-300: #c4b5fd;
    --primary-400: #a78bfa;
    --primary-500: #8b5cf6;
    --primary-600: #7c3aed;
    --primary-700: #6d28d9;
    --primary-800: #5b21b6;
    --primary-900: #4c1d95;
    --royal-900: #000089;
    --mint-200: #c5fcef;
    --mint-500: #16d181;
    --mint-700: #0d8854;
    --secondary-500: #f08b3a;

    --glass-bg: rgba(255, 255, 255, 0.78);
    --glass-border: rgba(255, 255, 255, 0.65);
    --glass-shadow: 0 10px 30px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.02);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    color: #334155;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== Ambient brend bloblar (fon) ===== */
.glow-circle {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    z-index: 0;
    opacity: 0.13;
    pointer-events: none;
}
.glow-1 { width: 500px; height: 500px; background: var(--primary-600); top: -180px; left: -140px; }
.glow-2 { width: 600px; height: 600px; background: var(--mint-500); bottom: -200px; right: -160px; }
.glow-3 { width: 420px; height: 420px; background: var(--royal-900); top: 40%; left: 55%; opacity: 0.07; }

/* ===== Glass-morphism kart ===== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-card:hover {
    border-color: rgba(139, 92, 246, 0.2);
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.08);
}

/* ===== Brend gradient köməkçiləri ===== */
.mm-gradient-text {
    background: linear-gradient(120deg, #8b5cf6 0%, #6366f1 50%, #000089 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.mm-gradient-bg { background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 50%, #000089 100%); }
.mm-logo-box { background: linear-gradient(135deg, #8b5cf6, #000089); color: #fff; }

/* ===== Sidebar naviqasiya ===== */
.side-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    border-radius: 0.75rem;
    border-left: 4px solid transparent;
    color: #475569;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.15s ease;
    cursor: pointer;
    text-decoration: none;
}
.side-link:hover { background: rgba(124, 58, 237, 0.05); border-left-color: rgba(139, 92, 246, 0.5); color: #6d28d9; }
.side-link.active {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.12), rgba(139, 92, 246, 0.02));
    border-left-color: #8b5cf6;
    color: #6d28d9;
    font-weight: 700;
}
.side-link i { width: 1.1rem; text-align: center; }

/* ===== Stat / KPI kartı ===== */
.stat-card { position: relative; overflow: hidden; }
.stat-icon {
    height: 2.75rem; width: 2.75rem;
    border-radius: 0.85rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem;
}

/* ===== Badge-lər ===== */
.badge {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 0.5rem;
    font-size: 0.7rem; font-weight: 700;
    border: 1px solid transparent;
    white-space: nowrap;
}
.badge-success { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.badge-warning { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.badge-danger  { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.badge-info    { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.badge-primary { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.badge-slate   { background: #f8fafc; color: #475569; border-color: #e2e8f0; }

/* ===== Düymələr ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    border-radius: 0.75rem;
    font-size: 0.8rem; font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer; transition: all 0.18s ease;
    text-decoration: none;
}
.btn-primary { background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: #fff; box-shadow: 0 8px 20px -8px rgba(139, 92, 246, 0.5); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -8px rgba(139, 92, 246, 0.6); }
.btn-soft { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.btn-soft:hover { background: #ede9fe; }
.btn-danger { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.btn-danger:hover { background: #fee2e2; }
.btn-success { background: linear-gradient(135deg, #10b981, #059669); color: #fff; }
.btn-ghost { background: transparent; color: #64748b; }
.btn-ghost:hover { background: #f1f5f9; color: #334155; }

/* ===== Cədvəl ===== */
.mm-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.mm-table thead th {
    text-align: left; padding: 0.75rem 1rem;
    font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;
    color: #94a3b8; border-bottom: 1px solid #e2e8f0;
}
.mm-table tbody td { padding: 0.85rem 1rem; border-bottom: 1px solid #f1f5f9; color: #475569; }
.mm-table tbody tr:hover { background: rgba(139, 92, 246, 0.03); }
.mm-table tbody tr:last-child td { border-bottom: none; }

/* ===== Form sahələri ===== */
.mm-input, .mm-select, .mm-textarea {
    width: 100%;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.6rem 0.9rem;
    font-size: 0.82rem; color: #334155;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.mm-input:focus, .mm-select:focus, .mm-textarea:focus {
    outline: none; border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

/* ===== Avatar ===== */
.avatar {
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 0.75rem; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #8b5cf6, #000089);
}

/* ===== Tab panelləri (hash əsaslı) ===== */
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.25s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in { animation: fadeIn 0.3s ease; }

/* ===== Sidebar (mobil overlay) ===== */
@media (max-width: 1023px) {
    #sidebar {
        position: fixed; inset: 0 auto 0 0; z-index: 50;
        transform: translateX(-100%); transition: transform 0.25s ease;
    }
    #sidebar.open { transform: translateX(0); }
}
#sidebar-overlay {
    position: fixed; inset: 0; background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px); z-index: 40;
}

/* ===== Scrollbar (brend) ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #8b5cf6; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #6d28d9; }

/* ===== Ana səhifə keçidi (app.js bütün panellərə əlavə edir) ===== */
.mm-home-link {
    position: fixed; top: 0.7rem; right: 0.7rem; z-index: 70;
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.45rem 0.85rem; border-radius: 0.7rem;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: #fff;
    font-size: 0.72rem; font-weight: 800; text-decoration: none;
    box-shadow: 0 8px 20px -6px rgba(139, 92, 246, 0.55);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.mm-home-link:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(139, 92, 246, 0.7); }
.mm-home-link i { font-size: 0.7rem; }
