:root {
  --ink: #17323a;
  --muted: #71828a;
  --line: #e4eceb;
  --paper: #ffffff;
  --canvas: #f4f8f7;
  --teal: #0d756a;
  --teal-dark: #0b5b54;
  --teal-soft: #e6f4f1;
  --orange: #e99b5d;
  --orange-soft: #fff0e4;
  --blue: #4b7fcf;
  --blue-soft: #eaf1ff;
  --red: #cc6a60;
  --red-soft: #fff0ee;
  --shadow: 0 20px 60px rgba(27, 61, 65, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
body.app-booting { background: #fff; }
body.app-booting #login-view { visibility: hidden; }
.payroll-view { min-height: calc(100vh - 86px); overflow: hidden; }
.payroll-frame { display: block; width: calc(100% + 84px); height: calc(100vh - 16px); min-height: 820px; margin: -46px -42px -70px; border: 0; background: #fff; }
.muted { color: var(--muted); }
.eyebrow { color: #9aacae; font-size: 11px; font-weight: 800; letter-spacing: .16em; margin: 0 0 10px; }
.eyebrow.teal { color: var(--teal); }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--teal); color: #fff; font-weight: 900; font-size: 12px; letter-spacing: -.08em; white-space: nowrap; box-shadow: 0 8px 18px rgba(13,117,106,.22); }
.brand-mark.large { width: 54px; height: 54px; border-radius: 16px; font-size: 14px; margin-bottom: 70px; }

/* Login */
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; background: #fff; }
.login-art { background: linear-gradient(145deg, #e7f5f1 0%, #f8fbfa 58%, #fff 100%); padding: 72px clamp(42px, 8vw, 130px); display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.login-art::after { content: ""; position: absolute; width: 460px; height: 460px; border: 1px solid rgba(13,117,106,.12); border-radius: 50%; right: -190px; bottom: -190px; box-shadow: 0 0 0 40px rgba(13,117,106,.03), 0 0 0 80px rgba(13,117,106,.025); }
.login-art h1 { font-size: clamp(40px, 5vw, 70px); line-height: .99; letter-spacing: -.065em; margin: 0 0 30px; font-weight: 750; }
.login-art h1 em { color: var(--teal); font-style: normal; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #48ae72; box-shadow: 0 0 0 5px rgba(72,174,114,.12); display: inline-block; }
.login-card-wrap { display: grid; place-items: center; padding: 40px 7vw; background: #fff; }
.login-card { width: min(100%, 405px); }
.mobile-brand { display: none; align-items: center; gap: 10px; font-weight: 800; margin-bottom: 55px; }
.login-card h2 { font-size: 36px; letter-spacing: -.05em; margin: 0 0 9px; }
.login-card > .muted { margin: 0 0 32px; }
.stack-form { display: grid; gap: 19px; }
.stack-form label { display: grid; gap: 8px; color: #496165; font-size: 13px; font-weight: 750; }
.stack-form input, .inline-form input, .search-field input { width: 100%; border: 1px solid var(--line); background: #fbfdfc; color: var(--ink); outline: 0; border-radius: 11px; padding: 13px 14px; transition: border .2s, box-shadow .2s; }
.stack-form input:focus, .inline-form input:focus, .search-field input:focus { border-color: rgba(13,117,106,.65); box-shadow: 0 0 0 4px rgba(13,117,106,.09); }
.primary-btn, .secondary-btn { border: 0; border-radius: 11px; min-height: 43px; padding: 0 16px; font-weight: 800; transition: transform .15s, box-shadow .15s, background .15s; }
.primary-btn { background: var(--teal); color: #fff; box-shadow: 0 9px 20px rgba(13,117,106,.18); }
.primary-btn:hover { background: var(--teal-dark); transform: translateY(-1px); }
.primary-btn:disabled { background: #aebfc1; box-shadow: none; cursor: not-allowed; transform: none; }
.primary-btn span { margin-left: 14px; font-size: 17px; }
.primary-btn.full { width: 100%; margin-top: 7px; min-height: 49px; }
.secondary-btn { background: #f0f6f5; color: var(--teal-dark); }
.secondary-btn:hover { background: #e0efed; }
code { color: var(--teal-dark); background: #e7f5f1; padding: 2px 5px; border-radius: 5px; font-size: 11px; }

/* App shell */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); }
.sidebar { background: #fff; border-right: 1px solid var(--line); padding: 25px 16px 19px; display: flex; flex-direction: column; min-height: 100vh; }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 0 10px; }
.sidebar-brand strong { display: block; font-size: 16px; letter-spacing: -.03em; }
.sidebar-brand small { display: block; color: #9aaeb0; font-size: 10px; margin-top: 2px; }
.side-nav { display: grid; gap: 7px; margin-top: 54px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; border: 0; border-radius: 11px; background: transparent; color: #789093; padding: 12px 12px; text-align: left; font-size: 13px; font-weight: 750; }
a.nav-item { text-decoration: none; }
.nav-item:hover { background: #f4f8f7; color: var(--teal); }
.nav-item.active { background: var(--teal-soft); color: var(--teal-dark); }
.nav-icon { width: 18px; text-align: center; font-size: 16px; }
.nav-badge { margin-left: auto; min-width: 21px; height: 21px; border-radius: 7px; display: grid; place-items: center; background: #fff; color: var(--teal); font-size: 10px; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 20px; }
.test-mode-entry { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 42px; border: 1px solid rgba(250, 204, 21, .38); border-radius: 11px; padding: 9px 11px; background: rgba(254, 249, 195, .92); color: #854d0e; font-size: 11px; font-weight: 850; text-align: left; }
.test-mode-entry:hover { background: #fef08a; }
.test-mode-entry-icon { display: grid; place-items: center; flex: 0 0 23px; width: 23px; height: 23px; border-radius: 8px; background: #f59e0b; color: #fff; font-size: 11px; font-weight: 950; }
.security-card { display: flex; gap: 10px; align-items: center; padding: 12px; background: #f7fbfa; border-radius: 12px; }
.security-card strong, .security-card small { display: block; }
.security-card strong { font-size: 11px; }
.security-card small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.logout-btn { border: 0; border-top: 1px solid var(--line); padding: 19px 12px 0; background: transparent; color: #8ba0a2; text-align: left; font-size: 12px; font-weight: 700; }
.logout-btn span { font-size: 16px; margin-right: 8px; }
.main-area { min-width: 0; }
.topbar { height: 86px; display: flex; align-items: center; justify-content: space-between; padding: 0 42px; background: #fff; border-bottom: 1px solid var(--line); }
.test-mode-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 11px 42px; border-bottom: 1px solid #facc15; background: #fffbeb; color: #713f12; }
.test-mode-banner > div { display: grid; gap: 2px; }
.test-mode-banner strong { font-size: 13px; }
.test-mode-banner span { font-size: 11px; }
.test-mode-banner button { min-height: 34px; border: 0; border-radius: 9px; padding: 0 13px; background: #92400e; color: #fff; font-size: 11px; font-weight: 850; white-space: nowrap; }
.topbar-kicker { color: #a1b0b3; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.topbar-title h2 { margin: 4px 0 0; font-size: 16px; letter-spacing: -.03em; }
.topbar-account { display: flex; align-items: center; gap: 10px; }
.topbar-account strong, .topbar-account small { display: block; }
.topbar-account strong { font-size: 12px; }
.topbar-account small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.avatar { width: 35px; height: 35px; border-radius: 50%; display: grid; place-items: center; background: #dcefe9; color: var(--teal-dark); font-size: 11px; font-weight: 900; }
.account-more, .icon-btn { border: 0; background: transparent; color: #8ca2a4; font-size: 22px; margin-left: 8px; }
.mobile-menu-wrap { display: none; }
.content-wrap { padding: 46px 42px 70px; max-width: 1510px; margin: 0 auto; }
.page-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.page-intro h1 { margin: 0 0 8px; font-size: 34px; letter-spacing: -.06em; line-height: 1.06; }
.page-intro h1 .wave { display: inline-block; color: var(--orange); font-size: 25px; transform: rotate(20deg); margin-left: 4px; }
.page-intro > div > .muted { margin: 0; font-size: 13px; }
.month-control { min-width: 190px; }
.month-control label { display: block; color: #97a9aa; font-size: 10px; font-weight: 800; letter-spacing: .09em; margin-bottom: 8px; text-transform: uppercase; }
.month-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 11px; padding: 0 5px; background: #fff; }
.month-input input { border: 0; outline: 0; background: transparent; color: var(--ink); padding: 10px 2px; min-width: 125px; font-weight: 750; font-size: 12px; }
.month-arrow { border: 0; background: transparent; color: #8ba1a3; font-size: 22px; width: 25px; height: 33px; }
.month-arrow:hover { color: var(--teal); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 43px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 17px 18px; min-height: 100px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #829699; font-size: 11px; font-weight: 700; }
.stat-value { margin-top: 15px; font-size: 27px; letter-spacing: -.06em; font-weight: 800; }
.stat-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; font-size: 14px; }
.stat-icon.teal { background: var(--teal-soft); color: var(--teal); }.stat-icon.orange { background: var(--orange-soft); color: var(--orange); }.stat-icon.blue { background: var(--blue-soft); color: var(--blue); }.stat-icon.red { background: var(--red-soft); color: var(--red); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.section-heading h3, .table-head h3 { font-size: 19px; letter-spacing: -.045em; margin: 0; }
.week-tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 2px; }
.week-tab { border: 1px solid transparent; background: transparent; color: #90a1a4; border-radius: 9px; padding: 8px 13px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.week-tab:hover { background: #fff; }.week-tab.active { background: var(--teal); color: #fff; box-shadow: 0 6px 14px rgba(13,117,106,.15); }
.attendance-calendar { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 10px; }
.day-card { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 11px; min-height: 144px; transition: border .2s, box-shadow .2s, transform .2s; }
.day-card:hover { border-color: #c8dfdb; box-shadow: 0 7px 16px rgba(33,80,77,.06); transform: translateY(-1px); }
.day-card.weekend { background: #fbfcfc; }.day-card.today { border-color: rgba(13,117,106,.55); box-shadow: 0 0 0 3px rgba(13,117,106,.08); }
.day-card.locked { background: #f8faf9; }.day-card.locked:hover { transform: none; box-shadow: none; }
.day-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }.day-name { color: #a3b0b1; font-size: 9px; font-weight: 800; text-transform: uppercase; }.day-number { font-size: 18px; letter-spacing: -.04em; font-weight: 850; }.today-label { color: var(--teal); font-size: 8px; font-weight: 800; }
.shift-select { width: 100%; border: 1px solid #e4eeec; border-radius: 8px; background: #fbfdfc; color: #5b7476; font-size: 10px; font-weight: 750; padding: 8px 4px; outline: 0; }.shift-select:focus { border-color: var(--teal); }.shift-select:disabled { color: #9caeaf; background: #f1f5f4; }
.hours-row { display: flex; align-items: center; gap: 4px; margin-top: 7px; color: #9badad; font-size: 10px; }.hours-input { width: 48px; border: 0; border-bottom: 1px solid #dce8e6; background: transparent; outline: 0; color: var(--teal-dark); font-size: 11px; font-weight: 800; padding: 2px 0; }.hours-input:disabled { color: #9badad; }
.entry-note { width: 100%; border: 0; border-bottom: 1px dashed #dce8e6; background: transparent; outline: 0; color: #657e80; font-size: 9px; padding: 7px 0 3px; }.entry-note::placeholder { color: #b3c0c0; }.entry-note:disabled { color: #9badad; }
.status-strip { display: flex; gap: 6px; align-items: center; margin-top: 7px; font-size: 9px; color: #99a9aa; }.status-strip .mini-dot { width: 6px; height: 6px; border-radius: 50%; background: #c7d0d0; }.status-strip.filled { color: var(--teal); }.status-strip.filled .mini-dot { background: var(--teal); }
.submit-bar { display: flex; align-items: center; justify-content: flex-end; gap: 0; padding: 0; background: transparent; border: 0; border-radius: 0; margin-top: 26px; box-shadow: none; }.submit-bar > div { display: flex; align-items: center; gap: 12px; }.submit-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: var(--teal); background: #fff; font-weight: 900; }.submit-bar strong, .submit-bar small { display: block; }.submit-bar strong { font-size: 12px; }.submit-bar small { color: #71908e; font-size: 10px; margin-top: 3px; }.submit-bar .primary-btn { min-width: 190px; }
.review-note { border-radius: 13px; padding: 13px 15px; background: var(--orange-soft); border: 1px solid #f4dac6; color: #985f38; margin-bottom: 18px; font-size: 12px; }.review-note strong { display: block; color: #814a2a; margin-bottom: 3px; }

/* Manager */
.manager-intro { align-items: flex-end; }.manager-actions { display: flex; align-items: flex-end; gap: 10px; }.manager-actions .secondary-btn { height: 43px; }
#export-shared-image:disabled { cursor: wait; opacity: .65; }
.filter-pills { display: flex; flex-wrap: wrap; gap: 7px; }.filter-pill { border: 1px solid transparent; background: transparent; color: #8ea0a2; border-radius: 8px; padding: 8px 10px; font-size: 11px; font-weight: 800; }.filter-pill span { color: #b2bebe; margin-left: 4px; }.filter-pill.active { background: #fff; border-color: var(--line); color: var(--teal-dark); box-shadow: 0 4px 12px rgba(33,80,77,.04); }.filter-pill.active span { color: var(--teal); }
.manager-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 13px; }.search-field { width: 220px; display: flex; gap: 7px; align-items: center; border: 1px solid var(--line); background: #fff; border-radius: 9px; padding-left: 11px; color: #a0b0b1; }.search-field input { border: 0; background: transparent; padding: 10px 10px 10px 0; font-size: 11px; }.search-field input:focus { box-shadow: none; }
.table-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }.table-head { padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 15px; border-bottom: 1px solid var(--line); }.table-head h3 { font-size: 16px; }.table-head p { margin: 5px 0 0; font-size: 10px; }.table-scroll { overflow-x: auto; } table { width: 100%; border-collapse: collapse; min-width: 700px; } th { color: #a0adaf; background: #fbfdfc; text-align: left; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; padding: 12px 20px; font-weight: 850; } td { border-top: 1px solid #edf2f1; padding: 14px 20px; font-size: 11px; color: #637a7c; } tr:hover td { background: #fbfdfc; }.employee-cell { display: flex; align-items: center; gap: 10px; }.employee-cell .avatar { width: 30px; height: 30px; font-size: 9px; }.employee-cell strong, .employee-cell small { display: block; }.employee-cell strong { color: var(--ink); font-size: 11px; }.employee-cell small { color: #9aabad; font-size: 10px; margin-top: 3px; }.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 7px; font-size: 10px; font-weight: 800; }.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }.status-badge.submitted { color: #bd7b39; background: var(--orange-soft); }.status-badge.approved { color: #3e9872; background: #e9f6ef; }.status-badge.rejected { color: #bd665e; background: var(--red-soft); }.status-badge.draft, .status-badge.not_started { color: #889d9f; background: #f0f4f3; }.row-action { border: 0; background: transparent; color: var(--teal); font-size: 11px; font-weight: 800; }.add-employee-wrap { padding: 14px 20px; background: #f8fcfb; border-bottom: 1px solid var(--line); }.inline-form { display: grid; grid-template-columns: 1.1fr .8fr .8fr 1fr auto; gap: 8px; }.inline-form input { padding: 10px; font-size: 11px; }.inline-form .primary-btn { min-height: 39px; font-size: 11px; }
.toast-root { position: fixed; top: 18px; right: 18px; z-index: 50; display: grid; gap: 9px; }.toast { min-width: 250px; max-width: 360px; padding: 13px 15px; background: #183a3c; border-radius: 11px; color: #fff; box-shadow: var(--shadow); font-size: 12px; animation: slide-in .2s ease-out; }.toast.error { background: #9e4f49; }.toast.success { background: var(--teal); } @keyframes slide-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; background: rgba(15, 42, 43, .34); backdrop-filter: blur(4px); }.modal-card { position: relative; width: min(100%, 420px); padding: 28px; border-radius: 18px; background: #fff; box-shadow: 0 25px 70px rgba(15, 42, 43, .22); }.modal-card h3 { margin: 0 0 7px; font-size: 24px; letter-spacing: -.05em; }.modal-card > .muted { margin: 0 0 23px; font-size: 12px; line-height: 1.6; }.modal-close { position: absolute; top: 13px; right: 15px; border: 0; background: transparent; color: #93a7a8; font-size: 25px; line-height: 1; }

.manager-calendar-card { margin-bottom: 17px; }
.manager-week-tabs { margin: 0; padding: 14px 20px 0; }
.manager-calendar { padding: 0 20px 20px; }
.manager-week-block + .manager-week-block { margin-top: 20px; }
.manager-week-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0 10px; }
.manager-week-title strong { color: var(--teal-dark); font-size: 13px; }
.manager-week-title span { color: #9aa9aa; font-size: 10px; }
.employee-history-badge { display: inline-block; color: #61758a; font-size: 8px; font-weight: 800; }
.manager-calendar-empty { grid-column: 1 / -1; padding: 24px; color: #8fa1a2; font-size: 11px; text-align: center; }
.employee-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 17px 0 13px; }
.employee-toolbar .filter-pills { margin: 0; }
.employee-form-card { margin-bottom: 17px; }
.employee-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 20px; }
.employee-form label { display: grid; gap: 7px; color: #496165; font-size: 11px; font-weight: 750; }
.employee-form input { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfc; color: var(--ink); outline: 0; padding: 11px 12px; font-size: 12px; }
.employee-form input:focus { border-color: rgba(13,117,106,.65); box-shadow: 0 0 0 4px rgba(13,117,106,.09); }
.employee-form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 9px; padding-top: 3px; }
.employee-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.danger-text-btn, .restore-btn { border: 0; background: transparent; padding: 5px 0; font-size: 11px; font-weight: 800; }
.danger-text-btn { color: #bd665e; }
.restore-btn { color: var(--teal); }
.employee-status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 7px; font-size: 10px; font-weight: 800; }
.employee-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.employee-status.active { color: #3e9872; background: #e9f6ef; }
.employee-status.inactive { color: #889d9f; background: #f0f4f3; }
@media (max-width: 1120px) { .app-shell { grid-template-columns: 205px minmax(0, 1fr); }.topbar { padding: 0 28px; }.content-wrap { padding: 35px 28px 60px; }.payroll-frame { width: calc(100% + 56px); margin: -35px -28px -60px; }.attendance-calendar { grid-template-columns: repeat(5, minmax(120px, 1fr)); }.inline-form { grid-template-columns: 1fr 1fr; }.inline-form .primary-btn { width: max-content; } }
@media (max-width: 800px) { .login-shell { grid-template-columns: 1fr; }.login-art { display: none; }.login-card-wrap { padding: 30px 24px; }.mobile-brand { display: flex; }.app-shell { display: block; }.sidebar { position: fixed; z-index: 30; left: -260px; top: 0; width: 244px; transition: left .2s; box-shadow: 12px 0 30px rgba(20,60,60,.1); }.sidebar.open { left: 0; }.mobile-menu-wrap { display: block; }.topbar { padding: 0 18px; gap: 12px; }.topbar-title { flex: 1; }.topbar-account > div:not(.avatar) { display: none; }.account-more { display: none; }.content-wrap { padding: 28px 18px 50px; }.payroll-frame { width: calc(100% + 36px); height: calc(100vh - 62px); min-height: 760px; margin: -28px -18px -50px; }.page-intro, .manager-intro { display: grid; }.page-intro h1 { font-size: 30px; }.month-control { width: 100%; }.month-input { width: 100%; }.month-input input { flex: 1; }.stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 22px; }.section-heading { align-items: flex-start; display: grid; }.attendance-calendar { grid-template-columns: repeat(2, minmax(0, 1fr)); }.manager-actions { align-items: stretch; display: grid; }.manager-actions .secondary-btn { width: 100%; }.manager-toolbar { display: grid; }.search-field { width: 100%; }.table-head { align-items: flex-start; }.submit-bar { align-items: stretch; display: grid; }.submit-bar .primary-btn { width: 100%; } }
@media (max-width: 460px) { .stats-grid { gap: 7px; }.stat-card { padding: 10px; min-height: 76px; border-radius: 11px; }.stat-top { font-size: 10px; }.stat-icon { width: 23px; height: 23px; border-radius: 7px; font-size: 12px; }.stat-value { font-size: 20px; }.attendance-calendar { gap: 8px; }.day-card { padding: 9px; min-height: 135px; }.inline-form { grid-template-columns: 1fr; }.topbar-kicker { font-size: 8px; }.topbar-title h2 { font-size: 14px; } }

@media (max-width: 800px) {
  body { overflow-x: hidden; }
  .main-area { padding-bottom: env(safe-area-inset-bottom); }
  .login-card-wrap { min-height: 100vh; align-content: center; }
  .login-card h2 { font-size: 32px; }
  .sidebar { height: 100dvh; min-height: 0; overflow-y: auto; }
  .topbar { position: sticky; top: 0; z-index: 20; height: 70px; }
  .topbar-kicker { display: block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-title h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-account { flex-shrink: 0; }
  .account-more { display: block; width: 38px; height: 38px; margin: 0; border-radius: 10px; font-size: 22px; }
  .account-more:active, .icon-btn:active { background: var(--teal-soft); }
  .icon-btn { width: 42px; height: 42px; margin: 0; border-radius: 10px; font-size: 20px; }
  .content-wrap { padding-top: 22px; padding-bottom: calc(50px + env(safe-area-inset-bottom)); }
  .page-intro { gap: 21px; margin-bottom: 22px; }
  .page-intro > div > .muted { line-height: 1.55; }
  .stats-grid { gap: 8px; }
  .stat-card { min-width: 0; }
  .stat-top { min-height: 22px; }
  .stat-top > span:first-child { line-height: 1.25; }
  .stat-value { margin-top: 5px; }
  .week-tabs { margin-right: -18px; padding-right: 18px; scrollbar-width: none; }
  .week-tabs::-webkit-scrollbar { display: none; }
  .week-tab { min-height: 40px; padding: 8px 14px; }
  .attendance-calendar { align-items: stretch; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .day-card { min-width: 0; min-height: 145px; }
  .day-card .day-name { font-size: 8px; }
  .day-card .day-number { font-size: 17px; }
  .shift-select { min-height: 38px; padding: 7px 5px; font-size: 10px; }
  .hours-input { min-height: 28px; }
  .entry-note { min-height: 25px; }
  .submit-bar { position: sticky; bottom: 10px; z-index: 10; margin-top: 20px; padding: 0; box-shadow: none; }
  .submit-bar small { line-height: 1.45; }
  .manager-actions { gap: 12px; }
  .filter-pills { flex-wrap: nowrap; overflow-x: auto; margin-right: -18px; padding-right: 18px; scrollbar-width: none; }
  .filter-pills::-webkit-scrollbar { display: none; }
  .filter-pill { min-height: 38px; white-space: nowrap; }
  .table-head { padding: 16px; }
  .table-head .secondary-btn { min-height: 42px; white-space: nowrap; }
  .add-employee-wrap { padding: 14px 16px; }
  .inline-form .primary-btn { width: 100%; }
  .table-scroll { overflow: visible; }
  .table-scroll table { min-width: 0; display: block; }
  .table-scroll thead { display: none; }
  .table-scroll tbody, .table-scroll tr, .table-scroll td { display: block; width: 100%; }
  .table-scroll tr { padding: 13px 16px; border-top: 1px solid var(--line); }
  .table-scroll tr:first-child { border-top: 0; }
  .table-scroll td { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 0; padding: 5px 0; text-align: right; }
  .table-scroll td::before { content: attr(data-label); color: #9aa9aa; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-align: left; text-transform: uppercase; }
  .table-scroll td:first-child { display: block; padding-bottom: 8px; text-align: left; }
  .table-scroll td:first-child::before { display: none; }
  .table-scroll td:last-child { padding-top: 9px; }
  .table-scroll .employee-cell { justify-content: flex-start; }
}

html,
body,
.attendance-calendar,
.shared-calendar,
.manager-calendar,
#manager-view { overflow-anchor: none; }

@media (max-width: 380px) {
  .topbar { padding: 0 12px; gap: 7px; }
  .content-wrap { padding-left: 12px; padding-right: 12px; }
  .week-tabs, .filter-pills { margin-right: -12px; padding-right: 12px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .stat-card { padding: 8px 9px; min-height: 70px; }
  .stat-top { font-size: 9px; }
  .stat-icon { width: 22px; height: 22px; }
  .stat-value { font-size: 19px; }
  .attendance-calendar { gap: 7px; }
  .day-card { padding: 8px; }
  .day-card .day-name { letter-spacing: -.02em; }
  .shift-select { font-size: 9px; }
  .hours-row { font-size: 9px; }
  .hours-input { width: 42px; }
  .submit-bar { padding: 0; }
}

@media (max-width: 800px) {
  .employee-toolbar { display: grid; gap: 10px; }
  .employee-toolbar .filter-pills { flex-wrap: nowrap; overflow-x: auto; margin-right: -18px; padding-right: 18px; scrollbar-width: none; }
  .employee-toolbar .filter-pills::-webkit-scrollbar { display: none; }
  .employee-form { grid-template-columns: 1fr; padding: 16px; }
  .employee-form-actions { display: block; }
  .employee-form-actions .primary-btn { width: 100%; }
  .employee-actions { gap: 16px; }
}

:root {
  --ink: #19324d;
  --muted: #66788a;
  --line: #d8e3ee;
  --canvas: #eef3f8;
  --teal: #0f766e;
  --teal-dark: #0b4f4a;
  --teal-soft: #dff7f2;
  --orange: #d97706;
  --orange-soft: #fff7ed;
  --blue: #4f46e5;
  --blue-soft: #eef2ff;
  --red: #dc4c5c;
  --red-soft: #fff1f2;
  --shadow: 0 18px 45px rgba(15, 45, 70, .1);
}

html, body { background: linear-gradient(135deg, #f4f7fb 0%, var(--canvas) 52%, #e9f4f1 100%); }
.eyebrow, .topbar-kicker { color: #61758a; }
.brand-mark { background: linear-gradient(145deg, #0f766e, #155e75); box-shadow: 0 9px 20px rgba(15, 118, 110, .3); }
.login-art { background: linear-gradient(145deg, #dff7f2 0%, #e6f0ff 58%, #fff 100%); }
.login-art h1 em { color: #155e75; }
.login-art::after { border-color: rgba(21, 94, 117, .16); box-shadow: 0 0 0 40px rgba(21, 94, 117, .05), 0 0 0 80px rgba(21, 94, 117, .03); }
.stack-form label, .employee-form label { color: #36536d; }
.stack-form input, .inline-form input, .search-field input, .employee-form input { background: #fff; border-color: #cbd9e6; }
.stack-form input:focus, .inline-form input:focus, .search-field input:focus, .employee-form input:focus { border-color: #0f766e; box-shadow: 0 0 0 4px rgba(15, 118, 110, .12); }
.primary-btn { background: linear-gradient(135deg, #0f766e, #155e75); box-shadow: 0 10px 22px rgba(15, 118, 110, .25); }
.primary-btn:hover { background: linear-gradient(135deg, #0b5f59, #104e64); }
.secondary-btn { background: #e8eef6; color: #234c69; }
.secondary-btn:hover { background: #dce7f2; }
.sidebar { background: linear-gradient(180deg, #143b58 0%, #0f5960 100%); border-right: 0; box-shadow: 10px 0 30px rgba(16, 54, 78, .12); }
.sidebar-brand strong { color: #fff; }
.sidebar-brand small { color: #b9d4df; }
.nav-item { color: #c7d8e4; }
.nav-item:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.nav-item.active { background: #dff7f2; color: #075e57; box-shadow: 0 8px 18px rgba(5, 44, 61, .16); }
.nav-badge { background: #fbbf24; color: #713f12; }
.security-card { background: rgba(255, 255, 255, .11); border: 1px solid rgba(255, 255, 255, .14); color: #fff; }
.security-card small { color: #c6dce3; }
.logout-btn { border-color: rgba(255, 255, 255, .18); color: #c6dce3; }
.topbar { background: rgba(255, 255, 255, .94); box-shadow: 0 4px 20px rgba(24, 54, 78, .06); }
.topbar-account small { color: #66788a; }
.avatar { background: #dbeafe; color: #155e75; }
.month-input { border-color: #cbd9e6; box-shadow: 0 3px 10px rgba(32, 72, 100, .04); }
.month-control label { color: #61758a; }
.month-arrow { color: #607f98; }
.month-arrow:hover { color: #0f766e; }
.stat-card, .table-card { border-color: #d5e1ed; box-shadow: 0 12px 30px rgba(24, 60, 88, .07); }
.stat-card { border-top: 4px solid #0f766e; }
.stat-card:nth-child(2) { border-top-color: #d97706; }
.stat-card:nth-child(3) { border-top-color: #4f46e5; }
.stat-card:nth-child(4) { border-top-color: #dc4c5c; }
.stat-top { color: #60758a; }
.stat-icon.teal { background: #dff7f2; color: #0f766e; }
.stat-icon.orange { background: #fff1d6; color: #b45309; }
.stat-icon.blue { background: #eef2ff; color: #4f46e5; }
.stat-icon.red { background: #fff1f2; color: #dc4c5c; }
.week-tabs { background: #e5edf5; border: 1px solid #d5e1ed; border-radius: 13px; padding: 4px; }
.week-tab { color: #5c7288; }
.week-tab:hover { background: #fff; color: #155e75; }
.week-tab.active { background: linear-gradient(135deg, #0f766e, #155e75); box-shadow: 0 7px 16px rgba(15, 118, 110, .23); }
.day-card { border-color: #d5e1ed; box-shadow: 0 8px 18px rgba(24, 60, 88, .05); }
.day-card:hover { border-color: #80cfc4; box-shadow: 0 10px 22px rgba(15, 118, 110, .12); }
.day-card.weekend { background: #f7f9fc; }
.day-card.locked { background: #f2f6fa; }
.day-card:has(.status-strip.filled) { border-color: #8fd8cd; background: #f2fcf9; }
.day-name { color: #61758a; }
.shift-select { background: #f8fbff; border-color: #cbd9e6; color: #2d5873; }
.shift-select:focus { border-color: #0f766e; box-shadow: 0 0 0 3px rgba(15, 118, 110, .1); }
.shift-select:disabled { background: #e9eff5; color: #8496a7; }
.hours-row { color: #71869a; }
.hours-input { color: #075e57; border-color: #b7d7d2; }
.entry-note { color: #36536d; border-color: #b7cddd; }
.status-strip { color: #8294a5; }
.status-strip.filled { color: #0f766e; }
.submit-bar { background: transparent; border-color: transparent; box-shadow: none; }
.review-note { background: #fff7ed; border-color: #fed7aa; color: #9a5b13; }
.review-note strong { color: #8a4b08; }
.manager-calendar-card { border-top: 4px solid #4f46e5; }
.table-head { background: linear-gradient(90deg, #fbfdff, #f4f8fc); }
.table-head h3, .section-heading h3 { color: #19324d; }
.status-badge.submitted { color: #a04d0b; background: #fff1d6; }
.status-badge.approved { color: #16734c; background: #dcfce7; }
.status-badge.rejected { color: #be3045; background: #ffe4e6; }
.status-badge.draft, .status-badge.not_started { color: #52667a; background: #e9eff5; }
.row-action { color: #0f766e; }
.row-action:hover { color: #4f46e5; }
#manager-filters .filter-pill[data-status="submitted"] { color: #a04d0b; }
#manager-filters .filter-pill[data-status="approved"] { color: #16734c; }
#manager-filters .filter-pill[data-status="rejected"] { color: #be3045; }
#manager-filters .filter-pill[data-status="draft"] { color: #52667a; }
#manager-filters .filter-pill.active[data-status="submitted"] { background: #fff1d6; border-color: #fed7aa; }
#manager-filters .filter-pill.active[data-status="approved"] { background: #dcfce7; border-color: #bbf7d0; }
#manager-filters .filter-pill.active[data-status="rejected"] { background: #ffe4e6; border-color: #fecdd3; }
#employee-filters .filter-pill.active[data-employee-filter="inactive"] { background: #ffe4e6; border-color: #fecdd3; color: #be3045; }
.employee-status.active { color: #16734c; background: #dcfce7; }
.employee-status.inactive { color: #52667a; background: #e9eff5; }
.danger-text-btn { color: #be3045; }
.restore-btn { color: #0f766e; }
.manager-week-title strong { color: #304f6c; }
.manager-week-title span { color: #61758a; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(79, 70, 229, .28); outline-offset: 2px; }
.submit-bar { display: flex; align-items: center; justify-content: flex-end; gap: 0; flex-wrap: wrap; }
.save-status { min-height: 22px; color: #61758a; font-size: .88rem; font-weight: 700; }
.save-status.saving { color: #2563eb; }
.save-status.saved { color: #16734c; }
.save-status.error { color: #be3045; }
.submit-hint { flex: 1; color: #61758a; font-size: .88rem; font-weight: 700; line-height: 1.45; }
.audit-card { border-top: 4px solid #f59e0b; }
.audit-action { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 10px; background: #eef2ff; color: #4338ca; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.table-subtext { display: block; margin-top: 3px; color: #8294a5; font-size: .78rem; }
.day-card[data-shift="7h-12h"] { border-top-color: #38a6df; }
.day-card[data-shift="12h-17h"] { border-top-color: #e49a2f; }
.day-card[data-shift="17h-23h"] { border-top-color: #8064d8; }
.day-card[data-shift="7h-15h"] { border-top-color: #2eaa87; }
.day-card[data-shift="15h-23h"] { border-top-color: #d66599; }
.entry-preview { display: grid; gap: 3px; margin-top: 8px; padding: 8px; border-radius: 9px; background: #f2f7f6; color: var(--teal-dark); }
.entry-preview.empty { color: #9aabbb; background: #f7faf9; }
.entry-preview.submitted { color: #9a5c0a; background: #fff7e8; }
.entry-preview.approved { color: #16734c; background: #e8f8ee; }
.entry-preview.rejected { color: #be3045; background: #fff0f1; }
.entry-preview.schedule-changed { border: 1px solid #c7d2fe; background: #eef2ff; color: #3730a3; }
.entry-preview.schedule-changed .entry-submitted-shift { color: #52667a; font-size: 10px; font-weight: 750; }
.entry-shift { font-size: 13px; font-weight: 850; }
.entry-hours { font-size: 10px; font-weight: 750; opacity: .85; }
.status-strip.empty { color: #9aabbb; }
.status-strip.submitted { color: #a04d0b; }
.status-strip.submitted .mini-dot { background: #d97706; }
.status-strip.approved { color: #16734c; }
.status-strip.approved .mini-dot { background: #16a34a; }
.status-strip.rejected { color: #be3045; }
.status-strip.rejected .mini-dot { background: #dc4c5c; }
.manager-cell-editor { display: grid; align-content: center; gap: 5px; min-height: 58px; padding: 5px; border-left: 1px solid var(--line); background: #eefaf7; box-shadow: inset 0 0 0 2px rgba(15, 118, 110, .16); }
.manager-inline-shift, .manager-inline-custom { width: 100%; min-width: 0; border: 1px solid #b7d7d2; border-radius: 7px; background: #fff; color: #2d5873; font-size: 9px; font-weight: 750; padding: 6px 4px; outline: 0; }
.manager-inline-custom::placeholder { color: #8aa0a9; }
.manager-inline-shift:focus, .manager-inline-custom:focus { border-color: #0f766e; box-shadow: 0 0 0 3px rgba(15, 118, 110, .1); }
.manager-cell-editor-actions { display: grid; grid-template-columns: minmax(0, 1fr) 25px; gap: 4px; }
.manager-cell-save, .manager-cell-cancel { min-height: 25px; border: 0; border-radius: 6px; font-size: 8px; font-weight: 850; }
.manager-cell-save { background: #0f766e; color: #fff; }
.manager-cell-save:hover { background: #0b5f59; }
.manager-cell-save:disabled { opacity: .6; cursor: wait; }
.manager-cell-cancel { background: #dfe9ef; color: #52667a; }
.manager-cell-cancel:hover { background: #cbd9e6; }
@media (max-width: 640px) {
  .submit-bar { align-items: stretch; }
  .submit-bar .save-status { width: 100%; }
  .submit-bar .primary-btn { width: 100%; }
  .audit-action { white-space: normal; }
}
.week-tab { align-items: start; display: grid; gap: 2px; justify-items: start; min-width: 86px; }
.week-tab-main { font-size: 11px; line-height: 1.1; }
.week-tab-range { color: #7890a1; font-size: 9px; font-weight: 750; line-height: 1.1; }
.week-tab.active .week-tab-range { color: rgba(255, 255, 255, .82); }
.day-head { align-items: flex-start; }
.day-heading { min-width: 0; }
.day-meta { align-items: center; display: flex; flex-wrap: wrap; gap: 5px; }
.day-week-label { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 6px; background: #eef2ff; color: #4f46e5; font-size: 8px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.day-name { color: #0f766e; font-size: 10px; font-weight: 900; letter-spacing: .01em; text-transform: none; }
.day-number { align-items: baseline; display: flex; gap: 5px; margin-top: 8px; }
.day-number span { color: #7890a1; font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.day-number strong { color: #19324d; font-size: 19px; font-weight: 900; letter-spacing: -.04em; }
.manager-week-heading { align-items: baseline; display: flex; gap: 8px; }
.manager-week-heading small { color: #7890a1; font-size: 9px; font-weight: 750; }
.week-tab { min-width: 104px; padding: 10px 14px; }
.week-tab-main { font-size: 12px; }
.week-tab-range { font-size: 10px; }
.day-card { min-height: 174px; padding: 14px; }
.day-week-label { padding: 5px 8px; font-size: 9px; }
.day-name { font-size: 13px; font-weight: 900; text-transform: uppercase; }
.day-number { margin-top: 10px; }
.day-number strong { font-size: 24px; }
.shift-select { font-size: 12px; padding: 10px 6px; }
.entry-preview { padding: 10px; }
.entry-shift { font-size: 15px; }
.entry-hours { font-size: 11px; }
.manager-week-heading strong { font-size: 15px; }
  @media (max-width: 800px) {
  .week-tab { min-width: 98px; }
  .day-card { min-height: 176px; padding: 12px; }
  .day-name { font-size: 11px; }
  .day-number strong { font-size: 21px; }
}
@media (max-width: 460px) {
  .day-card { min-height: 170px; }
  .day-name { font-size: 10px; }
  .day-number strong { font-size: 20px; }
}
.entry-note { display: block; width: 100%; min-height: 38px; border: 1px dashed #b7cddd; border-radius: 7px; background: #fbfdff; outline: 0; resize: vertical; color: #36536d; font-family: inherit; font-size: 9px; line-height: 1.35; padding: 6px 7px; }
.entry-note::placeholder { color: #9aadb8; }
.entry-note:focus { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(13,117,106,.08); }
.entry-note:disabled { color: #9badad; background: #f1f5f4; }
.manager-note { margin-top: 7px; border-radius: 7px; background: #eefaf7; color: #256b64; font-size: 9px; line-height: 1.35; padding: 6px 7px; }
.manager-note span { color: #0f766e; font-weight: 850; }
.manager-inline-note { width: 100%; min-height: 34px; border: 1px solid #b7d8d2; border-radius: 6px; background: #fff; color: #36536d; font-family: inherit; font-size: 8px; line-height: 1.25; padding: 5px; resize: vertical; outline: 0; }
.manager-inline-note::placeholder { color: #91aaa7; }
.manager-inline-note:focus { border-color: var(--teal); }
@media (max-width: 800px) {
  .manager-cell-editor { min-height: 126px; }
  .manager-note { font-size: 10px; }
}
.day-name { text-transform: uppercase; }
.today-label { padding: 6px 8px; font-size: 10px; }
.day-card.today { border-width: 3px; box-shadow: 0 0 0 6px rgba(249, 115, 22, .18), 0 12px 26px rgba(180, 83, 9, .16); }
.day-card.today .day-number strong { font-size: 26px; }
@media (max-width: 800px) {
  .day-card .day-name { font-size: 12px; padding: 6px 9px; }
  .day-card.today { transform: translateY(-2px); }
  .day-card.today .day-week-label { padding: 6px 9px; font-size: 9px; }
  .day-card.today .day-number strong { font-size: 24px; }
  .day-card.today .today-label { font-size: 10px; }
}
.shared-calendar { padding: 0 22px 22px; }
.shared-calendar-desktop { display: block; }
.shared-calendar-mobile { display: none; }
.shared-week-block + .shared-week-block { margin-top: 18px; }
.shared-week-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 10px; color: #61758a; }
.shared-week-title > div { display: flex; align-items: baseline; gap: 8px; }
.shared-week-title strong { color: #304f6c; font-size: 15px; }
.shared-week-title small, .shared-week-title > span { font-size: 10px; font-weight: 750; }
.shared-calendar-scroll { overflow-x: auto; border: 1px solid #d8e3ee; border-radius: 14px; background: #fff; }
.shared-calendar-grid { min-width: 770px; }
.shared-calendar-header, .shared-calendar-row { display: grid; grid-template-columns: 128px minmax(0, 1fr); }
.shared-calendar-header { background: #eef2ff; }
.shared-calendar-days { display: grid; grid-template-columns: repeat(7, minmax(84px, 1fr)); }
.shared-calendar-grid-days-1 .shared-calendar-days { grid-template-columns: repeat(1, minmax(84px, 1fr)); }
.shared-calendar-grid-days-2 .shared-calendar-days { grid-template-columns: repeat(2, minmax(84px, 1fr)); }
.shared-calendar-grid-days-3 .shared-calendar-days { grid-template-columns: repeat(3, minmax(84px, 1fr)); }
.shared-calendar-grid-days-4 .shared-calendar-days { grid-template-columns: repeat(4, minmax(84px, 1fr)); }
.shared-calendar-grid-days-5 .shared-calendar-days { grid-template-columns: repeat(5, minmax(84px, 1fr)); }
.shared-calendar-grid-days-6 .shared-calendar-days { grid-template-columns: repeat(6, minmax(84px, 1fr)); }
.shared-calendar-grid-days-7 .shared-calendar-days { grid-template-columns: repeat(7, minmax(84px, 1fr)); }
.shared-shift-head { position: sticky; left: 0; z-index: 3; display: flex; align-items: center; padding: 10px 12px; border-right: 1px solid #d8e3ee; color: #52667a; font-size: 10px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; background: #eef2ff; }
.shared-calendar-day-head { display: grid; align-content: center; justify-items: center; gap: 3px; min-height: 72px; padding: 8px 4px; border-left: 1px solid #d8e3ee; text-align: center; }
.shared-calendar-day-head span { color: #4f46e5; font-size: 8px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.shared-calendar-day-head strong { color: #0f766e; font-size: 11px; font-weight: 900; line-height: 1.15; text-transform: uppercase; }
.shared-calendar-day-head small { color: #19324d; font-size: 10px; font-weight: 850; }
.shared-calendar-day-head.weekend { background: #f8fafc; }
.shared-calendar-day-head.today { background: #e0f2fe; }
.shared-calendar-row { border-top: 1px solid #d8e3ee; }
.shared-shift-label { position: sticky; left: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 10px 12px; border-right: 1px solid #d8e3ee; background: #fff; }
.shared-shift-label strong { color: #19324d; font-size: 11px; font-weight: 900; }
.shared-shift-label small { color: #8294a5; font-size: 8px; font-weight: 750; }
.shared-calendar-cell { display: flex; min-height: 82px; flex-direction: column; justify-content: flex-start; gap: 4px; padding: 8px 6px; border-left: 1px solid #e4ebf1; background: #fff; }
.shared-calendar-cell.weekend { background: #fbfcfd; }
.shared-calendar-cell.today { background: #f5fbff; }
.shared-calendar-cell.empty { align-items: center; justify-content: center; }
.shared-person { display: block; overflow: hidden; border-radius: 7px; padding: 5px 4px; background: #e0f2fe; color: #155e75; font-size: 9px; font-weight: 800; line-height: 1.2; text-align: center; text-overflow: ellipsis; white-space: normal; overflow-wrap: anywhere; }
.shared-person.self { background: #0f766e; color: #fff; box-shadow: 0 3px 8px rgba(15, 118, 110, .2); }
.shared-person small { font-size: 8px; font-weight: 900; }
.shared-empty { color: #b0bdc9; font-size: 15px; font-weight: 800; }
@media (max-width: 800px) {
  .shared-calendar { padding: 0 16px 16px; }
  .shared-calendar-desktop { display: none; }
  .shared-calendar-mobile { display: grid; gap: 10px; }
  .shared-mobile-day { overflow: hidden; border: 1px solid #d7e2ec; border-radius: 15px; background: #fff; box-shadow: 0 4px 12px rgba(25, 50, 77, .06); }
  .shared-mobile-day.weekend { background: #fbfcfd; }
  .shared-mobile-day.today { border: 2px solid #0ea5e9; box-shadow: 0 6px 16px rgba(14, 165, 233, .16); }
  .shared-mobile-day-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; border-bottom: 1px solid #dce8f0; background: #f2f7ff; }
  .shared-mobile-day.weekend .shared-mobile-day-head { background: #f6f8fb; }
  .shared-mobile-day.today .shared-mobile-day-head { background: #e0f2fe; }
  .shared-mobile-day-head > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 8px; min-width: 0; }
  .shared-mobile-day-head span { flex-basis: 100%; color: #4f46e5; font-size: 9px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
  .shared-mobile-day-head strong { color: #0f766e; font-size: 15px; font-weight: 950; line-height: 1.1; text-transform: uppercase; }
  .shared-mobile-day-head small { color: #19324d; font-size: 12px; font-weight: 850; }
  .shared-mobile-day-head b { flex: 0 0 auto; border-radius: 999px; padding: 5px 8px; background: #dbeafe; color: #1d4ed8; font-size: 10px; font-weight: 900; white-space: nowrap; }
  .shared-mobile-day.today .shared-mobile-day-head b { background: #0284c7; color: #fff; }
  .shared-mobile-shifts { display: grid; gap: 7px; padding: 10px; }
  .shared-mobile-shift { border: 1px solid #e1eaf1; border-radius: 11px; background: #fbfdff; padding: 8px; }
  .shared-mobile-shift-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
  .shared-mobile-shift-head strong { color: #19324d; font-size: 12px; font-weight: 950; }
  .shared-mobile-shift-head span { color: #8294a5; font-size: 10px; font-weight: 800; }
  .shared-mobile-people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .shared-mobile-people .shared-person { min-width: 0; font-size: 11px; padding: 7px 5px; }
  .shared-mobile-empty { padding: 5px 2px 6px; color: #8294a5; font-size: 11px; font-weight: 750; text-align: center; }
}
@media (max-width: 380px) {
  .shared-mobile-day-head { padding-left: 11px; padding-right: 11px; }
  .shared-mobile-shifts { padding: 8px; }
  .shared-mobile-people { grid-template-columns: 1fr; }
}
.day-tone-sunday { color: #c2415b !important; }
.day-tone-monday { color: #2563eb !important; }
.day-tone-tuesday { color: #0f766e !important; }
.day-tone-wednesday { color: #7c3aed !important; }
.day-tone-thursday { color: #c2410c !important; }
.day-tone-friday { color: #4f46e5 !important; }
.day-tone-saturday { color: #be185d !important; }

.manager-calendar { padding: 0 22px 24px; }
.manager-calendar-day-grid { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 16px; align-items: start; }
.manager-mobile-day { min-width: 0; overflow: hidden; border: 1px solid #cbd9e6; border-radius: 16px; background: #fff; box-shadow: 0 8px 20px rgba(24, 60, 88, .07); }
.manager-mobile-day.weekend { background: #fbfcfe; }
.manager-mobile-day.today { border: 2px solid #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, .14), 0 10px 24px rgba(180, 83, 9, .12); }
.manager-mobile-day-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-height: 82px; padding: 13px 14px 12px; border-bottom: 1px solid #d8e3ee; background: linear-gradient(135deg, #eef6ff, #f8fbff); }
.manager-mobile-day.weekend .manager-mobile-day-head { background: #f4f7fb; }
.manager-mobile-day.today .manager-mobile-day-head { background: linear-gradient(135deg, #fff3d8, #fffaf0); }
.manager-mobile-day-head > div:first-child { display: grid; gap: 4px; min-width: 0; }
.manager-mobile-day-head span { color: #4f46e5; font-size: 9px; font-weight: 900; letter-spacing: .05em; line-height: 1; text-transform: uppercase; }
.manager-mobile-day-head strong { color: #19324d; font-size: 16px; font-weight: 950; line-height: 1.1; text-transform: uppercase; }
.manager-mobile-day-head small { color: #52667a; font-size: 12px; font-weight: 850; line-height: 1; }
.manager-mobile-day-counts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 145px; }
.manager-mobile-day-counts b { border-radius: 999px; padding: 5px 7px; font-size: 9px; font-weight: 900; line-height: 1; white-space: nowrap; }
.manager-mobile-day-counts .pending { background: #fff1d6; color: #a04d0b; }
.manager-mobile-day-counts .scheduled { background: #dcfce7; color: #16734c; }
.manager-mobile-day-counts .empty { background: #e9eff5; color: #61758a; }
.manager-mobile-employee-list { display: grid; }
.manager-mobile-employee-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-items: start; min-width: 0; padding: 10px 12px; border-top: 1px solid #e6edf3; }
.manager-mobile-employee-row:first-child { border-top: 0; }
.manager-mobile-employee-row.submitted { background: #fffaf0; box-shadow: inset 4px 0 #f59e0b; }
.manager-mobile-employee-row.approved { background: #f5fcf8; }
.manager-mobile-employee-row.rejected { background: #fff5f6; box-shadow: inset 4px 0 #e25568; }
.manager-mobile-employee-row.empty { background: #fbfdff; }
.manager-mobile-employee-row.history-only { background: #f6f8fb; }
.manager-mobile-employee-info { display: flex; align-items: center; gap: 8px; min-width: 0; }
.manager-mobile-employee-info .avatar { width: 30px; height: 30px; flex: 0 0 auto; font-size: 9px; }
.manager-mobile-employee-info > div:last-child { min-width: 0; }
.manager-mobile-employee-info strong { display: block; color: #19324d; font-size: 12px; font-weight: 900; line-height: 1.2; overflow-wrap: anywhere; white-space: normal; }
.manager-mobile-employee-info small { display: block; margin-top: 4px; color: #61758a; font-size: 9px; font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; white-space: normal; }
.manager-mobile-schedule { display: grid; justify-items: start; gap: 6px; min-width: 0; }
.manager-mobile-shift { display: grid; gap: 3px; width: 100%; max-width: 100%; min-width: 0; min-height: 0; border: 1px solid #b8d8d3; border-radius: 10px; background: #eefaf7; color: #075e57; padding: 6px 9px; text-align: left; }
.manager-mobile-shift:hover { border-color: #0f766e; background: #e1f5f0; }
.manager-mobile-shift strong { display: block; font-size: 12px; font-weight: 950; line-height: 1.15; overflow-wrap: anywhere; white-space: normal; }
.manager-mobile-shift small { display: block; color: currentColor; font-size: 10px; font-weight: 800; opacity: .8; }
.manager-mobile-shift.empty { border-style: dashed; border-color: #b9c9d8; background: #f7fafc; color: #52667a; }
.manager-mobile-shift.empty:hover { border-color: #4f46e5; background: #eef2ff; color: #3730a3; }
.manager-mobile-shift.readonly { cursor: default; border-color: #d8e3ee; background: #f4f7fb; color: #52667a; }
.manager-mobile-shift.readonly:hover { border-color: #d8e3ee; background: #f4f7fb; color: #52667a; }
.manager-mobile-shift.submitted { border-color: #f1bd69; background: #fff4dc; color: #9a5b13; }
.manager-mobile-shift.approved { border-color: #9bd8b6; background: #e8f8ee; color: #16734c; }
.manager-mobile-shift.rejected { border-color: #f2a3ae; background: #fff0f1; color: #be3045; }
.manager-mobile-note { display: block; color: inherit; font-size: 9px; font-weight: 750; line-height: 1.25; overflow-wrap: anywhere; white-space: normal; }
.manager-mobile-note.employee { color: #52667a; }
.manager-mobile-note.manager { color: #0f766e; }
.manager-mobile-approve { width: fit-content; max-width: 100%; min-height: 30px; border: 1px solid #f3c879; border-radius: 9px; background: #fff7e8; color: #a04d0b; padding: 5px 8px; font-size: 10px; font-weight: 900; }
.manager-mobile-approve:hover { background: #ffedc7; }
.manager-mobile-approve:disabled { opacity: .55; cursor: wait; }
.manager-mobile-employee-row.editing { grid-template-columns: minmax(0, 1fr); align-items: stretch; background: #f1fbf8; }
.manager-mobile-employee-row.editing .manager-mobile-employee-info { padding-bottom: 1px; }
.manager-mobile-employee-row .manager-cell-editor { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(105px, .85fr); gap: 8px; min-height: 0; margin-top: 2px; border: 1px solid #a9d7cf; border-radius: 12px; background: #fff; box-shadow: none; padding: 10px; }
.manager-mobile-employee-row .manager-inline-shift, .manager-mobile-employee-row .manager-inline-custom { min-height: 39px; border-color: #b7d7d2; font-size: 11px; padding: 8px 7px; }
.manager-mobile-employee-row .manager-inline-note { grid-column: 1 / -1; min-height: 52px; border: 1px solid #b7d8d2; border-radius: 8px; background: #fbfffe; font-size: 10px; padding: 7px; }
.manager-mobile-employee-row .manager-cell-editor-actions { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) 40px; gap: 7px; }
.manager-mobile-employee-row .manager-cell-save, .manager-mobile-employee-row .manager-cell-cancel { min-height: 38px; font-size: 11px; }

@media (min-width: 1500px) {
  .manager-calendar-day-grid { grid-template-columns: repeat(5, minmax(220px, 1fr)); }
}
@media (max-width: 1240px) {
  .manager-calendar-day-grid { grid-template-columns: repeat(3, minmax(240px, 1fr)); }
}
@media (max-width: 980px) {
  .manager-calendar-day-grid { grid-template-columns: repeat(2, minmax(250px, 1fr)); }
  .manager-mobile-day-head { min-height: 78px; }
}
@media (max-width: 800px) {
  .manager-calendar { padding: 0 16px 18px; }
  .manager-calendar-day-grid { grid-template-columns: 1fr; gap: 12px; }
  .manager-mobile-day-head { min-height: 76px; padding: 12px 13px; }
  .manager-mobile-day-head strong { font-size: 17px; }
  .manager-mobile-day-counts { max-width: 155px; }
  .manager-mobile-day-counts b { font-size: 10px; padding: 6px 8px; }
  .manager-mobile-employee-row { grid-template-columns: minmax(0, 1fr) minmax(128px, 39%); gap: 10px; padding: 11px 13px; }
  .manager-mobile-employee-info strong { font-size: 13px; }
  .manager-mobile-employee-info small { font-size: 10px; }
  .manager-mobile-shift { min-height: 66px; padding: 9px 10px; }
  .manager-mobile-shift strong { font-size: 13px; }
  .manager-mobile-shift small { font-size: 11px; }
  .manager-mobile-note { font-size: 10px; }
  .manager-mobile-approve { min-height: 38px; font-size: 11px; }
}
@media (max-width: 420px) {
  .manager-mobile-day-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .manager-mobile-day-counts { justify-content: flex-start; max-width: none; }
  .manager-mobile-employee-row { grid-template-columns: minmax(0, 1fr) 118px; padding-left: 10px; padding-right: 10px; }
  .manager-mobile-employee-info .avatar { width: 28px; height: 28px; }
  .manager-mobile-shift { min-height: 62px; }
  .manager-mobile-employee-row .manager-cell-editor { grid-template-columns: 1fr; }
  .manager-mobile-employee-row .manager-inline-note, .manager-mobile-employee-row .manager-cell-editor-actions { grid-column: auto; }
}

.day-week-label, .shared-calendar-day-head span, .shared-mobile-day-head span, .manager-mobile-day-head span { border: 1px solid #d5dde7; background: #eef2f7; color: #475569 !important; }
.day-name, .shared-calendar-day-head strong, .shared-mobile-day-head strong, .manager-mobile-day-head strong { font-weight: 950; letter-spacing: .02em; }
.day-tone-sunday { color: #b42318 !important; }
.day-tone-monday { color: #0f766e !important; }
.day-tone-tuesday { color: #1d4ed8 !important; }
.day-tone-wednesday { color: #7e22ce !important; }
.day-tone-thursday { color: #c2410c !important; }
.day-tone-friday { color: #be185d !important; }
.day-tone-saturday { color: #0369a1 !important; }

.shared-calendar-row[data-shift="7h-12h"] .shared-shift-label strong { color: #7e22ce; }
.shared-calendar-row[data-shift="12h-17h"] .shared-shift-label strong { color: #a04d0b; }
.shared-calendar-row[data-shift="17h-23h"] .shared-shift-label strong { color: #be3045; }
.shared-calendar-row[data-shift="7h-15h"] .shared-shift-label strong { color: #075e57; }
.shared-calendar-row[data-shift="15h-23h"] .shared-shift-label strong { color: #c2410c; }
.shared-calendar-cell[data-shift="7h-12h"] .shared-person, .shared-mobile-shift[data-shift="7h-12h"] .shared-person { background: #f3e8ff; color: #7e22ce; }
.shared-calendar-cell[data-shift="12h-17h"] .shared-person, .shared-mobile-shift[data-shift="12h-17h"] .shared-person { background: #fff3cd; color: #a04d0b; }
.shared-calendar-cell[data-shift="17h-23h"] .shared-person, .shared-mobile-shift[data-shift="17h-23h"] .shared-person { background: #ffe4e6; color: #be3045; }
.shared-calendar-cell[data-shift="7h-15h"] .shared-person, .shared-mobile-shift[data-shift="7h-15h"] .shared-person { background: #dff7f2; color: #075e57; }
.shared-calendar-cell[data-shift="15h-23h"] .shared-person, .shared-mobile-shift[data-shift="15h-23h"] .shared-person { background: #ffedd5; color: #c2410c; }
.shared-calendar-cell[data-shift="7h-12h"] .shared-person.self, .shared-mobile-shift[data-shift="7h-12h"] .shared-person.self { box-shadow: inset 0 0 0 2px #c084fc, 0 3px 8px rgba(126, 34, 206, .16); }
.shared-calendar-cell[data-shift="12h-17h"] .shared-person.self, .shared-mobile-shift[data-shift="12h-17h"] .shared-person.self { box-shadow: inset 0 0 0 2px #f59e0b, 0 3px 8px rgba(160, 77, 11, .16); }
.shared-calendar-cell[data-shift="17h-23h"] .shared-person.self, .shared-mobile-shift[data-shift="17h-23h"] .shared-person.self { box-shadow: inset 0 0 0 2px #fb7185, 0 3px 8px rgba(190, 48, 69, .16); }
.shared-calendar-cell[data-shift="7h-15h"] .shared-person.self, .shared-mobile-shift[data-shift="7h-15h"] .shared-person.self { box-shadow: inset 0 0 0 2px #34d399, 0 3px 8px rgba(7, 94, 87, .16); }
.shared-calendar-cell[data-shift="15h-23h"] .shared-person.self, .shared-mobile-shift[data-shift="15h-23h"] .shared-person.self { box-shadow: inset 0 0 0 2px #fb923c, 0 3px 8px rgba(194, 65, 12, .16); }
.shared-mobile-shift[data-shift="7h-12h"] { border-color: #d8b4fe; background: #faf5ff; }
.shared-mobile-shift[data-shift="12h-17h"] { border-color: #f4c86a; background: #fffbeb; }
.shared-mobile-shift[data-shift="17h-23h"] { border-color: #fda4af; background: #fff7f8; }
.shared-mobile-shift[data-shift="7h-15h"] { border-color: #9bd8cd; background: #f2fcf9; }
.shared-mobile-shift[data-shift="15h-23h"] { border-color: #fdba74; background: #fffaf5; }
.day-card[data-shift="7h-12h"] { border-top-color: #c084fc; }
.day-card[data-shift="12h-17h"] { border-top-color: #f59e0b; }
.day-card[data-shift="17h-23h"] { border-top-color: #fb7185; }
.day-card[data-shift="7h-15h"] { border-top-color: #34d399; }
.day-card[data-shift="15h-23h"] { border-top-color: #fb923c; }
.day-card[data-shift="7h-12h"] .entry-preview { background: #f3e8ff; color: #7e22ce; }
.day-card[data-shift="12h-17h"] .entry-preview { background: #fff3cd; color: #a04d0b; }
.day-card[data-shift="17h-23h"] .entry-preview { background: #ffe4e6; color: #be3045; }
.day-card[data-shift="7h-15h"] .entry-preview { background: #dff7f2; color: #075e57; }
.day-card[data-shift="15h-23h"] .entry-preview { background: #ffedd5; color: #c2410c; }
.day-card[data-shift="7h-12h"] .entry-shift, .day-card[data-shift="7h-12h"] .entry-hours { color: #7e22ce; }
.day-card[data-shift="12h-17h"] .entry-shift, .day-card[data-shift="12h-17h"] .entry-hours { color: #a04d0b; }
.day-card[data-shift="17h-23h"] .entry-shift, .day-card[data-shift="17h-23h"] .entry-hours { color: #be3045; }
.day-card[data-shift="7h-15h"] .entry-shift, .day-card[data-shift="7h-15h"] .entry-hours { color: #075e57; }
.day-card[data-shift="15h-23h"] .entry-shift, .day-card[data-shift="15h-23h"] .entry-hours { color: #c2410c; }
.shared-calendar-row[data-shift="9h-15h"] .shared-shift-label strong { color: #4d7c0f; }
.shared-calendar-row[data-shift="10h-15h"] .shared-shift-label strong { color: #0f766e; }
.shared-calendar-row[data-shift="12h-23h"] .shared-shift-label strong { color: #b45309; }
.shared-calendar-row[data-shift="18h-23h"] .shared-shift-label strong { color: #9d174d; }
.shared-calendar-cell[data-shift="9h-15h"] .shared-person, .shared-mobile-shift[data-shift="9h-15h"] .shared-person { background: #ecfccb; color: #4d7c0f; }
.shared-calendar-cell[data-shift="10h-15h"] .shared-person, .shared-mobile-shift[data-shift="10h-15h"] .shared-person { background: #ccfbf1; color: #0f766e; }
.shared-calendar-cell[data-shift="12h-23h"] .shared-person, .shared-mobile-shift[data-shift="12h-23h"] .shared-person { background: #fef3c7; color: #b45309; }
.shared-calendar-cell[data-shift="18h-23h"] .shared-person, .shared-mobile-shift[data-shift="18h-23h"] .shared-person { background: #fce7f3; color: #9d174d; }
.shared-mobile-shift[data-shift="9h-15h"] { border-color: #bef264; background: #f7fee7; }
.shared-mobile-shift[data-shift="10h-15h"] { border-color: #5eead4; background: #f0fdfa; }
.shared-mobile-shift[data-shift="12h-23h"] { border-color: #fcd34d; background: #fffbeb; }
.shared-mobile-shift[data-shift="18h-23h"] { border-color: #f9a8d4; background: #fdf2f8; }
.day-card[data-shift="9h-15h"] { border-top-color: #84cc16; }
.day-card[data-shift="10h-15h"] { border-top-color: #14b8a6; }
.day-card[data-shift="12h-23h"] { border-top-color: #f59e0b; }
.day-card[data-shift="18h-23h"] { border-top-color: #ec4899; }
.day-card[data-shift="9h-15h"] .entry-preview { background: #ecfccb; color: #4d7c0f; }
.day-card[data-shift="10h-15h"] .entry-preview { background: #ccfbf1; color: #0f766e; }
.day-card[data-shift="12h-23h"] .entry-preview { background: #fef3c7; color: #b45309; }
.day-card[data-shift="18h-23h"] .entry-preview { background: #fce7f3; color: #9d174d; }
.day-card[data-shift="9h-15h"] .entry-shift, .day-card[data-shift="9h-15h"] .entry-hours { color: #4d7c0f; }
.day-card[data-shift="10h-15h"] .entry-shift, .day-card[data-shift="10h-15h"] .entry-hours { color: #0f766e; }
.day-card[data-shift="12h-23h"] .entry-shift, .day-card[data-shift="12h-23h"] .entry-hours { color: #b45309; }
.day-card[data-shift="18h-23h"] .entry-shift, .day-card[data-shift="18h-23h"] .entry-hours { color: #9d174d; }
.entry-note { min-height: 62px; margin-top: 12px; border: 1px solid #9fb7c9; border-radius: 9px; background: #fff; color: #243b53; font-size: 12px; font-weight: 650; line-height: 1.45; padding: 9px 10px; }
.entry-note::placeholder { color: #60758a; font-weight: 600; opacity: 1; }
.entry-note:disabled { color: #52667a; background: #eef3f7; border-color: #b8c8d5; opacity: 1; }
.manager-note { margin-top: 9px; border: 1px solid #9bd8cd; border-radius: 9px; background: #e8f6f2; color: #0f5f58; font-size: 11px; font-weight: 750; line-height: 1.45; padding: 9px 10px; }
.manager-note span { color: #0b5b54; font-weight: 950; }
.manager-mobile-note { max-width: 100%; overflow: visible; color: #334e68; font-size: 10px; font-weight: 750; line-height: 1.35; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.manager-mobile-note.employee { color: #334e68; }
.manager-mobile-note.manager { color: #0f5f58; font-weight: 800; }
.manager-inline-note { min-height: 64px; color: #243b53; font-size: 12px; font-weight: 650; line-height: 1.45; padding: 9px; }
.manager-inline-note::placeholder { color: #607d8b; font-weight: 600; opacity: 1; }
@media (max-width: 800px) {
  .entry-note { min-height: 68px; font-size: 13px; padding: 10px; }
  .manager-note { font-size: 12px; padding: 10px; }
  .manager-mobile-note { font-size: 11px; }
  .manager-mobile-employee-row .manager-inline-note { min-height: 70px; font-size: 13px; }
}

@media (max-width: 800px) {
  .topbar { height: 62px; padding-left: 14px; padding-right: 14px; }
  .icon-btn, .account-more { width: 38px; height: 38px; }
  .topbar-account .avatar { width: 32px; height: 32px; }
  .content-wrap { padding-top: 16px; }
  .page-intro, .manager-intro { gap: 12px; margin-bottom: 16px; }
  .page-intro h1 { margin-bottom: 4px; font-size: 25px; }
  .page-intro .eyebrow { margin-bottom: 6px; font-size: 10px; }
  .month-control { width: min(100%, 185px); min-width: 0; }
  .month-control label { margin-bottom: 5px; font-size: 9px; }
  .month-input { min-height: 39px; border-radius: 9px; }
  .month-input input { min-width: 0; width: 100%; padding: 7px 2px; font-size: 11px; }
  .month-arrow { width: 23px; height: 30px; font-size: 20px; }
  .stats-grid { margin-bottom: 18px; }
  .section-heading { margin-bottom: 12px; }
  .section-heading h3, .table-head h3 { font-size: 17px; }
  .table-head { padding: 12px 14px; gap: 10px; }
  .table-head p { font-size: 9px; line-height: 1.35; }
  .manager-calendar-card { margin-bottom: 12px; }
  .manager-week-tabs { padding: 9px 14px 0; }
  .week-tab { min-height: 36px; padding: 7px 10px; }
  .week-tab-main { font-size: 11px; }
  .week-tab-range { font-size: 9px; }
}
@media (max-width: 460px) {
  .page-intro h1 { font-size: 23px; }
  .month-control { width: min(100%, 175px); }
  .table-head h3 { font-size: 16px; }
}

.submit-bar { min-height: 0; margin-top: 14px; padding: 0; gap: 0; border-radius: 0; }
.submit-bar .save-status { min-height: 18px; font-size: 11px; }
.submit-bar .submit-hint { flex: 1; font-size: 10px; line-height: 1.25; }
.submit-bar .primary-btn { min-width: 132px; min-height: 39px; padding: 0 12px; font-size: 12px; }
.submit-bar .primary-btn span { margin-left: 8px; font-size: 15px; }
@media (max-width: 800px) {
  .submit-bar { position: sticky; bottom: 8px; display: flex; align-items: center; flex-wrap: nowrap; justify-content: flex-end; margin-top: 12px; padding: 0; gap: 0; border-radius: 0; }
  .submit-bar .save-status { width: auto; flex: 1 1 auto; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .submit-bar .submit-hint { display: none; }
  .submit-bar .primary-btn { width: auto; min-width: 126px; min-height: 42px; flex: 0 0 auto; padding: 0 11px; }
}

.shared-calendar-card .shared-calendar-header, .shared-calendar-card .shared-shift-head { background: #f6f8fb; }
.shared-calendar-card .shared-calendar-day-head { background: #fbfcfd; }
.shared-calendar-card .shared-calendar-day-head.weekend { background: #f7f9fb; }
.shared-calendar-card .shared-calendar-day-head.today { background: #f1f6f8; }
.shared-calendar-card .shared-mobile-day-head { background: #f7f9fb; }
.shared-calendar-card .shared-mobile-day.weekend .shared-mobile-day-head { background: #f4f7f9; }
.shared-calendar-card .shared-mobile-day.today { border-color: #b7cad5; box-shadow: 0 5px 14px rgba(63, 94, 111, .1); }
.shared-calendar-card .shared-mobile-day.today .shared-mobile-day-head { background: #edf4f7; }
.shared-calendar-card .shared-mobile-day-head b { background: #edf1f4; color: #52667a; }
.shared-calendar-card .shared-mobile-day.today .shared-mobile-day-head b { background: #dfe9ee; color: #405766; }
.shared-calendar-card .shared-calendar-row[data-shift="7h-12h"] .shared-shift-label strong { color: #6f6480; }
.shared-calendar-card .shared-calendar-row[data-shift="12h-17h"] .shared-shift-label strong { color: #806c45; }
.shared-calendar-card .shared-calendar-row[data-shift="17h-23h"] .shared-shift-label strong { color: #855f66; }
.shared-calendar-card .shared-calendar-row[data-shift="7h-15h"] .shared-shift-label strong { color: #52766f; }
.shared-calendar-card .shared-calendar-row[data-shift="15h-23h"] .shared-shift-label strong { color: #806a55; }
.shared-calendar-card .shared-calendar-row[data-shift="9h-15h"] .shared-shift-label strong { color: #68754a; }
.shared-calendar-card .shared-calendar-row[data-shift="10h-15h"] .shared-shift-label strong { color: #3f766f; }
.shared-calendar-card .shared-calendar-row[data-shift="12h-23h"] .shared-shift-label strong { color: #806443; }
.shared-calendar-card .shared-calendar-row[data-shift="18h-23h"] .shared-shift-label strong { color: #805f70; }
.shared-calendar-card .shared-calendar-cell[data-shift="7h-12h"] .shared-person, .shared-calendar-card .shared-mobile-shift[data-shift="7h-12h"] .shared-person { background: #f7f2fb; color: #6f6480; }
.shared-calendar-card .shared-calendar-cell[data-shift="12h-17h"] .shared-person, .shared-calendar-card .shared-mobile-shift[data-shift="12h-17h"] .shared-person { background: #fbf7ed; color: #806c45; }
.shared-calendar-card .shared-calendar-cell[data-shift="17h-23h"] .shared-person, .shared-calendar-card .shared-mobile-shift[data-shift="17h-23h"] .shared-person { background: #fbf3f4; color: #855f66; }
.shared-calendar-card .shared-calendar-cell[data-shift="7h-15h"] .shared-person, .shared-calendar-card .shared-mobile-shift[data-shift="7h-15h"] .shared-person { background: #f0f7f5; color: #52766f; }
.shared-calendar-card .shared-calendar-cell[data-shift="15h-23h"] .shared-person, .shared-calendar-card .shared-mobile-shift[data-shift="15h-23h"] .shared-person { background: #fbf5ef; color: #806a55; }
.shared-calendar-card .shared-calendar-cell[data-shift="9h-15h"] .shared-person, .shared-calendar-card .shared-mobile-shift[data-shift="9h-15h"] .shared-person { background: #f5f8ed; color: #68754a; }
.shared-calendar-card .shared-calendar-cell[data-shift="10h-15h"] .shared-person, .shared-calendar-card .shared-mobile-shift[data-shift="10h-15h"] .shared-person { background: #edf8f5; color: #3f766f; }
.shared-calendar-card .shared-calendar-cell[data-shift="12h-23h"] .shared-person, .shared-calendar-card .shared-mobile-shift[data-shift="12h-23h"] .shared-person { background: #fcf7eb; color: #806443; }
.shared-calendar-card .shared-calendar-cell[data-shift="18h-23h"] .shared-person, .shared-calendar-card .shared-mobile-shift[data-shift="18h-23h"] .shared-person { background: #fbf2f7; color: #805f70; }
.shared-calendar-card .shared-mobile-shift[data-shift="7h-12h"] { border-color: #ded3eb; background: #fcfaff; }
.shared-calendar-card .shared-mobile-shift[data-shift="12h-17h"] { border-color: #e9ddbf; background: #fdfbf6; }
.shared-calendar-card .shared-mobile-shift[data-shift="17h-23h"] { border-color: #e8d2d6; background: #fdf9fa; }
.shared-calendar-card .shared-mobile-shift[data-shift="7h-15h"] { border-color: #cde2dc; background: #f7fbfa; }
.shared-calendar-card .shared-mobile-shift[data-shift="15h-23h"] { border-color: #ead9c5; background: #fdfaf7; }
.shared-calendar-card .shared-mobile-shift[data-shift="9h-15h"] { border-color: #dfe7c5; background: #fafcf5; }
.shared-calendar-card .shared-mobile-shift[data-shift="10h-15h"] { border-color: #cae5df; background: #f7fbfa; }
.shared-calendar-card .shared-mobile-shift[data-shift="12h-23h"] { border-color: #eadfbf; background: #fdfbf5; }
.shared-calendar-card .shared-mobile-shift[data-shift="18h-23h"] { border-color: #e8d1df; background: #fdf9fc; }
.shared-calendar-card .shared-person.self { font-weight: 950; box-shadow: inset 0 0 0 1px currentColor; }
.shared-calendar-card .shared-person { border: 1px solid currentColor; font-size: 10px; font-weight: 850; }
.shared-calendar-card .shared-calendar-cell.today { background: #edf7fa; box-shadow: inset 0 0 0 2px #9ac7d5; }
.shared-calendar-card .shared-calendar-day-head.today { border: 2px solid #43839b; background: #d8ebf2; }
.shared-calendar-card .shared-calendar-day-head.today span { background: #d8e8ed; color: #355b6b !important; }
.shared-calendar-card .shared-calendar-day-head.today small { color: #244a5a; font-weight: 950; }
.shared-calendar-card .shared-calendar-cell[data-shift="7h-12h"] .shared-person, .shared-calendar-card .shared-mobile-shift[data-shift="7h-12h"] .shared-person { background: #eee6f7; color: #4c3d63; }
.shared-calendar-card .shared-calendar-cell[data-shift="12h-17h"] .shared-person, .shared-calendar-card .shared-mobile-shift[data-shift="12h-17h"] .shared-person { background: #f4ebd2; color: #604b25; }
.shared-calendar-card .shared-calendar-cell[data-shift="17h-23h"] .shared-person, .shared-calendar-card .shared-mobile-shift[data-shift="17h-23h"] .shared-person { background: #f5e1e5; color: #623943; }
.shared-calendar-card .shared-calendar-cell[data-shift="7h-15h"] .shared-person, .shared-calendar-card .shared-mobile-shift[data-shift="7h-15h"] .shared-person { background: #dcefe9; color: #285c53; }
.shared-calendar-card .shared-calendar-cell[data-shift="15h-23h"] .shared-person, .shared-calendar-card .shared-mobile-shift[data-shift="15h-23h"] .shared-person { background: #f4e8da; color: #684d32; }
.shared-calendar-card .shared-calendar-cell[data-shift="9h-15h"] .shared-person, .shared-calendar-card .shared-mobile-shift[data-shift="9h-15h"] .shared-person { background: #e9f1d9; color: #4b5a2a; }
.shared-calendar-card .shared-calendar-cell[data-shift="10h-15h"] .shared-person, .shared-calendar-card .shared-mobile-shift[data-shift="10h-15h"] .shared-person { background: #dff1ed; color: #285d57; }
.shared-calendar-card .shared-calendar-cell[data-shift="12h-23h"] .shared-person, .shared-calendar-card .shared-mobile-shift[data-shift="12h-23h"] .shared-person { background: #f5ead2; color: #684f2a; }
.shared-calendar-card .shared-calendar-cell[data-shift="18h-23h"] .shared-person, .shared-calendar-card .shared-mobile-shift[data-shift="18h-23h"] .shared-person { background: #f1ddea; color: #633b58; }
.shared-calendar-card .shared-mobile-day.today { border: 3px solid #43839b; box-shadow: 0 0 0 4px rgba(67, 131, 155, .16), 0 8px 18px rgba(63, 94, 111, .14); }
.shared-calendar-card .shared-mobile-day.today .shared-mobile-day-head { background: #d8ebf2; }
.shared-calendar-card .shared-mobile-day.today .shared-mobile-day-head strong { font-weight: 1000; }
.shared-calendar-card .shared-mobile-day.today .shared-mobile-day-head small { color: #244a5a; font-weight: 950; }

.import-card { margin-top: 1rem; }
.import-controls { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line, #e5e7eb); }
.file-picker { display: inline-flex; align-items: center; min-height: 2.6rem; padding: .6rem .9rem; border: 1px solid var(--line, #d9e2e0); border-radius: .7rem; background: #fff; color: #155e59; font-weight: 700; cursor: pointer; }
.file-picker input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
.import-preview { padding: 1rem 1.25rem; }
.import-summary { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: .75rem; color: #36514d; }
.import-summary strong { color: #0f4f49; }
.import-warning { margin: .75rem 0; padding: .75rem .9rem; border: 1px solid #f2cf8b; border-radius: .7rem; background: #fff8e8; color: #8a5a00; font-weight: 600; }
.import-preview-table { max-height: 25rem; overflow: auto; border: 1px solid var(--line, #e5e7eb); border-radius: .7rem; }
.import-status { display: inline-flex; align-items: center; padding: .25rem .5rem; border-radius: 999px; background: #edf2f1; color: #526763; font-size: .78rem; font-weight: 700; }
.import-status.complete { background: #e7f7ef; color: #177245; }
.import-status.missing_in, .import-status.missing_out, .import-status.ambiguous { background: #fff4dd; color: #926000; }
.import-status.no_punch, .import-status.unmatched { background: #fdebea; color: #a3312e; }
.table-subtext { display: block; margin-top: .2rem; color: #71817d; font-size: .76rem; }
@media (max-width: 700px) {
  .import-controls { align-items: stretch; flex-direction: column; }
  .file-picker, .import-controls .primary-btn { width: 100%; justify-content: center; }
  .import-preview { padding: .75rem; }
  .import-summary { display: grid; gap: .35rem; }
  .import-preview-table { max-height: 22rem; }
}

.import-row-editor { display: grid; gap: .45rem; min-width: 15rem; margin-top: .55rem; padding-top: .55rem; border-top: 1px dashed #d8e4e1; }
.import-user-select, .import-note-input, .import-time-fields input { width: 100%; min-height: 2rem; border: 1px solid #cfdedb; border-radius: .45rem; background: #fff; color: #29443f; padding: .35rem .5rem; font: inherit; }
.import-time-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; }
.import-time-fields label { display: grid; gap: .2rem; color: #627672; font-size: .7rem; font-weight: 700; }
.import-note-input { font-size: .78rem; }
.import-confirm-btn { min-height: 2rem; padding: .35rem .55rem; font-size: .78rem; }
.import-confirm-btn:disabled { opacity: .55; cursor: not-allowed; }
.import-confirmed { color: #18724a; font-size: .75rem; font-weight: 700; }
.import-confirmed-cell { margin-top: .35rem; }
@media (max-width: 700px) {
  .import-row-editor { min-width: 0; }
  .import-time-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .import-time-fields label:last-child { grid-column: 1 / -1; }
}

#manager-view { margin-top: -18px; }
#manager-view .page-intro { margin-bottom: 20px; }
#manager-view .page-intro h1 { font-size: 29px; }
#manager-view .manager-actions .secondary-btn { height: 38px; padding: 0 14px; font-size: 11px; }
#manager-view .month-control label { margin-bottom: 5px; font-size: 9px; }
#manager-view .month-input input { padding: 8px 2px; }
#manager-view .month-arrow { height: 29px; }
#manager-view .stats-grid { gap: 10px; margin-bottom: 20px; }
#manager-view .stat-card { min-height: 78px; padding: 12px 14px; border-radius: 12px; }
#manager-view .stat-top { font-size: 10px; }
#manager-view .stat-icon { width: 24px; height: 24px; border-radius: 7px; font-size: 12px; }
#manager-view .stat-value { margin-top: 8px; font-size: 22px; }
#manager-view .manager-toolbar { gap: 12px; margin-bottom: 10px; }
#manager-view .filter-pills { gap: 4px; }
#manager-view .filter-pill { padding: 6px 8px; font-size: 10px; }
#manager-view .search-field { width: 200px; }
#manager-view .table-head { padding: 13px 16px; }
#manager-view .manager-calendar-card { margin-bottom: 12px; }
#manager-view .manager-week-tabs { padding: 10px 16px 0; }
#manager-view .manager-calendar { padding: 0 16px 16px; }
#manager-view .manager-week-block + .manager-week-block { margin-top: 14px; }
#manager-view .manager-week-title { padding: 12px 0 8px; }

@media (max-width: 1120px) {
  #manager-view { margin-top: -12px; }
  #manager-view .stats-grid { gap: 8px; margin-bottom: 16px; }
  #manager-view .stat-card { min-height: 74px; padding: 11px 12px; }
}

@media (max-width: 800px) {
  #manager-view { margin-top: -10px; }
  #manager-view .page-intro { margin-bottom: 12px; }
  #manager-view .page-intro h1 { font-size: 24px; }
  #manager-view .stats-grid { gap: 8px; margin-bottom: 14px; }
  #manager-view .stat-card { min-height: 70px; padding: 10px 11px; }
  #manager-view .stat-value { margin-top: 6px; font-size: 20px; }
  #manager-view .manager-toolbar { gap: 9px; margin-bottom: 8px; }
  #manager-view .filter-pill { padding: 6px 7px; }
  #manager-view .search-field { width: 100%; }
  #manager-view .table-head { padding: 11px 14px; }
  #manager-view .manager-week-tabs { padding: 8px 14px 0; }
  #manager-view .manager-calendar { padding: 0 14px 14px; }
}

.app-shell { grid-template-columns: 208px minmax(0, 1fr); }
.app-shell .sidebar { padding: 16px 10px 12px; }
.app-shell .sidebar-brand { gap: 8px; padding: 0 8px; }
.app-shell .sidebar-brand strong { font-size: 14px; }
.app-shell .sidebar-brand small { font-size: 9px; }
.app-shell .side-nav { gap: 3px; margin-top: 28px; }
.app-shell .nav-item { gap: 8px; border-radius: 8px; padding: 8px 9px; font-size: 11px; }
.app-shell .nav-icon { width: 16px; font-size: 14px; }
.app-shell .nav-badge { min-width: 18px; height: 18px; border-radius: 6px; font-size: 9px; }
.app-shell .sidebar-bottom { gap: 10px; }
.app-shell .security-card { gap: 8px; padding: 9px; border-radius: 9px; }
.app-shell .security-card strong { font-size: 10px; }
.app-shell .security-card small { font-size: 9px; margin-top: 2px; }
.app-shell .logout-btn { padding: 12px 9px 0; font-size: 11px; }
.app-shell .logout-btn span { margin-right: 6px; font-size: 14px; }
.app-shell .topbar { height: 64px; padding: 0 24px; }
.app-shell .topbar-title h2 { font-size: 14px; }
.app-shell .topbar-account { gap: 8px; }
.app-shell .topbar-account strong { font-size: 11px; }
.app-shell .topbar-account small { margin-top: 2px; font-size: 9px; }
.app-shell .topbar-account .avatar { width: 32px; height: 32px; font-size: 10px; }
.app-shell .account-more, .app-shell .icon-btn { width: 28px; height: 28px; margin-left: 2px; font-size: 19px; }
.app-shell .content-wrap { padding: 24px 24px 40px; }
.app-shell .payroll-view { min-height: calc(100vh - 64px); }
.app-shell .payroll-frame { width: calc(100% + 48px); height: calc(100vh - 64px); min-height: 720px; margin: -24px -24px -40px; }
#employee-view, #shared-calendar-view, #manager-view, #employees-view, #audit-view { margin-top: -12px; }
#app-view .primary-btn, #app-view .secondary-btn { min-height: 35px; padding: 0 12px; border-radius: 8px; font-size: 11px; }
#app-view .primary-btn span { margin-left: 8px; font-size: 14px; }
#app-view .page-intro, #app-view .manager-intro { gap: 16px; margin-bottom: 16px; }
#app-view .page-intro h1 { margin-bottom: 4px; font-size: 28px; }
#app-view .page-intro h1 .wave { font-size: 20px; margin-left: 2px; }
#app-view .page-intro > div > .muted { font-size: 11px; }
#app-view .month-control { min-width: 170px; }
#app-view .month-control label { margin-bottom: 4px; font-size: 8px; }
#app-view .month-input { border-radius: 8px; padding: 0 3px; }
#app-view .month-input input { min-width: 112px; padding: 7px 1px; font-size: 11px; }
#app-view .month-arrow { width: 22px; height: 28px; font-size: 19px; }
#app-view .stats-grid { gap: 8px; margin-bottom: 18px; }
#app-view .stat-card { min-height: 72px; padding: 10px 11px; border-radius: 10px; }
#app-view .stat-top { min-height: 18px; font-size: 9px; }
#app-view .stat-value { margin-top: 6px; font-size: 21px; }
#app-view .stat-icon { width: 23px; height: 23px; border-radius: 6px; font-size: 11px; }
#app-view .section-heading { gap: 12px; margin-bottom: 10px; }
#app-view .section-heading h3, #app-view .table-head h3 { font-size: 16px; }
#app-view .week-tabs { gap: 4px; margin-bottom: 8px; padding-bottom: 1px; }
#app-view .week-tab { min-width: 78px; min-height: 32px; padding: 6px 9px; border-radius: 7px; font-size: 10px; }
#app-view .week-tab-main { font-size: 10px; }
#app-view .week-tab-range { font-size: 8px; }
#app-view .attendance-calendar { grid-template-columns: repeat(7, minmax(108px, 1fr)); gap: 6px; }
#app-view .day-card { min-height: 128px; padding: 9px; border-radius: 10px; }
#app-view .day-card.today { border-width: 2px; box-shadow: 0 0 0 3px rgba(249, 115, 22, .12), 0 6px 14px rgba(180, 83, 9, .1); }
#app-view .day-card.today .day-number strong { font-size: 21px; }
#app-view .day-head { margin-bottom: 7px; }
#app-view .day-week-label { padding: 3px 5px; font-size: 7px; }
#app-view .day-name { font-size: 9px; }
#app-view .day-number { gap: 4px; margin-top: 6px; }
#app-view .day-number span { font-size: 7px; }
#app-view .day-number strong { font-size: 19px; }
#app-view .today-label { padding: 3px 5px; font-size: 8px; }
#app-view .shift-select { border-radius: 7px; padding: 6px 4px; font-size: 10px; }
#app-view .hours-row { gap: 3px; margin-top: 5px; font-size: 9px; }
#app-view .hours-input { width: 42px; font-size: 10px; }
#app-view .entry-note { min-height: 30px; border-radius: 6px; padding: 5px 6px; font-size: 8px; }
#app-view .status-strip { gap: 4px; margin-top: 5px; font-size: 8px; }
#app-view .entry-preview { gap: 2px; margin-top: 5px; padding: 6px; border-radius: 7px; }
#app-view .entry-shift { font-size: 11px; }
#app-view .entry-hours { font-size: 9px; }
#app-view .submit-bar { margin-top: 14px; }
#app-view .submit-bar .primary-btn { min-width: 132px; min-height: 35px; }
#app-view .review-note { margin-bottom: 12px; padding: 9px 11px; border-radius: 9px; font-size: 10px; }
#app-view .manager-actions { gap: 7px; }
#app-view .manager-actions .secondary-btn { height: 35px; }
#app-view .manager-toolbar { gap: 8px; margin-bottom: 8px; }
#app-view .filter-pills { gap: 3px; }
#app-view .filter-pill { padding: 5px 7px; border-radius: 7px; font-size: 9px; }
#app-view .search-field { width: 190px; border-radius: 7px; padding-left: 8px; }
#app-view .search-field input { padding: 8px 8px 8px 0; font-size: 10px; }
#app-view .table-card { border-radius: 11px; }
#app-view .table-head { padding: 10px 12px; gap: 10px; }
#app-view .table-head p { margin-top: 3px; font-size: 9px; }
#app-view th { padding: 8px 12px; font-size: 8px; }
#app-view td { padding: 9px 12px; font-size: 10px; }
#app-view .employee-cell { gap: 7px; }
#app-view .employee-cell .avatar { width: 26px; height: 26px; font-size: 8px; }
#app-view .employee-cell strong { font-size: 10px; }
#app-view .employee-cell small { margin-top: 2px; font-size: 9px; }
#app-view .status-badge, #app-view .employee-status { gap: 4px; padding: 4px 6px; border-radius: 6px; font-size: 9px; }
#app-view .status-badge::before, #app-view .employee-status::before { width: 5px; height: 5px; }
#app-view .manager-calendar-card { margin-bottom: 10px; }
#app-view .manager-week-tabs { padding: 7px 12px 0; }
#app-view .manager-calendar { padding: 0 12px 12px; }
#app-view .manager-week-block + .manager-week-block { margin-top: 12px; }
#app-view .manager-week-title { gap: 8px; padding: 8px 0 6px; }
#app-view .manager-week-title strong { font-size: 11px; }
#app-view .manager-week-title span { font-size: 8px; }
#app-view .manager-calendar-day-grid { grid-template-columns: repeat(5, minmax(170px, 1fr)); gap: 10px; }
#app-view .manager-mobile-day { border-radius: 10px; box-shadow: 0 4px 10px rgba(24, 60, 88, .05); }
#app-view .manager-mobile-day-head { min-height: 62px; padding: 9px 10px 8px; gap: 7px; }
#app-view .manager-mobile-day-head > div:first-child { gap: 2px; }
#app-view .manager-mobile-day-head span { font-size: 7px; }
#app-view .manager-mobile-day-head strong { font-size: 13px; }
#app-view .manager-mobile-day-head small { font-size: 10px; }
#app-view .manager-mobile-day-counts { gap: 3px; max-width: 120px; }
#app-view .manager-mobile-day-counts b { padding: 4px 5px; font-size: 8px; }
#app-view .manager-mobile-employee-row { grid-template-columns: minmax(0, 1fr) minmax(88px, 39%); gap: 6px; padding: 7px 9px; }
#app-view .manager-mobile-employee-info { gap: 6px; }
#app-view .manager-mobile-employee-info .avatar { width: 26px; height: 26px; font-size: 8px; }
#app-view .manager-mobile-employee-info strong { font-size: 10px; }
#app-view .manager-mobile-employee-info small { margin-top: 2px; font-size: 8px; }
#app-view .manager-mobile-shift { min-height: 46px; border-radius: 7px; padding: 6px 7px; }
#app-view .manager-mobile-shift strong { font-size: 10px; }
#app-view .manager-mobile-shift small { font-size: 8px; }
#app-view .manager-mobile-note { font-size: 8px; }
#app-view .manager-mobile-approve { min-height: 30px; border-radius: 7px; padding: 5px 6px; font-size: 9px; }
#app-view .manager-cell-editor { gap: 4px; min-height: 48px; padding: 4px; }
#app-view .manager-inline-shift, #app-view .manager-inline-custom { border-radius: 5px; padding: 5px 4px; font-size: 8px; }
#app-view .manager-cell-editor-actions { grid-template-columns: minmax(0, 1fr) 22px; gap: 3px; }
#app-view .manager-cell-save, #app-view .manager-cell-cancel { min-height: 22px; border-radius: 5px; font-size: 7px; }
#app-view .employee-toolbar { gap: 8px; margin: 10px 0 8px; }
#app-view .employee-form-card { margin-bottom: 10px; }
#app-view .employee-form { gap: 9px; padding: 12px; }
#app-view .employee-form label { gap: 5px; font-size: 10px; }
#app-view .employee-form input { border-radius: 8px; padding: 8px 9px; font-size: 11px; }
#app-view .employee-form-actions { gap: 6px; padding-top: 1px; }
#app-view .danger-text-btn, #app-view .restore-btn { padding: 3px 0; font-size: 10px; }
#app-view .modal { padding: 12px; }
#app-view .modal-card { padding: 20px; border-radius: 12px; }
#app-view .modal-card h3 { margin-bottom: 5px; font-size: 20px; }
#app-view .modal-card > .muted { margin-bottom: 16px; font-size: 11px; line-height: 1.45; }
#app-view .modal-close { top: 9px; right: 11px; font-size: 22px; }
.app-shell .toast-root { top: 12px; right: 12px; gap: 6px; }
.app-shell .toast { min-width: 220px; max-width: 320px; padding: 10px 12px; border-radius: 8px; font-size: 10px; }

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 184px minmax(0, 1fr); }
  .app-shell .topbar { padding: 0 18px; }
  .app-shell .content-wrap { padding: 20px 18px 32px; }
  .app-shell .payroll-frame { width: calc(100% + 36px); height: calc(100vh - 64px); margin: -20px -18px -32px; }
  #app-view .attendance-calendar { grid-template-columns: repeat(5, minmax(100px, 1fr)); }
  #app-view .manager-calendar-day-grid { grid-template-columns: repeat(3, minmax(170px, 1fr)); }
}

@media (max-width: 800px) {
  .app-shell .topbar { height: 56px; padding: 0 12px; gap: 8px; }
  .app-shell .topbar-title h2 { font-size: 13px; }
  .app-shell .topbar-account .avatar { width: 29px; height: 29px; font-size: 9px; }
  .app-shell .icon-btn { width: 34px; height: 34px; margin: 0; border-radius: 8px; font-size: 18px; }
  .app-shell .sidebar { width: 228px; left: -240px; padding: 14px 10px 12px; }
  .app-shell .sidebar.open { left: 0; }
  .app-shell .content-wrap { padding: 14px 12px 36px; }
  .app-shell .payroll-view { min-height: calc(100vh - 56px); }
  .app-shell .payroll-frame { width: calc(100% + 24px); height: calc(100vh - 56px); min-height: 680px; margin: -14px -12px -36px; }
  #employee-view, #shared-calendar-view, #manager-view, #employees-view, #audit-view { margin-top: -8px; }
  #app-view .page-intro, #app-view .manager-intro { gap: 10px; margin-bottom: 12px; }
  #app-view .page-intro h1 { font-size: 23px; }
  #app-view .month-control { min-width: 0; width: 100%; }
  #app-view .month-input input { min-width: 0; flex: 1; }
  #app-view .stats-grid { gap: 6px; margin-bottom: 14px; }
  #app-view .stat-card { min-height: 64px; padding: 8px 9px; }
  #app-view .stat-top { font-size: 8px; }
  #app-view .stat-value { margin-top: 4px; font-size: 19px; }
  #app-view .stat-icon { width: 21px; height: 21px; font-size: 10px; }
  #app-view .section-heading { margin-bottom: 8px; }
  #app-view .section-heading h3, #app-view .table-head h3 { font-size: 14px; }
  #app-view .week-tabs { margin-right: -12px; padding-right: 12px; }
  #app-view .week-tab { min-width: 70px; min-height: 29px; padding: 5px 7px; }
  #app-view .week-tab-main { font-size: 9px; }
  #app-view .week-tab-range { font-size: 7px; }
  #app-view .attendance-calendar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  #app-view .day-card { min-height: 120px; padding: 8px; }
  #app-view .day-name { font-size: 8px; }
  #app-view .day-number strong { font-size: 17px; }
  #app-view .day-card.today .day-number strong { font-size: 19px; }
  #app-view .shift-select { min-height: 32px; padding: 5px 4px; font-size: 9px; }
  #app-view .hours-row { font-size: 8px; }
  #app-view .hours-input { width: 38px; }
  #app-view .entry-note { min-height: 27px; font-size: 8px; }
  #app-view .submit-bar { margin-top: 10px; }
  #app-view .submit-bar .primary-btn { width: auto; min-width: 120px; min-height: 37px; }
  #app-view .manager-actions { gap: 6px; }
  #app-view .manager-actions .secondary-btn { width: 100%; }
  #app-view .manager-toolbar { gap: 6px; margin-bottom: 6px; }
  #app-view .filter-pills { margin-right: -12px; padding-right: 12px; }
  #app-view .filter-pill { min-height: 30px; padding: 5px 6px; }
  #app-view .search-field { width: 100%; }
  #app-view .table-head { padding: 8px 10px; }
  #app-view .table-head p { font-size: 8px; }
  #app-view .table-scroll tr { padding: 8px 10px; }
  #app-view .table-scroll td { gap: 10px; padding: 3px 0; }
  #app-view .table-scroll td::before { font-size: 8px; }
  #app-view .table-scroll td:first-child { padding-bottom: 6px; }
  #app-view .table-scroll td:last-child { padding-top: 6px; }
  #app-view .manager-calendar { padding: 0 10px 10px; }
  #app-view .manager-calendar-day-grid { grid-template-columns: 1fr; gap: 7px; }
  #app-view .manager-mobile-day-head { min-height: 56px; padding: 8px 9px 7px; }
  #app-view .manager-mobile-day-head strong { font-size: 12px; }
  #app-view .manager-mobile-day-counts b { padding: 3px 5px; }
  #app-view .manager-mobile-employee-row { grid-template-columns: minmax(0, 1fr) minmax(100px, 38%); padding: 6px 8px; }
  #app-view .manager-mobile-shift { min-height: 42px; padding: 5px 6px; }
  #app-view .manager-mobile-approve { min-height: 28px; }
  #app-view .manager-mobile-employee-row .manager-cell-editor { grid-template-columns: minmax(0, 1fr) minmax(90px, .85fr); gap: 6px; padding: 7px; }
  #app-view .manager-mobile-employee-row .manager-inline-shift, #app-view .manager-mobile-employee-row .manager-inline-custom { min-height: 34px; padding: 6px; font-size: 9px; }
  #app-view .manager-mobile-employee-row .manager-inline-note { min-height: 42px; font-size: 9px; padding: 6px; }
  #app-view .manager-mobile-employee-row .manager-cell-save, #app-view .manager-mobile-employee-row .manager-cell-cancel { min-height: 32px; font-size: 9px; }
  #app-view .employee-form { grid-template-columns: 1fr; gap: 7px; padding: 10px; }
  #app-view .employee-form-actions { display: block; }
  #app-view .employee-form-actions .primary-btn { width: 100%; }
  #app-view .shared-calendar { padding: 0 10px 10px; }
  #app-view .shared-calendar-mobile { gap: 7px; }
  #app-view .shared-mobile-day { border-radius: 10px; box-shadow: 0 3px 8px rgba(25, 50, 77, .05); }
  #app-view .shared-mobile-day.today { border-width: 2px; box-shadow: 0 0 0 3px rgba(67, 131, 155, .1), 0 5px 12px rgba(63, 94, 111, .1); }
  #app-view .shared-mobile-day-head { gap: 7px; padding: 8px 9px; }
  #app-view .shared-mobile-day-head span { font-size: 8px; }
  #app-view .shared-mobile-day-head strong { font-size: 13px; }
  #app-view .shared-mobile-day-head small { font-size: 10px; }
  #app-view .shared-mobile-day-head b { padding: 3px 6px; font-size: 8px; }
  #app-view .shared-mobile-shifts { gap: 5px; padding: 7px; }
  #app-view .shared-mobile-shift { border-radius: 8px; padding: 6px; }
  #app-view .shared-mobile-shift-head { margin-bottom: 5px; }
  #app-view .shared-mobile-shift-head strong { font-size: 10px; }
  #app-view .shared-mobile-shift-head span { font-size: 8px; }
  #app-view .shared-mobile-people { gap: 4px; }
  #app-view .shared-mobile-people .shared-person { padding: 5px 4px; font-size: 9px; }
  #app-view .shared-mobile-empty { padding: 4px 2px 5px; font-size: 9px; }
}

@media (max-width: 460px) {
  #app-view .page-intro h1 { font-size: 21px; }
  #app-view .stats-grid { gap: 5px; }
  #app-view .stat-card { padding: 7px 8px; }
  #app-view .stat-top { font-size: 7px; }
  #app-view .stat-value { font-size: 18px; }
  #app-view .day-card { min-height: 116px; padding: 7px; }
  #app-view .day-number strong { font-size: 16px; }
  #app-view .day-card.today .day-number strong { font-size: 18px; }
  #app-view .manager-mobile-employee-row { grid-template-columns: minmax(0, 1fr) 96px; }
  #app-view .manager-mobile-employee-row .manager-cell-editor { grid-template-columns: 1fr; }
}

@media (min-width: 801px) {
  #shared-calendar-view .shared-calendar { padding: 0 12px 12px; }
  #shared-calendar-view .shared-week-block + .shared-week-block { margin-top: 12px; }
  #shared-calendar-view .shared-week-title { gap: 8px; margin-bottom: 6px; }
  #shared-calendar-view .shared-week-title > div { gap: 5px; }
  #shared-calendar-view .shared-week-title strong { font-size: 12px; }
  #shared-calendar-view .shared-week-title small, #shared-calendar-view .shared-week-title > span { font-size: 8px; }
  #shared-calendar-view .shared-calendar-scroll { border-radius: 9px; }
  #shared-calendar-view .shared-calendar-grid { min-width: 660px; }
  #shared-calendar-view .shared-calendar-header, #shared-calendar-view .shared-calendar-row { grid-template-columns: 96px minmax(0, 1fr); }
  #shared-calendar-view .shared-calendar-days { grid-template-columns: repeat(7, minmax(68px, 1fr)); }
  #shared-calendar-view .shared-calendar-grid-days-1 .shared-calendar-days { grid-template-columns: repeat(1, minmax(68px, 1fr)); }
  #shared-calendar-view .shared-calendar-grid-days-2 .shared-calendar-days { grid-template-columns: repeat(2, minmax(68px, 1fr)); }
  #shared-calendar-view .shared-calendar-grid-days-3 .shared-calendar-days { grid-template-columns: repeat(3, minmax(68px, 1fr)); }
  #shared-calendar-view .shared-calendar-grid-days-4 .shared-calendar-days { grid-template-columns: repeat(4, minmax(68px, 1fr)); }
  #shared-calendar-view .shared-calendar-grid-days-5 .shared-calendar-days { grid-template-columns: repeat(5, minmax(68px, 1fr)); }
  #shared-calendar-view .shared-calendar-grid-days-6 .shared-calendar-days { grid-template-columns: repeat(6, minmax(68px, 1fr)); }
  #shared-calendar-view .shared-calendar-grid-days-7 .shared-calendar-days { grid-template-columns: repeat(7, minmax(68px, 1fr)); }
  #shared-calendar-view .shared-shift-head { padding: 7px 8px; font-size: 8px; }
  #shared-calendar-view .shared-calendar-day-head { min-height: 50px; gap: 2px; padding: 5px 3px; }
  #shared-calendar-view .shared-calendar-day-head span { font-size: 7px; }
  #shared-calendar-view .shared-calendar-day-head strong { font-size: 9px; }
  #shared-calendar-view .shared-calendar-day-head small { font-size: 8px; }
  #shared-calendar-view .shared-shift-label { gap: 2px; padding: 7px 8px; }
  #shared-calendar-view .shared-shift-label strong { font-size: 9px; }
  #shared-calendar-view .shared-shift-label small { font-size: 7px; }
  #shared-calendar-view .shared-calendar-cell { min-height: 60px; gap: 3px; padding: 5px 4px; }
  #shared-calendar-view .shared-person { border-radius: 5px; padding: 3px; font-size: 8px; }
  #shared-calendar-view .shared-person small { font-size: 7px; }
  #shared-calendar-view .shared-empty { font-size: 13px; }
}

@media (min-width: 801px) {
  #manager-view .manager-calendar { overflow: visible; }
  #manager-view .manager-calendar-day-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); min-width: 0; gap: clamp(4px, .7vw, 8px); }
  #manager-view .manager-mobile-day,
  #manager-view .manager-mobile-day-head,
  #manager-view .manager-mobile-employee-row,
  #manager-view .manager-mobile-employee-info,
  #manager-view .manager-mobile-schedule { min-width: 0; }
}

@media (min-width: 801px) and (max-width: 1120px) {
  #manager-view .manager-mobile-day-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(4px, .55vw, 7px); min-height: 0; padding: clamp(5px, .7vw, 8px); }
  #manager-view .manager-mobile-day-head > div:first-child { gap: 3px; }
  #manager-view .manager-mobile-day-head span,
  #manager-view .manager-mobile-day-head strong,
  #manager-view .manager-mobile-day-head small { overflow: visible; overflow-wrap: anywhere; text-overflow: clip; white-space: normal; }
  #manager-view .manager-mobile-day-head span { font-size: clamp(6px, .7vw, 9px); line-height: 1.15; }
  #manager-view .manager-mobile-day-head strong { font-size: clamp(9px, 1vw, 13px); line-height: 1.15; }
  #manager-view .manager-mobile-day-head small { font-size: clamp(7px, .8vw, 10px); line-height: 1.15; }
  #manager-view .manager-mobile-day-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2px, .3vw, 4px); max-width: none; }
  #manager-view .manager-mobile-day-counts b { min-width: 0; overflow: visible; padding: clamp(3px, .35vw, 5px) 2px; font-size: clamp(6px, .65vw, 8px); line-height: 1.15; overflow-wrap: anywhere; text-align: center; text-overflow: clip; white-space: normal; }
  #manager-view .manager-mobile-employee-row { grid-template-columns: minmax(0, 1fr); gap: clamp(4px, .5vw, 6px); padding: clamp(5px, .6vw, 7px); }
  #manager-view .manager-mobile-employee-info { align-items: flex-start; gap: clamp(4px, .5vw, 6px); }
  #manager-view .manager-mobile-employee-info .avatar { width: clamp(20px, 2.2vw, 26px); height: clamp(20px, 2.2vw, 26px); font-size: clamp(7px, .65vw, 9px); }
  #manager-view .manager-mobile-employee-info > div:last-child { flex: 1 1 auto; min-width: 0; }
  #manager-view .manager-mobile-employee-info strong,
  #manager-view .manager-mobile-employee-info small { overflow: visible; overflow-wrap: anywhere; text-overflow: clip; white-space: normal; }
  #manager-view .manager-mobile-employee-info strong { font-size: clamp(8px, .85vw, 11px); line-height: 1.2; }
  #manager-view .manager-mobile-employee-info small { margin-top: 2px; font-size: clamp(7px, .65vw, 9px); line-height: 1.2; }
  #manager-view .manager-mobile-schedule { gap: clamp(3px, .4vw, 5px); }
  #manager-view .manager-mobile-shift { min-height: 0; height: auto; border-radius: 6px; padding: clamp(4px, .55vw, 7px); }
  #manager-view .manager-mobile-shift strong,
  #manager-view .manager-mobile-shift small,
  #manager-view .manager-mobile-note { overflow: visible; overflow-wrap: anywhere; text-overflow: clip; white-space: normal; }
  #manager-view .manager-mobile-shift strong { font-size: clamp(8px, .85vw, 11px); line-height: 1.2; }
  #manager-view .manager-mobile-shift small { font-size: clamp(7px, .65vw, 9px); line-height: 1.2; }
  #manager-view .manager-mobile-note { font-size: clamp(7px, .7vw, 9px); line-height: 1.25; }
  #manager-view .manager-mobile-approve { min-height: 0; height: auto; padding: clamp(4px, .5vw, 6px); font-size: clamp(7px, .7vw, 9px); line-height: 1.2; overflow-wrap: anywhere; white-space: normal; }
}

.manager-mobile-day { border-color: #d6e1ec; border-radius: 14px; background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%); box-shadow: 0 6px 16px rgba(24, 60, 88, .06); }
.manager-mobile-day:hover { border-color: #b9cce0; box-shadow: 0 10px 22px rgba(24, 60, 88, .1); }
.manager-mobile-day-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; min-height: 0; padding: 12px 13px 11px; background: linear-gradient(135deg, #f4f8ff 0%, #fbfdff 100%); }
.manager-mobile-day.weekend .manager-mobile-day-head { background: linear-gradient(135deg, #f5f7fb 0%, #fbfcfe 100%); }
.manager-mobile-day.today .manager-mobile-day-head { background: linear-gradient(135deg, #fff5dd 0%, #fffdf7 100%); }
.manager-mobile-day-head > div:first-child { display: grid; align-content: start; justify-items: start; gap: 5px; min-width: 0; }
.manager-mobile-day-head span { display: inline-flex; align-items: center; justify-self: start; min-height: 20px; border: 1px solid #cbd7e5; border-radius: 6px; background: #eef3f8; color: #475569 !important; padding: 3px 7px; font-size: 10px; font-weight: 900; letter-spacing: .05em; line-height: 1; text-transform: uppercase; }
.manager-mobile-day-head strong { display: block; max-width: 100%; color: #1d4ed8; font-size: clamp(18px, 2.6vw, 28px); font-weight: 950; letter-spacing: .015em; line-height: .98; overflow-wrap: anywhere; text-transform: uppercase; }
.manager-mobile-day-head small { display: block; color: #52667a; font-size: clamp(13px, 1.8vw, 18px); font-variant-numeric: tabular-nums; font-weight: 850; line-height: 1.05; }
.manager-mobile-day-counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-self: start; gap: 6px; width: min(100%, 190px); max-width: none; }
.manager-mobile-day-counts b { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 28px; border: 1px solid transparent; border-radius: 999px; padding: 5px 8px; font-size: clamp(10px, 1.4vw, 13px); font-weight: 900; line-height: 1.15; overflow-wrap: anywhere; text-align: center; text-overflow: clip; white-space: normal; }
.manager-mobile-day-counts b::before { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; content: ""; }
.manager-mobile-day-counts .pending { border-color: #f5d49d; background: #fff4df; color: #9a5b13; }
.manager-mobile-day-counts .pending::before { background: #e59a20; }
.manager-mobile-day-counts .scheduled { border-color: #a9dfbf; background: #e9f9ef; color: #16734c; }
.manager-mobile-day-counts .scheduled::before { background: #25a267; }
.manager-mobile-day-counts .empty { border-color: #d6e0ea; background: #eef3f8; color: #61758a; }
.manager-mobile-day-counts .empty::before { background: #8da0b3; }
.manager-mobile-employee-row { gap: 10px; padding: 10px 11px; }
.manager-mobile-employee-info { align-items: flex-start; gap: 7px; }
.manager-mobile-employee-info .avatar { width: 28px; height: 28px; border: 1px solid rgba(255, 255, 255, .8); box-shadow: 0 2px 5px rgba(24, 60, 88, .08); }
.manager-mobile-employee-info strong { color: #19324d; font-size: 11px; line-height: 1.2; }
.manager-mobile-employee-info small { color: #718096; font-size: 9px; line-height: 1.2; }
.manager-mobile-employee-row.submitted .avatar { background: #fff0c9; color: #9a5b13; }
.manager-mobile-employee-row.approved .avatar { background: #dff7e9; color: #16734c; }
.manager-mobile-employee-row.rejected .avatar { background: #ffe1e6; color: #be3045; }
.manager-mobile-employee-row.empty .avatar { background: #e8eef5; color: #61758a; }
.manager-mobile-shift { min-height: 0; border-radius: 8px; padding: 7px 8px; box-shadow: inset 3px 0 rgba(15, 118, 110, .12); }
.manager-mobile-shift strong { font-size: 11px; line-height: 1.2; }
.manager-mobile-shift small { font-size: 9px; line-height: 1.2; }
.manager-mobile-note { font-size: 9px; line-height: 1.25; }
.manager-mobile-approve { min-height: 30px; border-radius: 8px; padding: 5px 7px; font-size: 9px; line-height: 1.15; }

@media (min-width: 801px) and (max-width: 1120px) {
  #manager-view .manager-mobile-day { border-radius: 10px; }
  #manager-view .manager-mobile-day-head { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: clamp(6px, .75vw, 9px); }
  #manager-view .manager-mobile-day-head span { min-height: 17px; padding: 2px 5px; font-size: clamp(6px, .7vw, 8px); }
  #manager-view .manager-mobile-day-head strong { font-size: clamp(9px, 1.05vw, 13px); line-height: 1.05; }
  #manager-view .manager-mobile-day-head small { font-size: clamp(7px, .8vw, 10px); }
  #manager-view .manager-mobile-day-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2px, .3vw, 4px); width: 100%; }
  #manager-view .manager-mobile-day-counts b { min-height: 22px; gap: 2px; padding: 3px 2px; font-size: clamp(6px, .7vw, 9px); }
  #manager-view .manager-mobile-day-counts b::before { width: 4px; height: 4px; }
  #manager-view .manager-mobile-employee-row { gap: clamp(4px, .5vw, 6px); padding: clamp(5px, .6vw, 7px); }
  #manager-view .manager-mobile-employee-info { gap: clamp(4px, .5vw, 6px); }
  #manager-view .manager-mobile-employee-info .avatar { width: clamp(20px, 2.2vw, 25px); height: clamp(20px, 2.2vw, 25px); font-size: clamp(7px, .65vw, 9px); }
  #manager-view .manager-mobile-employee-info strong { font-size: clamp(8px, .85vw, 11px); }
  #manager-view .manager-mobile-employee-info small { font-size: clamp(7px, .65vw, 9px); }
  #manager-view .manager-mobile-shift { border-radius: 6px; padding: clamp(4px, .55vw, 7px); box-shadow: inset 2px 0 rgba(15, 118, 110, .12); }
  #manager-view .manager-mobile-shift strong { font-size: clamp(8px, .85vw, 11px); }
  #manager-view .manager-mobile-shift small, #manager-view .manager-mobile-note { font-size: clamp(7px, .7vw, 9px); }
  #manager-view .manager-mobile-approve { min-height: 0; padding: clamp(4px, .5vw, 6px); font-size: clamp(7px, .7vw, 9px); }
}

@media (max-width: 800px) {
  #manager-view .manager-mobile-day-head { grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 14px 15px 13px; }
  #manager-view .manager-mobile-day-head span { min-height: 22px; padding: 4px 8px; font-size: 10px; }
  #manager-view .manager-mobile-day-head strong { font-size: clamp(22px, 8vw, 34px); line-height: .96; }
  #manager-view .manager-mobile-day-head small { font-size: clamp(14px, 4vw, 19px); }
  #manager-view .manager-mobile-day-counts { gap: 6px; width: min(100%, 190px); }
  #manager-view .manager-mobile-day-counts b { min-height: 30px; padding: 5px 8px; font-size: clamp(10px, 2.6vw, 13px); }
  #manager-view .manager-mobile-employee-row { grid-template-columns: minmax(0, 1fr) minmax(148px, 38%); gap: 10px; padding: 10px 12px; }
  #manager-view .manager-mobile-employee-info .avatar { width: 29px; height: 29px; }
  #manager-view .manager-mobile-employee-info strong { font-size: 12px; }
  #manager-view .manager-mobile-employee-info small { font-size: 10px; }
  #manager-view .manager-mobile-shift { border-radius: 8px; padding: 8px 9px; }
  #manager-view .manager-mobile-shift strong { font-size: 12px; }
  #manager-view .manager-mobile-shift small, #manager-view .manager-mobile-note { font-size: 10px; }
  #manager-view .manager-mobile-approve { min-height: 34px; padding: 6px 8px; font-size: 10px; }
}

@media (max-width: 420px) {
  #manager-view .manager-mobile-day-head { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  #manager-view .manager-mobile-day-counts { width: 100%; max-width: none; }
  #manager-view .manager-mobile-day-counts b { justify-content: flex-start; padding-inline: 10px; }
  #manager-view .manager-mobile-employee-row { grid-template-columns: minmax(0, 1fr) 120px; }
}

.login-art { padding: 42px clamp(28px, 6vw, 90px); }
.login-art h1 { margin-bottom: 18px; font-size: clamp(34px, 4vw, 58px); }
.brand-mark.large { width: 48px; height: 48px; border-radius: 13px; font-size: 13px; margin-bottom: 42px; }
.login-card-wrap { padding: 24px 5vw; }
.login-card h2 { margin-bottom: 6px; font-size: 30px; }
.login-card > .muted { margin-bottom: 22px; }
.login-card .stack-form { gap: 12px; }
.login-card .stack-form label { gap: 5px; font-size: 12px; }
.login-card .stack-form input { border-radius: 9px; padding: 10px 11px; }
.login-card .primary-btn.full { min-height: 42px; margin-top: 3px; }

@media (max-width: 800px) {
  .login-card-wrap { padding: 20px; }
  .mobile-brand { margin-bottom: 28px; }
  .login-card h2 { font-size: 28px; }
}

#manager-view .manager-mobile-day-counts { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: flex-start; gap: 4px; width: 100%; max-width: none; }
#manager-view .manager-mobile-day-counts b { display: inline-flex; flex: 0 1 auto; align-items: center; justify-content: center; width: auto; min-width: max-content; max-width: 100%; min-height: 24px; gap: 3px; padding: 4px 7px; overflow: visible; overflow-wrap: normal; text-align: center; text-overflow: clip; white-space: nowrap; word-break: keep-all; }

@media (min-width: 801px) {
  #manager-view .manager-mobile-day-head { grid-template-columns: minmax(0, 1fr); gap: clamp(5px, .55vw, 8px); padding: clamp(7px, .75vw, 11px); }
  #manager-view .manager-mobile-day-head span { min-height: 18px; padding: 3px 6px; font-size: clamp(7px, .7vw, 10px); }
  #manager-view .manager-mobile-day-head strong { font-size: clamp(10px, 1.1vw, 16px); line-height: 1.05; }
  #manager-view .manager-mobile-day-head small { font-size: clamp(8px, .85vw, 12px); }
  #manager-view .manager-mobile-day-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2px, .3vw, 5px); width: 100%; }
  #manager-view .manager-mobile-day-counts b { min-height: 24px; gap: 3px; padding: 4px 3px; font-size: clamp(7px, .72vw, 10px); }
  #manager-view .manager-mobile-day-counts b::before { width: 5px; height: 5px; }
  #manager-view .manager-mobile-employee-row { grid-template-columns: minmax(0, 1fr); gap: clamp(4px, .55vw, 8px); padding: clamp(6px, .7vw, 10px); }
  #manager-view .manager-mobile-employee-info { align-items: flex-start; gap: clamp(4px, .55vw, 8px); }
  #manager-view .manager-mobile-employee-info .avatar { width: clamp(22px, 2.25vw, 30px); height: clamp(22px, 2.25vw, 30px); font-size: clamp(7px, .7vw, 10px); }
  #manager-view .manager-mobile-employee-info > div:last-child { flex: 1 1 auto; min-width: 0; }
  #manager-view .manager-mobile-employee-info strong { font-size: clamp(8px, .85vw, 12px); }
  #manager-view .manager-mobile-employee-info small { margin-top: 2px; font-size: clamp(7px, .7vw, 10px); }
  #manager-view .manager-mobile-shift { min-height: 0; border-radius: 7px; padding: clamp(5px, .6vw, 8px); }
  #manager-view .manager-mobile-shift strong { font-size: clamp(8px, .85vw, 12px); }
  #manager-view .manager-mobile-shift small, #manager-view .manager-mobile-note { font-size: clamp(7px, .7vw, 10px); }
  #manager-view .manager-mobile-approve { min-height: 0; padding: clamp(4px, .5vw, 7px); font-size: clamp(7px, .7vw, 10px); }
}

#manager-view .manager-mobile-employee-info .avatar { display: none; }
#manager-view .manager-mobile-employee-info { gap: 0; }

.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sidebar-toggle { display: inline-grid; place-items: center; width: 30px; height: 30px; min-height: 30px; flex: 0 0 auto; border: 1px solid #d9e6e4; border-radius: 8px; background: #f7fbfa; color: #6a8587; padding: 0; }
.sidebar-toggle:hover { border-color: #b9d7d1; background: #eaf6f2; color: var(--teal-dark); }
.sidebar-toggle-icon { display: block; font-size: 20px; font-weight: 700; line-height: 1; }
.logout-btn .logout-label { margin-right: 0; font-size: inherit; }
svg.nav-icon { display: block; width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.logout-icon { display: inline-flex; align-items: center; justify-content: center; }
.logout-icon svg { display: block; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 801px) {
  #app-view { transition: grid-template-columns .22s ease; }
  #app-view .sidebar { transition: padding .22s ease; }
  #app-view .side-nav { margin-top: 26px; }
  #app-view .nav-icon { width: 25px; font-size: 21px; line-height: 1; }
  #app-view.sidebar-collapsed { grid-template-columns: 76px minmax(0, 1fr); }
  #app-view.sidebar-collapsed .sidebar { padding-left: 8px; padding-right: 8px; }
  #app-view.sidebar-collapsed .sidebar-head { flex-direction: column; gap: 12px; }
  #app-view.sidebar-collapsed .sidebar-brand { justify-content: center; padding-left: 0; padding-right: 0; }
  #app-view.sidebar-collapsed .sidebar-brand > div:last-child,
  #app-view.sidebar-collapsed .nav-item > span:not(.nav-icon):not(.nav-badge),
  #app-view.sidebar-collapsed .security-card > div,
  #app-view.sidebar-collapsed .logout-label { display: none; }
  #app-view.sidebar-collapsed .sidebar-toggle { width: 32px; height: 32px; min-height: 32px; padding: 0; }
  #app-view.sidebar-collapsed .sidebar-toggle-icon { font-size: 24px; }
  #app-view.sidebar-collapsed .side-nav { gap: 8px; margin-top: 22px; }
  #app-view.sidebar-collapsed .nav-item { justify-content: center; gap: 0; min-height: 48px; padding: 10px 8px; border-radius: 12px; }
  #app-view.sidebar-collapsed .nav-icon { width: auto; font-size: 25px; }
  #app-view.sidebar-collapsed .nav-badge { position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; border-radius: 5px; font-size: 8px; }
  #app-view.sidebar-collapsed .sidebar-bottom { gap: 10px; }
  #app-view.sidebar-collapsed .security-card { justify-content: center; padding: 10px 8px; }
  #app-view.sidebar-collapsed .logout-btn { justify-content: center; padding: 12px 0 0; }
  #app-view.sidebar-collapsed .logout-btn > span:first-child { margin-right: 0; font-size: 22px; }
}

@media (max-width: 800px) {
  .sidebar-toggle { display: none; }
}

#manager-view .manager-mobile-day { container-type: inline-size; }
#manager-view .manager-mobile-employee-row:not(.editing) { grid-template-columns: minmax(0, 1fr) minmax(105px, 42%); gap: clamp(4px, .55vw, 8px); }
#manager-view .manager-mobile-employee-row:not(.editing) .manager-mobile-schedule { align-self: start; justify-items: end; }
#manager-view .manager-mobile-employee-info strong,
#manager-view .manager-mobile-employee-info small { overflow-wrap: break-word; word-break: normal; }

@container (max-width: 190px) {
  #manager-view .manager-mobile-employee-row:not(.editing) { grid-template-columns: minmax(0, 1fr); }
  #manager-view .manager-mobile-employee-row:not(.editing) .manager-mobile-schedule { justify-items: start; }
}

@media (min-width: 801px) {
  #app-view.sidebar-collapsed .sidebar { background: linear-gradient(180deg, #123b57 0%, #0d5058 100%); border-right: 1px solid rgba(214, 240, 242, .1); box-shadow: none; }
  #app-view.sidebar-collapsed .sidebar-head { gap: 8px; }
  #app-view.sidebar-collapsed .sidebar-brand { width: 100%; }
  #app-view.sidebar-collapsed .brand-mark { width: 36px; height: 36px; border-radius: 12px; background: linear-gradient(145deg, #087d79, #116b74); box-shadow: 0 8px 18px rgba(3, 35, 53, .2); font-size: 11px; }
  #app-view.sidebar-collapsed .sidebar-toggle { width: 36px; height: 30px; min-height: 30px; border: 0; border-radius: 50%; background: transparent; color: #b8d1dc; }
  #app-view.sidebar-collapsed .sidebar-toggle:hover { background: rgba(255, 255, 255, .09); color: #fff; }
  #app-view.sidebar-collapsed .sidebar-toggle-icon { font-size: 28px; font-weight: 500; line-height: .8; }
  #app-view.sidebar-collapsed .side-nav { align-items: center; gap: 6px; margin-top: 24px; }
  #app-view.sidebar-collapsed .nav-item { width: 46px; min-height: 46px; padding: 0; border-radius: 14px; }
  #app-view.sidebar-collapsed .nav-item:hover { background: rgba(255, 255, 255, .09); color: #fff; }
  #app-view.sidebar-collapsed .nav-item.active { background: rgba(215, 249, 242, .17); color: #f1fffc; box-shadow: inset 0 0 0 1px rgba(215, 249, 242, .17); }
  #app-view.sidebar-collapsed .nav-item.active::before { content: ""; position: absolute; left: -8px; width: 3px; height: 22px; border-radius: 0 4px 4px 0; background: #9ae7dc; }
  #app-view.sidebar-collapsed .nav-icon { width: 23px; height: 23px; font-size: 0; }
  #app-view.sidebar-collapsed .nav-badge { top: 1px; right: 0; min-width: 15px; width: 15px; height: 15px; border-radius: 50%; background: #f9b52b; color: #5f4100; font-size: 8px; box-shadow: 0 2px 7px rgba(0, 0, 0, .16); }
  #app-view.sidebar-collapsed .sidebar-bottom { align-items: center; gap: 4px; }
  #app-view.sidebar-collapsed .test-mode-entry { width: 46px; min-height: 42px; justify-content: center; border: 0; padding: 0; background: rgba(250, 204, 21, .16); }
  #app-view.sidebar-collapsed .test-mode-entry-label { display: none; }
  #app-view.sidebar-collapsed .test-mode-entry-icon { flex-basis: 25px; width: 25px; height: 25px; }
  #app-view.sidebar-collapsed .security-card { width: 46px; height: 38px; justify-content: center; padding: 0; border: 0; background: transparent; }
  #app-view.sidebar-collapsed .security-card .status-dot { width: 7px; height: 7px; box-shadow: 0 0 0 4px rgba(72, 174, 114, .14); }
  #app-view.sidebar-collapsed .logout-btn { width: 46px; min-height: 42px; border-top: 0; padding: 0; text-align: center; color: #b8d1dc; }
  #app-view.sidebar-collapsed .logout-btn:hover { color: #fff; }
  #app-view.sidebar-collapsed .logout-btn > span:first-child { margin-right: 0; font-size: 0; }
  #app-view.sidebar-collapsed .logout-icon svg { width: 21px; height: 21px; }
  #app-view.sidebar-collapsed .sidebar-toggle-icon { width: 9px; height: 9px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; font-size: 0; transform: rotate(135deg); }
  #app-view.sidebar-collapsed .sidebar-toggle:hover .sidebar-toggle-icon { border-color: currentColor; }
  #app-view.sidebar-collapsed .sidebar-toggle[aria-expanded="false"] .sidebar-toggle-icon { transform: rotate(-45deg); }
}

.sidebar-toggle { border: 0; background: transparent; color: #789093; }
.sidebar-toggle:hover { border-color: transparent; background: #f1f7f6; color: var(--teal-dark); }
.sidebar-toggle-icon { width: 9px; height: 9px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; font-size: 0; transform: rotate(135deg); }
.sidebar-toggle[aria-expanded="false"] .sidebar-toggle-icon { transform: rotate(-45deg); }

#manager-view .manager-shift-slots { display: grid; grid-column: 1 / -1; gap: 6px; min-width: 0; }
#manager-view .manager-shift-slot { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 6px; min-width: 0; }
#manager-view .manager-shift-slot-label { color: #0f766e; font-size: 9px; font-weight: 900; white-space: nowrap; }
#manager-view .manager-shift-inputs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); gap: 6px; min-width: 0; }
#manager-view .manager-shift-slot .manager-inline-shift,
#manager-view .manager-shift-slot .manager-inline-custom { min-width: 0; }
#manager-view .manager-mobile-shift-lines { display: grid; gap: 4px; min-width: 0; }
#manager-view .manager-mobile-shift-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; gap: 5px; min-width: 0; }
#manager-view .manager-mobile-shift-line + .manager-mobile-shift-line { border-top: 1px solid rgba(15, 118, 110, .16); padding-top: 4px; }
#manager-view .manager-mobile-shift-line > span { color: currentColor; font-size: 8px; font-weight: 850; opacity: .7; white-space: nowrap; }
#manager-view .manager-mobile-shift-line strong { min-width: 0; overflow-wrap: anywhere; }
#manager-view .manager-mobile-shift-line small { justify-self: end; white-space: nowrap; }
#manager-view .manager-mobile-shift-total { border-top: 1px dashed rgba(15, 118, 110, .22); padding-top: 4px; font-weight: 900; }

/* ===== Mobile polish: scrim, safe-area, typography scale, touch targets ===== */
.sidebar-scrim { display: none; }
body.sidebar-locked { overflow: hidden; }
:where(button, a, input, select, textarea):focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 6px; }

@media (max-width: 800px) {
  .app-shell .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(9, 32, 46, .48); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); animation: scrim-in .18s ease; }
  .app-shell .sidebar-scrim[hidden] { display: none; }
  .app-shell .sidebar { z-index: 32; padding-top: calc(14px + env(safe-area-inset-top)); padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .app-shell .sidebar.open { box-shadow: 18px 0 44px rgba(8, 30, 44, .3); }
  .app-shell .topbar { position: sticky; top: 0; z-index: 20; height: auto; min-height: calc(58px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0; gap: 10px; box-shadow: 0 2px 14px rgba(16, 48, 70, .1); }
  .app-shell .test-mode-banner { align-items: flex-start; padding: 10px 12px; gap: 10px; }
  .app-shell .test-mode-banner span { max-width: 220px; line-height: 1.35; }
  .app-shell .test-mode-banner button { min-height: 38px; }
  .app-shell .topbar-title h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
  .app-shell .topbar-account { gap: 8px; }
  .app-shell .topbar-account .avatar { width: 34px; height: 34px; font-size: 11px; }
  .app-shell .topbar-account > div:not(.avatar) { display: none; }
  .app-shell .icon-btn, .app-shell .account-more { width: 44px; height: 44px; min-height: 44px; margin: 0; border-radius: 12px; font-size: 21px; }
  .app-shell .content-wrap { padding: 16px 12px calc(32px + env(safe-area-inset-bottom)); }
  .app-shell .nav-item { min-height: 46px; gap: 12px; padding: 11px 12px; border-radius: 12px; font-size: 13px; }
  .app-shell svg.nav-icon { width: 21px; height: 21px; }
  #app-view .month-arrow { width: 40px; height: 40px; min-height: 40px; border-radius: 10px; font-size: 22px; }
  #app-view .primary-btn, #app-view .secondary-btn { min-height: 44px; }
  #app-view .page-intro h1 { font-size: 21px; }
  #app-view .stat-card { min-height: 68px; padding: 10px 11px; }
  #app-view .stat-top { font-size: 10px; letter-spacing: .06em; }
  #app-view .stat-value { font-size: 20px; }
  #app-view .stat-icon { width: 24px; height: 24px; font-size: 11px; }
  #app-view .week-tab { min-width: 80px; min-height: 44px; padding: 7px 10px; }
  #app-view .week-tab-main { font-size: 12px; }
  #app-view .week-tab-range { font-size: 10px; }
  #app-view .filter-pill { min-height: 38px; padding: 8px 11px; font-size: 12px; }
  #app-view .day-name { font-size: 10px; }
  #app-view .shift-select { min-height: 40px; padding: 7px 6px; font-size: 12px; }
  #app-view .hours-row { font-size: 10px; }
  #app-view .entry-note { min-height: 34px; font-size: 11px; }
  #app-view .table-head p { font-size: 11px; }
  #app-view .table-scroll td::before { font-size: 10px; }
  #app-view .manager-mobile-employee-row .manager-inline-shift,
  #app-view .manager-mobile-employee-row .manager-inline-custom { min-height: 40px; font-size: 12px; }
  #app-view .manager-mobile-employee-row .manager-inline-note { min-height: 48px; font-size: 12px; }
  #app-view .manager-mobile-employee-row .manager-cell-save,
  #app-view .manager-mobile-employee-row .manager-cell-cancel { min-height: 40px; font-size: 12px; }
  #app-view .shared-mobile-day-head span { font-size: 10px; }
  #app-view .shared-mobile-day-head strong { font-size: 15px; }
  #app-view .shared-mobile-day-head small { font-size: 12px; }
  #app-view .shared-mobile-day-head b { padding: 5px 8px; font-size: 10px; }
  #app-view .shared-mobile-shift-head strong { font-size: 12px; }
  #app-view .shared-mobile-shift-head span { font-size: 10px; }
  #app-view .shared-mobile-people .shared-person { min-height: 32px; padding: 7px 8px; font-size: 11px; }
  #app-view .shared-mobile-empty { font-size: 11px; }
  #manager-view .manager-mobile-shift-line > span { font-size: 10px; }
  #app-view .table-card, #app-view .manager-calendar-card { overflow: hidden; }
  #app-view .payroll-view { min-height: 0; overflow: hidden; }
  .app-shell .payroll-frame { width: calc(100% + 24px); height: calc(100dvh - 58px); min-height: 0; margin: -16px -12px calc(-32px - env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
}

@keyframes scrim-in { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .app-shell .sidebar-scrim { animation: none; }
  .app-shell .sidebar { transition: none; }
}

@container (max-width: 190px) {
  #manager-view .manager-shift-inputs { grid-template-columns: 1fr; gap: 4px; }
  #manager-view .manager-shift-slot { align-items: start; }
  #manager-view .manager-mobile-shift-line { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 4px; }
  #manager-view .manager-mobile-shift-line > span { grid-column: 1 / -1; }
  #manager-view .manager-mobile-shift-line strong { grid-column: 1; }
  #manager-view .manager-mobile-shift-line small { grid-column: 2; }
}

.inventory-card { margin-top: 18px; }
.inventory-meta { display: flex; justify-content: space-between; gap: 16px; padding: 12px 14px; color: var(--muted); background: var(--surface-soft); }
.inventory-table { width: 100%; min-width: 900px; }
.inventory-table th, .inventory-table td { padding: 10px; }
.inventory-table input { width: 100%; min-height: 36px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; }
.inventory-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 16px; }
.inventory-manager-list { margin-top: 18px; }
.inventory-order-cell { min-width: 62px; white-space: nowrap; }
.inventory-order-number { display: inline-grid; place-items: center; min-width: 28px; min-height: 28px; color: #7d8b94; font-size: 13px; font-weight: 800; }
.inventory-order-btn, .inventory-quantity-btn { display: inline-grid; place-items: center; border: 1px solid var(--line); background: #fff; color: var(--primary); border-radius: 7px; font-weight: 900; cursor: pointer; }
.inventory-order-btn { width: 25px; height: 28px; margin-right: 4px; }
.inventory-quantity { display: grid; grid-template-columns: 32px minmax(56px, 1fr) 32px; align-items: center; min-width: 140px; }
.inventory-quantity-btn { width: 32px; height: 36px; font-size: 19px; }
.inventory-quantity input { min-width: 0; text-align: center; border-radius: 0; }
.inventory-order-btn:disabled, .inventory-quantity-btn:disabled { cursor: not-allowed; opacity: .42; }
.inventory-fixed-note { color: var(--muted); font-size: 12px; font-weight: 650; }
@media (max-width: 700px) { .inventory-actions { align-items: stretch; flex-direction: column; } .inventory-fixed-note { text-align: center; } }
@media (max-width: 700px) {
  #inventory-view .page-intro { display: block; margin-bottom: 12px; }
  #inventory-view .page-intro h1 { font-size: 22px; }
  #inventory-view .page-intro p { margin-top: 5px; }
  #inventory-view .manager-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 12px; }
  #inventory-view .manager-actions .month-control { min-width: 0; }
  #inventory-view .manager-actions .secondary-btn { min-height: 44px; padding: 8px 10px; }
  #inventory-view .month-input input { width: 100%; min-height: 44px; }
  #inventory-view .inventory-card { margin-top: 0; }
  #inventory-view .table-head { align-items: flex-start; gap: 8px; padding: 12px; }
  #inventory-view .table-head h3 { font-size: 16px; }
  #inventory-view .inventory-meta { display: grid; gap: 4px; padding: 10px 12px; font-size: 12px; }
  #inventory-view .inventory-table { display: block; min-width: 0; width: 100%; }
  #inventory-view .inventory-table thead { display: none; }
  #inventory-view .inventory-table tbody { display: grid; gap: 8px; padding: 8px; }
  #inventory-view #inventory-body tr { display: grid; grid-template-columns: minmax(0, 1fr) 78px; grid-template-rows: auto auto auto auto auto; gap: 4px 8px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: 0 2px 7px rgba(15, 54, 76, .06); }
  #inventory-view #inventory-body td { display: block; min-width: 0; padding: 0; border: 0; }
  #inventory-view #inventory-body td::before { display: block; color: var(--muted); font-size: 10px; font-weight: 750; line-height: 1.2; margin-bottom: 2px; }
  #inventory-view #inventory-body td:nth-child(1) { grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: right; }
  #inventory-view #inventory-body td:nth-child(2) { grid-column: 1; grid-row: 1; font-size: 14px; line-height: 1.3; }
  #inventory-view #inventory-body td:nth-child(2)::before { content: 'Tên hàng'; }
  #inventory-view #inventory-body td:nth-child(3) { grid-column: 1; grid-row: 2; font-size: 11px; }
  #inventory-view #inventory-body td:nth-child(3)::before { content: 'Quy cách'; }
  #inventory-view #inventory-body td:nth-child(4) { grid-column: 1; grid-row: 3; font-size: 11px; }
  #inventory-view #inventory-body td:nth-child(4)::before { content: 'Đơn vị'; }
  #inventory-view #inventory-body td:nth-child(5) { grid-column: 1 / -1; grid-row: 4; }
  #inventory-view #inventory-body td:nth-child(5)::before { content: 'Số lượng'; }
  #inventory-view #inventory-body td:nth-child(6) { grid-column: 1 / -1; grid-row: 5; }
  #inventory-view #inventory-body td:nth-child(6)::before { content: 'Ghi chú'; }
  #inventory-view #inventory-body td:nth-child(6) input { min-height: 40px; font-size: 13px; }
  #inventory-view .inventory-order-cell { min-width: 0; white-space: normal; }
  #inventory-view .inventory-order-btn { width: 34px; height: 34px; margin: 2px 0 2px 4px; font-size: 18px; }
  #inventory-view .inventory-quantity { grid-template-columns: 44px minmax(0, 1fr) 44px; max-width: 240px; }
  #inventory-view .inventory-quantity-btn { width: 44px; height: 42px; font-size: 24px; touch-action: manipulation; }
  #inventory-view .inventory-quantity input { min-height: 42px; font-size: 17px; font-weight: 800; }
  #inventory-view .inventory-actions { gap: 8px; padding: 10px 12px 12px; }
  #inventory-view .inventory-fixed-note { font-size: 11px; line-height: 1.35; }
  #inventory-view #inventory-submit { width: 100%; min-height: 46px; font-size: 14px; }
  #inventory-view #inventory-manager-list .table-scroll, #inventory-view #inventory-manager-detail .table-scroll { overflow-x: hidden; }
  #inventory-view #inventory-manager-list table:not(.inventory-table) { min-width: 0; display: block; }
  #inventory-view #inventory-manager-list table:not(.inventory-table) thead { display: none; }
  #inventory-view #inventory-manager-list table:not(.inventory-table) tbody { display: grid; gap: 8px; padding: 8px; }
  #inventory-view #inventory-manager-list table:not(.inventory-table) tr { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
  #inventory-view #inventory-manager-list table:not(.inventory-table) td { display: block; padding: 0; border: 0; }
  #inventory-view #inventory-manager-list table:not(.inventory-table) td::before { color: var(--muted); font-size: 10px; font-weight: 750; margin-right: 6px; }
  #inventory-view #inventory-manager-list table:not(.inventory-table) td:nth-child(1)::before { content: 'Ngày: '; }
  #inventory-view #inventory-manager-list table:not(.inventory-table) td:nth-child(2)::before { content: 'Nhân viên: '; }
  #inventory-view #inventory-manager-list table:not(.inventory-table) td:nth-child(3)::before { content: 'Trạng thái: '; }
  #inventory-view #inventory-manager-list table:not(.inventory-table) td:nth-child(4) { display: flex; flex-wrap: wrap; gap: 6px; }
  #inventory-view #inventory-manager-list table:not(.inventory-table) td:nth-child(4)::before { content: 'Thao tác: '; }
  #inventory-view #inventory-manager-detail .table-scroll { overflow-x: auto; }
}
@media (max-width: 700px) {
  #inventory-view #inventory-body tr { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr) 142px; grid-template-rows: auto auto auto; gap: 2px 8px; padding: 12px 10px 9px; border: 0; border-top: 1px solid #e8e8e8; border-radius: 0; box-shadow: none; }
  #inventory-view #inventory-body td::before { display: none; }
  #inventory-view #inventory-body td:nth-child(1) { grid-column: 1; grid-row: 2; align-self: end; text-align: left; }
  #inventory-view #inventory-body td:nth-child(2) { grid-column: 2; grid-row: 1; align-self: center; font-size: 19px; line-height: 1.15; color: #5f5f5f; overflow-wrap: anywhere; }
  #inventory-view #inventory-body td:nth-child(3) { grid-column: 2; grid-row: 2; align-self: center; font-size: 15px; color: #777; }
  #inventory-view #inventory-body td:nth-child(4) { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
  #inventory-view #inventory-body td:nth-child(5) { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
  #inventory-view #inventory-body td:nth-child(6) { grid-column: 1 / -1; grid-row: 3; margin-top: 5px; }
  #inventory-view #inventory-body td:nth-child(6) input { min-height: 34px; font-size: 12px; }
  #inventory-view #inventory-body td:nth-child(2) strong { font-weight: 500; }
  #inventory-view .inventory-unit-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 38px; padding: 0 6px; border-radius: 10px; background: #2da9dc; color: #fff; font-size: 17px; font-weight: 500; }
  #inventory-view .inventory-order-cell { display: flex !important; gap: 2px; align-items: center; }
  #inventory-view .inventory-order-btn { width: 23px; height: 23px; margin: 0; border: 0; background: transparent; color: #aaa; font-size: 14px; }
  #inventory-view .inventory-quantity { grid-template-columns: 50px 42px 50px; min-width: 142px; max-width: none; background: #f1efef; border-radius: 6px; padding: 5px; gap: 5px; }
  #inventory-view .inventory-quantity-btn { width: 50px; height: 40px; border: 0; border-radius: 3px; background: #fff; color: #666; font-size: 28px; line-height: 1; }
  #inventory-view .inventory-quantity input { width: 42px; min-height: 40px; padding: 0; border: 0; background: transparent; font-size: 20px; font-weight: 500; color: #222; }
}
/* Unified inventory item cards for desktop and mobile */
#inventory-view #inventory-body { display: grid; gap: 0; }
#inventory-view #inventory-body tr { display: grid; grid-template-columns: 72px minmax(0, 1fr) 180px; grid-template-rows: auto auto auto; gap: 3px 14px; align-items: center; padding: 14px 18px 12px; border: 0; border-top: 1px solid #e8e8e8; background: #fff; }
#inventory-view #inventory-body td { min-width: 0; padding: 0; border: 0; }
#inventory-view #inventory-body td::before { display: none; }
#inventory-view #inventory-body td:nth-child(1) { grid-column: 1; grid-row: 2; }
#inventory-view #inventory-body td:nth-child(2) { grid-column: 2; grid-row: 1; font-size: 20px; line-height: 1.2; color: #5f5f5f; }
#inventory-view #inventory-body td:nth-child(2) strong { font-weight: 500; }
#inventory-view #inventory-body td:nth-child(3) { grid-column: 2; grid-row: 2; font-size: 15px; color: #777; }
#inventory-view #inventory-body td:nth-child(4) { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
#inventory-view #inventory-body td:nth-child(5) { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
#inventory-view #inventory-body td:nth-child(6) { grid-column: 1 / -1; grid-row: 3; margin-top: 7px; }
#inventory-view #inventory-body td:nth-child(6) input { min-height: 38px; }
#inventory-view .inventory-unit-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 58px; min-height: 40px; padding: 0 8px; border-radius: 10px; background: #2da9dc; color: #fff; font-size: 17px; font-weight: 500; }
#inventory-view .inventory-order-cell { display: flex; gap: 2px; align-items: center; white-space: normal; }
#inventory-view .inventory-order-btn { width: 28px; height: 28px; margin: 0; border: 0; background: transparent; color: #aaa; font-size: 15px; }
#inventory-view .inventory-quantity { display: grid; grid-template-columns: 58px 52px 58px; min-width: 180px; align-items: center; gap: 6px; padding: 6px; background: #f1efef; border-radius: 6px; }
#inventory-view .inventory-quantity-btn { width: 58px; height: 42px; border: 0; border-radius: 3px; background: #fff; color: #666; font-size: 28px; line-height: 1; }
#inventory-view .inventory-quantity input { width: 52px; min-height: 42px; padding: 0; border: 0; background: transparent; text-align: center; font-size: 20px; font-weight: 500; color: #222; }
/* Refined inventory card styling */
#inventory-view #inventory-body tr { grid-template-columns: 58px minmax(0, 1fr) 156px; gap: 2px 12px; padding: 11px 16px 10px; }
#inventory-view #inventory-body td:nth-child(2) { font-size: 17px; color: #4f5b66; }
#inventory-view #inventory-body td:nth-child(3) { font-size: 13px; color: #87919b; }
#inventory-view #inventory-body td:nth-child(6) { margin-top: 5px; }
#inventory-view #inventory-body td:nth-child(6) input { min-height: 32px; border-color: #e6eaee; border-radius: 6px; font-size: 12px; background: #fbfcfd; }
#inventory-view .inventory-unit-badge { min-width: 46px; min-height: 30px; padding: 0 7px; border-radius: 7px; background: #35a9d7; font-size: 14px; }
#inventory-view .inventory-order-btn { width: 23px; height: 23px; color: #aab2ba; font-size: 13px; }
#inventory-view .inventory-quantity { grid-template-columns: 42px 38px 42px; min-width: 134px; gap: 4px; padding: 4px; background: #f3f4f5; border-radius: 7px; }
#inventory-view .inventory-quantity-btn { width: 42px; height: 34px; color: #66717b; font-size: 22px; }
#inventory-view .inventory-quantity input { width: 38px; min-height: 34px; font-size: 16px; }
@media (max-width: 700px) {
  #inventory-view #inventory-body tr { grid-template-columns: 45px minmax(0, 1fr) 128px; gap: 2px 7px; padding: 10px 9px 8px; }
  #inventory-view #inventory-body td:nth-child(2) { font-size: 16px; }
  #inventory-view #inventory-body td:nth-child(3) { font-size: 12px; }
  #inventory-view #inventory-body td:nth-child(6) input { min-height: 31px; font-size: 12px; }
  #inventory-view .inventory-unit-badge { min-width: 40px; min-height: 28px; border-radius: 6px; font-size: 13px; }
  #inventory-view .inventory-order-btn { width: 20px; height: 20px; font-size: 12px; }
  #inventory-view .inventory-quantity { grid-template-columns: 36px 32px 36px; min-width: 116px; gap: 3px; padding: 3px; }
  #inventory-view .inventory-quantity-btn { width: 36px; height: 32px; font-size: 20px; }
  #inventory-view .inventory-quantity input { width: 32px; min-height: 32px; font-size: 15px; }
}
/* Desktop inventory layout: compact five-zone item rows */
@media (min-width: 701px) {
  #inventory-view .page-intro { align-items: flex-end; margin-bottom: 14px; }
  #inventory-view .page-intro h1 { letter-spacing: -.03em; }
  #inventory-view .manager-actions { align-items: flex-end; }
  #inventory-view .inventory-card { margin-top: 0; overflow: hidden; }
  #inventory-view .inventory-card .table-head { padding: 14px 18px; border-bottom: 1px solid #edf0f2; }
  #inventory-view .inventory-meta { padding: 9px 18px; font-size: 12px; }
  #inventory-view .inventory-table { width: 100%; min-width: 0; border-collapse: separate; border-spacing: 0; }
  #inventory-view .inventory-table thead { display: none; }
  #inventory-view #inventory-body { display: grid; }
  #inventory-view #inventory-body tr { grid-template-columns: 52px 64px minmax(260px, 1fr) 148px minmax(170px, 240px); grid-template-rows: auto auto; gap: 2px 12px; min-height: 70px; padding: 11px 18px; border-top: 1px solid #edf0f2; transition: background .15s ease; }
  #inventory-view #inventory-body tr:hover { background: #f8fbfc; }
  #inventory-view #inventory-body td:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
  #inventory-view #inventory-body td:nth-child(2) { grid-column: 3; grid-row: 1; align-self: end; font-size: 16px; }
  #inventory-view #inventory-body td:nth-child(3) { grid-column: 3; grid-row: 2; align-self: start; font-size: 12px; }
  #inventory-view #inventory-body td:nth-child(4) { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  #inventory-view #inventory-body td:nth-child(5) { grid-column: 4; grid-row: 1 / span 2; align-self: center; }
  #inventory-view #inventory-body td:nth-child(6) { grid-column: 5; grid-row: 1 / span 2; align-self: center; margin-top: 0; }
  #inventory-view #inventory-body td:nth-child(6) input { min-height: 34px; }
  #inventory-view .inventory-actions { padding: 12px 18px 14px; border-top: 1px solid #edf0f2; }
  #inventory-view .inventory-fixed-note { margin-right: auto; }
  #inventory-view #inventory-manager-list, #inventory-view #inventory-manager-detail { overflow: hidden; }
  #inventory-view #inventory-manager-list .table-scroll, #inventory-view #inventory-manager-detail .table-scroll { overflow-x: auto; }
}

.employee-delete-card { width: min(100%, 500px); padding: 27px; }
.modal-kicker { display: block; margin-bottom: 8px; color: var(--teal); font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.employee-delete-card h3 { letter-spacing: -.03em; }
.employee-delete-card > .muted { margin-bottom: 19px; }
.delete-choice-list { display: grid; gap: 10px; margin-bottom: 13px; }
.delete-choice { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr) 20px; align-items: start; gap: 10px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: #fbfdfd; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.delete-choice:hover { border-color: #9bcac6; background: #f7fcfb; }
.delete-choice:has(input:checked) { border-color: #58a99f; background: #f0faf8; box-shadow: 0 0 0 3px rgba(13, 117, 106, .08); }
.delete-choice-danger:has(input:checked) { border-color: #d58b83; background: #fff7f6; box-shadow: 0 0 0 3px rgba(189, 102, 94, .08); }
.delete-choice input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--teal); }
.delete-choice-danger input { accent-color: #bd665e; }
.delete-choice-copy { display: grid; gap: 4px; min-width: 0; }
.delete-choice-copy strong { color: var(--ink); font-size: 12px; line-height: 1.35; }
.delete-choice-copy small { color: #718486; font-size: 10px; line-height: 1.45; }
.delete-choice-mark { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; color: #fff; background: var(--teal); font-size: 12px; font-weight: 900; opacity: 0; transform: scale(.7); transition: opacity .15s, transform .15s; }
.delete-choice-danger .delete-choice-mark { background: #bd665e; }
.delete-choice:has(input:checked) .delete-choice-mark { opacity: 1; transform: scale(1); }
.delete-modal-warning { margin: 0 0 16px; padding: 10px 12px; border: 1px solid #f0c8c3; border-radius: 9px; background: #fff3f1; color: #98504a; font-size: 11px; font-weight: 750; line-height: 1.45; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 2px; }
.danger-btn { min-height: 43px; border: 0; border-radius: 10px; padding: 0 16px; background: #bd665e; color: #fff; font-size: 11px; font-weight: 850; box-shadow: 0 8px 16px rgba(189, 102, 94, .18); transition: background .15s, transform .15s, box-shadow .15s; }
.danger-btn:hover { background: #a84f48; transform: translateY(-1px); box-shadow: 0 10px 20px rgba(189, 102, 94, .23); }
.danger-btn:focus-visible { outline: 2px solid #bd665e; outline-offset: 3px; }

@media (max-width: 560px) {
  .employee-delete-card { padding: 21px 17px 17px; }
  .delete-choice { grid-template-columns: 20px minmax(0, 1fr) 18px; padding: 12px; }
  .delete-choice-copy strong { font-size: 13px; }
  .delete-choice-copy small { font-size: 11px; }
  .modal-actions { display: grid; grid-template-columns: 1fr 1.35fr; }
  .modal-actions .secondary-btn, .modal-actions .danger-btn { width: 100%; min-height: 44px; }
}

/* Manager view: keep the product order while putting the two useful values first. */
#inventory-view #inventory-manager-detail .inventory-manager-detail-table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
#inventory-view #inventory-manager-detail .inventory-manager-detail-table thead { display: none; }
#inventory-view #inventory-manager-detail .inventory-manager-detail-table tbody { display: grid; }
#inventory-view #inventory-manager-detail .inventory-manager-item-row { display: grid; grid-template-columns: minmax(280px, 1.55fr) minmax(150px, .55fr) minmax(280px, 1fr); min-height: 82px; border-top: 1px solid #e5edf0; }
#inventory-view #inventory-manager-detail .inventory-manager-item-row:first-child { border-top: 0; }
#inventory-view #inventory-manager-detail .inventory-manager-item-row > td { min-width: 0; min-height: 82px; padding: 15px 20px; border: 0; display: flex; align-items: center; }
#inventory-view #inventory-manager-detail .inventory-manager-product { background: #fff; }
#inventory-view #inventory-manager-detail .inventory-manager-product strong { color: #203746; font-size: 18px; line-height: 1.3; font-weight: 750; overflow-wrap: anywhere; }
#inventory-view #inventory-manager-detail .inventory-manager-quantity { justify-content: center; flex-direction: column; gap: 5px; background: #eef9f6; border-left: 1px solid #d9eee8; border-right: 1px solid #d9eee8; }
#inventory-view #inventory-manager-detail .inventory-manager-quantity-label, #inventory-view #inventory-manager-detail .inventory-manager-note-label { display: block; color: #54736f; font-size: 10px; font-weight: 800; line-height: 1.2; letter-spacing: .08em; text-transform: uppercase; }
#inventory-view #inventory-manager-detail .inventory-manager-quantity-value { color: #087568; font-size: 32px; line-height: 1; font-weight: 900; }
#inventory-view #inventory-manager-detail .inventory-manager-note { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; color: #634f16; background: #fffaf0; box-shadow: inset 3px 0 #ead58b; line-height: 1.3; overflow-wrap: anywhere; }
#inventory-view #inventory-manager-detail .inventory-manager-note-label { color: #947423; }
#inventory-view #inventory-manager-detail .inventory-manager-note strong { display: block; color: #4b3d13; font-size: 18px; font-weight: 750; }
#inventory-view #inventory-manager-detail .inventory-manager-empty-note { display: block; color: #9c8954; font-size: 15px; font-weight: 650; }

/* Inventory visual system: quieter surfaces and a clearer information hierarchy. */
#inventory-view .inventory-manager-list { margin-top: 14px; border-radius: 12px; }
#inventory-view #inventory-manager-detail .table-head { padding: 16px 18px; background: #f8fbfd; }
#inventory-view #inventory-manager-detail .inventory-manager-detail-table tbody { gap: 0; padding: 0; }
#inventory-view #inventory-manager-detail .inventory-manager-item-row { grid-template-columns: minmax(280px, 1.5fr) minmax(145px, .55fr) minmax(260px, 1fr); min-height: 76px; }
#inventory-view #inventory-manager-detail .inventory-manager-item-row > td { min-height: 76px; padding: 13px 18px; }
#inventory-view #inventory-manager-detail .inventory-manager-product strong { color: #284252; font-size: 17px; }
#inventory-view #inventory-manager-detail .inventory-manager-quantity { background: #f1faf7; border-left-color: #dcefe9; border-right-color: #dcefe9; }
#inventory-view #inventory-manager-detail .inventory-manager-quantity-value { font-size: 30px; }
#inventory-view #inventory-manager-detail .inventory-manager-note { background: #fffdf6; box-shadow: inset 3px 0 #e8d48a; }

@media (max-width: 700px) {
  #inventory-view #inventory-manager-detail .table-scroll { overflow-x: hidden; }
  #inventory-view #inventory-manager-detail .inventory-manager-detail-table { display: block; }
  #inventory-view #inventory-manager-detail .inventory-manager-detail-table tbody { gap: 8px; padding: 8px; }
  #inventory-view #inventory-manager-detail .inventory-manager-item-row { grid-template-columns: minmax(0, 1fr) 118px; min-height: 0; border: 1px solid #e4eaed; border-radius: 8px; overflow: hidden; background: #fff; }
  #inventory-view #inventory-manager-detail .inventory-manager-item-row > td { min-height: 0; padding: 13px 12px; }
  #inventory-view #inventory-manager-detail .inventory-manager-product { align-items: flex-start; }
  #inventory-view #inventory-manager-detail .inventory-manager-product strong { font-size: 17px; line-height: 1.3; }
  #inventory-view #inventory-manager-detail .inventory-manager-quantity { align-items: center; padding: 10px 6px; }
  #inventory-view #inventory-manager-detail .inventory-manager-quantity-value { font-size: 29px; }
  #inventory-view #inventory-manager-detail .inventory-manager-note { grid-column: 1 / -1; min-height: 64px; padding: 12px; border-top: 1px solid #f1e5b8; box-shadow: inset 0 3px #ead58b; gap: 5px; }
  #inventory-view #inventory-manager-detail .inventory-manager-note strong { font-size: 17px; }
  #inventory-view #inventory-manager-detail .inventory-manager-empty-note { font-size: 14px; }
}

/* Phone layout: keep every inventory action reachable without horizontal scrolling. */
@media (max-width: 700px) {
  #inventory-view .manager-actions { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 14px; }
  #inventory-view .manager-actions .month-control,
  #inventory-view .manager-actions .secondary-btn { width: 100%; }
  #inventory-view .month-control label { margin-bottom: 5px; font-size: 10px; }
  #inventory-view .month-input { min-height: 44px; border-radius: 10px; padding: 0 4px; }
  #inventory-view .month-input input { min-height: 42px; font-size: 14px; }
  #inventory-view .month-arrow { width: 40px; min-width: 40px; height: 40px; font-size: 25px; touch-action: manipulation; }
  #inventory-view .manager-actions .secondary-btn { min-height: 44px; padding: 0 12px; }
  #inventory-view .page-intro h1 { font-size: 23px; line-height: 1.15; }
  #inventory-view .page-intro p { color: #6d7e8a; font-size: 12px; line-height: 1.45; }

  #inventory-view #inventory-body tr { grid-template-columns: 34px minmax(0, 1fr) 112px; gap: 3px 7px; padding: 11px 9px 9px; }
  #inventory-view #inventory-body td:nth-child(2) { font-size: 16px; line-height: 1.25; }
  #inventory-view #inventory-body td:nth-child(3) { font-size: 12px; line-height: 1.25; }
  #inventory-view #inventory-body td:nth-child(6) { margin-top: 6px; }
  #inventory-view #inventory-body td:nth-child(6) input { min-height: 38px; padding: 7px 8px; font-size: 13px; }
  #inventory-view .inventory-unit-badge { min-width: 40px; min-height: 30px; font-size: 13px; }
  #inventory-view .inventory-quantity { grid-template-columns: 34px 32px 34px; min-width: 108px; gap: 3px; padding: 3px; }
  #inventory-view .inventory-quantity-btn { width: 34px; height: 36px; font-size: 21px; touch-action: manipulation; }
  #inventory-view .inventory-quantity input { width: 32px; min-height: 36px; font-size: 16px; }

  #inventory-view #inventory-manager-list,
  #inventory-view #inventory-manager-detail { margin-top: 12px; border-radius: 10px; }
  #inventory-view #inventory-manager-list .table-head,
  #inventory-view #inventory-manager-detail .table-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 13px 14px; }
  #inventory-view #inventory-manager-list .table-head h3,
  #inventory-view #inventory-manager-detail .table-head h3 { font-size: 16px; line-height: 1.25; }
  #inventory-view #inventory-manager-detail .table-head .secondary-btn { width: 100%; min-height: 42px; }

  #inventory-view #inventory-manager-list table:not(.inventory-table) tbody { gap: 7px; padding: 7px; }
  #inventory-view #inventory-manager-list table:not(.inventory-table) tr { gap: 6px; padding: 12px; border: 1px solid #dfe8ed; border-radius: 9px; background: #fff; box-shadow: 0 3px 10px rgba(24, 60, 88, .05); }
  #inventory-view #inventory-manager-list table:not(.inventory-table) td { line-height: 1.35; }
  #inventory-view #inventory-manager-list table:not(.inventory-table) td:nth-child(1) { color: #607784; font-size: 12px; }
  #inventory-view #inventory-manager-list table:not(.inventory-table) td:nth-child(2) { color: #203746; font-size: 15px; font-weight: 750; }
  #inventory-view #inventory-manager-list table:not(.inventory-table) td:nth-child(3) { font-size: 12px; }
  #inventory-view #inventory-manager-list table:not(.inventory-table) td:nth-child(4) { align-items: stretch; gap: 7px; padding-top: 8px; border-top: 1px solid #edf2f4; }
  #inventory-view #inventory-manager-list table:not(.inventory-table) td:nth-child(4)::before { flex-basis: 100%; margin-right: 0; }
  #inventory-view #inventory-manager-list .row-action,
  #inventory-view #inventory-manager-list .danger-text-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 10px; border: 1px solid #d8e8e5; border-radius: 7px; background: #f7fbfa; font-size: 11px; line-height: 1.1; touch-action: manipulation; }
  #inventory-view #inventory-manager-list .danger-text-btn { border-color: #f0d8d6; background: #fff8f7; }

  #inventory-view #inventory-manager-detail .table-scroll { overflow: hidden; }
  #inventory-view #inventory-manager-detail .inventory-manager-detail-table { width: 100%; }
  #inventory-view #inventory-manager-detail .inventory-manager-detail-table tbody { gap: 7px; padding: 7px; }
  #inventory-view #inventory-manager-detail .inventory-manager-item-row { grid-template-columns: minmax(0, 1fr) 96px; border-radius: 9px; }
  #inventory-view #inventory-manager-detail .inventory-manager-item-row > td { padding: 12px 11px; }
  #inventory-view #inventory-manager-detail .inventory-manager-product strong { font-size: 16px; line-height: 1.3; }
  #inventory-view #inventory-manager-detail .inventory-manager-quantity { min-height: 70px; padding: 9px 5px; }
  #inventory-view #inventory-manager-detail .inventory-manager-quantity-label,
  #inventory-view #inventory-manager-detail .inventory-manager-note-label { font-size: 9px; letter-spacing: .05em; }
  #inventory-view #inventory-manager-detail .inventory-manager-quantity-value { font-size: 28px; }
  #inventory-view #inventory-manager-detail .inventory-manager-note { min-height: 60px; padding: 11px; gap: 4px; }
  #inventory-view #inventory-manager-detail .inventory-manager-note strong { font-size: 16px; line-height: 1.35; }
}

@media (max-width: 360px) {
  #inventory-view #inventory-body tr { grid-template-columns: 30px minmax(0, 1fr) 106px; column-gap: 5px; }
  #inventory-view #inventory-body td:nth-child(2) { font-size: 15px; }
  #inventory-view .inventory-quantity { grid-template-columns: 32px 30px 32px; min-width: 102px; }
  #inventory-view .inventory-quantity-btn { width: 32px; }
  #inventory-view .inventory-quantity input { width: 30px; }
  #inventory-view #inventory-manager-detail .inventory-manager-item-row { grid-template-columns: minmax(0, 1fr) 88px; }
  #inventory-view #inventory-manager-detail .inventory-manager-product strong { font-size: 15px; }
  #inventory-view #inventory-manager-detail .inventory-manager-quantity-value { font-size: 26px; }
}

/* ===== H556 visual system: calm schedule surfaces and consistent admin tools ===== */
:root {
  --ink: #203b4b;
  --ink-strong: #173447;
  --muted: #6d8490;
  --faint: #9aadb6;
  --line: #d6e4e9;
  --line-strong: #c3d6de;
  --paper: #ffffff;
  --surface-soft: #f4f9fb;
  --canvas: #edf4f7;
  --teal: #0d8179;
  --teal-dark: #0a5f62;
  --teal-soft: #dff2ef;
  --navy: #28556b;
  --blue-soft: #e7f3f8;
  --orange: #c9862b;
  --orange-soft: #fff4df;
  --red: #bf5965;
  --red-soft: #fff0f2;
  --shadow-soft: 0 10px 24px rgba(44, 83, 101, .07);
  --shadow-card: 0 16px 34px rgba(44, 83, 101, .09);
}

html, body { background: var(--canvas); color: var(--ink); }
body.app-booting { background: var(--canvas); }
button, input, select, textarea { color: inherit; }

/* App shell */
.app-shell { grid-template-columns: 226px minmax(0, 1fr); }
.sidebar { padding: 20px 14px 16px; background: linear-gradient(180deg, #194b63 0%, #0e6b6d 100%); border-right: 0; box-shadow: 10px 0 30px rgba(20, 62, 79, .12); }
.sidebar-head { gap: 8px; }
.sidebar-brand { gap: 10px; padding: 0 9px; }
.sidebar-brand strong { color: #fff; font-size: 15px; letter-spacing: -.025em; }
.sidebar-brand small { color: #c7dde3; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(145deg, #0f9184, #186a80); box-shadow: 0 8px 18px rgba(4, 44, 61, .22); }
.side-nav { gap: 5px; margin-top: 38px; }
.nav-item { min-height: 43px; gap: 11px; border-radius: 11px; padding: 10px 11px; color: #c9dde4; font-size: 12px; }
.nav-item:hover { background: rgba(255, 255, 255, .11); color: #fff; }
.nav-item.active { background: #dff4f0; color: #075c5a; box-shadow: 0 8px 18px rgba(7, 46, 59, .16); }
.nav-icon { width: 19px; height: 19px; }
.nav-badge { background: #f6c54a; color: #664a05; }
.sidebar-toggle { color: #c6dce2; }
.sidebar-toggle:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.sidebar-bottom { gap: 12px; }
.test-mode-entry { min-height: 43px; border-color: rgba(246, 197, 74, .55); border-radius: 11px; background: #fff0ae; color: #765409; }
.test-mode-entry:hover { background: #ffe58b; }
.security-card { border: 1px solid rgba(255, 255, 255, .15); border-radius: 11px; background: rgba(255, 255, 255, .1); color: #fff; }
.security-card small { color: #c5e0e4; }
.logout-btn { border-top-color: rgba(255, 255, 255, .18); color: #cae0e4; }
.logout-btn:hover { color: #fff; }

.topbar { height: 72px; padding: 0 36px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .96); box-shadow: 0 3px 14px rgba(45, 76, 93, .04); }
.topbar-title h2 { margin: 0; color: var(--ink-strong); font-size: 15px; }
.topbar-account strong { color: var(--ink-strong); font-size: 12px; }
.topbar-account small { color: var(--muted); }
.avatar { background: #dceff4; color: var(--navy); }
.content-wrap { max-width: 1480px; padding: 34px 36px 60px; }
.view-panel { animation: h556-view-in .18s ease-out; }
@keyframes h556-view-in { from { opacity: .72; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }

/* Shared title and control language */
.page-intro { align-items: center; gap: 24px; margin-bottom: 24px; }
.page-intro h1 { color: var(--ink-strong); font-size: 30px; letter-spacing: -.045em; }
.page-intro > div > .muted, .page-intro p { color: var(--muted); font-size: 12px; line-height: 1.5; }
.manager-intro { align-items: center; }
.month-control { min-width: 188px; }
.month-control label { margin-bottom: 7px; color: #7f969f; font-size: 9px; letter-spacing: .1em; }
.month-input { min-height: 42px; border-color: var(--line-strong); border-radius: 10px; background: var(--paper); box-shadow: 0 3px 9px rgba(41, 76, 92, .04); }
.month-input input { min-width: 126px; color: var(--ink-strong); font-size: 12px; }
.month-arrow { width: 30px; height: 36px; color: #7b969f; border-radius: 8px; }
.month-arrow:hover { background: var(--teal-soft); color: var(--teal-dark); }
.manager-actions { gap: 9px; }
.primary-btn, .secondary-btn { min-height: 42px; border-radius: 10px; padding: 0 15px; font-size: 11px; }
.primary-btn { background: var(--teal); box-shadow: 0 8px 16px rgba(13, 129, 121, .18); }
.primary-btn:hover { background: var(--teal-dark); }
.secondary-btn { border: 1px solid var(--line-strong); background: #f7fbfc; color: var(--navy); }
.secondary-btn:hover { border-color: #9bcac6; background: var(--teal-soft); }

/* Cards, metrics, tabs */
.table-card, .stat-card { border-color: var(--line); border-radius: 14px; box-shadow: var(--shadow-card); }
.table-head { padding: 17px 20px; border-bottom-color: var(--line); background: linear-gradient(100deg, #fbfdfe 0%, #f2f8fa 100%); }
.table-head h3, .section-heading h3 { color: var(--ink-strong); font-size: 17px; letter-spacing: -.03em; }
.table-head p { color: var(--muted); font-size: 10px; }
.stats-grid { gap: 12px; margin-bottom: 28px; }
.stat-card { min-height: 94px; padding: 15px 17px; border-top: 3px solid var(--teal); }
.stat-card:nth-child(2) { border-top-color: #d69a3c; }
.stat-card:nth-child(3) { border-top-color: #679db7; }
.stat-card:nth-child(4) { border-top-color: #c96d78; }
.stat-top { color: var(--muted); font-size: 10px; }
.stat-value { margin-top: 13px; color: var(--ink-strong); font-size: 25px; }
.stat-icon { width: 29px; height: 29px; border-radius: 9px; }
.stat-icon.teal { background: var(--teal-soft); color: var(--teal); }
.stat-icon.orange { background: var(--orange-soft); color: var(--orange); }
.stat-icon.blue { background: var(--blue-soft); color: #4d7e98; }
.stat-icon.red { background: var(--red-soft); color: var(--red); }
.week-tabs { gap: 5px; margin-bottom: 13px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: #e6f0f3; }
.week-tab { min-width: 92px; min-height: 43px; border-radius: 8px; padding: 8px 11px; color: #78909b; }
.week-tab:hover { color: var(--teal-dark); background: #fff; }
.week-tab.active { background: var(--teal); color: #fff; box-shadow: 0 6px 13px rgba(13, 129, 121, .18); }
.week-tab-main { font-size: 11px; }
.week-tab-range { color: #829aa4; font-size: 9px; }
.week-tab.active .week-tab-range { color: rgba(255, 255, 255, .84); }

/* Employee daily schedule */
.attendance-calendar { gap: 9px; }
.day-card { min-height: 167px; padding: 13px; border-color: var(--line); border-radius: 12px; box-shadow: 0 7px 15px rgba(44, 83, 101, .05); }
.day-card:hover { border-color: #a9d2ce; box-shadow: 0 9px 18px rgba(13, 129, 121, .1); }
.day-card.weekend { background: #fbfafb; }
.day-card.today { border: 2px solid #6aabb9; background: #f4fbfd; box-shadow: 0 0 0 4px rgba(102, 171, 185, .13), 0 9px 20px rgba(44, 83, 101, .08); }
.day-card.locked { background: #f3f7f8; }
.day-week-label { border-color: #d0dee3; border-radius: 6px; background: #edf3f5; color: #647a85 !important; }
.day-name { color: var(--teal-dark); }
.day-number strong { color: var(--ink-strong); }
.today-label { border-radius: 999px; padding: 4px 7px; background: #d9edf2; color: #397489; }
.shift-select { border-color: var(--line-strong); border-radius: 8px; background: #fbfdfe; color: var(--navy); }
.shift-select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13, 129, 121, .1); }
.shift-select:disabled { background: #edf3f5; color: #8498a1; }
.entry-preview { border-radius: 8px; }
.entry-note { border-color: #b8cbd3; border-radius: 8px; background: #fcfeff; }
.entry-note:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13, 129, 121, .1); }
.manager-note { border-color: #b6dcd5; background: #edf9f6; color: #256a63; }
.status-strip.filled { color: var(--teal); }
.submit-bar { margin-top: 18px; }
.submit-bar .primary-btn { min-width: 148px; }
.review-note { border-color: #efd5ad; background: #fff8ec; color: #89601c; }

/* Shared calendar: closest to the reference export */
.shared-calendar-card, #manager-view .manager-calendar-card { border-top: 3px solid var(--teal); }
.shared-calendar-card .table-head, #manager-view .manager-calendar-card .table-head { background: linear-gradient(100deg, #fbfdfe, #f0f8f8); }
.shared-calendar { padding: 0 20px 20px; }
.shared-week-block + .shared-week-block { margin-top: 16px; }
.shared-week-title { margin-bottom: 9px; color: var(--muted); }
.shared-week-title strong, .manager-week-title strong { color: var(--navy); font-size: 14px; }
.shared-calendar-scroll { border-color: var(--line-strong); border-radius: 13px; box-shadow: 0 5px 14px rgba(44, 83, 101, .04); }
.shared-calendar-grid { min-width: 820px; }
.shared-calendar-header { background: #e9f1f4; }
.shared-shift-head { background: #e9f1f4; border-right-color: var(--line-strong); color: var(--navy); }
.shared-calendar-day-head { min-height: 68px; border-left-color: var(--line); }
.shared-calendar-day-head span { border: 0; background: transparent; color: #718994 !important; }
.shared-calendar-day-head strong { color: var(--teal-dark); font-size: 11px; }
.shared-calendar-day-head small { color: var(--ink-strong); }
.shared-calendar-day-head.weekend { background: #fbf8fa; }
.shared-calendar-day-head.today { border: 0; background: #dceff4; }
.shared-calendar-row { border-top-color: var(--line); }
.shared-shift-label { border-right-color: var(--line); }
.shared-shift-label strong { color: var(--ink-strong); }
.shared-calendar-cell { min-height: 77px; border-left-color: #e4edf0; }
.shared-calendar-cell.weekend { background: #fdfafb; }
.shared-calendar-cell.today { background: #f0f9fb; box-shadow: inset 0 0 0 1px #c6e3e9; }
.shared-calendar-cell.empty { color: #aabac0; }
.shared-person { border: 1px solid currentColor; border-radius: 8px; padding: 6px 5px; font-size: 9px; }
.shared-person.self { box-shadow: inset 0 0 0 1px currentColor; }

/* Manager day cards and controls */
#manager-view { margin-top: 0; }
#manager-view .page-intro { margin-bottom: 24px; }
#manager-view .manager-mobile-day { border-color: var(--line); border-radius: 13px; background: #fff; box-shadow: 0 7px 16px rgba(44, 83, 101, .06); }
#manager-view .manager-mobile-day:hover { border-color: #aacfd2; box-shadow: 0 10px 20px rgba(44, 83, 101, .1); }
#manager-view .manager-mobile-day.today { border-color: #6aabb9; box-shadow: 0 0 0 3px rgba(102, 171, 185, .13), 0 10px 21px rgba(44, 83, 101, .08); }
#manager-view .manager-mobile-day-head { padding: 12px 13px 11px; background: linear-gradient(135deg, #edf7f8, #fbfdfe); }
#manager-view .manager-mobile-day.weekend .manager-mobile-day-head { background: #fbf8fa; }
#manager-view .manager-mobile-day.today .manager-mobile-day-head { background: #e1f1f5; }
#manager-view .manager-mobile-day-head span { border-color: #d0dee3; background: #edf3f5; color: #647a85 !important; }
#manager-view .manager-mobile-day-head strong { color: var(--teal-dark); }
#manager-view .manager-mobile-day-head small { color: var(--ink-strong); }
#manager-view .manager-mobile-day-counts b { border-color: transparent; }
#manager-view .manager-mobile-day-counts .pending { border-color: #f0d7a6; background: #fff5e3; color: #9a641a; }
#manager-view .manager-mobile-day-counts .scheduled { border-color: #b7ddc8; background: #ecf9f0; color: #277355; }
#manager-view .manager-mobile-day-counts .empty { border-color: #d5e1e6; background: #f0f5f7; color: #6f8490; }
#manager-view .manager-mobile-employee-row { border-top-color: #e6eef1; }
#manager-view .manager-mobile-employee-row.submitted { background: #fffaf1; box-shadow: inset 3px 0 #dfa13d; }
#manager-view .manager-mobile-employee-row.approved { background: #f6fcf8; }
#manager-view .manager-mobile-employee-row.rejected { background: #fff6f7; box-shadow: inset 3px 0 #cd6a76; }
#manager-view .manager-mobile-employee-info strong { color: var(--ink-strong); }
#manager-view .manager-mobile-employee-info small { color: var(--muted); }
#manager-view .manager-mobile-shift { border-color: #b9dcd6; background: #eef9f7; color: #176961; box-shadow: inset 3px 0 rgba(13, 129, 121, .12); }
#manager-view .manager-mobile-shift:hover { border-color: var(--teal); background: #e3f5f1; }
#manager-view .manager-mobile-shift.empty { border-color: #c6d7de; background: #f8fbfc; color: #66808b; }
#manager-view .manager-mobile-shift.submitted { border-color: #efc77d; background: #fff6e5; color: #95601a; }
#manager-view .manager-mobile-shift.approved { border-color: #b5ddc3; background: #edf9f1; color: #277355; }
#manager-view .manager-mobile-shift.rejected { border-color: #eab2ba; background: #fff1f3; color: #ad4c5b; }
#manager-view .manager-mobile-approve { border-color: #efc77d; background: #fff8e9; color: #93601b; }

.manager-toolbar, .employee-toolbar { margin-bottom: 15px; }
.filter-pills { gap: 5px; }
.filter-pill { border-radius: 999px; padding: 8px 11px; color: #7b919b; }
.filter-pill.active { border-color: var(--line); background: #fff; color: var(--teal-dark); box-shadow: 0 3px 9px rgba(44, 83, 101, .05); }
.search-field { width: 230px; border-color: var(--line-strong); border-radius: 10px; background: #fff; }
.search-field input { color: var(--ink); }

/* Tables, imports, inventory and audit */
table { min-width: 720px; }
th { padding: 12px 18px; color: #7d949e; background: #f3f8fa; font-size: 9px; }
td { padding: 14px 18px; border-top-color: #e5eef1; color: #607984; }
tr:hover td { background: #fbfdfe; }
.employee-cell strong { color: var(--ink-strong); }
.employee-cell small, .table-subtext { color: #8499a2; }
.status-badge, .employee-status { border-radius: 999px; }
.status-badge.submitted { color: #996018; background: #fff1d2; }
.status-badge.approved, .employee-status.active { color: #277355; background: #e8f7ed; }
.status-badge.rejected { color: #ad4c5b; background: #fff0f2; }
.status-badge.draft, .status-badge.not_started, .employee-status.inactive { color: #6f8490; background: #eef3f5; }
.row-action { color: var(--teal-dark); }
.row-action:hover { color: #396f8a; }
.employee-actions { gap: 14px; }
.danger-text-btn { color: #b45560; }
.restore-btn { color: var(--teal-dark); }
.employee-form-card { border-top: 3px solid var(--teal); }
.employee-form { padding: 20px; }
.employee-form input, .stack-form input, .inline-form input { border-color: var(--line-strong); background: #fcfeff; }
.import-card { margin-top: 15px; }
.import-controls { padding: 15px 20px; border-bottom-color: var(--line); background: #fbfdfe; }
.file-picker { border-color: #a8d2cd; border-radius: 10px; background: #f3fbf9; color: var(--teal-dark); }
.file-picker:hover { background: var(--teal-soft); }
.import-preview { padding: 18px 20px; }
.import-preview-table { border-color: var(--line); border-radius: 10px; }
.import-warning { border-color: #efd29f; border-radius: 10px; background: #fff8e9; color: #8d611f; }
.import-status { border-radius: 999px; }
.audit-card { border-top-color: #c18c3b; }
.audit-action { border: 1px solid #d7d9f0; background: #f0f0fc; color: #625c9c; }
.inventory-card, #inventory-view .inventory-manager-list { border-top: 3px solid var(--teal); }
#inventory-view .inventory-meta { background: #f3f9f9; color: var(--muted); }
#inventory-view .inventory-actions { border-top-color: var(--line); }
#inventory-view .inventory-fixed-note { color: var(--muted); }
#inventory-view #inventory-manager-detail .inventory-manager-quantity { background: #eaf7f4; border-left-color: #c6e5df; border-right-color: #c6e5df; }
#inventory-view #inventory-manager-detail .inventory-manager-quantity-value { color: var(--teal-dark); }
#inventory-view #inventory-manager-detail .inventory-manager-note { background: #fffaf0; box-shadow: inset 3px 0 #e2c979; }

/* Payroll keeps its own document styles; the frame should still belong to this shell. */
.payroll-view { min-height: calc(100vh - 72px); }
.payroll-frame { width: calc(100% + 72px); height: calc(100vh - 12px); margin: -34px -36px -60px; background: var(--canvas); }
#app-view .topbar { height: 72px; }
#app-view .payroll-frame { width: calc(100% + 72px); height: calc(100vh - 72px); min-height: 720px; margin: -34px -36px -60px; }

/* Mobile: keep the same hierarchy while making each action easy to reach. */
@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 198px minmax(0, 1fr); }
  .topbar { padding: 0 26px; }
  .content-wrap { padding: 28px 26px 48px; }
  .attendance-calendar { grid-template-columns: repeat(5, minmax(120px, 1fr)); }
  .shared-calendar-grid { min-width: 760px; }
  .payroll-frame { width: calc(100% + 52px); margin: -28px -26px -48px; }
}

@media (max-width: 800px) {
  #app-view .topbar { height: auto; min-height: calc(62px + env(safe-area-inset-top)); }
  .app-shell { display: block; }
  .sidebar { width: 236px; left: -250px; padding: calc(16px + env(safe-area-inset-top)) 13px calc(16px + env(safe-area-inset-bottom)); }
  .sidebar.open { left: 0; }
  .topbar { min-height: calc(62px + env(safe-area-inset-top)); height: auto; padding: env(safe-area-inset-top) 13px 0; }
  .topbar-title h2 { font-size: 15px; }
  .content-wrap { padding: 18px 13px calc(36px + env(safe-area-inset-bottom)); }
  .page-intro, .manager-intro { align-items: stretch; gap: 13px; margin-bottom: 17px; }
  .page-intro h1 { font-size: 25px; }
  .page-intro > div > .muted, .page-intro p { font-size: 11px; }
  .manager-actions { gap: 8px; }
  .manager-actions .month-control, .manager-actions .secondary-btn { width: 100%; }
  .month-control { width: 100%; min-width: 0; }
  .month-input { min-height: 44px; }
  .month-input input { min-height: 42px; flex: 1; font-size: 13px; }
  .month-arrow { width: 40px; height: 40px; min-height: 40px; font-size: 24px; }
  .primary-btn, .secondary-btn { min-height: 44px; }
  .stats-grid { gap: 8px; margin-bottom: 20px; }
  .stat-card { min-height: 82px; padding: 12px 13px; }
  .stat-top { font-size: 10px; }
  .stat-value { margin-top: 9px; font-size: 23px; }
  .section-heading h3, .table-head h3 { font-size: 17px; }
  .week-tabs { margin-right: -13px; padding-right: 13px; }
  .week-tab { min-width: 92px; min-height: 44px; }
  .attendance-calendar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .day-card { min-height: 160px; padding: 11px; }
  .day-name { font-size: 10px; }
  .day-number strong { font-size: 20px; }
  .shift-select { min-height: 40px; font-size: 11px; }
  .entry-note { min-height: 54px; font-size: 11px; }
  #app-view .submit-bar { position: static; z-index: auto; display: flex; align-items: center; justify-content: flex-end; margin-top: 15px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .96); box-shadow: 0 8px 20px rgba(44, 83, 101, .12); backdrop-filter: blur(8px); }
  #app-view .submit-bar .primary-btn { min-width: 142px; }
  .table-card { border-radius: 12px; }
  .table-head { padding: 15px; }
  .table-scroll { overflow: visible; }
  .table-scroll table { min-width: 0; }
  .table-scroll tr { padding: 13px 15px; border-top-color: var(--line); }
  .table-scroll td { padding: 5px 0; font-size: 11px; }
  .table-scroll td::before { color: #8aa0a9; font-size: 9px; }
  .manager-toolbar, .employee-toolbar { gap: 10px; margin-bottom: 12px; }
  .filter-pills { margin-right: -13px; padding-right: 13px; }
  .filter-pill { min-height: 39px; padding: 8px 11px; }
  .search-field { width: 100%; min-height: 42px; }
  .shared-calendar { padding: 0 13px 13px; }
  .shared-mobile-day { border-color: var(--line); border-radius: 12px; box-shadow: 0 5px 12px rgba(44, 83, 101, .06); }
  .shared-mobile-day.today { border-color: #6aabb9; box-shadow: 0 0 0 3px rgba(102, 171, 185, .13), 0 7px 16px rgba(44, 83, 101, .08); }
  .shared-mobile-day-head { padding: 12px 13px; background: #edf7f8; }
  .shared-mobile-day.weekend .shared-mobile-day-head { background: #fbf8fa; }
  .shared-mobile-day.today .shared-mobile-day-head { background: #e1f1f5; }
  .shared-mobile-day-head span { border: 0; background: transparent; color: #718994 !important; }
  .shared-mobile-day-head strong { color: var(--teal-dark); }
  .shared-mobile-day-head small { color: var(--ink-strong); }
  .shared-mobile-day-head b { border: 1px solid #cbdfe5; background: #f5fafb; color: var(--navy); }
  .shared-mobile-shifts { padding: 10px; }
  .shared-mobile-shift { border-color: #c9e2de; border-radius: 9px; background: #f7fcfb; }
  .shared-mobile-shift-head strong { color: var(--ink-strong); }
  .shared-mobile-people .shared-person { min-height: 34px; font-size: 11px; }
  #manager-view .manager-calendar { padding: 0 13px 15px; }
  #manager-view .manager-calendar-day-grid { gap: 9px; }
  #manager-view .manager-mobile-day-head { padding: 13px 14px 12px; }
  #manager-view .manager-mobile-employee-row { grid-template-columns: minmax(0, 1fr) minmax(136px, 38%); padding: 10px 12px; }
  #manager-view .manager-mobile-shift { min-height: 60px; padding: 8px 9px; }
  #manager-view .manager-mobile-approve { min-height: 36px; }
  #inventory-view .inventory-manager-detail-table tbody { padding: 8px; }
  #inventory-view #inventory-manager-detail .inventory-manager-item-row { border-radius: 10px; }
  #inventory-view #inventory-manager-detail .inventory-manager-quantity-value { font-size: 28px; }
  .payroll-view { min-height: 0; }
  .payroll-frame { width: calc(100% + 26px); height: calc(100dvh - 62px); min-height: 0; margin: -18px -13px calc(-36px - env(safe-area-inset-bottom)); }
  #app-view .payroll-frame { width: calc(100% + 26px); height: calc(100dvh - 62px); min-height: 0; margin: -18px -13px calc(-36px - env(safe-area-inset-bottom)); }
}

@media (max-width: 460px) {
  .content-wrap { padding-left: 10px; padding-right: 10px; }
  .page-intro h1 { font-size: 23px; }
  .stats-grid { gap: 7px; }
  .stat-card { min-height: 78px; padding: 10px; }
  .stat-top { font-size: 9px; }
  .stat-value { font-size: 21px; }
  .week-tabs, .filter-pills { margin-right: -10px; padding-right: 10px; }
  .week-tab { min-width: 86px; padding-inline: 9px; }
  .attendance-calendar { gap: 7px; }
  .day-card { min-height: 153px; padding: 9px; }
  .day-name { font-size: 9px; }
  .day-number strong { font-size: 18px; }
  .entry-note { min-height: 48px; font-size: 10px; }
  #manager-view .manager-mobile-day-head { grid-template-columns: 1fr; gap: 9px; }
  #manager-view .manager-mobile-day-counts { width: 100%; }
  #manager-view .manager-mobile-employee-row { grid-template-columns: minmax(0, 1fr) 112px; padding-inline: 10px; }
  #manager-view .manager-mobile-shift { min-height: 56px; }
  #inventory-view .manager-actions { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .toast-root { top: auto; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); left: 12px; }
  .toast { width: 100%; min-width: 0; max-width: none; }
}

/* Final reference alignment for the shared calendar. These selectors intentionally
   match the older scoped rules so the visual language stays stable as legacy CSS
   remains in the bundle. */
.shared-calendar-card .shared-calendar-header,
.shared-calendar-card .shared-shift-head { background: #e9f1f4; }
.shared-calendar-card .shared-calendar-day-head strong,
.shared-calendar-card .shared-calendar-day-head strong[class*="day-tone-"] { color: var(--teal-dark) !important; }
.shared-calendar-card .shared-calendar-day-head.today { border: 0; background: #dceff4; box-shadow: inset 0 0 0 1px #c6e3e9; }
.shared-calendar-card .shared-calendar-day-head.today span { border: 0; background: transparent; color: #718994 !important; }
.shared-calendar-card .shared-calendar-cell.today { background: #f0f9fb; box-shadow: inset 0 0 0 1px #c6e3e9; }
.shared-calendar-card .shared-calendar-cell[data-shift] .shared-person,
.shared-calendar-card .shared-mobile-shift[data-shift] .shared-person { border: 0; box-shadow: none; }
.shared-calendar-card .shared-person.self { box-shadow: none; }

.start-screen { min-height: 100vh; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; padding: 30px 48px 24px; background: #fff; letter-spacing: 0; }
.start-brand { display: flex; align-items: center; gap: 14px; color: #21584c; }
.start-wordmark { font-size: 17px; font-weight: 800; }
.start-store { padding-left: 14px; border-left: 1px solid #d5e0da; color: #717a75; font-size: 12px; font-weight: 600; }
.start-content { width: min(100%, 760px); margin: auto; padding: 64px 0 88px; text-align: center; }
.start-content h1 { margin: 0 0 46px; color: #253d35; font-size: 34px; line-height: 1.2; font-weight: 650; letter-spacing: 0; }
.section-screen { min-height: 100vh; min-height: 100svh; }
.section-content { padding-top: 48px; }
.section-choices { width: min(100%, 840px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 0 auto; }
.section-choices[data-count="2"] { max-width: 540px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.section-choices[data-count="1"] { max-width: 240px; grid-template-columns: minmax(0, 1fr); }
.section-choices.hidden { display: none; }
.section-choices .start-choice { min-height: 178px; }
.choice-icon { position: relative; }
.choice-badge { position: absolute; top: -7px; right: -7px; min-width: 24px; height: 24px; display: grid; place-items: center; border-radius: 999px; background: #f2b33d; color: #4d3000; font-size: 11px; font-weight: 900; }
.choice-badge.hidden { display: none; }
.start-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.start-choices.has-management { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.start-choice { min-width: 0; min-height: 196px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #263c35; font-size: 18px; line-height: 1.4; font-weight: 650; letter-spacing: 0; transition: background .15s, border-color .15s; }
.start-choice > span:last-child { max-width: 100%; overflow-wrap: anywhere; }
.choice-icon { display: grid; place-items: center; width: 100px; height: 100px; flex: 0 0 100px; border-radius: 8px; }
.choice-icon img { width: 48px; height: 48px; opacity: .76; }
.choice-schedule .choice-icon { background: #e1f0e7; }
.choice-inventory .choice-icon { background: #e5edf9; }
.choice-recipes .choice-icon { background: #f8e7eb; }
.choice-management .choice-icon { background: #f6efd4; }
.start-choice:hover { border-color: #dee6e0; background: #f8faf8; }
.start-choice:focus-visible, .home-control:focus-visible { outline: 3px solid #28745f; outline-offset: 5px; }
.start-footer { color: #828b85; font-size: 11px; font-weight: 600; text-align: center; }
.home-control { display: inline-grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; padding: 0; border: 1px solid #dde5e0; border-radius: 8px; background: #fff; color: #253d35; }
.home-control:hover { background: #eef4f0; }
.home-control img { display: block; opacity: .7; }
.session-loading { min-height: 100vh; display: grid; place-items: center; color: #607169; font-size: 14px; background: #fff; }
.access-screen { min-height: 100vh; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; padding: 30px 48px 24px; background: #fff; }
.access-content { width: min(100%, 360px); margin: auto; padding: 48px 0 64px; }
.access-content h1 { margin: 0 0 38px; color: #253d35; font-size: 32px; font-weight: 650; text-align: center; letter-spacing: 0; }
.access-content .stack-form { gap: 10px; }
.access-content .primary-btn { margin: 0; border-radius: 8px; box-shadow: none; }
.access-password { position: relative; }
.access-password input { min-height: 50px; padding-right: 50px; border-radius: 8px; font-size: 16px; }
.access-password button { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 6px; background: transparent; }
.access-password button:hover { background: #edf3ef; }
.access-password button:focus-visible { outline: 2px solid #28745f; }
#login-feedback { min-height: 20px; margin: 0; color: #b44747; font-size: 13px; line-height: 1.5; }
.start-account { margin-left: auto; display: flex; align-items: center; gap: 12px; min-width: 0; }
#start-user-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #607169; font-size: 13px; font-weight: 500; }
#app-view .topbar { gap: 12px; }
#app-view .topbar-title { min-width: 0; margin-right: auto; }
#app-view { display: block; }
#page-title, #recipes-title { overflow-wrap: anywhere; letter-spacing: 0; }
#employee-test-banner { position: sticky; top: 0; z-index: 20; }
#employee-test-banner button { flex-shrink: 0; }
.recipes-screen { height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: #fff; }
.recipes-toolbar { display: flex; align-items: center; gap: 14px; min-height: 68px; flex: 0 0 auto; padding: 12px 24px; border-bottom: 1px solid var(--line); }
.recipes-toolbar h1 { margin: 0 auto 0 0; font-size: 18px; letter-spacing: 0; }
.recipes-toolbar > span { color: var(--muted); font-size: 12px; }
#recipes-frame { width: 100%; flex: 1 1 auto; min-height: 0; border: 0; }
.embedded-app { display: block; width: 100%; height: calc(100vh - 160px); height: calc(100dvh - 160px); min-height: 480px; border: 0; background: #fff; }
.inventory-mode-control { display: inline-grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 100%; gap: 4px; margin-bottom: 20px; padding: 4px; border-radius: 8px; background: #e8eff3; }
.inventory-mode-control button { min-height: 42px; padding: 8px 18px; border: 0; border-radius: 6px; background: transparent; color: #526771; font-size: 13px; font-weight: 700; letter-spacing: 0; }
.inventory-mode-control button[aria-pressed="true"] { background: #fff; color: #0b655e; box-shadow: 0 1px 3px #24404b18; }
.inventory-mode-control button:focus-visible { outline: 2px solid #28745f; outline-offset: 2px; }
.inventory-mode-control button:disabled { cursor: wait; opacity: .65; }
@media (max-width: 600px) {
  .start-screen { padding: max(24px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom)); }
  .inventory-mode-control { display: grid; width: 100%; margin-bottom: 16px; }
  .access-screen { padding: max(24px, env(safe-area-inset-top)) 24px max(22px, env(safe-area-inset-bottom)); }
  .access-content h1 { font-size: 28px; }
  .start-account { gap: 8px; }
  #start-user-name { max-width: 95px; font-size: 12px; }
  .start-content { padding: 48px 0 70px; }
  .section-content { padding-top: 38px; }
  .section-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .section-choices .start-choice { min-height: 154px; }
  .start-content h1 { margin-bottom: 30px; font-size: 28px; }
  .start-choices { gap: 6px; }
  .start-choices.has-management { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .start-choice { min-height: 142px; gap: 16px; padding: 14px 2px; font-size: 15px; }
  .choice-icon { width: 72px; height: 72px; flex-basis: 72px; }
  .choice-icon img { width: 36px; height: 36px; }
  .recipes-toolbar { gap: 10px; padding: max(8px, env(safe-area-inset-top)) 12px 8px; min-height: 60px; }
  .recipes-toolbar h1 { font-size: 16px; }
  .recipes-toolbar > span { font-size: 11px; }
  #app-view .topbar { gap: 8px; }
  #app-view .topbar-account { flex-shrink: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .start-choice { transition: none; }
}
@media (max-width: 600px) {
  .section-content { padding-bottom: 32px; }
  #employee-test-banner { padding: 10px 16px; flex-wrap: wrap; }
  .recipes-toolbar > span { display: none; }
}

body { background: #f5f9f8; }
body.app-booting { background: #f5f9f8; }
.start-screen { position: relative; isolation: isolate; overflow: hidden; background: #f5f9f8; }
.start-screen::before { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(245,249,248,.98)); content: ''; }
.start-brand { animation: shell-settle .32s cubic-bezier(.22,1,.36,1) both; }
.start-content { animation: menu-enter .38s cubic-bezier(.22,1,.36,1) both; }
.start-content h1 { color: #1b3834; font-weight: 720; letter-spacing: -.02em; }
.start-choices { gap: 22px; }
.start-choice { position: relative; min-height: 214px; border-color: #e1ebe8; background: rgba(255,255,255,.76); box-shadow: 0 14px 30px rgba(42,78,82,.06); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: transform .28s cubic-bezier(.22,1,.36,1), box-shadow .28s ease, border-color .2s ease, background .2s ease; animation: menu-item-in .42s cubic-bezier(.22,1,.36,1) both; }
.start-choice:nth-child(1) { animation-delay: .05s; }
.start-choice:nth-child(2) { animation-delay: .1s; }
.start-choice:nth-child(3) { animation-delay: .15s; }
.start-choice:nth-child(4) { animation-delay: .2s; }
.start-choice:hover { border-color: #c9ded8; background: rgba(255,255,255,.96); box-shadow: 0 20px 36px rgba(42,78,82,.12); transform: translateY(-5px); }
.start-choice:active { transform: translateY(-1px) scale(.985); box-shadow: 0 10px 20px rgba(42,78,82,.08); }
.choice-icon { width: 104px; height: 104px; flex-basis: 104px; border: 1px solid rgba(255,255,255,.65); box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 8px 18px rgba(42,78,82,.06); transition: transform .28s cubic-bezier(.22,1,.36,1), box-shadow .28s ease; }
.start-choice:hover .choice-icon { transform: scale(1.05); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 12px 22px rgba(42,78,82,.1); }
.choice-icon img { width: 46px; height: 46px; opacity: .82; transition: transform .28s cubic-bezier(.22,1,.36,1); }
.start-choice:hover .choice-icon img { transform: scale(1.06); }
.start-choice > span:last-child { color: #213b37; font-size: 17px; font-weight: 750; }
.start-footer { animation: shell-settle .42s .08s cubic-bezier(.22,1,.36,1) both; }
.section-screen .start-content { padding-top: 36px; }
.section-screen .start-content h1 { margin-bottom: 34px; font-size: 30px; }
.section-choices .start-choice { min-height: 188px; }
.home-control { border-color: #dbe7e4; background: rgba(255,255,255,.82); box-shadow: 0 6px 16px rgba(42,78,82,.05); transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.home-control:hover { border-color: #b9d7d0; background: #fff; transform: translateY(-2px); }
.home-control:active { transform: scale(.94); }
.access-screen { background: #f5f9f8; }
.access-content { animation: menu-enter .55s cubic-bezier(.22,1,.36,1) both; }
.access-content h1 { color: #1b3834; font-weight: 720; letter-spacing: -.02em; }
.recipes-screen { background: #f5f9f8; animation: menu-enter .38s cubic-bezier(.22,1,.36,1) both; }
.recipes-toolbar { background: rgba(255,255,255,.88); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 5px 18px rgba(42,78,82,.06); }
#app-view { min-height: 100vh; background: #f5f9f8; animation: menu-enter .38s cubic-bezier(.22,1,.36,1) both; }
#app-view .topbar { position: sticky; top: 0; z-index: 15; background: rgba(255,255,255,.86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 5px 18px rgba(42,78,82,.06); }
#app-view .home-control { flex: 0 0 42px; }
.view-panel { animation: view-enter .34s cubic-bezier(.22,1,.36,1) both; }
.primary-btn, .secondary-btn, .danger-btn, .row-action, .restore-btn, .danger-text-btn { transition: transform .2s cubic-bezier(.22,1,.36,1), box-shadow .2s ease, background .2s ease, border-color .2s ease; }
.primary-btn:hover, .secondary-btn:hover, .danger-btn:hover { transform: translateY(-2px); }
.primary-btn:active, .secondary-btn:active, .danger-btn:active, .row-action:active { transform: scale(.97); }
.table-card, .stat-card { box-shadow: 0 12px 30px rgba(42,78,82,.055); }
@keyframes shell-settle { from { opacity: 1; transform: translateY(-2px); } to { opacity: 1; transform: translateY(0); } }
@keyframes menu-enter { from { opacity: 1; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes menu-item-in { from { opacity: 1; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes view-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .start-brand, .start-content, .start-choice, .start-footer, .access-content, .recipes-screen, #app-view, .view-panel { animation: none; opacity: 1; transform: none; }
  .start-choice, .choice-icon, .choice-icon img, .home-control, .primary-btn, .secondary-btn, .danger-btn, .row-action, .restore-btn, .danger-text-btn { transition: none; }
}
@media (max-width: 600px) {
  .start-choices, .start-choices.has-management { gap: 10px; }
  .start-choice { min-height: 150px; padding: 16px 8px; gap: 13px; border-radius: 16px; }
  .choice-icon { width: 72px; height: 72px; flex-basis: 72px; }
  .choice-icon img { width: 34px; height: 34px; }
  .start-choice > span:last-child { font-size: 14px; }
  .section-choices .start-choice { min-height: 142px; }
  .section-screen .start-content h1 { margin-bottom: 25px; font-size: 26px; }
  #app-view .topbar { position: sticky; top: 0; padding-top: max(8px, env(safe-area-inset-top)); }
}
