/* ═══════════════════════════════════════════════════════════════
   Canopus Email Verifier v2.0 — Core Styles
   Color: Blue (#1E40AF) for user panel, Purple (#7C3AED) for admin
   ═══════════════════════════════════════════════════════════════ */

/* ─── CSS Variables (set per layout via <style> in head) ─── */

/* ─── Sidebar ─── */
.cv-sidebar {
    width: var(--cv-sidebar-width, 280px);
    height: 100vh;
    max-height: 100vh;
    background: linear-gradient(180deg, var(--cv-primary-dark, #1E3A8A) 0%, var(--cv-primary, #1E40AF) 100%);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1040;
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.cv-sidebar-admin {
    background: linear-gradient(180deg, #4C1D95 0%, #7C3AED 100%);
}

.cv-sidebar-brand {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.cv-sidebar-nav {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.cv-sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.5rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.cv-sidebar-nav li a:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.08);
}

.cv-sidebar-nav li a.active {
    color: #ffffff;
    background: rgba(255,255,255,0.12);
    border-left-color: #ffffff;
}

.cv-sidebar-nav li a i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
}

.cv-sidebar-section {
    padding: 1rem 1.5rem 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.cv-sidebar-credits {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.cv-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1030;
}

/* ─── Main Content (offset by sidebar) ─── */
#mainContent {
    margin-left: var(--cv-sidebar-width, 280px);
    min-height: 100vh;
}

/* ─── Header ─── */
.cv-header {
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 1020;
    background: var(--cv-surface, #ffffff);
}

/* ─── Footer ─── */
.cv-footer {
    margin-top: auto;
}

/* ─── Cards ─── */
.cv-card {
    background: var(--cv-surface, #ffffff);
    border: 1px solid var(--cv-border, #E2E8F0);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 1.5rem;
}

.cv-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--cv-border, #E2E8F0);
}

/* ─── Status Badges ─── */
.badge-valid      { background: #dcfce7; color: #166534; }
.badge-invalid    { background: #fee2e2; color: #991b1b; }
.badge-risky      { background: #fef3c7; color: #92400e; }
.badge-disposable { background: #ffedd5; color: #9a3412; }
.badge-role-based { background: #dbeafe; color: #1e40af; }
.badge-spam-trap  { background: #f3e8ff; color: #6b21a8; }
.badge-unknown    { background: #f1f5f9; color: #334155; }
.badge-pending    { background: #fef9c3; color: #854d0e; }
.badge-catchall   { background: #e0e7ff; color: #3730a3; }

/* ─── Buttons ─── */
.btn-cv-primary {
    background: var(--cv-primary, #1E40AF);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.65rem 1.5rem;
    font-weight: 600;
    transition: background 0.2s;
}
.btn-cv-primary:hover {
    background: var(--cv-primary-dark, #1E3A8A);
    color: #ffffff;
}

.btn-cv-secondary {
    background: transparent;
    color: var(--cv-primary, #1E40AF);
    border: 1px solid var(--cv-primary, #1E40AF);
    border-radius: 8px;
    padding: 0.65rem 1.5rem;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-cv-secondary:hover {
    background: var(--cv-primary, #1E40AF);
    color: #ffffff;
}

/* ─── Forms ─── */
.form-control:focus, .form-select:focus {
    border-color: var(--cv-primary-light, #3B82F6);
    box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
}

.form-label {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.35rem;
}

/* ─── Tables ─── */
.cv-table thead th {
    background: #F8FAFC;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--cv-text-secondary, #64748B);
    border-bottom: 2px solid var(--cv-border, #E2E8F0);
}

.cv-table tbody tr:hover {
    background: #F8FAFC;
}

/* ─── Stat Cards ─── */
.cv-stat-card {
    background: var(--cv-surface, #ffffff);
    border: 1px solid var(--cv-border, #E2E8F0);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cv-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.cv-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.cv-stat-label {
    font-size: 0.8rem;
    color: var(--cv-text-secondary, #64748B);
}

/* ─── Progress Bar ─── */
.cv-progress {
    height: 10px;
    border-radius: 5px;
    background: #E2E8F0;
    overflow: hidden;
}

.cv-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--cv-primary), var(--cv-primary-light));
    border-radius: 5px;
    transition: width 0.3s ease;
}

/* ─── Responsive ─── */
@media (max-width: 767.98px) {
    .cv-sidebar {
        transform: translateX(-100%);
    }
    .cv-sidebar.show {
        transform: translateX(0);
    }
    .cv-sidebar.show + .cv-sidebar-overlay {
        display: block;
    }
    #mainContent {
        margin-left: 0;
    }
}

@media (min-width: 768px) and (max-width: 1023.98px) {
    .cv-sidebar {
        width: 220px;
    }
    #mainContent {
        margin-left: 220px;
    }
}

/* ─── Utilities ─── */
.text-primary-cv { color: var(--cv-primary, #1E40AF) !important; }
.bg-primary-cv   { background: var(--cv-primary, #1E40AF) !important; }
.border-primary-cv { border-color: var(--cv-primary, #1E40AF) !important; }

.font-mono { font-family: var(--cv-font-mono, 'JetBrains Mono', monospace); }

/* Smooth transitions */
* { transition-property: background-color, border-color, color, opacity;
    transition-duration: 0.15s; transition-timing-function: ease; }
a, button { transition-duration: 0.2s; }
