:root {
    --bg-primary: #0a0e17; /* Midnight Blue */
    --bg-secondary: #111827;
    --accent-gold: #f59e0b;
    --accent-gold-glow: rgba(245, 158, 11, 0.3);
    --accent-cyan: #06b6d4;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --success: #10b981;
    --danger: #ef4444;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
}

/* Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar — fixed/floating */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.logo-circle {
    width: 48px;
    height: 48px;
    background: var(--glass-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.logo-circle img {
    width: 32px;
    height: auto;
}

.brand h2 {
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    list-style: none;
    flex-grow: 1;
}

.nav-links li {
    padding: 1rem 1.2rem;
    margin-bottom: 0.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-links li a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.nav-links li:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-links li.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--accent-gold);
    box-shadow: 0 4px 20px var(--accent-gold-glow);
}

.logout-btn {
    padding: 1rem;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: color 0.3s ease;
}

.logout-btn:hover {
    color: var(--danger);
}

/* Main Content */
.main-content {
    flex-grow: 1;
    margin-left: 280px;
    padding: 2.5rem 3rem;
    overflow-y: auto;
    min-height: 100vh;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
    animation: fadeInDown 0.6s ease;
}

.welcome-text h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.welcome-text h1 span {
    color: var(--accent-gold);
}

.welcome-text p {
    color: var(--text-secondary);
}

/* Toggle Switch */
.attendance-toggle-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.toggle-label {
    font-weight: 500;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--danger);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--success);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.status-badge {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--danger);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-badge.present {
    color: var(--success);
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    animation: fadeInUp 0.8s ease backwards;
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

.span-2 {
    grid-column: span 2;
}

.dual-attendance-wrap {
    overflow-x: visible;
    width: 100%;
}

.dual-row {
    display: grid;
    grid-template-columns: minmax(86px, 0.9fr) minmax(112px, 1.15fr) minmax(92px, 0.95fr) minmax(92px, 0.95fr);
    gap: 8px;
    align-items: center;
    padding: 0.72rem 0.45rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    min-width: 0;
}

.dual-head {
    padding-top: 0.45rem;
    padding-bottom: 0.48rem;
    color: rgba(226, 232, 240, 0.45);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.dual-row:not(.dual-head) {
    color: rgba(248, 250, 252, 0.82);
    font-size: 0.84rem;
}

.dual-row small {
    display: block;
    margin-top: 4px;
    color: rgba(226, 232, 240, 0.48);
    font-size: 0.72rem;
    line-height: 1.25;
}

.muted-cell {
    color: rgba(226, 232, 240, 0.42);
    font-size: 0.78rem;
}

.dual-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    border: 0;
}

.dual-badge-btn {
    cursor: pointer;
    font-family: inherit;
}

.dual-badge-btn:hover {
    filter: brightness(1.18);
    transform: translateY(-1px);
}

.dual-note-preview {
    display: block;
    margin-top: 5px;
    color: rgba(226, 232, 240, 0.48);
    font-size: 0.7rem;
}

.dual-badge.self { color: #bae6fd; background: rgba(14, 165, 233, 0.15); }
.dual-badge.official-ok,
.dual-badge.match,
.dual-badge.resolved { color: #86efac; background: rgba(34, 197, 94, 0.15); }
.dual-badge.official-bad,
.dual-badge.absent,
.dual-badge.rejected { color: #fca5a5; background: rgba(239, 68, 68, 0.16); }
.dual-badge.official-info,
.dual-badge.info { color: #c4b5fd; background: rgba(139, 92, 246, 0.16); }
.dual-badge.pending,
.dual-badge.query,
.dual-badge.review,
.dual-badge.open { color: #fde68a; background: rgba(245, 158, 11, 0.16); }

.raise-query-btn {
    border: 1px solid rgba(245, 158, 11, 0.42);
    background: rgba(245, 158, 11, 0.13);
    color: #fde68a;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.74rem;
    font-weight: 800;
    cursor: pointer;
}

.raise-query-btn:hover {
    background: rgba(245, 158, 11, 0.24);
    color: #fff7ed;
}

.teacher-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.teacher-detail-modal.active {
    display: flex;
}

.teacher-detail-card {
    width: min(92vw, 460px);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(8, 13, 23, 0.96));
    border: 1px solid rgba(148, 163, 184, 0.20);
    border-radius: 22px;
    padding: 1.35rem;
    color: #f8fafc;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    position: relative;
}

.teacher-detail-card h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.teacher-detail-card h3 i {
    color: var(--accent-gold);
}

.teacher-detail-close {
    position: absolute;
    top: 0.85rem;
    right: 0.95rem;
    border: 0;
    background: transparent;
    color: rgba(226, 232, 240, 0.65);
    font-size: 1.45rem;
    cursor: pointer;
}

.teacher-detail-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 0.7rem;
    padding: 0.65rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.teacher-detail-row span {
    color: rgba(226, 232, 240, 0.52);
    font-size: 0.78rem;
}

.teacher-detail-row strong {
    color: rgba(248, 250, 252, 0.9);
    font-size: 0.85rem;
    line-height: 1.45;
    word-break: break-word;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-header h3 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.class-badge {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Stats */
.stats-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-box {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid var(--glass-border);
}

.stat-box.total i {
    font-size: 2.5rem;
    color: var(--accent-gold);
}

.stat-box.secondary {
    padding: 1rem;
    flex: 1;
    gap: 1rem;
}

.stat-box.boys i { color: #3b82f6; }
.stat-box.girls i { color: #ec4899; }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stat-row {
    display: flex;
    gap: 1rem;
}

/* Quick Actions */
.actions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.action-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.2rem;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    text-decoration: none;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.action-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--accent-cyan);
}

/* Absentees List */
.btn-primary {
    background: var(--accent-gold);
    color: #000;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.btn-primary:hover {
    background: #d97706;
}

.absentee-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.absentee-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.student-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.details h4 {
    font-size: 1rem;
    font-weight: 500;
}

.details p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-outline.sent {
    border-color: var(--success);
    color: var(--success);
    pointer-events: none;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 50% 28%, rgba(6, 182, 212, 0.10), transparent 34%),
        rgba(2, 6, 23, 0.74);
    backdrop-filter: blur(10px) saturate(115%);
    -webkit-backdrop-filter: blur(10px) saturate(115%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.glass-modal {
    background:
        linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(8, 13, 23, 0.92));
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    box-shadow:
        0 28px 80px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .glass-modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-header h3 {
    color: #f8fafc;
    letter-spacing: 0.01em;
}

.modal-header h3 i {
    color: var(--accent-gold);
    text-shadow: 0 0 14px rgba(245, 158, 11, 0.25);
}

.close-modal {
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: color 0.2s ease, transform 0.2s ease;
}

.close-modal:hover {
    color: var(--text-primary);
    transform: scale(1.08);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 600;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: #f8fafc;
    font-family: 'Inter', sans-serif;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: #7b8797;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: rgba(15, 23, 42, 0.88);
    box-shadow:
        0 0 0 3px rgba(6, 182, 212, 0.13),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.input-group select {
    color-scheme: dark;
}

.input-group select option {
    background: #0f172a;
    color: #f8fafc;
}

.input-group input[type="date"] {
    color-scheme: dark;
    padding-right: 3.25rem;
}

.input-group input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    width: 1.2rem;
    height: 1.2rem;
    padding: 0.45rem;
    border-radius: 11px;
    background-color: rgba(245, 158, 11, 0.26);
    border: 1px solid rgba(245, 158, 11, 0.48);
    filter: invert(1) sepia(1) saturate(2) hue-rotate(340deg) brightness(1.1);
    box-shadow:
        0 0 0 3px rgba(245, 158, 11, 0.08),
        0 0 18px rgba(245, 158, 11, 0.26);
    opacity: 1;
}

.input-group input[type="date"]::-webkit-calendar-picker-indicator:hover {
    background-color: rgba(245, 158, 11, 0.42);
    border-color: rgba(251, 191, 36, 0.72);
    box-shadow:
        0 0 0 4px rgba(245, 158, 11, 0.12),
        0 0 22px rgba(245, 158, 11, 0.34);
}

.glass-modal .btn-primary {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 56%, #d97706 100%);
    color: #111827;
    font-weight: 800;
    box-shadow:
        0 12px 28px rgba(245, 158, 11, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.glass-modal .btn-primary:hover {
    background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 54%, #b45309 100%);
    transform: translateY(-1px);
}

.full-width {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    margin-top: 1rem;
}

/* Floating Quick Menu */
.floating-menu {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-right: none;
    border-radius: 40px 0 0 40px;
    padding: 1.5rem 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    z-index: 99;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
}

.float-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.float-btn:hover {
    transform: scale(1.15) translateX(-5px);
    border-color: rgba(255, 255, 255, 0.6);
}

.float-btn.home-btn { background: #1e3a8a; } /* Dark Blue */
.float-btn.attendance-btn { background: linear-gradient(135deg, #f59e0b, #ea580c); } /* Orange */
.float-btn.report-btn { background: linear-gradient(135deg, #eab308, #ca8a04); } /* Yellow/Gold */
.float-btn.support-btn { background: #25D366; } /* WhatsApp Green */

/* Mobile Bottom Nav */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: 0.8rem 1rem;
    justify-content: space-around;
    z-index: 100;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-bottom-nav .nav-item:hover {
    color: var(--text-primary);
}

.mobile-bottom-nav .nav-item.active {
    color: var(--accent-gold);
}

.mobile-bottom-nav .nav-item.active i {
    text-shadow: 0 0 10px var(--accent-gold-glow);
}

.mobile-bottom-nav .nav-item i {
    font-size: 1.3rem;
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Responsive */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: 1fr 1fr;
    }
    .quick-actions {
        grid-column: span 2;
    }
    .actions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }
    .sidebar {
        display: none; /* Hide top/side nav on mobile */
    }
    .main-content {
        margin-left: 0;
        padding: 1.5rem 1rem 6rem 1rem; /* Extra padding at bottom to clear the fixed nav */
    }
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    .attendance-toggle-container {
        width: 100%;
        justify-content: space-between;
    }
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .quick-actions, .span-2 {
        grid-column: span 1;
    }
    .actions-grid {
        grid-template-columns: 1fr;
    }
    .mobile-bottom-nav {
        display: flex; /* Show bottom nav on mobile */
    }
    .floating-menu {
        display: none; /* Hide on mobile screens */
    }

    .dual-attendance-wrap {
        overflow-x: visible;
    }

    .dual-head {
        display: none;
    }

    .dual-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px 12px;
        padding: 0.85rem 0.75rem;
        border: 1px solid rgba(255, 255, 255, 0.07);
        border-radius: 14px;
        background: rgba(15, 23, 42, 0.28);
        margin-bottom: 0.7rem;
    }

    .dual-row span {
        min-width: 0;
    }

    .dual-row > span:nth-child(1)::before,
    .dual-row > span:nth-child(2)::before,
    .dual-row > span:nth-child(3)::before,
    .dual-row > span:nth-child(4)::before {
        display: block;
        margin-bottom: 4px;
        color: rgba(226, 232, 240, 0.44);
        font-size: 0.64rem;
        font-weight: 800;
        letter-spacing: 0.07em;
        text-transform: uppercase;
    }

    .dual-row > span:nth-child(1)::before { content: "Date"; }
    .dual-row > span:nth-child(2)::before { content: "Self"; }
    .dual-row > span:nth-child(3)::before { content: "Official"; }
    .dual-row > span:nth-child(4)::before { content: "Resolution"; }

    .dual-badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}

/* ============================================================
   PARENT ALERT MODAL — P2-B
   ============================================================ */

/* Reason chip grid */
.alert-reason-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 6px;
}

.reason-chip {
    display: block;
    cursor: pointer;
}

.reason-chip input[type="radio"] {
    display: none;
}

.reason-chip span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: .82rem;
    font-weight: 500;
    border: 1.5px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.04);
    cursor: pointer;
    transition: all .2s;
    width: 100%;
    color: rgba(255,255,255,.7);
    user-select: none;
}

.reason-chip input:checked + span {
    border-color: #25D366;
    background: rgba(37,211,102,.14);
    color: #4ade80;
}

.reason-chip span:hover {
    border-color: rgba(37,211,102,.4);
    background: rgba(37,211,102,.07);
}

.alert-custom-message textarea {
    min-height: 88px;
    resize: vertical;
    line-height: 1.45;
}

/* Send button — WhatsApp green */
.btn-wa-send {
    background: linear-gradient(135deg, #25D366, #128C7E) !important;
    color: #fff !important;
    border: none !important;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.btn-wa-send:hover {
    opacity: .92;
    transform: translateY(-1px);
}

/* Alert log widget */
.alert-log-empty {
    padding: 1.5rem 1rem;
    text-align: center;
    opacity: .4;
    font-size: .85rem;
}

.alert-log-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: .65rem .9rem;
    border-bottom: 1px solid rgba(255,255,255,.05);
    font-size: .82rem;
}

.alert-log-icon {
    color: #25D366;
    font-size: 1rem;
    margin-top: 1px;
    flex-shrink: 0;
}

.alert-log-info strong {
    display: block;
    color: var(--text-primary);
    font-size: .83rem;
}

.alert-log-info small {
    color: var(--text-secondary);
    font-size: .74rem;
}

.alert-log-reason {
    margin-left: auto;
    font-size: .72rem;
    background: rgba(37,211,102,.12);
    color: #4ade80;
    border-radius: 20px;
    padding: 2px 9px;
    white-space: nowrap;
    align-self: center;
}

/* New Alert button in widget */
.btn-new-alert {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: 10px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
}

.btn-new-alert:hover {
    opacity: .9;
    transform: translateY(-1px);
}

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

    .alert-reason-grid .reason-chip {
        grid-column: auto !important;
    }
}
