:root {
  --ink: #142536;
  --ink-strong: #0b2133;
  --muted: #687889;
  --muted-2: #8a98a6;
  --line: #dfe7ed;
  --line-soft: #edf2f5;
  --canvas: #f3f7f8;
  --surface: #ffffff;
  --surface-soft: #f8fbfc;
  --navy: #123b5d;
  --navy-dark: #0b2b43;
  --navy-soft: #e8f0f5;
  --teal: #078a8d;
  --teal-dark: #006c70;
  --teal-soft: #e2f5f3;
  --cyan-soft: #eef9fa;
  --blue: #2867a6;
  --blue-soft: #e9f2fb;
  --green: #16875c;
  --green-soft: #e4f5ed;
  --red: #c84455;
  --red-soft: #fbeaec;
  --amber: #b97813;
  --amber-soft: #fff4dd;
  --purple: #7454aa;
  --purple-soft: #f1ebfa;
  --shadow-sm: 0 2px 8px rgba(15, 42, 62, .05);
  --shadow-md: 0 12px 34px rgba(15, 42, 62, .08);
  --shadow-lg: 0 28px 70px rgba(6, 34, 51, .16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --sidebar-width: 292px;
  --transition: 180ms ease;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { color: var(--navy); }
img, svg { display: block; }
h1, h2, h3, p { margin-top: 0; }
h1 { color: var(--ink-strong); font-size: clamp(2rem, 3vw, 2.8rem); line-height: 1.08; letter-spacing: -.04em; margin-bottom: 12px; }
h2 { color: var(--ink-strong); font-size: 1.24rem; line-height: 1.25; letter-spacing: -.018em; margin-bottom: 0; }
h3 { color: var(--ink-strong); font-size: 1.05rem; }
small { line-height: 1.35; }
.icon { flex: 0 0 auto; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 9999; transform: translateY(-150%); background: var(--navy-dark); color: #fff; padding: 10px 14px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { transform: translateY(0); }

/* Buttons */
.button, button.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 10px 16px;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition), color var(--transition);
}
.button:hover, button.button:hover { transform: translateY(-1px); }
.button:active, button.button:active { transform: translateY(0); }
.button:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(7, 138, 141, .2); outline-offset: 2px; }
.button-primary { color: #fff; background: linear-gradient(135deg, var(--teal) 0%, #06797f 100%); border-color: var(--teal); box-shadow: 0 9px 20px rgba(7, 138, 141, .18); }
.button-primary:hover { color: #fff; background: linear-gradient(135deg, #087e82 0%, var(--teal-dark) 100%); box-shadow: 0 12px 24px rgba(7, 138, 141, .23); }
.button-secondary { color: var(--navy); background: #fff; border-color: #cfdbe2; }
.button-secondary:hover { color: var(--navy-dark); border-color: #afc2cd; background: #fafdfe; box-shadow: var(--shadow-sm); }
.button-large { min-height: 50px; padding: 13px 20px; border-radius: 13px; }
.button-compact { min-height: 38px; padding: 9px 13px; border-radius: 10px; }
.button-full { width: 100%; }
.icon-button { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 0; border-radius: 11px; color: var(--navy); background: transparent; cursor: pointer; transition: background var(--transition), color var(--transition), transform var(--transition); }
.icon-button:hover { color: var(--teal-dark); background: var(--teal-soft); }
.icon-button:active { transform: scale(.96); }
.icon-button-soft { width: 36px; height: 36px; color: #536879; background: #f2f7f9; border: 1px solid #e3ebef; }
.icon-button-soft:hover { background: var(--teal-soft); border-color: #c4e9e5; }
.icon-button-quiet { color: #8796a3; }
.text-link { display: inline-flex; align-items: center; gap: 4px; font-size: .9rem; font-weight: 750; color: var(--teal-dark); }
.text-link:hover { gap: 7px; }
.back-link { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 22px; color: #66798a; font-size: .9rem; font-weight: 700; }
.back-link:hover { color: var(--teal-dark); }

/* Application shell */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 60; width: var(--sidebar-width); background: linear-gradient(180deg, #0c304b 0%, #0a263b 100%); color: #fff; box-shadow: 10px 0 35px rgba(5, 31, 47, .07); }
.sidebar::after { content: ""; position: absolute; inset: auto -80px -110px auto; width: 250px; height: 250px; border-radius: 50%; background: rgba(10, 145, 145, .08); pointer-events: none; }
.sidebar-inner { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; padding: 25px 18px 18px; }
.brand { display: flex; align-items: center; gap: 13px; margin: 0 7px 34px; color: #fff; }
.brand:hover { color: #fff; }
.brand-mark { width: 48px; height: 48px; flex: 0 0 auto; }
.brand-copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.13; }
.brand-overline { margin-bottom: 2px; color: #a9bdca; font-size: .68rem; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.brand-copy strong { color: #fff; font-size: 1.08rem; letter-spacing: -.02em; }
.brand-department { margin-top: 4px; color: #7ed5d2; font-size: .72rem; font-weight: 650; }
.main-nav { display: flex; flex-direction: column; gap: 5px; }
.nav-label { padding: 0 14px 7px; color: #7896a8; font-size: .67rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.nav-label-secondary { margin-top: 22px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 13px; min-height: 48px; padding: 11px 14px; border-radius: 12px; color: #bdd0dc; font-weight: 650; transition: color var(--transition), background var(--transition), transform var(--transition); }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.065); transform: translateX(2px); }
.nav-item.is-active { color: #fff; background: linear-gradient(90deg, rgba(8, 150, 151, .28), rgba(11, 121, 127, .12)); box-shadow: inset 0 0 0 1px rgba(129, 225, 220, .12); }
.nav-item.is-active::before { content: ""; position: absolute; left: -18px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 5px 5px 0; background: #64d4ce; box-shadow: 0 0 12px rgba(100,212,206,.4); }
.nav-item .icon { color: #8db6c3; }
.nav-item.is-active .icon, .nav-item:hover .icon { color: #77dfd9; }
.sidebar-spacer { flex: 1 1 auto; min-height: 24px; }
.environment-card { display: flex; align-items: flex-start; gap: 10px; margin: 10px 5px 15px; padding: 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(255,255,255,.045); }
.environment-dot { width: 8px; height: 8px; flex: 0 0 auto; margin-top: 5px; border-radius: 50%; background: #f0bf59; box-shadow: 0 0 0 5px rgba(240,191,89,.1); }
.environment-card div { min-width: 0; display: flex; flex-direction: column; }
.environment-card strong { color: #f4f8fa; font-size: .78rem; }
.environment-card small { margin-top: 2px; color: #8ea8b7; font-size: .67rem; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 13px 9px 5px; border-top: 1px solid rgba(255,255,255,.08); }
.user-avatar { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; color: #e9ffff; background: rgba(13, 147, 150, .22); border: 1px solid rgba(113, 219, 214, .16); font-size: .74rem; font-weight: 850; letter-spacing: .03em; }
.user-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; }
.user-copy strong { color: #fff; overflow: hidden; font-size: .83rem; text-overflow: ellipsis; }
.user-copy span { color: #829eae; font-size: .68rem; }
.sidebar-user .icon-button { color: #829eae; }
.sidebar-user .icon-button:hover { color: #fff; background: rgba(255,255,255,.07); }
.sidebar-overlay { display: none; }
.app-main { min-height: 100vh; margin-left: var(--sidebar-width); display: flex; flex-direction: column; }
.topbar { height: 78px; position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; padding: 0 clamp(22px, 4vw, 52px); background: rgba(255,255,255,.88); border-bottom: 1px solid rgba(216,227,233,.86); backdrop-filter: blur(14px); }
.mobile-menu-button { display: none; }
.topbar-copy { display: flex; flex-direction: column; }
.topbar-title { color: var(--ink-strong); font-size: .92rem; font-weight: 800; }
.topbar-subtitle { color: var(--muted-2); font-size: .72rem; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 15px; }
.system-status { display: inline-flex; align-items: center; gap: 8px; color: #627483; font-size: .76rem; font-weight: 700; }
.system-status > span { width: 8px; height: 8px; border-radius: 50%; background: #27a46f; box-shadow: 0 0 0 5px rgba(39,164,111,.1); }
.content { width: 100%; max-width: 1620px; flex: 1; margin: 0 auto; padding: 38px clamp(22px, 4vw, 52px) 50px; }
.app-footer { display: flex; justify-content: space-between; gap: 20px; padding: 20px clamp(22px, 4vw, 52px); border-top: 1px solid var(--line); color: #82909b; font-size: .72rem; }

/* Page headings */
.page-header { margin-bottom: 28px; }
.page-header > p, .page-header > div > p { max-width: 760px; margin-bottom: 0; color: var(--muted); font-size: 1rem; }
.page-header-with-action { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.page-header-with-action > div:first-child { min-width: 0; }
.eyebrow { display: block; margin-bottom: 7px; color: var(--teal-dark); font-size: .7rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.header-summary { min-width: 115px; display: flex; flex-direction: column; align-items: flex-end; padding-bottom: 6px; }
.header-summary strong { color: var(--navy); font-size: 2rem; line-height: 1; letter-spacing: -.04em; }
.header-summary span { margin-top: 5px; color: var(--muted); font-size: .75rem; }

/* Panels and cards */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.panel-heading { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px 18px; }
.panel-heading.compact { min-height: auto; padding: 0 0 18px; }
.panel-heading h2 { margin-top: 1px; }
.panel-kicker { display: block; color: var(--muted-2); font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.panel-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 11px; color: var(--teal-dark); background: var(--teal-soft); }
.panel-table { overflow: hidden; }

/* Dashboard */
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { min-height: 135px; position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: 15px; padding: 21px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); }
.stat-card-featured { border-color: transparent; background: linear-gradient(135deg, #123b5d 0%, #0f4d64 57%, #087f83 100%); box-shadow: 0 16px 34px rgba(15,63,82,.16); }
.stat-icon { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 14px; color: #eaffff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.1); }
.stat-icon-blue { color: var(--blue); background: var(--blue-soft); border-color: transparent; }
.stat-icon-amber { color: var(--amber); background: var(--amber-soft); border-color: transparent; }
.stat-icon-green { color: var(--green); background: var(--green-soft); border-color: transparent; }
.stat-copy { min-width: 0; display: flex; flex-direction: column; }
.stat-copy > span { color: var(--muted); font-size: .72rem; font-weight: 750; }
.stat-copy strong { margin: 5px 0 2px; color: var(--ink-strong); font-size: 2rem; line-height: 1; letter-spacing: -.045em; }
.stat-copy small { color: var(--muted-2); font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-card-featured .stat-copy > span, .stat-card-featured .stat-copy small { color: #b5ced8; }
.stat-card-featured .stat-copy strong { color: #fff; }
.stat-orbit { position: absolute; width: 130px; height: 130px; right: -48px; bottom: -65px; border: 23px solid rgba(255,255,255,.055); border-radius: 50%; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, .78fr); gap: 22px; align-items: start; }
.dashboard-side { display: grid; gap: 22px; }
.rotation-panel, .channels-panel { padding: 23px; }
.position-chip { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--teal-dark); background: var(--teal-soft); font-size: .83rem; font-weight: 850; }
.next-person { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 15px; background: linear-gradient(135deg, #f0f9f9, #f7fbfc); border: 1px solid #dcefed; }
.next-person > div:last-child { min-width: 0; display: flex; flex-direction: column; }
.next-person span { color: var(--muted-2); font-size: .65rem; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.next-person strong { margin: 2px 0; color: var(--ink-strong); font-size: .95rem; }
.next-person small { color: var(--muted); font-size: .68rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-avatar { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; color: var(--navy); background: #e8f1f4; font-size: .72rem; font-weight: 850; letter-spacing: .025em; }
.person-avatar-large { width: 50px; height: 50px; border-radius: 15px; color: #fff; background: linear-gradient(145deg, var(--navy), var(--teal)); box-shadow: 0 8px 16px rgba(12,74,86,.14); }
.person-avatar-small { width: 35px; height: 35px; border-radius: 10px; font-size: .65rem; }
.rotation-sequence { position: relative; margin: 19px 0; }
.rotation-sequence::before { content: ""; position: absolute; top: 16px; bottom: 16px; left: 15px; width: 1px; background: #d8e7eb; }
.rotation-step { position: relative; display: flex; align-items: center; gap: 11px; min-height: 44px; }
.rotation-step > span { z-index: 1; width: 31px; height: 31px; display: grid; place-items: center; flex: 0 0 auto; border: 4px solid #fff; border-radius: 50%; color: #667b88; background: #eaf1f4; font-size: .65rem; font-weight: 850; }
.rotation-step.is-next > span { color: #fff; background: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }
.rotation-step > div { display: flex; flex-direction: column; min-width: 0; }
.rotation-step strong { color: var(--ink); font-size: .77rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rotation-step small { color: var(--muted-2); font-size: .61rem; }
.channel-row { display: grid; grid-template-columns: 39px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 13px 0; border-top: 1px solid var(--line-soft); }
.channel-row:first-of-type { border-top: 0; }
.channel-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: var(--navy); background: var(--navy-soft); }
.channel-row > div { min-width: 0; display: flex; flex-direction: column; }
.channel-row strong { font-size: .78rem; }
.channel-row small { color: var(--muted-2); font-size: .63rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-status { padding: 5px 7px; border-radius: 999px; color: #687885; background: #eff3f5; font-size: .57rem; font-weight: 850; letter-spacing: .03em; text-transform: uppercase; }
.mini-status.is-on { color: var(--green); background: var(--green-soft); }
.mini-status.is-demo { color: var(--amber); background: var(--amber-soft); }
.channel-note { margin: 13px 0 0; padding-top: 13px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: .68rem; }

/* Tables */
.data-table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 11px 18px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); color: #7c8b97; background: #f8fafb; font-size: .64rem; font-weight: 850; letter-spacing: .07em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 15px 18px; border-bottom: 1px solid var(--line-soft); color: #405363; vertical-align: middle; }
.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: #fbfdfd; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.dashboard-table th:first-child, .dashboard-table td:first-child { padding-left: 24px; }
.dashboard-table th:last-child, .dashboard-table td:last-child { padding-right: 24px; }
.shift-title-cell { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.shift-title-cell:hover strong { color: var(--teal-dark); }
.table-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; color: var(--navy); background: var(--navy-soft); }
.shift-title-cell > span:last-child, .date-stack { display: flex; flex-direction: column; }
.shift-title-cell strong { max-width: 310px; font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shift-title-cell small, .date-stack small { margin-top: 2px; color: var(--muted-2); font-size: .65rem; }
.date-stack strong { color: #344a5a; font-size: .75rem; font-weight: 750; }
.table-action { width: 54px; text-align: right; }
.table-search { min-width: 210px; height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid #dbe5ea; border-radius: 11px; color: #83929d; background: #fff; }
.table-search input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: .76rem; }
.table-search input::placeholder { color: #99a5ae; }
.no-filter-results { padding: 28px; color: var(--muted); text-align: center; font-size: .8rem; }
.row-inactive { background: #fff8f8; }
.row-inactive td { color: #7b6b70; }
.row-inactive .person-avatar { filter: grayscale(.35); opacity: .72; }
.person-cell { display: flex; align-items: center; gap: 11px; min-width: 190px; }
.person-cell > div:last-child { min-width: 0; display: flex; flex-direction: column; }
.person-cell strong { color: var(--ink); font-size: .78rem; white-space: nowrap; }
.person-cell small { max-width: 260px; color: var(--muted-2); font-size: .64rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-stack { display: flex; flex-direction: column; gap: 5px; }
.contact-stack span { display: flex; align-items: center; gap: 7px; color: #526777; font-size: .7rem; white-space: nowrap; }
.contact-stack .icon { color: #91a0aa; }
.position-number { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 11px; color: var(--navy); background: var(--navy-soft); font-size: .78rem; font-weight: 850; }
.order-actions { display: flex; gap: 5px; }
.order-actions form, .sidebar-user form { margin: 0; }
.toggle-status { min-width: 104px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; border: 1px solid transparent; border-radius: 999px; font-size: .65rem; font-weight: 900; letter-spacing: .035em; cursor: pointer; transition: transform var(--transition), box-shadow var(--transition); }
.toggle-status:hover { transform: translateY(-1px); }
.toggle-status > span { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(255,255,255,.45); }
.toggle-status.is-active { color: #0b6b47; border-color: #a7dfc6; background: #dff5e9; box-shadow: 0 4px 12px rgba(39,164,111,.10); }
.toggle-status.is-active > span { background: #22a06b; }
.toggle-status.is-inactive { color: #a62f3d; border-color: #efbcc3; background: #fde5e8; box-shadow: 0 4px 12px rgba(190,54,70,.08); }
.toggle-status.is-inactive > span { background: #cf4050; }
.priority-cell { display: flex; flex-direction: column; }
.priority-cell > span { color: var(--navy); font-size: .9rem; font-weight: 850; }
.priority-cell small { color: var(--muted-2); font-size: .59rem; white-space: nowrap; }
.response-pill, .delivery-status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; font-size: .63rem; font-weight: 800; white-space: nowrap; }
.response-accept { color: var(--green); background: var(--green-soft); }
.response-reject { color: var(--red); background: var(--red-soft); }
.response-pending { color: var(--amber); background: var(--amber-soft); }
.delivery-status { color: #627381; background: #f0f4f6; }
.delivery-status > span { width: 6px; height: 6px; border-radius: 50%; background: #8ca0ac; }
.delivery-sent, .delivery-demo { color: var(--blue); background: var(--blue-soft); }
.delivery-sent > span, .delivery-demo > span { background: var(--blue); }
.delivery-error { color: var(--red); background: var(--red-soft); }
.delivery-error > span { background: var(--red); }
.delivery-skipped, .delivery-disabled { color: #7b8790; background: #eff2f4; }

/* Status badges */
.status-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 999px; color: #637481; background: #eef2f4; font-size: .63rem; font-weight: 850; letter-spacing: .025em; white-space: nowrap; text-transform: uppercase; }
.status-badge > span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .82; }
.status-draft { color: #627381; background: #eef2f4; }
.status-open { color: var(--amber); background: var(--amber-soft); }
.status-assigned { color: var(--green); background: var(--green-soft); }
.status-uncovered { color: var(--red); background: var(--red-soft); }
.status-cancelled { color: #7a6c75; background: #f2edf0; }
.status-closed { color: var(--blue); background: var(--blue-soft); }
.status-badge-large { padding: 8px 13px; font-size: .67rem; }

/* Empty states */
.empty-state { min-height: 290px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 35px; text-align: center; }
.empty-icon { width: 62px; height: 62px; display: grid; place-items: center; margin-bottom: 15px; border-radius: 18px; color: var(--teal-dark); background: var(--teal-soft); }
.empty-state h3 { margin-bottom: 7px; }
.empty-state p { max-width: 390px; margin-bottom: 18px; color: var(--muted); font-size: .8rem; }
.empty-state-small { min-height: auto; padding: 20px; }
.empty-state-small p { margin-bottom: 7px; }

/* Forms */
.form-stack { display: grid; gap: 16px; }
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group label { color: #33495a; font-size: .73rem; font-weight: 800; }
input, textarea, select { width: 100%; border: 1px solid #ccd9df; border-radius: 11px; color: var(--ink); background: #fff; transition: border-color var(--transition), box-shadow var(--transition), background var(--transition); }
input { min-height: 45px; padding: 10px 13px; }
textarea { min-height: 120px; padding: 12px 13px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #a2adb5; }
input:hover, textarea:hover { border-color: #b5c7d0; }
input:focus, textarea:focus { border-color: var(--teal); outline: 0; box-shadow: 0 0 0 4px rgba(7,138,141,.09); }
.input-with-icon { position: relative; display: flex; align-items: center; }
.input-with-icon > .icon:first-child { position: absolute; z-index: 1; left: 12px; color: #84949f; pointer-events: none; }
.input-with-icon input { padding-left: 40px; }
.input-large input { min-height: 50px; border-radius: 13px; }
.field-hint { color: var(--muted-2); font-size: .64rem; }
.optional-label { margin-left: 4px; color: var(--muted-2); font-size: .6rem; font-weight: 650; }
.info-box { display: flex; align-items: flex-start; gap: 9px; margin-top: 18px; padding: 12px; border-radius: 12px; color: #4d6978; background: var(--cyan-soft); border: 1px solid #dceff1; }
.info-box .icon { margin-top: 1px; color: var(--teal-dark); }
.info-box p { margin: 0; font-size: .67rem; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 5px; }
.guard-form { display: grid; gap: 28px; }
.guard-form fieldset { min-width: 0; margin: 0; padding: 0 0 28px; border: 0; border-bottom: 1px solid var(--line-soft); }
.guard-form fieldset:last-of-type { border-bottom: 0; padding-bottom: 4px; }
.guard-form legend { width: 100%; display: flex; align-items: center; gap: 12px; margin-bottom: 22px; padding: 0; }
.guard-form legend > span:last-child { display: flex; flex-direction: column; }
.guard-form legend strong { color: var(--ink-strong); font-size: .93rem; }
.guard-form legend small { margin-top: 2px; color: var(--muted-2); font-size: .64rem; }
.legend-icon { width: 41px; height: 41px; display: grid; place-items: center; border-radius: 12px; color: var(--navy); background: var(--navy-soft); }
.legend-icon-accent { color: var(--amber); background: var(--amber-soft); }

/* Participants */
.participants-layout { display: grid; grid-template-columns: minmax(270px, 340px) minmax(0, 1fr); gap: 22px; align-items: start; }
.sticky-panel { position: sticky; top: 101px; padding: 23px; }
.participants-panel { min-width: 0; }
.participants-heading { flex-wrap: wrap; }
.rotation-explainer { min-height: 61px; display: flex; align-items: center; justify-content: center; gap: 7px; margin: 0 24px 18px; padding: 10px 18px; border-radius: 13px; background: #f7fafb; border: 1px solid var(--line-soft); }
.rotation-explainer > span:not(.rotation-dot):not(.rotation-loop):not(.rotation-return) { width: 22px; height: 1px; background: #cbd9df; }
.rotation-dot { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--navy); background: var(--navy-soft); font-size: .67rem; font-weight: 850; }
.rotation-loop { color: #8c9ba6; font-weight: 800; letter-spacing: .1em; }
.rotation-return { margin-left: 4px; color: var(--teal-dark); font-size: .67rem; font-weight: 800; }

/* Shift detail */
.shift-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.shift-title-row h1 { margin-bottom: 0; }
.shift-facts { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.shift-facts article { display: flex; align-items: center; gap: 13px; min-height: 105px; padding: 18px; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: var(--shadow-sm); }
.fact-icon { width: 43px; height: 43px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; color: var(--navy); background: var(--navy-soft); }
.fact-icon-amber { color: var(--amber); background: var(--amber-soft); }
.fact-icon-purple { color: var(--purple); background: var(--purple-soft); }
.shift-facts article > div { min-width: 0; display: flex; flex-direction: column; }
.shift-facts small { color: var(--muted-2); font-size: .62rem; font-weight: 750; text-transform: uppercase; letter-spacing: .045em; }
.shift-facts strong { margin: 3px 0 1px; color: var(--ink-strong); font-size: .83rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shift-facts article > div > span { color: var(--muted); font-size: .66rem; }
.assignment-banner { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; padding: 17px 20px; border: 1px solid #cde9dc; border-radius: 17px; background: linear-gradient(135deg, #e9f8f1, #f4fbf8); }
.assignment-icon { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 14px; color: #fff; background: var(--green); }
.assignment-banner > div { display: flex; flex: 1; flex-direction: column; }
.assignment-banner > div > span { color: #5e7e6e; font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.assignment-banner strong { color: #125c42; font-size: 1rem; }
.assignment-banner small { color: #6d8b7c; font-size: .65rem; }
.assignment-check { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: #fff; }
.shift-detail-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .66fr); gap: 22px; align-items: start; }
.shift-main-column, .shift-side-column { min-width: 0; display: grid; gap: 20px; }
.response-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.response-summary > div { position: relative; min-height: 85px; display: flex; flex-direction: column; justify-content: center; padding: 14px 15px 14px 34px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.summary-dot { position: absolute; left: 15px; top: 18px; width: 7px; height: 7px; border-radius: 50%; }
.summary-dot-green { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.summary-dot-red { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.summary-dot-amber { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.summary-dot-blue { background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.response-summary strong { color: var(--ink-strong); font-size: 1.34rem; line-height: 1; }
.response-summary small { margin-top: 4px; color: var(--muted-2); font-size: .62rem; }
.action-panel, .details-panel { padding: 22px; }
.action-state { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; padding: 13px; border-radius: 12px; }
.action-state .icon { margin-top: 1px; }
.action-state p { margin: 0; color: inherit; font-size: .7rem; }
.action-state-draft { color: #526c7b; background: var(--navy-soft); }
.action-state-open { color: #805d20; background: var(--amber-soft); }
.action-state-success { color: #25694f; background: var(--green-soft); }
.action-state-danger { color: #944352; background: var(--red-soft); }
.detail-list { margin: 0; }
.detail-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.detail-list > div:first-child { padding-top: 0; }
.detail-list dt { color: var(--muted); font-size: .7rem; }
.detail-list dd { margin: 0; color: var(--ink); font-size: .7rem; font-weight: 750; text-align: right; }
.notes-box { margin-top: 17px; padding: 13px; border-radius: 12px; background: #f7fafb; }
.notes-box span { color: var(--muted-2); font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.notes-box p { margin: 6px 0 0; color: #4f6473; font-size: .7rem; white-space: pre-wrap; }

/* New shift */
.form-page-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(270px, .65fr); gap: 22px; align-items: start; }
.form-panel { padding: 28px; }
.creation-guide { display: grid; gap: 17px; }
.process-panel { padding: 22px; }
.process-list { position: relative; display: grid; gap: 17px; margin: 0; padding: 0; list-style: none; }
.process-list::before { content: ""; position: absolute; top: 18px; bottom: 18px; left: 17px; width: 1px; background: #d7e4e9; }
.process-list li { position: relative; display: flex; gap: 12px; align-items: flex-start; }
.process-list li > span { z-index: 1; width: 35px; height: 35px; display: grid; place-items: center; flex: 0 0 auto; border: 5px solid #fff; border-radius: 50%; color: var(--teal-dark); background: var(--teal-soft); font-size: .67rem; font-weight: 850; }
.process-list li > div { display: flex; flex-direction: column; padding-top: 4px; }
.process-list strong { color: var(--ink); font-size: .75rem; }
.process-list small { margin-top: 1px; color: var(--muted-2); font-size: .63rem; }
.security-note { display: flex; gap: 11px; padding: 17px; border-radius: 16px; color: #dceff7; background: linear-gradient(145deg, var(--navy), #15475e); box-shadow: 0 12px 27px rgba(16,56,78,.13); }
.security-note > .icon { margin-top: 1px; color: #74dad6; }
.security-note strong { color: #fff; font-size: .76rem; }
.security-note p { margin: 5px 0 0; color: #a9c1cd; font-size: .65rem; }

/* Audit */
.audit-action { display: inline-flex; align-items: center; gap: 8px; color: #334b5b; font-size: .72rem; font-weight: 750; white-space: nowrap; }
.audit-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; color: var(--teal-dark); background: var(--teal-soft); }
.entity-chip { display: inline-flex; padding: 5px 8px; border-radius: 8px; color: #586b79; background: #f0f4f6; font-size: .64rem; font-weight: 750; white-space: nowrap; }
.audit-detail { display: block; max-width: 480px; color: #677886; font-size: .68rem; white-space: normal; word-break: break-word; }

/* Alerts */
.alert { display: flex; align-items: flex-start; gap: 9px; padding: 12px 13px; border-radius: 12px; font-size: .75rem; }
.alert-error { color: #8e3948; background: var(--red-soft); border: 1px solid #f3cfd5; }
.alert .icon { margin-top: 1px; }

/* Authentication */
.auth-body { min-height: 100vh; background: #eef4f6; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(520px, 1.15fr) minmax(440px, .85fr); }
.auth-visual { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: clamp(34px, 5vw, 72px); color: #fff; background: radial-gradient(circle at 79% 14%, rgba(40,175,174,.24), transparent 27%), linear-gradient(145deg, #0a2b44 0%, #113d58 58%, #08787c 145%); }
.auth-grid { position: absolute; inset: 0; opacity: .07; background-image: linear-gradient(rgba(255,255,255,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom right, #000, transparent 78%); }
.auth-shape { position: absolute; border-radius: 50%; border: 1px solid rgba(119,224,218,.13); }
.auth-shape-one { width: 430px; height: 430px; right: -170px; top: 24%; box-shadow: 0 0 0 55px rgba(255,255,255,.018), 0 0 0 110px rgba(255,255,255,.012); }
.auth-shape-two { width: 220px; height: 220px; left: -110px; bottom: -65px; background: rgba(9,145,146,.09); }
.auth-visual-content { position: relative; z-index: 1; max-width: 720px; flex: 1; display: flex; flex-direction: column; }
.auth-brand, .mobile-auth-brand, .public-brand { display: flex; align-items: center; gap: 14px; color: #fff; }
.auth-brand:hover { color: #fff; }
.auth-brand img { width: 56px; height: 56px; }
.auth-brand > span, .mobile-auth-brand > span, .public-brand > span { display: flex; flex-direction: column; line-height: 1.12; }
.auth-brand small, .mobile-auth-brand small, .public-brand small { font-size: .7rem; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; opacity: .7; }
.auth-brand strong, .mobile-auth-brand strong, .public-brand strong { font-size: 1.28rem; letter-spacing: -.025em; }
.auth-brand em, .mobile-auth-brand em, .public-brand em { margin-top: 4px; color: #72d7d2; font-size: .75rem; font-style: normal; font-weight: 700; }
.auth-message { max-width: 670px; margin: auto 0; padding: 70px 0 50px; }
.auth-kicker { display: inline-flex; align-items: center; padding: 7px 11px; border: 1px solid rgba(126,220,216,.22); border-radius: 999px; color: #a8e5e2; background: rgba(7,138,141,.12); font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.auth-message h1 { max-width: 650px; margin: 20px 0 18px; color: #fff; font-size: clamp(2.55rem, 4.6vw, 4.35rem); line-height: 1.02; letter-spacing: -.055em; }
.auth-message p { max-width: 580px; margin: 0; color: #b6ccd6; font-size: 1rem; line-height: 1.65; }
.auth-benefits { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: auto; }
.auth-benefits > div { min-height: 118px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 17px; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; background: rgba(255,255,255,.045); backdrop-filter: blur(8px); }
.auth-benefits .icon { color: #70d7d2; }
.auth-benefits span { display: flex; flex-direction: column; }
.auth-benefits strong { color: #fff; font-size: .74rem; }
.auth-benefits small { margin-top: 3px; color: #90aab7; font-size: .62rem; }
.auth-visual-footer { position: relative; z-index: 1; margin-top: 24px; color: #7593a4; font-size: .68rem; }
.auth-form-side { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px clamp(28px, 5vw, 72px); background: #f5f9fa; }
.mobile-auth-brand { display: none; }
.login-card { width: min(100%, 450px); padding: 35px; border: 1px solid #dce6eb; border-radius: 24px; background: rgba(255,255,255,.96); box-shadow: var(--shadow-lg); }
.login-heading { position: relative; margin-bottom: 26px; }
.login-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 15px; color: var(--teal-dark); background: var(--teal-soft); }
.login-heading h2 { margin-bottom: 8px; font-size: 2rem; letter-spacing: -.04em; }
.login-heading p { margin: 0; color: var(--muted); font-size: .82rem; }
.login-form { display: grid; gap: 17px; }
.password-field input { padding-right: 47px; }
.password-toggle { position: absolute; z-index: 2; right: 6px; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 9px; color: #82929e; background: transparent; cursor: pointer; }
.password-toggle:hover { color: var(--teal-dark); background: var(--teal-soft); }
.login-submit { margin-top: 4px; justify-content: space-between; padding-left: 20px; padding-right: 16px; }
.demo-credentials { display: flex; align-items: flex-start; gap: 10px; margin-top: 21px; padding: 12px; border: 1px dashed #dcc68f; border-radius: 12px; background: #fffaf0; }
.demo-badge { padding: 4px 6px; border-radius: 6px; color: #8b620e; background: #f7e6b9; font-size: .55rem; font-weight: 900; letter-spacing: .06em; }
.demo-credentials > div { display: flex; flex-direction: column; }
.demo-credentials strong { color: #725719; font-size: .68rem; }
.demo-credentials small { margin-top: 2px; color: #8c7440; font-size: .6rem; line-height: 1.55; }
.demo-credentials code { padding: 1px 3px; border-radius: 4px; color: #634b16; background: rgba(154,117,34,.08); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.login-security { display: flex; align-items: center; gap: 7px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); color: #81909b; font-size: .62rem; }
.login-security .icon { color: var(--teal); }
.auth-copyright { margin: 24px 0 0; color: #8c9aa5; font-size: .65rem; }

/* Public response pages */
.response-body { min-height: 100vh; position: relative; overflow-x: hidden; color: var(--ink); background: radial-gradient(circle at 50% -15%, #dff3f1 0%, #eff6f7 42%, #f4f7f8 72%); }
.public-orb { position: fixed; z-index: 0; border-radius: 50%; filter: blur(1px); pointer-events: none; }
.public-orb-one { width: 330px; height: 330px; top: -180px; left: -140px; border: 1px solid rgba(7,138,141,.1); box-shadow: 0 0 0 60px rgba(7,138,141,.025), 0 0 0 120px rgba(18,59,93,.018); }
.public-orb-two { width: 250px; height: 250px; right: -130px; bottom: -100px; background: rgba(18,59,93,.025); }
.response-shell { position: relative; z-index: 1; width: min(100% - 30px, 680px); margin: 0 auto; padding: 38px 0 28px; }
.public-brand { justify-content: center; margin-bottom: 27px; color: var(--navy); }
.public-brand img { width: 50px; height: 50px; }
.public-brand small { color: #728899; }
.public-brand em { color: var(--teal-dark); }
.response-card { padding: clamp(24px, 5vw, 42px); border: 1px solid rgba(209,223,229,.95); border-radius: 26px; background: rgba(255,255,255,.97); box-shadow: 0 24px 65px rgba(14,46,64,.12); }
.response-heading { text-align: center; }
.response-heading-icon { width: 55px; height: 55px; display: grid; place-items: center; margin: 0 auto 17px; border-radius: 17px; color: #fff; background: linear-gradient(145deg, var(--navy), var(--teal)); box-shadow: 0 11px 22px rgba(12,70,85,.18); }
.response-heading h1 { margin-bottom: 9px; font-size: clamp(1.75rem, 5vw, 2.35rem); }
.response-heading p { margin-bottom: 0; color: var(--muted); font-size: .84rem; }
.guard-summary-card { display: grid; gap: 0; margin: 28px 0 20px; border: 1px solid var(--line); border-radius: 17px; overflow: hidden; background: #fbfdfd; }
.guard-summary-card > div { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.guard-summary-card > div:last-child { border-bottom: 0; }
.summary-icon { width: 37px; height: 37px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; color: var(--navy); background: var(--navy-soft); }
.summary-icon-amber { color: var(--amber); background: var(--amber-soft); }
.guard-summary-card > div > span:last-child { display: flex; flex-direction: column; }
.guard-summary-card small { color: var(--muted-2); font-size: .62rem; font-weight: 750; text-transform: uppercase; letter-spacing: .045em; }
.guard-summary-card strong { margin-top: 2px; color: #283f50; font-size: .8rem; }
.public-notes { display: flex; gap: 10px; margin-bottom: 18px; padding: 14px; border-radius: 13px; color: #556a79; background: #f5f8f9; }
.public-notes > .icon { margin-top: 1px; color: var(--teal-dark); }
.public-notes strong { color: #3b5363; font-size: .7rem; }
.public-notes p { margin: 4px 0 0; font-size: .7rem; white-space: pre-wrap; }
.response-notice { display: flex; align-items: flex-start; gap: 9px; margin: 17px 0; padding: 13px; border: 1px solid #eedcb5; border-radius: 13px; color: #765c27; background: #fff9ed; }
.response-notice .icon { margin-top: 1px; flex: 0 0 auto; }
.response-notice p { margin: 0; font-size: .68rem; }
.decision-form { display: grid; gap: 11px; }
.decision-button { width: 100%; min-height: 76px; display: grid; grid-template-columns: 47px minmax(0,1fr) auto; align-items: center; gap: 13px; padding: 12px 15px; border: 1px solid; border-radius: 16px; text-align: left; cursor: pointer; transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition); }
.decision-button:hover { transform: translateY(-2px); }
.decision-button:active { transform: translateY(0); }
.decision-icon { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 13px; }
.decision-button > span:nth-child(2) { display: flex; flex-direction: column; }
.decision-button strong { font-size: .9rem; letter-spacing: .02em; }
.decision-button small { margin-top: 2px; font-size: .66rem; }
.decision-accept { color: #236f52; border-color: #c9e7d9; background: #f3fbf7; }
.decision-accept .decision-icon { color: #fff; background: var(--green); }
.decision-accept small { color: #6b8e7e; }
.decision-accept:hover { border-color: #9ed2ba; background: #edfaf3; box-shadow: 0 12px 25px rgba(22,135,92,.1); }
.decision-reject { color: #96505b; border-color: #efd4d9; background: #fef7f8; }
.decision-reject .decision-icon { color: #fff; background: var(--red); }
.decision-reject small { color: #9b7880; }
.decision-reject:hover { border-color: #e7b6bf; background: #fdf1f3; box-shadow: 0 12px 25px rgba(200,68,85,.08); }
.response-security { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); color: #8b99a3; font-size: .61rem; text-align: center; }
.response-security .icon { color: var(--teal); }
.public-state { display: flex; align-items: flex-start; gap: 11px; margin-top: 22px; padding: 15px; border-radius: 14px; }
.public-state > .icon { flex: 0 0 auto; margin-top: 1px; }
.public-state strong { font-size: .77rem; }
.public-state p { margin: 3px 0 0; font-size: .68rem; }
.public-state-error { color: #91414f; background: var(--red-soft); }
.public-state-info { color: #486877; background: var(--cyan-soft); }
.public-footer { margin-top: 19px; color: #8796a1; font-size: .64rem; text-align: center; }
.response-done-card { text-align: center; }
.result-symbol { width: 70px; height: 70px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 22px; }
.result-accept { color: #fff; background: var(--green); box-shadow: 0 13px 28px rgba(22,135,92,.18); }
.result-reject { color: #fff; background: var(--red); box-shadow: 0 13px 28px rgba(200,68,85,.16); }
.result-neutral { color: var(--teal-dark); background: var(--teal-soft); }
.response-done-card h1 { margin-bottom: 10px; font-size: clamp(1.7rem, 5vw, 2.25rem); }
.result-shift { margin-bottom: 9px; color: var(--muted); font-size: .85rem; }
.result-date { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 9px; color: #456071; background: #f3f7f8; font-size: .68rem; font-weight: 750; }
.result-info { text-align: left; }
.close-page { margin: 21px 0 0; color: #87959f; font-size: .68rem; }

/* Responsive */
@media (max-width: 1240px) {
  :root { --sidebar-width: 265px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: minmax(0,1.45fr) minmax(290px,.72fr); }
  .shift-facts { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .auth-shell { grid-template-columns: minmax(480px, 1.04fr) minmax(420px, .96fr); }
  .auth-benefits { grid-template-columns: 1fr; max-width: 430px; }
  .auth-benefits > div { min-height: auto; flex-direction: row; }
}

@media (max-width: 1040px) {
  .dashboard-grid, .shift-detail-grid, .form-page-layout { grid-template-columns: 1fr; }
  .dashboard-side { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .creation-guide { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .sticky-panel { position: static; }
  .participants-layout { grid-template-columns: 300px minmax(0,1fr); }
  .response-summary { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-form-side { min-height: 100vh; padding-top: 32px; padding-bottom: 32px; background: radial-gradient(circle at 50% -10%, #dcefed, #f5f9fa 42%); }
  .mobile-auth-brand { display: flex; margin-bottom: 25px; color: var(--navy); }
  .mobile-auth-brand img { width: 50px; height: 50px; }
  .mobile-auth-brand small { color: #748996; }
  .mobile-auth-brand em { color: var(--teal-dark); }
}

@media (max-width: 900px) {
  :root { --sidebar-width: 285px; }
  .sidebar { transform: translateX(-105%); transition: transform 220ms ease; }
  body.sidebar-open { overflow: hidden; }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-overlay { position: fixed; inset: 0; z-index: 55; display: block; border: 0; background: rgba(7,27,41,.48); opacity: 0; pointer-events: none; transition: opacity 220ms ease; }
  body.sidebar-open .sidebar-overlay { opacity: 1; pointer-events: auto; }
  .app-main { margin-left: 0; }
  .mobile-menu-button { display: inline-grid; margin-left: -7px; }
  .content { padding-top: 30px; }
  .participants-layout { grid-template-columns: 1fr; }
  .participants-layout aside .panel { max-width: 620px; }
}

@media (max-width: 720px) {
  h1 { font-size: 2rem; }
  .topbar { height: 68px; padding: 0 15px; }
  .topbar-subtitle, .system-status { display: none; }
  .topbar-new span { display: none; }
  .topbar-new { width: 39px; min-width: 39px; padding: 0; }
  .content { padding: 25px 15px 38px; }
  .app-footer { flex-direction: column; gap: 4px; padding: 16px; }
  .page-header-with-action { align-items: flex-start; flex-direction: column; }
  .page-header-with-action .button { width: 100%; }
  .header-summary { align-items: flex-start; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 11px; }
  .stat-card { min-height: 126px; flex-direction: column; gap: 9px; padding: 16px; }
  .stat-icon { width: 39px; height: 39px; border-radius: 12px; }
  .stat-copy strong { font-size: 1.65rem; }
  .stat-copy small { max-width: 130px; }
  .dashboard-side, .creation-guide { grid-template-columns: 1fr; }
  .panel-heading { min-height: auto; align-items: flex-start; flex-direction: column; padding: 20px 18px 15px; }
  .panel-heading .text-link { align-self: flex-start; }
  .panel-heading.compact { flex-direction: row; align-items: center; padding: 0 0 17px; }
  .table-search { width: 100%; min-width: 0; }
  .dashboard-table th:nth-child(3), .dashboard-table td:nth-child(3) { display: none; }
  .dashboard-table th, .dashboard-table td { padding-left: 13px; padding-right: 13px; }
  .dashboard-table th:first-child, .dashboard-table td:first-child { padding-left: 18px; }
  .dashboard-table th:last-child, .dashboard-table td:last-child { padding-right: 18px; }
  .shift-title-cell strong { max-width: 180px; }
  .participants-heading { flex-direction: column; }
  .rotation-explainer { margin-left: 18px; margin-right: 18px; overflow: hidden; }
  .shift-title-row { flex-direction: column; gap: 12px; }
  .shift-facts { grid-template-columns: 1fr 1fr; gap: 10px; }
  .shift-facts article { min-height: 97px; padding: 14px; }
  .fact-icon { width: 39px; height: 39px; }
  .response-summary { grid-template-columns: 1fr 1fr; }
  .form-panel { padding: 21px 18px; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
  .offers-table th:nth-child(4), .offers-table td:nth-child(4), .offers-table th:nth-child(5), .offers-table td:nth-child(5) { display: none; }
  .auth-form-side { padding-left: 18px; padding-right: 18px; }
  .login-card { padding: 27px 22px; border-radius: 20px; }
  .mobile-auth-brand { width: min(100%, 450px); }
  .response-shell { width: min(100% - 20px, 680px); padding-top: 23px; }
  .public-brand { margin-bottom: 18px; }
  .public-brand img { width: 43px; height: 43px; }
  .public-brand strong { font-size: 1.05rem; }
  .public-brand small { font-size: .58rem; }
  .public-brand em { font-size: .65rem; }
  .response-card { padding: 24px 18px; border-radius: 21px; }
}

@media (max-width: 500px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 104px; flex-direction: row; align-items: center; }
  .stat-copy small { max-width: none; }
  .shift-facts { grid-template-columns: 1fr; }
  .shift-facts article { min-height: 86px; }
  .assignment-banner { align-items: flex-start; }
  .assignment-check { display: none; }
  .response-summary { gap: 8px; }
  .response-summary > div { padding-left: 30px; }
  .data-table th, .data-table td { padding-left: 12px; padding-right: 12px; }
  .participants-panel .data-table th:nth-child(3), .participants-panel .data-table td:nth-child(3) { display: none; }
  .rotation-explainer > span:nth-child(4), .rotation-explainer > span:nth-child(5) { display: none; }
  .decision-button { min-height: 72px; grid-template-columns: 43px minmax(0,1fr) auto; gap: 10px; padding: 10px 12px; }
  .decision-icon { width: 42px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media print {
  .sidebar, .topbar, .app-footer, .button, button, .table-search { display: none !important; }
  .app-main { margin: 0; }
  .content { max-width: none; padding: 0; }
  .panel, .stat-card, .shift-facts article { box-shadow: none; break-inside: avoid; }
}

/* Ajustes finales de la versión visual HUIL */
.response-summary-wrap { padding: 0 24px 20px; }
.uncovered-banner { border-color: #f0cdd3; background: linear-gradient(135deg, #fbedef, #fff8f9); }
.uncovered-banner .assignment-icon { background: var(--red); }
.uncovered-banner > div > span, .uncovered-banner strong, .uncovered-banner small, .uncovered-banner .assignment-check { color: var(--red); }
.action-panel .panel-heading, .details-panel .panel-heading { margin-bottom: 2px; }
@media (max-width: 720px) {
  .response-summary-wrap { padding: 0 18px 18px; }
}
