:root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    --primary: 213 54% 20%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;
    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 213 54% 20%;
    --radius: 0.625rem;
    --sidebar-background: 0 0% 98%;
    --sidebar-foreground: 240 5.3% 26.1%;
    --sidebar-primary: 213 54% 20%;
    --sidebar-primary-foreground: 0 0% 98%;
    --sidebar-accent: 240 4.8% 95.9%;
    --sidebar-accent-foreground: 240 5.9% 10%;
    --sidebar-border: 220 13% 91%;
    --sidebar-ring: 213 54% 20%;
}

/* Keep the shared navigation usable at phone widths. */
@media (max-width: 640px) {
    header > div { padding-top: 12px; padding-bottom: 12px; }
    header nav { max-width: 100%; }
    header nav ul { flex-wrap: wrap; justify-content: flex-start; }
    main { min-width: 0; }
    form input, form select, form textarea { min-width: 0; max-width: 100%; }
}

/* Header account navigation */
.profile-menu{position:relative;flex-shrink:0}
.profile-menu>summary{display:flex;align-items:center;justify-content:center;width:44px;height:44px;list-style:none;cursor:pointer;border:1px solid hsl(var(--border));border-radius:50%;background:hsl(var(--secondary));color:hsl(var(--primary))}
.profile-menu>summary::-webkit-details-marker{display:none}
.profile-menu>summary:focus-visible,.profile-panel a:focus-visible{outline:2px solid hsl(var(--primary));outline-offset:3px}
.profile-panel{position:absolute;right:0;top:calc(100% + 8px);z-index:50;width:220px;max-width:calc(100vw - 48px);padding:8px;border:1px solid hsl(var(--border));border-radius:14px;background:hsl(var(--background));box-shadow:0 8px 24px #00000014}
.profile-name{padding:8px 12px;color:hsl(var(--muted-foreground));overflow-wrap:anywhere}
.profile-panel a{display:flex;align-items:center;min-height:44px;padding:8px 12px;border-radius:8px}
.profile-panel a:hover{background:hsl(var(--secondary))}
.alert-count{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 5px;margin-left:6px;border-radius:999px;background:#dc2626;color:#fff;font-size:12px;font-weight:700;line-height:1}
.alert-count[hidden]{display:none}

/* Shared page rhythm and controls across the web app. */
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#172b3e;background:#fff;-webkit-font-smoothing:antialiased}
body>header{background:#fff;border-bottom:1px solid #e7ecf1}
body>header>div{min-height:80px;gap:20px}
body>header nav a{min-height:44px;letter-spacing:-.01em}
body>header nav a:hover{color:#183650}
.app-content{box-sizing:border-box;width:100%;max-width:1280px;margin:0 auto;padding:36px 24px 56px;display:flex;flex-direction:column;gap:24px;min-width:0}
.app-content--narrow{max-width:768px}
.app-content--form{max-width:896px}
.app-content h1{font-size:30px;line-height:1.2;letter-spacing:-.035em;font-weight:650;color:#142c43}
.app-content h2{letter-spacing:-.02em}
.app-content>section:first-child{flex-wrap:wrap}
.app-content section.rounded-xl,.app-content form.rounded-xl{border-color:#e4eaf0;border-radius:16px;box-shadow:0 2px 6px #18365005}
.app-content input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),.app-content select,.app-content textarea{background:#f4f6f8;border:1px solid #e4eaf0;border-radius:10px;box-shadow:none;font-size:15px}
.app-content input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),.app-content select{min-height:44px}
.app-content textarea{min-height:44px}
.app-content input:focus,.app-content select:focus,.app-content textarea:focus{border-color:#8da6bd;outline:2px solid #18365018;outline-offset:1px}
.app-content label{line-height:1.4}
.app-content form.flex>button,.app-content form.grid>button{align-self:end}
.app-content button,.app-content a[data-slot=button]{border-radius:10px}
.app-content thead{background:#f7f9fb}
.app-content th{color:#68788a;font-size:12px;letter-spacing:.025em}
.app-content td{border-color:#edf1f5}
.settings-back{align-self:flex-start;display:inline-flex;align-items:center;min-height:44px;color:#5a7085;font-size:14px}
.settings-back:hover{color:#183650;text-decoration:underline}
@media(max-width:640px){
  body>header>div{position:relative;padding:14px 20px;min-height:76px}
  body>header>div>div:first-child{width:100%;padding-top:10px;gap:18px}
  body>header nav{width:100%;overflow-x:auto}
  body>header nav ul{flex-wrap:nowrap;justify-content:flex-start}
  .profile-menu{position:absolute;right:20px;top:12px}
  .app-content{padding:24px 20px 40px;gap:20px}
  .app-content h1{font-size:27px}
  .app-content .p-6{padding:20px}
}

/* Public authentication and onboarding surfaces */
.auth-page{margin:0;min-height:100vh;background:#f7fafc;color:#183650;font:16px/1.5 "Myriad Pro",Myriad,Arial,sans-serif}
.auth-shell{box-sizing:border-box;width:min(100% - 32px,660px);margin:clamp(28px,7vh,72px) auto 48px}
.auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:30px;color:#183650;font-weight:800;letter-spacing:.08em}
.auth-brand-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:#183650;color:#fff;letter-spacing:0}
.auth-panel{background:#fff;border-radius:20px;padding:clamp(24px,5vw,42px);box-shadow:0 18px 50px rgba(24,54,80,.10)}
.auth-panel h1{max-width:15ch;margin:0 0 12px;color:#183650;font-size:clamp(31px,7vw,46px);line-height:1.05;letter-spacing:-.03em}
.auth-copy{max-width:58ch;margin:0;color:#536b7d}
.auth-form{display:grid;gap:18px;margin-top:28px}
.auth-form label{display:grid;gap:7px;color:#183650;font-weight:700}
.auth-form input{box-sizing:border-box;width:100%;min-height:50px;border:1px solid #c5d4dd;border-radius:12px;background:#f8fafb;padding:13px 15px;color:#183650;font:inherit;outline:none}
.auth-form input:focus{border-color:#007dba;background:#fff;box-shadow:0 0 0 4px rgba(0,125,186,.12)}
.auth-form button{display:flex;align-items:center;justify-content:center;width:100%;min-height:50px;border:0;border-radius:12px;background:#183650;padding:13px 15px;color:#fff;font-family:inherit;font-size:16px;font-weight:700;line-height:1.25;cursor:pointer}
.auth-form button:hover{background:#244b6e}
.auth-form button:focus-visible,.auth-links a:focus-visible{outline:3px solid rgba(0,125,186,.3);outline-offset:3px}
.auth-notice{margin:22px 0 0;padding:17px 18px;border-radius:14px;background:#edf7fb;color:#183650}
.auth-notice--error{background:#fff0f0;color:#8a2430}
.auth-links{display:flex;flex-wrap:wrap;gap:18px;margin-top:26px}
.auth-links a{color:#183650;font-weight:700;text-underline-offset:3px}
.auth-note{margin:18px 0 0;color:#536b7d;font-size:14px}
@media(max-width:560px){.auth-shell{width:min(100% - 20px,660px)}.auth-panel{border-radius:16px}.auth-brand{margin-left:4px}}
