/* assets/css/admin.css */
:root {
    --bg-dark: #0B1120;
    --card-bg: #FFFFFF;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --primary-blue: #0052FF;
    --primary-hover: #0040DD;
    --border-color: #E2E8F0;
    --input-bg: #F8FAFC;
    --notice-bg: #F1F5F9;
    --notice-text: #334155;
    --circle-color: rgba(0, 82, 255, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body.login-body {
    background-color: var(--bg-dark);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Background gradient circles matching the image */
.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, var(--circle-color) 0%, transparent 70%);
    z-index: 0;
}
.circle-top-right {
    width: 800px;
    height: 800px;
    top: -300px;
    right: -200px;
}
.circle-bottom-left {
    width: 600px;
    height: 600px;
    bottom: -200px;
    left: -150px;
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    padding: 20px;
}

.login-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.brand-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.brand-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
}

.brand-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.5;
}

.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: white;
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: background 0.2s;
}

.btn-google:hover {
    background: #f8f9fa;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 13px;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}
.divider span {
    padding: 0 16px;
}

.input-group {
    position: relative;
    margin-bottom: 16px;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.input-icon-right {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    cursor: pointer;
}

.input-group input {
    width: 100%;
    padding: 12px 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    background: var(--card-bg);
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: var(--primary-blue);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    cursor: pointer;
}

.remember-me input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-blue);
}

.forgot-pwd {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
}

.btn-primary {
    width: 100%;
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-primary svg {
    width: 18px;
    height: 18px;
}

.restricted-notice {
    margin-top: 24px;
    background: var(--notice-bg);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: var(--primary-blue);
}

.restricted-notice svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.restricted-notice div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.restricted-notice strong {
    font-size: 13px;
    color: var(--text-main);
}

.restricted-notice span {
    font-size: 12px;
    color: var(--text-muted);
}
/* --- DASHBOARD LAYOUT STYLES --- */
body.admin-body {
    background-color: var(--input-bg);
    display: block;
    min-height: 100vh;
}

.admin-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: var(--card-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

.sidebar-header h2 {
    font-size: 20px;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px 0;
}

.sidebar-nav a {
    padding: 14px 24px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background: var(--notice-bg);
    color: var(--primary-blue);
    border-right: 4px solid var(--primary-blue);
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
}

.btn-logout {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    color: #ef4444;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: #fef2f2;
}

.main-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

.topbar h1 {
    font-size: 24px;
    margin-bottom: 24px;
    color: var(--text-main);
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.card h3 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.card p {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
}
/* --- TOP NAV & TABLE STYLES (Light Theme) --- */
body.light-admin-body {
    background-color: #F8FAFC;
    color: #1E293B;
}

.top-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #FFFFFF;
    padding: 0 24px;
    height: 64px;
    border-bottom: 1px solid #E2E8F0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-left { display: flex; align-items: center; gap: 12px; }
.brand-logo-small svg { width: 24px; height: 24px; }
.brand-text { font-size: 20px; font-weight: 700; color: #0F172A; }
.badge-admin { background: #E0E7FF; color: #4338CA; font-size: 11px; padding: 4px 8px; border-radius: 12px; font-weight: 600; }

.nav-links { display: flex; gap: 24px; height: 100%; }
.nav-links a { text-decoration: none; color: #64748B; font-size: 14px; font-weight: 500; display: flex; align-items: center; border-bottom: 2px solid transparent; }
.nav-links a:hover { color: #0F172A; }
.nav-links a.active { color: #0052FF; border-bottom-color: #0052FF; }

.nav-right { display: flex; align-items: center; gap: 20px; }
.icon-btn { background: none; border: none; color: #64748B; position: relative; cursor: pointer; }
.notification-dot { position: absolute; top: 0; right: 2px; width: 8px; height: 8px; background: #EF4444; border-radius: 50%; border: 2px solid #FFF; }
.user-profile { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; cursor: pointer; }
.user-profile .avatar { width: 32px; height: 32px; border-radius: 50%; }

.page-container { max-width: 1400px; margin: 0 auto; padding: 32px 24px; }

.page-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.page-title { font-size: 24px; font-weight: 700; color: #0F172A; margin-bottom: 4px; }
.page-subtitle { color: #64748B; font-size: 14px; }

.stats-row { display: flex; gap: 16px; background: #FFF; padding: 12px; border-radius: 12px; border: 1px solid #E2E8F0; }
.stat-box { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-right: 1px solid #E2E8F0; }
.stat-box:last-child { border-right: none; }
.stat-icon { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.blue-bg { background: #EFF6FF; } .green-bg { background: #F0FDF4; } .red-bg { background: #FEF2F2; }
.stat-label { font-size: 12px; color: #64748B; margin-bottom: 2px; }
.stat-value { font-size: 18px; font-weight: 700; color: #0F172A; }

.table-controls { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; }
.filters { display: flex; gap: 16px; }
.filter-group label { display: block; font-size: 12px; font-weight: 600; color: #0F172A; margin-bottom: 6px; }
.filter-group select { padding: 10px 32px 10px 12px; border: 1px solid #E2E8F0; border-radius: 8px; background: #FFF; color: #475569; font-size: 14px; outline: none; appearance: none; min-width: 160px; }

.actions { display: flex; gap: 12px; }
.search-box { position: relative; }
.search-box svg { position: absolute; left: 12px; top: 11px; width: 16px; height: 16px; color: #94A3B8; }
.search-box input { padding: 10px 12px 10px 36px; border: 1px solid #E2E8F0; border-radius: 8px; width: 240px; font-size: 14px; outline: none; }
.search-box input:focus { border-color: #0052FF; }

.table-container { background: #FFF; border: 1px solid #E2E8F0; border-radius: 12px; overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { background: #F8FAFC; padding: 14px 16px; font-size: 13px; font-weight: 600; color: #475569; border-bottom: 1px solid #E2E8F0; }
.data-table td { padding: 16px; font-size: 14px; color: #1E293B; border-bottom: 1px solid #F1F5F9; vertical-align: middle; }
.data-table tr:hover td { background: #F8FAFC; }

/* Badges for Subject, Difficulty, Status */
.badge { padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; display: inline-block; }
.badge-gk { background: #DCFCE7; color: #166534; }
.badge-reasoning { background: #F3E8FF; color: #6B21A8; }
.badge-maths { background: #DBEAFE; color: #1E40AF; }
.badge-english { background: #FCE7F3; color: #9D174D; }
.badge-hindi { background: #FFEDD5; color: #9A3412; }

.badge-easy { background: #DCFCE7; color: #166534; }
.badge-medium { background: #FEF9C3; color: #854D0E; }
.badge-hard { background: #FEE2E2; color: #991B1B; }

.badge-active { background: #DCFCE7; color: #166534; }
.badge-inactive { background: #FEE2E2; color: #991B1B; }

.action-btns { display: flex; gap: 8px; justify-content: flex-end; }
.btn-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 6px; border: 1px solid transparent; background: none; cursor: pointer; color: #64748B; transition: all 0.2s; }
.btn-icon.edit:hover { background: #EFF6FF; color: #0052FF; }
.btn-icon.delete:hover { background: #FEF2F2; color: #EF4444; }

.pagination-footer { padding: 16px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #E2E8F0; }
.showing-text { font-size: 13px; color: #64748B; }
.pagination-controls { display: flex; gap: 4px; align-items: center; }
.page-btn { padding: 6px 12px; border: 1px solid #E2E8F0; background: #FFF; border-radius: 6px; cursor: pointer; color: #475569; font-size: 13px; }
.page-btn.active { background: #0052FF; color: #FFF; border-color: #0052FF; }
.page-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.page-dots { color: #94A3B8; }
/* --- QUIZZES EDITOR STYLES --- */
.mb-24 { margin-bottom: 24px; }

.quiz-editor-section {
    background: #FFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 24px;
    display: block; /* Hidden state managed by JS class normally */
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 16px;
    border-bottom: 1px solid #E2E8F0;
    margin-bottom: 24px;
}
.editor-header h2 { font-size: 20px; color: #0F172A; }
.editor-header p { font-size: 14px; color: #64748B; margin-top: 4px; }
.editor-actions { display: flex; gap: 12px; }

.btn-secondary {
    padding: 10px 16px;
    background: #FFF;
    border: 1px solid #CBD5E1;
    color: #475569;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.btn-primary {
    padding: 10px 16px;
    background: #0052FF;
    border: none;
    color: #FFF;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.quiz-form-split {
    display: flex;
    gap: 32px;
}

.form-left { flex: 1; display: flex; flex-direction: column; gap: 20px; }
.form-right { flex: 1.5; background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 12px; padding: 20px; display: flex; flex-direction: column; }

.input-group-col { display: flex; flex-direction: column; gap: 6px; }
.input-group-col label { font-size: 13px; font-weight: 600; color: #1E293B; }
.req { color: #EF4444; }
.input-group-col input, .input-group-col select, .input-group-col textarea {
    padding: 10px 12px; border: 1px solid #CBD5E1; border-radius: 8px; font-size: 14px; outline: none;
}
.input-group-col input:focus, .input-group-col textarea:focus { border-color: #0052FF; }

.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* Toggle Switch */
.premium-toggle-box {
    display: flex; gap: 16px; align-items: center; background: #FFFBF1; padding: 16px; border: 1px solid #FEF08A; border-radius: 8px;
}
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #CBD5E1; transition: .4s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #0052FF; }
input:checked + .slider:before { transform: translateX(20px); }

/* Selection Area */
.selection-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.selection-header h3 { font-size: 16px; color: #0F172A; }
.selection-header p { font-size: 13px; color: #64748B; }
.selected-count { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.badge-blue { background: #0052FF; color: #FFF; padding: 4px 10px; border-radius: 12px; font-size: 12px; }

.selection-filters { display: flex; gap: 12px; margin-bottom: 16px; }
.selection-filters select { padding: 10px; border: 1px solid #CBD5E1; border-radius: 8px; outline: none; }

.question-list-container {
    flex: 1; max-height: 400px; overflow-y: auto; background: #FFF; border: 1px solid #E2E8F0; border-radius: 8px;
}
.small-table td { padding: 12px 16px; font-size: 13px; }
/* --- USERS PAGE STYLES --- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card { background: #FFF; border: 1px solid #E2E8F0; border-radius: 12px; padding: 20px; display: flex; align-items: center; gap: 16px; }
.yellow-bg { background: #FEF3C7; }

.user-avatar-sm { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.text-link { color: #0052FF; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.badge-premium { background: #DCFCE7; color: #166534; padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.badge-free { background: #EFF6FF; color: #1E40AF; padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 500; }

.btn-grant { padding: 6px 12px; border: 1px solid #0052FF; color: #0052FF; background: #FFF; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn-grant:hover { background: #EFF6FF; }

.btn-revoke { padding: 6px 12px; border: 1px solid #EF4444; color: #EF4444; background: #FFF; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn-revoke:hover { background: #FEF2F2; }

.btn-view { padding: 6px 12px; border: 1px solid #CBD5E1; color: #0052FF; background: #FFF; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; }
.btn-view:hover { background: #F8FAFC; }
/* --- TRANSACTIONS PAGE STYLES --- */
.purple-bg { background: #F3E8FF; }

.trend-up { font-size: 12px; font-weight: 600; color: #16A34A; margin-top: 4px; }
.trend-down { font-size: 12px; font-weight: 600; color: #EF4444; margin-top: 4px; }

.date-picker-box {
    display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid #CBD5E1; 
    border-radius: 8px; background: #FFF; font-size: 14px; font-weight: 500; color: #475569; cursor: pointer;
}

.copy-icon {
    display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; 
    color: #94A3B8; cursor: pointer; margin-left: 4px; transition: color 0.2s;
}
.copy-icon:hover { color: #0052FF; }

.txn-id-text { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 13px; color: #475569; }

.badge-success { background: #DCFCE7; color: #166534; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.badge-failed { background: #FEE2E2; color: #991B1B; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.badge-pending { background: #FEF3C7; color: #92400E; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }

.user-cell { display: flex; align-items: center; gap: 12px; }
.user-info { display: flex; flex-direction: column; }
.user-info strong { font-size: 14px; color: #1E293B; font-weight: 500; }
.user-info span { font-size: 12px; color: #64748B; }
/* --- NOTIFICATIONS PAGE STYLES --- */
.notification-form-section { background: #FFF; border: 1px solid #E2E8F0; border-radius: 12px; padding: 24px; }
.notification-grid { display: flex; gap: 32px; }
.notification-grid .form-left { flex: 1; }
.notification-grid .form-right { flex: 1; display: flex; flex-direction: column; }

.char-count { text-align: right; font-size: 12px; color: #64748B; margin-top: 4px; }

/* Custom Checkbox with text block */
.custom-checkbox { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.custom-checkbox input { width: 18px; height: 18px; margin-top: 2px; accent-color: #0052FF; cursor: pointer; }
.chk-content { display: flex; flex-direction: column; gap: 2px; }
.chk-content strong { font-size: 14px; color: #1E293B; font-weight: 500; }
.chk-content span { font-size: 12px; color: #64748B; }

/* Preview Panel */
.preview-panel { background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 12px; padding: 24px; }
.preview-header { display: flex; gap: 12px; margin-bottom: 20px; align-items: flex-start; }
.preview-header strong { display: block; font-size: 15px; color: #0F172A; margin-bottom: 2px; }
.preview-header p { font-size: 13px; color: #64748B; }

.mock-notification { background: #FFF; border-radius: 16px; padding: 16px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06); border: 1px solid #E2E8F0; }
.mock-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.mock-app-info { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: #475569; }
.mock-icon { width: 20px; height: 20px; background: #0052FF; border-radius: 4px; display: flex; align-items: center; justify-content: center; }
.mock-icon svg { width: 14px; height: 14px; }
.mock-time { font-size: 11px; color: #94A3B8; }
.mock-title { font-size: 14px; font-weight: 600; color: #1E293B; margin-bottom: 4px; }
.mock-text { font-size: 13px; color: #475569; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Audience Badges */
.badge-audience-all { background: #EFF6FF; color: #1E40AF; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.badge-audience-free { background: #DCFCE7; color: #166534; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.badge-audience-premium { background: #F3E8FF; color: #6B21A8; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.badge-audience-active { background: #FEF3C7; color: #92400E; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
