/* PARIS14A CRM v8.1 — Facebook-inspired friendly design */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Helvetica, Arial, sans-serif; }

:root {
    /* Primary — teal modern */
    --gold: #0d9488;
    --gold-light: #14b8a6;
    --gold-dark: #0f766e;
    --gold-subtle: rgba(13,148,136,0.04);
    --gold-hover: rgba(13,148,136,0.07);
    --charcoal: #1c1e21;
    --navy: #1e293b;

    /* Backgrounds — Facebook-style warm gray */
    --bg: #f0f2f5;
    --bg-warm: #f7f8fa;
    --white: #ffffff;
    --card: #ffffff;

    /* Grays — Facebook palette */
    --gray-50: #f7f8fa;
    --gray-100: #e4e6eb;
    --gray-200: #dadde1;
    --gray-300: #ccd0d5;
    --gray-400: #8a8d91;
    --gray-500: #65676b;
    --gray-600: #4b4f56;
    --gray-700: #3a3b3c;
    --gray-800: #242526;
    --gray-900: #18191a;

    /* Semantic */
    --light-gray: var(--gray-100);
    --mid-gray: var(--gray-200);
    --dark-gray: var(--gray-500);
    --text: #050505;
    --text-light: #65676b;
    --text-muted: #8a8d91;
    --border: #dadde1;
    --border-light: #e4e6eb;

    /* Status */
    --success: #31a24c;
    --success-bg: #e7f3e8;
    --success-border: #b7ddb0;
    --error: #e4405f;
    --error-bg: #fce8ec;
    --error-border: #f5c6ce;
    --warning: #14b8a6;
    --warning-bg: #fff3e0;
    --warning-border: #ffe0b2;
    --info: #1877f2;
    --info-bg: #e7f0fd;
    --info-border: #b6d4fe;

    /* Sidebar */
    --sidebar-w: 220px;
    --sidebar-collapsed-w: 56px;
    --sidebar-bg: #242526;
    --sidebar-hover: rgba(255,255,255,0.08);
    --sidebar-active: rgba(13,148,136,0.18);
    --sidebar-text: rgba(255,255,255,0.78);
    --sidebar-text-active: #fff;

    /* Topbar */
    --topbar-h: 48px;

    /* Shadows — Facebook-style softer */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.1);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 20px rgba(0,0,0,0.12);
    --shadow-xl: 0 12px 28px rgba(0,0,0,0.15);
    --shadow-gold: 0 2px 12px rgba(13,148,136,0.15);
    --shadow-focus: 0 0 0 2px rgba(13,148,136,0.20);

    /* Radii — Facebook uses generous rounding */
    --radius: 8px;
    --radius-sm: 6px;
    --radius-xs: 4px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* Transitions */
    --transition: 0.2s ease;
    --transition-slow: 0.3s ease;
    --transition-bounce: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== DARK MODE — Attio/Linear inspired ===== */
body.dark-mode {
    --bg: #0a0f1a;
    --bg-warm: #0d1220;
    --white: #141b2d;
    --card: #141b2d;
    --gray-50: #111827;
    --gray-100: #1a2236;
    --gray-200: #243044;
    --gray-300: #334155;
    --gray-400: #64748b;
    --gray-500: #94a3b8;
    --gray-600: #b0bec5;
    --gray-700: #cfd8dc;
    --gray-800: #e2e8f0;
    --gray-900: #f1f5f9;
    --text: #e8ecf1;
    --text-light: #94a3b8;
    --text-muted: #64748b;
    --charcoal: #f1f5f9;
    --navy: #f1f5f9;
    --border: #1e293b;
    --border-light: #172033;
    --sidebar-bg: #1c1917;
    --sidebar-hover: rgba(255,255,255,0.05);
    --sidebar-active: rgba(13,148,136,0.18);
    --sidebar-text: rgba(255,255,255,0.65);
    --gold-subtle: rgba(13,148,136,0.10);
    --gold-hover: rgba(13,148,136,0.16);
    --success-bg: rgba(34,197,94,0.10);
    --success-border: rgba(34,197,94,0.20);
    --error-bg: rgba(239,68,68,0.10);
    --error-border: rgba(239,68,68,0.20);
    --warning-bg: rgba(245,158,11,0.10);
    --warning-border: rgba(245,158,11,0.20);
    --info-bg: rgba(59,130,246,0.10);
    --info-border: rgba(59,130,246,0.20);
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.20);
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.25);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.30);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.35);
    --shadow-xl: 0 16px 40px rgba(0,0,0,0.40);
    --shadow-gold: 0 4px 16px rgba(13,148,136,0.20);
    color-scheme: dark;
}
body.dark-mode .sidebar-brand { background: var(--sidebar-bg); border-color: rgba(255,255,255,0.04); }
body.dark-mode .sidebar-brand svg { fill: #fff; }
body.dark-mode .login-screen { background: var(--bg); }
body.dark-mode .login-box { border-color: var(--border); }
body.dark-mode .pin-digit { background: var(--gray-100); border-color: var(--border); color: var(--text); }
body.dark-mode .pin-digit:focus { background: var(--card); }
body.dark-mode .topbar { border-color: var(--border); }
body.dark-mode .data-table th { background: var(--gray-100); }
body.dark-mode .print-articles-table th { background: var(--gray-100); color: var(--text); }
body.dark-mode .section-title { background: var(--gray-100); }
body.dark-mode .article-num { background: var(--gold); }
body.dark-mode input, body.dark-mode select, body.dark-mode textarea { background: var(--gray-100); color: var(--text); border-color: var(--border); }
body.dark-mode input:hover, body.dark-mode select:hover, body.dark-mode textarea:hover { border-color: var(--gray-300); }
body.dark-mode input:focus, body.dark-mode select:focus, body.dark-mode textarea:focus { background: var(--card); border-color: var(--gold); }
body.dark-mode ::selection { background: rgba(13,148,136,0.30); }
body.dark-mode ::-webkit-scrollbar-thumb { background: var(--gray-300); }
body.dark-mode .period-tab.active { background: var(--card); box-shadow: var(--shadow-sm); }
body.dark-mode .badge-activ { color: #2dd4bf; }
body.dark-mode .badge-in_lucru { color: #2dd4bf; }
body.dark-mode .badge-finalizat { color: #60a5fa; }
body.dark-mode .badge-anulat { color: #f87171; }

/* ===== BASE ===== */
html { scroll-behavior: smooth; }
body {
    font-family: 'Segoe UI', Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    line-height: 1.45;
    font-size: 14px;
    letter-spacing: normal;
}
::selection { background: rgba(24,119,242,0.15); color: var(--charcoal); }

/* ===== LOGIN ===== */
.login-screen {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh;
    background: var(--gray-50);
    padding: 20px; position: relative; overflow: hidden;
}
.login-screen::before {
    content: ''; position: absolute;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(13,148,136,0.06) 0%, transparent 70%);
    top: -100px; right: -100px; border-radius: 50%;
}
.login-screen::after {
    content: ''; position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(13,148,136,0.04) 0%, transparent 70%);
    bottom: -80px; left: -80px; border-radius: 50%;
}
.login-box {
    background: var(--white); padding: 48px 40px; border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    text-align: center; width: 100%; max-width: 400px;
    position: relative; z-index: 1; animation: loginFadeIn 0.5s ease;
    border: 1px solid var(--border-light);
}
@keyframes loginFadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.login-logo { font-size: 30px; font-weight: 800; color: var(--charcoal); letter-spacing: 3px; margin-bottom: 4px; }
.login-logo span { color: var(--gold); }
.login-logo-360 { font-size: 36px; font-weight: 800; color: var(--charcoal); letter-spacing: 1px; margin-bottom: 4px; }
.login-logo-360 span { color: var(--gold); font-weight: 900; }
.login-subtitle { color: var(--dark-gray); font-size: 12px; margin-bottom: 36px; font-style: normal; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600; }
.pin-container { display: flex; gap: 14px; justify-content: center; margin-bottom: 24px; }
.pin-digit {
    width: 58px; height: 68px; font-size: 28px; font-weight: 700;
    text-align: center; border: 2px solid var(--border); border-radius: 12px;
    color: var(--charcoal); background: var(--gray-50); transition: var(--transition);
    caret-color: var(--gold);
}
.pin-digit:focus { outline: none; border-color: var(--gold); box-shadow: var(--shadow-focus); background: var(--white); transform: translateY(-2px); }
.login-error { color: var(--error); font-size: 13px; margin-top: 8px; min-height: 20px; font-weight: 600; }
.login-version { font-size: 13px; color: var(--text-muted); margin-top: 20px; }

/* ===== APP LAYOUT ===== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 120;
    transition: width var(--transition-slow);
    overflow: hidden;
}
.sidebar-brand {
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 10px;
    background: var(--sidebar-bg);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.sidebar-brand svg { height: 22px; width: auto; fill: #ffffff; flex-shrink: 0; }
.sidebar-brand .sidebar-version {
    font-size: 9px; color: var(--gray-500);
    font-weight: 600; letter-spacing: 0.5px;
    margin-left: auto;
}
.sidebar-brand .sidebar-360 {
    font-size: 13px; color: var(--gold-light);
    font-weight: 800; letter-spacing: 1px;
    margin-left: auto;
    background: rgba(13,148,136,0.15);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}
.sidebar-user-name {
    font-size: 12px; color: var(--sidebar-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 120px;
}

.sidebar-nav {
    flex: 1;
    padding: 8px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.45);
    padding: 14px 14px 6px;
    text-transform: uppercase;
}
.sidebar-section-label:first-child { padding-top: 6px; }
.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    white-space: nowrap;
}
.sidebar-nav-item .material-icons-round { font-size: 18px; flex-shrink: 0; width: 20px; text-align: center; opacity: 0.9; }
.sidebar-nav-item:hover { background: var(--sidebar-hover); color: rgba(255,255,255,0.9); }
.sidebar-nav-item:hover .material-icons-round { opacity: 1; }
.sidebar-nav-item.active {
    background: var(--sidebar-active);
    color: #2dd4bf;
    font-weight: 600;
}
.sidebar-nav-item.active .material-icons-round { color: #2dd4bf; opacity: 1; }
.sidebar-counter {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.08);
    padding: 1px 7px;
    border-radius: var(--radius-full);
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
}
.sidebar-nav-item.active .sidebar-counter { color: #2dd4bf; background: rgba(45,212,191,0.12); }

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.15);
}
.sidebar-logout-btn {
    margin-left: auto;
    background: none; border: none; color: rgba(255,255,255,0.4);
    cursor: pointer; padding: 6px; border-radius: 6px; transition: var(--transition);
    display: flex; align-items: center; justify-content: center;
}
.sidebar-logout-btn:hover { color: #ef4444; background: rgba(255,255,255,0.08); }
.sidebar-quick-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.06);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    color: rgba(255,255,255,0.4);
    font-size: 12px;
}
.sidebar-quick-search:hover { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); }
.sidebar-quick-search .material-icons-round { font-size: 16px; }
.sidebar-quick-search .kbd-shortcut {
    margin-left: auto;
    font-size: 10px;
    padding: 2px 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    font-family: monospace;
    letter-spacing: 0.5px;
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s;
    cursor: pointer;
}
.sidebar-user:hover { background: rgba(255,255,255,0.06); }
.sidebar-user-badge {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, #0d9488, #818cf8);
    color: #fff;
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(13,148,136,0.3);
}
.sidebar-user-name { flex: 1; }
.sidebar-user-role {
    font-size: 10px;
    color: rgba(255,255,255,0.35);
    font-weight: 400;
}
.sidebar-actions {
    display: flex;
    gap: 2px;
    padding: 0 4px;
}
.sidebar-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px;
    border: none;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.6);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0;
    transition: all 0.2s;
}
.sidebar-action-btn:hover { background: rgba(255,255,255,0.14); color: #fff; transform: translateY(-1px); }
.sidebar-action-btn:active { transform: translateY(0); }
.sidebar-action-btn .material-icons-round { font-size: 18px; font-family: 'Material Icons Round'; }

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

/* ===== TOPBAR ===== */
.topbar {
    background: var(--white);
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar-brand { display: none; }
.topbar-breadcrumb {
    display: flex; align-items: center; gap: 2px;
    font-size: 14px; color: var(--text);
}
.topbar-breadcrumb .bc-sep { font-size: 16px; color: var(--gray-400); }
.topbar-breadcrumb .bc-link {
    color: var(--text-muted); cursor: pointer; text-decoration: none;
    transition: color 0.15s;
}
.topbar-breadcrumb .bc-link:hover { color: var(--gold); }
.topbar-breadcrumb .bc-current { font-weight: 600; color: var(--navy); }
.topbar-breadcrumb .bc-icon { font-size: 16px; vertical-align: -3px; margin-right: 4px; opacity: 0.7; }
.topbar-breadcrumb .bc-link .bc-icon { color: inherit; }
.topbar-breadcrumb .bc-sep { margin: 0 4px; vertical-align: -4px; }
/* Facebook-style search bar in topbar */
.topbar-search-google {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius-full);
    padding: 9px 16px;
    cursor: pointer;
    transition: var(--transition);
    min-width: 320px;
    max-width: 480px;
    flex: 1;
    margin: 0 24px;
}
.topbar-search-google:hover {
    background: var(--gray-200);
}
.topbar-right { display: flex; align-items: center; gap: 4px; }
.topbar-btn {
    background: none; border: none; color: var(--text-light); cursor: pointer;
    padding: 8px; border-radius: var(--radius-full); transition: var(--transition);
    display: flex; align-items: center; justify-content: center; position: relative;
    width: 40px; height: 40px;
}
.topbar-btn:hover { color: var(--text); background: var(--gray-100); }
.topbar-btn:active { transform: scale(0.94); }
.topbar-btn .material-icons-round { font-size: 20px; }

.user-badge {
    color: var(--white); font-size: 12px; font-weight: 700;
    width: 36px; height: 36px; background: linear-gradient(135deg, #0d9488, #14b8a6);
    border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center;
    letter-spacing: 0.3px; cursor: pointer;
}

/* Notification */
.notification-badge {
    position: absolute; top: 2px; right: 2px; background: var(--error);
    color: white; border-radius: var(--radius-full); min-width: 16px; height: 16px;
    font-size: 9px; font-weight: 700; display: flex; align-items: center;
    justify-content: center; padding: 0 4px;
    box-shadow: 0 0 0 2px var(--white);
}
.notification-dropdown {
    display: none; position: absolute; top: 48px; right: 0;
    background: var(--white); border-radius: var(--radius); width: 340px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08); border: none;
    max-height: 420px; overflow-y: auto; z-index: 200;
    animation: dropIn 0.2s ease;
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.notification-dropdown.show { display: block; }
.user-dropdown {
    display: none; position: absolute; top: 44px; right: 0;
    background: var(--white); border-radius: var(--radius); width: 220px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08); border: none;
    z-index: 200; padding: 12px 14px;
    animation: dropIn 0.2s ease;
}
.user-dropdown.show { display: block; }
.user-dropdown-name { font-size: 13px; font-weight: 600; color: var(--text); }
.user-dropdown-role { font-size: 11px; color: var(--text-muted); }
.user-dropdown-btn {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 8px 10px; border: none; background: none; border-radius: 6px;
    font-size: 13px; color: var(--text); cursor: pointer; transition: var(--transition);
}
.user-dropdown-btn:hover { background: var(--bg-hover); color: #ef4444; }
.notification-header {
    padding: 14px 18px; font-size: 16px; font-weight: 700; color: var(--text);
    border-bottom: none;
    display: flex; align-items: center; justify-content: space-between;
}
.notification-item {
    padding: 10px 14px; margin: 0 8px; border-bottom: none; border-radius: var(--radius-sm);
    font-size: 13px; cursor: pointer; transition: var(--transition); color: var(--text);
    display: flex; align-items: flex-start; gap: 10px;
    line-height: 1.5;
}
.notification-item:hover { background: var(--gray-100); }
.notification-item:last-child { border-bottom: none; }
.notification-item .notif-icon {
    width: 28px; height: 28px; border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 14px;
}
.notification-item .notif-icon.overdue { background: var(--error-bg); color: #dc2626; }
.notification-item .notif-icon.warning { background: var(--warning-bg); color: #0d9488; }
.notification-item .notif-icon.info { background: var(--info-bg); color: #2563eb; }
.notification-item .notif-content { flex: 1; }
.notification-item .notif-title { font-weight: 600; font-size: 12px; margin-bottom: 2px; }
.notification-item .notif-meta { font-size: 11px; color: var(--gray-500); }
.notification-empty {
    padding: 24px 18px; text-align: center; color: var(--gray-400); font-size: 12px;
}

/* View header */
.view-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px; flex-wrap: wrap; gap: 8px;
}
.view-title { font-size: 18px; font-weight: 700; color: var(--text); margin: 0; }

/* Products toolbar */
.products-toolbar {
    display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap;
}
.products-toolbar input, .products-toolbar select {
    padding: 8px 14px; border: none; border-radius: var(--radius-full);
    font-size: 13px; font-family: inherit; background: var(--gray-100);
    transition: var(--transition); color: var(--text);
}
.products-toolbar input { flex: 1; min-width: 200px; }
.products-toolbar input:focus, .products-toolbar select:focus {
    outline: none; background: var(--white); box-shadow: 0 0 0 2px var(--gold);
}

/* Empty state */
.empty-state {
    text-align: center; padding: 48px 24px; color: var(--gray-400);
}
.empty-state p { margin-top: 12px; font-size: 14px; }

/* Form rows in modals */
.form-row { margin-bottom: 12px; }
.form-row label { display: block; font-size: 11px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.form-row input, .form-row select, .form-row textarea {
    width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-xs);
    font-size: 13px; font-family: inherit; background: var(--white); color: var(--text);
    transition: var(--transition);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
    outline: none; border-color: var(--gold); box-shadow: var(--shadow-focus);
}

/* ===== CONTENT AREA ===== */
.view-section { padding: 20px 24px; }
.content-area { min-height: 60vh; }

/* ===== BUTTONS — Facebook-style: friendly, rounded, clear hierarchy ===== */
.btn {
    background: var(--gray-100); color: var(--text); border: none;
    padding: 8px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
    cursor: pointer; transition: var(--transition); font-family: inherit;
    display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
    user-select: none; position: relative;
}
.btn:hover { background: var(--gray-200); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.btn .material-icons-round { font-size: 18px; }

.btn-gold {
    background: var(--gold); color: #fff; border: none;
    font-size: 13px; padding: 8px 18px;
}
.btn-gold:hover { background: var(--gold-dark); transform: none; filter: brightness(0.95); }
.btn-gold:active { transform: scale(0.98); }

.btn-danger { background: var(--error); color: #fff; border: none; padding: 10px 20px; font-size: 14px; }
.btn-danger:hover { background: #dc2626; filter: brightness(0.95); }
.btn-danger:active { transform: scale(0.98); }

.btn-ghost { background: transparent; color: var(--text-light); }
.btn-ghost:hover { background: var(--gray-100); color: var(--text); }

.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: var(--radius-xs); }
.btn-sm .material-icons-round { font-size: 15px; }
.btn-icon { padding: 8px; border-radius: var(--radius-full); background: var(--gray-100); border: none; cursor: pointer; color: var(--gray-600); display: inline-flex; align-items: center; transition: var(--transition); }
.btn-icon:hover { color: var(--gold); background: var(--gray-200); }
.btn-icon .material-icons-round { font-size: 18px; }
.btn-icon-danger:hover { color: var(--error); background: var(--error-bg); border-color: var(--error); }
.btn-delete { background: var(--error-bg); border: 1px solid var(--error-border); color: var(--error); cursor: pointer; padding: 6px 8px; display: inline-flex; align-items: center; transition: var(--transition); border-radius: var(--radius-xs); }
.btn-delete:hover { background: var(--error); color: #fff; }

/* ===== SEARCH / FILTER INPUTS ===== */
.search-input {
    padding: 10px 14px; border: none; border-radius: var(--radius-full);
    font-size: 14px; font-family: inherit; background: var(--gray-100);
    color: var(--text); transition: var(--transition); width: 200px;
}
.search-input:focus { outline: none; background: var(--white); box-shadow: 0 0 0 2px var(--gold); }
.search-input.wide { width: 100%; max-width: 300px; }
.filter-select {
    padding: 8px 14px; border: none; border-radius: var(--radius-full);
    font-size: 13px; font-family: inherit; background: var(--gray-100);
    color: var(--text); cursor: pointer; transition: var(--transition);
}
.filter-select:focus { outline: none; background: var(--white); box-shadow: 0 0 0 2px var(--gold); }

/* ===== STATUS SELECT ===== */
.status-select {
    font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-full);
    border: 1px solid transparent; cursor: pointer; transition: var(--transition);
    font-family: inherit; appearance: none; -webkit-appearance: none;
    background-repeat: no-repeat; background-position: right 6px center; background-size: 10px;
}
.status-select:hover { border-color: var(--gray-300); }
.status-select:focus { outline: none; box-shadow: var(--shadow-focus); }

/* ===== PROJECT CARDS ===== */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.project-card {
    background: var(--card); border-radius: var(--radius); padding: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1); border: none; border-left: 4px solid var(--gray-300);
    cursor: pointer; transition: var(--transition);
}
.project-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.1); transform: translateY(-1px); }
.project-card.status-activ { border-left-color: var(--success); }
.project-card.status-in_lucru { border-left-color: var(--warning); }
.project-card.status-finalizat { border-left-color: var(--info); }
.project-card.status-anulat { border-left-color: var(--error); }
.project-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.project-card-title { font-size: 14px; font-weight: 700; color: var(--text); }
.project-card-ref { font-size: 11px; color: var(--gray-500); margin-top: 2px; }
.project-card-info { font-size: 12px; color: var(--gray-500); margin-bottom: 4px; display: flex; align-items: center; gap: 4px; }
.project-card-info .material-icons-round { font-size: 14px; }
.project-card-footer {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-light);
}
.project-card-stats { font-size: 12px; color: var(--text); }
.project-card-stats .value { font-weight: 600; }
.project-card-stats .gold { color: var(--gold); }
.project-card-actions { display: flex; gap: 4px; }

/* ===== SECTION HEADER ===== */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.section-header h2 { font-size: 20px; font-weight: 700; margin: 0; color: var(--text); letter-spacing: -0.3px; }

/* ===== DATA TABLE ===== */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
    text-align: left; padding: 10px 14px; border-bottom: 2px solid var(--border);
    font-weight: 700; font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px;
    color: var(--gray-500); background: var(--gray-50);
}
.data-table td { padding: 10px 14px; border-bottom: 1px solid var(--border-light); color: var(--text); }
.data-table tr { transition: var(--transition); }
.data-table tr:hover { background: var(--gold-subtle); }
.data-table .clickable { cursor: pointer; }
.data-table .td-actions { display: flex; gap: 2px; flex-wrap: nowrap; white-space: nowrap; }
.data-table .td-name { font-weight: 600; color: var(--gold-dark); }
.data-table .td-bold { font-weight: 600; }

/* ===== BADGES ===== */
.badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: var(--radius-full);
    font-size: 10px; font-weight: 700; letter-spacing: 0.3px;
}
.badge-activ { background: var(--success-bg); color: #16a34a; }
.badge-in_lucru { background: var(--warning-bg); color: #0d9488; }
.badge-finalizat { background: var(--info-bg); color: #2563eb; }
.badge-anulat { background: var(--error-bg); color: #dc2626; }
.badge-extern { background: #f5f3ff; color: #7c3aed; }
.badge-intern { background: #ecfdf5; color: #059669; }
.badge-online { background: var(--warning-bg); color: #ca8a04; }
.badge-direct { background: var(--info-bg); color: #2563eb; }
.badge-rev { font-size: 10px; background: var(--gold); color: #fff; padding: 2px 8px; border-radius: var(--radius-full); font-weight: 600; }
.badge-revcount { font-size: 10px; background: var(--gray-400); color: #fff; padding: 2px 8px; border-radius: var(--radius-full); cursor: pointer; font-weight: 600; }
.badge-revcount:hover { background: var(--gray-500); }

/* PF/PJ Toggle - segment control */
.pf-pj-toggle {
    display: flex; gap: 0; border-radius: 12px; overflow: hidden;
    background: var(--gray-100); padding: 3px; border: none;
}
.pf-pj-btn {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 16px; border: none; background: transparent; color: var(--text-muted);
    cursor: pointer; font-size: 13px; font-weight: 600; transition: all 0.25s ease;
    border-radius: 9px; position: relative;
}
.pf-pj-btn .material-icons-round { font-size: 16px; }
.pf-pj-btn.active {
    background: var(--white); color: var(--gold);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1), 0 0 0 1px rgba(191,155,80,0.15);
}
.pf-pj-btn:not(.active):hover { color: var(--gold); background: rgba(191,155,80,0.04); }

/* ===== FORM GRID ===== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid.three-col { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
    font-size: 11px; font-weight: 700; color: var(--gray-500);
    text-transform: uppercase; letter-spacing: 0.6px;
}
.form-group input, .form-group select, .form-group textarea {
    padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 13px; font-family: inherit; background: var(--white);
    color: var(--text); transition: var(--transition);
}
.form-group input:hover, .form-group select:hover, .form-group textarea:hover { border-color: var(--gray-300); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--gold); outline: none; box-shadow: var(--shadow-focus); background: var(--white);
}
.form-group.full-width { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

/* ===== CARD PANEL ===== */
.card-panel {
    background: var(--card); border-radius: var(--radius-lg);
    padding: 18px; box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    border: none; transition: var(--transition);
}
.card-panel:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-light); }
.empty-state .material-icons-round { font-size: 44px; margin-bottom: 12px; color: var(--gray-300); }
.empty-state p, .empty-state div { font-size: 14px; max-width: 360px; margin: 0 auto; line-height: 1.5; }

/* ===== STAT MINI CARDS ===== */
.stat-mini { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.stat-mini-card {
    background: var(--card); border-radius: var(--radius);
    padding: 14px 16px; box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    border: none; flex: 1; min-width: 120px;
    transition: var(--transition);
}
.stat-mini-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.stat-mini-card .label { font-size: 10px; color: var(--gray-500); text-transform: uppercase; font-weight: 700; letter-spacing: 0.6px; }
.stat-mini-card .value { font-size: 20px; font-weight: 800; margin-top: 2px; color: var(--text); }

/* ===== ENTITY PICKER ===== */
.picker-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    z-index: 1000; display: none; align-items: center; justify-content: center;
}
.picker-overlay.show { display: flex; }
.picker-box {
    background: var(--white); border-radius: var(--radius-lg);
    width: 90%; max-width: 500px; max-height: 70vh; overflow-y: auto;
    padding: 24px; box-shadow: var(--shadow-xl); animation: modalSlide 0.25s ease;
}
.picker-box h3 { font-size: 15px; font-weight: 700; margin-bottom: 14px; color: var(--text); }
.picker-item {
    padding: 12px 14px; border-bottom: 1px solid var(--border-light);
    cursor: pointer; transition: var(--transition); border-radius: var(--radius-sm); margin-bottom: 2px;
}
.picker-item:hover { background: var(--gold-subtle); border-color: transparent; }
.picker-item:last-child { border-bottom: none; }

/* Project offers list */
.project-offers-list { margin-top: 20px; }

/* ===== PAGINATION ===== */
.table-pagination {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 12px; padding: 8px 4px; font-size: 12px; color: var(--gray-500);
}
.table-pagination .page-controls { display: flex; gap: 6px; align-items: center; }

/* ===== TABLE SUB-ROW ===== */
.data-table tr.sub-row { background: rgba(13,148,136,0.03); font-size: 12px; }
.data-table tr.sub-row td:first-child { padding-left: 28px; color: var(--gray-500); }

/* ===== DASHBOARD ===== */
.dashboard-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}
.period-tabs {
    display: flex; gap: 2px;
    background: var(--gray-100); padding: 3px; border-radius: var(--radius-sm);
}
.period-tab {
    background: none; border: none; padding: 6px 14px; border-radius: var(--radius-xs);
    font-size: 12px; font-weight: 600; color: var(--gray-500);
    cursor: pointer; transition: var(--transition); font-family: inherit;
}
.period-tab:hover { color: var(--text); }
.period-tab.active {
    background: var(--white); color: var(--gold);
    box-shadow: var(--shadow-sm); font-weight: 700;
}

.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px; margin-bottom: 16px;
}
.stat-card {
    background: var(--card); padding: 12px 14px; border-radius: var(--radius);
    border: none; box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    cursor: pointer; transition: var(--transition);
}
.stat-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.1); transform: translateY(-1px); }
.stat-card.active-filter { box-shadow: 0 0 0 2px rgba(13,148,136,0.25), 0 2px 8px rgba(0,0,0,0.08); }
.stat-label { font-size: 10px; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.8px; font-weight: 700; margin-bottom: 4px; }
.stat-value { font-size: 20px; font-weight: 800; color: var(--charcoal); line-height: 1.2; }
.stat-value.gold { color: var(--gold); }

/* Charts */
.charts-section { display: none; grid-template-columns: 1.6fr 1fr; gap: 14px; margin-bottom: 20px; }
.charts-section.show-charts { display: grid; }
.chart-card { background: var(--white); border-radius: var(--radius); padding: 18px; box-shadow: 0 1px 2px rgba(0,0,0,0.1); border: none; }
.chart-title { font-size: 12px; font-weight: 700; margin-bottom: 12px; color: var(--text); display: flex; align-items: center; gap: 6px; }
.chart-card canvas { display: block; width: 100%; }

/* Offers table */
.offers-section {
    background: var(--white); border-radius: var(--radius);
    border: none; box-shadow: 0 1px 2px rgba(0,0,0,0.1); overflow: hidden;
}
.offers-toolbar {
    display: flex; gap: 8px; padding: 12px 16px; border-bottom: none;
    flex-wrap: wrap; align-items: center;
}
.offers-toolbar input, .offers-toolbar select {
    padding: 8px 14px; border: none; border-radius: var(--radius-full);
    font-size: 13px; font-family: inherit; background: var(--gray-100);
    transition: var(--transition); color: var(--text);
}
.offers-toolbar input { flex: 1; min-width: 180px; }
.offers-toolbar input:focus, .offers-toolbar select:focus {
    outline: none; background: var(--white); box-shadow: 0 0 0 2px var(--gold);
}

.offers-table { width: 100%; border-collapse: collapse; }
.offers-table th {
    padding: 12px 16px; text-align: left; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.8px; color: var(--gray-500);
    background: var(--gray-50); border-bottom: 1px solid var(--border);
}
.offers-table td { padding: 9px 16px; border-bottom: 1px solid var(--border-light); font-size: 13px; color: var(--text); }
.offers-table tbody tr { cursor: pointer; transition: var(--transition); }
.offers-table tbody tr:hover { background: var(--gold-subtle); }
.offers-table tbody tr:active { background: var(--gold-hover); }

/* Status badges */
.status-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: var(--radius-full);
    font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
}
.status-noua, .status-Noua { background: var(--info-bg); color: #2563eb; }
.status-trimisa, .status-Trimisa { background: var(--warning-bg); color: #0d9488; }
.status-acceptata, .status-Acceptata { background: var(--success-bg); color: #16a34a; }
.status-respinsa, .status-Respinsa { background: var(--error-bg); color: #dc2626; }
.status-expirata, .status-Expirata { background: var(--gray-100); color: var(--gray-500); }

/* ===== EDITOR ===== */
.editor-area { max-width: 960px; margin: 0 auto; }
.editor-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
    padding-bottom: 16px; border-bottom: 2px solid var(--gold);
}
.editor-section {
    background: var(--white); border-radius: var(--radius);
    border: none; margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1); overflow: hidden;
}
.editor-section:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.section-title {
    padding: 14px 20px; font-size: 11px; font-weight: 800; color: var(--gold);
    display: flex; align-items: center; gap: 10px; cursor: pointer;
    transition: var(--transition); user-select: none;
    border-bottom: none;
    text-transform: uppercase; letter-spacing: 1px;
    background: var(--gray-100);
}
.section-title:hover { background: var(--gold-subtle); }
.section-title .material-icons-round { font-size: 18px; color: var(--gold); }
.section-title .expand-icon { margin-left: auto; font-size: 18px; color: var(--gray-400); transition: transform 0.25s ease; }
.section-title .expand-icon.collapsed { transform: rotate(-90deg); }
.section-content { padding: 22px 24px; }
.section-content.collapsed { display: none; }

/* Forms */
.form-row {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px; margin-bottom: 16px;
}
.form-row:last-child { margin-bottom: 0; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label {
    font-size: 10px; font-weight: 700; color: var(--gray-500);
    text-transform: uppercase; letter-spacing: 0.8px;
}
.form-field input, .form-field select, .form-field textarea {
    padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 14px; font-family: inherit; background: var(--white); color: var(--text);
    transition: var(--transition); line-height: 1.4;
}
.form-field input:hover, .form-field select:hover, .form-field textarea:hover {
    border-color: var(--gray-300);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
    outline: none; border-color: var(--gold);
    box-shadow: var(--shadow-focus);
}
.form-field input[readonly] { background: var(--gray-100); cursor: not-allowed; color: var(--gray-500); border-style: dashed; }
.form-field input::placeholder { color: var(--text-muted); font-size: 12px; }

/* ===== ARTICLE CARDS ===== */
.articles-list { display: flex; flex-direction: column; gap: 10px; }
.article-card {
    background: var(--white); border: none; border-radius: var(--radius);
    transition: var(--transition); position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.article-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.article-card.dragging { opacity: 0.5; border-color: var(--gold); }
.article-card.drag-over { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(13,148,136,0.15); }
.req-pj { font-size: 10px; color: var(--text-muted); font-weight: 400; }
.article-card.is-alternative { background: #f9f7f2; border-left: 3px solid #bbb; opacity: 0.85; }
.article-card.is-alternative .article-total { color: var(--text-muted); font-style: italic; }

.article-main { display: grid; grid-template-columns: 40px 52px 1fr; gap: 10px; padding: 14px 16px; align-items: center; }
.article-num {
    font-size: 12px; font-weight: 800; color: #fff; text-align: center;
    cursor: grab; user-select: none;
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    background: var(--gold); border-radius: var(--radius-sm);
}
.article-num:active { cursor: grabbing; transform: scale(0.95); }

.article-photo {
    width: 72px; height: 72px; border-radius: var(--radius); background: var(--gray-50);
    border: 2px dashed var(--gray-300); display: flex; align-items: center; justify-content: center;
    cursor: pointer; overflow: hidden; transition: var(--transition); flex-shrink: 0; position: relative;
}
.article-photo:hover { border-color: var(--gold); border-style: solid; background: var(--gold-subtle); }
.article-photo img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.article-photo .material-icons-round { color: var(--gray-400); font-size: 18px; }
.article-photo input[type="file"] { display: none; }

.article-fields {
    display: grid; grid-template-columns: 70px 1fr 50px 90px 60px 90px;
    gap: 8px; align-items: center;
}
.discount-wrapper {
    position: relative; display: flex; align-items: center;
}
.discount-input {
    text-align: center; font-weight: 600; color: var(--text);
    padding-right: 22px !important; width: 100%;
}
.discount-percent {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    font-size: 11px; font-weight: 700; color: var(--gray-400); pointer-events: none;
}
.discount-wrapper:has(.has-discount) {
    background: var(--gold-subtle); border-radius: var(--radius-sm);
}
.discount-input.has-discount {
    border-color: var(--gold) !important; background: var(--gold-subtle) !important;
    color: var(--gold-dark) !important;
}
.discount-wrapper:has(.has-discount) .discount-percent {
    color: var(--gold-dark);
}
.article-fields input, .article-fields select, .article-fields textarea {
    padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 13px; font-family: inherit; background: var(--white); color: var(--text);
    transition: var(--transition);
}
.article-fields input:hover, .article-fields select:hover, .article-fields textarea:hover { border-color: var(--gray-300); }
.article-fields input:focus, .article-fields select:focus, .article-fields textarea:focus {
    outline: none; border-color: var(--gold);
    box-shadow: var(--shadow-focus);
}
.article-fields textarea[name="description"] {
    line-height: 1.4; overflow: hidden; width: 100%;
}
.article-total {
    font-weight: 800; font-size: 14px; color: var(--gold-dark); text-align: right; white-space: nowrap;
    background: var(--gold-subtle); padding: 6px 10px; border-radius: var(--radius-sm);
}
.article-actions {
    display: flex; gap: 4px; padding: 4px 16px 10px; align-items: center;
    margin: 0 16px;
}
.article-actions-spacer { flex: 1; }
.article-action-btn {
    background: none; border: none; cursor: pointer; padding: 6px;
    color: var(--gray-400); transition: var(--transition); border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
}
.article-action-btn:hover { color: var(--gold-dark); background: var(--gold-subtle); }
.article-action-btn.delete:hover { color: var(--error); background: var(--error-bg); }
.article-action-btn .material-icons-round { font-size: 16px; }

.article-obs { display: none; padding: 0 12px 10px 98px; }
.article-obs.show { display: block; }
.article-obs textarea {
    width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 13px; font-family: inherit; background: var(--white); color: var(--text);
    resize: vertical; min-height: 44px; transition: var(--transition);
}
.article-obs textarea:focus { outline: none; border-color: var(--gold); box-shadow: var(--shadow-focus); }

.article-brand-row { padding: 0 12px 6px 98px; display: flex; align-items: center; gap: 8px; }
.article-brand-row label { font-size: 10px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; }
.article-brand-row select {
    padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--radius-xs);
    font-size: 12px; font-family: inherit; background: var(--white); max-width: 200px;
}

.add-article-btn {
    background: var(--gold-subtle);
    border: 2px dashed var(--gold); border-radius: var(--radius);
    padding: 18px; text-align: center; cursor: pointer; transition: var(--transition);
    font-size: 13px; font-weight: 700; color: var(--gold); font-family: inherit;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.add-article-btn:hover {
    border-color: var(--gold-dark); background: var(--gold-hover);
    border-style: solid;
}
.add-article-btn .material-icons-round { font-size: 20px; }

/* ===== TOTALS ===== */
.totals-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.total-row {
    display: flex; justify-content: space-between; padding: 10px 12px;
    border-bottom: 1px solid var(--border-light); font-size: 13px; align-items: center;
    border-radius: var(--radius-xs); transition: var(--transition);
}
.total-row:hover { background: var(--gray-50); }
.total-row:last-child { border-bottom: none; }
.total-row .total-label { color: var(--gray-500); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; }
.total-row .total-value { font-weight: 700; color: var(--text); font-size: 14px; }
.total-row.grand {
    font-size: 16px; font-weight: 800; border-top: 3px solid var(--gold);
    padding-top: 16px; margin-top: 8px; color: var(--charcoal); border-bottom: none;
    background: var(--gold-subtle);
    margin: 8px -24px 0; padding: 18px 24px; border-radius: var(--radius);
}
.total-row.grand .total-label { color: var(--charcoal); font-size: 13px; font-weight: 800; }
.total-row.grand .total-value { color: var(--gold); font-size: 20px; font-weight: 800; }

/* ===== MODALS ===== */
.modal, .modal-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    z-index: 1000; align-items: center; justify-content: center; padding: 20px;
}
.modal.show, .modal-overlay.show { display: flex; }
.modal-box {
    background: var(--white); border-radius: 14px; width: 100%; max-width: 520px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.1); padding: 20px; max-height: 85vh; overflow-y: auto;
    animation: modalSlide 0.2s ease; border: none;
}
@keyframes modalSlide { from { opacity: 0; transform: scale(0.97) translateY(6px); } to { opacity: 1; transform: none; } }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-title { font-size: 16px; font-weight: 700; color: var(--charcoal); letter-spacing: -0.2px; }
.modal-close {
    background: var(--gray-100); border: none; width: 30px; height: 30px;
    border-radius: var(--radius-full); cursor: pointer; display: flex; align-items: center;
    justify-content: center; transition: var(--transition);
}
.modal-close:hover { background: var(--gray-200); transform: rotate(90deg); }
.modal-close .material-icons-round { font-size: 15px; color: var(--text); }
.modal-actions { display: flex; flex-direction: column; gap: 6px; }
.modal-btn {
    padding: 12px 16px; border: none; border-radius: var(--radius);
    background: var(--gray-100); font-size: 13px; font-weight: 600; cursor: pointer;
    transition: var(--transition); font-family: inherit; text-align: left;
    display: flex; align-items: center; gap: 10px; color: var(--text);
}
.modal-btn:hover { background: var(--gold-subtle); transform: translateX(3px); }
.modal-btn .material-icons-round { color: var(--gold); font-size: 18px; }

/* ===== PRODUCT LIBRARY ===== */
.product-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 12px; border: none; border-radius: var(--radius-sm);
    margin-bottom: 4px; transition: var(--transition); cursor: pointer;
}
.product-item:hover { background: var(--gray-100); }
.product-item-info { flex: 1; }
.product-item-code { font-size: 10px; color: var(--gray-500); font-weight: 700; letter-spacing: 0.5px; }
.product-item-name { font-size: 13px; font-weight: 600; color: var(--text); }
.product-item-price { font-size: 13px; color: var(--gold); font-weight: 700; }
.product-item-actions { display: flex; gap: 4px; }

/* ===== ACTIVITY LOG ===== */
.activity-item {
    padding: 10px 12px; border-left: 3px solid var(--gray-200);
    border-bottom: 1px solid var(--border-light); margin-bottom: 4px;
    transition: var(--transition); border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
}
.activity-item:hover { background: var(--gray-50); }
.activity-item:last-child { border-bottom: none; }
.activity-item.created { border-left-color: var(--success); }
.activity-item.updated { border-left-color: var(--info); }
.activity-item.deleted { border-left-color: var(--error); }
.activity-item.exported { border-left-color: var(--gold); }
.activity-item-type { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.activity-item-type.created { color: var(--success); }
.activity-item-type.updated { color: var(--info); }
.activity-item-type.deleted { color: var(--error); }
.activity-item-type.exported { color: var(--gold); }
.activity-item-user { font-size: 13px; font-weight: 600; color: var(--text); }
.activity-item-time { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.activity-item-details { font-size: 12px; color: var(--text-light); margin-top: 2px; font-style: italic; }

/* ===== TEMPLATES ===== */
.template-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px; border: none; border-radius: var(--radius-sm);
    margin-bottom: 4px; transition: var(--transition);
}
.template-item:hover { background: var(--gray-100); }
.template-item-info { flex: 1; }
.template-item-name { font-size: 13px; font-weight: 600; color: var(--text); }
.template-item-created { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.template-item-actions { display: flex; gap: 4px; }

/* ===== PRINT / PDF ===== */
.print-section {
    display: none; max-width: 210mm; margin: 0 auto;
    padding: 12px 28px; background: #fff; color: #222;
    font-size: 13px; line-height: 1.7;
}
.print-header { text-align: center; padding-bottom: 16px; margin-bottom: 20px; border-bottom: 2px solid var(--gold); }
.print-logo { font-size: 22px; font-weight: 800; letter-spacing: 2px; }
.print-logo span { color: var(--gold); }
.print-logo-img { max-width: 120px; height: auto; display: block; margin: 0 auto 4px; }
.print-tagline { font-style: italic; color: #999; font-size: 10px; letter-spacing: 1px; }
.print-title { font-size: 16px; font-weight: 800; color: #111827; margin-bottom: 16px; }
.print-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.print-meta-block { font-size: 13px; line-height: 1.8; }
.print-meta-block strong { font-weight: 700; }
.print-client-box { background: #faf9f6; padding: 14px; border-radius: 8px; border: 1px solid #e5e7eb; margin-bottom: 24px; }
.print-client-name { font-size: 13px; font-weight: 700; margin-bottom: 4px; }

.print-articles-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 12px; }
.print-articles-table th {
    background: #1b2431; color: #fff; padding: 8px 10px; text-align: left;
    font-size: 9px; text-transform: uppercase; letter-spacing: 0.8px; font-weight: 700;
}
.print-articles-table td { padding: 8px 10px; border-bottom: 1px solid #e5e7eb; vertical-align: top; }
.print-articles-table .item-desc-cell { font-size: 11px; line-height: 1.5; max-width: 280px; }
.print-articles-table .item-desc-cell br { line-height: 1.3; }
.print-obs-row td { font-style: italic; color: #666; font-size: 9px; background: #f9fafb !important; padding: 4px 10px 4px 70px; line-height: 1.4; word-break: break-word; }

.print-totals { text-align: right; margin-bottom: 28px; page-break-inside: avoid; break-inside: avoid; }
.print-total-row { display: flex; justify-content: flex-end; gap: 20px; padding: 6px 0; font-size: 13px; }
.print-total-row.grand { font-size: 14px; font-weight: 800; border-top: 2px solid var(--gold); padding-top: 10px; margin-top: 6px; color: #111827; }
.print-total-label { min-width: 120px; text-align: right; }
.print-total-value { min-width: 100px; text-align: right; }

.print-terms { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; font-size: 10px; page-break-inside: avoid; }
.print-term-item { padding: 8px 12px; background: #f9fafb; border-radius: 6px; }
.print-term-label { font-weight: 700; color: #666; font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; }
.print-term-value { font-weight: 600; margin-top: 2px; }

.print-legal { font-size: 9px; color: #888; line-height: 1.8; font-style: italic; margin-bottom: 20px; padding: 14px; background: #f9fafb; border-radius: 8px; border-left: 3px solid var(--gold); }
.print-bank { text-align: center; padding: 12px; background: #1b2431; color: #fff; border-radius: 8px; margin-bottom: 24px; font-size: 13px; font-weight: 600; page-break-inside: avoid; }
.print-footer { text-align: center; font-size: 10px; color: #999; border-top: 1px solid #e5e7eb; padding-top: 16px; line-height: 1.8; }
.print-footer strong { color: #111827; }

@media print {
    body { background: #fff !important; }
    .sidebar, .topbar, .view-section, .login-screen, .modal { display: none !important; }
    .print-section { display: block !important; padding: 20px; box-shadow: none; margin-left: 0 !important; }
}

/* ===== PREVIEW TOOLBAR ===== */
.preview-toolbar {
    position: fixed; top: 0; left: 0; right: 0;
    background: var(--charcoal); color: #fff; padding: 10px 24px;
    display: flex; justify-content: center; gap: 10px; z-index: 2000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.preview-toolbar .btn { color: #fff; border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.1); }
.preview-toolbar .btn:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.3); }
.preview-toolbar .btn.btn-gold { background: var(--gold); border-color: var(--gold); }

/* ===== ATTACHMENTS ===== */
.attachments-section {
    background: var(--gray-100); border-radius: var(--radius-sm);
    padding: 14px; margin-top: 12px; border: none;
}
.attachments-header { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 12px; margin-bottom: 10px; color: var(--text); }
.attachments-list { display: flex; flex-direction: column; gap: 5px; }
.attachment-item {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--white); padding: 8px 10px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); font-size: 12px; transition: var(--transition);
}
.attachment-item:hover { border-color: var(--gray-300); }
.attachment-info { display: flex; align-items: center; gap: 8px; flex: 1; }
.attachment-name { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.attachment-size { color: var(--text-muted); font-size: 10px; }
.attachment-actions { display: flex; gap: 4px; }
.attachment-btn {
    background: none; border: none; cursor: pointer; padding: 4px 6px;
    color: var(--text-light); transition: var(--transition); font-size: 12px; border-radius: var(--radius-xs);
}
.attachment-btn:hover { color: var(--text); background: var(--gray-100); }
.attachment-btn.delete:hover { color: var(--error); background: var(--error-bg); }
.attachment-upload {
    display: flex; align-items: center; gap: 8px; cursor: pointer;
    padding: 8px 12px; background: var(--white); border: 2px dashed var(--gold);
    border-radius: var(--radius-sm); color: var(--gold); font-size: 12px; font-weight: 600;
    transition: var(--transition);
}
.attachment-upload:hover { background: var(--gold-subtle); border-style: solid; }

/* ===== EMAIL MODULE ===== */
.email-toolbar {
    display: flex; align-items: center; gap: 12px; padding: 12px 20px;
    background: var(--white); border-radius: var(--radius); margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}
.email-toolbar select {
    padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 13px; background: var(--white); color: var(--text); outline: none;
}
.email-toolbar select:focus { border-color: var(--primary); }
.email-toolbar .email-search-wrap {
    flex: 1; display: flex; gap: 8px;
}
.email-toolbar .email-search-wrap input {
    flex: 1; padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 13px; outline: none;
}
.email-toolbar .email-search-wrap input:focus { border-color: var(--primary); }

.email-list {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); overflow: hidden;
}
.email-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px; border-bottom: 1px solid var(--gray-100);
    cursor: pointer; transition: var(--transition);
}
.email-item:last-child { border-bottom: none; }
.email-item:hover { background: var(--gray-50); }
.email-item.email-unread { background: var(--primary-bg); }
.email-item.email-unread:hover { background: #dbeafe; }
.email-item.email-unread .email-item-from { font-weight: 700; }
.email-item.email-unread .email-item-subject { font-weight: 600; color: var(--text); }

.email-avatar {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 14px; text-transform: uppercase;
}
.email-item-left {
    display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0;
}
.email-item-content { flex: 1; min-width: 0; }
.email-item-from {
    font-size: 13px; font-weight: 500; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.email-item-subject {
    font-size: 12px; color: var(--text-light);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px;
}
.email-item-right { flex-shrink: 0; text-align: right; min-width: 60px; }
.email-item-date { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

.email-pagination {
    display: flex; justify-content: center; align-items: center; gap: 8px;
    padding: 10px; margin-top: 12px;
}
.email-pagination .btn { padding: 6px 14px; font-size: 12px; }

/* Email Overlay - Facebook Messenger style panel */
.email-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 5000;
    display: flex; justify-content: center; align-items: stretch;
}
.email-overlay-backdrop {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
}
.email-panel {
    position: relative; z-index: 1;
    width: 100%; max-width: 680px;
    background: var(--white); margin: 0 auto;
    display: flex; flex-direction: column;
    box-shadow: 0 0 40px rgba(0,0,0,0.2);
    animation: slideUp 0.15s ease;
}
.email-panel-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 14px; gap: 10px;
    border-bottom: 1px solid var(--gray-100);
    background: var(--white); flex-shrink: 0;
}
.email-close-btn:hover { background: var(--gray-100) !important; }
.email-ai-summary {
    padding: 10px 16px; background: #fffbeb; border-bottom: 1px solid #fde68a;
    flex-shrink: 0;
}
.email-panel-meta {
    padding: 12px 16px; border-bottom: 1px solid var(--gray-100);
    flex-shrink: 0; background: var(--gray-50);
}
.email-panel-body {
    flex: 1; overflow-y: auto; padding: 16px;
    font-size: 14px; line-height: 1.7; color: var(--text);
    word-break: break-word;
}
.email-panel-body img { max-width: 100%; height: auto; }

.email-empty {
    text-align: center; padding: 60px 20px; color: var(--text-muted);
}
.email-empty .material-icons-round { font-size: 48px; margin-bottom: 12px; opacity: 0.3; }

/* ===== PREVIEW TOOLBAR FIXED ===== */
.preview-toolbar-fixed {
    position: fixed; top: 0; left: 0; right: 0; z-index: 9000;
    background: var(--charcoal); padding: 12px 24px;
    display: flex; align-items: center; gap: 12px; justify-content: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.preview-toolbar-fixed .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,0.3); }
.preview-toolbar-fixed .btn:hover { background: rgba(255,255,255,0.1); }
.preview-toolbar-fixed .btn-gold { background: var(--gold); color: #fff; border-color: var(--gold); }

/* ===== TOAST ===== */
.toast {
    position: fixed; top: 60px; right: 20px; z-index: 9999;
    min-width: 240px; max-width: 380px;
    padding: 12px 18px; border-radius: var(--radius); font-size: 13px; font-weight: 600;
    animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-lg); display: flex; align-items: center;
    transition: opacity 0.3s, transform 0.3s;
}
.toast.success { background: var(--success-bg); color: #166534; border: 1px solid var(--success-border); }
.toast.error { background: var(--error-bg); color: #991b1b; border: 1px solid var(--error-border); }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

/* ===== QUICK PREVIEW OVERLAY ===== */
.quick-preview-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    z-index: 1100; align-items: center; justify-content: center; padding: 30px;
}
.quick-preview-overlay.show { display: flex; }
.quick-preview-box {
    background: var(--white); border-radius: var(--radius-lg); width: 100%; max-width: 560px;
    box-shadow: var(--shadow-xl); overflow: hidden; animation: qpSlide 0.25s ease;
}
@keyframes qpSlide { from { opacity: 0; transform: scale(0.96) translateY(10px); } to { opacity: 1; transform: none; } }
.qp-header { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.qp-nr { font-weight: 700; font-size: 14px; color: var(--charcoal); }
.qp-close {
    background: var(--gray-100); border: none; width: 26px; height: 26px; border-radius: var(--radius-full);
    cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.qp-close:hover { background: var(--gray-200); transform: rotate(90deg); }
.qp-close .material-icons-round { font-size: 14px; color: var(--text); }
.qp-body { padding: 18px; }
.qp-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; border-bottom: 1px solid var(--border-light); }
.qp-row:last-child { border-bottom: none; }
.qp-label { color: var(--gray-500); }
.qp-value { font-weight: 600; color: var(--text); }
.qp-items { margin-top: 10px; }
.qp-item { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; border-bottom: 1px solid var(--border-light); }
.qp-total {
    display: flex; justify-content: space-between; padding: 8px 0 0;
    font-size: 14px; font-weight: 700; color: var(--gold);
    border-top: 2px solid var(--gold); margin-top: 6px;
}
.qp-actions { padding: 10px 18px; border-top: 1px solid var(--border); display: flex; gap: 6px; justify-content: flex-end; }

/* ===== STAR RATING ===== */
.star-rating { display: flex; gap: 4px; }
.star-rating .star { font-size: 20px; cursor: pointer; color: var(--gray-200); transition: var(--transition-bounce); user-select: none; }
.star-rating .star.active { color: #14b8a6; }
.star-rating .star:hover { color: #2dd4bf; transform: scale(1.15); }

/* ===== UTILS ===== */
.hidden { display: none !important; }
.text-gold { color: var(--gold); }
.back-link {
    display: inline-flex; align-items: center; gap: 5px;
    color: var(--gold); font-size: 13px; font-weight: 600;
    cursor: pointer; margin-bottom: 12px;
    padding: 5px 10px; border-radius: var(--radius-sm); transition: var(--transition);
}
.back-link:hover { background: var(--gold-subtle); text-decoration: none; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ===== AUTO-SAVE ===== */
@keyframes softPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
#autoSaveIndicator { animation: softPulse 3s ease infinite; }

/* ===== PAGE TRANSITIONS ===== */
@keyframes viewFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes viewFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-4px); }
}
.view-section[style*="display: block"],
.view-section[style*="display:block"] {
    animation: viewFadeIn 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* ===== MICRO-INTERACTIONS — Buttons ===== */
.btn {
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.btn:active {
    transform: scale(0.97) translateY(1px);
    transition-duration: 0.08s;
}
.btn-gold:hover {
    transform: translateY(-2px);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-gold:active {
    transform: scale(0.97);
    transition-duration: 0.08s;
}
.btn-icon {
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.btn-icon:active {
    transform: scale(0.90);
    transition-duration: 0.06s;
}

/* ===== MICRO-INTERACTIONS — Cards ===== */
.project-card {
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.project-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.project-card:active {
    transform: translateY(-1px) scale(0.99);
    transition-duration: 0.1s;
}
.stat-card {
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.stat-card:hover {
    transform: translateY(-2px);
}
.stat-card:active {
    transform: scale(0.98);
    transition-duration: 0.1s;
}
.stat-mini-card {
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.stat-mini-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== MICRO-INTERACTIONS — Table rows ===== */
.data-table tr {
    transition: background 0.15s ease, transform 0.15s ease;
}
.offers-table tbody tr {
    transition: background 0.15s ease, transform 0.15s ease;
}

/* ===== MICRO-INTERACTIONS — Sidebar items ===== */
.sidebar-nav-item {
    transition: all 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.sidebar-nav-item:active {
    transform: scale(0.97);
    transition-duration: 0.06s;
}

/* ===== MICRO-INTERACTIONS — Modals spring entrance ===== */
@keyframes modalSpring {
    0% { opacity: 0; transform: scale(0.92) translateY(12px); }
    60% { transform: scale(1.02) translateY(-2px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-box, .picker-box, .quick-preview-box {
    animation: modalSpring 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ===== MICRO-INTERACTIONS — Toast spring ===== */
@keyframes toastSpring {
    0% { opacity: 0; transform: translateX(40px) scale(0.95); }
    60% { transform: translateX(-4px) scale(1.02); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}
.toast {
    animation: toastSpring 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== DARK MODE TOGGLE — visual indicator ===== */
.dark-mode-btn {
    position: relative;
    overflow: hidden;
}
.dark-mode-btn .material-icons-round {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
body.dark-mode .dark-mode-btn .material-icons-round {
    transform: rotate(180deg);
}

/* ===== KEYBOARD SHORTCUT HINTS ===== */
.kbd-hint {
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10);
    border-radius: 4px; padding: 1px 5px; font-size: 9px;
    font-weight: 600; color: rgba(255,255,255,0.25); font-family: 'SF Mono', Menlo, monospace;
    line-height: 1.6; opacity: 0; transition: opacity 0.15s ease;
}
.sidebar-nav-item:hover .kbd-hint { opacity: 1; }
/* Standalone kbd-hint (outside sidebar) */
.card-panel .kbd-hint, .view-section .kbd-hint {
    background: var(--gray-100); border-color: var(--border);
    color: var(--gray-500); opacity: 1;
}
body.dark-mode .card-panel .kbd-hint, body.dark-mode .view-section .kbd-hint {
    background: var(--gray-200); border-color: var(--gray-300); color: var(--gray-500);
}

/* ===== FOCUS RING ===== */
*:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline: none; }

/* ===== NAV VIEWS ===== */
.nav-views { display: none !important; }

/* ===== TOPBAR HAMBURGER & MOBILE MENU ===== */
.topbar-hamburger {
    display: none; background: none; border: none; color: var(--text);
    cursor: pointer; padding: 6px; -webkit-tap-highlight-color: transparent;
}
.topbar-hamburger .material-icons-round { font-size: 24px; }
.topbar-mobile-menu {
    display: none; position: absolute; top: 50px; right: 8px;
    background: var(--white); border-radius: var(--radius);
    padding: 8px; box-shadow: var(--shadow-xl); z-index: 300; min-width: 200px;
    border: 1px solid var(--border); animation: dropIn 0.2s ease;
}
.topbar-mobile-menu.show { display: block; }
.topbar-mobile-menu button {
    display: flex; align-items: center; gap: 10px; width: 100%;
    background: none; border: none; color: var(--text);
    padding: 10px 14px; font-size: 13px; font-family: inherit;
    cursor: pointer; border-radius: var(--radius-sm); transition: var(--transition);
}
.topbar-mobile-menu button:hover,
.topbar-mobile-menu button:active { background: var(--gold-subtle); }
.topbar-mobile-menu button .material-icons-round { font-size: 20px; color: var(--gold); }

/* ===== BOTTOM NAV (mobile) - 5 tabs ===== */
.bottom-nav {
    display: none; position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--sidebar-bg); z-index: 200;
    padding: 4px 0; padding-bottom: max(4px, env(safe-area-inset-bottom));
    box-shadow: 0 -2px 16px rgba(0,0,0,0.2);
}
.bottom-nav-inner {
    display: grid; grid-template-columns: repeat(5, 1fr);
    align-items: center;
}
.bottom-nav button {
    background: none; border: none; color: rgba(255,255,255,0.5);
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 8px 4px 6px; cursor: pointer; transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
    border-radius: 0; position: relative;
}
.bottom-nav button .material-icons-round { font-size: 24px; transition: var(--transition); }
.bottom-nav button span.nav-label { font-size: 10px; font-weight: 600; letter-spacing: 0.3px; white-space: nowrap; }
.bottom-nav button.active { color: var(--gold); }
.bottom-nav button.active::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 32px; height: 3px; border-radius: 0 0 3px 3px; background: var(--gold);
}
.bottom-nav button.active .material-icons-round { transform: scale(1.08); }
.bottom-nav button:active { transform: scale(0.92); }

/* ===== MORE SHEET (mobile) ===== */
.more-sheet-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4);
    z-index: 290; opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease;
    backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.more-sheet-backdrop.show { opacity: 1; pointer-events: auto; }
.more-sheet {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--white); z-index: 300;
    border-radius: 16px 16px 0 0;
    padding: 8px 16px 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 -8px 30px rgba(0,0,0,0.15);
}
body.dark-mode .more-sheet { background: var(--sidebar-bg); }
.more-sheet.open { transform: translateY(0); }
.more-sheet-handle {
    width: 36px; height: 4px; border-radius: 4px;
    background: var(--border); margin: 0 auto 16px;
}
.more-sheet-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
}
.more-sheet-grid button {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    background: none; border: none; padding: 16px 8px;
    border-radius: var(--radius); cursor: pointer;
    color: var(--text); font-size: 12px; font-weight: 500;
    font-family: inherit; -webkit-tap-highlight-color: transparent;
    transition: background 0.15s;
}
.more-sheet-grid button:active { background: var(--gray-100); }
.more-sheet-grid button .material-icons-round { font-size: 28px; }
body.dark-mode .more-sheet-grid button:active { background: rgba(255,255,255,0.1); }
body.dark-mode .more-sheet-grid button { color: rgba(255,255,255,0.85); }

/* ===== KANBAN BOARD ===== */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    min-height: 300px;
    margin-top: 12px;
}
.kanban-column {
    background: var(--gray-50);
    border-radius: 12px;
    border: none;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    max-height: calc(100vh - 160px);
}
/* Status-based column backgrounds */
.kanban-column[data-status="todo"] { background: #fef9ef; }
.kanban-column[data-status="in_progress"] { background: #eff6ff; }
.kanban-column[data-status="blocked"] { background: #fef2f2; }
.kanban-column[data-status="done"] { background: #f0fdf4; }
body.dark-mode .kanban-column { background: var(--gray-100); }
body.dark-mode .kanban-column[data-status="todo"] { background: #1c1a15; }
body.dark-mode .kanban-column[data-status="in_progress"] { background: #111827; }
body.dark-mode .kanban-column[data-status="blocked"] { background: #1c1111; }
body.dark-mode .kanban-column[data-status="done"] { background: #0f1a14; }
.kanban-column-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 14px 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--text);
    position: sticky;
    top: 0;
    z-index: 2;
}
.kanban-column-title { flex: 1; }
.kanban-column-count {
    background: var(--gray-200);
    color: var(--gray-600);
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}
body.dark-mode .kanban-column-count { background: var(--gray-300); }
.kanban-cards {
    flex: 1;
    padding: 4px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 40px;
    overflow-y: auto;
    transition: background 0.15s ease;
}
.kanban-cards.drag-over {
    background: var(--gold-subtle);
    border-radius: var(--radius-sm);
}
.kanban-drop-zone {
    min-height: 4px;
    border-radius: var(--radius-xs);
    transition: all 0.15s ease;
}
.kanban-cards.drag-over .kanban-drop-zone {
    min-height: 40px;
    border: 2px dashed var(--gold);
    background: var(--gold-subtle);
    border-radius: var(--radius-sm);
}
.kanban-card {
    background: var(--white);
    border-radius: 10px;
    border: 1px solid var(--border-light);
    padding: 10px 12px;
    cursor: grab;
    position: relative;
    transition: box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
}
body.dark-mode .kanban-card { background: var(--card); }
.kanban-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border-color: var(--gray-300);
}
.kanban-card.dragging {
    opacity: 0.4;
    transform: rotate(2deg);
    box-shadow: var(--shadow-md);
}
/* Done cards: subtle strikethrough, muted */
.kanban-card-done-state {
    opacity: 0.55;
}
.kanban-card-done-state .kanban-card-title {
    text-decoration: line-through;
    color: var(--text-muted);
}
.kanban-card-priority {
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    border-radius: 3px 0 0 3px;
}
/* Task title row with checkbox */
.kanban-card-title-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.kanban-card-check {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    transition: all 0.2s;
    padding: 0;
    color: transparent;
}
.kanban-card-check:hover {
    border-color: #22c55e;
    background: rgba(34,197,94,0.08);
    color: #22c55e;
}
.kanban-card-check .material-icons-round { font-size: 13px; }
.kanban-card-done-state .kanban-card-check {
    border-color: #22c55e;
    background: #22c55e;
    color: #fff;
}
.kanban-card-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    line-height: 1.4;
    flex: 1;
}
.kanban-card-title:hover { color: var(--gold); }
.kanban-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
    padding-left: 26px;
}
.kanban-tag {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
}
.kanban-tag-project {
    background: rgba(59,130,246,0.08);
    color: #3b82f6;
}
.kanban-tag-client {
    background: rgba(168,85,247,0.08);
    color: #a855f7;
}
.kanban-tag-project:hover { background: rgba(59,130,246,0.15); }
.kanban-tag-client:hover { background: rgba(168,85,247,0.15); }
.kanban-card-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding-left: 26px;
}
.kanban-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gold);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.3px;
}
.kanban-avatar-inline {
    display: inline-flex;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold);
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-right: 4px;
}
.kanban-due {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 3px;
}
.kanban-due.overdue { color: var(--error); font-weight: 600; }
.kanban-card-done, .kanban-card-delete {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    opacity: 0.7;
    transition: all 0.15s ease;
    min-width: 28px;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kanban-card-done { margin-left: auto; color: #22c55e; opacity: 1; }
.kanban-card-delete { margin-left: 0; }
.kanban-card:hover .kanban-card-done, .kanban-card:hover .kanban-card-delete { opacity: 1; }
.kanban-card-done:hover { color: #fff; background: #22c55e; }
.kanban-card-delete:hover { color: var(--error); background: var(--error-bg); }
.kanban-add-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    border-top: 1px solid var(--border-light);
}
.kanban-add-btn:hover { color: var(--gold); background: var(--gold-subtle); }

/* Kanban spring drop animation */
@keyframes kanbanSpringDrop {
    0% { transform: scale(0.92) translateY(-8px); opacity: 0.7; }
    50% { transform: scale(1.03) translateY(2px); }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* Tasks view toggle */
.tasks-view-toggle {
    display: flex;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    padding: 2px;
}
body.dark-mode .tasks-view-toggle { background: var(--gray-200); }
.toggle-btn {
    background: none;
    border: none;
    padding: 5px 8px;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: var(--radius-xs);
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
}
.toggle-btn.active {
    background: var(--white);
    color: var(--text);
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
body.dark-mode .toggle-btn.active { background: var(--card); }

/* Task status badges */
.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    line-height: 1.6;
}
.badge-todo { background: var(--gray-100); color: var(--gray-600); }
.badge-in-progress { background: rgba(59,130,246,0.1); color: #3b82f6; }
.badge-done { background: rgba(34,197,94,0.1); color: #16a34a; }
.badge-blocked { background: rgba(239,68,68,0.1); color: #ef4444; }
.badge-priority-urgent { background: rgba(239,68,68,0.1); color: #ef4444; }
.badge-priority-high { background: rgba(245,158,11,0.1); color: #0d9488; }
.badge-priority-medium { background: rgba(59,130,246,0.1); color: #3b82f6; }
.badge-priority-low { background: var(--gray-100); color: var(--gray-500); }

/* ===== MORNING DASHBOARD ===== */
.morning-dashboard { padding: 0; }
.morning-greeting {
    margin-bottom: 24px;
}
.morning-greeting h1 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}
.morning-greeting .morning-date {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
}

/* Quick Actions Bar */
.quick-actions-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px 10px 10px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
body.dark-mode .quick-action-btn { background: var(--card); border-color: var(--border); }
.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: var(--gold);
}
.quick-action-btn:active { transform: translateY(0); }
.quick-action-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.quick-action-icon .material-icons-round { font-size: 20px; }

/* Client/Project Quick Action Buttons */
.cqa-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: var(--radius);
    font-size: 12px; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: all 0.2s; text-decoration: none;
    background: none; white-space: nowrap;
}
.cqa-btn:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,0.08); filter: brightness(0.9); }
.cqa-btn:active { transform: translateY(0); }

.morning-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.morning-kpi {
    background: linear-gradient(135deg, var(--white) 0%, rgba(13,148,136,0.03) 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
body.dark-mode .morning-kpi { background: var(--card); }
.morning-kpi:hover { box-shadow: 0 4px 16px rgba(13,148,136,0.1); transform: translateY(-2px); }
.morning-kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.morning-kpi-icon .material-icons-round { font-size: 20px; }
.morning-kpi-data { flex: 1; }
.morning-kpi-click { cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
.morning-kpi-click:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.morning-kpi-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    letter-spacing: -0.5px;
}
.morning-kpi-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.morning-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.morning-section-title .material-icons-round { font-size: 16px; }
.morning-kanban-wrap {
    margin-bottom: 24px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
body.dark-mode .morning-kanban-wrap { background: var(--card); }
.morning-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.morning-panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
body.dark-mode .morning-panel { background: var(--card); }
.morning-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.morning-panel-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}
.morning-panel-title .material-icons-round { font-size: 16px; color: var(--text-muted); }
.morning-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: 8px;
    background: rgba(13,148,136,0.02);
    border: 1px solid transparent;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}
.morning-item:last-child { margin-bottom: 0; }
.morning-item:hover { background: rgba(191,155,80,0.06); border-color: rgba(191,155,80,0.15); color: var(--gold); }
.morning-item-left {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.morning-item-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    font-size: 12px;
    color: var(--text-muted);
}
.morning-empty {
    text-align: center;
    padding: 24px 12px;
    color: var(--text-muted);
    font-size: 13px;
}
.overdue-val { color: #ef4444 !important; }
.overdue-item { color: #ef4444; }
.morning-item-date {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}
.morning-item-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

/* ===== CHAT INTERN ===== */
.chat-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    height: calc(100vh - 64px);
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.chat-sidebar {
    background: var(--bg);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 12px 0;
}
.chat-sidebar-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 8px 16px 6px;
}
.chat-channel-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
    transition: background 0.15s;
    border-left: 3px solid transparent;
}
.chat-channel-item:hover { background: rgba(0,0,0,0.04); }
.chat-channel-item.active {
    background: rgba(var(--gold-rgb, 191,155,80), 0.1);
    border-left-color: var(--gold);
    font-weight: 600;
}
.chat-channel-item .material-icons-round { font-size: 18px; color: var(--text-muted); }
.chat-channel-item.active .material-icons-round { color: var(--gold); }
.chat-channel-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-channel-unread {
    background: var(--gold);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}
.chat-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.chat-main-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.chat-main-header h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: var(--charcoal);
}
.chat-main-header .chat-channel-desc {
    font-size: 12px;
    color: var(--text-muted);
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.chat-date-sep {
    text-align: center;
    margin: 16px 0 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    position: relative;
}
.chat-date-sep::before, .chat-date-sep::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 60px);
    height: 1px;
    background: var(--border);
}
.chat-date-sep::before { left: 0; }
.chat-date-sep::after { right: 0; }
.chat-msg {
    display: flex;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 8px;
    transition: background 0.15s;
    position: relative;
}
.chat-msg:hover { background: rgba(0,0,0,0.025); }
.chat-msg-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--charcoal);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}
.chat-msg-body { flex: 1; min-width: 0; }
.chat-msg-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 2px;
}
.chat-msg-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--charcoal);
}
.chat-msg-time {
    font-size: 11px;
    color: var(--text-muted);
}
.chat-msg-edited {
    font-size: 10px;
    color: var(--text-muted);
    font-style: italic;
}
.chat-msg-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
    word-break: break-word;
}
.chat-msg-text strong { font-weight: 700; }
.chat-msg-text em { font-style: italic; }
.chat-msg-text code {
    background: rgba(0,0,0,0.06);
    padding: 1px 5px;
    border-radius: 3px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 12px;
}
.chat-msg-text a { color: var(--gold); text-decoration: underline; }
.chat-msg-reply-ctx {
    background: rgba(0,0,0,0.04);
    border-left: 3px solid var(--gold);
    padding: 4px 10px;
    margin-bottom: 4px;
    border-radius: 0 6px 6px 0;
    font-size: 12px;
    color: var(--text-muted);
}
.chat-msg-reply-ctx strong { color: var(--charcoal); font-size: 11px; }
.chat-msg-actions {
    position: absolute;
    top: 4px;
    right: 8px;
    display: none;
    gap: 2px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.chat-msg:hover .chat-msg-actions { display: flex; }
.chat-msg-action {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.15s;
    border: none;
    background: none;
}
.chat-msg-action:hover { background: rgba(0,0,0,0.06); color: var(--charcoal); }
.chat-msg-action .material-icons-round { font-size: 16px; }
.chat-input-area {
    padding: 12px 20px 16px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--white);
}
.chat-reply-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    margin-bottom: 8px;
    background: rgba(0,0,0,0.03);
    border-left: 3px solid var(--gold);
    border-radius: 0 6px 6px 0;
    font-size: 12px;
    color: var(--text-muted);
}
.chat-reply-preview .chat-reply-close {
    margin-left: auto;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1;
}
.chat-reply-preview .chat-reply-close:hover { color: var(--charcoal); }
.chat-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.chat-input-row textarea {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-family: inherit;
    resize: none;
    max-height: 120px;
    line-height: 1.4;
    background: var(--bg);
    transition: border-color 0.2s;
}
.chat-input-row textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: var(--white);
}
.chat-input-row .btn { height: 38px; padding: 0 16px; flex-shrink: 0; }
.chat-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    gap: 8px;
    padding: 40px;
    text-align: center;
}
.chat-empty-state .material-icons-round { font-size: 48px; opacity: 0.3; }
.chat-empty-state p { font-size: 13px; }
.chat-unread-badge {
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ===== CALENDAR ===== */
/* ===== CALENDAR PREMIUM ===== */
.calendar-grid { display: flex; gap: 0; background: var(--card-bg); border-radius: 12px; border: 1px solid var(--border); overflow: hidden; }
.calendar-grid > .cal-main { flex: 1; min-width: 0; }
.cal-header-row { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--bg-hover); }
.cal-header-cell { padding: 6px 4px; text-align: center; font-size: 10px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.8px; }
.cal-body { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell { min-height: 32px; padding: 2px 4px; border-top: 1px solid var(--border-light); border-right: 1px solid var(--border-light); position: relative; transition: background 0.15s; }
.cal-cell:hover { background: rgba(13,148,136,0.02); }
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell-empty { background: var(--bg-hover); opacity: 0.3; }
.cal-day-num { font-size: 11px; font-weight: 600; margin-bottom: 2px; color: var(--text-secondary); }
.cal-day-today { background: var(--gold); color: white; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; }
.cal-today { background: rgba(191, 155, 80, 0.05); }
.cal-event { font-size: 9px; padding: 2px 4px; margin-bottom: 2px; border-radius: 4px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 2px solid; transition: all 0.15s; display: flex; align-items: center; gap: 2px; }
.cal-event:hover { transform: translateX(1px); opacity: 0.85; }
.cal-event-task { background: rgba(59, 130, 246, 0.08); color: var(--text-primary); }
.cal-event-done { opacity: 0.4; text-decoration: line-through; }
.cal-event-fu { background: rgba(13,148,136,0.06); color: var(--text-primary); }
.cal-event-overdue { background: rgba(239,68,68,0.08); animation: fuPulse 2s infinite; }
@keyframes fuPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.7; } }
.cal-ev-icon { flex-shrink: 0; }
.cal-ev-text { overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.cal-ev-client { font-size: 9px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }
.cal-fu-badge { display: inline-flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 800; color: white; padding: 1px 4px; border-radius: 3px; flex-shrink: 0; letter-spacing: 0.3px; }
.cal-event-more { font-size: 10px; color: var(--text-muted); padding: 2px 6px; cursor: default; }

/* Calendar sidebar */
.cal-sidebar { border-left: 1px solid var(--border); padding: 12px; background: var(--bg-hover); width: 280px; flex-shrink: 0; overflow-y: auto; max-height: 420px; align-self: flex-start; }
.cal-sb-section { margin-bottom: 20px; }
.cal-sb-title { font-size: 12px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.cal-sb-overdue .cal-sb-title { color: #ef4444; }
.cal-sb-today .cal-sb-title { color: var(--gold-dark); }
.cal-sb-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--card-bg); border: 1px solid var(--border-light); margin-bottom: 6px; cursor: pointer; transition: all 0.15s; font-size: 12px; }
.cal-sb-item:hover { border-color: var(--gold); box-shadow: 0 2px 8px rgba(191,155,80,0.1); }
.cal-sb-item-overdue { border-left: 3px solid #ef4444; background: rgba(239,68,68,0.03); }
.cal-sb-item-upcoming { opacity: 0.7; }
.cal-sb-item-info { flex: 1; min-width: 0; }
.cal-sb-item-info strong { font-size: 12px; color: var(--text-primary); }
.cal-sb-item-meta { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
/* Calendar custom events */
.cal-event-custom { background: rgba(139,92,246,0.08); color: var(--text-primary); }
.cal-ev-time { font-size: 8px; color: var(--text-muted); flex-shrink: 0; font-weight: 500; }

/* Calendar event form - type chips */
.ce-type-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 6px; border: 1.5px solid var(--border); background: var(--card-bg); font-size: 11px; cursor: pointer; transition: all 0.15s; color: var(--text-secondary); font-weight: 500; }
.ce-type-chip:hover { border-color: var(--ce-color, var(--gold)); background: rgba(0,0,0,0.02); }
.ce-type-active { border-color: var(--ce-color, var(--gold)); background: color-mix(in srgb, var(--ce-color, var(--gold)) 10%, transparent); color: var(--ce-color, var(--gold-dark)); font-weight: 600; }

/* Day detail overlay */
.cal-day-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 999; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; }
.day-detail-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: var(--card-bg); border: 1px solid var(--border-light); margin-bottom: 6px; cursor: pointer; transition: all 0.15s; }
.day-detail-item:hover { border-color: var(--gold); box-shadow: 0 2px 8px rgba(191,155,80,0.1); }
.day-detail-done { opacity: 0.4; }
.day-detail-done .day-detail-info strong { text-decoration: line-through; }
.day-detail-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.day-detail-info { flex: 1; min-width: 0; }
.day-detail-info strong { font-size: 13px; display: block; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-detail-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ===== @MENTIONS ===== */
.mention-dropdown { position: fixed; z-index: 9999; background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); max-height: 200px; overflow-y: auto; min-width: 200px; padding: 4px; }
.mention-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; cursor: pointer; transition: background 0.1s; }
.mention-item:hover, .mention-item.active { background: rgba(191,155,80,0.1); }
.mention-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; flex-shrink: 0; }
.mention-name { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.mention-role { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.mention-tag { background: rgba(191,155,80,0.12); color: var(--gold-dark); padding: 1px 5px; border-radius: 4px; font-weight: 500; }

/* ===== ONLINE USERS ===== */
.chat-online-section { border-top: 1px solid var(--border-light); margin-top: 4px; }
.online-user-item { display: flex; align-items: center; gap: 8px; padding: 6px 16px; font-size: 13px; cursor: default; }
.online-user-item.online-user-me { opacity: 0.6; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }
.online-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; flex-shrink: 0; }
.online-name { font-weight: 500; color: var(--text-primary); }
.online-role { font-size: 11px; color: var(--text-muted); margin-left: auto; text-transform: capitalize; }
.online-count { background: rgba(34,197,94,0.15); color: #22c55e; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 10px; margin-left: 6px; }

.btn-icon-sm { padding: 2px; }

/* ===== SHOPIFY ===== */
.shopify-table { background: var(--card-bg); border-radius: 12px; border: 1px solid var(--border); overflow: hidden; }
.shopify-row { display: grid; grid-template-columns: 80px 1fr 1.5fr 100px 90px 90px; padding: 10px 16px; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); font-size: 13px; }
.shopify-row:last-child { border-bottom: none; }
.shopify-header { background: var(--bg-hover); font-weight: 600; font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.3px; padding: 8px 16px; }
.shopify-col { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shopify-items { color: var(--text-secondary); font-size: 12px; }
.shopify-status { font-weight: 600; font-size: 12px; text-transform: capitalize; }

/* ===== QUICK NOTES ===== */
.morning-notes-section { margin-bottom: 20px; }
.morning-notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.quick-note { border-radius: 10px; padding: 12px; min-height: 100px; display: flex; flex-direction: column; box-shadow: 0 1px 3px rgba(0,0,0,0.08); transition: transform 0.15s, box-shadow 0.15s; }
.quick-note:hover { transform: translateY(-2px); box-shadow: 0 3px 8px rgba(0,0,0,0.12); }
.quick-note-text { flex: 1; background: transparent; border: none; resize: none; font-size: 13px; line-height: 1.5; color: #333; font-family: inherit; outline: none; min-height: 60px; }
.quick-note-actions { display: flex; gap: 4px; align-items: center; margin-top: 6px; opacity: 0; transition: opacity 0.2s; }
.quick-note:hover .quick-note-actions { opacity: 1; }
.quick-note-color { width: 16px; height: 16px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: border-color 0.15s; }
.quick-note-color:hover, .quick-note-color.active { border-color: rgba(0,0,0,0.3); }
.quick-note-delete { background: none; border: none; cursor: pointer; color: #999; margin-left: auto; padding: 2px; }
.quick-note-delete:hover { color: #ef4444; }

/* ===== ACTIVITY LOG ===== */
.activity-timeline { padding: 8px 0; }
.activity-item { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-hover); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.activity-content { flex: 1; min-width: 0; }
.activity-desc { font-size: 13px; color: var(--text-primary); }
.activity-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ===== CLIENT SCORE BADGE ===== */
.client-score-badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; color: #fff; letter-spacing: 0.3px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .charts-section.show-charts { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; }
    .topbar-brand { display: flex !important; align-items: center; }
    .topbar-brand svg { height: 20px; width: auto; fill: var(--gold); }
    body.dark-mode .topbar-brand svg { fill: var(--gold); }
    .bottom-nav { display: block; }
    .topbar-hamburger { display: block; }
    .mobile-hide { display: none !important; }
    .view-section { padding: 12px; padding-bottom: 90px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .stat-card { padding: 12px; }
    .stat-value { font-size: 18px; }
    .offers-table { font-size: 12px; }
    .offers-table th, .offers-table td { padding: 8px 10px; }
    .dashboard-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .article-main { grid-template-columns: 28px 1fr; gap: 6px; padding: 8px; }
    .article-photo { display: none; }
    .article-fields { grid-template-columns: 50px 1fr 40px 70px 50px 70px; gap: 4px; }
    .article-obs { padding-left: 36px; }
    .article-brand-row { padding-left: 36px; }
    .totals-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .editor-area { padding: 0; }
    .print-meta-grid { grid-template-columns: 1fr; }
    .print-terms { grid-template-columns: 1fr; }
    .topbar { padding: 0 12px; height: 52px; }
    .topbar-btn { width: 36px; height: 36px; }
    .topbar-right { gap: 4px; }
    .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .data-table td, .data-table th { white-space: nowrap; padding: 8px 10px; }
    .section-header { padding: 12px 14px; }
    .section-header h2 { font-size: 17px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid.three-col { grid-template-columns: 1fr; }
    .stat-mini { flex-direction: column; }
    .projects-grid { grid-template-columns: 1fr; }
    .kanban-board { grid-template-columns: 1fr 1fr; }
    .kanban-column { padding: 10px; }
    .kanban-card { padding: 10px; }
    .morning-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
    .morning-bottom-grid { grid-template-columns: 1fr; }
    .morning-greeting h1 { font-size: 22px; }
    .quick-actions-bar { gap: 6px; display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; flex-wrap: wrap; padding-bottom: 4px; }
    .quick-action-btn { min-width: 0; flex-shrink: 0; padding: 10px 8px; font-size: 11px; flex-direction: column; gap: 6px; text-align: center; justify-content: center; }
    .quick-action-icon { width: 32px; height: 32px; }
    .calendar-grid { flex-direction: column; }
    .cal-sidebar { width: 100%; border-left: none; border-top: 1px solid var(--border); max-height: none; }
    .cal-cell { min-height: 28px; padding: 2px 3px; }
    .cal-event { font-size: 9px; padding: 1px 3px; }
    .cal-header-cell { font-size: 10px; padding: 6px 2px; }
    .cal-day-num { font-size: 11px; }
    .shopify-row { grid-template-columns: 60px 1fr 90px 70px; font-size: 12px; padding: 8px 12px; }
    .shopify-items, .shopify-header .shopify-col:nth-child(5), .shopify-header .shopify-col:nth-child(6), .shopify-row .shopify-col:nth-child(5), .shopify-row .shopify-col:nth-child(6) { display: none; }
    .morning-notes-grid { grid-template-columns: 1fr 1fr; }
    .chat-layout { grid-template-columns: 1fr; height: calc(100vh - 52px - 70px); }
    .chat-sidebar {
        position: fixed;
        left: 0; top: 52px; bottom: 70px;
        width: 260px;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    }
    .chat-sidebar.open { transform: translateX(0); }
    .chat-main-header { padding: 10px 14px; }
    .chat-main-header .chat-mobile-toggle {
        display: flex !important;
        width: 36px; height: 36px;
        align-items: center; justify-content: center;
        border-radius: 8px;
        border: 1px solid var(--border);
        background: var(--bg);
        cursor: pointer;
        flex-shrink: 0;
    }
    .chat-messages { padding: 12px 14px; }
    .chat-msg { padding: 6px 4px; gap: 8px; }
    .chat-msg-avatar { width: 30px; height: 30px; font-size: 10px; }
    .chat-input-area { padding: 8px 14px 12px; }
    .chat-input-row textarea { padding: 8px 12px; }
    .chat-msg-actions { display: none !important; }
    .search-input { width: 100%; }
    /* Mobile cards for lists instead of tables */
    .section-header .btn { font-size: 12px; padding: 8px 14px; }
    .modal-content { margin: 8px; max-height: calc(100vh - 16px); border-radius: 12px; }
    .modal-body { padding: 16px; }
    .modal-header { padding: 14px 16px; }
    /* AI summary mobile */
    .ai-daily-summary-card { padding: 14px; }
    .ai-summary-forecast { grid-template-columns: 1fr; gap: 8px; }
    .ai-summary-pipeline { gap: 6px; }
    .ai-sp-chip { font-size: 11px; padding: 4px 8px; }
    .ai-summary-leads-grid { grid-template-columns: 1fr; }
    .section-title { font-size: 11px; padding: 10px 14px; }
    .login-box { padding: 32px 24px; }
    .pin-digit { width: 48px; height: 58px; font-size: 24px; }

    /* ===== EDITOR MOBILE FIX ===== */
    .editor-area { padding: 0; max-width: 100%; overflow-x: hidden; }
    .editor-header { flex-direction: column; align-items: flex-start; gap: 8px; padding-bottom: 12px; margin-bottom: 16px; }
    .editor-header .back-link { font-size: 13px; }
    .section-content { padding: 12px 14px; }
    .form-row { grid-template-columns: 1fr !important; gap: 10px; }
    .form-field label { font-size: 12px; }
    .form-field input, .form-field select, .form-field textarea { font-size: 14px; padding: 10px 12px; }
    .article-card { margin-bottom: 10px; }
    .article-main { grid-template-columns: 1fr !important; gap: 8px; padding: 10px; }
    .article-fields { grid-template-columns: 1fr 1fr !important; gap: 8px; }
    .article-fields input, .article-fields select, .article-fields textarea { font-size: 14px; padding: 10px; }
    .article-obs { padding-left: 0 !important; }
    .article-brand-row { padding-left: 0 !important; flex-wrap: wrap; }
    .totals-section { padding: 12px 14px; }
    .totals-grid { grid-template-columns: 1fr !important; }
    .print-meta-grid { grid-template-columns: 1fr !important; }
    .print-terms { grid-template-columns: 1fr !important; }

    /* ===== CONSISTENT FONT BASE ===== */
    body { font-size: 14px; }
    .content-area { font-size: 14px; }
    .data-table td { font-size: 13px; white-space: normal; }
    .data-table th { font-size: 11px; }
    h2 { font-size: 18px; }

    /* ===== BRANDURI MOBILE: CARDURI ===== */
    .data-table.brands-table-mobile { display: block; }
}

@media (max-width: 480px) {
    .view-section { padding: 8px; padding-bottom: 90px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
    .stat-card .stat-value { font-size: 16px; }
    .stat-card .stat-label { font-size: 9px; }
    .article-fields { grid-template-columns: 1fr 1fr 1fr; gap: 4px; }
    .article-fields input, .article-fields select, .article-fields textarea { font-size: 12px; padding: 7px; }
    .kanban-board { grid-template-columns: 1fr; }
    .morning-kpis { grid-template-columns: 1fr 1fr; }
    .section-header h2 { font-size: 15px; }
    .cal-cell { min-height: 24px; padding: 2px; }
    .cal-event { display: none; }
    .cal-has-events .cal-day-num::after { content: ''; display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); margin: 2px auto 0; }
    .shopify-row { grid-template-columns: 1fr 80px; padding: 6px 10px; }
    .shopify-header { display: none; }
    .shopify-row .shopify-col:nth-child(1) { display: none; }
    .shopify-row .shopify-col:nth-child(3) { display: none; }
    .morning-notes-grid { grid-template-columns: 1fr; }
    .chat-msg-name { font-size: 12px; }
    .chat-msg-text { font-size: 12px; }
    .chat-main-header h3 { font-size: 14px; }
    .topbar-brand { font-size: 14px; letter-spacing: 1px; }
    .topbar-brand svg { height: 18px; }
    .dashboard-header .btn { font-size: 12px; padding: 8px 14px; }
    .morning-greeting h1 { font-size: 18px; }
    .quick-actions-bar { gap: 6px; }
    .quick-action-btn { padding: 8px 10px; font-size: 11px; }
    .quick-action-btn span:last-child { font-size: 10px; }
    .quick-actions-bar { grid-template-columns: repeat(3, 1fr); }
    .more-sheet-grid { grid-template-columns: repeat(4, 1fr); gap: 2px; }
    .more-sheet-grid button { padding: 12px 4px; font-size: 11px; }
    .more-sheet-grid button .material-icons-round { font-size: 24px; }
}

/* ===== SLIDE-OVER PANEL (Task Detail, etc) ===== */
.slide-panel {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    pointer-events: none;
}
.slide-panel.show { display: block; pointer-events: auto; }
.slide-panel-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}
.slide-panel.show .slide-panel-backdrop { opacity: 1; }
.slide-panel-content {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 480px;
    max-width: 90vw;
    background: var(--bg);
    box-shadow: -8px 0 30px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.slide-panel.show .slide-panel-content { transform: translateX(0); }
.slide-panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-shrink: 0;
}
.slide-panel-title-row {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.slide-panel-title-row h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--text);
    line-height: 1.3;
}
.slide-panel-close {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light);
    flex-shrink: 0;
    transition: all 0.15s;
}
.slide-panel-close:hover { background: var(--bg-hover); color: var(--text); border-color: var(--text-light); }
.slide-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Task Detail Content */
.task-detail-priority-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 7px;
}
.task-detail-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.td-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.td-badge.status-todo { background: rgba(148,163,184,0.12); color: #94a3b8; }
.td-badge.status-in_progress { background: rgba(59,130,246,0.12); color: #3b82f6; }
.td-badge.status-done { background: rgba(34,197,94,0.12); color: #22c55e; }
.td-badge.status-blocked { background: rgba(239,68,68,0.12); color: #ef4444; }
.td-badge.priority-low { background: rgba(148,163,184,0.1); color: #94a3b8; }
.td-badge.priority-medium { background: rgba(245,158,11,0.1); color: #14b8a6; }
.td-badge.priority-high { background: rgba(249,115,22,0.1); color: #f97316; }
.td-badge.priority-urgent { background: rgba(239,68,68,0.15); color: #ef4444; }

.task-detail-section {
    margin-bottom: 20px;
}
.task-detail-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 6px;
}
.task-detail-desc {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text);
    padding: 12px 16px;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--gold);
    white-space: pre-wrap;
}
.task-detail-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.td-meta-item {
    padding: 12px;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    transition: transform 0.15s;
}
.td-meta-item:hover { transform: translateY(-1px); }
.td-meta-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 4px;
}
.td-meta-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}
.td-meta-value .material-icons-round { font-size: 14px; color: var(--gold); }
.td-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.td-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}
.td-link:hover { transform: translateX(4px); }
.td-link .material-icons-round { font-size: 18px; }
.td-link-project {
    background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.15);
}
.td-link-project:hover { background: rgba(59,130,246,0.14); }
.td-link-project .material-icons-round { color: #3b82f6; }
.td-link-client {
    background: rgba(168,85,247,0.08);
    border: 1px solid rgba(168,85,247,0.15);
}
.td-link-client:hover { background: rgba(168,85,247,0.14); }
.td-link-client .material-icons-round { color: #a855f7; }
/* Task attachments - form */
.task-attachments-zone { margin-top: 12px; padding: 12px; background: var(--gray-50); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.task-attach-label { font-size: 12px; font-weight: 600; color: var(--dark-gray); margin-bottom: 8px; }
.task-attachments-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.task-attach-item { display: flex; align-items: center; gap: 8px; background: white; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 10px; font-size: 12px; }
.task-attach-thumb { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; }
.task-attach-info { display: flex; flex-direction: column; }
.task-attach-name { font-weight: 500; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-attach-size { font-size: 10px; color: var(--text-muted); }
.task-attach-remove { border: none; background: none; cursor: pointer; color: var(--text-muted); padding: 2px; border-radius: 50%; }
.task-attach-remove:hover { background: #fee2e2; color: #ef4444; }
.task-attach-btn { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--gold); cursor: pointer; padding: 6px 12px; border: 1px dashed var(--gold); border-radius: var(--radius-sm); background: rgba(13,148,136,0.04); transition: background 0.15s; }
.task-attach-btn:hover { background: rgba(13,148,136,0.1); }

/* Task Form Modal - Redesigned */
.tf-modal { max-width: 600px; padding: 0; border-radius: 16px; overflow: hidden; }
.tf-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; background: var(--navy); }
.tf-header-left { display: flex; align-items: center; gap: 12px; }
.tf-priority-indicator { width: 4px; height: 28px; border-radius: 2px; background: #f59e0b; transition: background 0.2s; }
.tf-title { color: #fff; font-size: 16px; font-weight: 600; margin: 0; letter-spacing: 0.3px; }
.tf-close { border: none; background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.tf-close:hover { background: rgba(255,255,255,0.2); color: #fff; }
.tf-body { padding: 20px 24px; max-height: 65vh; overflow-y: auto; }
.tf-title-input { width: 100%; border: none; border-bottom: 2px solid var(--border); padding: 8px 0; font-size: 17px; font-weight: 600; color: var(--navy); background: transparent; outline: none; transition: border-color 0.2s; margin-bottom: 8px; }
.tf-title-input:focus { border-color: var(--gold); }
.tf-title-input::placeholder { color: var(--text-muted); font-weight: 400; }
.tf-desc-input { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 13px; color: var(--text); background: var(--gray-50); outline: none; resize: vertical; min-height: 44px; transition: border-color 0.2s; margin-bottom: 4px; font-family: inherit; }
.tf-desc-input:focus { border-color: var(--gold); background: #fff; }
.tf-section { margin-top: 16px; }
.tf-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 8px; display: flex; align-items: center; gap: 4px; }
.tf-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.tf-pill { display: flex; align-items: center; gap: 5px; padding: 6px 14px; border: 1px solid var(--border); border-radius: 20px; background: #fff; font-size: 12px; font-weight: 500; color: var(--text-muted); cursor: pointer; transition: all 0.15s; }
.tf-pill:hover { border-color: var(--gray-300); color: var(--text); }
.tf-pill.active { border-color: var(--gold); background: rgba(191,155,80,0.08); color: var(--navy); font-weight: 600; }
.tf-pill-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.tf-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.tf-chip { display: flex; align-items: center; gap: 3px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: 11px; font-weight: 500; color: var(--text-muted); cursor: pointer; transition: all 0.15s; }
.tf-chip .material-icons-round { font-size: 14px; }
.tf-chip:hover { border-color: var(--gray-300); color: var(--text); }
.tf-chip.active { border-color: var(--gold); background: rgba(191,155,80,0.08); color: var(--navy); font-weight: 600; }
.tf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.tf-field select { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; color: var(--text); background: #fff; outline: none; transition: border-color 0.2s; }
.tf-field select:focus { border-color: var(--gold); }
.tf-date-row { display: flex; align-items: center; gap: 10px; }
.tf-date-input { flex: 1; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; color: var(--text); outline: none; transition: border-color 0.2s; }
.tf-date-input:focus { border-color: var(--gold); }
.tf-date-shortcuts { display: flex; gap: 4px; }
.tf-shortcut { padding: 5px 10px; border: 1px solid var(--border); border-radius: 6px; background: #fff; font-size: 11px; font-weight: 500; color: var(--text-muted); cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.tf-shortcut:hover { border-color: var(--gold); color: var(--gold); }
.tf-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--border); background: var(--gray-50); }
@media (max-width: 600px) {
    .tf-modal { max-width: 100%; margin: 8px; border-radius: 12px; }
    .tf-row { grid-template-columns: 1fr; }
    .tf-chips { gap: 4px; }
    .tf-date-row { flex-direction: column; align-items: stretch; }
}

/* Task attachments - detail panel */
.td-attachments-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.td-attach-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; background: var(--gray-50); border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; color: var(--text); transition: border-color 0.15s; cursor: pointer; }
.td-attach-card:hover { border-color: var(--gold); }
.td-attach-img { width: 100%; height: 72px; object-fit: cover; border-radius: 4px; }
.td-attach-name { font-size: 10px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }
/* Status selector in task detail */
.td-status-selector {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.td-status-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.td-status-btn:hover:not(.active):not(:disabled) {
    border-color: var(--sc);
    color: var(--sc);
    background: color-mix(in srgb, var(--sc) 8%, transparent);
}
.td-status-btn.active {
    background: color-mix(in srgb, var(--sc) 12%, transparent);
    border-color: var(--sc);
    color: var(--sc);
    font-weight: 600;
    cursor: default;
}
.task-detail-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.task-detail-actions .btn { flex: 1; min-width: 120px; justify-content: center; }

/* Task Loading Spinner */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.task-detail-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 12px;
    color: var(--text-light);
}
.task-detail-loading .spinner {
    width: 32px; height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ===== COMMAND PALETTE (Ctrl+K) ===== */
.command-palette-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20vh;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}
.command-palette-overlay.show { display: flex; }
.command-palette {
    width: 560px;
    max-width: 90vw;
    background: var(--bg);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 0 1px var(--border);
    overflow: hidden;
    animation: cmdSlideDown 0.2s ease;
}
@keyframes cmdSlideDown {
    from { transform: translateY(-20px) scale(0.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.command-palette-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.command-palette-input-wrap .material-icons-round {
    font-size: 22px;
    color: var(--gold);
    flex-shrink: 0;
}
.command-palette-input-wrap input {
    flex: 1;
    border: none;
    background: none;
    font-size: 16px;
    color: var(--text);
    outline: none;
    font-family: inherit;
}
.command-palette-input-wrap input::placeholder { color: var(--text-light); }
.command-kbd {
    font-size: 11px;
    padding: 3px 8px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-light);
    font-family: monospace;
}
.command-palette-results {
    max-height: 360px;
    overflow-y: auto;
    padding: 8px;
}
.cp-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    padding: 8px 12px 4px;
}
.cp-hint {
    padding: 20px;
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
}
.cp-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.12s;
}
.cp-item:hover { background: var(--bg-hover); }
.cp-item .material-icons-round {
    font-size: 18px;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}
.cp-item[data-type="task"] .material-icons-round { background: rgba(34,197,94,0.1); color: #22c55e; }
.cp-item[data-type="offer"] .material-icons-round { background: rgba(59,130,246,0.1); color: #3b82f6; }
.cp-item[data-type="client"] .material-icons-round { background: rgba(168,85,247,0.1); color: #a855f7; }
.cp-item[data-type="project"] .material-icons-round { background: rgba(245,158,11,0.1); color: #14b8a6; }
.cp-item-text {
    flex: 1;
    min-width: 0;
}
.cp-item-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cp-item-sub {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 1px;
}
.cp-item-type {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}
.cp-item[data-type="task"] .cp-item-type { background: rgba(34,197,94,0.1); color: #22c55e; }
.cp-item[data-type="offer"] .cp-item-type { background: rgba(59,130,246,0.1); color: #3b82f6; }
.cp-item[data-type="client"] .cp-item-type { background: rgba(168,85,247,0.1); color: #a855f7; }
.cp-item[data-type="project"] .cp-item-type { background: rgba(245,158,11,0.1); color: #14b8a6; }
.cp-group-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    padding: 10px 16px 4px;
    border-top: 1px solid var(--border-light);
}
.cp-group-label:first-child { border-top: none; }

/* ===== ENHANCED HOVER & ANIMATION EFFECTS ===== */
.sidebar-nav-item {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.sidebar-nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 60%;
    background: #2dd4bf;
    border-radius: 0 3px 3px 0;
    transition: transform 0.2s;
}
.sidebar-nav-item.active::before { transform: translateY(-50%) scaleY(1); }
.sidebar-nav-item:active { transform: scale(0.98); }

/* Stat card hover */
.stat-card {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* Kanban card enhanced hover - soft lift */
.kanban-card:hover {
    transform: translateY(-1px);
}

/* Button press effect */
.btn:active { transform: scale(0.97); }
.btn-gold:hover { box-shadow: 0 4px 14px rgba(13,148,136,0.3); }

/* Table row hover */
.data-table tbody tr { transition: background 0.15s; }
.data-table tbody tr:hover { background: rgba(13,148,136,0.04); }

/* Notification badge pulse */
@keyframes notifPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}
.notif-dot { animation: notifPulse 2s infinite; }

/* Notification task button */
.notification-item { display: flex; align-items: center; gap: 6px; }
.notification-item > div:first-child { flex: 1; min-width: 0; }
.notif-task-btn {
    width: 28px; height: 28px;
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--text-light);
    flex-shrink: 0;
    transition: all 0.2s;
    opacity: 0;
}
.notification-item:hover .notif-task-btn { opacity: 1; }
.notif-task-btn:hover { background: var(--gold); color: #fff; border-color: var(--gold); }

/* Project card hover */
.project-card { transition: all 0.25s; }
.project-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); }

/* Morning KPI glow on hover */
.morning-kpi { transition: all 0.2s; }
.morning-kpi:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.06); }

/* Smooth page transitions */
.view-section {
    animation: fadeSlideUp 0.3s ease;
}
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* kbd hints */
.kbd-hint {
    font-size: 9px;
    padding: 1px 5px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    color: rgba(255,255,255,0.25);
    font-family: monospace;
    margin-left: auto;
    flex-shrink: 0;
    line-height: 1.4;
}
.sidebar-nav-item:hover .kbd-hint { color: rgba(255,255,255,0.5); }

/* ===== AI CHAT FLOATING ===== */
.ai-chat-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(201,168,76,0.35);
    z-index: 1000;
    transition: transform 0.2s, box-shadow 0.2s;
}
.ai-chat-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(201,168,76,0.45);
}
.ai-chat-btn .material-icons-round { font-size: 26px; }

.ai-chat-panel {
    position: fixed;
    bottom: 88px;
    right: 24px;
    width: 380px;
    max-height: 520px;
    background: var(--bg);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
}
.ai-chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}
.ai-chat-header .material-icons-round { font-size: 20px; }
.ai-chat-close {
    margin-left: auto;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    opacity: 0.8;
    padding: 2px;
}
.ai-chat-close:hover { opacity: 1; }

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 360px;
    min-height: 200px;
}
.ai-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.55;
    word-wrap: break-word;
}
.ai-msg.user {
    align-self: flex-end;
    background: var(--gold);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.ai-msg.assistant {
    align-self: flex-start;
    background: var(--gray-50);
    color: var(--text);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-light);
}
.ai-msg.assistant p { margin: 0 0 6px 0; }
.ai-msg.assistant p:last-child { margin-bottom: 0; }
.ai-msg.assistant strong { color: var(--gold-dark); }
.ai-msg.assistant ul, .ai-msg.assistant ol {
    margin: 4px 0;
    padding-left: 18px;
}
.ai-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    align-self: flex-start;
}
.ai-typing span {
    width: 7px;
    height: 7px;
    background: var(--gold);
    border-radius: 50%;
    animation: aiDot 1.2s infinite;
}
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes aiDot {
    0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
    30% { opacity: 1; transform: scale(1.1); }
}

.ai-chat-input-row {
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid var(--border-light);
    background: var(--bg);
}
.ai-chat-input-row textarea {
    flex: 1;
    resize: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 13px;
    font-family: inherit;
    height: 38px;
    max-height: 80px;
    outline: none;
    transition: border-color 0.2s;
}
.ai-chat-input-row textarea:focus { border-color: var(--gold); }
.ai-chat-send {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--gold);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}
.ai-chat-send:hover { background: var(--gold-dark); }

/* ===== AI INSIGHTS (Client 360°) ===== */
/* AI Daily Summary Card */
.ai-daily-summary-card { background: linear-gradient(135deg, rgba(13,148,136,0.04), rgba(201,168,76,0.06)); border: 1px solid rgba(13,148,136,0.15); border-top: 3px solid var(--gold); border-radius: var(--radius-md); padding: 0; margin-bottom: 20px; overflow: hidden; }
.ai-daily-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: rgba(13,148,136,0.06); border-bottom: 1px solid rgba(13,148,136,0.1); }
.ai-daily-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: var(--text); }
.ai-daily-body { padding: 16px 18px; }
.ai-summary-forecast { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.ai-sf-box { padding: 12px; border-radius: var(--radius-sm); text-align: center; }
.ai-sf-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.ai-sf-val { font-size: 18px; font-weight: 700; }
.ai-sf-pessimist { background: rgba(239,68,68,0.08); color: #ef4444; }
.ai-sf-probabil { background: rgba(13,148,136,0.1); color: var(--gold); }
.ai-sf-optimist { background: rgba(34,197,94,0.08); color: #22c55e; }
.ai-summary-pipeline { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ai-sp-chip { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; border: 1px solid; background: white; }
.ai-summary-brief { padding: 14px; background: white; border-radius: var(--radius-sm); border: 1px solid var(--border); margin-bottom: 14px; font-size: 13px; line-height: 1.6; color: var(--text); }
.ai-summary-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gold); margin-bottom: 8px; display: flex; align-items: center; gap: 4px; }
.ai-summary-leads { margin-bottom: 8px; }
.ai-summary-leads-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.ai-sl-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: white; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: border-color 0.15s; }
.ai-sl-card:hover { border-color: var(--gold); }
.ai-sl-score { min-width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 700; font-size: 13px; border: 1.5px solid; }
.ai-sl-info { flex: 1; min-width: 0; }
.ai-sl-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-sl-meta { font-size: 11px; color: var(--text-muted); }
.ai-sl-label { font-size: 10px; font-weight: 600; white-space: nowrap; }

.ai-insights-card {
    border-top: 3px solid var(--gold);
    background: linear-gradient(135deg, rgba(201,168,76,0.03), rgba(13,148,136,0.03));
}
.ai-score-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}
.ai-score-high { background: linear-gradient(135deg, #22c55e, #16a34a); }
.ai-score-medium { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.ai-score-low { background: linear-gradient(135deg, #ef4444, #dc2626); }

.ai-insights-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: flex-start;
}
.ai-insights-body { min-width: 0; }
.ai-insights-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--gold-dark);
    margin-bottom: 4px;
}
.ai-insights-summary {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 12px;
}
.ai-insights-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}
.ai-action-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    font-size: 13px;
}
.ai-action-item .material-icons-round {
    font-size: 16px;
    color: var(--gold);
    margin-top: 1px;
    flex-shrink: 0;
}
.ai-insights-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.ai-tag {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}
.ai-tag-opportunity {
    background: rgba(34,197,94,0.1);
    color: #16a34a;
    border: 1px solid rgba(34,197,94,0.2);
}
.ai-tag-risk {
    background: rgba(239,68,68,0.1);
    color: #dc2626;
    border: 1px solid rgba(239,68,68,0.2);
}

/* ===== AI MORNING SECTIONS ===== */
.morning-ai-section { margin-top: 8px; }
.ai-brief-content {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text);
    padding: 4px 0;
}
.ai-brief-content p { margin: 0 0 8px 0; }
.ai-brief-content strong { color: var(--gold-dark); }
.ai-brief-content ul {
    margin: 4px 0 8px;
    padding-left: 18px;
}
.ai-brief-content li { margin-bottom: 4px; }

/* Lead scores */
.ai-lead-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background 0.15s;
}
.ai-lead-row:hover { background: var(--gray-50); }
.ai-lead-row:last-child { border-bottom: none; }
.ai-lead-score {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}
.ai-lead-info { flex: 1; min-width: 0; }
.ai-lead-name {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ai-lead-detail {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}
.ai-lead-label {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

/* Revenue forecast */
.ai-forecast-scenarios {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.ai-forecast-box {
    text-align: center;
    padding: 14px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}
.ai-forecast-box.best { background: rgba(34,197,94,0.06); border-color: rgba(34,197,94,0.2); }
.ai-forecast-box.probable { background: rgba(59,130,246,0.06); border-color: rgba(59,130,246,0.2); }
.ai-forecast-box.worst { background: rgba(239,68,68,0.06); border-color: rgba(239,68,68,0.2); }
.ai-forecast-label {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}
.ai-forecast-value {
    font-size: 20px;
    font-weight: 800;
}
.ai-forecast-box.best .ai-forecast-label { color: #16a34a; }
.ai-forecast-box.best .ai-forecast-value { color: #22c55e; }
.ai-forecast-box.probable .ai-forecast-label { color: #2563eb; }
.ai-forecast-box.probable .ai-forecast-value { color: #3b82f6; }
.ai-forecast-box.worst .ai-forecast-label { color: #dc2626; }
.ai-forecast-box.worst .ai-forecast-value { color: #ef4444; }

.ai-pipeline-breakdown { margin-top: 8px; }
.ai-pipeline-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 13px;
}
.ai-pipeline-status {
    font-weight: 600;
    min-width: 90px;
}
.ai-pipeline-bar {
    flex: 1;
    height: 6px;
    background: var(--gray-100);
    border-radius: 3px;
    overflow: hidden;
}
.ai-pipeline-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}
.ai-pipeline-value {
    font-weight: 700;
    min-width: 80px;
    text-align: right;
    font-size: 12px;
}

/* Rotating icon animation */
@keyframes rotating {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.rotating-icon { animation: rotating 1.5s linear infinite; }

/* ===== MOBILE OFFER CARDS ===== */
.offers-cards-mobile {
    display: flex; flex-direction: column; gap: 0;
}
.offer-card-m {
    padding: 14px 16px; border-bottom: 1px solid var(--border-light);
    cursor: pointer; transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.offer-card-m:active { background: var(--gold-subtle); }
.offer-card-m-top {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px;
}
.offer-card-m-nr {
    font-size: 13px; font-weight: 700; color: var(--text);
    display: flex; align-items: center; gap: 6px;
}
.offer-card-m-val {
    font-size: 15px; font-weight: 800; color: var(--gold);
}
.offer-card-m-client {
    font-size: 14px; color: var(--text); margin-bottom: 6px;
}
.offer-card-m-bottom {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.offer-card-m-date {
    font-size: 11px; color: var(--text-light);
}
.offer-card-m-user {
    font-size: 11px; color: var(--text-light); margin-left: auto;
}

/* ===== TASK OVERDUE STYLES ===== */
.kanban-overdue-badge {
    font-size: 10px; font-weight: 700; color: #fff; background: #ef4444;
    padding: 2px 8px; border-radius: 10px; margin-left: auto;
    animation: pulse-red 2s infinite;
}
@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.kanban-card-overdue {
    border-left: 3px solid #ef4444 !important;
    background: rgba(239,68,68,0.04) !important;
}
.kanban-card-overdue:hover { background: rgba(239,68,68,0.08) !important; }
/* Category badges */
.kanban-category-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 10px; font-weight: 600; padding: 2px 8px;
    border-radius: 10px; margin-bottom: 4px;
}
.cat-call { background: rgba(59,130,246,0.1); color: #2563eb; }
.cat-follow_up { background: rgba(245,158,11,0.1); color: #0d9488; }
.cat-payment { background: rgba(239,68,68,0.1); color: #dc2626; }
.cat-email { background: rgba(99,102,241,0.1); color: #14b8a6; }
.cat-meeting { background: rgba(16,185,129,0.1); color: #059669; }
.cat-delivery { background: rgba(168,85,247,0.1); color: #9333ea; }
.cat-measure { background: rgba(107,114,128,0.1); color: #4b5563; }
.cat-document { background: rgba(75,85,99,0.1); color: #374151; }

.kanban-overdue-label {
    display: flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 700; color: #ef4444;
    margin-bottom: 4px;
}
/* Offer overdue highlights */
.offer-card-overdue { border-left: 3px solid #ef4444 !important; background: rgba(239,68,68,0.04) !important; }
.offer-row-overdue { background: rgba(239,68,68,0.04) !important; }
.offer-row-overdue td:first-child { border-left: 3px solid #ef4444; }
.offer-row-overdue:hover { background: rgba(239,68,68,0.08) !important; }

/* Offer view mode bar */
.offer-view-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px; background: var(--gray-50); border-bottom: 1px solid var(--border);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.offer-view-bar .btn-edit-offer {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--gold); color: #fff; border: none; padding: 8px 18px;
    border-radius: var(--radius-sm); font-weight: 600; font-size: 13px; cursor: pointer;
}
.offer-view-bar .btn-edit-offer:hover { filter: brightness(1.1); }
.offer-readonly .form-field input,
.offer-readonly .form-field select,
.offer-readonly .form-field textarea {
    pointer-events: none; opacity: 0.85; background: var(--gray-50);
}
.offer-readonly .article-card { pointer-events: none; opacity: 0.9; }
.offer-readonly .btn-remove-article,
.offer-readonly .add-article-row { display: none !important; }
/* Save button prominent */
.btn-save-offer-main {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--gold); color: #fff; border: none; padding: 10px 28px;
    border-radius: var(--radius-sm); font-weight: 700; font-size: 14px; cursor: pointer;
    box-shadow: 0 2px 8px rgba(191,155,80,0.3);
    transition: all 0.2s;
}
.btn-save-offer-main:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(191,155,80,0.4); }
.save-bar-sticky {
    position: sticky; bottom: 0; z-index: 50;
    padding: 12px 16px; background: var(--bg);
    border-top: 2px solid var(--gold); display: flex; justify-content: center; gap: 12px;
}

/* ===== MOBILE BRAND CARDS ===== */
.brand-cards-mobile {
    display: flex; flex-direction: column; gap: 0;
}
.brand-card-m {
    padding: 14px 16px; border-bottom: 1px solid var(--border-light);
    cursor: pointer; transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.brand-card-m:active { background: var(--gold-subtle); }
.brand-card-m-top {
    display: flex; justify-content: space-between; align-items: center;
}

/* ===== MOBILE SLIDE PANEL + AI BUTTON FIX ===== */
@media (max-width: 768px) {
    .slide-panel-content { width: 100vw; max-width: 100vw; }
    .command-palette { width: 95vw; }
    .task-detail-meta { grid-template-columns: 1fr; }
    .ai-chat-btn { bottom: 80px; right: 16px; width: 46px; height: 46px; }
    .ai-chat-btn .material-icons-round { font-size: 22px; }
    .ai-chat-panel { width: calc(100vw - 32px); right: 16px; bottom: 136px; max-height: calc(100vh - 200px); }
    .ai-forecast-scenarios { grid-template-columns: 1fr; }
    .ai-insights-grid { grid-template-columns: 1fr; }
    /* Offers toolbar mobile */
    .offers-toolbar { padding: 10px 12px; }
    .offers-toolbar input { min-width: 100px; font-size: 14px; padding: 10px 12px; }
    .offers-toolbar select { font-size: 13px; padding: 10px 8px; }
}

/* ===== OFFER PROBABILITY SCORE ===== */
.offer-score-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 700; padding: 3px 10px;
    border-radius: 12px; white-space: nowrap;
}
.offer-score-mini {
    font-size: 11px; font-weight: 700;
}

/* ===== FOLLOW-UP AI BUTTON ===== */
.btn-followup-ai {
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff; border: none; padding: 8px 16px;
    border-radius: var(--radius-sm); font-weight: 600;
    font-size: 12px; cursor: pointer; transition: all 0.2s;
}
.btn-followup-ai:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 3px 12px rgba(102,126,234,0.3); }

/* ===== FOLLOW-UP MODAL ===== */
.fup-tab {
    padding: 8px 18px; border: none; background: var(--gray-50);
    color: var(--text-secondary); font-size: 13px; font-weight: 600;
    border-radius: var(--radius-sm); cursor: pointer; transition: all 0.15s;
}
.fup-tab.active { background: var(--gold); color: #fff; }
.fup-field { margin-bottom: 12px; }
.fup-field label { display: block; font-size: 11px; font-weight: 700; color: var(--dark-gray); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.fup-field input, .fup-field textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: 13px; font-family: inherit;
    background: var(--gray-50); resize: vertical;
}
.fup-actions { display: flex; gap: 8px; margin-top: 12px; }
.fup-actions .btn, .fup-actions .btn-gold { padding: 8px 16px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; border-radius: var(--radius-sm); cursor: pointer; border: none; font-weight: 600; }
.fup-actions .btn-gold { background: var(--gold); color: #fff; }
.fup-actions .btn { background: var(--dark); color: #fff; }

/* Rotating icon for loading */
@keyframes ai-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.rotating-icon { animation: ai-spin 1.5s linear infinite; }

/* ===== LEAD FUNNEL BAR (v8.1) ===== */
.lead-funnel-bar { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 16px; }
.funnel-header { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--text-primary); }
.funnel-stages { display: flex; gap: 3px; min-height: 56px; }
.funnel-stage { flex: 1; text-align: center; cursor: pointer; transition: transform 0.15s; border-radius: var(--radius-sm); padding: 6px 4px; }
.funnel-stage:hover { transform: translateY(-2px); background: var(--gray-50); }
.funnel-stage-bar { height: 6px; border-radius: 3px; margin-bottom: 6px; transition: height 0.2s; }
.funnel-stage:hover .funnel-stage-bar { height: 8px; }
.funnel-stage-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.funnel-stage-count { font-size: 18px; font-weight: 800; color: var(--text-primary); line-height: 1.2; }
.funnel-stage-avg { font-size: 10px; color: var(--text-muted); }
@media (max-width: 768px) {
    .funnel-stages { flex-wrap: wrap; gap: 6px; }
    .funnel-stage { min-width: 60px; flex: 1 1 auto; }
    .funnel-stage-count { font-size: 15px; }
}

/* ===== STALE LEADS (v8.1) ===== */
.stale-leads-list { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow-y: auto; }
.stale-lead-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius-sm); cursor: pointer; transition: background 0.15s; border-left: 3px solid transparent; }
.stale-lead-item:hover { background: var(--gray-50); }
.stale-lead-item.stale-critical { border-left-color: #ef4444; background: rgba(239,68,68,0.04); }
.stale-lead-item.stale-warning { border-left-color: #14b8a6; background: rgba(245,158,11,0.03); }
.stale-lead-item.stale-mild { border-left-color: #14b8a6; }
.stale-lead-name { font-size: 13px; font-weight: 600; color: var(--text-primary); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stale-lead-meta { font-size: 11px; color: var(--text-muted); flex: 2; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.stale-status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.stale-lead-actions { display: flex; gap: 4px; flex-shrink: 0; }
.stale-action-btn { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-muted); border: 1px solid var(--border); background: var(--card-bg); transition: all 0.15s; text-decoration: none; }
.stale-action-btn:hover { color: var(--gold); border-color: var(--gold); }

/* ===== IMPORT RESULT (v8.1) ===== */
.import-result-card { padding: 16px; background: var(--gray-50); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.import-stat { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 0; }
.import-stat strong { font-weight: 700; }

/* ===== ACTIVITY TIMELINE (v8.1) ===== */
.activity-timeline { display: flex; flex-direction: column; gap: 8px; }
.activity-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.activity-item:last-child { border-bottom: none; }
.activity-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--gray-50); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.activity-content { flex: 1; min-width: 0; }
.activity-desc { font-size: 13px; color: var(--text-primary); }
.activity-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Sidebar sub-item */
.sidebar-sub-item { font-size: 12px !important; }
.sidebar-sub-item .material-icons-round { font-size: 16px !important; }

/* Alert styles */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; }
.alert-error { background: rgba(239,68,68,0.08); color: #ef4444; border: 1px solid rgba(239,68,68,0.2); }
.alert-success { background: rgba(34,197,94,0.08); color: #22c55e; border: 1px solid rgba(34,197,94,0.2); }

/* ===== AUTOCOMPLETE DROPDOWN ===== */
.ac-dropdown {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 999;
    background: var(--card-bg, #fff); border: 1px solid var(--border); border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12); max-height: 280px; overflow-y: auto;
    margin-top: 2px;
}
.ac-header {
    padding: 8px 12px; font-size: 11px; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border);
    background: var(--bg-secondary, #f9fafb);
}
.ac-item {
    padding: 10px 12px; cursor: pointer; border-bottom: 1px solid rgba(0,0,0,0.04);
    transition: background 0.15s;
}
.ac-item:hover { background: rgba(191,155,80,0.08); }
.ac-item:last-child { border-bottom: none; }
.ac-item-main { display: flex; align-items: center; font-size: 13px; }
.ac-item-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; padding-left: 20px; }
.ac-dim { color: var(--text-muted); font-weight: 400; }
.badge-xs {
    display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 10px;
    background: rgba(191,155,80,0.12); color: var(--gold); font-weight: 600; margin-left: 4px;
}

/* ===== AI ASSISTANT BUBBLE ===== */
.ai-fab {
    position: fixed; bottom: 24px; right: 24px; z-index: 9999;
    width: 52px; height: 52px; border-radius: 50%;
    background: linear-gradient(135deg, #1a1a2e, #2d2d4e);
    color: var(--gold); border: 2px solid var(--gold);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}
.ai-fab:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(0,0,0,0.3); }
.ai-panel {
    position: fixed; bottom: 88px; right: 24px; z-index: 9998;
    width: 360px; max-height: 480px; background: var(--card-bg, #fff);
    border-radius: 16px; border: 1px solid var(--border);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    display: none; flex-direction: column; overflow: hidden;
}
.ai-panel.show { display: flex; }
.ai-panel-header {
    padding: 14px 16px; background: #1a1a2e; color: #fff;
    display: flex; align-items: center; gap: 10px;
}
.ai-panel-header .ai-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: ai-pulse 2s infinite; }
@keyframes ai-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.ai-panel-body { flex: 1; overflow-y: auto; padding: 16px; font-size: 13px; line-height: 1.6; }
.ai-msg { margin-bottom: 12px; }
.ai-msg-bot { background: #f0f9ff; border-radius: 12px 12px 12px 4px; padding: 10px 14px; }
.ai-msg-user { background: rgba(191,155,80,0.1); border-radius: 12px 12px 4px 12px; padding: 10px 14px; text-align: right; }
.ai-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ai-sug-btn {
    padding: 6px 12px; border-radius: 20px; font-size: 12px;
    background: rgba(191,155,80,0.08); border: 1px solid rgba(191,155,80,0.3);
    color: var(--gold); cursor: pointer; transition: all 0.15s;
}
.ai-sug-btn:hover { background: rgba(191,155,80,0.2); }
.ai-panel-input {
    padding: 12px 16px; border-top: 1px solid var(--border);
    display: flex; gap: 8px;
}
.ai-panel-input input {
    flex: 1; border: 1px solid var(--border); border-radius: 8px;
    padding: 8px 12px; font-size: 13px; outline: none;
}
.ai-panel-input input:focus { border-color: var(--gold); }
.ai-panel-input button {
    background: var(--gold); color: #fff; border: none; border-radius: 8px;
    padding: 8px 14px; cursor: pointer; font-size: 13px; font-weight: 600;
}

/* ===== WIZARD STEPS ===== */
.wizard-steps {
    display: flex; align-items: center; justify-content: center;
    padding: 10px 20px; background: linear-gradient(135deg, rgba(13,148,136,0.04), rgba(191,155,80,0.04));
    border-bottom: 1px solid var(--border); gap: 4px;
}
.wiz-step {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    opacity: 0.35; transition: all 0.3s ease; cursor: pointer; padding: 4px 12px;
}
.wiz-step.active { opacity: 1; }
.wiz-step.done { opacity: 0.7; }
.wiz-step.done .wiz-icon { background: var(--primary); color: #fff; }
.wiz-step.active .wiz-icon { background: var(--gold); color: #fff; transform: scale(1.1); box-shadow: 0 2px 8px rgba(191,155,80,0.3); }
.wiz-step.warn .wiz-icon { background: #ef4444; color: #fff; animation: wiz-pulse 1s 3; }
.wiz-icon {
    width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--bg-light); border: 2px solid var(--border); transition: all 0.3s ease;
}
.wiz-icon .material-icons-round { font-size: 16px; }
.wiz-label { font-size: 10px; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; }
.wiz-step.active .wiz-label { color: var(--gold); }
.wiz-step.done .wiz-label { color: var(--primary); }
.wiz-connector { width: 30px; height: 2px; background: var(--border); margin: 0 2px; margin-bottom: 16px; transition: background 0.3s; }
.wiz-connector.done { background: var(--primary); }
@keyframes wiz-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }
@media (max-width: 768px) {
    .wizard-steps { padding: 8px 10px; }
    .wiz-step { padding: 2px 6px; }
    .wiz-connector { width: 16px; }
    .wiz-label { font-size: 9px; }
}

/* AI Wizard Panel */
.ai-wizard-fab {
    position: fixed; bottom: 24px; right: 24px; z-index: 999;
    width: 52px; height: 52px; border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), #d4a853);
    color: #fff; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(191,155,80,0.4);
    transition: all 0.3s ease;
}
.ai-wizard-fab:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(191,155,80,0.5); }
.ai-wizard-fab .material-icons-round { font-size: 24px; }
.ai-wizard-fab .fab-badge {
    position: absolute; top: -2px; right: -2px;
    width: 18px; height: 18px; border-radius: 50%;
    background: #ef4444; color: #fff; font-size: 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
}
.ai-wizard-panel {
    position: fixed; bottom: 88px; right: 24px; z-index: 998;
    width: 320px; max-height: 420px;
    background: var(--white); border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
    display: none; flex-direction: column;
    overflow: hidden; animation: wizPanelIn 0.25s ease;
}
@keyframes wizPanelIn { from { opacity: 0; transform: translateY(12px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
.ai-wizard-panel.open { display: flex; }
.ai-wiz-header {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px; border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(191,155,80,0.06), rgba(13,148,136,0.04));
}
.ai-wiz-header .ai-wiz-avatar {
    width: 32px; height: 32px; border-radius: 10px;
    background: linear-gradient(135deg, var(--gold), #d4a853);
    display: flex; align-items: center; justify-content: center;
    color: #fff; flex-shrink: 0;
}
.ai-wiz-header .ai-wiz-title { font-size: 13px; font-weight: 700; color: var(--text); }
.ai-wiz-header .ai-wiz-subtitle { font-size: 11px; color: var(--text-muted); }
.ai-wiz-body { padding: 8px 12px; overflow-y: auto; max-height: 300px; }
.ai-wiz-card {
    border: 1px solid var(--border); border-radius: 8px;
    padding: 8px 10px; margin-bottom: 6px;
    transition: all 0.2s ease; cursor: pointer;
}
.ai-wiz-card:hover { border-color: var(--gold); background: rgba(191,155,80,0.03); }
.ai-wiz-card.done { opacity: 0.5; border-color: var(--primary); }
.ai-wiz-card.done .ai-wiz-card-icon { background: var(--primary); color: #fff; }
.ai-wiz-card.active { border-color: var(--gold); background: rgba(191,155,80,0.05); box-shadow: 0 0 0 2px rgba(191,155,80,0.1); }
.ai-wiz-card.active .ai-wiz-card-icon { background: var(--gold); color: #fff; }
.ai-wiz-card-row { display: flex; align-items: flex-start; gap: 10px; }
.ai-wiz-card-icon {
    width: 28px; height: 28px; border-radius: 8px;
    background: var(--bg-light); color: var(--text-muted);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    font-size: 14px; transition: all 0.2s;
}
.ai-wiz-card-text { flex: 1; }
.ai-wiz-card-title { font-size: 12px; font-weight: 600; color: var(--text); }
.ai-wiz-card-hint { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.ai-wiz-card-action {
    display: inline-flex; align-items: center; gap: 4px;
    margin-top: 6px; padding: 4px 10px; border-radius: 6px;
    background: var(--gold); color: #fff; font-size: 11px; font-weight: 600;
    border: none; cursor: pointer; transition: all 0.2s;
}
.ai-wiz-card-action:hover { background: #a88840; }
.ai-wiz-card-action .material-icons-round { font-size: 13px; }
.ai-wiz-progress {
    padding: 10px 16px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
}
.ai-wiz-progress-bar {
    flex: 1; height: 6px; border-radius: 3px; background: var(--bg-light); overflow: hidden;
}
.ai-wiz-progress-fill {
    height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, var(--gold), var(--primary));
    transition: width 0.4s ease;
}
.ai-wiz-progress-label { font-size: 11px; font-weight: 700; color: var(--gold); white-space: nowrap; }
.ai-wiz-tip {
    margin-top: 4px; padding: 8px 12px; border-radius: 8px;
    background: rgba(13,148,136,0.06); border-left: 3px solid var(--primary);
    font-size: 11px; color: var(--text); line-height: 1.4;
}
.ai-wiz-tip strong { color: var(--primary); }
@media (max-width: 768px) {
    .ai-wizard-panel { width: calc(100vw - 32px); right: 16px; bottom: 80px; }
    .ai-wizard-fab { bottom: 16px; right: 16px; width: 46px; height: 46px; }
}

/* ===== REVISION HISTORY ITEMS ===== */
.revision-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px; border-radius: 6px; font-size: 13px;
    border: 1px solid var(--border); margin-bottom: 6px;
    transition: background 0.15s;
}
.revision-item:hover { background: var(--gray-50); }
.revision-current { background: rgba(13,148,136,0.05); border-color: var(--gold); }
.revision-item .btn { font-size: 11px; padding: 3px 8px; }

/* ===== CLEAN PRO UI (v8.1) ===== */
/* Principiu: fundal curat alb/gri deschis, culori DOAR pe status și CTA */

/* ===== MORNING DASHBOARD v2 — Notion/Linear inspired ===== */

/* Skeleton loading animation */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}
.mh-skel-bar {
    height: 20px; border-radius: 6px; width: 60%;
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
    background-size: 200px 100%; animation: shimmer 1.5s infinite;
}
.mh-skel-sm { height: 12px; width: 40%; margin-top: 8px; }
.mh-skel-full { width: 100%; }
.mh-skel-80 { width: 80%; margin-top: 10px; }
.mh-skel-60 { width: 60%; margin-top: 10px; }
.mh-skel-lines { padding: 8px 0; }
.mh-kpi-skeleton { display: flex; flex-direction: column; justify-content: center; }
body.dark-mode .mh-skel-bar {
    background: linear-gradient(90deg, var(--gray-700) 25%, var(--gray-800) 50%, var(--gray-700) 75%);
    background-size: 200px 100%; animation: shimmer 1.5s infinite;
}

/* Hero section */
.mh-hero {
    display: flex; align-items: flex-end; justify-content: space-between;
    padding: 28px 32px 24px;
    margin: -20px -24px 24px;
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 50%, #115e59 100%);
    border-radius: 0 0 20px 20px;
    position: relative; overflow: hidden;
}
.mh-hero::before {
    content: ''; position: absolute; top: -40%; right: -10%; width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.mh-hero::after {
    content: ''; position: absolute; bottom: -20%; left: 10%; width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    pointer-events: none;
}
.mh-hero-left { position: relative; z-index: 1; }
.mh-hero-time {
    font-size: 42px; font-weight: 800; color: rgba(255,255,255,0.95);
    letter-spacing: -1.5px; line-height: 1; margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
}
.mh-hero-title {
    font-size: 18px !important; font-weight: 500 !important; color: rgba(255,255,255,0.85) !important;
    margin-bottom: 2px !important;
}
.mh-hero-date {
    font-size: 13px; color: rgba(255,255,255,0.6); font-weight: 400;
}
.mh-hero-date div { margin-top: 0 !important; font-size: 12px !important; color: rgba(255,255,255,0.45) !important; font-style: italic !important; }

/* Hero action buttons */
.mh-hero-actions {
    display: flex; gap: 8px; position: relative; z-index: 1;
}
.mh-action {
    width: 40px; height: 40px; border-radius: 12px;
    background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.9); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; backdrop-filter: blur(8px);
}
.mh-action:hover {
    background: rgba(255,255,255,0.22); border-color: rgba(255,255,255,0.3);
    transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.mh-action .material-icons-round { font-size: 20px; }
.mh-action-search {
    width: auto; padding: 0 14px 0 10px; gap: 6px;
}
.mh-action-kbd {
    font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.1); padding: 2px 6px; border-radius: 4px;
    font-family: inherit;
}

/* KPI cards upgraded */
.morning-kpis {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 14px; margin-bottom: 24px;
}
.morning-kpi {
    background: var(--white); border: 1px solid var(--border-light);
    border-radius: 16px; padding: 20px 18px;
    display: flex; align-items: center; gap: 14px;
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    cursor: pointer; position: relative; overflow: hidden;
}
body.dark-mode .morning-kpi { background: var(--card); border-color: var(--border); }
.morning-kpi:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: var(--gold);
}
.morning-kpi-icon {
    width: 44px; height: 44px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.morning-kpi-icon .material-icons-round { font-size: 22px; }
.morning-kpi-data { flex: 1; }
.morning-kpi-value {
    font-size: 26px; font-weight: 800; color: var(--text);
    line-height: 1; letter-spacing: -0.5px;
}
.morning-kpi-label {
    font-size: 11px; color: var(--text-muted); font-weight: 600;
    margin-top: 3px; text-transform: uppercase; letter-spacing: 0.5px;
}
.morning-kpi-click { cursor: pointer; }

/* Overdue pulse */
.overdue-val { color: #ef4444; }
@keyframes overduePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.15); }
    50% { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}
.morning-kpi:first-child:has(.overdue-val) { animation: overduePulse 2s infinite; border-color: rgba(239,68,68,0.2); }

/* AI Daily Summary card upgraded */
.ai-daily-summary-card {
    background: var(--white); border: 1px solid var(--border-light);
    border-radius: 16px; padding: 0; margin-bottom: 24px;
    overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
body.dark-mode .ai-daily-summary-card { background: var(--card); border-color: var(--border); }
.ai-daily-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; border-bottom: 1px solid var(--border-light);
}
.ai-daily-title {
    display: flex; align-items: center; gap: 8px;
    font-weight: 700; font-size: 14px; color: var(--text);
}
.ai-daily-body { padding: 18px 20px; }

/* AI forecast bar redesign */
.ai-forecast-bar {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px;
    margin-bottom: 16px;
}
.ai-forecast-item {
    text-align: center; padding: 14px 12px; border-radius: 12px;
    border: 1px solid var(--border-light);
}
.ai-forecast-item:first-child { background: rgba(239,68,68,0.04); border-color: rgba(239,68,68,0.12); }
.ai-forecast-item:nth-child(2) { background: rgba(245,158,11,0.04); border-color: rgba(245,158,11,0.12); }
.ai-forecast-item:last-child { background: rgba(16,185,129,0.04); border-color: rgba(16,185,129,0.12); }
.ai-forecast-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 4px; }
.ai-forecast-item:first-child .ai-forecast-label { color: #ef4444; }
.ai-forecast-item:nth-child(2) .ai-forecast-label { color: #f59e0b; }
.ai-forecast-item:last-child .ai-forecast-label { color: #10b981; }
.ai-forecast-value { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; }

/* Morning sections upgraded */
.morning-section-title {
    font-size: 14px; font-weight: 700; color: var(--text);
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border-light);
}
.morning-section-title .material-icons-round { font-size: 18px; color: var(--gold); }
.morning-kanban-wrap {
    background: var(--white); border: 1px solid var(--border-light);
    border-radius: 16px; padding: 20px; margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
body.dark-mode .morning-kanban-wrap { background: var(--card); border-color: var(--border); }
.morning-panel {
    background: var(--white); border: 1px solid var(--border-light);
    border-radius: 16px; padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
body.dark-mode .morning-panel { background: var(--card); border-color: var(--border); }
.morning-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border-light);
}
.morning-panel-title {
    font-size: 14px; font-weight: 700; color: var(--text);
    display: flex; align-items: center; gap: 8px;
}
.morning-panel-title .material-icons-round { font-size: 18px; color: var(--text-muted); }
.morning-item {
    padding: 10px 12px; border-radius: 10px;
    border: 1px solid transparent; margin-bottom: 6px;
    display: flex; align-items: center; gap: 12px;
    transition: all 0.15s; cursor: pointer; font-size: 13px;
}
.morning-item:hover { background: var(--gold-subtle); border-color: rgba(13,148,136,0.12); }
.morning-bottom-grid { margin-bottom: 20px; }
.morning-notes-section { margin-bottom: 24px; }
.morning-notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }

/* Quick actions old - hide (replaced by hero actions) */
.quick-actions-bar { display: none !important; }

/* ===== DUO GRID LAYOUT ===== */
.md-duo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.md-duo-panel { margin: 0; }
.md-duo-grid .ai-daily-summary-card { margin-bottom: 0; }
.md-duo-grid .morning-panel { margin-bottom: 0; }

/* ===== FOLLOW-UP OBLIGATORIU (PROMINENT) ===== */
.mfu-section:empty { display: none; }
.mfu-section { background: var(--card-bg); border: 1px solid rgba(239,68,68,0.2); border-radius: 14px; padding: 16px; margin-bottom: 16px; position: relative; }
.mfu-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mfu-header-left { display: flex; align-items: center; gap: 8px; }
.mfu-header-right { text-align: right; }
.mfu-pulse { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; animation: mfuPulse 2s ease-in-out infinite; flex-shrink: 0; }
@keyframes mfuPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); } 50% { box-shadow: 0 0 0 6px rgba(239,68,68,0); } }
.mfu-icon { color: #ef4444; font-size: 20px; }
.mfu-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.mfu-count { font-size: 11px; font-weight: 700; color: #fff; background: #ef4444; border-radius: 10px; padding: 1px 8px; min-width: 20px; text-align: center; }
.mfu-total-value { font-size: 16px; font-weight: 700; color: var(--gold); display: block; }
.mfu-total-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.mfu-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.mfu-card { background: var(--bg); border: 1px solid var(--border-light); border-radius: 10px; padding: 12px; cursor: pointer; transition: all 0.15s ease; border-top: 3px solid var(--fu-color, #0d9488); }
.mfu-card:hover { border-color: var(--fu-color); box-shadow: 0 4px 16px rgba(0,0,0,0.06); transform: translateY(-1px); }
.mfu-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.mfu-card-badge { color: #fff; font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.mfu-overdue { font-size: 11px; font-weight: 700; color: #ef4444; background: rgba(239,68,68,0.08); padding: 2px 6px; border-radius: 6px; }
.mfu-card-client { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mfu-card-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.mfu-card-actions { display: flex; gap: 6px; }
.mfu-btn { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--border-light); background: var(--card-bg); color: var(--text-secondary); font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.15s ease; }
.mfu-btn .material-icons-round { font-size: 14px; }
.mfu-btn:hover { border-color: var(--gold); color: var(--gold); }
.mfu-btn-primary { background: var(--gold); color: #fff; border-color: var(--gold); }
.mfu-btn-primary:hover { background: #0b7c72; border-color: #0b7c72; color: #fff; }

/* ===== COMPACT SPACING ===== */
.mh-hero { padding: 20px 24px 18px; margin: -20px -24px 16px; }
.morning-kpis { margin-bottom: 16px; gap: 10px; }
.morning-kpi { padding: 14px 14px; }
.ai-daily-summary-card { margin-bottom: 16px; padding: 14px; }
.ai-daily-body { font-size: 13px; }
.morning-kanban-wrap { margin-bottom: 16px; padding: 14px; }
.morning-panel { padding: 14px; }
.morning-panel-header { margin-bottom: 8px; }
.morning-section-title { font-size: 13px; margin-bottom: 10px; padding-bottom: 8px; }
.morning-notes-grid { gap: 8px; }
.morning-bottom-grid { margin-bottom: 16px; }
.morning-notes-section { margin-bottom: 16px; }
.stale-lead-item { padding: 8px 10px; margin-bottom: 6px; }

/* Mobile responsive */
@media (max-width: 768px) {
    .mh-hero { padding: 16px 16px 14px; margin: -16px -16px 16px; border-radius: 0 0 16px 16px; flex-direction: column; align-items: flex-start; gap: 12px; }
    .mh-hero-time { font-size: 28px; }
    .mh-hero-title { font-size: 15px !important; }
    .mh-hero-actions { width: 100%; }
    .mh-action { flex: 1; height: 36px; }
    .mh-action-search { flex: 2; }
    .morning-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
    .morning-kpi { padding: 12px 10px; border-radius: 12px; }
    .morning-kpi-value { font-size: 18px; }
    .morning-kpi-icon { width: 32px; height: 32px; border-radius: 8px; }
    .morning-notes-grid { grid-template-columns: 1fr 1fr; }
    .ai-forecast-bar { grid-template-columns: 1fr; gap: 6px; }
    .md-duo-grid { grid-template-columns: 1fr; gap: 12px; }
    .mfu-cards { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .mh-hero-time { font-size: 24px; }
    .morning-kpis { grid-template-columns: 1fr 1fr; }
    .morning-notes-grid { grid-template-columns: 1fr; }
}

/* ===== PERFORMANCE & COMPACT v84 ===== */
/* GPU-accelerated hover transitions */
.project-card, .stat-card, .morning-kpi, .mfu-card { will-change: transform; }
/* Content visibility for off-screen sections */
.view-section[style*="display: none"] { content-visibility: hidden; }
/* Smoother scrolling */
.content-area, .modal-body, .picker-box { scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
/* Reduce repaints on hover */
.data-table tr { will-change: background-color; }
/* Tighter modal padding */
.modal-body { padding: 18px 20px; }
.modal-header { padding: 14px 20px; }
.modal-footer { padding: 12px 20px; }
/* Compact client 360 tabs */
.client-tabs { gap: 0; }
.client-tab { padding: 8px 14px; font-size: 12px; }
/* Tighter offer form */
.offer-form-section { padding: 14px; margin-bottom: 10px; }
.offer-form-section h3 { font-size: 14px; margin-bottom: 10px; }
