/* Mobile defaults keep form controls large and horizontal scrolling inside table wrappers. */
:root {
  --dark: #071C47;
  --primary: #0E4A86;
  --accent: #13859C;
  --surface: #F8FAFC;
  --card: #FFFFFF;
  --border: #E2E8F0;
  --gradient: linear-gradient(135deg, #071C47 0%, #0E4A86 55%, #13859C 100%);
  font: 16px/1.5 "Aptos", "Segoe UI", system-ui, sans-serif;
  color: var(--dark);
  background: var(--surface);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.mobile-bar, .drawer { background: var(--dark); color: white; }
.mobile-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; min-height: 69px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; overflow-wrap: anywhere; }
.brand img { width: 38px; height: 38px; object-fit: contain; border-radius: 8px; background: white; }
.drawer { display: none; }
.drawer.open { display: block; position: absolute; inset: 69px 0 auto; z-index: 1; padding: 16px; }
.drawer.open > .brand, .drawer.open .signal { display: none; }
.drawer nav { display: grid; gap: 10px; }
.drawer nav a { color: white; display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; background: var(--primary); }
main { min-width: 0; padding: clamp(16px, 5vw, 64px); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: clamp(20px, 4vw, 40px); }
.auth-card { width: min(100%, 440px); margin: clamp(12px, 6vh, 75px) auto; box-shadow: 0 14px 36px #071C470D; }
.auth-brand { margin-bottom: 30px; }
h1, h2, p { margin: 0 0 12px; }
h1 { font-size: clamp(28px, 5vw, 38px); line-height: 1.15; letter-spacing: -.025em; }
h2 { font-size: 17px; }
#form-help { color: #475569; margin-bottom: 24px; }
form { display: grid; gap: 16px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 650; }
input, button { font: inherit; border-radius: 8px; min-height: 44px; padding: 10px 12px; }
input { min-width: 0; width: 100%; border: 1px solid #94A3B8; color: var(--dark); background: var(--card); font-size: 16px; }
button { border: 1px solid transparent; background: var(--primary); color: white; font-weight: 650; cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button.secondary { background: transparent; color: inherit; border-color: currentColor; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
#status { margin: 14px 0; }
#status:empty { margin: 8px 0; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.table-scroll { max-width: 100%; overflow-x: auto; }
@media (min-width: 768px) {
  .mobile-bar { display: none; }
  .layout { display: grid; grid-template-columns: clamp(230px, 25vw, 310px) minmax(0, 1fr); min-height: 100dvh; }
  .drawer, .drawer.open { display: flex; position: sticky; top: 0; flex-direction: column; min-height: 100dvh; height: fit-content; padding: 28px; gap: 32px; background: var(--gradient); }
  .drawer.open > .brand, .drawer.open .signal { display: flex; }
  .signal { display: flex; align-items: center; justify-content: space-around; gap: 4px; margin: auto 0 0; min-height: 230px; }
  .signal i { width: 5px; height: 15px; background: var(--accent); border-radius: 10px; }
  .signal i:nth-child(3n) { height: 40px; }
  .signal i:nth-child(4n) { height: 90px; }
  .signal i:nth-child(7n) { height: 130px; }
}
