/*
 * Hand-written CSS using a Tailwind-like utility subset.
 * Bundled into the repo so prod doesn't depend on a CDN and won't break offline.
 * If you later wire up the Tailwind CLI, replace this file with its output.
 */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; line-height: 1.5; }
h1,h2,h3,h4,h5,h6,p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Colors */
:root {
  --stone-50: #fafaf9; --stone-100: #f5f5f4; --stone-200: #e7e5e4; --stone-300: #d6d3d1;
  --stone-400: #a8a29e; --stone-500: #78716c; --stone-600: #57534e; --stone-700: #44403c;
  --stone-800: #292524; --stone-900: #1c1917;
  --amber-50: #fffbeb; --amber-100: #fef3c7; --amber-200: #fde68a; --amber-300: #fcd34d;
  --amber-400: #fbbf24; --amber-500: #f59e0b; --amber-600: #d97706; --amber-700: #b45309;
  --amber-800: #92400e;
  --red-50: #fef2f2; --red-100: #fee2e2; --red-300: #fca5a5; --red-500: #ef4444; --red-600: #dc2626; --red-700: #b91c1c; --red-800: #991b1b;
  --emerald-50: #ecfdf5; --emerald-100: #d1fae5; --emerald-300: #6ee7b7; --emerald-500: #10b981; --emerald-600: #059669; --emerald-700: #047857; --emerald-800: #065f46;
  --sky-50: #f0f9ff; --sky-100: #e0f2fe; --sky-500: #0ea5e9; --sky-700: #0369a1; --sky-800: #075985;
}

/* Layout */
.min-h-screen { min-height: 100vh; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-5xl { max-width: 64rem; } .max-w-2xl { max-width: 42rem; } .max-w-md { max-width: 28rem; }
.w-full { width: 100%; }
.h-14 { height: 3.5rem; }
.size-8 { height: 2rem; width: 2rem; } .size-10 { height: 2.5rem; width: 2.5rem; }
.flex { display: flex; } .inline-flex { display: inline-flex; }
.grid { display: grid; } .block { display: block; } .inline-block { display: inline-block; }
.hidden { display: none; }
.items-center { align-items: center; } .items-start { align-items: flex-start; } .items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; } .justify-center { justify-content: center; } .justify-around { justify-content: space-around; } .justify-end { justify-content: flex-end; }
.flex-1 { flex: 1 1 0%; } .flex-col { flex-direction: column; }
.gap-1 { gap: .25rem; } .gap-2 { gap: .5rem; } .gap-3 { gap: .75rem; } .gap-4 { gap: 1rem; } .gap-6 { gap: 1.5rem; }
.relative { position: relative; } .absolute { position: absolute; } .sticky { position: sticky; } .fixed { position: fixed; }
.top-0 { top: 0; } .right-0 { right: 0; } .left-0 { left: 0; }
.z-10 { z-index: 10; } .z-20 { z-index: 20; }

/* Spacing */
.p-0 { padding: 0; } .p-1 { padding: .25rem; } .p-2 { padding: .5rem; } .p-3 { padding: .75rem; } .p-4 { padding: 1rem; } .p-6 { padding: 1.5rem; }
.px-2 { padding-left:.5rem; padding-right:.5rem; } .px-3 { padding-left:.75rem; padding-right:.75rem; } .px-4 { padding-left:1rem; padding-right:1rem; } .px-6 { padding-left:1.5rem; padding-right:1.5rem; }
.py-1 { padding-top:.25rem; padding-bottom:.25rem; } .py-1\.5 { padding-top:.375rem; padding-bottom:.375rem; } .py-2 { padding-top:.5rem; padding-bottom:.5rem; } .py-2\.5 { padding-top:.625rem; padding-bottom:.625rem; } .py-3 { padding-top:.75rem; padding-bottom:.75rem; } .py-6 { padding-top:1.5rem; padding-bottom:1.5rem; }
.pt-2 { padding-top:.5rem; } .pb-24 { padding-bottom: 6rem; }
.m-0 { margin: 0; } .mt-1 { margin-top:.25rem; } .mt-2 { margin-top:.5rem; } .mt-3 { margin-top:.75rem; } .mt-4 { margin-top:1rem; } .mt-6 { margin-top:1.5rem; } .mt-8 { margin-top:2rem; }
.mb-1 { margin-bottom:.25rem; } .mb-2 { margin-bottom:.5rem; } .mb-3 { margin-bottom:.75rem; } .mb-4 { margin-bottom:1rem; } .mb-6 { margin-bottom:1.5rem; }

/* Type */
.text-xs { font-size: .75rem; line-height: 1rem; }
.text-sm { font-size: .875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-center { text-align: center; } .text-left { text-align: left; } .text-right { text-align: right; }
.uppercase { text-transform: uppercase; }
.tabular-nums { font-variant-numeric: tabular-nums; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.line-through { text-decoration: line-through; }
.tracking-wide { letter-spacing: .025em; }
.antialiased { -webkit-font-smoothing: antialiased; }

/* Colors text */
.text-stone-300 { color: var(--stone-300); } .text-stone-400 { color: var(--stone-400); } .text-stone-500 { color: var(--stone-500); } .text-stone-600 { color: var(--stone-600); } .text-stone-700 { color: var(--stone-700); } .text-stone-800 { color: var(--stone-800); } .text-stone-900 { color: var(--stone-900); }
.text-white { color: #fff; }
.text-amber-500 { color: var(--amber-500); } .text-amber-600 { color: var(--amber-600); } .text-amber-700 { color: var(--amber-700); } .text-amber-800 { color: var(--amber-800); }
.text-red-500 { color: var(--red-500); } .text-red-600 { color: var(--red-600); } .text-red-700 { color: var(--red-700); }
.text-emerald-600 { color: var(--emerald-600); } .text-emerald-700 { color: var(--emerald-700); } .text-emerald-800 { color: var(--emerald-800); }

/* BG */
.bg-white { background: #fff; }
.bg-stone-50 { background: var(--stone-50); } .bg-stone-100 { background: var(--stone-100); } .bg-stone-200 { background: var(--stone-200); } .bg-stone-800 { background: var(--stone-800); } .bg-stone-900 { background: var(--stone-900); }
.bg-amber-50 { background: var(--amber-50); } .bg-amber-100 { background: var(--amber-100); } .bg-amber-500 { background: var(--amber-500); } .bg-amber-600 { background: var(--amber-600); }
.bg-red-50 { background: var(--red-50); } .bg-red-100 { background: var(--red-100); }
.bg-emerald-50 { background: var(--emerald-50); } .bg-emerald-100 { background: var(--emerald-100); }
.bg-sky-50 { background: var(--sky-50); } .bg-sky-100 { background: var(--sky-100); }

/* Borders */
.border { border-width: 1px; border-style: solid; border-color: var(--stone-200); }
.border-t { border-top-width: 1px; border-top-style: solid; border-top-color: var(--stone-200); }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: var(--stone-200); }
.border-l-4 { border-left-width: 4px; border-left-style: solid; }
.border-stone-100 { border-color: var(--stone-100); } .border-stone-200 { border-color: var(--stone-200); } .border-stone-300 { border-color: var(--stone-300); }
.border-amber-200 { border-color: var(--amber-200); } .border-amber-300 { border-color: var(--amber-300); } .border-amber-500 { border-color: var(--amber-500); }
.border-red-300 { border-color: var(--red-300); }
.border-emerald-300 { border-color: var(--emerald-300); }

.rounded { border-radius: .375rem; } .rounded-md { border-radius: .375rem; } .rounded-lg { border-radius: .5rem; } .rounded-xl { border-radius: .75rem; } .rounded-2xl { border-radius: 1rem; } .rounded-full { border-radius: 9999px; }

/* Effects */
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0,0,0,.04); }
.shadow { box-shadow: 0 1px 3px 0 rgba(0,0,0,.08), 0 1px 2px -1px rgba(0,0,0,.04); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.06); }
.opacity-60 { opacity: .6; } .opacity-80 { opacity: .8; }
.cursor-pointer { cursor: pointer; } .cursor-not-allowed { cursor: not-allowed; }
.transition { transition: all .15s ease; }
.outline-none:focus { outline: none; }
.focus\:ring:focus { box-shadow: 0 0 0 3px rgba(245, 158, 11, .4); }
.focus\:ring-amber:focus { box-shadow: 0 0 0 3px rgba(245, 158, 11, .4); }
.object-cover { object-fit: cover; }

/* Hover */
.hover\:bg-stone-50:hover { background: var(--stone-50); }
.hover\:bg-stone-100:hover { background: var(--stone-100); }
.hover\:bg-amber-600:hover { background: var(--amber-600); }
.hover\:bg-amber-50:hover { background: var(--amber-50); }
.hover\:text-red-700:hover { color: var(--red-700); }
.hover\:underline:hover { text-decoration: underline; }

/* Tables */
table { border-collapse: collapse; width: 100%; }
.t-table th, .t-table td { padding: .5rem .75rem; text-align: left; border-bottom: 1px solid var(--stone-200); }
.t-table th { font-size: .75rem; text-transform: uppercase; color: var(--stone-500); font-weight: 600; }
.t-table tr:hover td { background: var(--stone-50); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .375rem; padding: .5rem .875rem; border-radius: .5rem; font-weight: 500; transition: all .15s ease; border: 1px solid transparent; line-height: 1; }
.btn-primary { background: var(--amber-500); color: #fff; }
.btn-primary:hover { background: var(--amber-600); }
.btn-secondary { background: #fff; color: var(--stone-800); border-color: var(--stone-300); }
.btn-secondary:hover { background: var(--stone-50); }
.btn-ghost { background: transparent; color: var(--stone-700); }
.btn-ghost:hover { background: var(--stone-100); }
.btn-danger { color: var(--red-700); }
.btn-danger:hover { background: var(--red-50); }
.btn-sm { padding: .25rem .625rem; font-size: .8125rem; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* Inputs */
.input { display: block; width: 100%; padding: .5rem .75rem; border: 1px solid var(--stone-300); border-radius: .5rem; background: #fff; line-height: 1.25; transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--amber-500); box-shadow: 0 0 0 3px rgba(245,158,11,.2); }
.input:disabled { background: var(--stone-100); color: var(--stone-500); cursor: not-allowed; }
.input[aria-invalid="true"], .input.is-invalid { border-color: var(--red-500); }
label { display: block; font-size: .8125rem; color: var(--stone-700); font-weight: 500; margin-bottom: .25rem; }
.input-error { color: var(--red-700); font-size: .8125rem; margin-top: .25rem; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: .25rem; padding: .125rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 500; background: var(--stone-100); color: var(--stone-700); }
.pill-accent { background: var(--amber-100); color: var(--amber-800); }
.pill-success { background: var(--emerald-100); color: var(--emerald-800); }
.pill-warn { background: var(--amber-100); color: var(--amber-800); }
.pill-danger { background: var(--red-100); color: var(--red-700); }
.pill-muted { background: var(--stone-100); color: var(--stone-600); }

/* Card */
.card { background: #fff; border: 1px solid var(--stone-200); border-radius: .75rem; }
.card-pad { padding: 1rem; }
.card-pad-lg { padding: 1.25rem; }

/* Calendar grid */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .25rem; }
.cal-cell { background: #fff; border: 1px solid var(--stone-200); border-radius: .5rem; padding: .375rem; min-height: 4.5rem; position: relative; }
.cal-cell.dim { color: var(--stone-400); background: var(--stone-50); }
.cal-cell.today { border-color: var(--amber-500); }
.cal-cell.holiday { background: var(--sky-50); border-color: var(--sky-100); }
.cal-cell.weekend { background: var(--stone-100); }
.cal-cell .num { font-size: .8125rem; font-weight: 600; }
.cal-cell .badge { position: absolute; bottom: .375rem; right: .375rem; }

/* Tiny utilities */
.muted { color: var(--stone-500); }
.list-none { list-style: none; padding: 0; margin: 0; }
.size-2 { height: .5rem; width: .5rem; } .size-3 { height: .75rem; width: .75rem; }
details > summary::-webkit-details-marker { display: none; }
details > summary::marker { content: ""; }
.text-stone-900 { color: var(--stone-900); }
.bg-stone-900 { background: var(--stone-900); }
.no-underline { text-decoration: none; }
.underline { text-decoration: underline; }

/* Responsive */
@media (min-width: 640px) {
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:flex { display: flex; }
  .sm\:hidden { display: none !important; }
  .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\:flex-row { flex-direction: row; }
  .sm\:items-center { align-items: center; }
  .sm\:gap-3 { gap: .75rem; }
}
@media (max-width: 639px) {
  .sm\:flex { display: none; }
  /* mobile-only nav already visible via parent class */
}

@media print {
  body { background: #fff; }
  header, footer, nav { display: none !important; }
}
