/* ═══════════════════════════════════════════════════════════════════════════
   FIND DNC — Ultra-Modern Clean White & Royal Blue Theme (www.finddnc.com)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── CSS Variables ──────────────────────────────────────────────────────── */
:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-glass: rgba(255, 255, 255, 0.95);
    --bg-glass-border: #e2e8f0;

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;

    /* Royal Blue Primary Palette */
    --accent-primary: #2563eb;
    --accent-primary-hover: #1d4ed8;
    --accent-primary-light: #eff6ff;
    --accent-primary-glow: rgba(37, 99, 235, 0.18);
    
    --accent-secondary: #0284c7;
    --accent-success: #2563eb;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;

    --gradient-1: linear-gradient(135deg, #2563eb, #0284c7);
    --gradient-2: linear-gradient(135deg, #1d4ed8, #2563eb);
    --gradient-3: linear-gradient(135deg, #ef4444, #f87171);
    --gradient-4: linear-gradient(135deg, #0284c7, #38bdf8);

    --sidebar-width: 260px;
    --topbar-height: 70px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 22px;

    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-glow: 0 0 20px var(--accent-primary-glow);

    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: var(--accent-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-primary-hover); }

/* ── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(15, 23, 42, 0.25); }

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════ */
.sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--bg-glass-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition-slow);
    box-shadow: var(--shadow-sm);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 20px;
    border-bottom: 1px solid var(--bg-glass-border);
}

.brand-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.brand-logo {
    max-width: 190px;
    height: auto;
}

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

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    background: none;
    text-decoration: none;
}

.menu-item svg { width: 19px; height: 19px; flex-shrink: 0; }

.menu-item:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

.menu-item.active {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
    font-weight: 600;
}

.menu-item.active svg { stroke: var(--accent-primary); }

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid var(--bg-glass-border);
    background: #fafafa;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: var(--radius-sm);
    background: #ffffff;
    border: 1px solid var(--bg-glass-border);
}

.user-avatar {
    width: 36px; height: 36px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    flex-shrink: 0;
}

.user-info { display: flex; flex-direction: column; }
.user-name { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }
.user-role { font-size: 0.75rem; color: var(--text-muted); }

.logout-btn { color: var(--accent-danger) !important; }
.logout-btn:hover { background: #fef2f2 !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════════════════ */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg-primary);
}

.top-bar {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 32px;
    border-bottom: 1px solid var(--bg-glass-border);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 50;
    gap: 16px;
}

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

.menu-toggle svg { width: 24px; height: 24px; }

.page-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    flex: 1;
    color: var(--text-primary);
}

.top-bar-right { display: flex; align-items: center; gap: 12px; }

.content-area { padding: 32px; }

/* ── Badge ─────────────────────────────────────────────────────────────── */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-super { background: #eff6ff; color: var(--accent-primary); border: 1px solid rgba(37, 99, 235, 0.2); }
.badge-sub { background: #f1f5f9; color: var(--text-secondary); border: 1px solid var(--border-color); }

.campaign-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #f1f5f9;
    border: 1px solid var(--bg-glass-border);
    color: var(--text-secondary);
}

.info-banner {
    margin-bottom: 24px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    font-size: 0.9rem;
}

.info-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-banner svg {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════════════════ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover { border-color: #cbd5e1; box-shadow: var(--shadow-md); }

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--bg-glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    background: #ffffff;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

.card-header h2 { 
    font-size: 1.05rem; 
    font-weight: 700; 
    margin: 0;
    color: var(--text-primary);
    word-break: break-word;
    flex: 1 1 220px;
}

.card-body { padding: 24px; background: #ffffff; border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }

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

/* ═══════════════════════════════════════════════════════════════════════════
   STATS CARDS (Dashboard)
   ═══════════════════════════════════════════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    padding: 24px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.08);
    border-radius: inherit;
}

.stat-gradient-1 { background: var(--gradient-1); }
.stat-gradient-2 { background: var(--gradient-2); }
.stat-gradient-3 { background: var(--gradient-3); }
.stat-gradient-4 { background: var(--gradient-4); }

.stat-icon {
    width: 48px; height: 48px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.stat-icon svg { width: 24px; height: 24px; color: white; }

.stat-info {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.stat-value { font-size: 1.75rem; font-weight: 800; color: #0f172a; line-height: 1; }
.stat-label { font-size: 0.8rem; color: #64748b; margin-top: 4px; font-weight: 600; }

[class*="stat-gradient-"] .stat-value { color: #ffffff !important; }
[class*="stat-gradient-"] .stat-label { color: rgba(255, 255, 255, 0.9) !important; }
[class*="stat-gradient-"] .stat-icon svg { color: #ffffff; }

.card .stat-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.card .stat-card::before {
    display: none !important;
}
.card .stat-card .stat-value {
    color: #0f172a !important;
}
.card .stat-card .stat-label {
    color: #64748b !important;
}

/* ── Dashboard Layout ──────────────────────────────────────────────────── */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.action-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
    transition: var(--transition);
    flex: 1;
    min-width: 160px;
    box-shadow: var(--shadow-sm);
}

.action-btn svg { width: 20px; height: 20px; }
.action-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: white; }

.action-users { background: var(--gradient-1); }
.action-upload { background: var(--gradient-2); }

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

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

.activity-item:last-child { border-bottom: none; }

.activity-dot {
    width: 8px; height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.activity-info { display: flex; flex-direction: column; }
.activity-number { font-weight: 600; font-size: 0.9rem; font-family: 'Courier New', monospace; color: var(--text-primary); }
.activity-meta { font-size: 0.75rem; color: var(--text-muted); }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: 0.4; color: var(--text-muted); }
.empty-state p { font-size: 0.9rem; color: var(--text-secondary); }

/* ═══════════════════════════════════════════════════════════════════════════
   SUB-USER DASHBOARD
   ═══════════════════════════════════════════════════════════════════════════ */
.welcome-card {
    background: var(--gradient-1);
    border-radius: var(--radius-xl);
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    margin-bottom: 32px;
    box-shadow: var(--shadow-md);
}

.welcome-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.08);
}

.welcome-content {
    position: relative;
    z-index: 1;
}

.welcome-content h2 { font-size: 1.5rem; font-weight: 700; color: white; margin-bottom: 8px; }
.welcome-content p { color: rgba(255, 255, 255, 0.9); max-width: 400px; }

.welcome-card .btn { position: relative; z-index: 1; }

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.info-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.info-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.info-icon svg { width: 24px; height: 24px; color: white; }
.info-icon-1 { background: var(--gradient-1); }
.info-icon-2 { background: var(--gradient-2); }
.info-icon-3 { background: var(--gradient-4); }

.info-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.info-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-primary-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
    color: white;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-secondary);
    border: 1px solid var(--bg-glass-border);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--text-primary);
}

.btn-full { width: 100%; justify-content: center; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.form-group select option {
    background: #ffffff;
    color: #0f172a;
}

.form-group input::placeholder, .form-input::placeholder { color: var(--text-muted); }

.form-group input:focus, .form-group select:focus, .form-group textarea:focus,
.form-input:focus, select.form-input:focus, input.form-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-glow);
    background: #ffffff;
}

.form-input, 
select.form-input, 
input.form-input {
    width: 100%;
    height: 42px;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    color: #0f172a;
    font-size: 0.875rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

select.form-input {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 36px;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
}

select.form-input option {
    background: #ffffff;
    color: #0f172a;
    padding: 10px 12px;
}

.filter-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    background: #ffffff;
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.form-help-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* Custom Checkbox Cards */
.dnc-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 12px;
}

@media (max-width: 600px) {
    .dnc-options-grid {
        grid-template-columns: 1fr;
    }
}

.dnc-option-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.dnc-option-card:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.dnc-option-card input[type="checkbox"],
.dnc-option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.dnc-option-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
    background: #ffffff;
}

.dnc-option-checkbox svg {
    width: 14px;
    height: 14px;
    color: white;
    opacity: 0;
    transform: scale(0.5);
    transition: var(--transition);
}

.dnc-option-card input:checked ~ .dnc-option-checkbox {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary-glow);
}

.dnc-option-card input:checked ~ .dnc-option-checkbox svg {
    opacity: 1;
    transform: scale(1);
}

.dnc-option-info h4 {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.dnc-option-info p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin: 0;
}

/* ── Profile Page ──────────────────────────────────────────────────────── */
.profile-layout {
    max-width: 1000px;
    margin: 0 auto;
}

.profile-header-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.profile-avatar-wrapper {
    position: relative;
    width: 72px;
    height: 72px;
    min-width: 72px;
    min-height: 72px;
    cursor: pointer;
    flex-shrink: 0;
}

.profile-avatar-lg {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    border: 2px solid #ffffff;
}

.avatar-edit-overlay {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 26px;
    height: 26px;
    background: #1e293b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    color: #ffffff;
    transition: var(--transition);
}

.avatar-edit-overlay svg {
    width: 13px !important;
    height: 13px !important;
    min-width: 13px !important;
    max-width: 13px !important;
    color: #ffffff !important;
    display: block;
}

.profile-avatar-wrapper:hover .avatar-edit-overlay {
    background: #2563eb;
    transform: scale(1.08);
}

.profile-header-info {
    flex: 1;
}

.profile-header-info h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.profile-header-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0 0 8px 0;
}

.profile-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: auto;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* ── Centered Auth Pages (Login & Register) ────────────────────────────── */
body.auth-body {
    background: #ffffff !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-layout {
    background: #ffffff !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    flex: 1;
}

.auth-flash {
    max-width: 520px;
    margin: 20px auto 0;
    width: 90%;
}

.auth-centered-wrapper {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px 20px;
    background: #ffffff !important;
    width: 100%;
    box-sizing: border-box;
}

.auth-box {
    width: 100%;
    max-width: 390px;
    background: #ffffff !important;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 26px 24px 22px 24px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.03);
    box-sizing: border-box;
}

.auth-box-wide {
    max-width: 440px;
}

.auth-footer {
    background: #ffffff !important;
    border-top: 1px solid #f1f5f9;
    padding: 16px 20px;
    text-align: center;
    margin-top: auto;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

@media (max-width: 540px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .auth-box {
        padding: 22px 16px;
    }
}

.auth-logo-header {
    text-align: center;
    margin-bottom: 18px;
}

.auth-logo-link {
    display: inline-block;
    margin-bottom: 8px;
}

.auth-brand-logo {
    height: 32px;
    width: auto;
}

.auth-logo-header h1 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.auth-logo-header p {
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin: 0;
    line-height: 1.4;
}

.auth-trial-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eff6ff;
    color: var(--accent-primary);
    border: 1px solid rgba(37, 99, 235, 0.2);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.pulse-blue-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
}

.auth-perks-box {
    background: #f8fafc;
    border: 1px solid var(--bg-glass-border);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.perk-item svg {
    width: 14px;
    height: 14px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.auth-bottom-link {
    text-align: center;
    margin-top: 14px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.auth-bottom-link a {
    color: var(--accent-primary);
    font-weight: 600;
}

.auth-bottom-link a:hover {
    text-decoration: underline;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-wrapper input {
    width: 100%;
    padding: 9px 12px 9px 36px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
    box-sizing: border-box;
}

.input-wrapper input::placeholder { color: var(--text-muted); }
.input-wrapper input:focus { border-color: var(--accent-primary); box-shadow: 0 0 0 3px var(--accent-primary-glow); }

.input-icon {
    position: absolute;
    left: 11px;
    width: 15px; height: 15px;
    color: var(--text-muted);
    pointer-events: none;
}

.toggle-pw {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

.toggle-pw svg { width: 18px; height: 18px; }
.toggle-pw:hover { color: var(--text-secondary); }

/* ═══════════════════════════════════════════════════════════════════════════
   MANAGE USERS PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.users-layout { display: flex; flex-direction: column; gap: 24px; }

.user-count {
    font-size: 0.8rem;
    color: var(--accent-primary);
    background: #eff6ff;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.table-body { padding: 0; }

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

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 14px 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--bg-glass-border);
    background: #f8fafc;
}

.data-table td {
    padding: 14px 20px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--bg-glass-border);
    color: var(--text-secondary);
}

.data-table tbody tr { transition: var(--transition); background: #ffffff; }
.data-table tbody tr:hover { background: #f8fafc; }

.row-suspended { opacity: 0.6; }

.user-cell { display: flex; align-items: center; gap: 10px; }

.user-avatar-sm {
    width: 32px; height: 32px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: white;
    flex-shrink: 0;
}

.user-avatar-sm.avatar-suspended { background: #f1f5f9; color: var(--text-muted); }

.user-cell span { font-weight: 600; color: var(--text-primary); }

.email-text { font-family: 'Courier New', monospace; font-size: 0.8rem; color: var(--text-secondary); }

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active { background: #eff6ff; color: var(--accent-primary); }
.status-suspended { background: #fef2f2; color: var(--accent-danger); }

.action-cell { display: flex; gap: 8px; }

.inline-form { display: inline; }

.btn-icon {
    width: 34px; height: 34px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--bg-glass-border);
    background: #ffffff;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon svg { width: 16px; height: 16px; }

.btn-icon:hover { border-color: #cbd5e1; background: #f8fafc; }

.btn-suspend:hover { color: var(--accent-warning); border-color: #fed7aa; background: #fff7ed; }
.btn-activate:hover { color: var(--accent-primary); border-color: #bfdbfe; background: #eff6ff; }
.btn-delete:hover { color: var(--accent-danger); border-color: #fecaca; background: #fef2f2; }
.btn-edit:hover { color: var(--accent-primary); border-color: #bfdbfe; background: #eff6ff; }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }

.row-editing { background: #eff6ff !important; border-left: 3px solid var(--accent-primary); }

.edit-user-card { border-color: var(--accent-primary); }
.edit-user-card .card-header { border-bottom-color: #bfdbfe; }

/* ═══════════════════════════════════════════════════════════════════════════
   UPLOAD PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.upload-layout {
    max-width: 800px;
    margin: 0 auto;
}

.upload-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-xl);
    padding: 40px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

.upload-header {
    text-align: center;
    margin-bottom: 32px;
}

.upload-icon-circle {
    width: 64px; height: 64px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: var(--shadow-sm);
}

.upload-icon-circle svg { width: 28px; height: 28px; color: white; }

.upload-header h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.upload-header p { color: var(--text-secondary); font-size: 0.9rem; }

.drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 24px;
    position: relative;
    background: #f8fafc;
}

.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--accent-primary);
    background: #eff6ff;
}

.drop-zone-icon svg { width: 48px; height: 48px; color: var(--text-muted); margin-bottom: 12px; }
.drop-text { font-size: 1rem; font-weight: 600; margin-bottom: 4px; color: var(--text-primary); }
.drop-subtext { font-size: 0.85rem; color: var(--text-muted); }

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    padding: 16px;
    background: #eff6ff;
    border-radius: var(--radius-sm);
    margin-top: 16px;
    border: 1px solid #bfdbfe;
}

.file-info svg { width: 20px; height: 20px; color: var(--accent-primary); }
.file-info span { font-size: 0.85rem; color: var(--text-primary); font-weight: 600; }
#fileSize { color: var(--text-muted); font-weight: 400; }

.upload-info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.info-card-sm {
    background: var(--bg-card);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.info-card-sm h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.info-card-sm p { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESULTS PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.results-layout { max-width: 1100px; margin: 0 auto; }

.results-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.results-card {
    text-align: center;
    padding: 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--bg-glass-border);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.results-total { background: #f8fafc; border-color: #e2e8f0; }
.results-unique { background: #eff6ff; border-color: #bfdbfe; }
.results-dupes { background: #fef2f2; border-color: #fecaca; }

.results-number { font-size: 2.5rem; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.results-total .results-number { color: var(--text-primary); }
.results-unique .results-number { color: #2563eb; }
.results-dupes .results-number { color: var(--accent-danger); }

.results-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }

.results-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.number-chip {
    padding: 8px 14px;
    background: #f8fafc;
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.number-chip:hover { border-color: var(--accent-primary); color: var(--text-primary); }
.number-more { background: #eff6ff; color: var(--accent-primary); font-weight: 600; font-family: inherit; }

/* ═══════════════════════════════════════════════════════════════════════════
   FLASH MESSAGES
   ═══════════════════════════════════════════════════════════════════════════ */
.flash-container {
    padding: 0 32px;
    margin-top: 16px;
}

.auth-flash {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 0;
    max-width: 400px;
    width: 90%;
}

.flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    animation: slideDown 0.3s ease;
    box-shadow: var(--shadow-md);
}

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

.flash-success { background: #eff6ff; color: #1e3a8a; border: 1px solid #bfdbfe; }
.flash-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.flash-info { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }

.flash-close { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.6; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .dashboard-grid { grid-template-columns: 1fr; }
    .profile-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }

    .welcome-card {
        flex-direction: column;
        text-align: center;
        padding: 28px;
        gap: 16px;
    }
    .welcome-card .btn {
        margin-top: 8px;
        width: 100%;
        max-width: 320px;
    }

    .results-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .content-area { padding: 16px; }
    .top-bar { padding: 0 12px; gap: 8px; }
    .page-title {
        font-size: 1.05rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .top-bar-right {
        margin-left: 8px;
    }
    .badge {
        padding: 3px 8px;
        font-size: 0.7rem;
    }
    
    .stats-grid { grid-template-columns: 1fr 1fr; }

    .profile-header-card {
        flex-direction: column;
        text-align: center;
    }

    .profile-meta { margin-left: 0; }

    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: var(--radius-md);
        border: 1px solid var(--bg-glass-border);
    }
    .table-responsive table {
        min-width: 750px;
    }

    .activity-info {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    .activity-info form {
        width: 100%;
    }
    .activity-info button {
        width: 100%;
        text-align: center;
        padding: 8px 12px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    .action-btn {
        width: 100% !important;
        justify-content: center;
    }
    .action-buttons form {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .upload-card { padding: 20px; }
    .top-bar { padding: 0 8px; }
    .page-title { font-size: 0.95rem; }
    .auth-box { padding: 28px 20px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.stat-card { animation: fadeInUp 0.5s ease forwards; }
.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

.card { animation: fadeInUp 0.5s ease forwards; }

.info-card { animation: fadeInUp 0.5s ease forwards; }
.info-card:nth-child(1) { animation-delay: 0.1s; }
.info-card:nth-child(2) { animation-delay: 0.2s; }
.info-card:nth-child(3) { animation-delay: 0.3s; }

/* ── Footer ───────────────────────────────────────────────────────────── */
.main-footer {
    padding: 24px 32px;
    border-top: 1px solid var(--bg-glass-border);
    background: #ffffff;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
}

.auth-footer {
    position: relative !important;
    margin-top: auto !important;
    width: 100% !important;
    padding: 16px 24px !important;
    background: #ffffff !important;
    border-top: 1px solid #f1f5f9 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    box-sizing: border-box !important;
}

.footer-copyright {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-copyright a {
    color: var(--accent-primary);
    font-weight: 600;
}

.footer-copyright a:hover {
    color: var(--accent-primary-hover);
    text-decoration: underline;
}

/* ── Results Cards ─────────────────────────────────────────────────────── */
.results-dupes-file {
    background: #fff7ed !important;
    border: 1px solid #fed7aa !important;
}

.results-dupes-file .results-number {
    color: var(--accent-warning) !important;
}

.results-dupes {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
}

.results-dupes .results-number {
    color: var(--accent-danger) !important;
}

@media (max-width: 768px) {
    .main-footer, .auth-footer {
        justify-content: center;
        text-align: center;
        padding: 20px;
    }
}
