/*
 * Plain CSS build of the utility classes used by the views.
 *
 * The Vite/Tailwind pipeline cannot run on this machine because Windows
 * Application Control blocks the rolldown native binding, so the handful of
 * classes the templates rely on are declared here instead. Replace this file
 * with `@import 'tailwindcss';` once the asset toolchain works again.
 */

*,
*::before,
*::after {
    box-sizing: border-box;
    border: 0 solid;
}

body {
    margin: 0;
    font-family: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
}

h1, h2, p, ul, table {
    margin: 0;
}

ul {
    padding: 0;
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

input, select, button {
    font: inherit;
    color: inherit;
    /* Reset the browser's default button chrome so links-style buttons do
       not render as grey chips and read as disabled. */
    background-color: transparent;
    border: 0;
    padding: 0;
    text-align: inherit;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.875em;
}

/* layout */
.h-full { height: 100%; }
.min-h-full { min-height: 100%; }
.block { display: block; }
.inline { display: inline; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sm\:grid-cols-3 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.lg\:grid-cols-2 { grid-template-columns: minmax(0, 1fr); }
.flex-wrap { flex-wrap: wrap; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
/* Lets a flex child shrink below its content width so long subject names
   wrap instead of stretching the row on narrow screens. */
.min-w-0 { min-width: 0; }
.font-normal { font-weight: 400; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.ml-auto { margin-left: auto; }
.mt-1 { margin-top: 0.25rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.max-w-sm { max-width: 24rem; }
.max-w-5xl { max-width: 64rem; }
.w-full { width: 100%; }
.inline-block { display: inline-block; }
.block { display: block; }
.grid { display: grid; }
.flex-col { flex-direction: column; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.overflow-hidden { overflow: hidden; }
.divide-y > * + * { border-top-width: 1px; }
.divide-slate-100 > * + * { border-color: #f1f5f9; }
.list-disc { list-style: disc; }
.pl-5 { padding-left: 1.25rem; }

/* spacing */
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.pt-4 { padding-top: 1rem; }
.pb-4 { padding-bottom: 1rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }

/* typography */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.antialiased { -webkit-font-smoothing: antialiased; }
.hover\:underline:hover { text-decoration: underline; }

/* colours */
.bg-white { background-color: #fff; }
.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-slate-900 { background-color: #0f172a; }
.bg-emerald-50 { background-color: #ecfdf5; }
.bg-emerald-100 { background-color: #d1fae5; }
.bg-rose-50 { background-color: #fff1f2; }
.bg-rose-100 { background-color: #ffe4e6; }
.bg-amber-100 { background-color: #fef3c7; }
.text-white { color: #fff; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.text-slate-800 { color: #1e293b; }
.text-slate-900 { color: #0f172a; }
.text-emerald-600 { color: #059669; }
.text-emerald-700 { color: #047857; }
.text-emerald-800 { color: #065f46; }
.text-rose-600 { color: #e11d48; }
.text-rose-700 { color: #be123c; }
.text-amber-500 { color: #f59e0b; }
.text-amber-800 { color: #92400e; }
.text-blue-600 { color: #2563eb; }

/* borders */
.border { border-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-r { border-right-width: 1px; }
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-300 { border-color: #cbd5e1; }
.border-emerald-200 { border-color: #a7f3d0; }
.border-rose-200 { border-color: #fecdd3; }
.text-rose-800 { color: #9f1239; }

/* shapes */
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* public pages: landing hero, timetable, assignments, recap */
.max-w-3xl { max-width: 48rem; }
.max-w-2xl { max-width: 42rem; }
.overflow-x-auto { overflow-x: auto; }
.whitespace-pre-line { white-space: pre-line; }
.mt-6 { margin-top: 1.5rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-0.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.bg-slate-200 { background-color: #e2e8f0; }
.bg-slate-900 { background-color: #0f172a; }
.text-slate-300 { color: #cbd5e1; }
.underline { text-decoration: underline; }
.hover\:bg-rose-50:hover { background-color: #fff1f2; }
.hover\:bg-slate-50:hover { background-color: #f8fafc; }
.hover\:bg-slate-100:hover { background-color: #f1f5f9; }
.hover\:bg-slate-700:hover { background-color: #334155; }
.hover\:text-white:hover { color: #fff; }
.hover\:underline:hover { text-decoration: underline; }
.flex-1 { flex: 1 1 0%; }
.pb-1\.5 { padding-bottom: 0.375rem; }
.text-amber-700 { color: #b45309; }

/* assignment list: two-column rows, deadline on the right */
.text-base { font-size: 1rem; }
.gap-x-4 { column-gap: 1rem; }
.gap-y-2 { row-gap: 0.5rem; }
.gap-x-6 { column-gap: 1.5rem; }
.gap-y-6 { row-gap: 1.5rem; }
.gap-4 { gap: 1rem; }
.items-start { align-items: flex-start; }
.items-baseline { align-items: baseline; }
.text-right { text-align: right; }
.justify-end { justify-content: flex-end; }
.inline-block { display: inline-block; }

/* responsive shell: the navbar stacks on narrow screens and the link row
   scrolls sideways instead of wrapping one item per line. */
.flex-col { flex-direction: column; }
.overflow-x-auto { overflow-x: auto; }
.whitespace-nowrap { white-space: nowrap; }
.-mx-1 { margin-left: -0.25rem; margin-right: -0.25rem; }

/* slot row: the action buttons sit on one line until the editor is opened,
   then it takes the full width so the form is not squeezed. */
.slot-editor { position: relative; }
.slot-editor[open] { width: 100%; }

/* mobile semester sheet */
.fixed { position: fixed; }
.inset-0 { inset: 0; }
.inset-x-0 { left: 0; right: 0; }
.bottom-0 { bottom: 0; }
.max-h-80 { max-height: 20rem; }
.z-30 { z-index: 30; }
.sheet-panel { z-index: 31; }

/* components */
input,
select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: #fff;
}

/* A checkbox is not a text field: the width:100% above would stretch it across
   the row and push its label to the far side, so it keeps its natural size. */
input[type="checkbox"],
input[type="radio"] {
    width: auto;
    padding: 0;
}

/* Slider (mis. besar logo): tinggi tipis, tanpa kotak input biasa. */
input[type="range"] {
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    accent-color: #4f46e5;
    height: 1.5rem;
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 0.375rem;
    border-radius: 9999px;
    background-color: #e2e8f0;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    margin-top: -0.3125rem;
    height: 1rem;
    width: 1rem;
    border-radius: 9999px;
    background-color: #4f46e5;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgb(15 23 42 / 0.35);
}

input[type="range"]::-moz-range-track {
    height: 0.375rem;
    border-radius: 9999px;
    background-color: #e2e8f0;
}

input[type="range"]::-moz-range-thumb {
    height: 1rem;
    width: 1rem;
    border-radius: 9999px;
    background-color: #4f46e5;
    border: 2px solid #fff;
}

label > span {
    display: block;
}

button {
    cursor: pointer;
}

/* <details> dropdowns: hide the native disclosure triangle */
summary {
    list-style: none;
    cursor: pointer;
}

summary::-webkit-details-marker {
    display: none;
}

details > summary {
    display: flex;
}

.cursor-pointer { cursor: pointer; }
.whitespace-nowrap { white-space: nowrap; }

.hover\:underline:hover { text-decoration: underline; }
.hover\:bg-slate-50:hover { background-color: #f8fafc; }
.hover\:bg-rose-50:hover { background-color: #fff1f2; }
.hover\:text-rose-600:hover { color: #e11d48; }

/* positioning for dropdown menus */
.absolute { position: absolute; }
.relative { position: relative; }
.z-20 { z-index: 20; }
.right-0 { right: 0; }
.w-52 { width: 13rem; }
.w-56 { width: 14rem; }
.w-60 { width: 15rem; }
.mt-2 { margin-top: 0.5rem; }
.shadow-lg {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* The three activity cards, and a hairline that warms up on hover. */
.hover\:border-slate-300:hover { border-color: #cbd5e1; }
.dark .hover\:border-slate-300:hover { border-color: #64748b; }

/* Dropdown summaries lift to solid white; in dark mode they lift to the
   next slate step instead, so their light text stays readable. */
.hover\:bg-white:hover { background-color: #fff; }
.dark .hover\:bg-white:hover { background-color: #334155; }

/* The floating header: a white pill that lifts off the page. */
.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.shadow-pill { box-shadow: 0 10px 30px -12px rgb(15 23 42 / 0.25); }
.shadow-pill:hover { box-shadow: 0 14px 38px -12px rgb(15 23 42 / 0.35); }
.backdrop-blur { backdrop-filter: blur(8px); }
.bg-white\/85 { background-color: rgb(255 255 255 / 0.85); }

/* The nav links and dropdown summaries ease their colour changes. */
.transition { transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease; }

/* The hero photo sits behind the whole shell, under every layer of content. */
.object-cover { object-fit: cover; }
.min-h-screen { min-height: 100vh; }
.-z-10 { z-index: -10; }
.opacity-70 { opacity: 0.7; }
.opacity-0 { opacity: 0; }
.opacity-100 { opacity: 1; }
/* Tombol aksi pada kartu galeri: disembunyikan sampai kursor di atas kartu
   (`group` pada kartunya, `group-hover:` pada tombolnya). Tanpa aturan ini
   tombolnya tetap opacity:0 dan tidak pernah muncul. */
.group { position: relative; }
.group-hover\:opacity-100:hover { opacity: 1; }
.group-hover\:opacity-0:hover { opacity: 0; }
/* Di perangkat sentuh tidak ada kursor, jadi tidak ada hover: tombolnya harus
   tampil terus, kalau tidak aksi edit/hapus jadi mustahil dijangkau. */
@media (hover: none) {
  .group-hover\:opacity-100 { opacity: 1; }
}
.bg-slate-900\/60 { background-color: rgb(15 23 42 / 0.6); }

/* ---------------------------------------------------------------------------
   Dark mode.

   The stylesheet is a hand written subset of Tailwind, so there is no `dark:`
   variant to lean on: each colour utility gets a `.dark` counterpart by hand.

   Deliberately NOT flipped, because they are dark by design and their white
   text would vanish: the hero panel (bg-slate-900), the hero scrim
   (bg-slate-900/60), the drawer backdrop (bg-slate-900/50), text-white, and
   text-slate-300 which only ever sits on those dark panels. The solid status
   dots (bg-emerald-500, bg-amber-500) keep their colour too.
   --------------------------------------------------------------------------- */
.dark .bg-white { background-color: #0f172a; }
.dark .bg-white\/85 { background-color: rgb(15 23 42 / 0.85); }
.dark .bg-slate-50 { background-color: #1e293b; }
.dark .bg-slate-100 { background-color: #020617; }
.dark .bg-slate-200 { background-color: #1e293b; }

.dark .border-slate-100 { border-color: #1e293b; }
.dark .border-slate-200 { border-color: #334155; }
.dark .border-slate-300 { border-color: #475569; }
.dark .divide-slate-100 > * + * { border-color: #1e293b; }

.dark .text-slate-900 { color: #f1f5f9; }
.dark .text-slate-800 { color: #e2e8f0; }
.dark .text-slate-700 { color: #cbd5e1; }
.dark .text-slate-600 { color: #94a3b8; }
.dark .text-slate-500 { color: #94a3b8; }
.dark .text-slate-400 { color: #64748b; }

.dark .bg-emerald-50 { background-color: #022c22; }
.dark .bg-emerald-100 { background-color: #065f46; }
.dark .text-emerald-600 { color: #34d399; }
.dark .text-emerald-700 { color: #6ee7b7; }
.dark .text-emerald-800 { color: #a7f3d0; }
.dark .border-emerald-200 { border-color: #065f46; }

.dark .bg-rose-50 { background-color: #2a0a12; }
.dark .bg-rose-100 { background-color: #881337; }
.dark .text-rose-600 { color: #fb7185; }
.dark .text-rose-700 { color: #fda4af; }
.dark .border-rose-200 { border-color: #881337; }
.dark .border-rose-300 { border-color: #9f1239; }

.dark .bg-amber-50 { background-color: #2a1a05; }
.dark .bg-amber-100 { background-color: #92400e; }
.dark .text-amber-500 { color: #fbbf24; }
.dark .text-amber-700 { color: #fcd34d; }
.dark .text-amber-800 { color: #fde68a; }
.dark .text-amber-900 { color: #fef3c7; }
.dark .border-amber-200 { border-color: #92400e; }

.dark .bg-blue-50 { background-color: #0a1f3d; }
.dark .text-blue-600 { color: #60a5fa; }
.dark .text-blue-800 { color: #bfdbfe; }
.dark .border-blue-200 { border-color: #1e40af; }

/* The pill lifts further off a dark page, and the menus need a visible edge. */
.dark .shadow-pill { box-shadow: 0 10px 30px -12px rgb(0 0 0 / 0.8); }
.dark .shadow-pill:hover { box-shadow: 0 14px 38px -12px rgb(0 0 0 / 0.9); }
.dark .shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.6); }

/* Inputs and dropdowns are painted by a bare `input, select` rule. */
.dark input,
.dark select { background-color: #0f172a; border-color: #475569; }

/* Theme toggle icons.

   Driven by attributes rather than Tailwind's dark: utilities on purpose: the
   `.icon-button svg { display: block }` rule is more specific than a plain
   `.hidden`, so it used to force the sun to stay visible next to the moon.
   These selectors name `.icon-button` too, so they always win.

   In the light theme the moon shows (offering the way into dark); in the dark
   theme the sun shows (offering the way back out). */
.icon-button [data-theme-icon] { display: none; }
.icon-button [data-theme-icon="dark"] { display: block; }
.dark .icon-button [data-theme-icon="light"] { display: block; }
.dark .icon-button [data-theme-icon="dark"] { display: none; }

/* Type scale for the hero headline. */
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.font-bold { font-weight: 700; }
.leading-tight { line-height: 1.25; }
.tracking-widest { letter-spacing: 0.1em; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

/* dropdown behaviour hooks */
.dropdown { position: relative; }
.menu { min-width: 100%; }

/* status dots */
.h-2 { height: 0.5rem; }
.w-2 { width: 0.5rem; }
.animate-pulse { animation: app-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
@keyframes app-pulse {
    50% { opacity: 0.5; }
}

/* layout helpers used by the ledger pages */
.justify-end { justify-content: flex-end; }
.border-t { border-top-width: 1px; }
.tracking-wide { letter-spacing: 0.025em; }
.uppercase { text-transform: uppercase; }
.w-28 { width: 7rem; }
.w-48 { width: 12rem; }
.w-64 { width: 16rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }

@media (min-width: 1024px) {
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .lg\:col-span-1 { grid-column: span 1 / span 1; }
    .lg\:col-span-2 { grid-column: span 2 / span 2; }
    .lg\:col-span-3 { grid-column: span 3 / span 3; }
    .lg\:col-span-4 { grid-column: span 4 / span 4; }

    /* Baris atas desktop: judul halaman di kiri, tombol di kanan. */
    .lg\:flex { display: flex; }
    .lg\:items-center { align-items: center; }
    .lg\:justify-end { justify-content: flex-end; }

    /* The navbar sits on one line again with the menus pushed to the right. */
    .lg\:order-none { order: 0; }

    .lg\:w-auto { width: auto; }
}

/* colours */
.bg-amber-50 { background-color: #fffbeb; }
.bg-amber-500 { background-color: #f59e0b; }
.bg-blue-50 { background-color: #eff6ff; }
.bg-emerald-500 { background-color: #10b981; }
.border-amber-200 { border-color: #fde68a; }
.border-amber-300 { border-color: #fcd34d; }
.dark .border-amber-300 { border-color: #b45309; }
.border-blue-200 { border-color: #bfdbfe; }
.border-slate-100 { border-color: #f1f5f9; }
.text-blue-800 { color: #1e40af; }
.text-slate-700 { color: #334155; }

.hover\:bg-slate-100:hover { background-color: #f1f5f9; }
.hover\:bg-slate-700:hover { background-color: #334155; }
.hover\:bg-amber-200:hover { background-color: #fde68a; }
.hover\:text-slate-800:hover { color: #1e293b; }
.hover\:border-indigo-300:hover { border-color: #a5b4fc; }
.hover\:bg-indigo-50:hover { background-color: #eef2ff; }
.bg-rose-600 { background-color: #e11d48; }
.hover\:bg-rose-700:hover { background-color: #be123c; }
.gap-1\.5 { gap: 0.375rem; }
.hover\:shadow-sm:hover { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.hover\:text-indigo-600:hover { color: #4f46e5; }
.focus\:outline-none:focus { outline: none; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px #4f46e540; }
.focus\:ring-indigo-500\/20:focus { box-shadow: 0 0 0 2px #4f46e533; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.mt-5 { margin-top: 1.25rem; }
.pt-5 { padding-top: 1.25rem; }

table {
    width: 100%;
    border-collapse: collapse;
}

.pagination {
    display: flex;
    gap: 0.25rem;
}

.pagination a,
.pagination span {
    display: inline-flex;
    min-width: 2.25rem;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.375rem 0.625rem;
    font-size: 0.875rem;
    color: #475569;
}

.pagination span[aria-current='page'] {
    background-color: #0f172a;
    border-color: #0f172a;
    color: #fff;
}

@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

    .sm\:inline { display: inline; }

    .sm\:col-span-2 { grid-column: span 2 / span 2; }

    /* The navbar becomes a single row that wraps as a group. */
    .sm\:flex-row { flex-direction: row; }

    .sm\:flex-wrap { flex-wrap: wrap; }

    .sm\:items-center { align-items: center; }

    .sm\:w-full { width: 100%; }

    .sm\:order-last { order: 1; }

    .sm\:ml-auto { margin-left: auto; }

    .sm\:overflow-visible { overflow: visible; }

    .sm\:gap-4 { gap: 1rem; }

    /* A closed slot editor is inline; an open one drops to its own row so the
       form inside is not squeezed next to the delete button. */
    .slot-editor[open] { order: 99; }

    .sm\:block { display: block; }

    .sm\:hidden { display: none; }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    /* The three activity cards sit side by side once there is room. */
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

    .md\:col-span-2 { grid-column: span 2 / span 2; }

    .md\:justify-end { justify-content: flex-end; }
}
/* Tombol dasar.
   Elemen <button> di-reset menjadi transparan supaya tombol yang memang
   dianggap tautan tidak terlihat seperti kotak abu-abu. Tombol yang memang
   dipakai sebagai aksi memakai kelas .btn di bawah ini. */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
    background-color: #fff;
    color: #1e293b;
}
.btn:hover { background-color: #f8fafc; }
.btn-primary { background-color: #4f46e5; border-color: #4f46e5; color: #fff; }
.btn-primary:hover { background-color: #4338ca; }
.btn-danger { color: #be123c; border-color: #fecdd3; background-color: #fff1f2; }
.btn-danger:hover { background-color: #ffe4e6; }
.btn-ghost { border-color: transparent; background-color: transparent; color: #4f46e5; }
.btn-ghost:hover { background-color: #eef2ff; }
.btn-sm { padding: 0.2rem 0.5rem; font-size: 0.75rem; }
.btn-danger.btn-ghost { color: #be123c; }
.btn-danger.btn-ghost:hover { background-color: #fff1f2; }
.list-decimal { list-style: decimal; }
.dark .btn { background-color: #0f172a; border-color: #475569; color: #e2e8f0; }
.dark .btn-primary { background-color: #4f46e5; border-color: #4f46e5; color: #fff; }
.dark .btn-danger { background-color: #2a0a12; border-color: #881337; color: #fda4af; }
.dark .btn-ghost { background-color: transparent; border-color: transparent; color: #a5b4fc; }

/* Utilitas pencatch layar yang sering dipakai modul Kegiatan & Keuangan. */
.grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.h-24 { height: 6rem; }
.h-14 { height: 3.5rem; }
.w-14 { width: 3.5rem; }
.h-px { height: 1px; }
/* Kotak tombol ikon kecil (mis. tombol hapus pada kartu jadwal). */
.w-7 { width: 1.75rem; }
.h-7 { height: 1.75rem; }
.place-items-center { place-items: center; }
.mb-5 { margin-bottom: 1.25rem; }
.mt-5 { margin-top: 1.25rem; }
.ml-1 { margin-left: 0.25rem; }
.gap-5 { gap: 1.25rem; }
.scale-105 { transform: scale(1.05); }
.items-stretch { align-items: stretch; }
.min-w-\[18px\] { min-width: 18px; }
.mr-1 { margin-right: 0.25rem; }
.pt-1 { padding-top: 0.25rem; }
.pt-2 { padding-top: 0.5rem; }
.space-y-1\.5 > * + * { margin-top: 0.375rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.pb-5 { padding-bottom: 1.25rem; }
.contents { display: contents; }
.h-32 { height: 8rem; }
.h-40 { height: 10rem; }
.h-fit { height: fit-content; }
/* Sidebar kolom yang lebih pendek ikut ketting saat halaman digulir, supaya
   kolom panjang di sebelahnya tidak meninggalkan rongga kosong yang besar. */
.sticky-top { position: sticky; top: 1.5rem; } /* kolom samping ikut ketting */
@media (max-width: 1023px) { .sticky-top { position: static; } }
.align-top { vertical-align: top; }
.font-sans { font-family: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.gap-px { gap: 1px; }
.ml-2 { margin-left: 0.5rem; }
.mr-2 { margin-right: 0.5rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-16 { margin-top: 4rem; }
.p-1\.5 { padding: 0.375rem; }
.p-2 { padding: 0.5rem; }
.p-8 { padding: 2rem; }
.pb-3 { padding-bottom: 0.75rem; }
.pl-1 { padding-left: 0.25rem; }
.pt-3 { padding-top: 0.75rem; }
.px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
.rounded-t { border-top-left-radius: 0.5rem; border-top-right-radius: 0.5rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.border-t-2 { border-top-width: 2px; }
.bg-slate-300 { background-color: #cbd5e1; }
.divide-rose-200 > * + * { border-color: #fecdd3; }
.min-h-\[7rem\] { min-height: 7rem; }
/* Kotak kalender: tinggi seragam per tanggal, daftar di dalamnya boleh digulir. */
.min-h-\[80px\] { min-height: 5rem; }
.max-h-\[60px\] { max-height: 3.75rem; }
.w-32 { width: 8rem; }

/* ---------------------------------------------------------------------------
   Komponen tampilan yang dipakai banyak halaman.

   Tujuannya agar setiap halaman punya gaya yang sama tanpa menulis ulang
   rangkaian utility yang panjang: kartu, judul halaman, lencana, keadaan
   kosong, dan jendela dialog.
   --------------------------------------------------------------------------- */
.page-header { margin-bottom: 1.5rem; }
.page-eyebrow {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
}
.page-title { font-size: 1.5rem; font-weight: 700; line-height: 2rem; }
.page-desc { font-size: 0.875rem; color: #64748b; }
.page-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

.card {
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
}
.card-pad { padding: 1.25rem; }
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}
.card-title { font-weight: 600; }
.card-sub { font-size: 0.75rem; color: #64748b; }
.card-sep { border-top: 1px solid #f1f5f9; margin-top: 0.75rem; padding-top: 0.75rem; }

/* Kartu angka (KPI) */
.kpi-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}
.kpi-value { font-size: 1.5rem; font-weight: 700; line-height: 2rem; }
.kpi-note { font-size: 0.75rem; color: #64748b; }

/* Lencana status */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    white-space: nowrap;
}
.badge-slate { background-color: #f1f5f9; color: #334155; }
.badge-indigo { background-color: #eef2ff; color: #4338ca; }
.badge-emerald { background-color: #d1fae5; color: #065f46; }
.badge-rose { background-color: #ffe4e6; color: #be123c; }
.badge-amber { background-color: #fef3c7; color: #92400e; }
.badge-blue { background-color: #dbeafe; color: #1e40af; }

/* Keadaan kosong */
.empty {
    padding: 1.5rem;
    border: 1px dashed #cbd5e1;
    border-radius: 0.75rem;
    background-color: #fff;
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
}

/* Form */
.field-label { display: block; font-size: 0.75rem; color: #64748b; }
.field-label span { display: block; margin-top: 0.25rem; }
.hint { font-size: 0.75rem; color: #64748b; }

/* Avatar */
.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    background-color: #eef2ff;
    color: #4338ca;
    font-weight: 600;
    flex-shrink: 0;
}
.avatar-lg { width: 3rem; height: 3rem; font-size: 1.125rem; }

/* Baris daftar yang bisa diklik. Sengaja tidak mengatur `display`, supaya
   kelas utilitas (flex, block) di view tetap menentukan tata letaknya. */
.row-btn {
    width: 100%;
    text-align: left;
    padding: 0.875rem 1rem;
    cursor: pointer;
}
.row-btn:hover { background-color: #f8fafc; }

/* Jendela dialog */
dialog.modal {
    width: min(46rem, calc(100vw - 2rem));
    max-height: calc(100vh - 4rem);
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background-color: #fff;
    color: #1e293b;
    box-shadow: 0 20px 40px -12px rgb(15 23 42 / 0.3);
}

/* Jendela muncul dengan sedikit terangkat; area gelapnya memudar masuk. */
@keyframes modal-in {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to { opacity: 1; transform: none; }
}

@keyframes backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

dialog.modal[open] { animation: modal-in .2s ease-out; }
dialog.modal[open]::backdrop { animation: backdrop-in .2s ease-out; }
dialog.modal::backdrop { background-color: rgb(15 23 42 / 0.5); }
.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.25rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}
.modal-body { padding: 1.25rem; overflow-y: auto; }
.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid #f1f5f9;
    background-color: #f8fafc;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
}
.modal-close {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}
.modal-close:hover { background-color: #f1f5f9; color: #1e293b; }

.dark .card, .dark .empty { background-color: #0f172a; border-color: #334155; }
.dark .badge-slate { background-color: #1e293b; color: #e2e8f0; }
.dark .badge-indigo { background-color: #1e1b4b; color: #c7d2fe; }
.dark .badge-emerald { background-color: #065f46; color: #a7f3d0; }
.dark .badge-rose { background-color: #881337; color: #fecdd3; }
.dark .badge-amber { background-color: #92400e; color: #fde68a; }
.dark .modal-foot { background-color: #020617; border-color: #334155; }
.dark dialog.modal { background-color: #0f172a; border-color: #334155; color: #e2e8f0; }

/* Shell aplikasi.
   Di layar kecil sidebar disembunyikan dan konten memakai lebar penuh; di
   layar lebar sidebar menjadi kolom kiri dan konten di sebelah kanannya.
   Sidebar dibuat setinggi halaman (align-items default) supaya warna
   latarnya menutup tinggi halaman, bukan hanya tinggi isinya. */
.app-shell { display: block; }
.app-shell > .sidebar { min-height: 100vh; }
@media (min-width: 1024px) {
    .app-shell { display: flex; }
}
.sidebar { transition: transform 0.2s ease; }
.sidebar.is-open { transform: translateX(0); }
.z-40 { z-index: 40; }
.drawer-backdrop { z-index: 35; }
.inset-y-0 { top: 0; bottom: 0; }
.left-0 { left: 0; }
.-translate-x-full { transform: translateX(-100%); }
.mt-auto { margin-top: auto; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }



/* sidebar internals */
.sidebar-link { display: block; }
.overflow-y-auto { overflow-y: auto; }
.p-3 { padding: 0.75rem; }
.bottom-full { bottom: 100%; }

/* The backdrop is a translucent scrim; keep the opacity in one place. */
.bg-slate-900\/50 { background-color: rgba(15, 23, 42, 0.5); }

/* Animasi menu.
   1. Menu geser di ponsel: panel meluncur dari kiri, area gelap memudar masuk.
   2. Setiap baris menu muncul berurutan (stagger) dengan --i sebagai urutan.
   3. Baris menu sedikit menyusut saat ditekan.
   Semua animasi dimatikan bila pengguna memilih "kurangi gerakan" di sistem. */
.drawer-backdrop {
    opacity: 0;
    transition: opacity .25s ease;
}

.drawer.is-open > .drawer-backdrop { opacity: 1; }

.drawer-panel {
    transition: transform .3s cubic-bezier(.22, .61, .36, 1);
    will-change: transform;
}

@keyframes menu-in {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: none; }
}

.menu-item {
    transform-origin: left center;
    animation: menu-in .28s ease-out both;
    animation-delay: calc(var(--i, 0) * 26ms);
}

/* Menu geser baru memunculkan animasi saat dibuka, bukan saat halaman dimuat. */
.drawer .menu-item { animation: none; }
.drawer.is-animating .menu-item { animation: menu-in .28s ease-out both; }

.menu-item:active { transform: scale(.985); }

/* Penanda menu aktif bergeser sedikit ke kanan supaya mudah dikenali. */
.menu-item-active {
    animation: menu-in .28s ease-out both;
    animation-delay: calc(var(--i, 0) * 26ms);
}

@media (prefers-reduced-motion: reduce) {
    .menu-item,
    .menu-item-active,
    .drawer.is-animating .menu-item { animation: none; }

    .drawer-panel,
    .drawer-backdrop { transition: none; }

    .menu-item:active { transform: none; }
}

@media (min-width: 1024px) {
    .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }

    .lg\:py-8 { padding-top: 2rem; padding-bottom: 2rem; }
}



/* The drawer and its scrim are phone-only; the top bar takes over on a wide
   screen, so each hides where the other takes over. */
@media (min-width: 1024px) {
    .lg\:block { display: block; }

    .lg\:hidden { display: none; }

    /* The desktop header is not sticky, so there is no room to drop a menu
       upwards: it would be clipped above the viewport. Only the phone drawer,
       which parks these menus at the very bottom, opens them upwards. */
    .lg\:bottom-auto { bottom: auto; }

    .lg\:mb-0 { margin-bottom: 0; }

    .lg\:mt-2 { margin-top: 0.5rem; }
}

/* Wider shell on desktop, matching the reference sites. */
.max-w-6xl { max-width: 72rem; }
/* Panel penyaring & daftar pendek: lebarnya dibatasi supaya tidak melebar
   kosong mengikuti lebar layar. */
.max-w-4xl { max-width: 56rem; }
.max-w-xs { max-width: 20rem; }
.opacity-40 { opacity: 0.4; }
.pointer-events-none { pointer-events: none; }
.gap-x-4 { column-gap: 1rem; }
.gap-y-2 { row-gap: 0.5rem; }

@media (min-width: 640px) {
    .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
}

/* Mobile drawer: centred title and wide pill links, like the reference
   sites. The desktop bar keeps its compact sizing. */
.drawer-link { display: block; }
.drawer-head { text-align: center; }
.w-8 { width: 2rem; }
.text-center { text-align: center; }
.w-72 { width: 18rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.p-4 { padding: 1rem; }

@media (min-width: 1024px) {
    /* Undo the drawer sizing for the compact desktop bar. */
    .lg\:w-auto { width: auto; }

    .lg\:ml-auto { margin-left: auto; }

    .lg\:rounded-lg { border-radius: 0.5rem; }

    .lg\:px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }

    .lg\:py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
}

/* Phone bar: the title sits between two equal spacers so it reads centred. */
.h-8 { height: 2rem; }
.w-8 { width: 2rem; }
.h-9 { height: 2.25rem; }
.w-9 { width: 2.25rem; }
.shrink-0 { flex-shrink: 0; }

/* A logo keeps its own proportions rather than being stretched to the box. */
.w-auto { width: auto; }
.object-contain { object-fit: contain; }
.max-w-40 { max-width: 10rem; }
.max-w-48 { max-width: 12rem; }
/* The brand mark sits beside its two lines of text, so it needs real height. */
.h-10 { height: 2.5rem; }
.w-10 { width: 2.5rem; }
.h-12 { height: 3rem; }
.leading-normal { line-height: 1.5; }
.icon-button svg { display: block; }

/* centre the hamburger icon inside its button */
.justify-center { justify-content: center; }

/* =====================================================================
   Breakpoint lebar — ditulis paling akhir dengan sengaja.

   Berkas ini adalah subset Tailwind yang ditulis tangan, dan blok
   `@media (min-width: 640px)` diletakkan SESUDAH blok 1024px. Karena
   kedua blok itu sama-sama punya spesifisitas 0-1-0, aturan yang muncul
   belakangan menang — jadi `sm:grid-cols-2` menimpa `lg:grid-cols-3`
   di layar lebar. Akibatnya halaman yang bermaksud tiga kolom tetap
   tampil dua kolom, dan `md:col-span-2` menimpa `lg:col-span-*`.

   Aturan di bawah ini diulang sekali lagi di paling akhir supaya
   breakpoint yang lebih besar benar-benar menang. Jangan dihapus.
   ===================================================================== */
@media (min-width: 1024px) {
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .lg\:col-span-1 { grid-column: span 1 / span 1; }
    .lg\:col-span-2 { grid-column: span 2 / span 2; }
    .lg\:col-span-3 { grid-column: span 3 / span 3; }
    .lg\:col-span-4 { grid-column: span 4 / span 4; }
}

/* ---------------------------------------------------------------------------
   Utilitas tambahan untuk modul Kegiatan & Keuangan.

   View lama memakai `indigo-*` dan `red-*` yang tidak pernah didefinisikan, jadi
   tombolnya tampil polos. Warna itu dipetakan ke palet indigo/rose agar tombol
   utama dan tombol bahaya benar-benar terlihat.
   --------------------------------------------------------------------------- */
.bg-indigo-50 { background-color: #eef2ff; }
.bg-indigo-500 { background-color: #6366f1; }
.bg-indigo-50\/60 { background-color: rgb(238 242 255 / 0.6); }
.bg-indigo-100 { background-color: #e0e7ff; }
.bg-indigo-600 { background-color: #4f46e5; }
.bg-indigo-700 { background-color: #4338ca; }
.text-indigo-600 { color: #4f46e5; }
.text-indigo-700 { color: #4338ca; }
.hover\:bg-indigo-700:hover { background-color: #4338ca; }
.hover\:text-indigo-700:hover { color: #4338ca; }
.border-indigo-200 { border-color: #c7d2fe; }

.bg-red-50 { background-color: #fff1f2; }
.text-red-600 { color: #e11d48; }
.text-red-700 { color: #be123c; }
.bg-green-600 { background-color: #16a34a; }
.hover\:bg-green-700:hover { background-color: #15803d; }
.text-green-700 { color: #15803d; }

/* Ukuran kecil untuk batang grafik dan penanda kalender. */
.h-1\.5 { height: 0.375rem; }
.w-1\.5 { width: 0.375rem; }
.h-3 { height: 0.75rem; }
.w-3 { width: 0.75rem; }
.h-6 { height: 1.5rem; }
.w-6 { width: 1.5rem; }
.h-10 { height: 2.5rem; }
.w-10 { width: 2.5rem; }
.min-w-\[42rem\] { min-width: 42rem; }
.min-w-\[6px\] { min-width: 6px; }
.max-w-\[7rem\] { max-width: 7rem; }

.text-\[11px\] { font-size: 0.6875rem; }
.text-\[10px\] { font-size: 0.625rem; }
.justify-self-start { justify-self: start; }
.bg-rose-500 { background-color: #f43f5e; }
.bg-emerald-600 { background-color: #059669; }
.hover\:bg-rose-600:hover { background-color: #e11d48; }

/* Tabel di dalam container overflow-x: header tidak ikut menyusut. */
table thead th { white-space: nowrap; }
textarea { width: 100%; border: 1px solid #cbd5e1; border-radius: 0.5rem; padding: 0.5rem 0.75rem; background-color: #fff; }
.dark textarea { background-color: #0f172a; border-color: #475569; }

