/* ===================================================================
   AEH Pro — Public/Frontend Professional UI
   =================================================================== */
:root {
    --aeh-primary: #4f46e5;
    --aeh-primary-dark: #4338ca;
    --aeh-shadow: 0 4px 6px rgba(0,0,0,.05), 0 10px 15px rgba(0,0,0,.08);
    --aeh-shadow-lg: 0 20px 40px rgba(79,70,229,.15);
    --aeh-radius: 12px;
}

/* Container tweaks */
.container.py-4, .container.py-5 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Stat cards */
.aeh-card {
    padding: 22px;
    border-radius: var(--aeh-radius);
    color: #fff;
    margin-bottom: 1rem;
    box-shadow: var(--aeh-shadow);
    position: relative;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.aeh-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--aeh-shadow-lg);
}
.aeh-card::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,.1);
    border-radius: 50%;
    pointer-events: none;
}
.aeh-card .aeh-n {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.02em;
    position: relative;
    z-index: 1;
}
.aeh-card > div:last-child {
    font-size: 14px;
    font-weight: 500;
    opacity: .95;
    margin-top: 4px;
    position: relative;
    z-index: 1;
}
.aeh-c1 { background: linear-gradient(135deg, #667eea, #764ba2); }
.aeh-c2 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.aeh-c3 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.aeh-c4 { background: linear-gradient(135deg, #43e97b, #38f9d7); }

/* Frontend login shortcode box */
.aeh-login-box {
    max-width: 440px;
    margin: 40px auto;
    background: #fff;
    padding: 36px 32px;
    border-radius: 18px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
    border: 1px solid rgba(0,0,0,.05);
}
.aeh-login-box h3 {
    text-align: center;
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: 8px;
    color: #1f2937;
}
.aeh-login-box .form-control {
    padding: 12px 14px;
    font-size: 15px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.aeh-login-box .form-control:focus {
    border-color: var(--aeh-primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.15);
    outline: none;
}
.aeh-login-box .btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    padding: 12px 20px;
    font-weight: 700;
    border-radius: 10px;
    width: 100%;
    box-shadow: 0 4px 14px rgba(102,126,234,.4);
    transition: transform .15s ease, box-shadow .15s ease;
}
.aeh-login-box .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(102,126,234,.5);
}

/* Welcome banner */
h2 {
    font-weight: 800;
    letter-spacing: -.02em;
    color: #1f2937;
    margin-top: 8px;
}

/* Cards */
.card {
    border: 1px solid rgba(0,0,0,.05) !important;
    border-radius: var(--aeh-radius) !important;
    box-shadow: var(--aeh-shadow) !important;
    margin-bottom: 20px;
}
.card-header {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9) !important;
    border-bottom: 1px solid #e5e7eb !important;
    font-weight: 700 !important;
    padding: 14px 20px !important;
    border-radius: var(--aeh-radius) var(--aeh-radius) 0 0 !important;
}
.card-body { padding: 20px !important; }

/* Tabs */
.nav-tabs {
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 0;
}
.nav-tabs .nav-link {
    border: none !important;
    color: #6b7280 !important;
    font-weight: 600 !important;
    padding: 12px 22px !important;
    border-radius: 10px 10px 0 0 !important;
    transition: color .15s ease, background .15s ease;
}
.nav-tabs .nav-link:hover {
    color: var(--aeh-primary) !important;
    background: #f8fafc !important;
}
.nav-tabs .nav-link.active {
    color: var(--aeh-primary) !important;
    background: #fff !important;
    border-bottom: 3px solid var(--aeh-primary) !important;
}
.tab-content.border {
    border-color: #e5e7eb !important;
    border-radius: 0 var(--aeh-radius) var(--aeh-radius) var(--aeh-radius);
    background: #fff;
    padding: 24px !important;
}

/* Buttons */
.btn {
    border-radius: 10px !important;
    font-weight: 600 !important;
    padding: 8px 18px !important;
    transition: transform .15s ease, box-shadow .15s ease !important;
    border: none !important;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--aeh-shadow); }
.btn-primary { background: linear-gradient(135deg, #4f46e5, #4338ca) !important; color: #fff !important; }
.btn-success { background: linear-gradient(135deg, #10b981, #059669) !important; color: #fff !important; }
.btn-warning { background: linear-gradient(135deg, #f59e0b, #d97706) !important; color: #fff !important; }
.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626) !important; color: #fff !important; }

/* Form-controls */
.form-control, .form-select {
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 8px;
    border: 1.5px solid #e5e7eb;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--aeh-primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.15);
    outline: none;
}

/* Badges */
.badge {
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    letter-spacing: .02em;
}

/* Alerts */
.alert {
    border-radius: var(--aeh-radius) !important;
    border: none !important;
    padding: 14px 18px !important;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.alert-success { background: #d1fae5 !important; color: #065f46 !important; }
.alert-danger  { background: #fee2e2 !important; color: #991b1b !important; }
.alert-warning { background: #fef3c7 !important; color: #92400e !important; }
.alert-info    { background: #dbeafe !important; color: #1e40af !important; }

/* Tables */
.table {
    background: #fff;
    border-radius: var(--aeh-radius);
    overflow: hidden;
    box-shadow: var(--aeh-shadow);
}
.table thead {
    background: linear-gradient(180deg, #f9fafb, #f3f4f6);
}
.table thead th {
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .04em;
    padding: 12px 14px;
    border-bottom: 2px solid #e5e7eb !important;
}
.table tbody td { padding: 12px 14px; }
.table-striped tbody tr:nth-of-type(odd) { background: #fafbfc; }
.table tbody tr:hover { background: #f8fafc; }

/* Attendance calendar day cells */
.text-center[style*="width:44px"] {
    padding: 4px 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    transition: transform .15s ease;
}
.text-center[style*="width:44px"]:hover {
    transform: scale(1.08);
    box-shadow: var(--aeh-shadow);
    z-index: 1;
    position: relative;
}

/* Ongoing exam banner */
.card-header.bg-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #fff !important;
    border-bottom: none !important;
}

/* Exam questions in take-exam view */
.form-check {
    padding: 10px 14px 10px 42px;
    border-radius: 8px;
    border: 1.5px solid transparent;
    transition: background .15s ease, border-color .15s ease;
    margin-bottom: 6px;
    cursor: pointer;
}
.form-check:hover { background: #f8fafc; border-color: #e5e7eb; }
.form-check-input:checked ~ .form-check-label { font-weight: 700; color: var(--aeh-primary); }
.form-check:has(input:checked) { background: rgba(79,70,229,.06); border-color: var(--aeh-primary); }

/* Timer badge */
.badge.bg-danger.fs-5 {
    padding: 10px 18px !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(239,68,68,.35);
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .aeh-login-box { margin: 20px 16px; padding: 28px 20px; }
    .nav-tabs .nav-link { padding: 8px 14px !important; font-size: 13px; }
    .tab-content.border { padding: 16px !important; }
}
