/* Shared interface refinements: legible surfaces, compact controls and mobile navigation. */
:root { --ui-muted: #a0afbc; --ui-line: #253938; --ui-focus: #86efac; }
body { line-height: 1.6; }
.glass-card { background: linear-gradient(145deg, #102020, #0b1718); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 8px 28px #00000024; }
body .text-gray-500, body .text-gray-600, body .text-gray-700 { color: var(--ui-muted); }
body .glass-card-light, body .glass-card-light .text-gray-500, body .glass-card-light .text-gray-600, body .glass-card-light .text-gray-700 { color: #475569; }
.btn-primary, .btn-secondary { border-radius: 12px; box-shadow: none; transition: background-color .18s, border-color .18s; }
.btn-primary { background: #15803d; }
.btn-primary:hover { background: #166534; box-shadow: none; transform: none; }
.btn-secondary:hover { transform: none; }
button:disabled { cursor: wait; opacity: .6; transform: none; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 4px; }
main:focus { outline: none; }
.form-input { border-color: var(--ui-line); border-radius: 10px; min-height: 44px; }
.form-input::placeholder { color: #83949f; opacity: 1; }
.form-label { color: #cbd5e1; }
.stat-card { padding: 1.35rem; font-variant-numeric: tabular-nums; }
.data-table { font-variant-numeric: tabular-nums; }
.data-table thead { background: #132625; }
.data-table th { color: #b9c9cf; white-space: nowrap; }
.data-table td { border-bottom-color: #203332; }
.data-table tbody tr:hover { background: #ffffff04; }
.admin-sidebar-link { border-radius: 10px; min-height: 40px; padding: 9px 12px; font-size: 13px; }
.admin-sidebar-link.active { box-shadow: inset 3px 0 #4ade80; }
.admin-shell .flex.h-screen { height: 100dvh; }
#adminSidebar { width: 224px; }
#adminSidebar nav { scrollbar-width: thin; scrollbar-color: rgba(201, 239, 155, 0.22) transparent; }
#adminSidebar nav::-webkit-scrollbar { width: 4px; }
#adminSidebar nav::-webkit-scrollbar-track { background: transparent; }
#adminSidebar nav::-webkit-scrollbar-thumb { background: rgba(201, 239, 155, 0.22); border-radius: 9999px; }
#adminSidebar nav::-webkit-scrollbar-thumb:hover { background: rgba(201, 239, 155, 0.5); }
.admin-menu-toggle { display: none; }
.admin-backdrop { position: fixed; inset: 0; z-index: 55; background: #0009; }
.admin-backdrop[hidden] { display: none; }
.admin-topbar { gap: 12px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 200; padding: 10px 18px; border-radius: 8px; background: #dcfce7; color: #052e16; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
#notifDropdown { width: min(22rem, calc(100vw - 2rem)); }
.help-card { padding: 24px; border-radius: 18px; }
.help-card summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.help-card details + details { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--ui-line); }
.help-card details p { color: var(--ui-muted); margin-top: 12px; }
.notification-message { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 767px) {
  #adminSidebar { position: fixed; top: 0; bottom: 0; left: 0; width: min(280px, 85vw); z-index: 60; transform: translateX(-100%); transition: transform .2s ease; }
  #adminSidebar.is-open { transform: translateX(0); }
  .admin-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid var(--ui-line); border-radius: 10px; flex-shrink: 0; }
  .admin-shell .admin-topbar { padding: 0 16px; height: 76px; }
  .admin-shell .admin-content { padding: 20px 16px; }
  .admin-content > .grid.grid-cols-3 { grid-template-columns: 1fr; }
  .admin-content form.flex { flex-wrap: wrap; max-width: 100%; }
  .admin-content input.w-72 { width: 100%; }
  .admin-content > div > .flex.gap-2 { flex-wrap: wrap; }
  .admin-content .data-table { min-width: 640px; }
  #notifDropdown { position: fixed; right: 16px; top: 64px; }
  #toastContainer { left: 16px; right: 16px; }
  #toastContainer .toast { max-width: 100%; min-width: 0; }
  .form-input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
/* Mobile-first controls and cards. Keep information readable without sideways scrolling. */
.mobile-bottom-nav { display: none; }
.no-script-notice { padding: 12px 16px; background: #18312b; color: #d1fae5; text-align: center; }
button, .btn-primary, .btn-secondary, .preset-chip, .admin-sidebar-link { min-height: 44px; }
button { touch-action: manipulation; }
input, select, textarea { max-width: 100%; }
input[type=checkbox], input[type=radio] { min-width: 20px; min-height: 20px; }
input[type=range] { min-height: 44px; }
.form-label { display: block; }
#userMenu a, footer a { display: inline-flex; align-items: center; min-height: 44px; }
#userMenu a { display: flex; }
.mobile-bottom-nav a[aria-current=page] { color: #86efac; background: #17372d; }
main { overflow-wrap: anywhere; }
.landing-nav { min-height: 76px; }
.landing-hero { min-height: 520px; }
@media (max-width: 767px) {
  .has-mobile-nav { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .mobile-bottom-nav { position: fixed; z-index: 50; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px)); background: #081615; border-top: 1px solid #29403a; }
  .mobile-bottom-nav a { display: flex; min-height: 54px; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 12px; color: #becbc6; font-size: 11px; font-weight: 600; }
  .mobile-bottom-nav svg { width: 21px; height: 21px; }
  .admin-menu-toggle { width: 44px; height: 44px; }
  .admin-shell .admin-topbar { height: auto; min-height: 76px; }
  .mobile-card-table, .admin-content .mobile-card-table { display: block; min-width: 0; width: 100%; }
  .mobile-card-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .mobile-card-table tbody { display: grid; gap: 12px; padding: 12px; }
  .mobile-card-table tbody tr { display: block; border: 1px solid #29403a; border-radius: 12px; padding: 8px 12px; background: #0d1d1b; }
  .mobile-card-table tbody td { display: grid; grid-template-columns: minmax(90px, .7fr) minmax(0, 1.3fr); gap: 12px; align-items: center; padding: 10px 0; width: auto; white-space: normal; font-size: 14px; text-align: left; overflow-wrap: anywhere; }
  .mobile-card-table tbody td::before { content: attr(data-label); color: #a9bcb6; font-size: 12px; font-weight: 500; }
  .mobile-card-table tbody td:last-child { border-bottom: 0; }
  .mobile-card-table tbody td.table-empty-cell { display: block; text-align: center; padding: 24px 8px; }
  .mobile-card-table tbody td.table-empty-cell::before { display: none; }
  .mobile-card-table .truncate { white-space: normal; overflow-wrap: anywhere; }
  .mobile-card-table td > * { min-width: 0; max-width: 100%; }
  .mobile-card-table td > .flex { flex-wrap: wrap; }
  main .text-xs { font-size: 13px; }
  main .text-\[10px\], main .text-\[11px\] { font-size: 12px; }
  main .p-8 { padding: 20px; }
  main > .max-w-7xl > .flex.items-center.justify-between { gap: 16px; align-items: flex-start; flex-wrap: wrap; }
  footer .flex { flex-wrap: wrap; justify-content: center; }
  .landing-nav .btn-primary, .landing-nav .btn-secondary { padding: 10px 12px; font-size: 13px; }
  .landing-hero { min-height: auto; }
  [class*='modal'] input, [class*='modal'] select { font-size: 16px; }
}
