/* ═══════════════════════════════════════════════════════
   A.R.C — Control Center · PrinsTech Studio
   Liquid Glass Design System
   ═══════════════════════════════════════════════════════ */

:root {
    /* Base */
    --bg-main: #060608;
    --text-primary: #ffffff;
    --text-secondary: #9b9ba4;
    --text-muted: #5c5c66;

    /* Brand */
    --orange: #f75318;
    --orange-soft: rgba(247, 83, 24, 0.14);

    /* Agents */
    --arc-cyan: #38bdf8;
    --arc-purple: #a78bfa;
    --arc-orange: #fb923c;

    /* Liquid Glass */
    --glass-bg: rgba(255, 255, 255, 0.045);
    --glass-bg-strong: rgba(255, 255, 255, 0.07);
    --glass-border: rgba(255, 255, 255, 0.09);
    --glass-border-bright: rgba(255, 255, 255, 0.18);
    --glass-highlight: rgba(255, 255, 255, 0.35);
    --glass-blur: blur(28px) saturate(170%);
    --glass-radius: 18px;
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);

    /* Fonts */
    --font-title: 'Bebas Neue', sans-serif;
    --font-label: 'Barlow Condensed', sans-serif;
    --font-body: 'Barlow', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scrollbar-color: rgba(255,255,255,0.15) transparent; }

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    cursor: none;
    min-height: 100vh;
}

a, button, input, textarea { cursor: none; }

::selection { background: var(--orange-soft); color: #fff; }

/* ── Ambient Orbs (liquid background) ── */
.bg-orbs {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(130px);
    opacity: 0.55;
    will-change: transform;
}
.orb-1 {
    width: 560px; height: 560px;
    background: radial-gradient(circle, rgba(247, 83, 24, 0.32), transparent 65%);
    top: -180px; left: -120px;
    animation: drift-1 26s ease-in-out infinite alternate;
}
.orb-2 {
    width: 480px; height: 480px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.2), transparent 65%);
    bottom: -160px; right: -100px;
    animation: drift-2 32s ease-in-out infinite alternate;
}
.orb-3 {
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.16), transparent 65%);
    top: 38%; left: 44%;
    animation: drift-3 38s ease-in-out infinite alternate;
}
@keyframes drift-1 { to { transform: translate(140px, 90px) scale(1.15); } }
@keyframes drift-2 { to { transform: translate(-120px, -70px) scale(1.1); } }
@keyframes drift-3 { to { transform: translate(-90px, 110px) scale(0.9); } }

/* ── Noise Overlay ── */
.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.028;
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
}

/* ── Custom Cursor ── */
.custom-cursor {
    position: fixed;
    width: 20px; height: 20px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 10000;
    transition: width 0.25s, height 0.25s, background-color 0.25s, border-color 0.25s;
    mix-blend-mode: difference;
}
.custom-cursor.hover {
    width: 44px; height: 44px;
    background-color: rgba(255, 255, 255, 0.12);
    border-color: transparent;
}

/* ═══════════════════════════════════════════
   GLASS PRIMITIVE
   Every panel inherits this material
   ═══════════════════════════════════════════ */
.glass {
    position: relative;
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--glass-radius);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}
/* top specular edge — the "liquid" sheen */
.glass::before {
    content: '';
    position: absolute;
    top: 0; left: 8%; right: 8%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-highlight), transparent);
    pointer-events: none;
}
/* mouse-tracking inner glow (set via --mx/--my from JS) */
.glass-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
                rgba(255, 255, 255, 0.07), transparent 45%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.glass-glow:hover::after { opacity: 1; }

/* ── Layout ── */
.dashboard-layout {
    display: grid;
    grid-template-columns: 264px 1fr;
    gap: 20px;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════════
   SIDEBAR — floating glass column
   ═══════════════════════════════════════════ */
.sidebar {
    display: flex;
    flex-direction: column;
    padding: 28px 0 24px;
    height: calc(100vh - 40px);
    position: sticky;
    top: 20px;
}

.sidebar-header { padding: 0 24px 28px; }

.logo {
    font-family: var(--font-title);
    font-size: 2.5rem;
    letter-spacing: 3px;
    color: #fff;
    line-height: 1;
}
.logo .dot { color: var(--orange); }
.logo-sub {
    display: block;
    font-family: var(--font-label);
    font-size: 0.66rem;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 6px;
}

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

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.94rem;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.25s ease;
    position: relative;
}
.nav-item i {
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
    transition: transform 0.25s ease;
}
.nav-item:hover {
    background: var(--glass-bg);
    color: var(--text-primary);
    border-color: var(--glass-border);
}
.nav-item:hover i { transform: translateX(2px); }
.nav-item.active {
    background: var(--glass-bg-strong);
    color: var(--text-primary);
    border-color: var(--glass-border-bright);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.nav-item.active i { color: var(--orange); }
.nav-item.active::before {
    content: '';
    position: absolute;
    left: -14px; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 55%;
    border-radius: 3px;
    background: var(--orange);
    box-shadow: 0 0 12px var(--orange);
}

.nav-divider {
    font-family: var(--font-label);
    font-size: 0.68rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 18px 14px 6px;
}

.badge {
    margin-left: auto;
    font-family: var(--font-label);
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 5px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px solid transparent;
}
.agent-nova { background: rgba(56, 189, 248, 0.1); color: var(--arc-cyan); border-color: rgba(56, 189, 248, 0.2); }
.agent-ezra { background: rgba(167, 139, 250, 0.1); color: var(--arc-purple); border-color: rgba(167, 139, 250, 0.2); }
.agent-ekko { background: rgba(251, 146, 60, 0.1); color: var(--arc-orange); border-color: rgba(251, 146, 60, 0.2); }

.sidebar-footer {
    padding: 18px 20px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-top: 1px solid var(--glass-border);
    margin: 0 14px;
}

.chat-ia-btn {
    background: linear-gradient(135deg, rgba(247, 83, 24, 0.16), rgba(247, 83, 24, 0.05));
    border: 1px solid rgba(247, 83, 24, 0.35);
    color: var(--text-primary);
    padding: 12px;
    border-radius: 12px;
    font-family: var(--font-label);
    font-size: 1.05rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.chat-ia-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -80%;
    width: 60%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}
.chat-ia-btn:hover::before { left: 130%; }
.chat-ia-btn i { color: var(--orange); }
.chat-ia-btn:hover {
    border-color: var(--orange);
    box-shadow: 0 0 24px rgba(247, 83, 24, 0.25);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}
.avatar img {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--glass-border-bright);
}
.user-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.user-name { font-weight: 600; font-size: 0.92rem; }
.logout-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    width: 34px; height: 34px;
    border-radius: 10px;
    font-size: 0.85rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}
.logout-btn:hover {
    color: var(--orange);
    border-color: rgba(247, 83, 24, 0.4);
    background: rgba(247, 83, 24, 0.07);
}
.user-role {
    font-family: var(--font-label);
    color: var(--text-secondary);
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ═══════════════════════════════════════════
   MAIN
   ═══════════════════════════════════════════ */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

/* ── Top Bar (glass) ── */
.top-bar {
    height: 68px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 20px;
    z-index: 100;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    padding: 9px 18px;
    border-radius: 24px;
    width: 340px;
    transition: all 0.3s ease;
}
.search-container:focus-within {
    border-color: var(--glass-border-bright);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.03);
}
.search-container i { color: var(--text-muted); font-size: 0.9rem; }
.search-container input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    width: 100%;
    outline: none;
}
.search-container input::placeholder { color: var(--text-muted); }

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 22px;
}
.datetime-display {
    font-family: var(--font-label);
    color: var(--text-secondary);
    font-size: 1.05rem;
    letter-spacing: 1.5px;
}
.notification-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    width: 40px; height: 40px;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.05rem;
    position: relative;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.notification-btn:hover {
    color: var(--text-primary);
    border-color: var(--glass-border-bright);
    background: rgba(255, 255, 255, 0.08);
}
.notification-indicator {
    position: absolute;
    top: 8px; right: 9px;
    width: 8px; height: 8px;
    background: var(--orange);
    border-radius: 50%;
    border: 2px solid #121214;
    animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(247, 83, 24, 0.5); }
    50%      { box-shadow: 0 0 0 5px rgba(247, 83, 24, 0); }
}

/* ── Dashboard Body ── */
.dashboard-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.welcome-section {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 4px 6px 0;
}
.welcome-title {
    font-family: var(--font-title);
    font-size: 2.9rem;
    letter-spacing: 1.5px;
    font-weight: 400;
    line-height: 1;
}
.welcome-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 6px;
}
.welcome-subtitle .ezra-text { font-weight: 600; }

.quick-actions { display: flex; gap: 10px; }
.quick-btn {
    font-family: var(--font-label);
    font-size: 0.92rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 11px;
    padding: 9px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
}
.quick-btn i { color: var(--orange); font-size: 0.85rem; }
.quick-btn:hover {
    color: var(--text-primary);
    border-color: var(--glass-border-bright);
    transform: translateY(-2px);
}

/* ── KPI Grid ── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.kpi-card {
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease;
}
.kpi-card:hover {
    transform: translateY(-5px);
    border-color: var(--glass-border-bright);
}

.kpi-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--text-primary);
    flex-shrink: 0;
}
.kpi-icon.nova-color { color: var(--arc-cyan); background: rgba(56, 189, 248, 0.09); border-color: rgba(56, 189, 248, 0.2); }
.kpi-icon.ezra-color { color: var(--arc-purple); background: rgba(167, 139, 250, 0.09); border-color: rgba(167, 139, 250, 0.2); }
.kpi-icon.ekko-color { color: var(--arc-orange); background: rgba(251, 146, 60, 0.09); border-color: rgba(251, 146, 60, 0.2); }

.kpi-info { display: flex; flex-direction: column; }
.kpi-value {
    font-family: var(--font-title);
    font-size: 2.1rem;
    line-height: 1.05;
}
.kpi-label {
    font-family: var(--font-label);
    color: var(--text-secondary);
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.kpi-trend {
    margin-left: auto;
    font-family: var(--font-label);
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    padding: 3px 9px;
    border-radius: 20px;
    align-self: flex-start;
}
.trend-up   { color: #4ade80; background: rgba(74, 222, 128, 0.09); }
.trend-flat { color: var(--text-muted); background: rgba(255, 255, 255, 0.05); }

/* ── Content Grid ── */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    align-items: start;
}
.col-left, .col-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.premium-card { padding: 24px; }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.card-title {
    font-family: var(--font-label);
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.btn-text {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-label);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.2s;
}
.btn-text:hover { color: var(--orange); }

/* ── Table ── */
.table-container { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: left;
    padding-bottom: 14px;
    color: var(--text-muted);
    font-family: var(--font-label);
    font-weight: 500;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-bottom: 1px solid var(--glass-border);
}
.data-table td {
    padding: 15px 8px 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.94rem;
}
.data-table tbody tr { transition: background 0.2s ease; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.data-table tr:last-child td { border-bottom: none; padding-bottom: 4px; }
.task-client {
    font-family: var(--font-label);
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.status-badge {
    font-family: var(--font-label);
    font-size: 0.78rem;
    padding: 4px 11px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid transparent;
    white-space: nowrap;
}
.status-pending  { background: rgba(247, 83, 24, 0.09);  color: var(--orange);     border-color: rgba(247, 83, 24, 0.22); }
.status-progress { background: rgba(56, 189, 248, 0.09); color: var(--arc-cyan);   border-color: rgba(56, 189, 248, 0.22); }
.status-review   { background: rgba(167, 139, 250, 0.09);color: var(--arc-purple); border-color: rgba(167, 139, 250, 0.22); }
.status-done     { background: rgba(74, 222, 128, 0.09); color: #4ade80;           border-color: rgba(74, 222, 128, 0.22); }

/* ── Clients strip ── */
.clients-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.client-chip {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.client-chip:hover { transform: translateY(-3px); border-color: var(--glass-border-bright); }
.client-logo {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-title);
    font-size: 1.05rem;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border-bright);
    flex-shrink: 0;
}
.client-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.client-name { font-weight: 600; font-size: 0.95rem; }
.client-status {
    font-family: var(--font-label);
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.client-status::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.7);
}

/* ── Agents Activity ── */
.activity-list { display: flex; flex-direction: column; gap: 20px; }
.activity-item { display: flex; gap: 14px; }
.agent-avatar {
    width: 38px; height: 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-title);
    font-size: 1.15rem;
    color: #fff;
    flex-shrink: 0;
}
.arc-bg  { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.45); box-shadow: 0 0 16px rgba(255, 255, 255, 0.14); }
.nova-bg { background: rgba(56, 189, 248, 0.16); border: 1px solid rgba(56, 189, 248, 0.4); box-shadow: 0 0 16px rgba(56, 189, 248, 0.12); }
.ezra-bg { background: rgba(167, 139, 250, 0.16); border: 1px solid rgba(167, 139, 250, 0.4); box-shadow: 0 0 16px rgba(167, 139, 250, 0.12); }
.ekko-bg { background: rgba(251, 146, 60, 0.16); border: 1px solid rgba(251, 146, 60, 0.4); box-shadow: 0 0 16px rgba(251, 146, 60, 0.12); }

.arc-text  { color: #fff; text-shadow: 0 0 12px rgba(255, 255, 255, 0.35); }
.nova-text { color: var(--arc-cyan); }
.ezra-text { color: var(--arc-purple); }
.ekko-text { color: var(--arc-orange); }

.activity-content { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.agent-name {
    font-family: var(--font-label);
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.activity-desc { font-size: 0.92rem; line-height: 1.45; }
.activity-time { font-size: 0.78rem; color: var(--text-muted); }

/* ── Agenda ── */
.agenda-list { display: flex; flex-direction: column; gap: 6px; }
.agenda-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 12px;
    border-radius: 12px;
    transition: background 0.2s ease;
}
.agenda-item:hover { background: rgba(255, 255, 255, 0.03); }
.agenda-time {
    font-family: var(--font-label);
    font-size: 0.95rem;
    letter-spacing: 1px;
    color: var(--text-secondary);
    min-width: 48px;
}
.agenda-bar {
    width: 3px;
    height: 30px;
    border-radius: 3px;
    flex-shrink: 0;
}
.agenda-info { display: flex; flex-direction: column; min-width: 0; }
.agenda-title { font-size: 0.92rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-sub {
    font-family: var(--font-label);
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ═══════════════════════════════════════════
   CHAT IA — slide-over glass panel
   ═══════════════════════════════════════════ */
.chat-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.chat-overlay.open { opacity: 1; pointer-events: auto; }

.chat-panel {
    position: fixed;
    top: 16px; right: 16px; bottom: 16px;
    width: min(420px, calc(100vw - 32px));
    z-index: 201;
    display: flex;
    flex-direction: column;
    transform: translateX(calc(100% + 32px));
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.chat-panel.open { transform: translateX(0); }

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--glass-border);
}
.chat-header-title {
    font-family: var(--font-label);
    font-size: 1.15rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.chat-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    width: 34px; height: 34px;
    border-radius: 50%;
    font-size: 0.95rem;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-close:hover { color: #fff; border-color: var(--glass-border-bright); }

.chat-tabs {
    display: flex;
    gap: 8px;
    padding: 14px 20px 0;
}
.chat-tab {
    flex: 1;
    font-family: var(--font-label);
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 9px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    transition: all 0.25s ease;
}
.chat-tab.active-arc  { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.chat-tab.active-nova { background: rgba(56, 189, 248, 0.12); color: var(--arc-cyan); border-color: rgba(56, 189, 248, 0.35); }
.chat-tab.active-ezra { background: rgba(167, 139, 250, 0.12); color: var(--arc-purple); border-color: rgba(167, 139, 250, 0.35); }

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.chat-msg {
    max-width: 85%;
    padding: 11px 15px;
    border-radius: 15px;
    font-size: 0.92rem;
    line-height: 1.5;
    animation: msg-in 0.3s ease both;
}
@keyframes msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.chat-msg.agent {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    border-bottom-left-radius: 5px;
}
.chat-msg.user {
    align-self: flex-end;
    background: rgba(247, 83, 24, 0.14);
    border: 1px solid rgba(247, 83, 24, 0.3);
    border-bottom-right-radius: 5px;
}
.chat-msg .msg-agent-name {
    display: block;
    font-family: var(--font-label);
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.chat-input-row {
    display: flex;
    gap: 10px;
    padding: 16px 20px 20px;
    border-top: 1px solid var(--glass-border);
}
.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 11px 15px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.25s;
}
.chat-input:focus { border-color: var(--glass-border-bright); }
.chat-send {
    width: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(247, 83, 24, 0.85), rgba(247, 83, 24, 0.65));
    border: none;
    color: #fff;
    font-size: 1rem;
    transition: all 0.25s;
}
.chat-send:hover { box-shadow: 0 0 18px rgba(247, 83, 24, 0.45); }

/* ── Reveal animations ── */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    animation: reveal-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes reveal-up {
    to { opacity: 1; transform: translateY(0); }
}

/* ── Scrollbars ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* ═══════════════════════════════════════════
   VIEWS (SPA switching)
   ═══════════════════════════════════════════ */
.view { display: none; }
.view.active {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.view-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 4px 6px 0;
}
.view-title {
    font-family: var(--font-title);
    font-size: 2.6rem;
    letter-spacing: 1.5px;
    font-weight: 400;
    line-height: 1;
}
.view-subtitle {
    color: var(--text-secondary);
    font-size: 0.98rem;
    margin-top: 6px;
}

/* ── Clientes (CRM) ── */
.crm-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
.crm-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.crm-card:hover { transform: translateY(-4px); border-color: var(--glass-border-bright); }
.crm-top { display: flex; align-items: center; gap: 16px; }
.crm-logo {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-title);
    font-size: 1.25rem;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border-bright);
    flex-shrink: 0;
}
.crm-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.crm-name { font-weight: 600; font-size: 1.1rem; }
.crm-handle {
    font-family: var(--font-label);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}
.crm-services { display: flex; flex-wrap: wrap; gap: 8px; }
.service-pill {
    font-family: var(--font-label);
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 11px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}
.crm-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--glass-border);
}
.crm-stat { display: flex; flex-direction: column; }
.crm-stat-value { font-family: var(--font-title); font-size: 1.5rem; line-height: 1.1; }
.crm-stat-label {
    font-family: var(--font-label);
    font-size: 0.78rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ── Guiones ── */
.scripts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.script-card {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.script-card:hover { transform: translateY(-4px); border-color: var(--glass-border-bright); }
.script-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.script-title { font-weight: 600; font-size: 1.02rem; line-height: 1.35; }
.script-version {
    font-family: var(--font-label);
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 2px 8px;
    white-space: nowrap;
}
.script-excerpt {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.script-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
}
.script-client {
    font-family: var(--font-label);
    font-size: 0.82rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ── Proyectos ── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
.project-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.project-card:hover { transform: translateY(-4px); border-color: var(--glass-border-bright); }
.project-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.project-name { font-weight: 600; font-size: 1.08rem; }
.project-phase-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.project-phase {
    font-family: var(--font-label);
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-secondary);
}
.project-pct {
    font-family: var(--font-title);
    font-size: 1.15rem;
    color: var(--text-primary);
}
.progress-track {
    height: 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--orange), var(--arc-orange));
    box-shadow: 0 0 12px rgba(247, 83, 24, 0.45);
    transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.progress-fill.cyan   { background: linear-gradient(90deg, #0ea5e9, var(--arc-cyan));   box-shadow: 0 0 12px rgba(56, 189, 248, 0.4); }
.progress-fill.purple { background: linear-gradient(90deg, #8b5cf6, var(--arc-purple)); box-shadow: 0 0 12px rgba(167, 139, 250, 0.4); }
.progress-fill.green  { background: linear-gradient(90deg, #22c55e, #4ade80);           box-shadow: 0 0 12px rgba(74, 222, 128, 0.4); }
.project-meta {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-label);
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ── Reuniones ── */
.meetings-list { display: flex; flex-direction: column; gap: 14px; }
.meeting-item {
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.meeting-item:hover { transform: translateY(-3px); border-color: var(--glass-border-bright); }
.meeting-icon {
    width: 46px; height: 46px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    flex-shrink: 0;
}
.meeting-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.meeting-title { font-weight: 600; font-size: 0.98rem; }
.meeting-meta {
    font-family: var(--font-label);
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.meeting-actions { display: flex; gap: 8px; flex-shrink: 0; }
.glass-btn {
    font-family: var(--font-label);
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.glass-btn i { font-size: 0.8rem; color: var(--orange); }
.glass-btn:hover {
    color: var(--text-primary);
    border-color: var(--glass-border-bright);
}
.processing-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-label);
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--arc-cyan);
}
.processing-tag i { animation: spin 1.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Tareas (Kanban) ── */
.kanban {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    align-items: start;
}
.kanban-col {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
}
.kanban-col-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}
.kanban-col-title {
    font-family: var(--font-label);
    font-size: 1.05rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.kanban-count {
    margin-left: auto;
    font-family: var(--font-label);
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1px 9px;
}
.kanban-dot { width: 8px; height: 8px; border-radius: 50%; }
.kanban-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 13px;
    padding: 14px 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: grab;
    transition: transform 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
}
.kanban-card:hover { border-color: var(--glass-border-bright); transform: translateY(-2px); }
.kanban-card.dragging { opacity: 0.4; cursor: grabbing; }
.kanban-col.drag-over {
    border-color: rgba(247, 83, 24, 0.4);
    background: rgba(247, 83, 24, 0.03);
}
.kanban-task { font-size: 0.92rem; font-weight: 600; line-height: 1.4; }
.kanban-meta { display: flex; justify-content: space-between; align-items: center; }
.kanban-client {
    font-family: var(--font-label);
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.kanban-due {
    font-family: var(--font-label);
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}
.kanban-due.urgent { color: var(--orange); }

/* ── Agenda (semana) ── */
.week-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    align-items: start;
}
.day-col { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.day-col.today { border-color: rgba(247, 83, 24, 0.35); }
.day-header { display: flex; flex-direction: column; padding-bottom: 10px; border-bottom: 1px solid var(--glass-border); }
.day-name {
    font-family: var(--font-label);
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.day-num { font-family: var(--font-title); font-size: 1.6rem; line-height: 1.1; }
.day-col.today .day-num { color: var(--orange); }
.day-event {
    border-radius: 10px;
    padding: 9px 11px;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    border: 1px solid;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.day-event small {
    font-family: var(--font-label);
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    opacity: 0.75;
}
.ev-orange { background: rgba(247, 83, 24, 0.09);  border-color: rgba(247, 83, 24, 0.25);  color: #ffb39a; }
.ev-cyan   { background: rgba(56, 189, 248, 0.09); border-color: rgba(56, 189, 248, 0.25); color: #a5dcf8; }
.ev-purple { background: rgba(167, 139, 250, 0.09);border-color: rgba(167, 139, 250, 0.25);color: #cfc0fb; }
.ev-green  { background: rgba(74, 222, 128, 0.09); border-color: rgba(74, 222, 128, 0.25); color: #a7eebf; }

/* ── Promociones ── */
.promos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.promo-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.promo-card:hover { transform: translateY(-4px); border-color: var(--glass-border-bright); }
.promo-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.promo-name { font-weight: 600; font-size: 1.05rem; line-height: 1.3; }
.promo-price {
    font-family: var(--font-title);
    font-size: 2rem;
    line-height: 1;
    color: var(--orange);
}
.promo-price small {
    font-family: var(--font-label);
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}
.promo-desc { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.55; }
.promo-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
    font-family: var(--font-label);
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ── Conexión WhatsApp (admin) ── */
.conn-help {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 14px;
}
.conn-help code {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    border-radius: 5px;
    padding: 1px 6px;
}
.conn-textarea, .conn-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 14px;
    color: var(--text-primary);
    font-family: 'SF Mono', Menlo, monospace;
    font-size: 0.9rem;
    outline: none;
    resize: vertical;
    transition: border-color 0.25s;
}
.conn-textarea:focus, .conn-input:focus { border-color: rgba(247, 83, 24, 0.5); }
.conn-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.conn-msg {
    font-family: var(--font-label);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}
.conn-output {
    margin-top: 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 180px;
    overflow-y: auto;
}
.conn-code {
    margin-top: 14px;
    text-align: center;
    font-family: var(--font-title);
    font-size: 2.6rem;
    letter-spacing: 6px;
    color: var(--orange);
    text-shadow: 0 0 24px rgba(247, 83, 24, 0.45);
    background: rgba(247, 83, 24, 0.07);
    border: 1px solid rgba(247, 83, 24, 0.3);
    border-radius: 14px;
    padding: 18px;
}

/* ── Responsive ── */
@media (max-width: 1180px) {
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .clients-strip { grid-template-columns: 1fr; }
    .scripts-grid, .promos-grid { grid-template-columns: repeat(2, 1fr); }
    .week-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
    .content-grid { grid-template-columns: 1fr; }
    .crm-grid, .projects-grid { grid-template-columns: 1fr; }
    .kanban { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .scripts-grid, .promos-grid { grid-template-columns: 1fr; }
    .week-grid { grid-template-columns: 1fr; }
    .meeting-item { flex-wrap: wrap; }
    .meeting-actions { width: 100%; justify-content: flex-end; }
}
@media (max-width: 768px) {
    body { cursor: auto; }
    a, button, input, textarea { cursor: pointer; }
    .custom-cursor { display: none; }
    .dashboard-layout {
        grid-template-columns: 1fr;
        padding: 12px;
        gap: 14px;
    }
    .sidebar { display: none; }
    .top-bar { top: 12px; padding: 0 16px; }
    .search-container { width: 100%; max-width: 220px; }
    .datetime-display { display: none; }
    .welcome-title { font-size: 2.2rem; }
    .quick-actions { display: none; }
}
@media (max-width: 480px) {
    .kpi-grid { grid-template-columns: 1fr; }
}
