/* ==========================================
   JOB APPLICATION TRACKER v3
   Premium sidebar layout + glassmorphism
   ========================================== */

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

:root {
    --bg: #0a0b10;
    --bg-sidebar: #0e1018;
    --surface: #13151d;
    --surface-2: #191c27;
    --surface-3: #1f2231;
    --surface-hover: #1c1f2b;
    --border: rgba(255,255,255,0.06);
    --border-2: rgba(255,255,255,0.1);
    --text: #eaeaf0;
    --text-2: #a0a3b1;
    --text-3: #5c5f72;
    --text-4: #3a3d4e;
    --accent: #6366f1;
    --accent-2: #818cf8;
    --accent-glow: rgba(99,102,241,0.15);
    --blue: #3b82f6;
    --cyan: #06b6d4;
    --green: #22c55e;
    --emerald: #10b981;
    --amber: #eab308;
    --orange: #f97316;
    --red: #ef4444;
    --purple: #a855f7;
    --pink: #ec4899;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --sidebar-w: 240px;
    --topbar-h: 64px;
}

html { font-size: 14px; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* === Layout === */
.app-layout { display: flex; min-height: 100vh; }

/* === Sidebar === */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 200;
    transition: transform 0.3s;
}

.sidebar-top { padding: 24px 16px 16px; }

.sidebar-logo {
    display: flex; align-items: center; gap: 12px;
    text-decoration: none; color: var(--text);
    padding: 0 8px; margin-bottom: 32px;
}
.logo-mark {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 800; color: white;
    box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}
.logo-text { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.5px; }

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }

.sidebar-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: var(--radius-sm);
    color: var(--text-3); text-decoration: none;
    font-size: 0.9rem; font-weight: 500;
    transition: all 0.2s;
}
.sidebar-link:hover { color: var(--text-2); background: rgba(255,255,255,0.03); }
.sidebar-link.active {
    color: var(--text); background: var(--accent-glow);
    box-shadow: inset 3px 0 0 var(--accent);
}
.sidebar-link.active svg { color: var(--accent-2); }

/* Sidebar extras */
.sidebar-divider { height: 1px; background: var(--border); margin: 8px 0; }
.fetch-form { width: 100%; }
.fetch-btn {
    width: 100%; border: none; cursor: pointer; font-family: var(--font);
    background: none; text-align: left;
}
.fetch-btn:hover { color: var(--cyan); background: rgba(6,182,212,0.08); }
.fetch-btn .fetch-loading { display: none; }
.fetch-btn.loading .fetch-text { display: none; }
.fetch-btn.loading .fetch-loading { display: inline; }
.fetch-btn.loading .fetch-icon { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.sidebar-bottom { padding: 16px; border-top: 1px solid var(--border); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 4px; }
.user-avatar {
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700; color: white;
}
.user-info { display: flex; flex-direction: column; }
.user-name { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.user-role { font-size: 0.7rem; color: var(--text-3); }

/* === Main Wrapper === */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* === Topbar === */
.topbar {
    height: var(--topbar-h);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 32px;
    border-bottom: 1px solid var(--border);
    background: rgba(10,11,16,0.8);
    backdrop-filter: blur(16px);
    position: sticky; top: 0; z-index: 100;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.page-title { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.3px; }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--text-2); cursor: pointer; padding: 4px; }

/* Search box */
.search-box {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.search-icon { color: var(--text-4); flex-shrink: 0; }
.search-input {
    background: none; border: none; color: var(--text);
    font-family: var(--font); font-size: 0.85rem; outline: none; width: 200px;
}
.search-input::placeholder { color: var(--text-4); }

/* Add button */
.btn-add {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 18px; background: var(--accent); color: white;
    text-decoration: none; font-size: 0.85rem; font-weight: 600;
    border-radius: var(--radius-sm); transition: all 0.25s;
    box-shadow: 0 2px 12px rgba(99,102,241,0.25);
}
.btn-add:hover { background: var(--accent-2); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(99,102,241,0.35); }

/* === Main Content === */
.main-content { padding: 28px 32px 48px; flex: 1; }

/* === Stats Row === */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }

.stat-card { animation: slideUp 0.5s ease forwards; opacity: 0; }
.stat-card:nth-child(1) { animation-delay: 0s; }
.stat-card:nth-child(2) { animation-delay: 0.08s; }
.stat-card:nth-child(3) { animation-delay: 0.16s; }
.stat-card:nth-child(4) { animation-delay: 0.24s; }

.stat-card-inner {
    padding: 22px; border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex; align-items: center; gap: 14px;
    position: relative; overflow: hidden;
    transition: all 0.3s;
    background: var(--surface);
}
.stat-card-inner::before {
    content: ''; position: absolute; inset: 0;
    opacity: 0.06; border-radius: var(--radius);
    transition: opacity 0.3s;
}
.stat-card-inner:hover { transform: translateY(-3px); border-color: var(--border-2); }
.stat-card-inner:hover::before { opacity: 0.1; }

.stat-blue::before { background: linear-gradient(135deg, var(--blue), var(--cyan)); }
.stat-amber::before { background: linear-gradient(135deg, var(--amber), var(--orange)); }
.stat-emerald::before { background: linear-gradient(135deg, var(--green), var(--emerald)); }
.stat-violet::before { background: linear-gradient(135deg, var(--purple), var(--accent)); }

.stat-icon-wrap {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.stat-blue .stat-icon-wrap { background: rgba(59,130,246,0.12); color: var(--blue); }
.stat-amber .stat-icon-wrap { background: rgba(234,179,8,0.12); color: var(--amber); }
.stat-emerald .stat-icon-wrap { background: rgba(34,197,94,0.12); color: var(--green); }
.stat-violet .stat-icon-wrap { background: rgba(168,85,247,0.12); color: var(--purple); }

.stat-data { flex: 1; }
.stat-value { font-size: 1.75rem; font-weight: 800; letter-spacing: -1px; display: block; line-height: 1; }
.stat-name { font-size: 0.75rem; color: var(--text-3); font-weight: 500; margin-top: 4px; display: block; text-transform: uppercase; letter-spacing: 0.3px; }
.stat-badge { font-size: 0.65rem; color: var(--text-4); font-weight: 500; background: rgba(255,255,255,0.04); padding: 3px 8px; border-radius: 6px; align-self: flex-start; }

/* === Dashboard Grid === */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 28px; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    animation: slideUp 0.5s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}
.card:nth-child(2) { animation-delay: 0.28s; }
.card:nth-child(3) { animation-delay: 0.36s; }

.card-head {
    padding: 18px 22px 0;
    display: flex; align-items: center; justify-content: space-between;
}
.card-head h3 { font-size: 0.92rem; font-weight: 700; letter-spacing: -0.2px; }
.card-count { font-size: 0.72rem; font-weight: 600; color: var(--accent); background: var(--accent-glow); padding: 2px 10px; border-radius: 10px; }
.card-body { padding: 18px 22px 22px; }
.empty-widget { text-align: center; padding: 24px; color: var(--text-4); font-size: 0.85rem; display: flex; flex-direction: column; align-items: center; gap: 8px; }

/* Donut Chart */
.status-chart-layout { display: flex; align-items: center; gap: 20px; }
.donut-wrap { position: relative; width: 110px; height: 110px; flex-shrink: 0; }
.donut-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-segment {
    transition: stroke-dasharray 1s ease;
    animation: donutIn 1s ease forwards;
    animation-delay: var(--delay);
}
.donut-center {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.donut-total { font-size: 1.4rem; font-weight: 800; letter-spacing: -1px; }
.donut-label { font-size: 0.65rem; color: var(--text-4); text-transform: uppercase; letter-spacing: 0.5px; }

.status-legend { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.legend-name { flex: 1; color: var(--text-2); }
.legend-count { font-weight: 700; color: var(--text); min-width: 20px; text-align: right; }

/* Interview list */
.interview-list { display: flex; flex-direction: column; gap: 8px; }
.interview-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    transition: all 0.2s;
}
.interview-item:hover { border-color: var(--border-2); background: rgba(255,255,255,0.04); transform: translateX(3px); }
.interview-date-block { text-align: center; min-width: 40px; }
.interview-month { font-size: 0.6rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.5px; }
.interview-day { font-size: 1.25rem; font-weight: 800; line-height: 1; }
.interview-details { flex: 1; }
.interview-company { font-size: 0.85rem; font-weight: 600; display: block; }
.interview-role { font-size: 0.72rem; color: var(--text-3); display: block; }

/* Priority indicators */
.priority-indicator { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.priority-indicator.priority-high { background: var(--red); box-shadow: 0 0 8px rgba(239,68,68,0.4); }
.priority-indicator.priority-medium { background: var(--amber); box-shadow: 0 0 6px rgba(234,179,8,0.3); }
.priority-indicator.priority-low { background: var(--text-4); }

/* Activity chart */
.activity-chart { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.activity-bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.activity-bar-track { width: 100%; height: 100%; display: flex; align-items: flex-end; }
.activity-bar {
    width: 100%; min-height: 4px;
    background: linear-gradient(to top, var(--accent), var(--purple));
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: height 1s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
}
.activity-bar:hover { filter: brightness(1.2); }
.activity-tooltip {
    display: none; position: absolute; top: -24px; left: 50%; transform: translateX(-50%);
    font-size: 0.7rem; font-weight: 700; color: var(--text);
    background: var(--surface-3); padding: 2px 6px; border-radius: 4px;
    white-space: nowrap;
}
.activity-bar:hover .activity-tooltip { display: block; }
.activity-label { font-size: 0.6rem; color: var(--text-4); letter-spacing: 0.3px; }

/* === Applications Section === */
.applications-section { animation: slideUp 0.5s ease forwards; animation-delay: 0.3s; opacity: 0; }

.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.section-left { display: flex; align-items: center; gap: 14px; }
.section-left h2 { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.3px; }

.view-switcher { display: flex; border: 1px solid var(--border); border-radius: var(--radius-xs); overflow: hidden; }
.view-opt {
    padding: 6px 10px; color: var(--text-4); text-decoration: none; transition: all 0.2s;
    display: flex; align-items: center; border-right: 1px solid var(--border);
}
.view-opt:last-child { border-right: none; }
.view-opt:hover { color: var(--text-2); background: rgba(255,255,255,0.03); }
.view-opt.active { color: var(--accent); background: var(--accent-glow); }

.filter-bar { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chip {
    padding: 5px 14px; border-radius: 20px;
    font-size: 0.78rem; font-weight: 500;
    color: var(--text-3); text-decoration: none;
    border: 1px solid var(--border);
    transition: all 0.2s;
    display: inline-flex; align-items: center; gap: 6px;
}
.filter-chip span { font-weight: 700; }
.filter-chip:hover { border-color: var(--text-3); color: var(--text-2); }
.filter-chip.active { background: var(--accent); border-color: var(--accent); color: white; }
.filter-chip.active span { color: rgba(255,255,255,0.8); }

/* === Table === */
.table-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.data-table { width: 100%; border-collapse: collapse; }
.data-table thead { background: rgba(255,255,255,0.02); }
.data-table th {
    padding: 12px 16px; font-size: 0.7rem; font-weight: 600;
    color: var(--text-4); text-transform: uppercase; letter-spacing: 0.5px;
    text-align: left; border-bottom: 1px solid var(--border);
}
.data-table td {
    padding: 14px 16px; font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.data-table tbody tr { transition: background 0.15s; }
.data-table tbody tr:hover { background: var(--surface-hover); }
.data-table tbody tr:last-child td { border-bottom: none; }

.cell-company { display: flex; align-items: center; gap: 12px; }
.avatar {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.82rem; font-weight: 700; color: white; flex-shrink: 0;
}
.cell-name { font-weight: 600; color: var(--text); display: block; }
.cell-link { font-size: 0.7rem; color: var(--accent); text-decoration: none; opacity: 0.7; }
.cell-link:hover { opacity: 1; }
.cell-role { font-weight: 500; color: var(--text); }
.cell-dim { color: var(--text-3); }

/* Status select */
.inline-form { display: inline; }
.status-select {
    padding: 5px 28px 5px 10px; border-radius: var(--radius-xs);
    font-family: var(--font); font-size: 0.75rem; font-weight: 600;
    border: none; cursor: pointer; outline: none;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236b6f80' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 8px center;
}
.status-saved { background: rgba(6,182,212,0.12); color: var(--cyan); }
.status-applied { background: rgba(59,130,246,0.12); color: var(--blue); }
.status-phone-screen { background: rgba(234,179,8,0.12); color: var(--amber); }
.status-technical-interview { background: rgba(249,115,22,0.12); color: var(--orange); }
.status-final-interview { background: rgba(168,85,247,0.12); color: var(--purple); }
.status-offer-received { background: rgba(34,197,94,0.12); color: var(--green); }
.status-accepted { background: rgba(16,185,129,0.12); color: var(--emerald); }
.status-rejected { background: rgba(239,68,68,0.12); color: var(--red); }
.status-withdrawn { background: rgba(255,255,255,0.04); color: var(--text-3); }

/* Priority tag */
.priority-tag { padding: 4px 10px; border-radius: var(--radius-xs); font-size: 0.72rem; font-weight: 600; }
.priority-tag.priority-high { background: rgba(239,68,68,0.1); color: var(--red); }
.priority-tag.priority-medium { background: rgba(234,179,8,0.1); color: var(--amber); }
.priority-tag.priority-low { background: rgba(255,255,255,0.04); color: var(--text-4); }

.type-tag { font-size: 0.78rem; color: var(--text-3); }

/* Row actions */
.row-actions { display: flex; gap: 4px; }
.row-btn {
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: var(--radius-xs);
    background: none; color: var(--text-3); cursor: pointer;
    text-decoration: none; transition: all 0.2s;
}
.row-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.row-btn-danger:hover { border-color: var(--red); color: var(--red); background: rgba(239,68,68,0.1); }

/* === Kanban === */
.kanban-scroll { overflow-x: auto; padding-bottom: 16px; margin: 0 -8px; padding: 0 8px; }
.kanban-board { display: flex; gap: 12px; min-width: max-content; }

.kanban-col {
    width: 260px; flex-shrink: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: 72vh;
    display: flex; flex-direction: column;
}

.kanban-col-head {
    padding: 14px 16px;
    display: flex; align-items: center; gap: 8px;
    border-bottom: 1px solid var(--border);
}
.kanban-col-indicator { width: 8px; height: 8px; border-radius: 50%; }
.kanban-col-title { font-size: 0.78rem; font-weight: 600; flex: 1; }
.kanban-col-count {
    font-size: 0.7rem; font-weight: 700;
    background: rgba(255,255,255,0.05); color: var(--text-3);
    padding: 2px 8px; border-radius: 8px;
}

.kanban-col-body { padding: 10px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }

.k-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    transition: all 0.2s;
}
.k-card:hover { border-color: var(--border-2); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.3); }

.k-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.k-company { font-size: 0.85rem; font-weight: 700; }
.k-role { font-size: 0.78rem; color: var(--text-3); display: block; margin-bottom: 8px; }
.k-meta { font-size: 0.72rem; color: var(--text-4); display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.k-interview-date { color: var(--accent); font-weight: 500; }

.k-actions { display: flex; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.k-btn {
    font-size: 0.7rem; font-weight: 500; padding: 4px 10px;
    border-radius: var(--radius-xs); cursor: pointer;
    font-family: var(--font); transition: all 0.2s;
}
.k-edit { color: var(--blue); border: 1px solid rgba(59,130,246,0.2); background: none; text-decoration: none; }
.k-edit:hover { background: rgba(59,130,246,0.1); }
.k-delete { color: var(--red); border: 1px solid rgba(239,68,68,0.2); background: none; }
.k-delete:hover { background: rgba(239,68,68,0.1); }
.k-empty { text-align: center; color: var(--text-4); font-size: 0.78rem; padding: 20px 0; }

/* === Empty State === */
.empty-state {
    text-align: center; padding: 64px 24px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty-state h3 { font-size: 1.1rem; font-weight: 700; }
.empty-state p { color: var(--text-3); font-size: 0.88rem; max-width: 360px; }

/* === Forms === */
.form-container { max-width: 740px; margin: 0 auto; }
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
}
.form-header { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.form-header-icon {
    width: 48px; height: 48px; border-radius: 14px;
    background: var(--accent-glow); color: var(--accent-2);
    display: flex; align-items: center; justify-content: center;
}
.form-header-icon.edit-icon { background: rgba(59,130,246,0.12); color: var(--blue); }
.form-header h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.5px; }
.form-header p { color: var(--text-3); font-size: 0.85rem; margin-top: 2px; }

.form-section-label {
    font-size: 0.7rem; font-weight: 700; color: var(--text-4);
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px;
}
.form-divider { height: 1px; background: var(--border); margin: 6px 0 16px; }

.app-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full-width { grid-column: 1 / -1; }

.form-group label {
    font-size: 0.72rem; font-weight: 600; color: var(--text-3);
    text-transform: uppercase; letter-spacing: 0.4px;
}

.form-group input, .form-group select, .form-group textarea {
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font); font-size: 0.88rem;
    color: var(--text); outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-4); }
.form-group textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.form-group select {
    appearance: none; -webkit-appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6f80' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}

.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 8px; }
.btn-submit {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 24px; background: var(--accent); color: white; border: none;
    border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.88rem;
    font-weight: 600; cursor: pointer; transition: all 0.25s;
    box-shadow: 0 2px 12px rgba(99,102,241,0.3);
}
.btn-submit:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn-cancel {
    padding: 11px 24px; background: none; color: var(--text-3);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 0.88rem; font-weight: 500; text-decoration: none;
    transition: all 0.2s; display: inline-flex; align-items: center;
}
.btn-cancel:hover { border-color: var(--text-3); color: var(--text-2); }

/* === Toast notification === */
.toast {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 18px; margin-bottom: 20px;
    background: rgba(6,182,212,0.1); border: 1px solid rgba(6,182,212,0.2);
    border-radius: var(--radius-sm); color: var(--cyan);
    font-size: 0.85rem; font-weight: 500;
    animation: toastIn 0.4s ease;
}
.toast strong { color: var(--text); }
.toast-close {
    margin-left: auto; background: none; border: none;
    color: var(--text-3); cursor: pointer; font-size: 1.2rem; padding: 0 4px;
}
.toast-close:hover { color: var(--text); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* Saved filter chip */
.filter-chip.saved-chip { border-color: rgba(6,182,212,0.3); }
.filter-chip.saved-chip.active { background: var(--cyan); border-color: var(--cyan); }

/* === Animations === */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes donutIn {
    from { stroke-dasharray: 0 100; }
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* === Responsive === */
@media (max-width: 1200px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr 1fr; }
    .card-activity { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); box-shadow: 0 0 60px rgba(0,0,0,0.5); }
    .main-wrapper { margin-left: 0; }
    .mobile-menu-btn { display: flex; }
    .main-content { padding: 20px 16px; }
    .topbar { padding: 0 16px; }
    .search-input { width: 140px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .form-row-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .stats-row { grid-template-columns: 1fr; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .form-card { padding: 20px 16px; }
    .section-header { flex-direction: column; align-items: flex-start; }
    .table-card { overflow-x: auto; }
    .data-table { min-width: 700px; }
    .topbar-right { gap: 8px; }
    .btn-add span { display: none; }
}
