/* Shared app styles. Values follow docs/DESIGN.md and match the live
   landing page. */
body { font-family: "Manrope", system-ui, sans-serif; font-variant-ligatures: no-common-ligatures; color: #111827; background: #ffffff; }
h1, h2, h3 { text-wrap: balance; } p, li { text-wrap: pretty; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; padding: 8px 12px; border-radius: 12px; transition: background-color 300ms cubic-bezier(0.22,1,0.36,1), transform 500ms cubic-bezier(0.22,1,0.36,1); }
.btn:hover { transform: translateY(-2px); } .btn:active { transform: scale(0.98); }
.btn:disabled { opacity: .6; transform: none; cursor: not-allowed; }
.btn-primary { background: #0f5f6e; color: #fff; } .btn-primary:hover:not(:disabled) { background: #0d4f5c; }
.btn-secondary { background: #fff; color: #0b1f33; border: 1px solid #e5e7eb; } .btn-secondary:hover:not(:disabled) { background: #f9fafb; }
.btn-nav { border-radius: 8px; font-size: 14px; }
.link { color: #0f5f6e; font-weight: 600; }
.card { border: 1px solid #e5e7eb; border-radius: 16px; }
.field { width: 100%; border-radius: 8px; border: 1px solid #d1d5db; background: #f9fafb; padding: 8px 12px; font-size: 16px; }
.field[aria-invalid="true"] { border-color: #b91c1c; }
a:focus-visible, input:focus-visible, button:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #7fb8c4; outline-offset: 2px; }
.icon { width: 24px; height: 24px; flex: none; fill: currentColor; }
.skeleton { background: #f3f4f6; border-radius: 8px; animation: pulse 1600ms cubic-bezier(0.22,1,0.36,1) infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
table.docket { border-collapse: collapse; width: 100%; font-size: 14px; }
table.docket th, table.docket td { border-bottom: 1px solid #e5e7eb; padding: 8px; text-align: left; vertical-align: top; }
table.docket th { font-weight: 700; white-space: nowrap; }
/* Words stay whole; only a string too long for its column (a long email or URL)
   breaks, and the table scrolls sideways inside its card before squeezing. */
table.docket { min-width: 560px; }
table.docket td { max-width: 320px; overflow-wrap: break-word; }
.form-row { transition: background-color 300ms cubic-bezier(0.22,1,0.36,1); }
.form-row[aria-current="true"] { background: #f0f7f8; border-color: #0f5f6e; }
@media (prefers-reduced-motion: reduce) {
  .btn, .form-row { transition: opacity 300ms cubic-bezier(0.22,1,0.36,1); }
  .btn:hover, .btn:active { transform: none; }
  .skeleton { animation: none; }
}
/* Brand colours as classes, so pages need no inline style attributes (CSP). */
.text-brand { color: #0f5f6e; } .bg-brand { background: #0f5f6e; }
.bg-navy { background: #0b1f33; } .bg-code { background: #272727; }
.btn-danger { background: #b91c1c; color: #fff; }

/* Dark version, set by /js/theme.js on <html data-theme="dark">. Colours are the
   landing page's dark tokens: paper #0F2740, surface #16334F, ink #EEF3F1,
   muted #B4C4CE, faint #9DB2BE, lines #27486A / #36608A, link #9fd3dd,
   dark blue panel #1B4A78. Teal buttons keep the one accent. */
:root[data-theme="dark"] { color-scheme: dark; background: #0F2740; }
:root[data-theme="dark"] body { background: #0F2740; color: #EEF3F1; }
:root[data-theme="dark"] .bg-white, :root[data-theme="dark"] .focus\:bg-white:focus { background-color: #0F2740; }
:root[data-theme="dark"] .bg-white\/90 { background-color: rgba(15, 39, 64, .9); }
:root[data-theme="dark"] .bg-gray-50, :root[data-theme="dark"] .hover\:bg-gray-50:hover { background-color: #16334F; }
:root[data-theme="dark"] .bg-gray-100, :root[data-theme="dark"] .skeleton { background-color: #1A3B5C; }
:root[data-theme="dark"] .bg-navy { background: #1B4A78; }
:root[data-theme="dark"] .text-gray-600 { color: #B4C4CE; }
:root[data-theme="dark"] .text-gray-500 { color: #9DB2BE; }
:root[data-theme="dark"] .text-red-700 { color: #fca5a5; }
:root[data-theme="dark"] .text-brand, :root[data-theme="dark"] .link { color: #9fd3dd; }
:root[data-theme="dark"] .border-gray-200, :root[data-theme="dark"] .card,
:root[data-theme="dark"] table.docket th, :root[data-theme="dark"] table.docket td { border-color: #27486A; }
:root[data-theme="dark"] .field { background: #12304A; border-color: #36608A; color: #EEF3F1; }
:root[data-theme="dark"] .field::placeholder { color: #9DB2BE; }
:root[data-theme="dark"] .field[aria-invalid="true"] { border-color: #fca5a5; }
:root[data-theme="dark"] .btn-secondary { background: #16334F; color: #EEF3F1; border-color: #36608A; }
:root[data-theme="dark"] .btn-secondary:hover:not(:disabled) { background: #1A3B5C; }
:root[data-theme="dark"] .form-row[aria-current="true"] { background: #1A3B5C; border-color: #9fd3dd; }
:root[data-theme="dark"] a:focus-visible, :root[data-theme="dark"] input:focus-visible, :root[data-theme="dark"] button:focus-visible,
:root[data-theme="dark"] select:focus-visible, :root[data-theme="dark"] summary:focus-visible { outline-color: #9fd3dd; }

/* Flush left (Nov 12, owner request), matching the landing site: app content
   starts at the same 16px edge as the header logo instead of sitting centred.
   tailwind.css is prebuilt and loads after this file, so these are scoped under
   body to win; widths (max-w-*) are unchanged so lines stay readable. */
body .mx-auto { margin-left: 0; margin-right: auto; }
body .text-center { text-align: left; }
/* Sign in, register, forgot and reset: the top bar and the form panel start at
   the 16px edge too (their md:px-12 left padding was 48px). */
@media (min-width: 768px) {
  body #main > section.md\:px-12:first-child,
  body header nav.md\:px-12 { padding-left: 16px; }
}

/* Light and dark switch in the app header (same look as the landing page's) */
.theme-toggle { width: 40px; height: 40px; flex: none; border-radius: 999px; border: 1px solid #e5e7eb; background: #fff; color: #0b1f33; display: grid; place-items: center; cursor: pointer; padding: 0; transition: border-color 300ms cubic-bezier(0.22,1,0.36,1), color 300ms cubic-bezier(0.22,1,0.36,1); }
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { border-color: #0f5f6e; color: #0f5f6e; }
.theme-toggle:active { transform: translateY(1px); }
.theme-toggle:focus-visible { outline: 2px solid #0f5f6e; outline-offset: 2px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle { background: #16334F; color: #EEF3F1; border-color: #36608A; }
:root[data-theme="dark"] .theme-toggle:hover { border-color: #9fd3dd; color: #9fd3dd; }
:root[data-theme="dark"] .theme-toggle:focus-visible { outline-color: #9fd3dd; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (min-width: 768px) { .nav-actions { gap: 16px; } }
