﻿/* ============================================================
   PHANTOM CRM — Redesign 2026 v2
   Palette:
     Indigo:  #6366f1 / #818cf8
     Pink:    #ec4899 / #f472b6
     Cyan:    #06b6d4 / #67e8f9
     Green:   #10b981 / #6ee7b7
     Red:     #ef4444 / #fca5a5
     Orange:  #f59e0b / #fcd34d
     BG:      #080812
============================================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; }

:root {
    --accent:        #6366f1;
    --accent-light:  #818cf8;
    --accent-glow:   rgba(99,102,241,.35);
    --pink:          #ec4899;
    --pink-light:    #f472b6;
    --cyan:          #06b6d4;
    --cyan-light:    #67e8f9;
    --green:         #10b981;
    --green-light:   #6ee7b7;
    --red:           #ef4444;
    --orange:        #f59e0b;
    --bg:            #080812;
    --surface:       rgba(255,255,255,.045);
    --surface2:      rgba(255,255,255,.075);
    --border:        rgba(255,255,255,.09);
    --border-hover:  rgba(99,102,241,.5);
    --text:          #e2e8f0;
    --text-muted:    rgba(255,255,255,.42);
    --radius:        16px;
    --radius-sm:     10px;
    --shadow-glow:   0 0 40px rgba(99,102,241,.2);
}

/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,.45); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,.75); }

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse 80% 60% at 20% 0%, rgba(99,102,241,.13) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 100%, rgba(236,72,153,.10) 0%, transparent 55%);
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
}

.app-container { display: flex; min-height: 100vh; }

/* ========== SIDEBAR ========== */
.sidebar {
    width: 256px;
    background: rgba(6,6,16,.95);
    backdrop-filter: blur(28px) saturate(1.8);
    -webkit-backdrop-filter: blur(28px) saturate(1.8);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 0;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

/* Top accent line */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--pink), var(--cyan));
    z-index: 2;
}

/* Background glow blob */
.sidebar::after {
    content: '';
    position: absolute;
    top: -60px; left: -40px;
    width: 240px; height: 240px;
    background: radial-gradient(circle, rgba(99,102,241,.1), transparent 68%);
    pointer-events: none;
    z-index: 0;
}

/* ---- Logo area ---- */
.sidebar-header {
    padding: 20px 16px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.sidebar-logo-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--pink) 100%);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 4px 20px rgba(99,102,241,.55), 0 0 28px rgba(236,72,153,.2);
    position: relative;
}

.sidebar-logo-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,.18) 0%, transparent 60%);
    pointer-events: none;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: .3px;
    background: linear-gradient(120deg, #ffffff 0%, var(--accent-light) 55%, var(--pink-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

/* ---- Nav scroll area ---- */
.nav-scroll {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 12px 10px;
    position: relative;
    z-index: 1;
}

.nav-scroll::-webkit-scrollbar { width: 3px; }
.nav-scroll::-webkit-scrollbar-track { background: transparent; }
.nav-scroll::-webkit-scrollbar-thumb { background: rgba(99,102,241,.3); border-radius: 99px; }

.nav-links { list-style: none; padding: 0; margin: 0; }
.nav-links li { margin-bottom: 1px; }

/* Nav item */
.nav-links a {
    display: flex;
    align-items: center;
    padding: 7px 10px;
    color: rgba(255,255,255,.5);
    text-decoration: none;
    border-radius: 9px;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
    font-size: .815rem;
    font-weight: 500;
    gap: 10px;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
}

.nav-links a:hover {
    color: rgba(255,255,255,.9);
    background: rgba(255,255,255,.055);
}

.nav-links a.active {
    color: #fff;
    background: linear-gradient(120deg, rgba(99,102,241,.22) 0%, rgba(236,72,153,.08) 100%);
    box-shadow: inset 0 0 0 1px rgba(99,102,241,.28), 0 2px 14px rgba(99,102,241,.1);
}

.nav-links a.active::before {
    content: '';
    position: absolute;
    left: 0; top: 18%; bottom: 18%;
    width: 3px;
    background: linear-gradient(to bottom, var(--accent), var(--pink));
    border-radius: 0 3px 3px 0;
}

/* Icon pill */
.nav-icon-pill {
    width: 30px; height: 30px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem;
    flex-shrink: 0;
    transition: box-shadow .2s, transform .2s;
    background: rgba(255,255,255,.05);
    color: rgba(255,255,255,.4);
}

.nav-links a:hover .nav-icon-pill {
    transform: scale(1.08);
}

/* Active icon pill glow */
.nav-links a.active .nav-icon-pill {
    background: rgba(99,102,241,.2);
    color: var(--accent-light);
    box-shadow: 0 0 10px rgba(99,102,241,.3);
}

/* Color variants for icon pills */
.nav-icon-pill.c-indigo  { background: rgba(99,102,241,.12);  color: var(--accent-light); }
.nav-icon-pill.c-pink    { background: rgba(236,72,153,.12);  color: var(--pink-light); }
.nav-icon-pill.c-cyan    { background: rgba(6,182,212,.12);   color: var(--cyan-light); }
.nav-icon-pill.c-green   { background: rgba(16,185,129,.12);  color: var(--green-light); }
.nav-icon-pill.c-orange  { background: rgba(245,158,11,.12);  color: #fcd34d; }
.nav-icon-pill.c-purple  { background: rgba(139,92,246,.12);  color: #c4b5fd; }
.nav-icon-pill.c-red     { background: rgba(239,68,68,.12);   color: #fca5a5; }

.nav-links a:hover .nav-icon-pill.c-indigo  { box-shadow: 0 0 10px rgba(99,102,241,.35); }
.nav-links a:hover .nav-icon-pill.c-pink    { box-shadow: 0 0 10px rgba(236,72,153,.35); }
.nav-links a:hover .nav-icon-pill.c-cyan    { box-shadow: 0 0 10px rgba(6,182,212,.35); }
.nav-links a:hover .nav-icon-pill.c-green   { box-shadow: 0 0 10px rgba(16,185,129,.35); }
.nav-links a:hover .nav-icon-pill.c-orange  { box-shadow: 0 0 10px rgba(245,158,11,.35); }
.nav-links a:hover .nav-icon-pill.c-purple  { box-shadow: 0 0 10px rgba(139,92,246,.35); }
.nav-links a:hover .nav-icon-pill.c-red     { box-shadow: 0 0 10px rgba(239,68,68,.35); }

.nav-links a.active .nav-icon-pill.c-indigo  { background: rgba(99,102,241,.25);  color: var(--accent-light);  box-shadow: 0 0 14px rgba(99,102,241,.4); }
.nav-links a.active .nav-icon-pill.c-pink    { background: rgba(236,72,153,.22);  color: var(--pink-light);    box-shadow: 0 0 14px rgba(236,72,153,.4); }
.nav-links a.active .nav-icon-pill.c-cyan    { background: rgba(6,182,212,.22);   color: var(--cyan-light);    box-shadow: 0 0 14px rgba(6,182,212,.4); }
.nav-links a.active .nav-icon-pill.c-green   { background: rgba(16,185,129,.22);  color: var(--green-light);   box-shadow: 0 0 14px rgba(16,185,129,.4); }
.nav-links a.active .nav-icon-pill.c-orange  { background: rgba(245,158,11,.22);  color: #fcd34d;              box-shadow: 0 0 14px rgba(245,158,11,.4); }
.nav-links a.active .nav-icon-pill.c-purple  { background: rgba(139,92,246,.22);  color: #c4b5fd;              box-shadow: 0 0 14px rgba(139,92,246,.4); }
.nav-links a.active .nav-icon-pill.c-red     { background: rgba(239,68,68,.22);   color: #fca5a5;              box-shadow: 0 0 14px rgba(239,68,68,.4); }

.nav-label { flex-grow: 1; }

/* Section divider */
.nav-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .62rem;
    text-transform: uppercase;
    color: rgba(255,255,255,.25);
    margin: 16px 0 6px 4px;
    letter-spacing: 1.5px;
    font-weight: 700;
}

.nav-header::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: rgba(255,255,255,.07);
    border-radius: 1px;
}

/* ---- User panel ---- */
.user-panel {
    flex-shrink: 0;
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,.02);
}

.user-avatar {
    width: 34px; height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--accent), var(--pink));
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(99,102,241,.3);
}

.user-panel-info {
    flex-grow: 1;
    min-width: 0;
}

.user-panel-name {
    font-size: .82rem;
    font-weight: 600;
    color: rgba(255,255,255,.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-panel-role {
    font-size: .67rem;
    color: rgba(255,255,255,.32);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-top: 1px;
}

.logout-btn {
    color: rgba(239,68,68,.55);
    text-decoration: none;
    transition: color .2s, transform .2s;
    font-size: .95rem;
    padding: 5px;
    border-radius: 6px;
    flex-shrink: 0;
}

.logout-btn:hover { color: var(--red); transform: translateX(2px); }

/* ========== MAIN CONTENT ========== */
.main-content { flex-grow: 1; padding: 38px 42px; overflow-y: auto; }

/* ========== DASHBOARD ========== */
.dashboard-container h1 {
    font-size: 1.55rem;
    font-weight: 800;
    margin: 0 0 30px 0;
    background: linear-gradient(135deg, #fff 30%, var(--accent-light) 65%, var(--pink-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.dashboard-card {
    background: rgba(255,255,255,.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius);
    padding: 30px 22px;
    text-decoration: none;
    color: var(--text);
    transition: transform .28s ease, box-shadow .28s, background .28s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    padding: 1px;
    background: linear-gradient(135deg, rgba(99,102,241,.0), rgba(99,102,241,.0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: background .3s;
    pointer-events: none;
}

.dashboard-card:hover::before {
    background: linear-gradient(135deg, rgba(99,102,241,.6), rgba(236,72,153,.4));
}

.dashboard-card:hover {
    transform: translateY(-7px);
    background: rgba(255,255,255,.065);
    box-shadow: 0 12px 40px rgba(99,102,241,.18), 0 4px 16px rgba(0,0,0,.3);
}

.card-icon {
    font-size: 2.4rem;
    margin-bottom: 16px;
    color: var(--cyan);
    filter: drop-shadow(0 0 10px rgba(6,182,212,.35));
    transition: filter .3s, transform .3s;
}

.dashboard-card:hover .card-icon { filter: drop-shadow(0 0 20px rgba(6,182,212,.7)); transform: scale(1.08); }

.card-info h3 { margin: 0 0 7px 0; font-size: 1.05rem; font-weight: 700; }
.card-info p { margin: 0; color: var(--text-muted); font-size: .82rem; }

.admin-card .card-icon { color: var(--orange); filter: drop-shadow(0 0 8px rgba(245,158,11,.3)); }
.admin-card:hover { box-shadow: 0 12px 40px rgba(245,158,11,.14), 0 4px 16px rgba(0,0,0,.3); }
.admin-card:hover::before { background: linear-gradient(135deg, rgba(245,158,11,.5), rgba(99,102,241,.3)); }

.main-admin-card .card-icon { color: var(--pink); filter: drop-shadow(0 0 8px rgba(236,72,153,.3)); }
.main-admin-card:hover { box-shadow: 0 12px 40px rgba(236,72,153,.14), 0 4px 16px rgba(0,0,0,.3); }
.main-admin-card:hover::before { background: linear-gradient(135deg, rgba(236,72,153,.5), rgba(99,102,241,.3)); }

/* ========== GLASS PANEL ========== */
.glass-panel {
    background: rgba(8,8,20,.7);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

/* ========== LOGIN ========== */
.login-page-body { display: flex; justify-content: center; align-items: center; height: 100vh; }

.login-container {
    background: rgba(8,8,20,.82);
    padding: 48px 44px;
    border-radius: 20px;
    box-shadow: 0 12px 60px rgba(0,0,0,.7), 0 0 0 1px rgba(99,102,241,.22), var(--shadow-glow);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -100px; left: 50%;
    transform: translateX(-50%);
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(99,102,241,.2), rgba(236,72,153,.08), transparent 70%);
    pointer-events: none;
}

.login-container::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--pink), var(--cyan));
}

.login-container h2 { margin-bottom: 34px; color: #fff; font-weight: 800; font-size: 1.55rem; position: relative; }

.form-group { margin-bottom: 20px; text-align: left; }

.form-group label { display: block; margin-bottom: 8px; color: rgba(255,255,255,.55); font-size: .85rem; font-weight: 500; }

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255,255,255,.11);
    background: rgba(255,255,255,.055);
    border-radius: var(--radius-sm);
    color: white;
    box-sizing: border-box;
    font-size: .95rem;
    font-family: inherit;
    transition: all .25s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(99,102,241,.09);
    box-shadow: 0 0 0 3px rgba(99,102,241,.2);
}

.form-group input::placeholder { color: rgba(255,255,255,.28); }

.btn-login {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, var(--accent), #4f46e5);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .25s;
    margin-top: 10px;
    font-family: inherit;
    box-shadow: 0 4px 24px rgba(99,102,241,.4);
    letter-spacing: .3px;
}

.btn-login:hover { background: linear-gradient(135deg, var(--accent-light), var(--accent)); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(99,102,241,.55); }
.btn-login:active { transform: scale(.98); }

/* ========== WORK PAGE ========== */
.work-container-full { max-width: 1400px; margin: 0 auto; height: calc(100vh - 100px); }

.work-grid { display: grid; grid-template-columns: 350px 1fr; gap: 20px; height: 100%; }

.client-profile-col, .work-area-col { display: flex; flex-direction: column; gap: 18px; }

.profile-card { flex-grow: 0; }

.profile-header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }

.avatar-placeholder {
    width: 54px; height: 54px;
    background: rgba(139,92,246,.12);
    border: 1px solid rgba(139,92,246,.28);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    color: var(--accent-light);
    flex-shrink: 0;
}

.profile-main-info h2 { margin: 0 0 5px 0; font-size: 1.1rem; font-weight: 600; }

.status-badge { background: linear-gradient(135deg, var(--accent), var(--cyan)); padding: 2px 9px; border-radius: 20px; font-size: .75rem; font-weight: 600; }

.phone-section { text-align: center; margin-bottom: 18px; position: relative; }

.phone-number-large {
    font-size: 1.7rem; font-weight: 700; color: #fff;
    cursor: pointer; padding: 10px; border-radius: var(--radius-sm);
    background: rgba(255,255,255,.04);
    transition: background .2s;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    letter-spacing: .5px;
}

.phone-number-large:hover { background: rgba(255,255,255,.08); }
.phone-number-large i { font-size: .9rem; opacity: .45; }

.operator-info { margin-top: 7px; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: .85rem; color: var(--text-muted); }
.operator-name { font-weight: 500; }
.old-operator { color: var(--text-muted); text-decoration: line-through; }
.new-operator { color: #fff; font-weight: 600; }
.operator-arrow { color: var(--text-muted); font-size: .75rem; }

.ported-badge { background: rgba(245,158,11,.14); color: var(--orange); padding: 2px 7px; border-radius: 4px; font-size: .78rem; display: flex; align-items: center; gap: 4px; border: 1px solid rgba(245,158,11,.24); }

.comm-buttons-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 18px; }

.comm-btn-icon { display: flex; align-items: center; justify-content: center; height: 38px; border-radius: var(--radius-sm); color: white; font-size: 1.1rem; text-decoration: none; transition: transform .2s, filter .2s; }
.comm-btn-icon:hover { transform: translateY(-2px); filter: brightness(1.15); }
.comm-btn-icon.telegram { background: #0088cc; }
.comm-btn-icon.whatsapp { background: #25D366; }
.comm-btn-icon.microsip { background: #444; }

.info-table { font-size: .87rem; }
.info-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.info-row:last-child { border-bottom: none; }
.info-row .label { color: var(--text-muted); }

.actions-panel { flex-grow: 1; }
.actions-panel h3 { margin-top: 0; font-size: .82rem; color: var(--text-muted); margin-bottom: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }

.actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

.action-btn-lg {
    padding: 14px 8px; border: none; border-radius: var(--radius-sm);
    color: white; font-weight: 600; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    transition: filter .2s, transform .15s; font-family: inherit; font-size: .85rem;
}

.action-btn-lg:hover { filter: brightness(1.12); transform: translateY(-1px); }
.action-btn-lg:active { transform: scale(.97); }
.action-btn-lg.passed    { background: linear-gradient(135deg, #059669, #10b981); }
.action-btn-lg.no-answer { background: linear-gradient(135deg, #d97706, #f59e0b); color: #000; }
.action-btn-lg.bum       { background: linear-gradient(135deg, #b91c1c, #ef4444); }
.action-btn-lg.age       { background: linear-gradient(135deg, #0369a1, #0ea5e9); }
.action-btn-lg.dozvon    { background: linear-gradient(135deg, #4f46e5, #7c3aed); }

.script-panel { flex-grow: 0; }

.panel-header { border-bottom: 1px solid var(--border); margin-bottom: 14px; padding-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.panel-header h3 { margin: 0; font-size: 1rem; font-weight: 600; color: var(--accent-light); display: flex; align-items: center; gap: 8px; }
.panel-controls { display: flex; gap: 9px; }

.icon-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: .95rem; transition: color .2s; padding: 0; }
.icon-btn:hover { color: #fff; }

.script-content { font-size: .9rem; line-height: 1.6; color: #ddd; min-height: 90px; white-space: pre-wrap; }
.script-content p { margin-bottom: 9px; }
.script-content .tip { background: rgba(245,158,11,.1); padding: 10px; border-radius: 6px; border-left: 3px solid var(--orange); margin-top: 13px; }

.script-edit-form textarea { width: 100%; height: 190px; background: rgba(0,0,0,.3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; color: white; font-family: inherit; resize: vertical; margin-bottom: 10px; box-sizing: border-box; }
.script-edit-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(139,92,246,.18); }

.script-actions { display: flex; justify-content: flex-end; gap: 8px; }

.btn-save-script { background: linear-gradient(135deg, #059669, #10b981); color: white; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-weight: 600; font-family: inherit; transition: filter .2s; }
.btn-save-script:hover { filter: brightness(1.1); }
.btn-cancel-script { background: rgba(255,255,255,.08); color: white; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-family: inherit; transition: background .2s; }
.btn-cancel-script:hover { background: rgba(255,255,255,.15); }

.notes-panel { flex-grow: 1; display: flex; flex-direction: column; }

.notes-timeline { flex-grow: 1; overflow-y: auto; margin-bottom: 18px; padding-right: 8px; max-height: 290px; }

.timeline-item { display: flex; gap: 14px; margin-bottom: 14px; }
.timeline-marker { width: 2px; background: linear-gradient(to bottom, var(--accent), transparent); position: relative; margin-left: 5px; }
.timeline-marker::before { content: ''; width: 9px; height: 9px; background: var(--accent-light); border-radius: 50%; position: absolute; left: -3.5px; top: 5px; box-shadow: 0 0 6px var(--accent-glow); }
.timeline-content { background: rgba(255,255,255,.04); border: 1px solid var(--border); padding: 9px 13px; border-radius: var(--radius-sm); flex-grow: 1; }
.timeline-date { font-size: .72rem; color: var(--text-muted); display: block; margin-bottom: 4px; }
.timeline-content p { margin: 0; font-size: .88rem; }

.input-wrapper { display: flex; gap: 9px; }
.new-note-form textarea { flex-grow: 1; background: rgba(0,0,0,.3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; color: white; resize: none; height: 40px; font-family: inherit; }
.new-note-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(139,92,246,.15); }

.btn-send-note { width: 46px; background: linear-gradient(135deg, var(--accent), #6d28d9); border: none; border-radius: var(--radius-sm); color: white; cursor: pointer; transition: filter .2s; font-size: 1rem; }
.btn-send-note:hover { filter: brightness(1.15); }

.copy-feedback { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); background: rgba(9,9,20,.92); border: 1px solid var(--border); padding: 5px 11px; border-radius: 6px; font-size: .78rem; opacity: 0; transition: opacity .3s; pointer-events: none; margin-top: 5px; z-index: 10; white-space: nowrap; }

.no-leads-container { display: flex; justify-content: center; align-items: center; height: 100%; }
.no-leads-container .glass-panel { text-align: center; padding: 50px; }
.no-leads-container i { color: var(--green); margin-bottom: 20px; }

.notes-section { margin-bottom: 28px; background: rgba(255,255,255,.04); border: 1px solid var(--border); padding: 18px; border-radius: var(--radius-sm); }
.notes-section h3 { margin-top: 0; margin-bottom: 13px; font-size: 1rem; font-weight: 600; color: var(--text-muted); }
.notes-list { max-height: 190px; overflow-y: auto; margin-bottom: 13px; padding-right: 4px; }
.note-item { background: rgba(0,0,0,.25); padding: 9px; border-radius: 6px; margin-bottom: 8px; border-left: 3px solid var(--accent); }
.note-date { display: block; font-size: .76rem; color: var(--text-muted); margin-bottom: 4px; }
.note-text { margin: 0; font-size: .9rem; line-height: 1.4; }

/* ========== UPLOAD ========== */
.upload-container { display: flex; justify-content: center; align-items: center; min-height: calc(100vh - 100px); }
.upload-panel { width: 100%; max-width: 600px; text-align: center; }
.upload-desc { color: var(--text-muted); margin-bottom: 28px; }

.file-drop-area { border: 2px dashed rgba(139,92,246,.3); border-radius: var(--radius); padding: 40px 20px; margin-bottom: 20px; cursor: pointer; transition: all .3s; position: relative; }
.file-drop-area:hover, .file-drop-area.highlight { border-color: var(--accent); background: rgba(139,92,246,.07); box-shadow: 0 0 24px rgba(139,92,246,.15); }
.file-icon { font-size: 3rem; color: var(--accent-light); margin-bottom: 13px; display: block; }
.file-msg { color: #ddd; font-size: 1rem; }
.file-input { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-settings { text-align: left; margin-bottom: 18px; padding: 0 10px; }
.form-row { display: flex; gap: 14px; }
.form-row .form-group { flex: 1; }
.upload-settings label { display: block; margin-bottom: 7px; color: rgba(255,255,255,.6); font-size: .85rem; }

.form-input { width: 100%; padding: 10px 13px; background: rgba(255,255,255,.055); border: 1px solid var(--border); border-radius: var(--radius-sm); color: white; font-size: .9rem; box-sizing: border-box; font-family: inherit; transition: all .2s; }
.form-input:focus { outline: none; border-color: var(--accent); background: rgba(99,102,241,.08); box-shadow: 0 0 0 3px rgba(99,102,241,.18); }
.file-name { display: none; margin-top: 10px; color: var(--accent-light); font-weight: 600; }
.upload-options { text-align: left; margin-bottom: 18px; padding: 0 10px; }

/* ========== EMPLOYEE FORM ========== */
.form-panel { max-width: 500px; margin: 0 auto; }
.employee-form .form-group { margin-bottom: 18px; }
.employee-form label { display: block; margin-bottom: 7px; color: rgba(255,255,255,.6); font-size: .85rem; }
.employee-form select.form-input { appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 10px center; background-size: 1em; }
.employee-form select.form-input option, select.form-input option { background: #1a1228; color: white; }
.btn-block { width: 100%; justify-content: center; }

/* ========== CHECKBOXES ========== */
.users-list-scroll { max-height: 290px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px; background: rgba(0,0,0,.15); }
.user-checkbox-item { display: flex; align-items: center; padding: 9px 10px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,.04); transition: background .2s; position: relative; border-radius: 5px; }
.user-checkbox-item:last-child { border-bottom: none; }
.user-checkbox-item:hover { background: rgba(255,255,255,.05); }
.user-checkbox-item input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.checkmark-box { height: 18px; width: 18px; background-color: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.25); border-radius: 4px; margin-right: 13px; position: relative; flex-shrink: 0; transition: all .2s; }
.user-checkbox-item input:checked ~ .checkmark-box { background: linear-gradient(135deg, var(--accent), var(--cyan)); border-color: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.checkmark-box::after { content: ''; position: absolute; display: none; }
.user-checkbox-item input:checked ~ .checkmark-box::after { display: block; }
.user-checkbox-item .checkmark-box::after { left: 5px; top: 2px; width: 5px; height: 9px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.user-name { flex-grow: 1; font-size: .9rem; }
.user-role-badge { font-size: .72rem; padding: 2px 7px; background: rgba(255,255,255,.08); border-radius: 4px; color: var(--text-muted); }

/* ========== BUTTONS ========== */
.btn-upload { width: 100%; padding: 13px; background: linear-gradient(135deg, #059669, #10b981); border: none; border-radius: var(--radius-sm); color: white; font-size: 1rem; font-weight: 700; cursor: pointer; transition: filter .2s, transform .15s; font-family: inherit; box-shadow: 0 4px 22px rgba(16,185,129,.35); }
.btn-upload:hover { filter: brightness(1.1); transform: translateY(-1px); }

.btn-primary { background: linear-gradient(135deg, var(--accent), #4f46e5); color: white; padding: 10px 20px; border-radius: var(--radius-sm); text-decoration: none; display: inline-flex; align-items: center; gap: 7px; transition: filter .2s, transform .15s, box-shadow .2s; font-weight: 700; font-size: .88rem; box-shadow: 0 4px 18px rgba(99,102,241,.35); border: none; cursor: pointer; font-family: inherit; }
.btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); box-shadow: 0 8px 28px rgba(99,102,241,.5); }

.btn-secondary { background: rgba(255,255,255,.06); color: var(--text); padding: 10px 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; display: inline-flex; align-items: center; gap: 7px; transition: all .2s; cursor: pointer; font-size: .88rem; font-family: inherit; font-weight: 500; }
.btn-secondary:hover { background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.2); color: #fff; }

.btn-save-note { background: linear-gradient(135deg, var(--accent), #4f46e5); color: white; border: none; padding: 8px 16px; border-radius: 8px; cursor: pointer; font-weight: 700; font-family: inherit; transition: filter .2s; }
.btn-save-note:hover { filter: brightness(1.1); }

.btn-icon { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 5px; font-size: .95rem; transition: color .2s; }
.btn-icon:hover { color: #fff; }
.btn-icon.delete:hover { color: var(--red); }

.btn-danger-glass { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.25); color: #fca5a5; padding: 8px 16px; border-radius: var(--radius-sm); cursor: pointer; font-size: .85rem; display: flex; align-items: center; gap: 7px; transition: all .2s; font-family: inherit; }
.btn-danger-glass:hover { background: rgba(239,68,68,.22); border-color: var(--red); color: white; box-shadow: 0 0 16px rgba(239,68,68,.25); }

.btn-toggle-status { padding: 8px 18px; border-radius: 20px; border: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; transition: all .25s; color: white; font-size: .88rem; font-weight: 700; font-family: inherit; text-decoration: none; }
.btn-toggle-status.active   { background: linear-gradient(135deg, #059669, #10b981); box-shadow: 0 4px 16px rgba(16,185,129,.35); }
.btn-toggle-status.inactive { background: linear-gradient(135deg, #b91c1c, #ef4444); box-shadow: 0 4px 16px rgba(239,68,68,.3); }
.btn-toggle-status:hover { transform: translateY(-2px); }
.btn-toggle-status:active { transform: translateY(0); }

/* ========== FLASH ========== */
.flash-messages { margin-top: 18px; }
.flash-msg { padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 9px; font-size: .88rem; display: flex; align-items: center; gap: 8px; }
.flash-msg.success { background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.28); color: var(--green-light); }
.flash-msg.error   { background: rgba(239,68,68,.12);  border: 1px solid rgba(239,68,68,.28);  color: #fca5a5; }

/* ========== ADMIN TABLES ========== */
.admin-container { max-width: 1200px; margin: 0 auto; }

.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.page-header h1 { margin: 0; font-size: 1.45rem; font-weight: 800; background: linear-gradient(135deg, #fff 30%, var(--accent-light) 65%, var(--pink-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.header-left { display: flex; align-items: center; gap: 18px; }
.back-link { color: var(--text-muted); text-decoration: none; display: flex; align-items: center; gap: 5px; transition: color .2s; font-size: .88rem; }
.back-link:hover { color: #fff; }
.header-actions { display: flex; align-items: center; gap: 12px; }

.data-table { width: 100%; border-collapse: collapse; color: var(--text); }
.data-table th, .data-table td { padding: 13px 15px; text-align: left; border-bottom: 1px solid var(--border); }
.data-table th { font-weight: 600; color: var(--text-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; background: rgba(255,255,255,.02); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: rgba(255,255,255,.03); }

.file-info { display: flex; align-items: center; gap: 9px; }
.file-icon-small { color: var(--cyan); }

.status-badge { padding: 3px 10px; border-radius: 20px; font-size: .78rem; font-weight: 600; display: inline-block; letter-spacing: .3px; }
.status-done       { background: rgba(16,185,129,.14); color: var(--green-light); border: 1px solid rgba(16,185,129,.24); }
.status-processing { background: rgba(245,158,11,.12); color: #fcd34d; border: 1px solid rgba(245,158,11,.24); }

/* ========== STATS / ANALYTICS ========== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 28px; }
.stat-card { display: flex; align-items: center; gap: 18px; padding: 20px; }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; background: rgba(255,255,255,.05); flex-shrink: 0; }
.color-blue   { color: var(--cyan); }
.color-green  { color: var(--green); }
.color-purple { color: var(--accent-light); }
.color-orange { color: var(--orange); }
.stat-info h3 { margin: 0 0 4px 0; font-size: .82rem; color: var(--text-muted); font-weight: 500; }
.stat-value { font-size: 1.75rem; font-weight: 700; margin-bottom: 2px; line-height: 1; }
.stat-desc { margin: 0; font-size: .76rem; color: rgba(255,255,255,.32); }
.analytics-details-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.chart-panel, .info-panel { padding: 20px; }
.mock-chart-bar { margin-top: 18px; }
.bar-row { display: flex; align-items: center; gap: 13px; margin-bottom: 13px; }
.bar-label { width: 78px; font-size: .85rem; color: var(--text-muted); }
.bar-track { flex-grow: 1; height: 7px; background: rgba(255,255,255,.07); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--cyan)); border-radius: 99px; }
.bar-val { width: 48px; text-align: right; font-weight: 700; font-size: .9rem; }
.file-details-list { list-style: none; padding: 0; margin: 0; }
.file-details-list li { padding: 9px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; font-size: .88rem; }
.file-details-list li:last-child { border-bottom: none; }
.no-notes { color: var(--text-muted); font-style: italic; text-align: center; padding: 10px; }
.note-form textarea { width: 100%; background: rgba(0,0,0,.3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; color: white; font-family: inherit; resize: vertical; min-height: 58px; margin-bottom: 9px; box-sizing: border-box; }
.note-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(139,92,246,.15); }

/* ========== TEMPLATE CONTROLS ========== */
.template-controls { display: flex; gap: 9px; width: 100%; margin-bottom: 13px; }
.template-select { flex: 1; padding: 10px; border-radius: var(--radius-sm); background: rgba(0,0,0,.3); color: #fff; border: 1px solid var(--border); font-size: .9rem; cursor: pointer; transition: border-color .2s; font-family: inherit; }
.template-select:focus { outline: none; border-color: var(--accent); }
.template-select option { background-color: #1a1228; color: white; padding: 10px; }
.btn-template { padding: 0 14px; border-radius: var(--radius-sm); border: none; cursor: pointer; color: white; display: flex; align-items: center; justify-content: center; transition: filter .2s; min-width: 38px; font-family: inherit; }
.btn-template-add    { background: linear-gradient(135deg, #059669, #10b981); }
.btn-template-delete { background: linear-gradient(135deg, #b91c1c, #ef4444); }
.btn-template-add:hover, .btn-template-delete:hover { filter: brightness(1.1); }

/* ========== PETALS ========== */
#petals-container { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 9999; overflow: hidden; }
.petal { position: absolute; top: -30px; user-select: none; pointer-events: none; filter: drop-shadow(0 0 4px rgba(255,180,200,.5)); z-index: 9999; will-change: transform; }

/* ========== LUCK GAME ========== */
.luck-modal-content { background: linear-gradient(135deg, #1a1228, #0a0a14); border: 2px solid #ffd700; box-shadow: 0 0 30px rgba(255,215,0,.35); text-align: center; }
.slot-machine { display: flex; justify-content: center; gap: 10px; margin: 18px 0; padding: 18px; background: rgba(0,0,0,.4); border-radius: var(--radius-sm); border: 3px solid #c0392b; }
.reel { width: 78px; height: 98px; background: white; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 2.8rem; border: 2px solid #999; box-shadow: inset 0 0 10px rgba(0,0,0,.5); }
.spin-btn { background: linear-gradient(to bottom, #e74c3c, #c0392b); color: white; font-size: 1.1rem; padding: 10px 30px; border: none; border-radius: 50px; cursor: pointer; box-shadow: 0 5px 0 #96281b; transition: all .1s; text-transform: uppercase; font-weight: bold; margin-top: 10px; font-family: inherit; }
.spin-btn:active { transform: translateY(5px); box-shadow: none; }
.spin-btn:disabled { background: #666; box-shadow: none; cursor: not-allowed; }
.win-message { color: #ffd700; font-size: 1.4rem; margin-top: 13px; min-height: 1.4em; text-shadow: 0 0 12px rgba(255,215,0,.6); }

/* ========== UTILITIES ========== */
.text-muted   { color: var(--text-muted); }
.text-success { color: var(--green-light); }
.text-danger  { color: #fca5a5; }
.text-warning { color: #fcd34d; }
.text-info    { color: var(--cyan-light); }
.text-primary { color: var(--accent-light); }
h1, h2, h3 { font-weight: 700; }
.section-title { font-size: 1.1rem; font-weight: 600; color: var(--accent-light); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card { background: rgba(255,255,255,.04); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; transition: border-color .2s; }
.card:hover { border-color: var(--border-hover); }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    .sidebar { width: 200px; }
    .work-grid { grid-template-columns: 300px 1fr; }
}

@media (max-width: 700px) {
    .app-container { flex-direction: column; }
    .sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--border); padding: 14px 16px; }
    .main-content { padding: 20px 16px; }
    .work-grid { grid-template-columns: 1fr; height: auto; }
    .analytics-details-grid { grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: 1fr 1fr; gap: 13px; }
}
