/* ============================================================
   assets/css/font-contrast.css — v3.1
   Font Contrast Patch untuk Toko Ya~Basyir
   ------------------------------------------------------------
   Tujuan:
   - DARK  mode : font MENYALA (bright white + subtle glow)
   - LIGHT mode : font GELAP tegas (near-black, kontras tinggi)
   - Print      : selalu hitam tegas, tanpa glow
   ------------------------------------------------------------
   File ini di-load SETELAH assets/css/style.css
   agar bisa meng-override tanpa merusak style utama.
   ============================================================ */


/* ============================================================
   01. VARIABEL WARNA TEKS
   ============================================================ */
:root {
    /* Light mode: teks gelap tegas */
    --text-primary:   #0b1220;   /* hampir hitam, kontras tinggi */
    --text-secondary: #1e293b;
    --text-muted:     #475569;   /* abu tua, tetap terbaca */
    --text-soft:      #64748b;
    --text-invert:    #f8fafc;

    --glow-color:     transparent;
    --glow-strength:  0;
}

body.dark,
body[data-theme="dark"],
html.dark,
html[data-theme="dark"] {
    /* Dark mode: teks menyala */
    --text-primary:   #ffffff;
    --text-secondary: #f1f5f9;
    --text-muted:     #cbd5e1;
    --text-soft:      #94a3b8;
    --text-invert:    #0b1220;

    --glow-color:     rgba(165, 180, 252, 0.35);
    --glow-strength:  1;
}


/* ============================================================
   02. BODY & TEKS DASAR
   ============================================================ */
body {
    color: var(--text-primary);
    transition: color .2s ease, text-shadow .2s ease;
}

body.dark,
body[data-theme="dark"] {
    color: var(--text-primary);
    /* Glow tipis halus untuk seluruh teks body */
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.08);
}


/* ============================================================
   03. HEADINGS — MENYALA DI DARK
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    transition: color .2s ease, text-shadow .2s ease;
}

body.dark h1, body.dark h2,
body.dark h3, body.dark h4,
body.dark h5, body.dark h6,
body[data-theme="dark"] h1,
body[data-theme="dark"] h2,
body[data-theme="dark"] h3,
body[data-theme="dark"] h4,
body[data-theme="dark"] h5,
body[data-theme="dark"] h6 {
    color: #ffffff;
    text-shadow:
        0 0 6px rgba(199, 210, 254, 0.35),
        0 0 14px rgba(129, 140, 248, 0.20);
}


/* ============================================================
   04. PARAGRAF, SPAN, LIST
   ============================================================ */
p, span, div, li, td, th, label, small, strong, b, em {
    color: inherit;
}

body.dark p,
body.dark span,
body.dark div,
body.dark li,
body.dark small,
body.dark em {
    color: var(--text-secondary);
}

body.dark strong,
body.dark b {
    color: #ffffff;
    text-shadow: 0 0 4px rgba(199, 210, 254, 0.25);
}


/* ============================================================
   05. LABEL FORM
   ============================================================ */
label {
    color: var(--text-secondary);
}

body.dark label {
    color: #e2e8f0;
    text-shadow: 0 0 4px rgba(148, 163, 184, 0.15);
}


/* ============================================================
   06. INPUT, SELECT, TEXTAREA
   ============================================================ */
input, select, textarea, .input-base {
    color: var(--text-primary);
    background: #ffffff;
}

body.dark input,
body.dark select,
body.dark textarea,
body.dark .input-base {
    color: #ffffff;
    background: #1e293b;
    border-color: #475569;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.06);
}

body.dark input:focus,
body.dark select:focus,
body.dark textarea:focus,
body.dark .input-base:focus {
    color: #ffffff;
    border-color: #a5b4fc;
    box-shadow:
        0 0 0 3px rgba(129, 140, 248, 0.35),
        0 0 12px rgba(129, 140, 248, 0.25);
}

/* Placeholder */
input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}
body.dark input::placeholder,
body.dark textarea::placeholder {
    color: #94a3b8;
    opacity: .9;
}

/* Select option di dark mode */
body.dark select option {
    background: #1e293b;
    color: #f1f5f9;
}
body.dark select option:checked {
    background: #4f46e5;
    color: #ffffff;
}

/* Date picker indicator di dark mode */
body.dark ::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}


/* ============================================================
   07. TABEL
   ============================================================ */
.data-table th {
    color: var(--text-primary);
}
body.dark .data-table th {
    color: #ffffff;
    text-shadow: 0 0 5px rgba(199, 210, 254, 0.3);
}

.data-table td {
    color: var(--text-secondary);
}
body.dark .data-table td {
    color: #e2e8f0;
}


/* ============================================================
   08. LINK
   ============================================================ */
a {
    color: #4f46e5;
}
body.dark a {
    color: #a5b4fc;
    text-shadow: 0 0 6px rgba(165, 180, 252, 0.35);
}
body.dark a:hover {
    color: #c7d2fe;
    text-shadow: 0 0 10px rgba(199, 210, 254, 0.5);
}


/* ============================================================
   09. CARD & MODAL
   ============================================================ */
.app-card, .glass-card, .stat-card, .modal-box {
    color: var(--text-primary);
}
body.dark .app-card,
body.dark .glass-card,
body.dark .stat-card,
body.dark .modal-box {
    color: #f1f5f9;
}


/* ============================================================
   10. STAT VALUE (angka besar) MENYALA
   ============================================================ */
.stat-card .stat-value,
.stat-value-large {
    color: var(--text-primary);
}
body.dark .stat-card .stat-value,
body.dark .stat-value-large {
    color: #ffffff;
    text-shadow:
        0 0 8px rgba(199, 210, 254, 0.45),
        0 0 18px rgba(129, 140, 248, 0.25);
}


/* ============================================================
   11. BADGE
   ============================================================ */
body.dark .badge-status,
body.dark .badge-payment,
body.dark .role-badge {
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}


/* ============================================================
   12. OVERRIDE TAILWIND TEXT UTILITIES
   ============================================================ */

/* --- LIGHT MODE: teks lebih gelap --- */
.text-slate-400 { color: #475569 !important; }
.text-slate-500 { color: #334155 !important; }
.text-slate-600 { color: #1e293b !important; }
.text-slate-700 { color: #0f172a !important; }
.text-slate-800 { color: #0b1220 !important; }
.text-slate-900 { color: #0b1220 !important; }
.text-gray-400  { color: #475569 !important; }
.text-gray-500  { color: #334155 !important; }
.text-gray-600  { color: #1e293b !important; }
.text-gray-700  { color: #0f172a !important; }

/* --- DARK MODE: teks menyala --- */
body.dark .text-slate-400,
body.dark .text-gray-400  { color: #cbd5e1 !important; }

body.dark .text-slate-500,
body.dark .text-gray-500  { color: #e2e8f0 !important; }

body.dark .text-slate-600,
body.dark .text-gray-600  { color: #f1f5f9 !important; }

body.dark .text-slate-700,
body.dark .text-gray-700  { color: #ffffff !important; }

body.dark .text-slate-800,
body.dark .text-slate-900 {
    color: #ffffff !important;
    text-shadow: 0 0 5px rgba(199, 210, 254, 0.3);
}


/* ============================================================
   13. MEMBER SEARCH RESULT & DROPDOWN
   ============================================================ */
#memberSearchResults .search-item,
.member-search-results .search-item {
    color: var(--text-primary);
}

body.dark #memberSearchResults .search-item,
body.dark .member-search-results .search-item {
    color: #f1f5f9;
}

body.dark #memberSearchResults .search-item:hover,
body.dark .member-search-results .search-item:hover {
    color: #ffffff;
    background: #312e81;
    text-shadow: 0 0 6px rgba(199, 210, 254, 0.4);
}


/* ============================================================
   14. RUNNING TEXT
   ============================================================ */
.running-text-container marquee {
    color: inherit;
    text-shadow: inherit;
}

body.dark .running-text-container {
    color: #fef3c7 !important;
    text-shadow: 0 0 6px rgba(251, 191, 36, 0.35);
}


/* ============================================================
   15. TOAST
   ============================================================ */
body.dark .toast-notify {
    color: #ffffff;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}


/* ============================================================
   16. EMPTY STATE
   ============================================================ */
body.dark .empty-state {
    color: #94a3b8;
}
body.dark .empty-state i {
    color: #a5b4fc;
    text-shadow: 0 0 12px rgba(129, 140, 248, 0.6);
}


/* ============================================================
   17. LOGIN CARD
   ============================================================ */
body.dark .login-card,
body.dark .login-card h1,
body.dark .login-card p {
    color: #f8fafc;
}
body.dark .login-card h1 {
    text-shadow: 0 0 10px rgba(199, 210, 254, 0.4);
}


/* ============================================================
   18. FORM HINT
   ============================================================ */
.form-hint {
    color: #64748b;
}
body.dark .form-hint {
    color: #cbd5e1;
}


/* ============================================================
   19. PRINT — SELALU HITAM TEGAS, TANPA GLOW
   ============================================================ */
@media print {
    body,
    body.dark,
    body[data-theme="dark"],
    h1, h2, h3, h4, h5, h6,
    p, span, div, li, td, th, label, small, strong, b, em,
    .app-card, .glass-card, .stat-card, .modal-box,
    .stat-card .stat-value, .stat-value-large {
        color: #000000 !important;
        text-shadow: none !important;
    }
}


/* ============================================================
   END OF FILE — font-contrast.css v3.1
   ============================================================ */