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

:root {
    --primary:        #4F46E5;
    --primary-hover:  #4338CA;
    --secondary:      #10B981;
    --background:     #F3F4F6;
    --surface:        #FFFFFF;
    --text-main:      #111827;
    --text-muted:     #6B7280;
    --border:         #E5E7EB;
    --sidebar-w:      260px;
    --sidebar-bg:     #1E1B4B;
    --sidebar-hover:  rgba(255,255,255,0.07);
    --sidebar-active: #4F46E5;
    --sidebar-text:   rgba(255,255,255,0.65);
    --topbar-h:       58px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--background);
    color: var(--text-main);
    margin: 0; padding: 0;
    -webkit-font-smoothing: antialiased;
}

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

/* ── SIDEBAR ─────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: var(--sidebar-bg);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform .25s ease;
}

.sidebar-brand {
    padding: 1.25rem 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    gap: .7rem;
    flex-shrink: 0;
}

.brand-icon {
    width: 36px; height: 36px;
    background: var(--primary);
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: .9rem; flex-shrink: 0;
}

.brand-name  { font-size: .9rem; font-weight: 700; color: white; line-height: 1.2; }
.brand-sub   { font-size: .7rem; color: rgba(255,255,255,.4); display: block; margin-top: 1px; }

.sidebar-section {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.25);
    padding: 1.1rem 1.1rem .3rem;
}

.sidebar-nav { flex: 1; padding: .5rem 0; }

.sidebar-nav a {
    display: flex; align-items: center; gap: .65rem;
    padding: .62rem 1.1rem;
    margin: 1px .55rem;
    border-radius: 8px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: .84rem;
    font-weight: 500;
    transition: background .15s, color .15s;
}
.sidebar-nav a .ni { width: 17px; text-align: center; flex-shrink: 0; }
.sidebar-nav a:hover  { background: var(--sidebar-hover); color: white; }
.sidebar-nav a.active { background: var(--sidebar-active); color: white; }

.sidebar-footer {
    padding: .9rem 1.1rem;
    border-top: 1px solid rgba(255,255,255,.07);
    flex-shrink: 0;
}
.sidebar-footer .user-row {
    display: flex; align-items: center; gap: .65rem; margin-bottom: .65rem;
}
.user-avatar {
    width: 32px; height: 32px;
    background: rgba(255,255,255,.1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: .75rem; flex-shrink: 0;
}
.user-name { font-size: .8rem; font-weight: 600; color: white; line-height: 1.2; }
.user-role { font-size: .68rem; color: rgba(255,255,255,.38); }

/* ── MAIN CONTENT ────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    height: var(--topbar-h);
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 0 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky; top: 0; z-index: 100;
}
.top-bar .page-title { font-size: 1rem; font-weight: 700; margin: 0; }

.content-area { padding: 1.75rem; flex: 1; }

/* ── GLASS / CARDS ───────────────────────────── */
.glass-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    transition: box-shadow .2s;
}
.glass-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }

/* ── STAT CARDS ──────────────────────────────── */
.stat-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.2rem 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.stat-card .stat-val   { font-size: 1.8rem; font-weight: 700; line-height: 1; margin-bottom: .15rem; }
.stat-card .stat-lbl   { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--text-muted); }
.stat-card .stat-icon  { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }

/* ── SEND-CENTER CARDS ───────────────────────── */
.model-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
    text-align: center;
}
.model-card:hover        { border-color: var(--primary); box-shadow: 0 4px 16px rgba(79,70,229,.1); }
.model-card.selected     { border-color: var(--primary); background: #EEF2FF; }
.model-card .mc-icon     { font-size: 2rem; margin-bottom: .75rem; }
.model-card .mc-title    { font-size: .95rem; font-weight: 700; margin-bottom: .3rem; }
.model-card .mc-desc     { font-size: .78rem; color: var(--text-muted); }

/* ── FORM CONTROLS ───────────────────────────── */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: .6rem .875rem;
    font-size: .9rem;
    transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}

.btn-primary {
    background: var(--primary); border-color: var(--primary);
    border-radius: 8px; font-weight: 500;
    transition: background .2s, transform .15s;
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

/* ── LOGIN / REGISTER ────────────────────────── */
.login-wrapper {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    position: relative; overflow: hidden;
}
.glass-panel {
    background: white;
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(79,70,229,.12);
    border-radius: 16px;
}
.shape { position: absolute; filter: blur(60px); z-index: 0; opacity: .5; }
.shape-1 { width: 400px; height: 400px; background: #818CF8; border-radius: 50%; top: -100px; left: -100px; }
.shape-2 { width: 300px; height: 300px; background: #34D399; border-radius: 50%; bottom: -50px; right: -50px; }

/* ── MOBILE ──────────────────────────────────── */
@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .sidebar-overlay {
        display: none; position: fixed; inset: 0;
        background: rgba(0,0,0,.4); z-index: 199;
    }
    .sidebar-overlay.open { display: block; }
}
