/* Devata Bootcamp Portal - small custom styles to complement Tailwind CDN */

/* =====================================================================
   GAMIZ DESIGN SYSTEM — Purple-forward, playful, game-like UI
   Applied globally. All existing rules below remain intact; these
   new rules sit on top and introduce the Gamiz visual language.
   ===================================================================== */

/* ── Design tokens ────────────────────────────────────────────────── */
:root {
    --gm-purple:     #7C3AED;
    --gm-purple-lt:  #8B5CF6;
    --gm-purple-dk:  #6D28D9;
    --gm-orange:     #F97316;
    --gm-orange-lt:  #FB923C;
    --gm-orange-dk:  #EA6808;
    --gm-green:      #10B981;
    --gm-green-lt:   #34D399;
    --gm-red:        #EF4444;
    --gm-yellow:     #FBBF24;
    --gm-bg:         #f8f7fe;       /* very light lavender page background */
    --gm-card:       #FFFFFF;
    --gm-card-br:    20px;          /* card border-radius */
    --gm-card-sh:    0 4px 24px rgba(109,40,217,.10);
    --gm-btn-br:     12px;
    --gm-radius-pill:999px;
    --gm-radius-sm:  8px;
    --gm-radius-md:  12px;
    --gm-radius-lg:  20px;
}

html.dark {
    --gm-bg:     #0D0622;
    --gm-card:   #1A0F38;
    --gm-card-sh:0 4px 24px rgba(0,0,0,.35);
}

/* ── Custom scrollbar ─────────────────────────────────────────────────
   Ganti scrollbar default OS (chunky + tombol panah) jadi tipis, rounded,
   warna ungu senada tema. Berlaku global (Chrome/Edge/Safari via
   ::-webkit-scrollbar, Firefox via scrollbar-width/color). */
* {
    scrollbar-width: thin;                               /* Firefox */
    scrollbar-color: rgba(124,58,237,.38) transparent;    /* thumb track */
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }  /* buang tombol panah */
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(124,58,237,.38);
    border-radius: 999px;
    border: 2px solid transparent;   /* padding di sekeliling thumb → terlihat langsing */
    background-clip: padding-box;
    transition: background .15s;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(124,58,237,.6);
    background-clip: padding-box;
}
/* Sidebar gelap: thumb lebih terang biar kontras di background ungu tua. */
#sidebar { scrollbar-color: rgba(167,139,250,.45) transparent; }
#sidebar ::-webkit-scrollbar-thumb { background: rgba(167,139,250,.4); background-clip: padding-box; }
#sidebar ::-webkit-scrollbar-thumb:hover { background: rgba(196,181,253,.75); background-clip: padding-box; }
/* Dark mode global: pakai shade ungu terang. */
html.dark { scrollbar-color: rgba(139,92,246,.45) transparent; }
html.dark ::-webkit-scrollbar-thumb { background: rgba(139,92,246,.42); background-clip: padding-box; }
html.dark ::-webkit-scrollbar-thumb:hover { background: rgba(167,139,250,.7); background-clip: padding-box; }

/* ── Global body: Poppins + lavender background ───────────────────── */
body {
    font-family: 'Poppins', 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
}
.bg-gm-bg {
    background-color: var(--gm-bg);
    background-image:
        linear-gradient(0deg, transparent 24%, rgba(124,58,237,.08) 25%, rgba(124,58,237,.08) 26%, transparent 27%, transparent 74%, rgba(124,58,237,.08) 75%, rgba(124,58,237,.08) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(124,58,237,.08) 25%, rgba(124,58,237,.08) 26%, transparent 27%, transparent 74%, rgba(124,58,237,.08) 75%, rgba(124,58,237,.08) 76%, transparent 77%, transparent);
    background-size: 60px 60px;
    background-attachment: fixed;
}
html.dark .bg-gm-bg {
    background-image:
        linear-gradient(0deg, transparent 24%, rgba(139,92,246,.08) 25%, rgba(139,92,246,.08) 26%, transparent 27%, transparent 74%, rgba(139,92,246,.08) 75%, rgba(139,92,246,.08) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(139,92,246,.08) 25%, rgba(139,92,246,.08) 26%, transparent 27%, transparent 74%, rgba(139,92,246,.08) 75%, rgba(139,92,246,.08) 76%, transparent 77%, transparent);
    background-size: 40px 40px;
}

/* ── Card component ───────────────────────────────────────────────── */
.gm-card {
    background: var(--gm-card);
    border-radius: var(--gm-card-br);
    box-shadow: var(--gm-card-sh);
    border: none;
    transition: transform .15s ease, box-shadow .15s ease;
}
.gm-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(109,40,217,.16);
}
html.dark .gm-card { border: 1px solid rgba(139,92,246,.15); }

/* ── Action button tiles (Create Quiz / Join Quiz / Achievements) ─── */
.gm-action-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .45rem; padding: 1rem .75rem;
    border-radius: 18px; font-size: .78rem; font-weight: 700;
    color: #fff; cursor: pointer; border: none;
    transition: transform .15s ease, box-shadow .15s ease;
    text-decoration: none;
}
.gm-action-tile:hover { transform: translateY(-3px); }
.gm-action-tile:active { transform: scale(.95); }
.gm-action-tile .gm-tile-icon {
    width: 2.4rem; height: 2.4rem; background: rgba(255,255,255,.22);
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
}
.gm-tile-purple  { background: linear-gradient(135deg,#7C3AED,#9333EA); box-shadow:0 6px 20px rgba(124,58,237,.4); }
.gm-tile-green   { background: linear-gradient(135deg,#059669,#10B981); box-shadow:0 6px 20px rgba(16,185,129,.4); }
.gm-tile-orange  { background: linear-gradient(135deg,#EA580C,#F97316); box-shadow:0 6px 20px rgba(249,115,22,.4); }
.gm-tile-blue    { background: linear-gradient(135deg,#2563EB,#3B82F6); box-shadow:0 6px 20px rgba(59,130,246,.4); }

/* ── Daily/Featured banner (orange gradient) ──────────────────────── */
.gm-banner {
    background: linear-gradient(135deg,#F97316 0%,#FBBF24 100%);
    border-radius: 20px; padding: 1.25rem 1.5rem;
    position: relative; overflow: hidden; color: #fff;
    box-shadow: 0 8px 28px rgba(249,115,22,.35);
}
.gm-banner-glow {
    position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(circle at 80% 50%, rgba(255,255,255,.18), transparent 55%);
}
.gm-banner h2 { font-size: 1.35rem; font-weight: 800; margin: 0; }
.gm-banner p  { font-size: .78rem; margin: .2rem 0 .75rem; opacity: .88; }

/* ── Stat chips (3-col: purple / orange / green) ─────────────────── */
.gm-stat-chip {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .25rem; padding: .75rem; border-radius: 14px;
    text-align: center;
}
.gm-stat-chip .gm-stat-val { font-size: 1.35rem; font-weight: 800; line-height: 1; }
.gm-stat-chip .gm-stat-lbl { font-size: .67rem; font-weight: 600; opacity: .78; }
.gm-chip-purple { background:linear-gradient(135deg,#7C3AED,#9333EA); color:#fff; box-shadow:0 4px 14px rgba(124,58,237,.35); }
.gm-chip-orange { background:linear-gradient(135deg,#EA580C,#F97316); color:#fff; box-shadow:0 4px 14px rgba(249,115,22,.35); }
.gm-chip-green  { background:linear-gradient(135deg,#059669,#10B981); color:#fff; box-shadow:0 4px 14px rgba(16,185,129,.35); }
.gm-chip-gold   { background:linear-gradient(135deg,#B45309,#F59E0B); color:#fff; box-shadow:0 4px 14px rgba(245,158,11,.35); }

/* ── Points pill (💎 12000 + ) ────────────────────────────────────── */
.gm-points-pill {
    display: inline-flex; align-items: center; gap: .35rem;
    background: linear-gradient(135deg,#7C3AED,#9333EA);
    color: #fff; border-radius: var(--gm-radius-pill);
    padding: .3rem .85rem; font-size: .82rem; font-weight: 700;
    box-shadow: 0 3px 12px rgba(124,58,237,.35);
}

/* ── XP progress bar (Gamiz thick style) ─────────────────────────── */
.gm-xp-track {
    height: 10px; background: rgba(124,58,237,.15);
    border-radius: 999px; overflow: hidden;
}
.gm-xp-fill {
    height: 100%;
    background: linear-gradient(90deg,#7C3AED,#F97316,#FBBF24);
    border-radius: 999px;
    box-shadow: 0 0 10px rgba(249,115,22,.5);
    transition: width 1.4s cubic-bezier(.4,0,.2,1);
}

/* ── Badge circle (large, circular badge icons) ────────────────────  */
.gm-badge-circle {
    width: 3.25rem; height: 3.25rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.45rem; position: relative; cursor: default;
    transition: transform .15s ease;
    box-shadow: 0 4px 14px rgba(0,0,0,.15);
}
.gm-badge-circle:hover { transform: scale(1.12) rotate(-4deg); }
.gm-badge-circle.earned {
    background: linear-gradient(135deg,#7C3AED,#F97316);
}
.gm-badge-circle.locked {
    background: #e5e7eb; filter: grayscale(1); opacity: .5;
}
html.dark .gm-badge-circle.locked { background: #334155; }
.gm-badge-lv {
    position: absolute; bottom: -4px; right: -4px;
    background: #FBBF24; color: #1c1917;
    font-size: .55rem; font-weight: 800; border-radius: 999px;
    padding: 1px 5px; border: 2px solid var(--gm-card);
}

/* ── Primary button (purple gradient pill) ────────────────────────── */
.gm-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    background: linear-gradient(135deg,#7C3AED,#9333EA);
    color: #fff; border: none; border-radius: var(--gm-btn-br);
    padding: .6rem 1.4rem; font-size: .875rem; font-weight: 700;
    cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
    box-shadow: 0 4px 16px rgba(124,58,237,.4);
    text-decoration: none;
}
.gm-btn:hover   { transform: translateY(-2px); box-shadow:0 8px 24px rgba(124,58,237,.5); }
.gm-btn:active  { transform: scale(.96); }
.gm-btn-orange  { background:linear-gradient(135deg,#EA580C,#F97316); box-shadow:0 4px 16px rgba(249,115,22,.4); }
.gm-btn-orange:hover { box-shadow:0 8px 24px rgba(249,115,22,.5); }
.gm-btn-green   { background:linear-gradient(135deg,#059669,#10B981); box-shadow:0 4px 16px rgba(16,185,129,.4); }
.gm-btn-sm      { padding:.35rem .9rem; font-size:.78rem; }
.gm-btn-pill    { border-radius:999px; }

/* ── Leaderboard podium ────────────────────────────────────────────── */
.gm-podium-bar {
    display: flex; flex-direction: column; align-items: center;
    gap: .5rem;
}
.gm-podium-avatar {
    width: 4.5rem; height: 4.5rem; border-radius: 50%;
    border: 3px solid rgba(255,255,255,.5);
    background: linear-gradient(135deg,#7C3AED,#9333EA);
    color: #fff; font-weight: 800; font-size: 1.35rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    position: relative; flex-shrink: 0; overflow: hidden;
}
.gm-podium-avatar.rank-1 {
    width: 5.5rem; height: 5.5rem;
    border: 4px solid #FBBF24;
    box-shadow: 0 0 0 3px rgba(251,191,36,.3), 0 12px 32px rgba(251,191,36,.4);
}
.gm-podium-block {
    border-radius: 16px 16px 0 0;
    display: flex; flex-direction: column; align-items: center;
    justify-content: flex-end; padding: .75rem .6rem;
    font-weight: 800; font-size: 1.1rem;
    min-width: 90px;
}
.gm-podium-1 { background:linear-gradient(180deg,#F59E0B,#FCD34D); color:#1c1917; height:100px; box-shadow:0 -6px 24px rgba(251,191,36,.35); }
.gm-podium-2 { background:linear-gradient(180deg,#6B7280,#9CA3AF); color:#fff;   height:72px; }
.gm-podium-3 { background:linear-gradient(180deg,#92400E,#D97706); color:#fff;   height:56px; }

/* ── History / Queue list item ────────────────────────────────────── */
.gm-list-item {
    display: flex; align-items: center; gap: .75rem;
    padding: .75rem 1rem; background: var(--gm-card);
    border-radius: 14px; box-shadow: 0 2px 10px rgba(109,40,217,.07);
    transition: transform .12s ease, box-shadow .12s ease;
    cursor: pointer;
}
.gm-list-item:hover { transform: translateY(-1px); box-shadow:0 6px 20px rgba(109,40,217,.14); }
.gm-list-thumb {
    width: 3rem; height: 3rem; border-radius: 10px; object-fit: cover;
    flex-shrink: 0; background: linear-gradient(135deg,#7C3AED,#9333EA);
}
.gm-play-btn {
    flex-shrink: 0; width: 2.25rem; height: 2.25rem;
    background: linear-gradient(135deg,#F97316,#FBBF24);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: .7rem; box-shadow:0 3px 10px rgba(249,115,22,.4);
    transition: transform .12s; cursor: pointer; border: none;
}
.gm-play-btn:hover { transform: scale(1.1); }

/* ── Section header inside page ──────────────────────────────────── */
.gm-section-hdr {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: .75rem;
}
.gm-section-hdr h3 {
    font-size: .95rem; font-weight: 700; color: #1f2937;
    display: flex; align-items: center; gap: .4rem;
}
html.dark .gm-section-hdr h3 { color: #e2e8f0; }
.gm-section-hdr a {
    font-size: .78rem; font-weight: 600; color: var(--gm-purple);
    display: flex; align-items: center; gap: .2rem; text-decoration: none;
}

/* ── Status pill (Gamiz flavor) ───────────────────────────────────── */
.gm-pill {
    display: inline-flex; align-items: center; gap: .25rem;
    padding: .2rem .65rem; border-radius: 999px;
    font-size: .7rem; font-weight: 700; white-space: nowrap;
}
.gm-pill-purple { background: rgba(124,58,237,.12); color: #6D28D9; }
.gm-pill-orange { background: rgba(249,115,22,.12); color: #C2410C; }
.gm-pill-green  { background: rgba(16,185,129,.12);  color: #065F46; }
.gm-pill-yellow { background: rgba(251,191,36,.15);  color: #92400E; }
.gm-pill-red    { background: rgba(239,68,68,.12);   color: #991B1B; }
.gm-pill-gray   { background: rgba(107,114,128,.10); color: #374151; }
html.dark .gm-pill-purple { background:rgba(139,92,246,.2); color:#c4b5fd; }
html.dark .gm-pill-orange { background:rgba(249,115,22,.2); color:#fdba74; }
html.dark .gm-pill-green  { background:rgba(16,185,129,.2); color:#6ee7b7; }
html.dark .gm-pill-yellow { background:rgba(251,191,36,.2); color:#fde047; }
html.dark .gm-pill-red    { background:rgba(239,68,68,.2);  color:#fca5a5; }
html.dark .gm-pill-gray   { background:rgba(148,163,184,.12); color:#94a3b8; }

/* ── Modal overlay/box (generic) ──────────────────────────────────
   Replaces the position:fixed;inset:0;background:rgba(0,0,0,.55) markup
   that used to be hand-written per page (header admin alert, task
   drawers, kanban/matrix dialogs, profile, calendar, etc). */
.gm-modal-overlay {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(15,10,36,.55);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
}
.gm-modal-box {
    background: var(--gm-card);
    border-radius: var(--gm-radius-lg);
    box-shadow: 0 24px 64px rgba(0,0,0,.35);
    max-width: 32rem; width: 100%;
    max-height: 90vh; overflow-y: auto;
}
.gm-modal-box.gm-modal-wide { max-width: 48rem; }
html.dark .gm-modal-box { border: 1px solid rgba(139,92,246,.2); }

/* ── Tab row ─────────────────────────────────────────────────────── */
.gm-tabs {
    display: flex; gap: .25rem; background: rgba(124,58,237,.08);
    border-radius: 12px; padding: .3rem;
}
.gm-tab {
    flex: 1; text-align: center; padding: .45rem .75rem;
    border-radius: 9px; font-size: .8rem; font-weight: 600;
    color: #6b7280; cursor: pointer; border: none;
    background: transparent; transition: all .15s ease;
    white-space: nowrap;
}
.gm-tab.active {
    background: var(--gm-purple); color: #fff;
    box-shadow: 0 3px 12px rgba(124,58,237,.4);
}
.gm-tabs.auto-width .gm-tab { flex: 0 0 auto; }

/* ── Header top-bar restyle ─────────────────────────────────────── */
header.bg-white {
    background: #fff !important;
    border-bottom: 1px solid rgba(124,58,237,.12) !important;
    box-shadow: 0 2px 16px rgba(109,40,217,.08) !important;
}
html.dark header.bg-white {
    background: #120833 !important;
    border-bottom-color: rgba(139,92,246,.2) !important;
    box-shadow: 0 2px 16px rgba(0,0,0,.3) !important;
}

/* ── White card override — increase border-radius globally ────────── */
.bg-white.rounded-xl { border-radius: 18px !important; }
.bg-white.rounded-2xl { border-radius: 22px !important; }
/* Shadow upgrade on white cards */
.bg-white.shadow-sm { box-shadow: 0 2px 16px rgba(109,40,217,.08) !important; }
.bg-white.shadow    { box-shadow: 0 4px 20px rgba(109,40,217,.10) !important; }

/* ── Sidebar active item — switch from indigo to purple ───────────── */
.nav-link.bg-indigo-600 {
    background: linear-gradient(90deg,#6D28D9,#9333EA) !important;
    box-shadow: 0 0 0 1px rgba(167,139,250,.35), 0 4px 16px rgba(124,58,237,.45) !important;
}
.nav-link.bg-indigo-600::before { background: #FBBF24; box-shadow: 0 0 8px #FBBF24; }

/* ── Indigo→Purple accent remaps ─────────────────────────────────── */
.bg-indigo-600 { background-color: #7C3AED !important; }
.bg-indigo-700 { background-color: #6D28D9 !important; }
.bg-indigo-500 { background-color: #8B5CF6 !important; }
.text-indigo-600 { color: #7C3AED !important; }
.text-indigo-500 { color: #8B5CF6 !important; }
.border-indigo-500 { border-color: #8B5CF6 !important; }
.ring-indigo-500, .ring-indigo-400 { --tw-ring-color: rgba(139,92,246,.5) !important; }
.focus\:ring-indigo-500:focus { --tw-ring-color: rgba(139,92,246,.5) !important; }
.hover\:bg-indigo-700:hover { background-color: #6D28D9 !important; }

/* ── Progress/XP bar — strip (header) — thicker, more colorful ───── */
.dv-xp-strip {
    height: 4px;
    background: rgba(124,58,237,.12);
}
.dv-xp-fill {
    background: linear-gradient(90deg,#7C3AED,#F97316,#FBBF24);
    box-shadow: 0 0 8px rgba(249,115,22,.5);
}

/* ── Confetti colors remap to purple/orange ───────────────────────── */
/* Canvas confetti uses JS — no CSS needed here */

/* ── Level-up overlay remap ───────────────────────────────────────── */
.dv-lvlup-box {
    background: linear-gradient(135deg,#1a0533 0%,#2e1065 40%,#4c1d95 100%) !important;
    border-color: rgba(167,139,250,.45) !important;
    box-shadow: 0 0 0 1px rgba(167,139,250,.2),0 32px 64px rgba(0,0,0,.5),0 0 80px rgba(124,58,237,.3) !important;
}
.dv-lvlup-btn {
    background: linear-gradient(90deg,#7C3AED,#9333EA) !important;
    box-shadow: 0 4px 16px rgba(124,58,237,.4) !important;
}

/* ── Badge toast (bottom-right) ───────────────────────────────────── */
.dv-badge-toast {
    background: linear-gradient(135deg,#1a0533,#0f0020) !important;
    border-color: rgba(139,92,246,.45) !important;
}


/* ── Tailwind bg-gray-100 body fallback (in case body class missing) */
body { background-color: var(--gm-bg); }

/* ── Rounded corners for all Tailwind form elements ──────────────── */
input, select, textarea { border-radius: 10px !important; }
button { border-radius: 10px; }

/* END GAMIZ DESIGN SYSTEM */

body {
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
    background-color: var(--gm-bg);
}

/* Sidebar active link */
.nav-link {
    transition: background-color .15s ease, color .15s ease;
}
.nav-link.active {
    background-color: #eef2ff;
    color: #4338ca;
    font-weight: 600;
}

/* Production Matrix */
.matrix-table {
    border-collapse: separate;
    border-spacing: 0;
}
.matrix-table th, .matrix-table td {
    border: 1px solid #e5e7eb;
    white-space: nowrap;
}
.matrix-table th.sticky-col, .matrix-table td.sticky-col {
    position: sticky;
    left: 0;
    z-index: 10;
    background-color: #f9fafb;
}
.matrix-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background-color: #f9fafb;
}
.matrix-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    min-height: 56px;
    padding: 6px 8px;
    border-radius: 6px;
    margin: 4px;
    font-size: 0.75rem;
    line-height: 1.1rem;
    text-align: center;
}

/* Score gauge */
.score-pill {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .125rem .5rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: .75rem;
}

/* Scrollbar */
.scroll-thin::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}
.scroll-thin::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 9999px;
}

/* Login page background — animated grid + drifting glow version lives
   further down (search "Auth (login) background"); this base rule was
   superseded by it and removed to avoid two competing declarations. */

/* =====================================================================
   Game-like UI/UX layer — applied globally (loaded on every page via
   includes/header.php). Keeps the existing Tailwind layout untouched;
   this only adds polish: gradients, glow, hover-lift, and small
   celebratory animations so the portal feels more like a game/quest
   tracker than a plain admin panel.
   ===================================================================== */

/* Sidebar: gradient backdrop + glowing active item with left accent bar */
#sidebar {
    background: linear-gradient(180deg, #111827 0%, #1f2937 60%, #1e1b4b 100%);
}
.nav-link {
    position: relative;
    border-radius: 10px;
}
.nav-link:hover {
    transform: translateX(2px);
}
.nav-link.bg-indigo-600 {
    /* Darker gradient stops than the original #6366f1→#8b5cf6 — that pairing
       left white text with weak contrast against the lighter violet end
       (reported: active sidebar item text hard to read). #4338ca→#6d28d9 is
       deep enough at both ends to keep text-white comfortably legible. */
    background: linear-gradient(90deg, #4338ca 0%, #6d28d9 100%) !important;
    box-shadow: 0 0 0 1px rgba(165,180,252,.35), 0 4px 14px rgba(99,102,241,.45);
}
.nav-link.bg-indigo-600, .nav-link.bg-indigo-600 span {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.nav-link.bg-indigo-600::before {
    content: '';
    position: absolute;
    left: -8px; top: 50%;
    transform: translateY(-50%);
    width: 4px; height: 60%;
    border-radius: 4px;
    background: #facc15;
    box-shadow: 0 0 8px #facc15;
}
.nav-link svg { transition: transform .2s ease; }
.nav-link:hover svg { transform: scale(1.15) rotate(-4deg); }

/* Buttons: subtle lift on hover for a tactile, "clickable quest" feel */
button:not(:disabled), a.inline-flex, .btn-game {
    transition: transform .12s ease, box-shadow .12s ease;
}
button:not(:disabled):active { transform: scale(.97); }

/* Cards: gentle hover-lift helper, opt-in via .game-card */
.game-card {
    transition: transform .15s ease, box-shadow .15s ease;
}
.game-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(79,70,229,.12);
}

/* Status badges & pills: soft glow matching their color */
.status-badge, .score-pill {
    box-shadow: 0 1px 0 rgba(0,0,0,.03);
    transition: transform .15s ease;
}
.status-badge:hover, .score-pill:hover { transform: scale(1.05); }

/* ── Notification badge pulse ─────────────────────────────────────────── */
@keyframes notifPulse {
    0%   { transform: scale(1);    box-shadow: 0 0 0 0   rgba(239,68,68,.7); }
    40%  { transform: scale(1.18); box-shadow: 0 0 0 5px rgba(239,68,68,0); }
    100% { transform: scale(1);    box-shadow: 0 0 0 0   rgba(239,68,68,0); }
}
.notif-badge-pulse {
    animation: notifPulse 1.6s ease-in-out infinite;
    transform-origin: center;
}

/* ── Skill badges — game-card style ──────────────────────────────────── */
.dv-skill-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px 4px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    border: 1.5px solid currentColor;
    transition: transform .15s, box-shadow .15s;
    cursor: default;
    position: relative;
    overflow: hidden;
}
.dv-skill-chip::before {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: .08;
}
.dv-skill-chip:hover { transform: scale(1.06); box-shadow: 0 3px 10px rgba(0,0,0,.12); }
.dv-skill-chip-shot  { color: #6366f1; }
.dv-skill-chip-asset { color: #10b981; }

/* ── Admin login alert popup ─────────────────────────────────────────── */
@keyframes adminAlertIn {
    0%   { opacity: 0; transform: translate(-50%,-50%) scale(.88) translateY(14px); }
    60%  { transform: translate(-50%,-50%) scale(1.02); }
    100% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
}
.dv-admin-alert-box {
    animation: adminAlertIn .45s cubic-bezier(.34,1.56,.64,1) forwards;
}

/* ── Leaderboard: rank #1 row gets a warm celebratory glow */
tr.bg-amber-50\/30 {
    animation: rankGlow 2.4s ease-in-out infinite;
}
@keyframes rankGlow {
    0%, 100% { box-shadow: inset 0 0 0 rgba(251,191,36,0); }
    50%      { box-shadow: inset 0 0 24px rgba(251,191,36,.18); }
}

/* Toasts: bounce-in instead of a flat appear, more "achievement unlocked" */
#drawerToast, .toast {
    animation: toastPop .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes toastPop {
    0%   { transform: translateX(-50%) translateY(12px) scale(.9); opacity: 0; }
    100% { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}

/* Avatar: colorful ring so the user's identity feels a bit more "character card" */
.rounded-full.bg-indigo-600 {
    box-shadow: 0 0 0 3px #eef2ff, 0 0 0 5px #818cf8;
}

/* Trophy / medal emoji headers (e.g. "🏆 Leaderboard"): small idle wiggle
   on hover to draw the eye — wrap the emoji in <span class="emoji-pop"> to
   opt in (kept opt-in so it never affects emoji used elsewhere as plain text). */
@keyframes trophyWiggle {
    0%, 100% { transform: rotate(0deg); }
    25%      { transform: rotate(-10deg); }
    75%      { transform: rotate(10deg); }
}
.emoji-pop { display: inline-block; }
.emoji-pop:hover { animation: trophyWiggle .4s ease-in-out; }

/* =====================================================================
   DARK THEME — toggled via <html class="dark">, set/persisted in
   includes/header.php + assets/js/app.js (localStorage key "devata-theme").

   Approach: rather than retrofitting Tailwind's `dark:` variant onto every
   class in ~30+ PHP files (huge edit surface, high regression risk on a
   CDN-based Tailwind setup with no build step), this overrides Tailwind's
   OWN utility classes directly via `html.dark <selector>`. The app's
   markup consistently reuses a small, predictable set of gray/white
   surface classes and a dozen color-family badge patterns, so this single
   block re-themes the vast majority of the app at once.

   !important is required: Tailwind's CDN script injects its utility
   stylesheet into <head> at runtime via JS, so load order relative to
   this file isn't guaranteed. !important also lets these rules win over
   inline style="background:#fff" attributes used in a few hand-built
   modals (CSS spec: an !important stylesheet rule beats a non-!important
   inline style, regardless of selector specificity).

   Project Tracker (board/matrix.php) intentionally gets a SEPARATE, more
   conservative treatment below — it's a dense data-table work surface
   used for hours at a time, so it favors plain high-contrast slate over
   the glow/glassmorphism used on showcase screens like dashboards,
   leaderboard, profile and login.
   ===================================================================== */

html.dark body {
    background-color: #0D0622;
    color: #e2e8f0;
    background-image:
        radial-gradient(ellipse at 10% 0%, rgba(124,58,237,.25), transparent 50%),
        radial-gradient(ellipse at 90% 100%, rgba(249,115,22,.10), transparent 45%);
    background-attachment: fixed;
}

/* Core surfaces */
html.dark .bg-white { background-color: #1e293b !important; }
html.dark .bg-gray-50 { background-color: #16213a !important; }
html.dark .bg-gray-100 { background-color: #0b1120 !important; }
html.dark .bg-gray-200 { background-color: #334155 !important; }
html.dark header.bg-white { background-color: #111827 !important; }

/* Text */
html.dark .text-gray-900, html.dark .text-gray-800 { color: #f1f5f9 !important; }
html.dark .text-gray-700, html.dark .text-gray-600 { color: #cbd5e1 !important; }
html.dark .text-gray-500, html.dark .text-gray-400 { color: #94a3b8 !important; }

/* Pastel "stat chip" cards (e.g. Project Progress's per-stage donut tiles)
   — the chip's own background is a fixed light pastel per stage/color,
   identical in both themes (decorative color-coding, not a themed
   surface). The generic gray-text dark overrides just above this block
   would wash the labels/percentages out against that still-light chip, so
   pin them back to their original light-mode shade inside anything tagged
   .pastel-chip instead of letting them flip to light-on-light. */
html.dark .pastel-chip .text-gray-800 { color: #1f2937 !important; }
html.dark .pastel-chip .text-gray-700 { color: #374151 !important; }
html.dark .pastel-chip .text-gray-500 { color: #6b7280 !important; }
html.dark .pastel-chip .text-gray-400 { color: #9ca3af !important; }
html.dark .text-gray-300 { color: #64748b !important; }

/* Inline hardcoded dark text colors — many pages set heading/label/table
   text via inline style="color:#1f2937" (etc.) instead of Tailwind classes,
   so the class-based overrides above miss them and they render dark-on-dark.
   Remap the common inline text hexes to light in dark mode. The :not()
   exclusions skip elements with an inline light background (buttons, selects,
   tabs using background:#fff… — including light pastels like #fffbeb —
   whose dark text is intentional and stays readable). */
html.dark [style*="color:#1f2937"]:not([style*="background:#fff"]):not([style*="background: #fff"]):not([style*="background:#ffffff"]),
html.dark [style*="color:#111827"]:not([style*="background:#fff"]):not([style*="background: #fff"]):not([style*="background:#ffffff"]) { color: #f1f5f9 !important; }
html.dark [style*="color:#374151"]:not([style*="background:#fff"]):not([style*="background: #fff"]):not([style*="background:#ffffff"]),
html.dark [style*="color:#4b5563"]:not([style*="background:#fff"]):not([style*="background: #fff"]):not([style*="background:#ffffff"]) { color: #cbd5e1 !important; }
html.dark [style*="color:#1e293b"]:not([style*="background:#fff"]):not([style*="background: #fff"]):not([style*="background:#ffffff"]) { color: #e2e8f0 !important; }

/* Borders */
html.dark .border-gray-100, html.dark .border-gray-200,
html.dark .border-gray-300, html.dark .divide-gray-50,
html.dark .divide-gray-100, html.dark .divide-gray-200 { border-color: #334155 !important; }

/* Leaderboard rank-1 row tint (Tailwind opacity-modifier class is its own
   literal class name, distinct from .bg-amber-50 — needs its own rule) */
html.dark .bg-amber-50\/30 { background-color: rgba(251,191,36,.08) !important; }

/* Inputs/selects/textareas using default Tailwind gray border+white bg */
html.dark input, html.dark select, html.dark textarea {
    background-color: #16213a !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}
html.dark input::placeholder, html.dark textarea::placeholder { color: #64748b !important; }

/* Shadows read as muddy gray glare on dark backgrounds — soften to a
   neutral, less visible shadow so cards don't look "dirty". */
html.dark .shadow-sm, html.dark .shadow, html.dark .shadow-md, html.dark .shadow-lg {
    box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.25) !important;
}

/* Hover states that assumed a light surface */
html.dark .hover\:bg-gray-50:hover, html.dark .hover\:bg-gray-100:hover,
html.dark .hover\:bg-indigo-50:hover { background-color: #233047 !important; }

/* ── Color-family badge/pill inversion ───────────────────────────────
   Covers status_badge_class(), score-pill, pipeline chips, etc. — all
   built from the same Tailwind `bg-{color}-50/100/200` + `text-{color}-
   600/700/800` pattern. Translucent tint background + bright text reads
   correctly on a dark surface; a matching low-opacity border keeps each
   pill legible without a hard edge. */
html.dark .bg-gray-100.text-gray-600, html.dark .bg-gray-200.text-gray-600 { background-color: rgba(148,163,184,.16) !important; color: #cbd5e1 !important; }
html.dark .bg-sky-100, html.dark .bg-sky-50    { background-color: rgba(56,189,248,.16) !important; }
html.dark .text-sky-700, html.dark .text-sky-800 { color: #7dd3fc !important; }
html.dark .bg-blue-100, html.dark .bg-blue-50  { background-color: rgba(96,165,250,.16) !important; }
html.dark .text-blue-700, html.dark .text-blue-800 { color: #93c5fd !important; }
html.dark .bg-indigo-100, html.dark .bg-indigo-50 { background-color: rgba(129,140,248,.18) !important; }
html.dark .text-indigo-700, html.dark .text-indigo-800 { color: #a5b4fc !important; }
html.dark .bg-violet-100, html.dark .bg-violet-50 { background-color: rgba(167,139,250,.18) !important; }
html.dark .text-violet-700, html.dark .text-violet-800 { color: #c4b5fd !important; }
html.dark .bg-purple-100, html.dark .bg-purple-50 { background-color: rgba(192,132,252,.18) !important; }
html.dark .text-purple-700, html.dark .text-purple-800 { color: #d8b4fe !important; }
html.dark .bg-cyan-100, html.dark .bg-cyan-50  { background-color: rgba(34,211,238,.16) !important; }
html.dark .text-cyan-700, html.dark .text-cyan-800 { color: #67e8f9 !important; }
html.dark .bg-teal-100, html.dark .bg-teal-50  { background-color: rgba(45,212,191,.16) !important; }
html.dark .text-teal-700, html.dark .text-teal-800 { color: #5eead4 !important; }
html.dark .bg-green-100, html.dark .bg-green-50 { background-color: rgba(74,222,128,.16) !important; }
html.dark .text-green-700, html.dark .text-green-800 { color: #86efac !important; }
html.dark .bg-lime-100, html.dark .bg-lime-50  { background-color: rgba(163,230,53,.16) !important; }
html.dark .text-lime-700, html.dark .text-lime-800 { color: #bef264 !important; }
html.dark .bg-yellow-100, html.dark .bg-yellow-50 { background-color: rgba(250,204,21,.18) !important; }
html.dark .text-yellow-700, html.dark .text-yellow-800 { color: #fde047 !important; }
html.dark .bg-amber-100, html.dark .bg-amber-50 { background-color: rgba(251,191,36,.18) !important; }
html.dark .text-amber-700, html.dark .text-amber-800 { color: #fcd34d !important; }
html.dark .bg-orange-100, html.dark .bg-orange-50 { background-color: rgba(251,146,60,.18) !important; }
html.dark .text-orange-700, html.dark .text-orange-800 { color: #fdba74 !important; }
html.dark .bg-red-100, html.dark .bg-red-50    { background-color: rgba(248,113,113,.16) !important; }
html.dark .text-red-700, html.dark .text-red-800 { color: #fca5a5 !important; }
html.dark .bg-pink-100, html.dark .bg-pink-50  { background-color: rgba(244,114,182,.16) !important; }
html.dark .text-pink-700, html.dark .text-pink-800 { color: #f9a8d4 !important; }
html.dark .bg-rose-100, html.dark .bg-rose-50  { background-color: rgba(251,113,133,.16) !important; }
html.dark .text-rose-700, html.dark .text-rose-800 { color: #fda4af !important; }

/* Same color families at the -600 shade — widely used for icon badges
   (e.g. "bg-blue-100 text-blue-600") and link/accent text throughout the
   app, distinct from the -700/-800 "pill label" usage above. */
html.dark .text-indigo-600 { color: #a5b4fc !important; }
html.dark .text-blue-600   { color: #60a5fa !important; }
html.dark .text-sky-600    { color: #38bdf8 !important; }
html.dark .text-cyan-600   { color: #22d3ee !important; }
html.dark .text-teal-600   { color: #2dd4bf !important; }
html.dark .text-green-600  { color: #4ade80 !important; }
html.dark .text-lime-600   { color: #a3e635 !important; }
html.dark .text-yellow-600 { color: #facc15 !important; }
html.dark .text-amber-600  { color: #fbbf24 !important; }
html.dark .text-orange-600 { color: #fb923c !important; }
html.dark .text-red-600    { color: #f87171 !important; }
html.dark .text-pink-600   { color: #f472b6 !important; }
html.dark .text-rose-600   { color: #fb7185 !important; }
html.dark .text-purple-600 { color: #c084fc !important; }
html.dark .text-violet-600 { color: #a78bfa !important; }

/* Card hover states (hover:border-indigo-200 hover:bg-indigo-50, etc.) */
html.dark .hover\:border-indigo-200:hover { border-color: rgba(129,140,248,.5) !important; }
html.dark .hover\:border-green-200:hover  { border-color: rgba(74,222,128,.5) !important; }
html.dark .hover\:border-red-200:hover    { border-color: rgba(248,113,113,.5) !important; }
html.dark .hover\:border-purple-200:hover { border-color: rgba(192,132,252,.5) !important; }

/* Status-tinted task cards (Task Saya — done = green, overdue = red),
   both the resting border and the slightly-stronger hover/300 variants
   the card swaps to. */
html.dark .border-green-200 { border-color: rgba(74,222,128,.4) !important; }
html.dark .border-red-200   { border-color: rgba(248,113,113,.4) !important; }
html.dark .hover\:border-green-300:hover { border-color: rgba(74,222,128,.65) !important; }
html.dark .hover\:border-red-300:hover   { border-color: rgba(248,113,113,.65) !important; }
html.dark .hover\:bg-green-100:hover { background-color: rgba(74,222,128,.22) !important; }
html.dark .hover\:bg-red-100:hover   { background-color: rgba(248,113,113,.22) !important; }

/* Sidebar already renders dark in both themes (navy gradient) — no
   change needed. The mobile sidebar overlay backdrop still applies. */

/* Avatar ring (profile/header initials bubble) gets a touch more glow
   on dark surfaces so it still pops as a "character badge". */
html.dark .rounded-full.bg-indigo-600 {
    box-shadow: 0 0 0 3px #1e293b, 0 0 0 5px #818cf8, 0 0 14px rgba(129,140,248,.45) !important;
}

/* Toasts/flash alerts that used light success/error tints */
html.dark .bg-green-50 { background-color: rgba(34,197,94,.12) !important; }
html.dark .bg-red-50   { background-color: rgba(239,68,68,.12) !important; }
html.dark .bg-indigo-50 { background-color: rgba(99,102,241,.14) !important; }

/* ── Shared task drawer (includes/task_drawer_html.php — used by
   dashboards, my_tasks.php, available.php, review/queue.php). Built with
   inline styles, same reasoning as the Project Tracker overrides above:
   plain readable surfaces, not the showcase glow treatment, since it's
   opened constantly while doing real review/submission work. matrix.php
   has its own near-identical drawer with its own scoped dark rules in its
   page-level <style> block — this covers every other page that reuses
   the shared include. */
html.dark #taskDrawer { background: #1e293b !important; }
html.dark #taskDrawer > div:first-child { background: #16213a !important; border-bottom-color: #334155 !important; }
html.dark #drawerBody > div:last-child { background: #16213a !important; border-left-color: #334155 !important; }

/* ── Theme toggle button itself ──────────────────────────────────────
   No unscoped base color rule here on purpose: the header-bar toggle
   (includes/header.php) already gets its color from its own `text-
   gray-500` class, and the login-page toggle uses `text-white` against
   its indigo background — an ID-selector base rule here would beat
   both via specificity. Only the dark-mode accent is set globally. */
html.dark #themeToggle { color: #fcd34d; }
html.dark #themeToggle:hover { background-color: #233047 !important; }

/* ── Auth (login) background — animated grid + slowly drifting glow ───
   Layer order matters: background-image stacks first-listed-on-top, so
   the two soft glow blobs and the grid lines sit above the base diagonal
   gradient. Only background-position is animated (cheap to animate,
   no layout/paint thrashing), giving a slow "drifting nebula" feel
   without being distracting on a login screen people look at briefly. */
.auth-bg {
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,.16), transparent 42%),
        radial-gradient(circle at 80% 75%, rgba(255,255,255,.10), transparent 42%),
        linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px),
        linear-gradient(135deg, #4338ca 0%, #6366f1 50%, #818cf8 100%);
    background-size: auto, auto, 46px 46px, 46px 46px, cover;
    background-repeat: no-repeat, no-repeat, repeat, repeat, no-repeat;
    background-attachment: fixed, fixed, fixed, fixed, fixed;
    animation: authBgDrift 20s ease-in-out infinite alternate;
}
html.dark .auth-bg {
    background-image:
        radial-gradient(circle at 20% 30%, rgba(99,102,241,.5), transparent 42%),
        radial-gradient(circle at 80% 75%, rgba(139,92,246,.4), transparent 42%),
        linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px),
        radial-gradient(circle at 30% 20%, #312e81 0%, #0b1120 55%, #020617 100%);
    background-size: auto, auto, 46px 46px, 46px 46px, cover;
}
@keyframes authBgDrift {
    0%   { background-position: 0% 0%,   100% 100%, 0 0,     0 0,     center; }
    100% { background-position: 12% 9%,  88% 91%,   34px 28px, 34px 28px, center; }
}

/* ── "Showcase" opt-in helpers for dashboards/leaderboard/profile/login ──
   Pages that want the fuller game/NFT-style treatment (neon glow, gradient
   headline, glowing stat counters) opt in with these classes — kept
   separate from the base overrides above so the dense Project Tracker
   table is never accidentally swept into the flashier styling. */
html.dark .hero-glow-text {
    background: linear-gradient(90deg, #a5b4fc 0%, #fcd34d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stat-glow {
    transition: box-shadow .2s ease, transform .2s ease;
}
html.dark .stat-glow {
    background: linear-gradient(160deg, #1e293b 0%, #16213a 100%) !important;
    border: 1px solid rgba(129,140,248,.35) !important;
    box-shadow: 0 0 0 1px rgba(129,140,248,.12), 0 8px 24px rgba(79,70,229,.18);
}
html.dark .stat-glow:hover {
    box-shadow: 0 0 0 1px rgba(252,211,77,.35), 0 10px 28px rgba(252,211,77,.18);
    transform: translateY(-2px);
}
html.dark .stat-glow .stat-glow-number {
    color: #fcd34d;
    text-shadow: 0 0 18px rgba(252,211,77,.35);
}

/* =====================================================================
   Dashboard hero banner — "character profile card" pattern requested by
   the user from two reference UIs (gradient hero, big display-font name,
   avatar, quick badges, icon-tile stats, mini stat chart). Reuses the
   app's own existing brand gradient (same 3-stop indigo→violet already
   used for the active sidebar item / login background) rather than
   introducing new colors, per "sesuaikan dengan style warna yang ada".
   ===================================================================== */
.font-display {
    font-family: 'Zalando Sans Expanded', 'Inter', ui-sans-serif, sans-serif;
    font-weight: 700;
    letter-spacing: .01em;
}
.font-display-900 {
    font-weight: 900;
}

.dashboard-hero {
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem;
    padding: 1.5rem 1.75rem;
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 50%, #818cf8 100%);
    box-shadow: 0 14px 32px rgba(67,56,202,.28);
}
.dashboard-hero-glow {
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 12% 15%, rgba(255,255,255,.20), transparent 45%),
        radial-gradient(circle at 88% 85%, rgba(255,255,255,.12), transparent 45%);
    pointer-events: none;
}
.dashboard-hero-watermark {
    position: absolute;
    right: -16px; bottom: -28px;
    width: 168px; height: 168px;
    color: rgba(255,255,255,.10);
    pointer-events: none;
}
.dashboard-hero-avatar {
    /* Bigger avatar beside the name/role per the user's own mockup
       (big circle on the left, identity text to its right). */
    width: 104px; height: 104px;
    border-radius: 9999px;
    border: 3px solid rgba(255,255,255,.55);
    background: rgba(255,255,255,.18);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,.22);
    flex-shrink: 0;
}
@media (min-width: 640px) {
    .dashboard-hero-avatar { width: 124px; height: 124px; }
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.28);
    color: #fff;
    border-radius: 9999px;
    padding: 3px 11px;
    font-size: .72rem;
    font-weight: 600;
    white-space: nowrap;
}
.hero-divider {
    height: 1px;
    background: rgba(255,255,255,.18);
    margin: 1.25rem 0;
}
html.dark .dashboard-hero {
    box-shadow: 0 14px 32px rgba(0,0,0,.5), 0 0 0 1px rgba(129,140,248,.25);
}

/* Icon-tile stat cards — used outside the hero (e.g. on pages that show
   plain stat cards without the gradient hero treatment). */
.stat-tile-icon {
    width: 2.5rem; height: 2.5rem;
    border-radius: .85rem;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    box-shadow: 0 4px 10px -2px rgba(0,0,0,.28);
    flex-shrink: 0;
}
.stat-tile-icon.tile-indigo { background: linear-gradient(135deg,#818cf8,#4f46e5); }
.stat-tile-icon.tile-amber  { background: linear-gradient(135deg,#fcd34d,#f59e0b); }
.stat-tile-icon.tile-blue   { background: linear-gradient(135deg,#60a5fa,#3b82f6); }
.stat-tile-icon.tile-green  { background: linear-gradient(135deg,#4ade80,#16a34a); }
.stat-tile-icon.tile-red    { background: linear-gradient(135deg,#f87171,#dc2626); }
.stat-tile-icon.tile-gray   { background: linear-gradient(135deg,#9ca3af,#6b7280); }
.stat-tile-icon.tile-purple { background: linear-gradient(135deg,#c084fc,#9333ea); }

/* Glass stat tiles — used INSIDE the hero, sitting on the gradient itself
   (per follow-up: fold the separate stat-card row + Statistik chart card
   into the hero rather than leaving them as plain white cards below it). */
.hero-stat-tile {
    background: rgba(255,255,255,.13);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: .65rem;
    padding: .5rem .8rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    min-width: 130px;
}
.hero-stat-tile .hero-stat-icon {
    width: 1.9rem; height: 1.9rem;
    border-radius: .55rem;
    background: rgba(255,255,255,.16);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    flex-shrink: 0;
}
.hero-stat-tile .hero-stat-value { color: #fff; font-size: 1.05rem; font-weight: 700; line-height: 1.15; }
.hero-stat-tile .hero-stat-value.urgent { color: #fecaca; }
.hero-stat-tile .hero-stat-label { color: rgba(255,255,255,.72); font-size: .66rem; }

.hero-stat-tile.highlighted {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.32) 0%, rgba(217, 70, 239, 0.22) 100%) !important;
    border: 1.5px solid rgba(245, 158, 11, 0.65) !important;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.45), inset 0 0 8px rgba(245, 158, 11, 0.2);
    animation: dvStatPulse 2.5s infinite ease-in-out;
}
.hero-stat-tile.highlighted .hero-stat-icon {
    background: rgba(245, 158, 11, 0.35) !important;
    color: #fef08a !important;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}
.hero-stat-tile.highlighted .hero-stat-value {
    color: #fef08a !important;
    font-size: 1.18rem !important;
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}
.hero-stat-tile.highlighted .hero-stat-label {
    color: #fef3c7 !important;
    font-weight: 600 !important;
}

.hero-badge.highlighted {
    background: rgba(245, 158, 11, 0.3) !important;
    border: 1px solid rgba(245, 158, 11, 0.6) !important;
    color: #fef08a !important;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.35);
    font-weight: 700 !important;
}

@keyframes dvStatPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 16px rgba(245, 158, 11, 0.45); }
    50% { transform: scale(1.02); box-shadow: 0 0 24px rgba(245, 158, 11, 0.65), 0 0 8px rgba(217, 70, 239, 0.35); }
}

/* Mini "Statistik" sparkline — both the standalone card (light bg, used on
   pages without a hero) and the in-hero version (sits on the gradient,
   line/labels rendered in white — see render_sparkline() color param). */
.sparkline-wrap { height: 64px; }

/* =====================================================================
   GAMIFICATION LAYER — Level-Up Overlay, Badge Toasts, XP Bar,
   Kanban Board, Calendar View, Score Animations
   ===================================================================== */

/* ── Level-Up Full-Screen Overlay ──────────────────────────────────── */
#dvLvlOverlay {
    position: fixed; inset: 0; z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(4px);
    animation: dvFadeIn .3s ease;
    perspective: 600px;
}
.dv-lvlup-box {
    position: relative; overflow: visible;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4c1d95 100%);
    border: 1px solid rgba(165,180,252,.4);
    border-radius: 20px;
    padding: 2.5rem 2.75rem;
    text-align: center;
    max-width: 380px; width: 90%;
    box-shadow: 0 0 0 1px rgba(165,180,252,.2), 0 32px 64px rgba(0,0,0,.5), 0 0 80px rgba(99,102,241,.3);
    animation: dvBounceIn .5s cubic-bezier(.34,1.56,.64,1), dvAutotilt 6s ease-in-out infinite alternate 0.5s;
    transform-style: preserve-3d;
    will-change: transform;
}
.dv-lvlup-glow {
    position: absolute; inset: 0; pointer-events: none;
    border-radius: 20px;
    background: radial-gradient(circle at 50% 30%, rgba(165,180,252,.25), transparent 60%);
    transform: translateZ(20px);
}
.dv-lvlup-icon {
    font-size: 3.5rem; line-height: 1; margin-bottom: .5rem;
    animation: dvIconPulse 1.2s ease infinite;
    transform: translateZ(110px);
    display: inline-block;
}
.dv-lvlup-pill {
    display: inline-block;
    background: linear-gradient(90deg, #fcd34d, #f59e0b);
    color: #1c1917; font-size: .7rem; font-weight: 800;
    letter-spacing: .12em; padding: .2rem .9rem; border-radius: 999px;
    margin-bottom: .75rem;
    transform: translateZ(60px);
}
.dv-lvlup-num {
    font-size: 3rem; font-weight: 900; color: #fcd34d;
    text-shadow: 0 0 24px rgba(252,211,77,.5);
    line-height: 1; margin-bottom: .25rem;
    transform: translateZ(95px);
}
.dv-lvlup-title {
    font-size: 1.35rem; font-weight: 700; color: #e0e7ff;
    margin-bottom: .5rem;
    transform: translateZ(80px);
}
.dv-lvlup-sub {
    font-size: .85rem; color: rgba(224,231,255,.65); margin-bottom: 1.5rem;
    transform: translateZ(50px);
}
.dv-lvlup-btn {
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    color: #fff; border: none; border-radius: 10px;
    padding: .6rem 1.4rem; font-size: .88rem; font-weight: 700;
    cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background-color .15s ease, border-color .15s ease;
    box-shadow: 0 4px 16px rgba(99,102,241,.4);
    transform: translateZ(85px);
}
.dv-lvlup-btn:hover { transform: translateZ(85px) translateY(-2px); box-shadow: 0 8px 24px rgba(99,102,241,.55); }
.dv-lvlup-btn:active { transform: translateZ(85px) scale(.97); }

.dv-lvlup-btn-sec {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #cbd5e1 !important;
    box-shadow: none !important;
}
.dv-lvlup-btn-sec:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.1) !important;
}

/* ── Roadmap Progress Line ─────────────────────────────────────────── */
.dv-lvlup-roadmap {
    position: relative;
    margin: 1.5rem 0 2.2rem;
    padding: 0 .2rem;
    transform: translateZ(65px);
    transform-style: preserve-3d;
}
.dv-roadmap-line {
    position: absolute;
    top: 13px; /* vertical center of the node circles */
    left: 0.5rem; right: 0.5rem;
    height: 4px;
    background: rgba(255,255,255,.1);
    border-radius: 2px;
    z-index: 1;
}
.dv-roadmap-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #a855f7, #fcd34d);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(168,85,247,.6);
    transition: width 1s ease-out;
}
.dv-roadmap-nodes {
    position: relative;
    display: flex;
    justify-content: space-between;
    z-index: 2;
    transform-style: preserve-3d;
}
.dv-roadmap-node {
    position: relative;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: #1e1b4b;
    border: 2px solid rgba(255,255,255,.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .3s cubic-bezier(.34,1.56,.64,1);
    transform-style: preserve-3d;
}
.dv-roadmap-node-icon {
    font-size: .8rem;
    line-height: 1;
    transition: transform .3s;
}
.dv-roadmap-node-num {
    position: absolute;
    bottom: -16px;
    font-size: .55rem;
    font-weight: 700;
    color: rgba(255,255,255,.4);
    transition: color .3s;
}

/* Passed levels */
.dv-roadmap-node.passed {
    border-color: #a855f7;
    background: rgba(168,85,247,.2);
}
.dv-roadmap-node.passed .dv-roadmap-node-num {
    color: rgba(168,85,247,.8);
}

/* Active Level */
.dv-roadmap-node.active {
    border-color: #fcd34d;
    background: #4f46e5;
    transform: scale(1.3) translateZ(15px);
    box-shadow: 0 0 12px #fcd34d, 0 0 0 2px rgba(252,211,77,.3);
    animation: dvRoadmapActivePulse 1.5s ease-in-out infinite alternate;
}
.dv-roadmap-node.active .dv-roadmap-node-num {
    color: #fcd34d;
    font-weight: 800;
}

/* Locked levels */
.dv-roadmap-node.locked {
    opacity: .4;
    filter: grayscale(0.8);
}
.dv-roadmap-node.locked:hover {
    opacity: .8;
    filter: none;
    transform: scale(1.1);
}

@keyframes dvRoadmapActivePulse {
    0% {
        box-shadow: 0 0 12px #fcd34d, 0 0 0 2px rgba(252,211,77,.3);
    }
    100% {
        box-shadow: 0 0 20px #fcd34d, 0 0 0 5px rgba(252,211,77,.5);
    }
}


@keyframes dvAutotilt {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }
    25% {
        transform: rotateX(13deg) rotateY(16deg);
    }
    50% {
        transform: rotateX(-10deg) rotateY(-14deg);
    }
    75% {
        transform: rotateX(14deg) rotateY(-12deg);
    }
    100% {
        transform: rotateX(0deg) rotateY(0deg);
    }
}

/* ── Badge Toast Stack ─────────────────────────────────────────────── */
#dvBadgeContainer {
    position: fixed; bottom: 1.5rem; right: 1rem;
    z-index: 9990; display: flex; flex-direction: column; gap: .5rem;
    align-items: flex-end; pointer-events: none;
}
.dv-badge-toast {
    display: flex; align-items: center; gap: .75rem;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(99,102,241,.45);
    border-radius: 12px; padding: .7rem 1rem;
    min-width: 220px; max-width: 300px;
    box-shadow: 0 8px 24px rgba(0,0,0,.35), 0 0 0 1px rgba(99,102,241,.2);
    animation: dvSlideIn .35s cubic-bezier(.34,1.56,.64,1);
    pointer-events: all;
}
.dv-badge-out { animation: dvSlideOut .4s ease forwards; }
.dv-badge-icon { font-size: 2rem; line-height: 1; flex-shrink: 0; }
.dv-badge-label { font-size: .65rem; font-weight: 700; color: #fcd34d; letter-spacing: .08em; text-transform: uppercase; }
.dv-badge-name  { font-size: .9rem;  font-weight: 700; color: #e0e7ff; }
.dv-badge-desc  { font-size: .72rem; color: rgba(148,163,184,.8); margin-top: .1rem; }

/* ── Login Recap Modal (approve/revision/badge/level-up since last login) ──
   Center-screen, no auto-dismiss timer — stays until the participant
   explicitly clicks an action (see assets/js/game.js showLoginUpdatesRecap
   for why: an auto-vanishing toast made updates feel "lost" if missed). */
.dv-recap-overlay {
    position: fixed; inset: 0; z-index: 9995;
    background: rgba(15,23,42,.6); backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center; padding: 1rem;
    animation: dvFadeIn .25s ease;
}
.dv-recap-overlay.dv-recap-out { animation: dvFadeIn .2s ease reverse forwards; }
.dv-recap-box {
    background: #fff; border-radius: 18px; padding: 1.5rem;
    width: 100%; max-width: 420px; max-height: 80vh;
    display: flex; flex-direction: column; gap: 1rem;
    box-shadow: 0 32px 64px rgba(0,0,0,.35);
    animation: dvBounceIn .4s cubic-bezier(.34,1.56,.64,1);
}
.dv-recap-heading { font-size: 1.05rem; font-weight: 800; color: #1f2937; }
.dv-recap-list { display: flex; flex-direction: column; gap: .6rem; overflow-y: auto; }
.dv-recap-item {
    display: flex; align-items: flex-start; gap: .65rem;
    border-radius: 12px; padding: .65rem .8rem;
    border: 1px solid transparent;
}
.dv-recap-item-icon { font-size: 1.5rem; line-height: 1; flex-shrink: 0; }
.dv-recap-item-label { font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.dv-recap-item-msg { font-size: .82rem; font-weight: 500; color: #1f2937; margin-top: .1rem; line-height: 1.35; }
.dv-recap-item-approve  { background: #ecfdf5; border-color: rgba(16,185,129,.35); }
.dv-recap-item-revision { background: #fff7ed; border-color: rgba(245,158,11,.35); }
.dv-recap-item-badge    { background: #eef2ff; border-color: rgba(99,102,241,.35); }
/* Revision "attention" cue (classes added by showLoginUpdatesRecap in game.js) */
@keyframes dvRecapPulse {
  0%,100% { box-shadow: 0 32px 64px rgba(0,0,0,.35), 0 0 0 0 rgba(245,158,11,0); }
  50%     { box-shadow: 0 32px 64px rgba(0,0,0,.35), 0 0 0 7px rgba(245,158,11,.4); }
}
.dv-recap-box.dv-recap-attention { animation: dvBounceIn .4s cubic-bezier(.34,1.56,.64,1), dvRecapPulse 1.1s ease-in-out .45s 2; }
@keyframes dvRecapShake {
  0%,100% { transform: translateX(0); }
  15% { transform: translateX(-5px); } 30% { transform: translateX(4px); }
  45% { transform: translateX(-3px); } 60% { transform: translateX(2px); } 75% { transform: translateX(-1px); }
}
.dv-recap-item.dv-recap-shake { animation: dvRecapShake .5s ease; }
.dv-recap-item-levelup  { background: #fffbeb; border-color: rgba(245,158,11,.5); }
.dv-recap-item-approve  .dv-recap-item-label { color: #047857; }
.dv-recap-item-revision .dv-recap-item-label { color: #b45309; }
.dv-recap-item-badge    .dv-recap-item-label { color: #4338ca; }
.dv-recap-item-levelup  .dv-recap-item-label { color: #92400e; }
.dv-recap-actions { display: flex; gap: .6rem; justify-content: flex-end; }
.dv-recap-btn {
    border: none; border-radius: 10px; padding: .55rem 1.1rem;
    font-size: .82rem; font-weight: 700; cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
}
.dv-recap-btn:hover { transform: translateY(-1px); }
.dv-recap-btn-ghost   { background: #f3f4f6; color: #4b5563; }
.dv-recap-btn-primary { background: linear-gradient(90deg, #6366f1, #8b5cf6); color: #fff; box-shadow: 0 4px 14px rgba(99,102,241,.4); }

html.dark .dv-recap-box { background: #1e293b; }
html.dark .dv-recap-heading { color: #e2e8f0; }
html.dark .dv-recap-item-msg { color: #e2e8f0; }
html.dark .dv-recap-item-approve  { background: rgba(16,185,129,.12); }
html.dark .dv-recap-item-revision { background: rgba(245,158,11,.12); }
html.dark .dv-recap-item-badge    { background: rgba(99,102,241,.15); }
html.dark .dv-recap-item-levelup  { background: rgba(245,158,11,.15); }
html.dark .dv-recap-btn-ghost { background: rgba(255,255,255,.08); color: #cbd5e1; }

/* ── XP Bar (header mini-strip) ────────────────────────────────────── */
.dv-xp-strip {
    height: 3px; background: rgba(99,102,241,.15);
    overflow: hidden; position: relative;
}
.dv-xp-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #6366f1, #a855f7, #fcd34d);
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 6px rgba(99,102,241,.6);
}

/* ── XP Widget (sidebar / dashboard) ───────────────────────────────── */
.dv-xp-widget {
    background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(139,92,246,.08));
    border: 1px solid rgba(99,102,241,.25);
    border-radius: 12px; padding: .75rem 1rem;
}
.dv-xp-bar-track {
    height: 7px; background: rgba(255,255,255,.08);
    border-radius: 999px; overflow: hidden; margin: .4rem 0;
}
.dv-xp-bar-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #6366f1, #a855f7, #fcd34d);
    border-radius: 999px;
    box-shadow: 0 0 8px rgba(99,102,241,.5);
    transition: width 1.4s cubic-bezier(.4,0,.2,1);
}

/* ── Badge Grid (profile / dashboard) ──────────────────────────────── */
.dv-badge-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.dv-badge-chip {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .3rem .75rem; border-radius: 999px;
    font-size: .72rem; font-weight: 600; white-space: nowrap;
    border: 1px solid transparent;
    transition: transform .12s ease;
}
.dv-badge-chip:hover { transform: scale(1.06); }
.dv-badge-chip-earned {
    background: linear-gradient(135deg, rgba(99,102,241,.15), rgba(139,92,246,.1));
    border-color: rgba(99,102,241,.35);
    color: #e0e7ff;
}
.dv-badge-chip-locked {
    background: rgba(148,163,184,.08);
    border-color: rgba(148,163,184,.2);
    color: rgba(148,163,184,.5);
    filter: grayscale(1);
}


/* ── Calendar View ──────────────────────────────────────────────────── */
.dv-cal-wrapper { border-radius: 12px; overflow: hidden; border: 1px solid #e5e7eb; }
html.dark .dv-cal-wrapper { border-color: #334155; }
.dv-cal-grid {
    display: grid; grid-template-columns: repeat(7, 1fr);
    gap: 0;
}
.dv-cal-head-row { border-bottom: 1px solid #e5e7eb; }
html.dark .dv-cal-head-row { border-color: #334155; }
.dv-cal-body-grid { }
.dv-cal-head {
    background: #f9fafb; text-align: center; padding: .5rem .2rem;
    font-size: .7rem; font-weight: 700; color: #6b7280; text-transform: uppercase;
}
html.dark .dv-cal-head { background: #0f172a; color: #64748b; }
.dv-cal-cell {
    min-height: 90px; background: #fff;
    border-right: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9;
    padding: .3rem .35rem; position: relative;
    transition: background .1s;
}
.dv-cal-cell:nth-child(7n) { border-right: none; }
html.dark .dv-cal-cell  { background: #1e293b; border-color: #334155; }
.dv-cal-cell.dv-cal-today      { background: #eef2ff; }
html.dark .dv-cal-cell.dv-cal-today { background: rgba(99,102,241,.15); }
.dv-cal-cell.dv-cal-other-month { background: #fafafa; opacity: .5; }
html.dark .dv-cal-cell.dv-cal-other-month { background: #16213a; }
.dv-cal-cell.dv-cal-has-tasks { cursor: pointer; }
.dv-cal-cell.dv-cal-has-tasks:hover { background: #f8faff; }
html.dark .dv-cal-cell.dv-cal-has-tasks:hover { background: rgba(99,102,241,.08); }
.dv-cal-day { font-size: .75rem; font-weight: 600; color: #374151; margin-bottom: .2rem; }
html.dark .dv-cal-day { color: #94a3b8; }
.dv-cal-cell.dv-cal-today .dv-cal-day {
    background: #6366f1; color: #fff;
    width: 1.5rem; height: 1.5rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
/* Dot indicators (compact, top of cell) */
.dv-cal-dots { display: flex; gap: 3px; flex-wrap: wrap; margin-bottom: .25rem; }
.dv-cal-dot {
    width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
    display: inline-block;
}
.dv-cal-dot.overdue,  .dv-cal-dot-overdue  { background: #ef4444; }
.dv-cal-dot.urgent,   .dv-cal-dot-urgent   { background: #f59e0b; }
.dv-cal-dot.ok,       .dv-cal-dot-ok       { background: #10b981; }
/* Task mini-items inside cells */
.dv-cal-tasks-list { display: flex; flex-direction: column; gap: 2px; }
.dv-cal-task-item {
    display: flex; align-items: center; justify-content: space-between;
    font-size: .62rem; padding: 1px 4px; border-radius: 4px;
    cursor: pointer; gap: .2rem;
    transition: opacity .1s;
}
.dv-cal-task-item:hover { opacity: .8; }
.dv-task-overdue { background: #fee2e2; color: #991b1b; }
.dv-task-urgent  { background: #fef3c7; color: #92400e; }
.dv-task-ok      { background: #d1fae5; color: #065f46; }
html.dark .dv-task-overdue { background: rgba(239,68,68,.2);  color: #fca5a5; }
html.dark .dv-task-urgent  { background: rgba(245,158,11,.2); color: #fcd34d; }
html.dark .dv-task-ok      { background: rgba(16,185,129,.2); color: #6ee7b7; }
.dv-cal-more { font-size: .6rem; color: #9ca3af; text-align: center; margin-top: 1px; }

/* ── Comments Section ───────────────────────────────────────────────── */
.dv-comment {
    display: flex; gap: .5rem; align-items: flex-start;
    padding: .5rem 0; border-bottom: 1px solid rgba(229,231,235,.6);
}
.dv-comment:last-child { border-bottom: none; }
.dv-comment-avatar {
    width: 1.75rem; height: 1.75rem; border-radius: 50%;
    background: #e0e7ff; color: #4338ca; font-size: .65rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dv-comment-body { flex: 1; min-width: 0; }
.dv-comment-meta { font-size: .68rem; color: #9ca3af; }
.dv-comment-text { font-size: .78rem; color: #374151; margin-top: .1rem; line-height: 1.45; }
html.dark .dv-comment-text { color: #cbd5e1; }

/* ── Keyframes ──────────────────────────────────────────────────────── */
@keyframes dvFadeIn    { from { opacity:0 } to { opacity:1 } }
@keyframes dvBounceIn  { from { opacity:0; transform: scale(.6) } to { opacity:1; transform: scale(1) } }
@keyframes dvSlideIn   { from { opacity:0; transform: translateX(120%) } to { opacity:1; transform: translateX(0) } }
@keyframes dvSlideOut  { from { opacity:1; transform: translateX(0) } to { opacity:0; transform: translateX(120%) } }
@keyframes dvPulse     { 0%,100% { transform: scale(1) } 50% { transform: scale(1.12) } }
@keyframes dvIconPulse { 0%,100% { transform: translateZ(110px) scale(1) } 50% { transform: translateZ(110px) scale(1.12) } }
@keyframes dvXpShimmer {
    0%   { background-position: -200% center }
    100% { background-position:  200% center }
}

/* ── Score counter that highlights when it just animated ────────────── */
.score-just-counted {
    animation: dvScoreFlash .6s ease forwards;
}
@keyframes dvScoreFlash {
    0%   { color: #fcd34d; text-shadow: 0 0 12px rgba(252,211,77,.7) }
    100% { color: inherit; text-shadow: none }
}

/* ── Dark mode for game elements ─────────────────────────────────────── */
html.dark .dv-xp-strip   { background: rgba(99,102,241,.1); }
html.dark .dv-xp-widget  { background: linear-gradient(135deg,rgba(99,102,241,.18),rgba(139,92,246,.12)); border-color: rgba(99,102,241,.35); }
html.dark .dv-xp-bar-track { background: rgba(255,255,255,.06); }
html.dark .dv-badge-chip-earned { background: linear-gradient(135deg,rgba(99,102,241,.2),rgba(139,92,246,.15)); border-color: rgba(165,180,252,.4); }
html.dark .dv-cal-grid { border-color: #334155; }

/* =====================================================================
   DARK MODE — card overrides (task cards, form elements, selects)
   ===================================================================== */

/* ── Task Saya cards (.mtf-card) ──────────────────────────────────── */
html.dark .mtf-card {
    background: #1e1b4b !important;
    border-color: rgba(99,102,241,.15) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,.3) !important;
}
html.dark .mtf-card:hover {
    box-shadow: 0 10px 30px rgba(99,102,241,.22) !important;
}
html.dark .mtf-card-pts    { color: #94a3b8 !important; }
html.dark .mtf-card-body   { background: transparent !important; }
html.dark .mtf-revision-box {
    background: rgba(239,68,68,.12) !important;
    border-left-color: #f87171 !important;
    color: #fca5a5 !important;
}

/* ── Task Marketplace cards (.avail-task-card) ────────────────────── */
html.dark .avail-task-card {
    background: #1e1b4b !important;
    box-shadow: 0 2px 12px rgba(0,0,0,.3) !important;
}
html.dark .avail-task-card:hover {
    box-shadow: 0 8px 28px rgba(99,102,241,.25) !important;
}
html.dark .avail-task-seq    { color: #64748b !important; }
html.dark .avail-task-desc   { color: #cbd5e1 !important; }
html.dark .avail-task-foot   { background: rgba(99,102,241,.08) !important; }
html.dark .avail-task-pts    { color: #94a3b8 !important; }
html.dark .avail-kosong      { background: rgba(249,115,22,.15) !important; color: #fb923c !important; }
html.dark .avail-assignee    { color: #e2e8f0 !important; }
html.dark .avail-task-bar    { border-top-color: rgba(99,102,241,.12) !important; }
html.dark .avail-btn-gray    { background: #1e293b !important; color: #64748b !important; }
html.dark .avail-btn-gray:hover { background: rgba(239,68,68,.2) !important; color: #f87171 !important; }

/* ── Global: selects & inputs with inline bg:#fff ─────────────────── */
html.dark select.dm-select {
    background: #1e1b4b !important;
    border-color: rgba(139,92,246,.3) !important;
    color: #e2e8f0 !important;
}
html.dark .dm-label { color: #94a3b8 !important; }
html.dark .dm-value { color: #e2e8f0 !important; }

/* =====================================================================
   KANBAN BOARD — board/kanban.php
   ===================================================================== */

/* ── Scroll container ─────────────────────────────────────────────── */
.dv-kanban-scroll {
    display: flex;
    gap: .875rem;
    overflow-x: auto;
    padding-bottom: 1.25rem;
    align-items: flex-start;
    min-height: calc(100vh - 180px);
}
.dv-kanban-scroll::-webkit-scrollbar { height: 6px; }
.dv-kanban-scroll::-webkit-scrollbar-track { background: transparent; }
.dv-kanban-scroll::-webkit-scrollbar-thumb { background: rgba(124,58,237,.25); border-radius: 3px; }

/* ── Column ───────────────────────────────────────────────────────── */
.dv-kanban-col {
    flex-shrink: 0;
    width: 272px;
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    background: #f8f7ff;
    border: 1px solid rgba(124,58,237,.09);
    overflow: hidden;
}

/* ── Column header ─────────────────────────────────────────────────── */
.dv-kanban-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .65rem .875rem;
    font-size: .78rem;
    font-weight: 700;
    color: #fff;
    gap: .5rem;
    border-bottom: 2px solid rgba(255,255,255,.15);
}

/* Column accent colours per status */
.dv-col-available    { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.dv-col-in_progress  { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.dv-col-submitted    { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.dv-col-under_review { background: linear-gradient(135deg, #f59e0b, #d97706); }
.dv-col-revision     { background: linear-gradient(135deg, #ef4444, #dc2626); }
.dv-col-approved     { background: linear-gradient(135deg, #10b981, #059669); }

/* ── Count badge ──────────────────────────────────────────────────── */
.dv-kanban-badge {
    background: rgba(255,255,255,.25);
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    padding: .1rem .5rem;
    border-radius: 999px;
    min-width: 1.4rem;
    text-align: center;
    flex-shrink: 0;
}

/* ── Column body (scrollable) ─────────────────────────────────────── */
.dv-kanban-col-body {
    padding: .6rem .6rem;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    overflow-y: auto;
    max-height: calc(100vh - 260px);
    min-height: 80px;
}
.dv-kanban-col-body::-webkit-scrollbar { width: 4px; }
.dv-kanban-col-body::-webkit-scrollbar-thumb { background: rgba(124,58,237,.2); border-radius: 2px; }

/* ── Empty state ──────────────────────────────────────────────────── */
.dv-kanban-empty {
    text-align: center;
    color: #c4b5fd;
    font-size: .72rem;
    font-style: italic;
    padding: 1.5rem .5rem;
}

/* ── Card ─────────────────────────────────────────────────────────── */
.dv-kanban-card {
    background: transparent;
    border-radius: 10px;
    border: 1px solid rgba(124,58,237,.08);
    padding: 0;
    overflow: visible;
    position: relative;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, border-color .15s;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.dv-kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(99,102,241,.18);
    border-color: rgba(99,102,241,.25);
}
.dv-card-overdue {
    border-left: 3px solid #ef4444;
}
.dv-card-due-soon {
    border-left: 3px solid #f59e0b;
}

/* ── Card header (gradient) ───────────────────────────────────────── */
.dv-kanban-card-header {
    border-radius: 10px 10px 0 0;
    padding: .5rem .75rem .45rem;
}

/* ── Card body ────────────────────────────────────────────────────── */
.dv-kanban-card-body {
    background: #fff;
    border-radius: 0 0 10px 10px;
    padding: .5rem .75rem .6rem;
}

/* ── Card top row: pipeline tag + deadline ────────────────────────── */
.dv-kanban-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .4rem;
    margin-bottom: .45rem;
    flex-wrap: wrap;
}

/* ── Pipeline tag ─────────────────────────────────────────────────── */
.dv-kanban-pipeline-tag {
    font-size: .62rem;
    font-weight: 700;
    padding: .15rem .5rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .04em;
    flex-shrink: 0;
}

/* ── Deadline text ────────────────────────────────────────────────── */
.dv-kanban-deadline {
    font-size: .65rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* ── Card title (shot code) ───────────────────────────────────────── */
.dv-kanban-card-title {
    font-size: .82rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
    margin-bottom: .45rem;
    word-break: break-word;
}

/* ── Assignee row ─────────────────────────────────────────────────── */
.dv-kanban-assignee {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .72rem;
    color: #374151;
    font-weight: 500;
}
.dv-kanban-avatar {
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #9333ea);
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dv-kanban-unassigned {
    font-size: .68rem;
    color: #d1d5db;
    font-style: italic;
    margin-bottom: .1rem;
}

/* ── Score pill ───────────────────────────────────────────────────── */
.dv-kanban-score {
    margin-top: .45rem;
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .68rem;
    color: #854d0e;
    font-weight: 700;
    background: #fef9c3;
    border-radius: 999px;
    padding: .15rem .55rem;
    width: fit-content;
}

/* ── Dark mode ────────────────────────────────────────────────────── */
html.dark .dv-kanban-col          { background: #1a1535; border-color: rgba(99,102,241,.15); }
html.dark .dv-kanban-card         { background: transparent; border-color: rgba(99,102,241,.15); box-shadow: none; }
html.dark .dv-kanban-card:hover   { border-color: rgba(99,102,241,.4); box-shadow: 0 4px 16px rgba(99,102,241,.2); }
html.dark .dv-kanban-card-body    { background: #1e1b4b; }
html.dark .dv-kanban-card-title   { color: #e2e8f0; }
html.dark .dv-kanban-empty        { color: #6d5fcf; }
html.dark .dv-card-overdue        { border-left-color: #f87171; }
html.dark .dv-card-due-soon       { border-left-color: #fbbf24; }
html.dark .dv-kanban-assignee     { color: #cbd5e1; }
html.dark .dv-kanban-unassigned   { color: #4b5563; }
html.dark .dv-kanban-score        { background: #3b2a06; color: #fcd34d; }


/* ══ Overdue pulse — kartu/baris terlambat "berdetak" (2026-07-03) ══
   Grow & shrink halus + outer glow merah yang blur (bukan ring keras),
   sehingga glow otomatis mengikuti border-radius kartu (14px+). */
@keyframes overduePulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 8px 1px rgba(239,68,68,.22);
  }
  50% {
    transform: scale(1.015);
    box-shadow: 0 0 22px 5px rgba(239,68,68,.5);
  }
}
.overdue-pulse,
.dv-card-overdue {
  animation: overduePulse 1.7s ease-in-out infinite;
  will-change: transform, box-shadow;
}
/* Titik kalend
/* ══ Modal "Unlock Skill" bergaya game — dipakai marketplace & profil ══ */
.rq-sk-panel {
  background: linear-gradient(160deg, #1a0533 0%, #2e1065 100%);
  border: 1px solid rgba(139,92,246,.4);
  border-radius: 20px; width: 100%; max-width: 24rem; margin: 0 1rem;
  padding: 1.5rem; position: relative; overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.5), 0 0 40px rgba(124,58,237,.25);
}
.rq-sk-glow {
  position: absolute; top: -70px; right: -70px; width: 220px; height: 220px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(124,58,237,.35) 0%, transparent 70%);
}
.rq-sk-label {
  display: block; font-size: .6rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: #a78bfa; margin-bottom: .35rem;
}
.rq-sk-field {
  width: 100%; background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(139,92,246,.35); border-radius: 10px;
  padding: .55rem .75rem; font-size: .82rem; color: #fff; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.rq-sk-field::placeholder { color: rgba(148,163,184,.55); }
.rq-sk-field:focus { border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(139,92,246,.2); }
.rq-sk-field option { background: #2e1065; color: #fff; }
.rq-sk-divider {
  height: 1px; margin-bottom: 1rem;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,.5), transparent);
}
.rq-sk-send {
  flex: 1; position: relative; overflow: hidden; border: none; cursor: pointer;
  background: linear-gradient(135deg, #7c3aed, #4f46e5); color: #fff;
  font-size: .8rem; font-weight: 800; letter-spacing: .04em;
  padding: .6rem 1rem; border-radius: 11px;
  box-shadow: 0 0 16px rgba(124,58,237,.5), 0 4px 12px rgba(0,0,0,.3);
  transition: transform .15s, box-shadow .15s;
}
.rq-sk-send::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-110%);
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.15) 50%, transparent 100%);
  transition: transform .4s;
}
.rq-sk-send:hover { transform: translateY(-2px); box-shadow: 0 0 26px rgba(124,58,237,.75), 0 8px 18px rgba(0,0,0,.35); }
.rq-sk-send:hover::after { transform: translateX(110%); }
.rq-sk-send:active { transform: scale(.97); }
.rq-sk-cancel {
  flex: 1; border: 1px solid rgba(255,255,255,.14); cursor: pointer;
  background: rgba(255,255,255,.07); color: #cbd5e1;
  font-size: .8rem; font-weight: 700; padding: .6rem 1rem; border-radius: 11px;
  transition: background .15s;
}
.rq-sk-cancel:hover { background: rgba(255,255,255,.14); color: #fff; }
