/* ==========================================================================
   Q-TRACK PORTAL IBU BAPA & MURID - 3D ROYAL CYBER-HERITAGE (v4.3.0)
   Inspirasi Visual: Deep Space Royal Navy, Metallic Gold & Hologram Cyan
   ========================================================================== */

body {
    font-family: 'Plus Jakarta Sans', 'Fredoka', system-ui, sans-serif;
    background-color: #020817;
    background-image: 
        radial-gradient(circle at 50% 10%, rgba(245, 158, 11, 0.18) 0%, transparent 40%),
        radial-gradient(circle at 15% 25%, rgba(0, 210, 255, 0.2) 0%, transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(217, 119, 6, 0.16) 0%, transparent 40%),
        radial-gradient(2px 2px at 30px 40px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 120px 180px, #fde68a, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 280px 90px, #67e8f9, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 350px 270px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 480px 210px, #fbbf24, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 640px 340px, #38bdf8, rgba(0,0,0,0)),
        linear-gradient(180deg, #020a1c 0%, #051430 50%, #020713 100%);
    background-size: 100% 100%, 100% 100%, 100% 100%,
                     320px 320px, 420px 420px, 360px 360px, 460px 460px, 520px 520px, 560px 560px,
                     100% 100%;
    background-attachment: fixed;
    color: #f8fafc;
    -webkit-tap-highlight-color: transparent;
}

/* OPTIMASI MESRA PERANTI & SEMBUNYIKAN SCROLLBAR */
html, body {
    overflow-x: hidden;
    width: 100%;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Elak iOS Safari auto-zoom pada input & butang */
input, select, textarea, button {
    touch-action: manipulation;
    font-size: 16px !important;
}
@media (min-width: 768px) {
    input, select, textarea, button {
        font-size: 14px !important;
    }
}

.overflow-x-auto {
    -webkit-overflow-scrolling: touch;
}

.islamic-font {
    font-family: 'Amiri', serif;
}

/* --- TEMA 3D ROYAL CYBER CRYSTAL (MENGGANTIKAN KARTUN NEU-BRUTALISM) --- */
.bg-white, .glass-card, .bg-emerald-50, .bg-blue-50, .bg-gray-50, .bg-orange-50 {
    background: linear-gradient(165deg, rgba(8, 30, 62, 0.92) 0%, rgba(3, 16, 38, 0.96) 100%) !important;
    border: 1.8px solid rgba(0, 210, 255, 0.45) !important;
    border-radius: 24px !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75), 
                0 0 25px rgba(0, 210, 255, 0.15),
                inset 0 1px 2px rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    color: #f8fafc !important;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

/* Cahaya Kilauan Atas Kad 3D */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 210, 255, 0.6), transparent);
    pointer-events: none;
}

header, nav {
    border-bottom: 1.5px solid rgba(52, 211, 153, 0.4) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(16, 185, 129, 0.2) !important;
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.95) 0%, rgba(4, 47, 46, 0.98) 100%) !important;
    backdrop-filter: blur(16px) !important;
}

/* Butang 3D Timbul (*Elevated 3D Buttons*) */
button, .btn {
    border: 1.5px solid rgba(52, 211, 153, 0.5) !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 60%, #047857 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4), 
                0 2px 4px rgba(0, 0, 0, 0.4), 
                inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    font-weight: 800 !important;
    cursor: pointer;
}

button:hover, .btn:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.55), 
                0 0 15px rgba(52, 211, 153, 0.4) !important;
}

button:active, .btn:active {
    transform: translateY(1px) scale(0.98) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
}

/* Kotak Input, Dropdown & Textarea 3D Lekuk (*Inner Depth*) */
input, select, textarea {
    border: 1.5px solid rgba(0, 210, 255, 0.4) !important;
    border-radius: 14px !important;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.65), 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important;
    font-weight: 700 !important;
    background-color: rgba(4, 20, 48, 0.95) !important;
    color: #ffffff !important;
    color-scheme: dark !important;
    transition: all 0.25s ease;
}

select option {
    background-color: #03122c !important;
    color: #ffffff !important;
}

input:focus, select:focus, textarea:focus {
    outline: none !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 16px rgba(0, 210, 255, 0.5), inset 0 1px 3px rgba(0, 0, 0, 0.6) !important;
    transform: translateY(-1px);
}

/* Teks & Label Kontras 3D */
label {
    color: #fde68a !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px;
}

h2, h3, h4 {
    color: #38bdf8 !important;
    text-shadow: 0 0 12px rgba(0, 210, 255, 0.35);
}

/* Jadual 3D */
table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 1.5px solid rgba(0, 210, 255, 0.4) !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6) !important;
    background: rgba(3, 16, 40, 0.95) !important;
    width: 100% !important;
    color: #f8fafc !important;
}

thead {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    color: #ffffff !important;
}

th, td {
    border-bottom: 1px solid rgba(0, 210, 255, 0.2) !important;
    border-right: 1px solid rgba(0, 210, 255, 0.2) !important;
}

th:last-child, td:last-child {
    border-right: none !important;
}

tr:last-child td {
    border-bottom: none !important;
}

/* 3D Cyber Row & Hover Styling - Menjamin Tarikh & Teks Sentiasa Jelas */
table tbody tr,
tr.portal-record-row {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: transparent !important;
}

/* Mematikan kesan putih Tailwind dan menggantikannya dengan 3D Sapphire Glow */
table tbody tr:hover,
table tbody tr.hover\:bg-gray-50:hover,
tr.portal-record-row:hover {
    background: linear-gradient(90deg, rgba(14, 52, 107, 0.9) 0%, rgba(2, 132, 199, 0.4) 100%) !important;
    box-shadow: inset 0 0 15px rgba(56, 189, 248, 0.25), 0 3px 12px rgba(0, 0, 0, 0.5) !important;
}

table tbody td {
    color: #e2e8f0 !important;
    vertical-align: middle !important;
}

/* Kolum Tarikh (Cell Pertama) - Kontras Tinggi & Terang */
table tbody td:first-child,
tr.portal-record-row td:first-child {
    color: #f1f5f9 !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
}

/* Apabila Baris Di-Hover - Tarikh Menyala Cyan Biru & Teks Bersinar Jelas */
table tbody tr:hover td,
tr.portal-record-row:hover td {
    color: #ffffff !important;
}

table tbody tr:hover td:first-child,
table tbody tr.hover\:bg-gray-50:hover td:first-child,
tr.portal-record-row:hover td:first-child {
    color: #38bdf8 !important; /* Tarikh menyala Cyan terang bila cursor dihalakan */
    font-weight: 900 !important;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.8), 0 0 20px rgba(56, 189, 248, 0.4) !important;
}

table tbody tr:hover td .text-emerald-700,
table tbody tr td .text-emerald-700,
table tbody td .text-emerald-400 {
    color: #34d399 !important; /* Teks Tahap Hijau Terang */
    text-shadow: 0 0 8px rgba(52, 211, 153, 0.4) !important;
}

table tbody tr:hover td.italic,
table tbody tr:hover td .italic,
table tbody td.italic,
table tbody td .italic {
    color: #cbd5e1 !important; /* Teks Catatan Cerah & Jelas */
}

/* ==========================================
   IKON UTAMA 3D REHAL & AL-QURAN (HERO EMBLEM)
   ========================================== */
.portal-hero-icon-container {
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-block;
}
.portal-hero-icon-container:hover {
    transform: translateY(-4px) scale(1.04);
}
.portal-hero-icon {
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5));
}

.rotate-180 {
    transform: rotate(180deg) !important;
}

span[class*="bg-"] {
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4) !important;
    font-weight: 800 !important;
    border-radius: 10px !important;
}

/* ==========================================
   REKA BENTUK MOD GELAP (DARK MODE) PERFECT CONTRAST & CLEAR TEXT
   ========================================== */
body.dark-mode {
    background-color: #0f172a !important;
    background-image: linear-gradient(rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.93)), url('bg-masjid.png') !important;
    background-position: center bottom !important;
    background-repeat: repeat-x !important;
    background-size: contain !important;
    background-attachment: fixed !important;
    color: #f8fafc !important;
}

body.dark-mode .bg-white,
body.dark-mode .glass-card {
    background-color: #1e293b !important;
    color: #f8fafc !important;
    border-color: #475569 !important;
}

/* TAJUK & TEKS HIJAU TERANG DALAM DARK MODE */
body.dark-mode .text-emerald-900,
body.dark-mode .text-emerald-800,
body.dark-mode .text-emerald-700,
body.dark-mode .text-emerald-600 {
    color: #6ee7b7 !important; /* emerald-300 - Terang & Jelas */
}

body.dark-mode .text-blue-800,
body.dark-mode .text-blue-700,
body.dark-mode .text-blue-600 {
    color: #93c5fd !important; /* blue-300 */
}

/* PERKATAAN KELABU & SUB-LABEL TERANG JELAS */
body.dark-mode .text-gray-400,
body.dark-mode .text-gray-500,
body.dark-mode .text-gray-600,
body.dark-mode .text-gray-700,
body.dark-mode .text-gray-800,
body.dark-mode .text-gray-900 {
    color: #cbd5e1 !important; /* slate-300 */
}

/* KOTAK CONTAINER */
body.dark-mode .bg-emerald-50 { background-color: #064e3b !important; color: #6ee7b7 !important; }
body.dark-mode .bg-blue-50 { background-color: #1e3a8a !important; color: #93c5fd !important; }
body.dark-mode .bg-gray-50 { background-color: #334155 !important; color: #f8fafc !important; }

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background-color: #0f172a !important;
    color: #ffffff !important;
    border-color: #475569 !important;
}

body.dark-mode select:disabled,
body.dark-mode input:disabled {
    background-color: #1e293b !important;
    color: #94a3b8 !important;
}

body.dark-mode table {
    background: #1e293b !important;
    color: #f8fafc !important;
    border-color: #475569 !important;
}

body.dark-mode th {
    background-color: #334155 !important;
    color: #ffffff !important;
    border-color: #475569 !important;
}

body.dark-mode td {
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

body.dark-mode tr:hover {
    background-color: #334155 !important;
}

body.dark-mode nav {
    background-color: #064e3b !important;
    border-color: #000000 !important;
}

.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #FFF;
    border-bottom-color: #10B981;
    border-radius: 50%;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* TETINGKAP POPUP (MODAL) TERTUTUP & FLOATING DI TENGAH SKRIN */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

/* ==========================================
   TEMA WARNA PORTAL (THEMES) - SAFE OVERRIDES
   ========================================== */
body.theme-navy nav {
    background-color: #1e3a8a !important; /* Navy Blue */
}
body.theme-navy .bg-emerald-600 {
    background-color: #1e40af !important;
}
body.theme-navy .bg-emerald-800 {
    background-color: #1e3a8a !important;
}
body.theme-navy .text-emerald-800,
body.theme-navy .text-emerald-900 {
    color: #1e3a8a !important;
}

body.theme-turquoise nav {
    background-color: #0f766e !important; /* Deep Teal */
}
body.theme-turquoise .bg-emerald-600 {
    background-color: #0d9488 !important;
}
body.theme-turquoise .bg-emerald-800 {
    background-color: #0f766e !important;
}
body.theme-turquoise .text-emerald-800,
body.theme-turquoise .text-emerald-900 {
    color: #0f766e !important;
}

/* CHAT WIDGET FAQ BUTTONS */
.portal-help-faq-btn {
    background: white;
    border: 1.5px solid #000000;
    color: #065f46;
    font-family: 'Fredoka', sans-serif;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 2px 2px 0px #000000;
    transition: all 0.1s;
}
.portal-help-faq-btn:hover {
    background: #059669;
    color: white;
    transform: translate(-1px, -1px);
}

/* AI Auto-Navigator Glow Effect */
@keyframes aiGlowPulse {
    0% { box-shadow: 0 0 0 0px rgba(16, 185, 129, 0.8), 0 0 20px rgba(16, 185, 129, 0.6); transform: scale(1.01); }
    50% { box-shadow: 0 0 0 14px rgba(16, 185, 129, 0), 0 0 35px rgba(16, 185, 129, 0.9); transform: scale(1.02); }
    100% { box-shadow: 0 0 0 0px rgba(16, 185, 129, 0), 0 0 0px rgba(16, 185, 129, 0); transform: scale(1); }
}
.ai-glow-highlight {
    animation: aiGlowPulse 1.2s ease-in-out 2 !important;
    border-color: #10b981 !important;
    border-width: 3px !important;
    position: relative;
    z-index: 30;
}

/* ==========================================
   MEDIA PRINT - SEMBUNYIKAN ELEMEN TIDAK PERLU
   ========================================== */
@media print {
    .no-print,
    nav,
    footer,
    #portal-help-chat-widget,
    #banner-mobile-pc-recommendation,
    #loading,
    .modal,
    button,
    .btn,
    #card-form-home-tasmik {
        display: none !important;
    }

    body {
        background: white !important;
        background-image: none !important;
        font-size: 12px;
    }

    .glass-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }

    table {
        box-shadow: none !important;
    }

    #screen-main {
        display: block !important;
    }
}

/* ==========================================
   TOAST NOTIFICATION ANIMATION
   ========================================== */
#qtrack-portal-toast {
    transition: opacity 0.4s ease !important;
}

/* ==========================================
   FULLSCREEN STYLING FOR QURAN & IQRA MODALS
   ========================================== */
#modal-quran:fullscreen,
#modal-quran-portal:fullscreen,
#modal-iqra:fullscreen,
#modal-iqra-portal:fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    background-color: #f0f9ff !important;
    overflow: hidden !important;
}

#modal-quran:fullscreen .glass-card,
#modal-quran-portal:fullscreen .glass-card,
#modal-iqra:fullscreen .glass-card,
#modal-iqra-portal:fullscreen .glass-card,
#modal-quran .glass-card:fullscreen,
#modal-quran-portal .glass-card:fullscreen,
#modal-iqra .glass-card:fullscreen,
#modal-iqra-portal .glass-card:fullscreen {
    max-width: 100vw !important;
    width: 100vw !important;
    max-height: 100vh !important;
    height: 100vh !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background-color: #ffffff !important;
    margin: 0 !important;
    padding: 12px !important;
}

/* Fullscreen Dark Mode */
body.dark-mode #modal-quran:fullscreen,
body.dark-mode #modal-quran-portal:fullscreen,
body.dark-mode #modal-iqra:fullscreen,
body.dark-mode #modal-iqra-portal:fullscreen,
body.dark-mode #modal-quran .glass-card:fullscreen,
body.dark-mode #modal-quran-portal .glass-card:fullscreen,
body.dark-mode #modal-iqra .glass-card:fullscreen,
body.dark-mode #modal-iqra-portal .glass-card:fullscreen {
    background-color: #1e293b !important;
}

/* ==========================================
   PENUNJUK MENGAJI / IQRA POINTING FINGER CURSOR
   ========================================== */
.iqra-pointer-cursor,
.iqra-pointer-cursor canvas,
.iqra-pointer-cursor img {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Cfilter id='shadow' x='-10%25' y='-10%25' width='130%25' height='130%25'%3E%3CfeDropShadow dx='1' dy='2' stdDeviation='1.2' flood-color='%23000000' flood-opacity='0.4'/%3E%3C/filter%3E%3Cg filter='url(%23shadow)' transform='rotate(-15 14 14)'%3E%3Cpath d='M12,2 C13.3,2 14.3,3 14.3,4.5 L14.3,13.5 C15.1,12.8 16,12.5 17,12.8 C18,13.1 18.6,14 18.6,15 L18.6,15.5 C19.3,14.8 20.3,14.6 21.3,15 C22.2,15.4 22.8,16.3 22.8,17.3 L22.8,18 C23.4,17.5 24.4,17.4 25.2,17.9 C26.1,18.4 26.6,19.4 26.6,20.5 L26.6,23 C26.6,27.5 22.8,31 18,31 L14.5,31 C10.5,31 7,27.5 7,23.5 L7,16.5 C7,15.1 8.1,14 9.5,14 C10.9,14 12,15.1 12,16.5 L12,4.5 C12,3 13,2 14,2 Z' fill='%23fcd34d' stroke='%2378350f' stroke-width='1.8' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M7,24 L26.6,24 L26.6,31 L7,31 Z' fill='%23059669' stroke='%23064e3b' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E") 6 2, pointer !important;
}

/* ==========================================
   AUTO-CROP & FOCUS VERSE MODAL (CADANGAN 2)
   ========================================== */
.focus-crop-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.focus-crop-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.focus-crop-card {
    background: #ffffff;
    border: 3px solid #059669;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(16, 185, 129, 0.35);
    max-width: 96%;
    max-height: 85%;
    width: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px;
    position: relative;
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.focus-crop-overlay.active .focus-crop-card {
    transform: scale(1);
}

.focus-crop-img {
    max-width: 100%;
    max-height: 65vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border: 1px solid #e5e7eb;
}

/* ==========================================
   FLOATING FEEDBACK BUTTON & MODAL (PORTAL)
   ========================================== */
.floating-feedback-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 50;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 9999px;
    font-weight: 800;
    font-size: 12px;
    box-shadow: 0 10px 25px rgba(5, 150, 105, 0.4), 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid #34d399;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-feedback-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 14px 30px rgba(5, 150, 105, 0.5);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.star-rating-btn {
    font-size: 26px;
    color: #d1d5db;
    cursor: pointer;
    transition: transform 0.15s ease, color 0.15s ease;
}

.star-rating-btn:hover,
.star-rating-btn.active {
    color: #fbbf24;
    transform: scale(1.15);
}

/* ==========================================================================
   PENYELARASAN 3D KHAS PORTAL IBU BAPA (ROYAL CYBER AESTHETICS)
   ========================================================================== */

/* Bulatan Ikon Murid / Avatar 3D */
#screen-login .w-16.h-16,
#screen-main .w-12.h-12 {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(6, 78, 59, 0.45) 100%) !important;
    border: 2px solid rgba(0, 210, 255, 0.5) !important;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.3), inset 0 1px 2px rgba(255, 255, 255, 0.4) !important;
    color: #38bdf8 !important;
}

/* Akses Pantas Anak Tersimpan Chips */
#container-fav-kids {
    background: rgba(3, 16, 40, 0.85) !important;
    border: 1.5px solid rgba(245, 158, 11, 0.45) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

/* Kad Tawaran Maklum Balas Ibu Bapa */
div[onclick="openFeedbackModal()"] {
    background: linear-gradient(135deg, #d97706 0%, #b45309 60%, #78350f 100%) !important;
    border: 1.5px solid rgba(251, 191, 36, 0.6) !important;
    box-shadow: 0 10px 25px rgba(217, 119, 6, 0.45), 0 0 15px rgba(245, 158, 11, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.4) !important;
}

/* Kad Kemajuan & Baki Muka Surat (Progress Bar 3D) */
#card-progress-khatam {
    background: linear-gradient(165deg, rgba(8, 30, 62, 0.95) 0%, rgba(3, 16, 38, 0.98) 100%) !important;
    border: 1.8px solid rgba(0, 210, 255, 0.45) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), inset 0 1px 2px rgba(255, 255, 255, 0.2) !important;
}

#card-progress-khatam .h-4 {
    background: rgba(2, 8, 23, 0.9) !important;
    border: 1.5px solid rgba(0, 210, 255, 0.4) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8) !important;
}

#progress-bar-fill {
    background: linear-gradient(90deg, #059669 0%, #10b981 50%, #38bdf8 100%) !important;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.6) !important;
    border: none !important;
}

/* Box Pembuktian Pengesahan Wajib */
#card-form-home-tasmik .border-2.border-black {
    background: rgba(3, 16, 40, 0.85) !important;
    border: 1.5px solid rgba(0, 210, 255, 0.35) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.1) !important;
}

/* Butang Kamera & Galeri */
#card-form-home-tasmik label.cursor-pointer {
    background: linear-gradient(135deg, rgba(7, 30, 64, 0.9) 0%, rgba(3, 16, 38, 0.95) 100%) !important;
    border: 1.5px solid rgba(0, 210, 255, 0.4) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
}

#card-form-home-tasmik label.cursor-pointer:hover {
    transform: translateY(-2px) !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.35) !important;
}

/* Butang Terapung Bantuan Ibu Bapa di Bawah Kanan */
.floating-feedback-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: 1.5px solid rgba(52, 211, 153, 0.6) !important;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.5), 0 0 18px rgba(52, 211, 153, 0.3), inset 0 1px 2px rgba(255, 255, 255, 0.4) !important;
}

/* Modal Popup 3D */
.modal .glass-card {
    background: linear-gradient(165deg, rgba(7, 26, 56, 0.98) 0%, rgba(2, 12, 30, 0.99) 100%) !important;
    border: 2px solid rgba(0, 210, 255, 0.5) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 210, 255, 0.25) !important;
}

/* ==========================================================================
   PENINGKATAN KONTRAS TINGGI CARTA RADAR & BUKTI SKOR TASMIK (CLEAR VISION)
   ========================================================================== */

/* 1. Bekas Kad Radar & Skor Header */
#card-radar-prestasi {
    background: linear-gradient(165deg, rgba(8, 28, 58, 0.97) 0%, rgba(3, 14, 34, 0.99) 100%) !important;
    border: 1.8px solid rgba(0, 210, 255, 0.45) !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.8) !important;
}

#card-radar-prestasi h3 {
    color: #38bdf8 !important;
    text-shadow: 0 0 12px rgba(0, 210, 255, 0.4);
}

#card-radar-prestasi p {
    color: #94a3b8 !important;
}

/* 2. Jubin Skor 5 Paksi Dimensi (Chips Interaktif) */
#radar-axis-chips-list > div {
    background: linear-gradient(145deg, rgba(12, 38, 76, 0.92) 0%, rgba(5, 22, 48, 0.96) 100%) !important;
    border: 1.5px solid rgba(0, 210, 255, 0.4) !important;
    border-radius: 16px !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

#radar-axis-chips-list > div:hover {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.35) !important;
    transform: translateY(-2px) !important;
}

#radar-axis-chips-list p:first-child {
    color: #ffffff !important;
    font-weight: 900 !important;
    font-size: 11px !important;
}

#radar-axis-chips-list p:last-child {
    color: #7dd3fc !important;
    font-weight: 700 !important;
}

#radar-axis-chips-list span[class*="bg-emerald-100"] {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: 1px solid rgba(52, 211, 153, 0.7) !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5) !important;
}

/* 3. Butang & Kandungan Akordion "Bagaimana Skor Ini Dikira?" */
button[onclick="toggleDrilldownEvidencePortal()"] {
    background: linear-gradient(135deg, rgba(8, 42, 85, 0.9) 0%, rgba(3, 25, 56, 0.95) 100%) !important;
    border: 1.5px solid rgba(0, 210, 255, 0.5) !important;
    border-radius: 14px !important;
    color: #ffffff !important;
    font-size: 11.5px !important;
    font-weight: 900 !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
}

button[onclick="toggleDrilldownEvidencePortal()"] i {
    color: #38bdf8 !important;
}

#section-radar-evidence-details {
    background: linear-gradient(165deg, rgba(5, 20, 44, 0.98) 0%, rgba(2, 11, 26, 0.99) 100%) !important;
    border: 1.5px solid rgba(0, 210, 255, 0.4) !important;
    border-radius: 18px !important;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.7), 0 8px 24px rgba(0, 0, 0, 0.6) !important;
}

/* Kotak Formula Asas */
#section-radar-evidence-details .bg-emerald-50 {
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.85) 0%, rgba(4, 47, 46, 0.9) 100%) !important;
    border: 1.5px solid rgba(52, 211, 153, 0.5) !important;
    border-radius: 14px !important;
}

#section-radar-evidence-details .bg-emerald-50 p:first-child {
    color: #6ee7b7 !important;
    font-weight: 900 !important;
    font-size: 11.5px !important;
}

#section-radar-evidence-details .bg-emerald-50 p:last-child {
    color: #e2e8f0 !important;
    font-weight: 600 !important;
    font-size: 10.5px !important;
}

/* Senarai 5 Kotak Bukti Skor (Makhraj, Kehadiran, Momentum) */
#section-radar-evidence-details .bg-gray-50 {
    background: linear-gradient(145deg, rgba(10, 32, 64, 0.9) 0%, rgba(4, 18, 40, 0.95) 100%) !important;
    border: 1.5px solid rgba(0, 210, 255, 0.35) !important;
    border-radius: 14px !important;
    padding: 10px 12px !important;
    margin-bottom: 8px !important;
}

#section-radar-evidence-details .bg-gray-50 .text-emerald-900,
#section-radar-evidence-details .bg-gray-50 span {
    color: #ffffff !important;
    font-weight: 900 !important;
    font-size: 12px !important;
}

#section-radar-evidence-details .bg-gray-50 b {
    color: #34d399 !important;
    font-size: 13px !important;
}

#section-radar-evidence-details .bg-gray-50 span.bg-white {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    border: 1px solid rgba(56, 189, 248, 0.6) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    padding: 3px 8px !important;
    font-size: 9.5px !important;
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.4) !important;
}

#section-radar-evidence-details .bg-gray-50 p {
    color: #cbd5e1 !important;
    font-weight: 600 !important;
    font-size: 10.5px !important;
    margin-top: 4px !important;
}

/* 4. Bekas Carta Radar SVG */
#card-radar-prestasi .bg-white\/95 {
    background: rgba(3, 14, 34, 0.85) !important;
    border: 1.5px solid rgba(0, 210, 255, 0.3) !important;
    border-radius: 20px !important;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6) !important;
}

#card-radar-prestasi text {
    fill: #e2e8f0 !important;
    font-weight: 900 !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}
