/* =============================================
   ADMIN DASHBOARD - SamCalvin Digital
   Design inspired by Reference image
   ============================================= */

/* Design Tokens */
:root {
    --sidebar-bg: #0F172A;
    --sidebar-width: 240px;
    --sidebar-accent: #2563EB;
    --sidebar-text: #94A3B8;
    --sidebar-text-active: #FFFFFF;
    --sidebar-item-hover: rgba(255,255,255,0.06);
    --sidebar-item-active: rgba(37,99,235,0.2);

    --topbar-bg: #FFFFFF;
    --topbar-height: 70px;
    --topbar-border: #F1F5F9;

    --page-bg: #F8FAFC;

    --card-bg: #FFFFFF;
    --card-border: rgba(226,232,240,0.7);
    --card-radius: 16px;
    --card-shadow: 0 1px 3px rgba(15,23,42,0.04), 0 4px 12px rgba(15,23,42,0.04);
    --card-shadow-hover: 0 8px 24px rgba(15,23,42,0.08);

    --blue: #2563EB;
    --blue-light: #DBEAFE;
    --orange: #F59E0B;
    --orange-light: #FEF3C7;
    --green: #10B981;
    --green-light: #D1FAE5;
    --red: #EF4444;
    --red-light: #FEE2E2;
    --purple: #8B5CF6;
    --purple-light: #EDE9FE;

    --text-dark: #0F172A;
    --text-mid: #334155;
    --text-muted: #64748B;
    --text-light: #94A3B8;

    --font-head: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-body); background: var(--page-bg); color: var(--text-dark); display: flex; min-height: 100vh; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ============== SIDEBAR ============== */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: var(--transition);
    overflow-y: auto;
    scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 36px; height: 36px;
    background: var(--blue);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    flex-shrink: 0;
}

.brand-name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1rem;
    color: #FFFFFF;
    white-space: nowrap;
}

.brand-name span {
    color: var(--sidebar-text);
    font-weight: 400;
}

.sidebar-close {
    background: none;
    border: none;
    color: var(--sidebar-text);
    display: none;
    padding: 4px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

.nav-group {
    margin-bottom: 8px;
}

.nav-group-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--sidebar-text);
    opacity: 0.5;
    padding: 0 10px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--sidebar-text);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.nav-item:hover {
    background: var(--sidebar-item-hover);
    color: var(--sidebar-text-active);
}

.nav-item.active {
    background: var(--sidebar-item-active);
    color: var(--sidebar-text-active);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0; top: 20%; bottom: 20%;
    width: 3px;
    background: var(--blue);
    border-radius: 0 3px 3px 0;
}

.nav-icon {
    width: 18px; height: 18px;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    background: var(--blue);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ============== SIDEBAR OVERLAY ============== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 199;
}

/* ============== MAIN WRAPPER ============== */
.main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: var(--transition);
}

/* ============== TOPBAR ============== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--topbar-height);
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--topbar-border);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.hamburger {
    background: none;
    border: none;
    color: var(--text-mid);
    padding: 6px;
    border-radius: 8px;
    display: none;
    transition: var(--transition);
}

.hamburger:hover { background: var(--page-bg); }

.page-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-dark);
    white-space: nowrap;
}

.topbar-center {
    flex: 1;
    max-width: 400px;
}

.search-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    color: var(--text-light);
}

.search-input {
    width: 100%;
    padding: 9px 12px 9px 38px;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    background: var(--page-bg);
    font-size: 0.875rem;
    color: var(--text-dark);
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.icon-btn {
    width: 38px; height: 38px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: var(--page-bg);
    color: var(--text-mid);
    display: flex; align-items: center; justify-content: center;
    position: relative;
    transition: var(--transition);
}

.icon-btn:hover {
    background: #fff;
    border-color: var(--blue);
    color: var(--blue);
}

.icon-btn.has-notif .notif-dot {
    display: block;
}

.notif-dot {
    display: none;
    position: absolute;
    top: 7px; right: 7px;
    width: 8px; height: 8px;
    background: var(--red);
    border-radius: 50%;
    border: 2px solid var(--topbar-bg);
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid var(--card-border);
}

.admin-avatar {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--blue);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.8rem;
    display: flex; align-items: center; justify-content: center;
}

.admin-name {
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.2;
}

.admin-role {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ============== PAGE CONTENT ============== */
.page-content {
    flex: 1;
    padding: 28px 24px;
}

.page { display: block; }
.page.hidden { display: none; }

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

.stat-card {
    border-radius: var(--card-radius);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    cursor: default;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
}

.stat-blue { background: #C7D7FD; }
.stat-gray { background: #E2E8F0; }
.stat-orange { background: #FDE68A; }
.stat-light { background: #E0E7FF; }

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(0,0,0,0.5);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.stat-value {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 2rem;
    color: var(--text-dark);
    line-height: 1;
}

.stat-value.sm {
    font-size: 1.2rem;
}

.stat-icon {
    width: 36px; height: 36px;
    background: rgba(0,0,0,0.08);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 18px; height: 18px;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: rgba(0,0,0,0.5);
    font-weight: 500;
    margin-bottom: 12px;
}

.stat-trend.positive { color: #065F46; }

.stat-sparkline {
    height: 50px;
    opacity: 0.7;
}

/* ============== DASHBOARD GRID ============== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

.chart-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Chart Card */
.chart-section > *:first-child {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    padding: 24px;
    box-shadow: var(--card-shadow);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-dark);
}

.chart-tabs {
    display: flex;
    background: var(--page-bg);
    border-radius: 8px;
    padding: 3px;
}

.chart-tab {
    padding: 6px 14px;
    border-radius: 6px;
    border: none;
    background: none;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
}

.chart-tab.active {
    background: var(--sidebar-bg);
    color: #FFFFFF;
}

.chart-canvas-wrapper {
    height: 220px;
    position: relative;
}

/* ============== TABLE STYLES ============== */
.latest-table-section {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    padding: 24px;
    box-shadow: var(--card-shadow);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.table-wrapper {
    overflow-x: auto;
}

.leads-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.leads-table th {
    text-align: left;
    padding: 10px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--card-border);
    white-space: nowrap;
}

.leads-table td {
    padding: 14px 14px;
    border-bottom: 1px solid var(--topbar-border);
    color: var(--text-mid);
    vertical-align: middle;
}

.leads-table tr:last-child td { border-bottom: none; }

.leads-table tr:hover td { background: var(--page-bg); }

.leads-table.full th:first-child,
.leads-table.full td:first-child {
    padding-left: 20px;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.status-badge::before {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
}

.status-new { background: #DBEAFE; color: #1D4ED8; }
.status-new::before { background: #2563EB; }
.status-contacted { background: #D1FAE5; color: #065F46; }
.status-contacted::before { background: #10B981; }
.status-qualified { background: #FDE68A; color: #92400E; }
.status-qualified::before { background: #F59E0B; }
.status-closed { background: #E2E8F0; color: #475569; }
.status-closed::before { background: #94A3B8; }

/* View All Button */
.view-all-btn {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: var(--page-bg);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
}

.view-all-btn:hover {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}

/* Action buttons in table */
.action-btn {
    width: 30px; height: 30px;
    border-radius: 7px;
    border: 1px solid var(--card-border);
    background: var(--page-bg);
    color: var(--text-muted);
    display: inline-flex; align-items: center; justify-content: center;
    transition: var(--transition);
    cursor: pointer;
}

.action-btn:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.action-btn.delete:hover { background: var(--red); border-color: var(--red); }
.action-btn svg { width: 13px; height: 13px; }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-icon {
    width: 64px; height: 64px;
    background: var(--page-bg);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    color: var(--text-light);
}

.empty-icon svg { width: 28px; height: 28px; }

.empty-state p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.btn-small {
    display: inline-flex;
    padding: 8px 18px;
    background: var(--blue);
    color: #fff;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-small:hover { opacity: 0.85; }

/* ============== ACTIVITY PANEL ============== */
.activity-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-panel > div:first-child,
.service-breakdown {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    padding: 20px;
    box-shadow: var(--card-shadow);
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 260px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.activity-avatar {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: var(--blue);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.8rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.activity-info { flex: 1; min-width: 0; }
.activity-name {
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.activity-time {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.activity-amount {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-dark);
    white-space: nowrap;
}

.activity-empty {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Service Breakdown */
.breakdown-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.breakdown-item {
    margin-bottom: 14px;
}

.breakdown-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-mid);
    margin-bottom: 5px;
}

.breakdown-bar-bg {
    height: 6px;
    background: var(--page-bg);
    border-radius: 3px;
    overflow: hidden;
}

.breakdown-bar {
    height: 100%;
    border-radius: 3px;
    background: var(--blue);
    transition: width 0.8s ease;
}

/* ============== LEADS TOOLBAR ============== */
.leads-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.leads-search {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.leads-search svg {
    position: absolute;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    color: var(--text-light);
}

.leads-search input {
    width: 100%;
    padding: 10px 12px 10px 38px;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    background: var(--card-bg);
    font-size: 0.875rem;
    color: var(--text-dark);
    outline: none;
    transition: var(--transition);
}

.leads-search input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.leads-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 9px 12px;
    border: 1px solid var(--card-border);
    border-radius: 9px;
    background: var(--card-bg);
    font-size: 0.8rem;
    color: var(--text-mid);
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:focus { border-color: var(--blue); }

.btn-export {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 9px;
    border: 1px solid var(--blue);
    background: var(--blue);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-export:hover { opacity: 0.85; }

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 9px;
    border: 1px solid var(--red);
    background: #fff;
    color: var(--red);
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-danger:hover { background: var(--red); color: #fff; }

.leads-table-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.leads-table-card .leads-table {
    margin: 0;
}

/* ============== ANALYTICS PAGE ============== */
.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.analytics-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    padding: 24px;
    box-shadow: var(--card-shadow);
}

.analytics-card.full-width { grid-column: 1 / -1; }

.donut-wrapper {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px 0;
}

.donut-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-mid);
}

.legend-dot {
    width: 10px; height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.status-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.status-bar-item {
    display: grid;
    grid-template-columns: 100px 1fr 40px;
    align-items: center;
    gap: 12px;
}

.status-bar-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-mid);
}

.status-bar-track {
    height: 8px;
    background: var(--page-bg);
    border-radius: 4px;
    overflow: hidden;
}

.status-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
}

.status-bar-count {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: right;
}

/* ============== MODAL ============== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 500;
    padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal-card {
    background: var(--card-bg);
    border-radius: 20px;
    width: 100%;
    max-width: 560px;
    box-shadow: 0 20px 60px rgba(15,23,42,0.2);
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9) translateY(-20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid var(--card-border);
}

.modal-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.1rem;
}

.modal-close {
    width: 32px; height: 32px;
    background: var(--page-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.modal-close:hover { background: var(--red); color: #fff; border-color: var(--red); }

.modal-body {
    padding: 24px 28px;
    overflow-y: auto;
    flex: 1;
}

.modal-field {
    margin-bottom: 16px;
}

.modal-field-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.modal-field-value {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
}

.modal-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

.modal-message {
    background: var(--page-bg);
    border-radius: 10px;
    padding: 14px;
    font-size: 0.875rem;
    color: var(--text-mid);
    line-height: 1.6;
    white-space: pre-wrap;
}

.modal-footer {
    padding: 16px 28px 24px;
    border-top: 1px solid var(--card-border);
}

.modal-status-update {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.modal-status-update label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-mid);
}

.btn-save {
    padding: 9px 18px;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-save:hover { opacity: 0.85; }

/* ============== TOAST ============== */
.toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: var(--sidebar-bg);
    color: #fff;
    padding: 13px 20px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(15,23,42,0.2);
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 300px;
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: #065F46; }
.toast.error { background: #7F1D1D; }
.toast.info { background: #1E3A8A; }

/* New lead pulse animation */
@keyframes newLeadPulse {
    0% { box-shadow: 0 0 0 0 rgba(37,99,235,0.4); }
    70% { box-shadow: 0 0 0 10px rgba(37,99,235,0); }
    100% { box-shadow: 0 0 0 0 rgba(37,99,235,0); }
}

.new-lead-row {
    animation: newLeadPulse 1.5s ease 2;
}

/* ============== RESPONSIVE ============== */
@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .activity-panel {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    :root { --sidebar-width: 240px; }
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-close { display: flex; }
    .sidebar-overlay.open { display: block; }
    .main-wrapper { margin-left: 0; }
    .hamburger { display: flex; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .analytics-grid { grid-template-columns: 1fr; }
    .analytics-card.full-width { grid-column: 1; }
    .admin-info { display: none; }
}

@media (max-width: 600px) {
    .page-content { padding: 16px; }
    .stats-row { grid-template-columns: 1fr 1fr; gap: 12px; }
    .topbar { padding: 0 14px; gap: 10px; }
    .topbar-center { display: none; }
    .leads-toolbar { flex-direction: column; align-items: stretch; }
    .modal-grid-2 { grid-template-columns: 1fr; }
    .activity-panel { display: flex; }
}
