:root {
  --navy: #252743;
  --navy-soft: #3c3f60;
  --green: #92c83e;
  --green-dark: #6ea928;
  --green-pale: #edf7dc;
  --ink: #272a3e;
  --muted: #7d8296;
  --line: #e7e9ef;
  --canvas: #f6f7f9;
  --white: #fff;
  --blue: #4e83df;
  --purple: #8b70db;
  --orange: #efa64f;
  --red: #d65b66;
  --shadow: 0 12px 35px rgba(32, 39, 67, .06);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: 14px; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.eyebrow { display: block; margin-bottom: 8px; color: var(--green-dark); font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }

/* Authentication */
.auth-body { background: #f4f5f7; }
.auth-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(320px, .9fr) minmax(440px, 1.1fr); }
.auth-visual { position: relative; display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 40px clamp(28px, 6vw, 88px); background: var(--navy); color: var(--white); }
.auth-visual:before, .auth-visual:after { position: absolute; z-index: 0; border: 1px solid rgba(146, 200, 62, .2); border-radius: 50%; content: ""; pointer-events: none; }
.auth-visual:before { width: 620px; height: 620px; right: -360px; bottom: -150px; }
.auth-visual:after { width: 440px; height: 440px; right: -270px; bottom: -65px; }
.brand-lockup, .auth-copy, .auth-footer { position: relative; z-index: 1; }
.brand-lockup { display: flex; align-items: center; gap: 14px; }
.brand-lockup img { width: 64px; height: 76px; object-fit: cover; object-position: center top; border-radius: 10px; }
.brand-lockup span { color: var(--green); font-size: 21px; font-weight: 800; letter-spacing: -.04em; }
.auth-copy { max-width: 520px; margin: auto 0; padding: 70px 0; }
.auth-copy .eyebrow { color: #b7e47a; }
.auth-copy h1 { max-width: 550px; margin: 0 0 18px; color: white; font-size: clamp(34px, 4.1vw, 56px); font-weight: 750; line-height: 1.08; letter-spacing: -.045em; }
.auth-copy p { max-width: 450px; margin: 0; color: #d3d5e0; font-size: 16px; line-height: 1.7; }
.auth-points { display: grid; gap: 14px; margin-top: 32px; color: #f2f3f8; font-size: 13px; }
.auth-points span { display: flex; align-items: center; gap: 10px; }
.auth-footer { color: #b8bbce; font-size: 11px; letter-spacing: .05em; }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px 28px; }
.auth-card { width: min(100%, 430px); padding: 40px; border: 1px solid #eef0f4; border-radius: 22px; background: var(--white); box-shadow: 0 18px 50px rgba(30, 35, 59, .08); }
.auth-card-wide { width: min(100%, 600px); padding: 32px 38px; }
.auth-card h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.035em; }
.auth-card > p { margin-top: 0; }
.auth-card label, .stack-form label, .generate-form label { display: block; margin: 18px 0 0; color: #4a4d60; font-size: 12px; font-weight: 700; }
.auth-card input:not([type=hidden]), .auth-card select, .stack-form input, .generate-form input { width: 100%; height: 46px; margin-top: 7px; padding: 0 13px; border: 1px solid #e2e5ec; border-radius: 10px; outline: none; background: #fff; color: var(--ink); transition: border .15s, box-shadow .15s; }
.auth-card input:focus, .auth-card select:focus, .stack-form input:focus, .generate-form input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(146, 200, 62, .14); }
.auth-card input::placeholder, .stack-form input::placeholder { color: #adb1bf; font-weight: 400; }
.button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; gap: 10px; padding: 0 17px; border: 0; border-radius: 10px; font-size: 12px; font-weight: 750; transition: transform .15s, background .15s, box-shadow .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--green); color: #1e2b0c; box-shadow: 0 6px 14px rgba(146, 200, 62, .2); }
.button-primary:hover { background: #a0d54b; }
.button-soft { background: #eff1f5; color: var(--navy); }
.button-full { width: 100%; margin-top: 24px; }
.auth-switch { margin: 21px 0 0 !important; text-align: center; color: var(--muted); font-size: 12px; }
.auth-switch a, .text-button { color: var(--green-dark); font-weight: 750; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .span-two { grid-column: span 2; }
.alert { margin: 16px 0; padding: 13px 15px; border: 1px solid transparent; border-radius: 11px; font-size: 12px; }
.alert-error { border-color: #f4d2d5; background: #fff2f3; color: #a33d48; }
.alert-success { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; border-color: #d4edb5; background: #f4faea; color: #426b1d; }
.alert-warning { border-color: #f1dfbc; background: #fff8e9; color: #79591e; }
.alert-warning ul { margin: 8px 0 0; padding-left: 20px; }
.alert-warning li { padding: 2px 0; }
.alert-success span { color: #60843b; }
.company-choice { margin-top: 11px; }
.choice-button { display: flex; width: 100%; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: white; text-align: left; }
.choice-button:hover { border-color: var(--green); background: #fbfef7; }
.choice-button > span:nth-child(2) { flex: 1; }
.choice-button b, .choice-button small { display: block; }
.choice-button small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.choice-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: #f0f4e9; font-size: 18px; }
.choice-button strong { color: var(--green-dark); font-size: 20px; }
.inline { margin-top: 18px; }

/* Main application shell */
.app-body { min-height: 100vh; padding-top: 68px; padding-left: 248px; background: var(--canvas); }
.topbar { position: fixed; z-index: 20; inset: 0 0 auto; display: flex; height: 68px; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.brand-small { display: flex; align-items: center; gap: 9px; color: var(--navy); font-size: 16px; font-weight: 500; letter-spacing: -.04em; }
.brand-small img { width: 33px; height: 40px; object-fit: cover; object-position: center top; }
.brand-small b { color: var(--green-dark); font-weight: 800; }
.topbar-right { display: flex; align-items: center; gap: 19px; }
.company-switch select { max-width: 240px; height: 36px; padding: 0 30px 0 10px; border: 1px solid var(--line); border-radius: 9px; background-color: #fff; color: #414458; font-size: 11px; font-weight: 650; }
.user-chip { display: flex; align-items: center; gap: 9px; }
.avatar { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: var(--green-pale); color: var(--green-dark); font-size: 13px; font-weight: 800; }
.user-name { max-width: 145px; overflow: hidden; color: #595d71; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--navy-soft); font-size: 17px; transform: rotate(45deg); }
.logout-form { margin: 0; }
.logout-form.inline { margin-top: 14px; }
.sidebar { position: fixed; z-index: 15; top: 68px; bottom: 0; left: 0; display: flex; width: 248px; flex-direction: column; padding: 22px 15px 16px; border-right: 1px solid var(--line); background: #fff; }
.company-label { display: flex; align-items: center; gap: 10px; margin: 0 4px 24px; padding: 12px 9px; border-radius: 12px; background: #f7f8fa; }
.company-icon { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: #eaf4db; font-size: 17px; }
.company-label b, .company-label small { display: block; overflow: hidden; max-width: 160px; text-overflow: ellipsis; white-space: nowrap; }
.company-label b { color: var(--ink); font-size: 11px; }
.company-label small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.main-nav { display: grid; gap: 5px; }
.main-nav a { display: flex; min-height: 44px; align-items: center; gap: 11px; padding: 0 12px; border-radius: 10px; color: #74798d; font-size: 12px; font-weight: 650; }
.main-nav a:hover { background: #f7f8fa; color: var(--navy); }
.main-nav a.active { background: #edf6e2; color: #456c1e; }
.nav-icon { display: grid; width: 26px; height: 26px; place-items: center; font-size: 16px; }
.sidebar-bottom { display: flex; gap: 10px; margin-top: auto; padding: 13px 10px; border: 1px solid #edf0e6; border-radius: 12px; background: #fbfcf8; }
.help-icon { font-size: 20px; }
.sidebar-bottom b, .sidebar-bottom small { display: block; }
.sidebar-bottom b { color: #535c43; font-size: 10px; }
.sidebar-bottom small { margin-top: 4px; color: #8a8e7f; font-size: 9px; line-height: 1.4; }
.sidebar-brand { padding: 14px 4px 0; color: #a8acb9; font-size: 9px; letter-spacing: .08em; text-align: center; }
.app-main { max-width: 1480px; min-height: calc(100vh - 68px); margin: 0 auto; padding: 32px clamp(20px, 3vw, 46px) 48px; }
.app-main > .alert { margin-top: 0; }
.mobile-nav { display: none; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.page-heading h1 { margin: 0; color: var(--navy); font-size: clamp(25px, 2.7vw, 34px); font-weight: 760; letter-spacing: -.045em; line-height: 1.12; }
.page-heading p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.page-heading .eyebrow { margin-bottom: 7px; }
.wave { font-size: .8em; }
.heading-art { display: grid; width: 57px; height: 57px; place-items: center; border-radius: 17px; background: linear-gradient(140deg, #eff7e4, #e4f0f7); font-size: 26px; }
.heading-actions { display: flex; gap: 9px; }
.back-link { display: inline-block; margin-bottom: 11px; color: #74798d; font-size: 11px; }

/* Dashboard */
.trial-banner { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 13px 16px; border: 1px solid #eadcb3; border-radius: 12px; background: #fffae9; color: #715b2d; }
.trial-banner > span { font-size: 19px; }
.trial-banner b, .trial-banner small { display: block; }
.trial-banner b { font-size: 11px; }
.trial-banner small { margin-top: 3px; color: #8b7953; font-size: 10px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 17px; }
.stat-card { display: flex; min-height: 112px; align-items: flex-start; gap: 13px; padding: 18px 16px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow); }
.stat-icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 12px; font-size: 18px; }
.stat-icon.green { background: #edf7df; }
.stat-icon.purple { background: #f0eafd; }
.stat-icon.orange { background: #fff1df; }
.stat-icon.blue { background: #eaf2ff; }
.stat-card small { display: block; color: var(--muted); font-size: 10px; }
.stat-card strong { display: block; margin: 3px 0; color: var(--navy); font-size: 25px; line-height: 1.1; }
.stat-card .stat-text { font-size: 20px; }
.dashboard-grid { display: grid; grid-template-columns: 1.25fr .95fr; gap: 16px; }
.panel { border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.welcome-panel, .quick-panel { padding: 22px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.panel-heading h2 { margin: 0; color: var(--navy); font-size: 17px; letter-spacing: -.025em; }
.panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.panel-heading .eyebrow { margin-bottom: 6px; }
.large-illustration { display: grid; width: 53px; height: 53px; flex: 0 0 auto; place-items: center; border-radius: 16px; background: #f0f5e7; font-size: 25px; }
.onboarding-steps { display: flex; align-items: center; margin: 22px 0; }
.onboarding-steps > div { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; color: #868a9b; font-size: 10px; font-weight: 650; }
.onboarding-steps > div span { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid #e2e5eb; border-radius: 50%; background: #f7f8fa; color: #85899a; font-size: 10px; }
.onboarding-steps > div.done span, .onboarding-steps > div.current span { border-color: var(--green); background: var(--green); color: #263614; }
.onboarding-steps > div.done, .onboarding-steps > div.current { color: #536c34; }
.onboarding-steps i { height: 1px; flex: 1; margin: 0 9px; background: #e5e8ed; }
.quick-panel .panel-heading { margin-bottom: 11px; }
.quick-link { display: flex; align-items: center; gap: 11px; padding: 12px 0; border-top: 1px solid #f0f1f4; }
.quick-link > span:nth-child(2) { flex: 1; }
.quick-link b, .quick-link small { display: block; }
.quick-link b { color: #474a5e; font-size: 11px; }
.quick-link small { margin-top: 3px; color: #9296a5; font-size: 9px; }
.quick-link strong { color: #9da2b0; font-size: 20px; }
.quick-icon { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 11px; font-size: 17px; }
.quick-icon.lime { background: #eff7df; }
.quick-icon.lilac { background: #f2ecff; }
.quick-icon.peach { background: #fff1df; }
.legal-note { display: flex; align-items: center; gap: 11px; margin-top: 17px; padding: 13px 15px; border: 1px solid #e8ebf0; border-radius: 12px; background: #fbfcfd; }
.legal-note > span { flex: 0 0 auto; font-size: 18px; }
.legal-note p { flex: 1; margin: 0; color: #777c8e; font-size: 10px; line-height: 1.6; }
.legal-note b { color: #4f5368; }
.legal-note a { color: var(--green-dark); font-size: 10px; font-weight: 750; white-space: nowrap; }
.legal-note.compact { margin-top: 19px; background: #fbfcfd; }

/* Forms and tables */
.content-grid { display: grid; grid-template-columns: minmax(280px, .78fr) minmax(390px, 1.22fr); gap: 16px; align-items: start; }
.form-panel, .list-panel, .settings-panel, .coverage-panel, .generate-panel, .share-panel { padding: 21px; }
.panel-icon { display: grid; width: 39px; height: 39px; flex: 0 0 auto; place-items: center; border-radius: 12px; background: #f0f5e9; font-size: 18px; }
.stack-form label { margin-top: 15px; }
.stack-form input[type=range] { height: 25px; padding: 0; accent-color: var(--green-dark); }
.importance-label > span { float: right; color: var(--green-dark); font-weight: 800; }
.importance-label small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; font-weight: 400; }
.check-card { display: flex !important; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfd; }
.check-card input { width: 16px !important; height: 16px !important; flex: 0 0 auto; margin: 2px 0 0 !important; accent-color: var(--green-dark); }
.check-card span b, .check-card span small { display: block; }
.check-card span b { color: #55596d; font-size: 10px; }
.check-card span small { margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 400; }
.employee-list { display: grid; gap: 7px; }
.employee-row { display: flex; min-height: 59px; align-items: center; gap: 9px; padding: 9px; border: 1px solid #eff0f3; border-radius: 11px; }
.employee-row.is-inactive { opacity: .55; }
.access-row { display: flex; min-height: 59px; align-items: center; gap: 8px; padding: 9px; border: 1px solid #eff0f3; border-radius: 11px; }
.access-row.is-inactive { opacity: .55; }
.access-role-form { display: flex; align-items: center; gap: 4px; margin: 0; }
.access-role-form select { max-width: 91px; height: 29px; padding: 0 5px; border: 1px solid #e7e9ee; border-radius: 7px; background: #fff; color: #656a7d; font-size: 9px; }
.employee-avatar { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: #eef3fa; color: #5680b2; font-size: 13px; font-weight: 800; }
.employee-row:nth-child(3n) .employee-avatar { background: #f3edff; color: #876ec9; }
.employee-row:nth-child(3n + 1) .employee-avatar { background: #eef7e3; color: #6f9d35; }
.employee-main { min-width: 0; flex: 1; }
.employee-main b, .employee-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-main b { color: #46495c; font-size: 11px; }
.employee-main small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.importance-pill { padding: 5px 7px; border-radius: 8px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.importance-1, .importance-2 { background: #f1f2f5; color: #7e8292; }
.importance-3 { background: #edf3ff; color: #5e78ae; }
.importance-4 { background: #fff2dd; color: #b17628; }
.importance-5 { background: #fdebef; color: #b44f62; }
.mini-action { display: inline-grid; width: 29px; height: 29px; place-items: center; border: 0; border-radius: 8px; background: #f7f8fa; color: #71768b; font-size: 13px; }
.mini-action:hover { background: #eff6e5; }
.count-pill { display: inline-grid; min-width: 23px; height: 23px; margin-left: 4px; place-items: center; border-radius: 7px; background: #eff6e5; color: #608b2a; font-size: 10px; vertical-align: 2px; }
.empty-state { display: flex; min-height: 180px; flex-direction: column; align-items: center; justify-content: center; padding: 24px; color: var(--muted); text-align: center; }
.empty-state > span { margin-bottom: 8px; font-size: 30px; }
.empty-state b { color: #51556a; font-size: 13px; }
.empty-state p { margin: 5px 0 12px; font-size: 10px; }
.empty-state .button { margin-top: 8px; }
.closed-days-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.day-check input { position: absolute; opacity: 0; }
.day-check span { display: inline-flex; min-width: 48px; height: 36px; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; color: #74798d; font-size: 10px; font-weight: 700; cursor: pointer; }
.day-check input:checked + span { border-color: #d7e8bf; background: #eef7e3; color: #567d2b; }
.day-check input:focus + span { box-shadow: 0 0 0 3px rgba(146, 200, 62, .16); }
.closed-days-form .button { margin-left: auto; }
.coverage-panel { margin-top: 16px; }
.table-wrap { width: 100%; overflow-x: auto; }
.coverage-table, .schedule-table { width: 100%; border-collapse: collapse; }
.coverage-table th, .coverage-table td { padding: 8px 7px; border-bottom: 1px solid #f0f1f4; text-align: center; }
.coverage-table thead th { color: #8a8e9e; font-size: 9px; font-weight: 750; }
.coverage-table tbody th { min-width: 140px; color: #595d70; text-align: left; }
.coverage-table input[type=number] { width: 47px; height: 34px; padding: 0 5px; border: 1px solid #e7e9ee; border-radius: 8px; background: #fbfcfd; color: #4b4f63; font-size: 11px; font-weight: 700; text-align: center; }
.coverage-table select { height: 34px; padding: 0 7px; border: 1px solid #e7e9ee; border-radius: 8px; background: white; color: #4b4f63; font-size: 10px; }
.role-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border-radius: 7px; background: #f6f7fa; font-size: 10px; font-weight: 700; }
.subsection-title { display: flex; align-items: center; gap: 9px; margin: 21px 0 9px; padding-top: 16px; border-top: 1px solid var(--line); }
.subsection-title > span { font-size: 20px; }
.subsection-title h3 { margin: 0; color: var(--navy); font-size: 12px; }
.subsection-title p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 17px; }
.form-actions p { max-width: 470px; margin: 0; }

/* Schedule views */
.generate-form { display: flex; align-items: end; gap: 18px; }
.generate-form label { min-width: 180px; margin: 0; }
.generate-form input { display: block; }
.generate-explainer { display: flex; flex: 1; align-items: center; gap: 11px; padding: 7px 10px; }
.generate-explainer > span { display: grid; width: 41px; height: 41px; place-items: center; border-radius: 12px; background: #edf6e2; color: #648f2e; font-size: 17px; font-weight: 800; }
.generate-explainer b, .generate-explainer small { display: block; }
.generate-explainer b { color: #53576a; font-size: 11px; }
.generate-explainer small { max-width: 360px; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.generate-panel { margin-bottom: 16px; }
.generate-panel .panel-heading { margin-bottom: 17px; }
.run-list { display: grid; }
.run-row { display: flex; align-items: center; gap: 12px; padding: 12px 3px; border-top: 1px solid #f0f1f4; }
.run-row > span:nth-child(2) { flex: 1; }
.run-row b, .run-row small { display: block; }
.run-row b { color: #4b4e62; font-size: 11px; }
.run-row small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.run-row strong { color: var(--green-dark); font-size: 10px; }
.run-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 11px; background: #eef5e5; font-size: 17px; }
.schedule-title-row { align-items: end; }
.schedule-weeks { display: grid; gap: 14px; }
.week-panel { overflow: hidden; }
.week-heading { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.week-heading > div { display: flex; align-items: center; gap: 10px; }
.week-number { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: #edf6e2; color: #5e852e; font-size: 11px; font-weight: 800; }
.week-heading h2 { margin: 0; color: var(--navy); font-size: 13px; }
.week-heading small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.week-tag { padding: 6px 9px; border-radius: 8px; background: #f4f5f7; color: #777b8d; font-size: 9px; font-weight: 700; }
.schedule-table { min-width: 780px; }
.schedule-table th, .schedule-table td { padding: 9px 6px; border-bottom: 1px solid #f0f1f4; text-align: center; }
.schedule-table thead th { color: #777c8f; font-size: 9px; font-weight: 750; }
.schedule-table thead th:first-child { min-width: 180px; padding-left: 18px; text-align: left; }
.schedule-table thead th small { display: block; margin-top: 2px; color: #a0a4b1; font-size: 8px; font-weight: 500; }
.schedule-table thead th.sunday { color: #bb8150; }
.schedule-table tbody th { min-width: 180px; padding-left: 18px; text-align: left; }
.schedule-table tbody th small { display: block; margin-top: 3px; color: #9296a5; font-size: 8px; font-weight: 500; }
.schedule-person { color: #4e5266; font-size: 10px; font-weight: 700; }
.day-status { display: inline-flex; min-width: 64px; align-items: center; justify-content: center; padding: 5px 6px; border-radius: 7px; font-size: 8px; font-weight: 750; }
.status-work { background: #eef7e2; color: #58822a; }
.status-rest { background: #edf3ff; color: #5d78b2; }
.status-closed { background: #f0f1f4; color: #888d9d; }
.share-panel { margin-top: 15px; }
.share-text { width: 100%; min-height: 130px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; color: #626679; font-family: inherit; font-size: 11px; line-height: 1.6; resize: vertical; }
.swap-panel { margin-top: 15px; padding: 20px; }
.swap-form { display: grid; grid-template-columns: 1.1fr 1fr 1fr auto; align-items: end; gap: 12px; }
.swap-form label { display: block; color: #55596d; font-size: 10px; font-weight: 700; }
.swap-form select { width: 100%; height: 41px; margin-top: 6px; padding: 0 9px; border: 1px solid #e4e7ed; border-radius: 9px; background: #fff; color: #54586d; font-size: 10px; }
.legal-page { min-height: 100vh; padding: 32px 16px; background: var(--canvas); }
.legal-document { max-width: 860px; margin: 0 auto; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.legal-return { color: var(--green-dark); font-weight: 700; }
.legal-date { margin-top: 24px; }
.legal-document h1 { margin: 0; color: var(--navy); font-size: 32px; }
.legal-document h2 { color: var(--navy); font-size: 18px; }
.legal-document p, .legal-document ul { color: #595d70; line-height: 1.8; }
.legal-document .legal-intro { color: var(--muted); }
.legal-document section { padding: 18px 0; border-bottom: 1px solid var(--line); }
.legal-document section:last-child { border-bottom: 0; }
.legal-document a:not(.legal-return) { color: var(--green-dark); }

@media (max-width: 1050px) {
  .app-body { padding-left: 218px; }
  .sidebar { width: 218px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: minmax(260px, .8fr) minmax(350px, 1.2fr); }
  .coverage-table th, .coverage-table td { padding-right: 4px; padding-left: 4px; }
  .coverage-table input[type=number] { width: 40px; }
}

@media (max-width: 780px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-visual { min-height: 260px; padding: 20px 24px; }
  .brand-lockup img { width: 48px; height: 56px; }
  .brand-lockup span { font-size: 17px; }
  .auth-copy { padding: 28px 0 10px; }
  .auth-copy h1 { max-width: 600px; font-size: 31px; }
  .auth-copy p { font-size: 13px; }
  .auth-points { display: none; }
  .auth-footer { margin-top: 18px; }
  .auth-form-wrap { align-items: flex-start; padding: 22px 15px 35px; }
  .auth-card, .auth-card-wide { padding: 25px 21px; }
  .app-body { padding: 58px 0 76px; }
  .topbar { height: 58px; padding: 0 14px; }
  .brand-small img { width: 28px; height: 34px; }
  .brand-small { font-size: 14px; }
  .topbar-right { gap: 8px; }
  .company-switch select { max-width: min(37vw, 185px); height: 32px; padding-left: 7px; font-size: 9px; }
  .user-chip { display: none; }
  .sidebar { display: none; }
  .app-main { min-height: calc(100vh - 134px); padding: 22px 14px 32px; }
  .mobile-nav { position: fixed; z-index: 25; inset: auto 0 0; display: grid; height: 64px; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: rgba(255,255,255,.97); box-shadow: 0 -8px 20px rgba(32,39,67,.06); backdrop-filter: blur(12px); }
  .mobile-nav.has-access { grid-template-columns: repeat(5, 1fr); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #72778b; font-size: 17px; }
  .mobile-nav a span { font-size: 8px; font-weight: 650; }
  .mobile-nav a:active, .mobile-nav a:hover { color: var(--green-dark); }
  .page-heading { align-items: flex-start; margin-bottom: 17px; }
  .page-heading h1 { font-size: 26px; }
  .page-heading p { max-width: 500px; font-size: 10px; }
  .page-heading > .button { min-height: 38px; padding: 0 11px; font-size: 10px; white-space: nowrap; }
  .heading-art { width: 45px; height: 45px; border-radius: 13px; font-size: 21px; }
  .stat-grid { gap: 9px; }
  .stat-card { min-height: 91px; gap: 8px; padding: 12px 10px; border-radius: 12px; }
  .stat-icon { width: 32px; height: 32px; border-radius: 9px; font-size: 15px; }
  .stat-card small { font-size: 8px; }
  .stat-card strong { font-size: 20px; }
  .stat-card .stat-text { font-size: 17px; }
  .dashboard-grid, .content-grid { grid-template-columns: 1fr; gap: 11px; }
  .welcome-panel, .quick-panel, .form-panel, .list-panel, .settings-panel, .coverage-panel, .generate-panel, .share-panel { padding: 16px; border-radius: 13px; }
  .panel-heading h2 { font-size: 15px; }
  .panel-heading p { font-size: 10px; }
  .large-illustration { width: 43px; height: 43px; font-size: 21px; }
  .onboarding-steps { margin: 18px 0; }
  .onboarding-steps > div { gap: 4px; font-size: 8px; }
  .onboarding-steps > div span { width: 21px; height: 21px; font-size: 9px; }
  .onboarding-steps i { margin: 0 5px; }
  .legal-note { align-items: flex-start; gap: 8px; padding: 11px; }
  .legal-note p { font-size: 9px; }
  .legal-note a { font-size: 9px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-two { grid-column: auto; }
  .closed-days-form { gap: 5px; }
  .day-check span { min-width: 39px; height: 32px; padding: 0 7px; font-size: 9px; }
  .closed-days-form .button { margin-left: 0; }
  .coverage-table { min-width: 680px; }
  .coverage-table th, .coverage-table td { padding: 8px 5px; }
  .coverage-table tbody th { min-width: 115px; }
  .coverage-table input[type=number] { width: 42px; }
  .form-actions { align-items: flex-start; flex-direction: column; }
  .form-actions .button { width: 100%; }
  .generate-form { align-items: stretch; flex-direction: column; gap: 12px; }
  .generate-form label { min-width: auto; }
  .generate-explainer { padding: 4px 0; }
  .schedule-title-row { flex-direction: column; align-items: stretch; }
  .heading-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .heading-actions .button { padding: 0 9px; font-size: 10px; }
  .week-panel { border-radius: 12px; }
  .week-heading { padding: 12px; }
  .schedule-table { min-width: 735px; }
  .swap-form { grid-template-columns: 1fr; gap: 10px; }
  .swap-form .button { width: 100%; }
  .schedule-table th, .schedule-table td { padding: 8px 4px; }
  .schedule-table thead th:first-child, .schedule-table tbody th { min-width: 145px; padding-left: 11px; }
  .day-status { min-width: 56px; font-size: 7px; }
}

@media (max-width: 380px) {
  .topbar { padding: 0 10px; }
  .company-switch select { max-width: 33vw; }
  .page-heading h1 { font-size: 23px; }
  .stat-card { gap: 6px; padding: 10px 7px; }
  .stat-icon { width: 28px; height: 28px; font-size: 13px; }
  .stat-card small { font-size: 7px; }
}

@media print {
  body, .app-body { padding: 0 !important; background: white !important; }
  .topbar, .sidebar, .mobile-nav, .back-link, .heading-actions, .share-panel, .legal-note a { display: none !important; }
  .app-main { max-width: none; padding: 0; }
  .panel { box-shadow: none; break-inside: avoid; }
  .schedule-table { min-width: 0; }
  .schedule-table th, .schedule-table td { padding: 5px 3px; }
  .schedule-table thead th, .schedule-table tbody th { font-size: 8px; }
  .day-status { min-width: 0; padding: 3px; font-size: 7px; }
  .alert, .legal-note { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
