/* ─────────────────────────────────────────────────────────────────
   AIMCA Outreach Portal - Dark Theme
   ───────────────────────────────────────────────────────────────── */

:root {
    --bg: #0b1118;
    --bg2: #111827;
    --bg3: #1a2332;
    --bg4: #1f2d3d;
    --border: #1e2d3d;
    --border2: #2a3a4d;
    --accent: #10b981;
    --accent-hover: #0d9e6f;
    --accent-dim: rgba(16, 185, 129, 0.15);
    --text: #e2e8f0;
    --text2: #94a3b8;
    --text3: #64748b;
    --red: #ef4444;
    --yellow: #f59e0b;
    --blue: #3b82f6;
    --purple: #8b5cf6;
    --sidebar-w: 240px;
    --radius: 8px;
    --shadow: 0 4px 16px rgba(0,0,0,0.4);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 14px;
}

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

.sidebar {
    width: var(--sidebar-w);
    background: var(--bg2);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: transform 0.2s;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-w);
    padding: 32px;
    max-width: 100%;
    overflow-x: hidden;
}

/* ─────────────── Sidebar ─────────────── */
.sidebar-header {
    padding: 24px 20px 20px;
    border-bottom: 1px solid var(--border);
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1px;
}

.logo-subtitle {
    font-size: 11px;
    color: var(--text3);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--text2);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
}

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

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

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.user-name { font-weight: 600; font-size: 13px; }
.user-role { font-size: 11px; color: var(--text3); text-transform: capitalize; }

.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text3);
    text-decoration: none;
    font-size: 13px;
    padding: 6px 8px;
    border-radius: 6px;
    transition: all 0.15s;
}

.logout-btn svg { width: 16px; height: 16px; }
.logout-btn:hover { color: var(--red); background: rgba(239, 68, 68, 0.1); }

/* ─────────────── Mobile Header ─────────────── */
.mobile-header {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 0 16px;
    align-items: center;
    gap: 16px;
    z-index: 99;
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 6px;
}

.menu-toggle svg { width: 22px; height: 22px; }
.mobile-title { font-weight: 600; font-size: 16px; }

/* ─────────────── Page Header ─────────────── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 16px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
}

.page-subtitle {
    font-size: 14px;
    color: var(--text2);
    margin-top: 4px;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ─────────────── Buttons ─────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}

.btn svg { width: 15px; height: 15px; }

.btn-primary {
    background: var(--accent);
    color: #000;
    font-weight: 600;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border2);
    color: var(--text);
}
.btn-outline:hover { background: var(--bg3); border-color: var(--text3); }

.btn-ghost {
    background: transparent;
    color: var(--text2);
}
.btn-ghost:hover { background: var(--bg3); color: var(--text); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }

.btn-green { background: var(--accent) !important; color: #000 !important; }

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}
.btn-icon svg { width: 14px; height: 14px; }
.btn-icon:hover { background: var(--bg3); color: var(--text); }
.btn-icon-green:hover { background: rgba(16,185,129,0.1); color: var(--accent); border-color: var(--accent); }
.btn-icon-blue:hover { background: rgba(59,130,246,0.1); color: var(--blue); border-color: var(--blue); }

.btn-link {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: inherit;
    text-decoration: underline;
    padding: 0;
}

/* ─────────────── Cards ─────────────── */
.card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

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

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-title svg { width: 16px; height: 16px; }

.card-body { padding: 16px 20px; }

.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 20px; }

/* ─────────────── Stats Grid ─────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat-icon svg { width: 20px; height: 20px; }

.stat-icon-blue { background: rgba(59,130,246,0.15); color: var(--blue); }
.stat-icon-green { background: var(--accent-dim); color: var(--accent); }
.stat-icon-yellow { background: rgba(245,158,11,0.15); color: var(--yellow); }
.stat-icon-purple { background: rgba(139,92,246,0.15); color: var(--purple); }

.stat-value {
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text2);
    margin-top: 4px;
}

/* ─────────────── Two col grid ─────────────── */
.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* ─────────────── Account rows ─────────────── */
.account-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.account-row:last-child { border-bottom: none; }

.account-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-dim);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.account-email { font-size: 13px; font-weight: 500; }
.account-meta { font-size: 11px; color: var(--text3); }
.account-info { flex: 1; }

/* ─────────────── Badges ─────────────── */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 500;
}

.badge-green { background: var(--accent-dim); color: var(--accent); }
.badge-blue { background: rgba(59,130,246,0.15); color: var(--blue); }
.badge-yellow { background: rgba(245,158,11,0.15); color: var(--yellow); }
.badge-gray { background: var(--bg4); color: var(--text3); }
.badge-red { background: rgba(239,68,68,0.15); color: var(--red); }
.badge-lg { font-size: 14px; padding: 6px 14px; }

/* ─────────────── Classification Badges ─────────────── */
.classification-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 500;
}

.classification-interested_lead { background: rgba(16,185,129,0.15); color: var(--accent); }
.classification-funding_inquiry { background: rgba(59,130,246,0.15); color: var(--blue); }
.classification-follow_up_needed { background: rgba(245,158,11,0.15); color: var(--yellow); }
.classification-partnership { background: rgba(139,92,246,0.15); color: var(--purple); }
.classification-spam { background: rgba(239,68,68,0.1); color: var(--red); }
.classification-newsletter { background: var(--bg4); color: var(--text3); }
.classification-personal { background: rgba(59,130,246,0.1); color: #60a5fa; }
.classification-other { background: var(--bg4); color: var(--text3); }

/* ─────────────── Activity ─────────────── */
.activity-list { display: flex; flex-direction: column; gap: 2px; }

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text2);
}
.activity-icon svg { width: 14px; height: 14px; }
.activity-send { background: var(--accent-dim); color: var(--accent); }
.activity-sync { background: rgba(59,130,246,0.1); color: var(--blue); }

.activity-text { font-size: 13px; }
.activity-detail { color: var(--text2); margin-left: 4px; }
.activity-time { font-size: 11px; color: var(--text3); margin-top: 2px; }
.activity-content { flex: 1; }

.class-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.class-row:last-child { border-bottom: none; }
.class-count { font-size: 14px; font-weight: 600; color: var(--text); }

/* ─────────────── Accounts Bar ─────────────── */
.accounts-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
}

.account-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text2);
    background: var(--bg3);
    border: 1px solid var(--border);
    transition: all 0.15s;
}

.account-chip:hover { background: var(--bg4); color: var(--text); }
.account-chip.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }
.account-chip-add { border-style: dashed; }

.account-chip-wrapper {
    display: flex;
    align-items: center;
    gap: 2px;
}

.account-chip-sync, .account-chip-disconnect {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: none;
    border: none;
    color: var(--text3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.account-chip-sync svg, .account-chip-disconnect svg { width: 12px; height: 12px; }
.account-chip-sync:hover { color: var(--blue); }
.account-chip-disconnect:hover { color: var(--red); }

.account-dot { width: 6px; height: 6px; border-radius: 50%; }
.dot-green { background: var(--accent); }
.dot-red { background: var(--red); }

/* ─────────────── Filters Bar ─────────────── */
.filters-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filters-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

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

.search-box svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    color: var(--text3);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px 8px 34px;
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}
.search-box input:focus { border-color: var(--accent); }

.clear-search {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text3);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 2px;
}

.filter-select {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    color: var(--text);
    font-size: 12px;
    outline: none;
    cursor: pointer;
}

.bulk-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text2);
}

/* ─────────────── Email List ─────────────── */
.email-list {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.email-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg3);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text2);
    cursor: pointer;
}

.email-count { font-size: 12px; color: var(--text3); }

.email-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
    cursor: pointer;
}
.email-row:last-child { border-bottom: none; }
.email-row:hover { background: var(--bg3); }

.email-unread { background: rgba(16,185,129,0.03); }
.email-unread .email-subject { font-weight: 600; color: var(--text); }

.email-check { flex-shrink: 0; padding-top: 2px; }

.email-content { flex: 1; min-width: 0; }

.email-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    gap: 8px;
}

.email-from {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sender-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg4);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.sender-info { display: flex; align-items: center; gap: 6px; }
.sender-name { font-size: 13px; font-weight: 500; color: var(--text); }
.sender-email { font-size: 11px; color: var(--text3); }

.email-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.email-date { font-size: 11px; color: var(--text3); }

.email-subject {
    font-size: 13px;
    color: var(--text2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.email-snippet {
    font-size: 12px;
    color: var(--text3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-account {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--text3);
    margin-top: 4px;
}

.email-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    padding-top: 2px;
}

/* ─────────────── Pagination ─────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px;
    border-top: 1px solid var(--border);
}

.page-info { font-size: 13px; color: var(--text2); }

/* ─────────────── Empty States ─────────────── */
.empty-state {
    text-align: center;
    padding: 24px;
    color: var(--text2);
    font-size: 13px;
}

.empty-state-large {
    text-align: center;
    padding: 60px 24px;
    color: var(--text2);
}

.empty-state-large svg {
    width: 56px;
    height: 56px;
    color: var(--text3);
    margin-bottom: 16px;
}

.empty-state-large h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.empty-state-large p {
    font-size: 14px;
    margin-bottom: 16px;
}

/* ─────────────── Alerts ─────────────── */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: 16px;
}
.alert svg { width: 16px; height: 16px; flex-shrink: 0; }
.alert-error { background: rgba(239,68,68,0.1); color: var(--red); border: 1px solid rgba(239,68,68,0.3); }
.alert-warning { background: rgba(245,158,11,0.1); color: var(--yellow); border: 1px solid rgba(245,158,11,0.3); }
.alert-success { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(16,185,129,0.3); }
.alert-info { background: rgba(59,130,246,0.1); color: var(--blue); border: 1px solid rgba(59,130,246,0.3); }

/* ─────────────── Toast ─────────────── */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    z-index: 9999;
    box-shadow: var(--shadow);
    animation: toast-in 0.2s ease;
    max-width: 320px;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.toast-success { background: var(--bg2); border: 1px solid var(--accent); color: var(--accent); }
.toast-error { background: var(--bg2); border: 1px solid var(--red); color: var(--red); }
.toast-info { background: var(--bg2); border: 1px solid var(--blue); color: var(--blue); }
.toast-warning { background: var(--bg2); border: 1px solid var(--yellow); color: var(--yellow); }

/* ─────────────── Login ─────────────── */
.login-body {
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-container {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.login-logo { margin-bottom: 20px; }
.login-logo-img { height: 52px; }
.login-logo-text { font-size: 32px; font-weight: 800; color: var(--accent); }
.login-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.login-subtitle { font-size: 14px; color: var(--text2); margin-bottom: 28px; }

.login-form { text-align: left; }

.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text2);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    padding: 10px 14px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}

.form-group input:focus { border-color: var(--accent); }
.form-group input::placeholder { color: var(--text3); }

.login-footer { font-size: 12px; color: var(--text3); }

/* ─────────────── Message View ─────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text2);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.15s;
}
.back-link:hover { color: var(--text); }
.back-link svg { width: 15px; height: 15px; }

.message-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    align-items: start;
}

.message-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
}

.message-from { display: flex; align-items: center; gap: 12px; }

.sender-avatar-lg {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-dim);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

.sender-name-lg { font-size: 15px; font-weight: 600; }
.sender-email-sm { font-size: 12px; color: var(--text2); margin-top: 2px; }
.message-via { font-size: 11px; color: var(--text3); margin-top: 2px; }
.message-date { font-size: 12px; color: var(--text3); flex-shrink: 0; }

.message-body {
    padding: 20px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
}

.draft-textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    padding: 12px;
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color 0.15s;
}
.draft-textarea:focus { border-color: var(--accent); }

.draft-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    justify-content: flex-end;
}

.draft-sent-view {
    font-size: 13px;
    color: var(--text2);
    white-space: pre-wrap;
    line-height: 1.6;
    padding: 4px 0;
}

.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.info-row:last-child { border-bottom: none; }
.info-label { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; }

.confidence-bar {
    flex: 1;
    height: 4px;
    background: var(--bg4);
    border-radius: 2px;
    margin: 0 8px;
    overflow: hidden;
}
.confidence-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.3s;
}
.confidence-pct { font-size: 11px; color: var(--text2); flex-shrink: 0; }

/* ─────────────── Utilities ─────────────── */
.text-muted { color: var(--text3); }
.text-sm { font-size: 12px; }
.w-full { width: 100%; }

/* ─────────────── Responsive ─────────────── */
@media (max-width: 1024px) {
    .two-col-grid { grid-template-columns: 1fr; }
    .message-layout { grid-template-columns: 1fr; }
    .message-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .mobile-header {
        display: flex;
    }
    .main-content {
        margin-left: 0;
        padding: 72px 16px 24px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .filters-form {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-select { width: 100%; }
    .email-meta { flex-direction: column; align-items: flex-end; }
    .message-sidebar { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; }
    .page-actions { width: 100%; }
    .draft-actions { flex-wrap: wrap; }
    .accounts-bar { flex-wrap: wrap; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .login-card { padding: 28px 20px; }
    .sender-info { flex-direction: column; align-items: flex-start; gap: 2px; }
    .email-header { flex-wrap: wrap; }
}
