/* ============================================================
   ServiceCRM — Modern Design System v2.0
   ============================================================ */

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

/* ── CSS Variables ── */
:root {
    --primary:        #6366f1;
    --primary-dark:   #4f46e5;
    --primary-light:  #a5b4fc;
    --primary-bg:     rgba(99,102,241,0.08);
    --accent:         #06b6d4;
    --accent-dark:    #0891b2;
    --green:          #10b981;
    --green-bg:       rgba(16,185,129,0.1);
    --red:            #ef4444;
    --red-bg:         rgba(239,68,68,0.1);
    --yellow:         #f59e0b;
    --yellow-bg:      rgba(245,158,11,0.1);
    --blue:           #3b82f6;
    --blue-bg:        rgba(59,130,246,0.1);
    --purple:         #8b5cf6;
    --purple-bg:      rgba(139,92,246,0.1);
    --text:           #0f172a;
    --text-secondary: #475569;
    --text-muted:     #94a3b8;
    --bg:             #f1f5f9;
    --bg-secondary:   #e2e8f0;
    --white:          #ffffff;
    --card:           #ffffff;
    --border:         #e2e8f0;
    --border-light:   #f1f5f9;
    --sidebar-bg:     #1e1b4b;
    --sidebar-hover:  rgba(255,255,255,0.07);
    --sidebar-active: rgba(99,102,241,0.25);
    --sidebar-text:   rgba(255,255,255,0.75);
    --sidebar-width:  260px;
    --shadow-xs:      0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm:      0 2px 8px rgba(0,0,0,0.06);
    --shadow-md:      0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg:      0 8px 40px rgba(0,0,0,0.12);
    --shadow-xl:      0 20px 60px rgba(0,0,0,0.18);
    --radius-xs:      4px;
    --radius-sm:      8px;
    --radius:         12px;
    --radius-lg:      16px;
    --radius-xl:      24px;
    --radius-full:    9999px;
    --space-1:  4px;  --space-2:  8px;  --space-3:  12px;
    --space-4:  16px; --space-5:  20px; --space-6:  24px;
    --space-8:  32px; --space-10: 40px; --space-12: 48px;
    --font:       'Inter','Segoe UI',system-ui,sans-serif;
    --text-xs:    11px; --text-sm:   13px; --text-base: 15px;
    --text-md:    16px; --text-lg:   18px; --text-xl:   22px;
    --text-2xl:   28px; --text-3xl:  36px;
    --transition: 0.2s ease;
    --transition-slow: 0.35s ease;
    --z-sidebar:  1000; --z-header: 900;
    --z-modal:    2000; --z-toast:  9999; --z-dropdown: 1500;
}

/* ── Reset ── */
*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
body {
    font-family: var(--font);
    font-size: var(--text-base);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color:var(--primary); text-decoration:none; transition:color var(--transition); }
a:hover { color:var(--primary-dark); }
img,svg { display:block; max-width:100%; }
button { font-family:var(--font); }

::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--border); border-radius:var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background:var(--text-muted); }

/* ============================================================
   LAYOUT
   ============================================================ */
.app-container { display:flex; min-height:100vh; background:var(--bg); }

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    z-index: var(--z-sidebar);
    transition: transform var(--transition-slow);
    overflow: hidden;
}
.sidebar::before {
    content:'';
    position:absolute; top:0; left:0; right:0; height:200px;
    background:linear-gradient(135deg,rgba(99,102,241,0.3) 0%,transparent 100%);
    pointer-events:none;
}
.sidebar-header {
    padding: var(--space-5) var(--space-5) var(--space-4);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.logo {
    display:flex; align-items:center; gap:var(--space-3);
    font-size:var(--text-lg); font-weight:700; color:#fff; letter-spacing:-0.3px;
}
.logo-icon {
    width:36px; height:36px;
    background:linear-gradient(135deg,var(--primary),var(--accent));
    border-radius:var(--radius-sm);
    display:flex; align-items:center; justify-content:center;
    font-size:18px; color:#fff; flex-shrink:0;
    box-shadow:0 4px 12px rgba(99,102,241,0.4);
}
.logo i { font-size:18px; }
.sidebar-nav { flex:1; overflow-y:auto; padding:var(--space-3) 0; }
.nav-section { margin-bottom:var(--space-2); }
.nav-section-title {
    font-size:var(--text-xs); font-weight:600;
    text-transform:uppercase; letter-spacing:0.8px;
    color:rgba(255,255,255,0.35);
    padding:var(--space-3) var(--space-5) var(--space-2);
}
.nav-list { list-style:none; padding:0 var(--space-3); }
.nav-list li { margin-bottom:2px; }
.nav-list li a,
.nav-list li[data-page] {
    display:flex; align-items:center; gap:var(--space-3);
    padding:10px var(--space-3); border-radius:var(--radius-sm);
    cursor:pointer; transition:all var(--transition);
    color:var(--sidebar-text); font-size:var(--text-sm); font-weight:500;
    text-decoration:none; position:relative;
}
.nav-list li a:hover,
.nav-list li[data-page]:hover { background:var(--sidebar-hover); color:#fff; }
.nav-list li.active a,
.nav-list li[data-page].active { background:var(--sidebar-active); color:#fff; }
.nav-list li.active a::before,
.nav-list li[data-page].active::before {
    content:''; position:absolute; left:0; top:50%; transform:translateY(-50%);
    width:3px; height:60%; background:var(--primary-light);
    border-radius:0 var(--radius-xs) var(--radius-xs) 0;
}
.nav-list i { font-size:16px; width:20px; text-align:center; flex-shrink:0; opacity:0.8; }
.nav-list li.active i,.nav-list li:hover i { opacity:1; }
.nav-badge {
    margin-left:auto; background:var(--primary); color:#fff;
    font-size:10px; font-weight:700; padding:2px 7px;
    border-radius:var(--radius-full); min-width:20px; text-align:center;
}
.sidebar-footer {
    padding:var(--space-4); border-top:1px solid rgba(255,255,255,0.06); flex-shrink:0;
}
.user-profile {
    display:flex; align-items:center; gap:var(--space-3);
    padding:var(--space-2) var(--space-3); border-radius:var(--radius-sm);
    cursor:pointer; transition:background var(--transition);
}
.user-profile:hover { background:var(--sidebar-hover); }
.user-avatar {
    width:38px; height:38px; border-radius:var(--radius-sm);
    background:linear-gradient(135deg,var(--primary),var(--accent));
    display:flex; align-items:center; justify-content:center;
    font-weight:700; font-size:15px; color:#fff; flex-shrink:0;
    box-shadow:0 2px 8px rgba(99,102,241,0.35);
}
.user-info { flex:1; min-width:0; }
.user-name {
    font-size:var(--text-sm); font-weight:600; color:#fff;
    display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.user-role { font-size:var(--text-xs); color:rgba(255,255,255,0.45); display:block; }
.user-dropdown { color:rgba(255,255,255,0.4); font-size:12px; }

/* Main Content */
.main-content {
    flex:1; display:flex; flex-direction:column;
    margin-left:var(--sidebar-width); min-height:100vh;
    transition:margin-left var(--transition-slow);
}

/* Header */
.app-header {
    background:var(--white); border-bottom:1px solid var(--border);
    padding:0 var(--space-6); height:64px;
    display:flex; justify-content:space-between; align-items:center;
    position:sticky; top:0; z-index:var(--z-header); box-shadow:var(--shadow-xs);
}
.header-left { display:flex; align-items:center; gap:var(--space-4); }
.header-left h1 {
    font-size:var(--text-lg); font-weight:700; color:var(--text); letter-spacing:-0.3px;
}
.header-right { display:flex; align-items:center; gap:var(--space-2); }
.header-search {
    display:flex; align-items:center; gap:var(--space-2);
    background:var(--bg); border:1px solid var(--border);
    border-radius:var(--radius-full); padding:8px var(--space-4);
    min-width:240px; transition:all var(--transition);
}
.header-search:focus-within {
    border-color:var(--primary); background:var(--white);
    box-shadow:0 0 0 3px var(--primary-bg);
}
.header-search i { color:var(--text-muted); font-size:14px; }
.header-search input {
    border:none; background:transparent; font-size:var(--text-sm);
    color:var(--text); outline:none; width:100%; padding:0;
}
.header-search input::placeholder { color:var(--text-muted); }

/* Content */
.content { flex:1; padding:var(--space-6); overflow-y:auto; }

/* Footer */
.app-footer {
    background:var(--white); border-top:1px solid var(--border);
    padding:var(--space-4) var(--space-6);
}
.footer-content {
    display:flex; justify-content:space-between; align-items:center; gap:var(--space-4);
}
.footer-left { display:flex; align-items:center; gap:var(--space-4); }
.footer-left .logo { font-size:var(--text-sm); font-weight:700; color:var(--text); }
.footer-left p { font-size:var(--text-xs); color:var(--text-muted); }
.footer-right {
    display:flex; align-items:center; gap:var(--space-3);
    font-size:var(--text-xs); color:var(--text-muted);
}
.current-time { font-weight:600; color:var(--text-secondary); font-variant-numeric:tabular-nums; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display:inline-flex; align-items:center; justify-content:center;
    gap:var(--space-2); padding:9px var(--space-4);
    border-radius:var(--radius-sm); font-size:var(--text-sm); font-weight:600;
    cursor:pointer; transition:all var(--transition); border:1px solid transparent;
    white-space:nowrap; line-height:1; text-decoration:none; font-family:var(--font);
}
.btn:disabled { opacity:0.5; cursor:not-allowed; pointer-events:none; }
.btn i { font-size:14px; }
.btn-primary {
    background:var(--primary); color:#fff; border-color:var(--primary);
    box-shadow:0 2px 8px rgba(99,102,241,0.3);
}
.btn-primary:hover {
    background:var(--primary-dark); border-color:var(--primary-dark);
    box-shadow:0 4px 16px rgba(99,102,241,0.4); transform:translateY(-1px);
}
.btn-primary:active { transform:translateY(0); }
.btn-secondary {
    background:var(--white); color:var(--text-secondary); border-color:var(--border);
}
.btn-secondary:hover { background:var(--bg); border-color:var(--text-muted); color:var(--text); }
.btn-danger { background:var(--red); color:#fff; border-color:var(--red); }
.btn-danger:hover { background:#dc2626; box-shadow:0 4px 12px rgba(239,68,68,0.35); transform:translateY(-1px); }
.btn-success { background:var(--green); color:#fff; border-color:var(--green); }
.btn-success:hover { background:#059669; box-shadow:0 4px 12px rgba(16,185,129,0.35); transform:translateY(-1px); }
.btn-ghost { background:transparent; color:var(--text-secondary); border-color:transparent; }
.btn-ghost:hover { background:var(--bg); color:var(--text); }
.btn-sm { padding:6px var(--space-3); font-size:var(--text-xs); border-radius:var(--radius-xs); }
.btn-lg { padding:12px var(--space-6); font-size:var(--text-md); border-radius:var(--radius); }
.btn-icon {
    width:38px; height:38px; padding:0; border-radius:var(--radius-sm);
    background:var(--bg); border:1px solid var(--border); color:var(--text-secondary);
    display:inline-flex; align-items:center; justify-content:center;
    cursor:pointer; transition:all var(--transition); font-size:15px; flex-shrink:0;
}
.btn-icon:hover { background:var(--primary-bg); border-color:var(--primary-light); color:var(--primary); }
.btn-icon.active { background:var(--primary); border-color:var(--primary); color:#fff; }
.btn-icon.round { border-radius:var(--radius-full); }
.btn-generate {
    width:36px; height:36px; border-radius:var(--radius-sm);
    background:var(--primary); color:white; border:none; cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    transition:all var(--transition); font-size:14px;
}
.btn-generate:hover { background:var(--primary-dark); transform:translateY(-1px); }

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background:var(--white); border-radius:var(--radius-lg);
    padding:var(--space-5); box-shadow:var(--shadow-sm);
    border:1px solid var(--border-light); transition:box-shadow var(--transition),transform var(--transition);
}
.card:hover { box-shadow:var(--shadow-md); }
.card-header {
    display:flex; justify-content:space-between; align-items:flex-start;
    margin-bottom:var(--space-4); gap:var(--space-3);
}
.card-title {
    font-size:var(--text-sm); font-weight:500; color:var(--text-muted);
    text-transform:uppercase; letter-spacing:0.5px;
}
.card-icon {
    width:44px; height:44px; border-radius:var(--radius);
    display:flex; align-items:center; justify-content:center; font-size:20px; flex-shrink:0;
}
.card-icon.blue   { background:var(--blue-bg);   color:var(--blue); }
.card-icon.green  { background:var(--green-bg);  color:var(--green); }
.card-icon.red    { background:var(--red-bg);    color:var(--red); }
.card-icon.yellow { background:var(--yellow-bg); color:var(--yellow); }
.card-icon.purple { background:var(--purple-bg); color:var(--purple); }
.card-icon.primary { background:var(--primary-bg); color:var(--primary); }
.card-value {
    font-size:var(--text-2xl); font-weight:800; color:var(--text);
    letter-spacing:-0.5px; line-height:1.2; margin-bottom:var(--space-1);
}
.card-footer {
    font-size:var(--text-xs); color:var(--text-muted);
    display:flex; align-items:center; gap:var(--space-1); margin-top:var(--space-2);
}
.card-footer.positive { color:var(--green); }
.card-footer.negative { color:var(--red); }
.cards {
    display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:var(--space-5); margin-bottom:var(--space-6);
}

/* ============================================================
   TABLE
   ============================================================ */
.table-container {
    background:var(--white); border-radius:var(--radius-lg);
    overflow:hidden; box-shadow:var(--shadow-sm); border:1px solid var(--border-light);
}
.table-header {
    display:flex; justify-content:space-between; align-items:center;
    padding:var(--space-5) var(--space-6); border-bottom:1px solid var(--border);
    gap:var(--space-4); flex-wrap:wrap;
}
.table-title { font-size:var(--text-lg); font-weight:700; color:var(--text); letter-spacing:-0.3px; }
.table-actions { display:flex; gap:var(--space-2); align-items:center; flex-wrap:wrap; }
.table-search {
    display:flex; align-items:center; gap:var(--space-2);
    background:var(--bg); border:1px solid var(--border);
    border-radius:var(--radius-sm); padding:7px var(--space-3); transition:all var(--transition);
}
.table-search:focus-within {
    border-color:var(--primary); background:var(--white); box-shadow:0 0 0 3px var(--primary-bg);
}
.table-search i { color:var(--text-muted); font-size:13px; }
.table-search input {
    border:none; background:transparent; font-size:var(--text-sm);
    color:var(--text); outline:none; width:180px; padding:0;
}
table { width:100%; border-collapse:collapse; }
thead tr { background:var(--bg); }
th {
    padding:12px var(--space-4); text-align:left;
    font-size:var(--text-xs); font-weight:600; color:var(--text-muted);
    text-transform:uppercase; letter-spacing:0.5px;
    border-bottom:1px solid var(--border); white-space:nowrap;
}
td {
    padding:14px var(--space-4); font-size:var(--text-sm);
    color:var(--text-secondary); border-bottom:1px solid var(--border-light); vertical-align:middle;
}
tbody tr { transition:background var(--transition); }
tbody tr:hover { background:rgba(99,102,241,0.03); }
tbody tr:last-child td { border-bottom:none; }
.table-footer {
    display:flex; justify-content:space-between; align-items:center;
    padding:var(--space-4) var(--space-6); border-top:1px solid var(--border);
    font-size:var(--text-sm); color:var(--text-muted); flex-wrap:wrap; gap:var(--space-3);
}
.pagination { display:flex; align-items:center; gap:var(--space-1); }
.pagination button {
    width:32px; height:32px; border-radius:var(--radius-xs);
    border:1px solid var(--border); background:var(--white); color:var(--text-secondary);
    font-size:var(--text-sm); cursor:pointer; transition:all var(--transition);
    display:flex; align-items:center; justify-content:center;
}
.pagination button:hover { border-color:var(--primary); color:var(--primary); }
.pagination button.active { background:var(--primary); border-color:var(--primary); color:#fff; font-weight:600; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display:inline-flex; align-items:center; gap:5px;
    padding:3px 10px; border-radius:var(--radius-full);
    font-size:var(--text-xs); font-weight:600; white-space:nowrap; line-height:1.5;
}
.badge::before {
    content:''; width:6px; height:6px; border-radius:50%;
    background:currentColor; flex-shrink:0;
}
.badge.new      { background:var(--blue-bg);   color:var(--blue); }
.badge.progress { background:var(--yellow-bg); color:var(--yellow); }
.badge.ready    { background:var(--green-bg);  color:var(--green); }
.badge.done     { background:var(--green-bg);  color:var(--green); }
.badge.deferred { background:var(--bg-secondary); color:var(--text-muted); }
.badge.urgent   { background:var(--red-bg);    color:var(--red); }
.badge.primary  { background:var(--primary-bg); color:var(--primary); }
.badge.info     { background:var(--blue-bg);   color:var(--blue); }
.notifications { position:relative; }
.notifications .badge {
    position:absolute; top:-4px; right:-4px;
    background:var(--red); color:white; font-size:10px;
    padding:2px 5px; border-radius:var(--radius-full);
    min-width:18px; text-align:center; line-height:1.4;
    border:2px solid var(--white);
}
.notifications .badge::before { display:none; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom:var(--space-4); }
.form-group label {
    font-size:var(--text-sm); font-weight:600; color:var(--text-secondary);
    margin-bottom:var(--space-2); display:block;
}
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:var(--space-4); }
.form-row-3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:var(--space-4); }
input[type="text"],input[type="email"],input[type="tel"],input[type="password"],
input[type="number"],input[type="date"],input[type="time"],input[type="search"],
input[type="url"],select,textarea {
    width:100%; padding:10px var(--space-3);
    border:1.5px solid var(--border); border-radius:var(--radius-sm);
    font-size:var(--text-sm); font-family:var(--font);
    background:var(--white); color:var(--text);
    transition:border-color var(--transition),box-shadow var(--transition);
    outline:none; appearance:none; -webkit-appearance:none;
}
input[type="text"]:focus,input[type="email"]:focus,input[type="tel"]:focus,
input[type="password"]:focus,input[type="number"]:focus,input[type="date"]:focus,
input[type="time"]:focus,input[type="search"]:focus,input[type="url"]:focus,
select:focus,textarea:focus {
    border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-bg); background:var(--white);
}
input::placeholder,textarea::placeholder { color:var(--text-muted); }
textarea { resize:vertical; min-height:100px; line-height:1.6; }
select {
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat:no-repeat; background-position:right 12px center;
    padding-right:36px; cursor:pointer;
}
.input-group { position:relative; display:flex; align-items:center; }
.input-group i { position:absolute; left:12px; color:var(--text-muted); font-size:14px; pointer-events:none; }
.input-group input { padding-left:38px; }
.input-group .input-suffix { position:absolute; right:12px; color:var(--text-muted); font-size:13px; }
.form-hint { font-size:var(--text-xs); color:var(--text-muted); margin-top:var(--space-1); }
.form-error { font-size:var(--text-xs); color:var(--red); margin-top:var(--space-1); display:flex; align-items:center; gap:4px; }
.checkbox,.radio-label {
    display:flex; align-items:center; gap:var(--space-2);
    cursor:pointer; font-size:var(--text-sm); color:var(--text-secondary); user-select:none;
}
.checkbox input[type="checkbox"],.radio-label input[type="radio"] {
    width:16px; height:16px; border:1.5px solid var(--border); border-radius:var(--radius-xs);
    background:var(--white); cursor:pointer; accent-color:var(--primary); flex-shrink:0; padding:0;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal { position:fixed; inset:0; z-index:var(--z-modal); display:none; }
.modal.show { display:flex; }
.modal-overlay {
    position:absolute; inset:0; background:rgba(15,23,42,0.6);
    backdrop-filter:blur(4px); display:flex; align-items:center;
    justify-content:center; padding:var(--space-5); animation:fadeIn 0.2s ease;
}
.modal-content {
    background:var(--white); border-radius:var(--radius-xl);
    max-width:600px; width:100%; max-height:90vh; overflow-y:auto;
    box-shadow:var(--shadow-xl); animation:slideUp 0.25s ease; position:relative;
}
.modal-content.modal-sm { max-width:420px; }
.modal-content.modal-lg { max-width:800px; }
.modal-header {
    display:flex; justify-content:space-between; align-items:center;
    padding:var(--space-5) var(--space-6); border-bottom:1px solid var(--border);
    position:sticky; top:0; background:var(--white); z-index:1;
    border-radius:var(--radius-xl) var(--radius-xl) 0 0;
}
.modal-header h3 {
    font-size:var(--text-lg); font-weight:700; color:var(--text);
    display:flex; align-items:center; gap:var(--space-2);
}
.modal-header h3 i { color:var(--primary); font-size:18px; }
.modal-close {
    width:32px; height:32px; border-radius:var(--radius-sm);
    background:var(--bg); border:none; cursor:pointer; color:var(--text-muted);
    font-size:18px; display:flex; align-items:center; justify-content:center;
    transition:all var(--transition); line-height:1;
}
.modal-close:hover { background:var(--red-bg); color:var(--red); }
.modal-body { padding:var(--space-6); }
.modal-footer {
    display:flex; justify-content:flex-end; gap:var(--space-3);
    padding:var(--space-4) var(--space-6); border-top:1px solid var(--border);
    background:var(--bg); border-radius:0 0 var(--radius-xl) var(--radius-xl);
}

/* ============================================================
   KANBAN
   ============================================================ */
.kanban-board { display:flex; gap:var(--space-5); overflow-x:auto; padding-bottom:var(--space-4); }
.kanban-column {
    min-width:290px; max-width:290px; background:var(--bg);
    border-radius:var(--radius-lg); padding:var(--space-4); border:1px solid var(--border);
}
.kanban-column-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:var(--space-4); }
.kanban-column-title { font-weight:700; font-size:var(--text-sm); display:flex; align-items:center; gap:var(--space-2); color:var(--text); }
.kanban-count {
    background:var(--white); border:1px solid var(--border); padding:2px 8px;
    border-radius:var(--radius-full); font-size:var(--text-xs); font-weight:600; color:var(--text-muted);
}
.kanban-items { display:flex; flex-direction:column; gap:var(--space-3); min-height:60px; }
.kanban-item {
    background:var(--white); border-radius:var(--radius); padding:var(--space-4);
    cursor:pointer; box-shadow:var(--shadow-xs); border:1px solid var(--border-light);
    transition:all var(--transition);
}
.kanban-item:hover { transform:translateY(-2px); box-shadow:var(--shadow-md); border-color:var(--primary-light); }
.kanban-item-header { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:var(--space-2); gap:var(--space-2); }
.kanban-item-title { font-weight:600; font-size:var(--text-sm); color:var(--text); line-height:1.4; }
.kanban-item-meta { display:flex; gap:var(--space-3); font-size:var(--text-xs); color:var(--text-muted); margin-top:var(--space-2); align-items:center; }
.kanban-item-meta i { font-size:11px; }

/* ============================================================
   TOAST
   ============================================================ */
.toast-box {
    position:fixed; top:var(--space-5); right:var(--space-5);
    z-index:var(--z-toast); display:flex; flex-direction:column;
    gap:var(--space-2); max-width:360px; width:100%;
}
.toast {
    display:flex; align-items:flex-start; gap:var(--space-3);
    padding:var(--space-4); border-radius:var(--radius);
    font-size:var(--text-sm); font-weight:500;
    animation:slideInRight 0.3s ease; box-shadow:var(--shadow-lg);
    border:1px solid transparent; background:var(--white); color:var(--text);
}
.toast-icon {
    width:32px; height:32px; border-radius:var(--radius-sm);
    display:flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0;
}
.toast-body { flex:1; }
.toast-title { font-weight:700; margin-bottom:2px; }
.toast-message { font-size:var(--text-xs); color:var(--text-muted); }
.toast.ok  { border-left:4px solid var(--green); }
.toast.ok .toast-icon { background:var(--green-bg); color:var(--green); }
.toast.err { border-left:4px solid var(--red); }
.toast.err .toast-icon { background:var(--red-bg); color:var(--red); }
.toast.info { border-left:4px solid var(--primary); }
.toast.info .toast-icon { background:var(--primary-bg); color:var(--primary); }
.toast.warn { border-left:4px solid var(--yellow); }
.toast.warn .toast-icon { background:var(--yellow-bg); color:var(--yellow); }

/* ============================================================
   DEVICE BLOCK
   ============================================================ */
.device-block {
    background:var(--bg); border-radius:var(--radius); padding:var(--space-5);
    margin:var(--space-4) 0; border:1px solid var(--border);
}
.device-block h4 {
    margin-bottom:var(--space-4); font-size:var(--text-sm); font-weight:700;
    color:var(--text); display:flex; align-items:center; gap:var(--space-2);
}

/* ============================================================
   DROPDOWN
   ============================================================ */
.dropdown { position:relative; display:inline-block; }
.dropdown-menu {
    position:absolute; top:calc(100% + 8px); right:0;
    background:var(--white); border:1px solid var(--border);
    border-radius:var(--radius); box-shadow:var(--shadow-lg);
    min-width:200px; z-index:var(--z-dropdown); overflow:hidden;
    animation:fadeInDown 0.15s ease;
}
.dropdown-item {
    display:flex; align-items:center; gap:var(--space-3);
    padding:10px var(--space-4); font-size:var(--text-sm); color:var(--text-secondary);
    cursor:pointer; transition:background var(--transition);
    border:none; background:none; width:100%; text-align:left; font-family:var(--font);
}
.dropdown-item:hover { background:var(--bg); color:var(--text); }
.dropdown-item i { width:16px; text-align:center; color:var(--text-muted); font-size:14px; }
.dropdown-item.danger { color:var(--red); }
.dropdown-item.danger i { color:var(--red); }
.dropdown-item.danger:hover { background:var(--red-bg); }
.dropdown-divider { height:1px; background:var(--border); margin:var(--space-1) 0; }

/* ============================================================
   TABS
   ============================================================ */
.tabs {
    display:flex; gap:2px; background:var(--bg); border-radius:var(--radius-sm);
    padding:4px; border:1px solid var(--border); width:fit-content;
}
.tab-btn {
    padding:7px var(--space-4); border-radius:var(--radius-xs);
    font-size:var(--text-sm); font-weight:500; cursor:pointer;
    transition:all var(--transition); border:none; background:transparent;
    color:var(--text-muted); font-family:var(--font); white-space:nowrap;
}
.tab-btn:hover { color:var(--text); }
.tab-btn.active { background:var(--white); color:var(--primary); font-weight:600; box-shadow:var(--shadow-xs); }
.tab-content { display:none; }
.tab-content.active { display:block; }

/* ============================================================
   PROGRESS
   ============================================================ */
.progress { height:6px; background:var(--bg-secondary); border-radius:var(--radius-full); overflow:hidden; }
.progress-bar {
    height:100%; border-radius:var(--radius-full);
    background:linear-gradient(90deg,var(--primary),var(--accent)); transition:width 0.5s ease;
}
.progress-bar.green  { background:var(--green); }
.progress-bar.red    { background:var(--red); }
.progress-bar.yellow { background:var(--yellow); }

/* ============================================================
   AVATAR
   ============================================================ */
.avatar {
    border-radius:var(--radius-sm); display:flex; align-items:center; justify-content:center;
    font-weight:700; color:#fff; flex-shrink:0;
    background:linear-gradient(135deg,var(--primary),var(--accent));
}
.avatar-xs  { width:24px; height:24px; font-size:10px; }
.avatar-sm  { width:32px; height:32px; font-size:12px; }
.avatar-md  { width:40px; height:40px; font-size:15px; }
.avatar-lg  { width:52px; height:52px; font-size:20px; }
.avatar-xl  { width:72px; height:72px; font-size:28px; }
.avatar-round { border-radius:50%; }
.user-trigger {
    display:flex; align-items:center; gap:var(--space-2);
    background:none; border:none; cursor:pointer; padding:4px;
    border-radius:var(--radius-sm); transition:background var(--transition);
}
.user-trigger:hover { background:var(--bg); }
.user-avatar-small {
    width:36px; height:36px; border-radius:var(--radius-sm);
    background:linear-gradient(135deg,var(--primary),var(--accent));
    display:flex; align-items:center; justify-content:center;
    font-weight:700; font-size:14px; color:#fff;
}

/* ============================================================
   STAT WIDGET
   ============================================================ */
.stat-row {
    display:flex; align-items:center; justify-content:space-between;
    padding:var(--space-3) 0; border-bottom:1px solid var(--border-light);
}
.stat-row:last-child { border-bottom:none; }
.stat-label { font-size:var(--text-sm); color:var(--text-muted); display:flex; align-items:center; gap:var(--space-2); }
.stat-value { font-size:var(--text-sm); font-weight:700; color:var(--text); }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    padding:var(--space-12) var(--space-6); text-align:center; color:var(--text-muted);
}
.empty-state-icon {
    width:72px; height:72px; background:var(--bg); border-radius:var(--radius-xl);
    display:flex; align-items:center; justify-content:center;
    font-size:32px; color:var(--text-muted); margin-bottom:var(--space-4);
}
.empty-state h3 { font-size:var(--text-lg); font-weight:700; color:var(--text-secondary); margin-bottom:var(--space-2); }
.empty-state p { font-size:var(--text-sm); max-width:320px; line-height:1.6; margin-bottom:var(--space-5); }

/* ============================================================
   SPINNER
   ============================================================ */
.spinner {
    width:24px; height:24px; border:2.5px solid var(--border);
    border-top-color:var(--primary); border-radius:50%;
    animation:spin 0.7s linear infinite; display:inline-block;
}
.spinner-sm { width:16px; height:16px; border-width:2px; }
.spinner-lg { width:40px; height:40px; border-width:3px; }
.loading-overlay {
    position:absolute; inset:0; background:rgba(255,255,255,0.8);
    display:flex; align-items:center; justify-content:center;
    border-radius:inherit; z-index:10;
}

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-header {
    display:flex; justify-content:space-between; align-items:center;
    margin-bottom:var(--space-5); gap:var(--space-4); flex-wrap:wrap;
}
.section-title { font-size:var(--text-xl); font-weight:800; color:var(--text); letter-spacing:-0.5px; }
.section-subtitle { font-size:var(--text-sm); color:var(--text-muted); margin-top:2px; }

/* ============================================================
   SITE PAGES (preload pages)
   ============================================================ */
.site-header {
    background:var(--white); border-bottom:1px solid var(--border);
    padding:0 var(--space-8); height:64px;
    display:flex; align-items:center; justify-content:space-between;
    position:sticky; top:0; z-index:var(--z-header); box-shadow:var(--shadow-xs);
}
.site-nav { display:flex; align-items:center; gap:var(--space-1); }
.site-nav a {
    padding:8px var(--space-3); border-radius:var(--radius-sm);
    font-size:var(--text-sm); font-weight:500; color:var(--text-secondary);
    transition:all var(--transition);
}
.site-nav a:hover { background:var(--bg); color:var(--primary); }
.site-nav a.active { background:var(--primary-bg); color:var(--primary); font-weight:600; }
.hero {
    background:linear-gradient(135deg,var(--sidebar-bg) 0%,#312e81 50%,#1e1b4b 100%);
    padding:var(--space-12) var(--space-8); text-align:center; position:relative; overflow:hidden;
}
.hero::before {
    content:''; position:absolute; inset:0;
    background:url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236366f1' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events:none;
}
.hero-content { position:relative; z-index:1; max-width:700px; margin:0 auto; }
.hero-badge {
    display:inline-flex; align-items:center; gap:var(--space-2);
    background:rgba(99,102,241,0.2); border:1px solid rgba(99,102,241,0.3);
    color:var(--primary-light); padding:6px var(--space-4); border-radius:var(--radius-full);
    font-size:var(--text-xs); font-weight:600; text-transform:uppercase;
    letter-spacing:0.8px; margin-bottom:var(--space-5);
}
.hero-title {
    font-size:var(--text-3xl); font-weight:800; color:#fff;
    letter-spacing:-1px; line-height:1.2; margin-bottom:var(--space-4);
}
.hero-subtitle {
    font-size:var(--text-lg); color:rgba(255,255,255,0.65); line-height:1.7;
    max-width:560px; margin:0 auto var(--space-8);
}
.hero-actions { display:flex; gap:var(--space-3); justify-content:center; flex-wrap:wrap; }
.content-area { max-width:1200px; margin:0 auto; padding:var(--space-10) var(--space-8); }
.placeholder {
    background:var(--bg); border:2px dashed var(--border); border-radius:var(--radius-lg);
    padding:var(--space-8); text-align:center; color:var(--text-muted);
    font-size:var(--text-base); line-height:1.7;
}
.site-footer {
    background:var(--sidebar-bg); color:rgba(255,255,255,0.6);
    padding:var(--space-8); text-align:center; font-size:var(--text-sm);
}

/* ============================================================
   MOBILE TOGGLE
   ============================================================ */
.mobile-toggle {
    background:none; border:none; font-size:20px; cursor:pointer; color:var(--text);
    display:none; width:38px; height:38px; border-radius:var(--radius-sm);
    align-items:center; justify-content:center; transition:background var(--transition);
}
.mobile-toggle:hover { background:var(--bg); }

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.d-flex { display:flex; } .d-grid { display:grid; } .d-block { display:block; }
.d-none { display:none; } .d-inline { display:inline; } .d-inline-flex { display:inline-flex; }
.flex-1 { flex:1; } .flex-col { flex-direction:column; } .flex-wrap { flex-wrap:wrap; }
.items-center { align-items:center; } .items-start { align-items:flex-start; } .items-end { align-items:flex-end; }
.justify-between { justify-content:space-between; } .justify-center { justify-content:center; } .justify-end { justify-content:flex-end; }
.gap-1 { gap:var(--space-1); } .gap-2 { gap:var(--space-2); } .gap-3 { gap:var(--space-3); }
.gap-4 { gap:var(--space-4); } .gap-5 { gap:var(--space-5); } .gap-6 { gap:var(--space-6); }
.text-xs { font-size:var(--text-xs); } .text-sm { font-size:var(--text-sm); }
.text-base { font-size:var(--text-base); } .text-lg { font-size:var(--text-lg); }
.text-xl { font-size:var(--text-xl); } .text-2xl { font-size:var(--text-2xl); }
.text-muted { color:var(--text-muted); } .text-primary { color:var(--primary); }
.text-green { color:var(--green); } .text-red { color:var(--red); } .text-yellow { color:var(--yellow); }
.text-center { text-align:center; } .text-right { text-align:right; }
.font-bold { font-weight:700; } .font-semibold { font-weight:600; } .font-medium { font-weight:500; }
.truncate { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mt-1 { margin-top:var(--space-1); } .mt-2 { margin-top:var(--space-2); } .mt-3 { margin-top:var(--space-3); }
.mt-4 { margin-top:var(--space-4); } .mt-5 { margin-top:var(--space-5); } .mt-6 { margin-top:var(--space-6); }
.mb-1 { margin-bottom:var(--space-1); } .mb-2 { margin-bottom:var(--space-2); } .mb-3 { margin-bottom:var(--space-3); }
.mb-4 { margin-bottom:var(--space-4); } .mb-5 { margin-bottom:var(--space-5); } .mb-6 { margin-bottom:var(--space-6); }
.p-4 { padding:var(--space-4); } .p-5 { padding:var(--space-5); } .p-6 { padding:var(--space-6); }
.w-full { width:100%; } .h-full { height:100%; }
.rounded { border-radius:var(--radius); } .rounded-sm { border-radius:var(--radius-sm); }
.rounded-lg { border-radius:var(--radius-lg); } .rounded-full { border-radius:var(--radius-full); }
.shadow-sm { box-shadow:var(--shadow-sm); } .shadow-md { box-shadow:var(--shadow-md); }
.border { border:1px solid var(--border); }
.bg-white { background:var(--white); } .bg-bg { background:var(--bg); }
.overflow-hidden { overflow:hidden; } .overflow-auto { overflow:auto; }
.relative { position:relative; } .absolute { position:absolute; }
.cursor-pointer { cursor:pointer; }
.select-none { user-select:none; }
.opacity-50 { opacity:0.5; }
.transition { transition:all var(--transition); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
    from { opacity:0; }
    to   { opacity:1; }
}
@keyframes fadeInDown {
    from { opacity:0; transform:translateY(-8px); }
    to   { opacity:1; transform:translateY(0); }
}
@keyframes slideUp {
    from { opacity:0; transform:translateY(20px); }
    to   { opacity:1; transform:translateY(0); }
}
@keyframes slideInRight {
    from { opacity:0; transform:translateX(100%); }
    to   { opacity:1; transform:translateX(0); }
}
@keyframes spin {
    to { transform:rotate(360deg); }
}
@keyframes pulse {
    0%,100% { opacity:1; }
    50%      { opacity:0.5; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width:1024px) {
    .sidebar { transform:translateX(-100%); }
    .sidebar.active { transform:translateX(0); }
    .main-content { margin-left:0; }
    .mobile-toggle { display:flex; }
    .header-search { min-width:180px; }
}
@media (max-width:768px) {
    .content { padding:var(--space-4); }
    .form-row,.form-row-3 { grid-template-columns:1fr; }
    .kanban-board { flex-direction:column; }
    .kanban-column { min-width:100%; max-width:100%; }
    .cards { grid-template-columns:1fr; }
    .table-header { flex-direction:column; align-items:flex-start; }
    .header-search { display:none; }
    .hero { padding:var(--space-8) var(--space-5); }
    .hero-title { font-size:var(--text-2xl); }
    .content-area { padding:var(--space-6) var(--space-5); }
    .section-header { flex-direction:column; align-items:flex-start; }
}
@media (max-width:480px) {
    .app-header { padding:0 var(--space-4); }
    .modal-content { border-radius:var(--radius-lg); }
    .modal-overlay { padding:var(--space-3); }
    .toast-box { left:var(--space-3); right:var(--space-3); max-width:none; }
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
    min-height:100vh; display:flex; align-items:center; justify-content:center;
    background:linear-gradient(135deg,var(--sidebar-bg) 0%,#312e81 100%);
    padding:var(--space-5);
}
.login-card {
    background:var(--white); border-radius:var(--radius-xl);
    padding:var(--space-10); width:100%; max-width:420px;
    box-shadow:var(--shadow-xl);
}
.login-logo {
    display:flex; align-items:center; justify-content:center;
    gap:var(--space-3); margin-bottom:var(--space-8);
}
.login-logo .logo-icon { width:48px; height:48px; font-size:24px; }
.login-logo span { font-size:var(--text-xl); font-weight:800; color:var(--text); }
.login-title { font-size:var(--text-2xl); font-weight:800; color:var(--text); margin-bottom:var(--space-2); text-align:center; }
.login-subtitle { font-size:var(--text-sm); color:var(--text-muted); text-align:center; margin-bottom:var(--space-8); }
.login-form .form-group { margin-bottom:var(--space-5); }
.login-btn { width:100%; padding:12px; font-size:var(--text-md); margin-top:var(--space-2); }

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-header {
    background:linear-gradient(135deg,var(--sidebar-bg),#312e81);
    border-radius:var(--radius-xl); padding:var(--space-8);
    display:flex; align-items:center; gap:var(--space-6);
    margin-bottom:var(--space-6); color:#fff;
}
.profile-avatar {
    width:80px; height:80px; border-radius:var(--radius-lg);
    background:linear-gradient(135deg,var(--primary),var(--accent));
    display:flex; align-items:center; justify-content:center;
    font-size:32px; font-weight:800; color:#fff; flex-shrink:0;
    box-shadow:0 8px 24px rgba(99,102,241,0.4);
}
.profile-info h2 { font-size:var(--text-2xl); font-weight:800; margin-bottom:4px; }
.profile-info p { color:rgba(255,255,255,0.65); font-size:var(--text-sm); }

/* ============================================================
   SETTINGS PAGE
   ============================================================ */
.settings-section {
    background:var(--white); border-radius:var(--radius-lg);
    border:1px solid var(--border-light); overflow:hidden; margin-bottom:var(--space-5);
}
.settings-section-header {
    padding:var(--space-5) var(--space-6); border-bottom:1px solid var(--border);
    display:flex; align-items:center; gap:var(--space-3);
}
.settings-section-header h3 { font-size:var(--text-md); font-weight:700; color:var(--text); }
.settings-section-header i { color:var(--primary); font-size:18px; }
.settings-row {
    display:flex; align-items:center; justify-content:space-between;
    padding:var(--space-4) var(--space-6); border-bottom:1px solid var(--border-light);
    gap:var(--space-4);
}
.settings-row:last-child { border-bottom:none; }
.settings-label { font-size:var(--text-sm); font-weight:500; color:var(--text); }
.settings-desc { font-size:var(--text-xs); color:var(--text-muted); margin-top:2px; }

/* ============================================================
   CALENDAR
   ============================================================ */
.calendar-container {
    background:var(--white); border-radius:var(--radius-lg);
    border:1px solid var(--border-light); overflow:hidden; box-shadow:var(--shadow-sm);
}
.fc { font-family:var(--font) !important; }
.fc .fc-toolbar-title { font-size:var(--text-lg) !important; font-weight:700 !important; }
.fc .fc-button { border-radius:var(--radius-sm) !important; font-family:var(--font) !important; }
.fc .fc-button-primary { background:var(--primary) !important; border-color:var(--primary) !important; }
.fc .fc-button-primary:hover { background:var(--primary-dark) !important; }
.fc .fc-event { border-radius:var(--radius-xs) !important; border:none !important; font-size:var(--text-xs) !important; }

/* ============================================================
   CHART CONTAINERS
   ============================================================ */
.chart-container {
    background:var(--white); border-radius:var(--radius-lg);
    padding:var(--space-5); box-shadow:var(--shadow-sm);
    border:1px solid var(--border-light);
}
.chart-header {
    display:flex; justify-content:space-between; align-items:center;
    margin-bottom:var(--space-5);
}
.chart-title { font-size:var(--text-md); font-weight:700; color:var(--text); }
.chart-legend {
    display:flex; gap:var(--space-4); flex-wrap:wrap;
}
.legend-item {
    display:flex; align-items:center; gap:var(--space-2);
    font-size:var(--text-xs); color:var(--text-muted);
}
.legend-dot {
    width:8px; height:8px; border-radius:50%; flex-shrink:0;
}

/* ============================================================
   GRID LAYOUTS
   ============================================================ */
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:var(--space-5); }
.grid-3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:var(--space-5); }
.grid-4 { display:grid; grid-template-columns:repeat(4,1fr); gap:var(--space-5); }
.grid-auto { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:var(--space-5); }
@media (max-width:1024px) {
    .grid-4 { grid-template-columns:1fr 1fr; }
    .grid-3 { grid-template-columns:1fr 1fr; }
}
@media (max-width:640px) {
    .grid-2,.grid-3,.grid-4 { grid-template-columns:1fr; }
}

/* ============================================================
   SIDEBAR OVERLAY (mobile)
   ============================================================ */
.sidebar-overlay {
    display:none; position:fixed; inset:0;
    background:rgba(0,0,0,0.5); z-index:calc(var(--z-sidebar) - 1);
    backdrop-filter:blur(2px);
}
.sidebar-overlay.active { display:block; }

/* ============================================================
   PRINT
   ============================================================ */
@media print {
    .sidebar,.app-header,.toast-box,.modal { display:none !important; }
    .main-content { margin-left:0 !important; }
    .content { padding:0 !important; }
    .card { box-shadow:none !important; border:1px solid #ddd !important; }
}

/* ============================================================
   LEGACY CLASS ALIASES (backward compatibility)
   ============================================================ */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 var(--space-8);
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    box-shadow: var(--shadow-xs);
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    width: 100%;
}
.section {
    padding: var(--space-12) 0;
}
.section-alt {
    padding: var(--space-12) 0;
    background: var(--bg);
}

/* Preload page hero (legacy) */
.hero-section {
    background: linear-gradient(135deg, var(--sidebar-bg) 0%, #312e81 50%, #1e1b4b 100%);
    padding: var(--space-12) var(--space-8);
    text-align: center;
    color: #fff;
}
.hero-section h1 {
    font-size: var(--text-3xl);
    font-weight: 800;
    margin-bottom: var(--space-4);
    letter-spacing: -1px;
}
.hero-section p {
    font-size: var(--text-lg);
    color: rgba(255,255,255,0.7);
    max-width: 600px;
    margin: 0 auto;
}

/* Feature grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-5);
}
.feature-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    background: var(--primary-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: var(--space-4);
}
.feature-card h3 {
    font-size: var(--text-md);
    font-weight: 700;
    margin-bottom: var(--space-2);
    color: var(--text);
}
.feature-card p {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.6;
}

/* Pricing cards */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-5);
    align-items: start;
}
.pricing-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    position: relative;
    transition: all var(--transition);
}
.pricing-card:hover { box-shadow: var(--shadow-md); }
.pricing-card.featured {
    background: linear-gradient(135deg, var(--sidebar-bg), #312e81);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-lg);
    transform: scale(1.03);
}
.pricing-card.featured .pricing-price,
.pricing-card.featured .pricing-name { color: #fff; }
.pricing-card.featured .pricing-desc { color: rgba(255,255,255,0.65); }
.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    font-size: var(--text-xs);
    font-weight: 700;
    padding: 4px 16px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}
.pricing-name {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-2);
}
.pricing-price {
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--text);
    letter-spacing: -1px;
    margin-bottom: var(--space-1);
}
.pricing-price span {
    font-size: var(--text-sm);
    font-weight: 400;
    color: var(--text-muted);
}
.pricing-desc {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-6);
}
.pricing-features {
    list-style: none;
    margin-bottom: var(--space-6);
}
.pricing-features li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    padding: var(--space-2) 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li i { color: var(--green); font-size: 13px; }
.pricing-card.featured .pricing-features li { border-bottom-color: rgba(255,255,255,0.1); }
.pricing-card.featured .pricing-features li i { color: var(--primary-light); }

/* Blog / Post cards */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-5);
}
.post-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.post-card-img-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-bg), var(--bg-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--primary-light);
}
.post-content {
    padding: var(--space-5);
}
.post-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-bottom: var(--space-3);
}
.post-content h3 {
    font-size: var(--text-md);
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-2);
    line-height: 1.4;
}
.post-content p {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.6;
}

/* Team cards */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-5);
}
.team-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.team-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin: 0 auto var(--space-4);
}
.team-name { font-size: var(--text-md); font-weight: 700; color: var(--text); margin-bottom: 4px; }
.team-role { font-size: var(--text-xs); color: var(--text-muted); }

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--sidebar-bg), #312e81);
    border-radius: var(--radius-xl);
    padding: var(--space-12) var(--space-8);
    text-align: center;
    color: #fff;
    margin: var(--space-10) 0;
}
.cta-section h2 {
    font-size: var(--text-2xl);
    font-weight: 800;
    margin-bottom: var(--space-4);
    letter-spacing: -0.5px;
}
.cta-section p {
    font-size: var(--text-lg);
    color: rgba(255,255,255,0.7);
    margin-bottom: var(--space-8);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.cta-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    flex-wrap: wrap;
}
.btn-white {
    background: #fff;
    color: var(--primary);
    border-color: #fff;
    font-weight: 700;
}
.btn-white:hover {
    background: rgba(255,255,255,0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.btn-outline-white {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.4);
}
.btn-outline-white:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.1);
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-5);
}
.testimonial-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}
.testimonial-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-4);
    font-style: italic;
}
.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}
.testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 14px;
    flex-shrink: 0;
}
.testimonial-name { font-size: var(--text-sm); font-weight: 700; color: var(--text); }
.testimonial-company { font-size: var(--text-xs); color: var(--text-muted); }

/* Stars rating */
.stars { color: var(--yellow); font-size: 14px; margin-bottom: var(--space-3); }

/* Integration cards */
.integrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-4);
}
.integration-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
    cursor: pointer;
}
.integration-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}
.integration-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto var(--space-3);
}
.integration-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text);
}
.integration-status {
    font-size: var(--text-xs);
    color: var(--green);
    margin-top: 4px;
}

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: var(--space-3); }
.faq-item {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    overflow: hidden;
}
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) var(--space-5);
    cursor: pointer;
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--text);
    transition: background var(--transition);
    gap: var(--space-3);
}
.faq-question:hover { background: var(--bg); }
.faq-question i { color: var(--text-muted); font-size: 12px; transition: transform var(--transition); flex-shrink: 0; }
.faq-item.open .faq-question i { transform: rotate(180deg); }
.faq-answer {
    padding: 0 var(--space-5) var(--space-4);
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.7;
    display: none;
}
.faq-item.open .faq-answer { display: block; }

/* Page header for inner pages */
.page-hero {
    background: linear-gradient(135deg, var(--sidebar-bg) 0%, #312e81 100%);
    padding: var(--space-10) var(--space-8);
    color: #fff;
}
.page-hero h1 {
    font-size: var(--text-2xl);
    font-weight: 800;
    margin-bottom: var(--space-2);
    letter-spacing: -0.5px;
}
.page-hero p {
    font-size: var(--text-md);
    color: rgba(255,255,255,0.7);
}

/* ============================================================
   LOGIN PAGE SPECIFIC
   ============================================================ */
.login-header {
    text-align: center;
    margin-bottom: var(--space-8);
}
.login-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    margin: 0 auto var(--space-4);
    box-shadow: 0 8px 24px rgba(99,102,241,0.4);
}
.login-header h1 {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--text);
    margin-bottom: var(--space-2);
    letter-spacing: -0.5px;
}
.login-header p {
    font-size: var(--text-sm);
    color: var(--text-muted);
}
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-5);
    gap: var(--space-3);
}
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    user-select: none;
}
.checkbox-wrapper input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}
.forgot-link {
    font-size: var(--text-sm);
    color: var(--primary);
    font-weight: 500;
    white-space: nowrap;
}
.forgot-link:hover { color: var(--primary-dark); text-decoration: underline; }
.btn-login {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--text-md);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-family: var(--font);
    box-shadow: 0 4px 16px rgba(99,102,241,0.35);
}
.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(99,102,241,0.45);
}
.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}
.demo-section {
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid var(--border);
}
.demo-section h3 {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: var(--space-3);
}
.demo-users {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.demo-user-btn {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}
.demo-user-btn:hover {
    background: var(--primary-bg);
    border-color: var(--primary-light);
    color: var(--primary);
}
.demo-user-btn i {
    width: 32px;
    height: 32px;
    background: var(--white);
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--primary);
    flex-shrink: 0;
    box-shadow: var(--shadow-xs);
}
.demo-user-btn span { flex: 1; line-height: 1.4; }
.demo-user-btn small { font-size: var(--text-xs); color: var(--text-muted); display: block; }
.demo-user-btn .role {
    font-size: var(--text-xs);
    font-weight: 700;
    background: var(--primary-bg);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}
.login-footer {
    margin-top: var(--space-6);
    text-align: center;
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* ============================================================
   HERO WITH CONTAINER (legacy pages)
   ============================================================ */
.hero .container {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}
.hero .container h1 {
    font-size: var(--text-3xl);
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
    line-height: 1.2;
    margin-bottom: var(--space-4);
}
.hero .container p {
    font-size: var(--text-lg);
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
    margin-bottom: var(--space-6);
    max-width: 600px;
}
.hero .container .btn {
    margin-top: var(--space-2);
}

/* ============================================================
   PRICING LEGACY CLASSES
   ============================================================ */
.pricing-card .price {
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--text);
    letter-spacing: -1px;
    margin: var(--space-3) 0;
    line-height: 1.1;
}
.pricing-card .price span {
    font-size: var(--text-sm);
    font-weight: 400;
    color: var(--text-muted);
}
.pricing-card.featured .price { color: #fff; }
.pricing-card.popular {
    background: linear-gradient(135deg, var(--sidebar-bg), #312e81);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-lg);
    transform: scale(1.03);
}
.pricing-card.popular h3,
.pricing-card.popular .price { color: #fff; }
.pricing-card.popular p { color: rgba(255,255,255,0.65); }
.pricing-card h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-2);
}
.pricing-card.popular h3 { color: #fff; }
.pricing-card ul.features {
    list-style: none;
    margin: var(--space-5) 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.pricing-card ul.features li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    padding: var(--space-1) 0;
}
.pricing-card ul.features li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--green);
    font-size: 12px;
    flex-shrink: 0;
}
.pricing-card.popular ul.features li { color: rgba(255,255,255,0.8); }
.pricing-card.popular ul.features li::before { color: var(--primary-light); }

/* ============================================================
   FEATURE CARD LEGACY (icon directly in card)
   ============================================================ */
.feature-card > i,
.feature-card > .fa-solid,
.feature-card > .fa-regular,
.feature-card > .fa-brands {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: var(--space-4);
    display: block;
    width: 52px;
    height: 52px;
    background: var(--primary-bg);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   SECTION HERO (used in some pages)
   ============================================================ */
section.hero {
    background: linear-gradient(135deg, var(--sidebar-bg) 0%, #312e81 50%, #1e1b4b 100%);
    padding: var(--space-12) var(--space-8);
    text-align: center;
    position: relative;
    overflow: hidden;
    color: #fff;
}
section.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236366f1' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

/* ============================================================
   ABOUT / CAREERS / PRESS PAGES
   ============================================================ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
    align-items: center;
}
.about-image {
    background: linear-gradient(135deg, var(--primary-bg), var(--bg-secondary));
    border-radius: var(--radius-xl);
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: var(--primary-light);
}
.about-content h2 {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--text);
    margin-bottom: var(--space-4);
    letter-spacing: -0.5px;
}
.about-content p {
    font-size: var(--text-base);
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: var(--space-4);
}
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
}
.value-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}
.value-icon {
    font-size: 32px;
    margin-bottom: var(--space-3);
    display: block;
}
.value-card h4 {
    font-size: var(--text-md);
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-2);
}
.value-card p {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.6;
}

/* Job listings */
.job-list { display: flex; flex-direction: column; gap: var(--space-3); }
.job-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-6);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
}
.job-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}
.job-info h3 { font-size: var(--text-md); font-weight: 700; color: var(--text); margin-bottom: 4px; }
.job-meta { display: flex; gap: var(--space-3); font-size: var(--text-xs); color: var(--text-muted); }
.job-meta span { display: flex; align-items: center; gap: 4px; }
.job-type {
    font-size: var(--text-xs);
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: var(--primary-bg);
    color: var(--primary);
    white-space: nowrap;
}

/* Press / Media */
.press-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-5);
}
.press-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}
.press-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.press-source {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-3);
}
.press-card h3 {
    font-size: var(--text-md);
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-2);
    line-height: 1.4;
}
.press-card p {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: var(--space-3);
}
.press-date { font-size: var(--text-xs); color: var(--text-muted); }

/* Contact form page */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-10);
    align-items: start;
}
.contact-info h2 {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--text);
    margin-bottom: var(--space-4);
}
.contact-info p {
    font-size: var(--text-base);
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: var(--space-6);
}
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}
.contact-item-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--primary-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.contact-item-text h4 { font-size: var(--text-sm); font-weight: 700; color: var(--text); margin-bottom: 2px; }
.contact-item-text p { font-size: var(--text-sm); color: var(--text-muted); }
.contact-form-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}
.contact-form-card h3 {
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--text);
    margin-bottom: var(--space-6);
}

@media (max-width: 768px) {
    .about-grid,
    .contact-grid { grid-template-columns: 1fr; }
    .pricing-card.popular,
    .pricing-card.featured { transform: none; }
}
