.auth-welcome{min-height:660px}.auth-card{background:#fff;border:1px solid #dce7e0;border-radius:20px;padding:28px;box-shadow:0 16px 45px #264c3810}.auth-card h2{margin:8px 0;font-size:24px}.auth-card>p,.small-note{color:#71867b;font-size:12px}.stack-form{display:grid;gap:14px}.stack-form label,.user-card label{display:grid;gap:5px;font-size:12px;color:#5e786b}.stack-form input,.user-card input{width:100%;padding:10px 12px;border:1px solid #d5e2dc;border-radius:9px;background:#fff;color:#193c34;font:inherit}.stack-form input:focus,.user-card input:focus{outline:2px solid #a1c9b5;border-color:#458674}.stack-form .primary{justify-self:start;min-width:140px}.form-message{font-size:12px;color:#a04536;min-height:1em;margin:2px 0}.form-message.message-success{color:#176b4f}.center-screen{padding:50px 20px;min-height:680px}.center-screen .auth-card{max-width:550px;margin:auto}.clinical-warning{background:#fff8eb;border:1px solid #f0d6a2;color:#704c16;border-radius:12px;padding:15px;font-size:12px;line-height:1.9}.clinical-warning p{margin:4px 0 0}.calc-intro{margin-top:18px}.site-link{font-size:12px;text-decoration:none;color:#476f60}.admin-heading h3,.admin-heading p{margin:0 0 8px}.admin-heading p{font-size:12px;color:#768d80}.admin-card,.user-card{background:#fff;border:1px solid #dce7e0;border-radius:14px;padding:18px;margin:18px 0}.admin-card h4,.user-card h4{margin:0}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.user-list{display:grid;gap:12px}.user-card{margin:0}.user-card h4{font-size:15px}.user-meta{font-size:12px;color:#6e8579;overflow-wrap:anywhere}.user-card form{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end}.user-card .checkbox-label{display:flex;align-items:center;gap:8px;grid-column:1/-1}.user-card .checkbox-label input{width:auto}.user-card .secondary{white-space:nowrap}.exit-link{margin-right:20px}.admin-only[hidden]{display:none!important}.license-card .secondary{margin:4px}.stack-form .text-button{justify-self:start}@media(max-width:700px){.auth-welcome{min-height:0}.auth-card{width:100%;padding:22px}.center-screen{padding:30px 14px;min-height:70vh}.form-grid,.user-card form{grid-template-columns:1fr}.user-card .checkbox-label{grid-column:auto}.user-card .secondary{justify-self:start}.site-link{font-size:10px}}

:root {
  --wd-deep: #08261f;
  --wd-forest: #16483a;
  --wd-gold: #d8ad48;
  --wd-gold-light: #f4d987;
  --wd-paper: #f7f5ef;
  --wd-ink: #17342b;
  --wd-muted: #5d7167;
  font-family: Vazirmatn, Tahoma, "Segoe UI", sans-serif;
  color: var(--wd-ink);
  background: #eaece4;
}
body { min-width: 320px; background: radial-gradient(circle at 10% 0%, #e0e8dd, transparent 35rem), #eaece4; }
#device { max-width: 1480px; min-height: calc(100vh - 36px); margin: 18px auto; border: 1px solid #d4ded5; border-radius: 22px; overflow: clip; background: var(--wd-paper); box-shadow: 0 24px 80px #09241d1c; }
.topbar { min-height: 82px; padding: 14px clamp(20px, 3vw, 38px); background: var(--wd-deep); border: 0; color: #fffdf5; }
.brand { direction: ltr; gap: 12px; text-align: left; }
.brand-mark, .signature-mark { display: grid; place-items: center; flex: none; overflow: hidden; border: 1px solid #d8ad4859; border-radius: 50%; background: #03150f; }
.brand-mark { width: 48px; height: 48px; }
.brand-mark img { width: 46px; height: 46px; object-fit: contain; mix-blend-mode: screen; }
.brand b { color: #fffdf3; font-family: Georgia, serif; font-size: 19px; letter-spacing: .13em; line-height: 1.2; }
.brand small { margin-top: 5px; color: #d5ded3; font-size: 11px; direction: rtl; }
.top-actions { gap: 16px; }
.top-actions .badge { padding: 7px 12px; border: 1px solid #e5c56a5c; border-radius: 999px; background: #fff9e30d; color: #f2dda1; }
.top-actions .secondary { border-color: #c3d4c644; background: #ffffff10; color: #fffdf4; }
.site-link { color: #e6eddf; font-size: 12px; text-decoration: none; }
.site-link:hover { color: var(--wd-gold-light); }
.primary, .secondary { min-height: 44px; border-radius: 11px; font-weight: 700; transition: background .2s, border-color .2s, transform .2s; }
.primary { background: #105443; color: #fff; }
.primary:hover { background: #0a3d30; }
.secondary { border: 1px solid #cadbd0; background: #fff; color: #245347; }
.secondary:hover { border-color: #92b7a5; background: #f3f8f3; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #d8ad48; outline-offset: 3px; }
.eyebrow { color: #557467; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.welcome { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .82fr); gap: clamp(34px, 6vw, 90px); align-items: center; padding: clamp(42px, 6vw, 90px); }
.auth-welcome { min-height: 690px; background: radial-gradient(circle at 85% 25%, #23634d 0, transparent 32%), radial-gradient(circle at 5% 95%, #b58c332e 0, transparent 31%), linear-gradient(120deg, #041a14, #0c392d 62%, #114b3a); }
.welcome-copy { position: relative; isolation: isolate; min-width: 0; color: #fffdf5; }
.welcome-copy::before { content: ""; position: absolute; z-index: -1; top: -95px; right: -45px; width: min(420px, 90%); aspect-ratio: 1; border: 1px solid #e4c67522; border-radius: 50%; box-shadow: 0 0 0 38px #e4c67508, 0 0 0 80px #e4c67508; pointer-events: none; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 10px; color: #e4cb80; font: 600 11px Georgia, serif; letter-spacing: .18em; direction: ltr; }
.eyebrow-line { display: block; width: 34px; height: 1px; background: #e4cb80; }
.welcome h1 { margin: 22px 0 16px; color: #fffef8; font-size: clamp(32px, 3.3vw, 49px); line-height: 1.6; letter-spacing: -.04em; }
.welcome em { color: var(--wd-gold-light); }
.welcome-copy > p { max-width: 530px; margin: 0 0 22px; color: #e4ece3; font-size: 15px; line-height: 2.1; }
.clinical-warning { padding: 15px 17px; border: 1px solid #dec47b; border-radius: 14px; background: #fff8e9; color: #61430e; font-size: 13px; line-height: 1.9; }
.clinical-warning strong { display: block; color: #5a3d0d; }
.clinical-warning p { margin: 4px 0 0; }
.welcome-facts { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 26px; }
.welcome-facts > div { gap: 4px; padding-left: 20px; border-color: #c2d5c933; }
.welcome-facts b { color: #fffdf3; font-size: 13px; }
.welcome-facts span { color: #d0dfd2; font-size: 11px; }
.hero-signature { display: flex; align-items: center; gap: 11px; margin-top: 34px; direction: ltr; text-align: left; }
.signature-mark { width: 51px; height: 51px; }
.signature-mark img { width: 49px; height: 49px; object-fit: contain; mix-blend-mode: screen; }
.hero-signature b, .hero-signature small { display: block; color: #ecd590; font-family: Georgia, serif; }
.hero-signature b { font-size: 12px; letter-spacing: .18em; }
.hero-signature small { margin-top: 5px; color: #c2d5c5; font-size: 8px; letter-spacing: .12em; }
.auth-card { position: relative; padding: clamp(24px, 3vw, 38px); border: 1px solid #e6e7dc; border-radius: 20px; background: #fffefa; box-shadow: 0 28px 70px #00170f38; }
.auth-card::before { content: ""; display: block; width: 42px; height: 3px; margin-bottom: 23px; border-radius: 9px; background: var(--wd-gold); }
.auth-card h2 { margin: 8px 0 10px; color: #143e31; font-size: clamp(23px, 2.5vw, 30px); }
.auth-card > p, .small-note { color: #5d7167; font-size: 13px; line-height: 1.9; }
.stack-form { gap: 15px; margin-top: 22px; }
.stack-form label, .user-card label { gap: 6px; color: #33564a; font-size: 13px; font-weight: 700; }
.stack-form input, .user-card input { min-height: 48px; padding: 11px 13px; border: 1px solid #cadbd0; border-radius: 10px; background: #fdfefa; color: #16382c; font-size: 15px; font-weight: 400; }
.stack-form input:focus, .user-card input:focus { outline: 3px solid #b5d7c480; border-color: #3a856c; }
.auth-card .stack-form .primary { width: 100%; margin-top: 3px; }
.register-link { width: 100%; margin-top: 12px; }
.stack-form .remember-choice { display: flex; align-items: center; gap: 9px; font-weight: 400; }
.stack-form .remember-choice input { width: 18px; height: 18px; min-height: 18px; padding: 0; accent-color: #17694f; }
.form-message { min-height: 1em; color: #a22f22; font-size: 13px; }
.form-message.message-success { color: #176544; }
.text-button { min-height: 36px; color: #1b604b; font-size: 12px; font-weight: 700; }
.text-button:hover { text-decoration: underline; }
.center-screen { min-height: 70vh; padding: 54px 20px; background: radial-gradient(circle at 50% 0, #e2ece1, transparent 50%), var(--wd-paper); }
.center-screen .auth-card { max-width: 550px; box-shadow: 0 18px 50px #08261f12; }
.workspace { grid-template-columns: 235px minmax(0, 1fr); min-height: 760px; background: #f7f6f1; }
.sidebar { padding: 28px 16px; border-left: 1px solid #33584a; background: linear-gradient(165deg, #0a2d23, #113b2e); color: #fff; }
.profile { gap: 11px; margin: 3px 5px 32px; }
.avatar { width: 42px; height: 42px; border: 1px solid #d8ad4870; background: #e5c56b1a; color: #f5de9a; font-weight: 700; }
.profile b { color: #fffdf7; font-size: 13px; }
.profile small { color: #c7dacf; font-size: 11px; }
.sidebar nav { gap: 6px; }
.sidebar nav button { gap: 11px; min-height: 48px; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; color: #d8e5da; font-size: 13px; }
.sidebar nav button:hover { background: #ffffff0d; }
.sidebar nav button span { font-size: 12px; }
.sidebar nav button.active { border-color: #f0d27c4a; background: #f0d27c18; color: #ffeab1; }
.nav-icon { display: block; width: 20px; height: 20px; flex: none; }
.side-footer { margin: auto 5px 0; padding-top: 35px; color: #c5d6c9; font-size: 11px; }
.side-footer .text-button { color: #eed796; }
.main-panel { min-width: 0; padding: clamp(20px, 2.5vw, 38px); background: #f8f7f2; }
.page-heading { gap: 15px; margin-bottom: 23px; padding-bottom: 19px; border-bottom: 1px solid #e1e8df; }
.page-heading h2 { color: #143b2f; font-size: clamp(21px, 2vw, 27px); }
.preview-label { padding: 6px 10px; border: 1px solid #e5d199; border-radius: 999px; background: #fff9e9; color: #725317; font-size: 11px; white-space: nowrap; }
.intro { color: #5d7167; font-size: 13px; }
.calc-intro { margin: 18px 0 14px; }
#calculator { width: 100%; border: 0; border-radius: 16px; background: transparent; }
#prescriptionFrame { width: 100%; height: 1500px; border: 0; border-radius: 16px; background: transparent; }
.license-card, .admin-card, .user-card { border: 1px solid #dce6dc; border-radius: 17px; background: #fffefa; box-shadow: 0 12px 32px #133c2a08; }
.license-card { padding: 26px; }
.license-card h3 { color: #163d30; }
.license-card dl > div { border-color: #e6ece4; font-size: 13px; }
.license-card dt, .user-meta { color: #607569; }
.callout { border-color: #dce8dc; background: #eef5ec; color: #355b49; font-size: 13px; }
.admin-heading h3 { color: #163d30; }
.admin-heading p { color: #617569; font-size: 13px; }
.admin-card, .user-card { padding: 22px; }
.user-card form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
.user-card .checkbox-label input { min-height: 18px; accent-color: #17694f; }
.bottom-nav { border-color: #dce7dd; background: #fffefbf5; }
.bottom-nav button { display: grid; justify-items: center; align-content: center; gap: 4px; min-width: 82px; min-height: 52px; color: #61766a; }
.bottom-nav button[data-view="prescription"] { min-width: 65px; }
.bottom-nav button span { font-size: 11px; }
.bottom-nav button.active { color: #126348; }
.app-footer { padding: 17px 30px; border-color: #e1e8df; background: #fffefa; color: #627a6c; font-size: 11px; }
@media (max-width: 850px) {
  .welcome { grid-template-columns: minmax(0, 1fr) minmax(300px, .85fr); gap: 30px; padding: 40px 24px; }
  .welcome h1 { font-size: 32px; }
  .workspace { grid-template-columns: 205px minmax(0, 1fr); }
}
@media (max-width: 700px) {
  #device { min-height: 100vh; margin: 0; border: 0; border-radius: 0; }
  .topbar { min-height: 72px; padding: 11px 15px; }
  .brand-mark { width: 42px; height: 42px; }
  .brand-mark img { width: 40px; height: 40px; }
  .brand b { font-size: 15px; }
  .brand small { font-size: 10px; }
  .top-actions { gap: 8px; }
  .site-link { font-size: 11px; }
  .welcome { display: flex; flex-direction: column; align-items: stretch; gap: 27px; padding: 34px 18px 40px; }
  .auth-welcome { min-height: 0; }
  .welcome h1 { margin: 18px 0 12px; font-size: clamp(29px, 8vw, 37px); }
  .welcome-copy > p { font-size: 14px; }
  .welcome-facts { gap: 12px; margin-top: 20px; }
  .welcome-facts > div { padding-left: 11px; }
  .welcome-facts b { font-size: 12px; }
  .hero-signature { margin-top: 22px; }
  .auth-card { width: 100%; padding: 24px; }
  .center-screen { padding: 30px 16px; }
  .workspace { display: block; min-height: 0; }
  .sidebar { display: none; }
  .main-panel { padding: 22px 14px 28px; }
  .page-heading { align-items: flex-start; gap: 8px; }
  .page-heading h2 { font-size: 20px; }
  .preview-label { font-size: 10px; }
  .form-grid, .user-card form { grid-template-columns: 1fr; }
  .user-card .checkbox-label { grid-column: auto; }
  .bottom-nav { display: flex; }
  .app-footer { padding: 14px; }
  .app-footer span { display: none; }
}
@media (max-width: 380px) {
  .topbar { gap: 7px; }
  .brand { gap: 7px; }
  .brand small { font-size: 9px; }
  .top-actions { gap: 5px; }
  #installApp { padding: 6px; font-size: 10px; }
  .page-heading { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .primary, .secondary { transition: none; } }
