:root {
  --ink: #17231f;
  --muted: #64736d;
  --line: #dfe7e2;
  --paper: #ffffff;
  --canvas: #f3f6f3;
  --brand: #12372a;
  --brand-2: #1e5b43;
  --accent: #d9ef62;
  --blue: #dcecf7;
  --yellow: #fff1bd;
  --peach: #ffe0cf;
  --danger: #a83b36;
  --shadow: 0 18px 45px rgba(20, 55, 42, .10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; }
.login-intro { background: var(--brand); color: white; padding: clamp(42px, 8vw, 110px); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-intro::after { content: ""; width: 420px; height: 420px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; position: absolute; right: -150px; bottom: -190px; box-shadow: 0 0 0 70px rgba(255,255,255,.035), 0 0 0 140px rgba(255,255,255,.025); }
.brand-mark { display: flex; align-items: center; gap: 13px; font-weight: 800; letter-spacing: -.02em; font-size: 1.15rem; }
.brand-symbol { width: 48px; height: 48px; display: block; object-fit: contain; flex: 0 0 auto; }
.login-intro h1 { font-size: clamp(2.8rem, 5vw, 5.4rem); line-height: .95; letter-spacing: -.065em; margin: 90px 0 26px; max-width: 720px; }
.login-intro p { max-width: 620px; font-size: 1.1rem; color: #cddbd4; line-height: 1.65; }
.login-panel { background: var(--paper); display: grid; place-items: center; padding: 38px; }
.login-card { width: min(440px, 100%); }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 800; color: var(--brand-2); }
h2 { font-size: 2rem; letter-spacing: -.04em; margin: 10px 0 8px; }
.subtle { color: var(--muted); line-height: 1.55; }
.field { display: grid; gap: 7px; margin: 18px 0; }
.field label { font-size: .83rem; font-weight: 750; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fbfcfb; outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(30,91,67,.12); }
.primary { border: 0; border-radius: 12px; padding: 12px 17px; background: var(--brand); color: white; font-weight: 750; }
.primary:hover { background: var(--brand-2); }
.secondary { border: 1px solid var(--line); border-radius: 10px; padding: 9px 13px; background: white; color: var(--ink); font-weight: 700; }
.danger { color: var(--danger); }
.full { width: 100%; }
.demo-box { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 20px; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-user { border: 1px solid var(--line); border-radius: 10px; padding: 9px; background: #f7faf8; text-align: left; font-size: .75rem; }
.demo-user strong { display: block; font-size: .82rem; }
.error { color: var(--danger); background: #fff0ef; border-radius: 10px; padding: 10px 12px; font-size: .86rem; margin: 12px 0; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 270px 1fr; }
.sidebar { background: var(--brand); color: white; padding: 25px 18px; display: flex; flex-direction: column; gap: 30px; position: sticky; top: 0; height: 100vh; }
.sidebar .brand-mark { padding: 0 8px; }
.nav { display: grid; gap: 5px; }
.nav button { border: 0; color: #d3e1da; background: transparent; border-radius: 11px; text-align: left; padding: 11px 12px; font-weight: 650; }
.nav button:hover, .nav button.active { color: white; background: rgba(255,255,255,.12); }
.user-block { margin-top: auto; border-top: 1px solid rgba(255,255,255,.14); padding: 18px 8px 0; }
.user-name { font-weight: 800; }
.role-label { color: #a9c1b5; font-size: .78rem; margin-top: 3px; }
.logout { margin-top: 13px; color: white; border: 0; background: transparent; padding: 0; font-size: .82rem; text-decoration: underline; }
.content { padding: clamp(24px, 4vw, 54px); min-width: 0; }
.topbar { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 28px; }
.topbar h1 { font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1; letter-spacing: -.055em; margin: 7px 0 10px; }
.pill { display: inline-flex; border-radius: 999px; padding: 6px 10px; background: #e3ece7; color: var(--brand); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.grid { display: grid; gap: 18px; }
.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat, .card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 2px 0 rgba(18,55,42,.02); }
.stat { padding: 22px; }
.stat-value { font-size: 2.3rem; font-weight: 850; letter-spacing: -.05em; }
.stat-label { color: var(--muted); font-size: .85rem; margin-top: 3px; }
.card { padding: 22px; }
.card h3 { margin: 0 0 14px; font-size: 1.12rem; }
.section { margin-top: 22px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 13px; }
.section-head h2 { margin: 0; font-size: 1.4rem; }
.table-wrap { overflow: auto; background: white; border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; min-width: 770px; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: .87rem; }
th { color: var(--muted); background: #f8faf8; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; }
tr:last-child td { border-bottom: 0; }
.status { display: inline-flex; border-radius: 999px; padding: 4px 8px; font-size: .7rem; font-weight: 800; }
.status.definitive, .status.approved, .status.accepted { background: #dff3e6; color: #186035; }
.status.provisional, .status.pending { background: var(--yellow); color: #6e5310; }
.status.rejected, .status.unavailable { background: #fae0df; color: #8d2925; }
.coverage-low { color: var(--danger); font-weight: 800; }
.split { grid-template-columns: 1.1fr .9fr; }
.announcement { padding: 14px 0; border-bottom: 1px solid var(--line); }
.announcement:last-child { border-bottom: 0; }
.announcement strong { display: block; margin-bottom: 5px; }
.announcement small { color: var(--muted); }
.request-card, .vacancy-card { border: 1px solid var(--line); border-radius: 14px; padding: 17px; margin-bottom: 12px; background: white; }
.request-card header, .vacancy-card header { display: flex; justify-content: space-between; gap: 12px; }
.meta { color: var(--muted); font-size: .8rem; margin: 6px 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 13px; }
.rules { background: var(--brand); color: white; }
.rules li { margin: 9px 0; color: #d9e4df; line-height: 1.45; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 15px; }
.span-2 { grid-column: span 2; }
.empty { padding: 35px; text-align: center; color: var(--muted); }
.toast { position: fixed; right: 25px; bottom: 25px; background: var(--ink); color: white; padding: 13px 17px; border-radius: 12px; box-shadow: var(--shadow); z-index: 10; }
@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-intro { min-height: 310px; padding: 35px; }
  .login-intro h1 { margin: 55px 0 15px; font-size: 3rem; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .nav { grid-template-columns: repeat(2, 1fr); }
  .user-block { margin-top: 0; }
  .stats, .split { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .content { padding: 22px 14px; }
  .login-panel { padding: 26px 20px; }
  .demo-grid, .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .topbar { display: block; }
}

/* Interfície operativa inspirada en les maquetes CECAT */
:root {
  --navy: #071d35;
  --navy-2: #0c2f55;
  --action: #0868cf;
  --pale-blue: #d9ecff;
  --pale-green: #d8f3df;
  --pale-yellow: #fff0bd;
  --pale-peach: #ffe1da;
}
.app-shell { grid-template-columns: 218px minmax(0, 1fr); background: #edf2f7; }
.sidebar { background: linear-gradient(165deg, var(--navy), #06182c 72%); padding: 23px 14px 18px; gap: 24px; box-shadow: 4px 0 22px rgba(4,23,42,.16); }
.cecat-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 14px; color: white; }
.cecat-seal { width: 46px; height: 46px; display: block; object-fit: contain; flex: 0 0 auto; }
.cecat-brand strong { display: block; font-size: 1.17rem; letter-spacing: .02em; }
.cecat-brand small { display: block; font-size: .56rem; line-height: 1.15; color: #d4deea; font-weight: 550; }
.nav { gap: 6px; }
.nav button { display: flex; align-items: center; gap: 11px; min-height: 43px; padding: 10px 12px; color: #e0e9f2; font-size: .84rem; }
.nav button.active { background: linear-gradient(90deg, #0d5dad, #155e9a); box-shadow: inset 3px 0 0 #58aaff, 0 5px 16px rgba(0,0,0,.18); }
.nav-icon { width: 20px; height: 20px; display: grid; place-items: center; font-size: 1.05rem; color: #fff; }
.mobile-more { display: none !important; }
.user-block { display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: center; padding: 18px 7px 0; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #1d6095; color: white; font-weight: 800; font-size: .78rem; }
.user-name { font-size: .82rem; }
.role-label { font-size: .68rem; }
.logout { font-size: .68rem; margin-top: 4px; color: #b9ccdc; }
.content { padding: 22px 25px 42px; overflow: hidden; }
.topbar { margin-bottom: 20px; }
.topbar h1 { font-size: 2.15rem; color: #101b2b; }
.eyebrow { color: #1768ad; }
.stat, .card, .table-wrap { box-shadow: 0 7px 24px rgba(35,63,91,.06); }
.primary { background: var(--action); }
.primary:hover { background: #075bb4; }
.quadrant-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.quadrant-header h1 { margin: 0; font-size: 1.7rem; letter-spacing: -.04em; color: #101a28; }
.quadrant-header p { margin: 5px 0 0; color: #516173; font-size: .83rem; }
.quadrant-actions { display: flex; align-items: center; gap: 7px; font-size: .8rem; }
.quadrant-actions .secondary { padding: 8px 11px; }
.quadrant-toolbar { display: flex; align-items: center; gap: 8px; background: white; border: 1px solid #d9e1e9; padding: 9px 11px; border-radius: 10px 10px 0 0; }
.quadrant-toolbar select { border: 1px solid #d7e0e9; background: white; border-radius: 6px; padding: 7px 9px; color: #35465b; font-size: .73rem; }
.legend { display: flex; gap: 12px; align-items: center; margin-left: auto; color: #526174; font-size: .66rem; white-space: nowrap; }
.legend span { display: flex; align-items: center; gap: 4px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.green { background: #2bb46f; }.dot.blue { background: #2582dc; }.dot.yellow { background: #f1bd2c; }.dot.peach { background: #e98a7c; }
.published { color: #13784a; font-size: .68rem; font-weight: 800; background: #d9f3e4; padding: 5px 8px; border-radius: 999px; }
.roster-wrap { border-radius: 0 0 11px 11px; box-shadow: 0 10px 30px rgba(25,50,79,.08); }
.roster-grid { min-width: 920px; table-layout: fixed; }
.schedule-grid { min-width: 1560px; }
.schedule-grid thead th:first-child { width: 190px; }
.schedule-grid .date-group { background: #f7f9fb; text-transform: capitalize; }
.schedule-grid .date-group b { display: inline; margin-left: 5px; }
.schedule-grid .date-group small { display: block; }
.shift-heading { font-size: .64rem !important; text-align: center !important; text-transform: none !important; letter-spacing: 0 !important; padding: 6px 3px !important; }
.shift-heading small { display: block; margin-top: 2px; color: #6d7b8a; font-size: .57rem; font-weight: 650; }
.night-heading, .night-shift { background: #edf0f2 !important; }
.assignment-cell { padding: 5px 6px !important; text-align: center !important; white-space: normal; line-height: 1.15; color: #1d2935; }
.assignment-name { display: block; font-size: .65rem; }
.cap-shift { background: #cfe2f3 !important; }
.daily-assignment { background: white; font-size: .67rem !important; }
.observation-cell { white-space: normal; font-size: .59rem !important; line-height: 1.2; background: #fffdf6; }
.source-badge { margin-left: auto; color: #31546f; background: #e5eef5; border-radius: 999px; padding: 6px 10px; font-size: .65rem; font-weight: 800; white-space: nowrap; }
.roster-grid th, .roster-grid td { padding: 4px; height: 31px; border-right: 1px solid #e4eaf0; font-size: .68rem; }
.roster-grid thead th { text-align: center; background: #f7f9fb; color: #34465a; height: 46px; }
.roster-grid thead th:first-child { width: 165px; text-align: left; padding-left: 13px; }
.roster-grid thead th b { display: block; font-size: .78rem; color: #18283a; }
.roster-grid thead th small { text-transform: uppercase; color: #6d7b8a; }
.roster-grid thead th.today { background: #dcecff; color: #075cad; }
.roster-grid .group-row th { background: #eef3f7; text-align: left; height: 27px; font-size: .75rem; color: #14243a; padding: 5px 10px; }
.group-toggle { width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; margin-right: 6px; background: #d7e9fb; color: #1a67aa; font-weight: 900; }
.group-dot { width: 9px; height: 9px; display: inline-block; border-radius: 3px; background: #1468b3; margin-right: 7px; }
.group-2 { background: #d9253f; }.group-3 { background: #225fa4; }.group-4 { background: #f2bc29; }.group-5 { background: #ef8d62; }
.role-cell { background: white; text-align: left !important; padding-left: 27px !important; color: #36475a; font-weight: 650; }
.roster-chip { min-height: 23px; padding: 3px 5px; border-radius: 4px; display: flex; align-items: center; gap: 5px; overflow: hidden; white-space: nowrap; color: #2b4254; }
.roster-chip b { min-width: 19px; color: #135792; font-size: .61rem; }
.chip-green { background: var(--pale-green); }.chip-blue { background: var(--pale-blue); }.chip-yellow { background: var(--pale-yellow); }.chip-peach { background: var(--pale-peach); }
.roster-empty { color: #b2bcc5; display: block; text-align: center; }
.mobile-week { display: none; }
.personal-tabs { display: inline-grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #dce3ea; border-radius: 8px; overflow: hidden; margin-bottom: 16px; background: white; }
.personal-tabs button { border: 0; background: white; padding: 9px 34px; color: #506174; }
.personal-tabs button.active { background: #e5f1fd; color: #075dac; box-shadow: inset 0 -2px #0871dc; }
.duty-list { display: grid; gap: 10px; max-width: 760px; }
.duty-card { display: grid; grid-template-columns: 60px 1fr auto; align-items: center; gap: 13px; border: 1px solid #dbe3ea; border-left: 5px solid #2ba66b; border-radius: 10px; padding: 11px 15px; background: #e6f6eb; }
.duty-yellow { border-left-color: #e7b52e; background: #fff4cf; }.duty-blue { border-left-color: #2d7ec8; background: #e4f0fb; }
.duty-date { text-align: center; border-right: 1px solid rgba(0,0,0,.08); }
.duty-date strong { display: block; font-size: .68rem; }.duty-date span { font-size: 1.25rem; font-weight: 850; }
.duty-card p { margin: 3px 0 0; color: #526174; font-size: .78rem; }.duty-card time { font-size: .8rem; font-weight: 750; }

.login-shell { background: var(--navy); grid-template-columns: 1.08fr .92fr; }
.login-intro { background: radial-gradient(circle at 25% 30%, rgba(39,104,165,.34), transparent 36%), linear-gradient(145deg, #071a30, #0b345d); }
.login-intro::before { content: ""; position: absolute; inset: 0; opacity: .22; background: linear-gradient(110deg, transparent 48%, rgba(255,255,255,.08) 48.3%, transparent 49%), linear-gradient(25deg, transparent 60%, rgba(255,255,255,.05) 60.3%, transparent 61%); }
.login-intro > * { position: relative; z-index: 1; }
.brand-symbol { filter: drop-shadow(0 3px 8px rgba(0,0,0,.22)); }
.login-panel { background: #f5f7fa; }
.login-card { background: white; border: 1px solid #dfe5eb; border-radius: 16px; padding: 31px; box-shadow: 0 24px 60px rgba(0,0,0,.18); }

@media (max-width:1100px), (max-width:1366px) and (pointer:coarse) {
  body { padding-bottom: 71px; background: #f3f6f9; }
  .app-shell { display: block; }
  .sidebar { height: auto; min-height: 72px; position: static; display: block; padding: 14px 16px; box-shadow: none; }
  .cecat-brand { padding: 0; }
  .cecat-brand small { display: none; }
  .cecat-seal { width: 32px; height: 32px; }
  .nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; height: 70px; padding: 6px 8px 9px; background: white; border-top: 1px solid #dbe3ea; display: flex; overflow-x: auto; gap: 0; box-shadow: 0 -5px 20px rgba(15,40,65,.08); }
  .nav button { flex: 1 0 76px; min-height: 55px; padding: 5px 3px; display: grid; place-items: center; gap: 0; color: #526274; border-radius: 7px; font-size: .57rem; text-align: center; }
  .nav button:nth-child(n+5):not(.mobile-more) { display: none; }
  .nav .mobile-more { display: grid !important; }
  .nav button.active { color: #0768c9; background: #edf6ff; box-shadow: none; }
  .nav-icon { font-size: 1.2rem; height: 24px; }
  .user-block { position: absolute; right: 14px; top: 13px; border: 0; padding: 0; display: flex; }
  .user-block > div, .logout { display: none; }
  .avatar { width: 36px; height: 36px; background: #1f628e; }
  body.nav-expanded .nav { height: auto; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); padding: 12px; }
  body.nav-expanded .nav button:nth-child(n) { display: flex; flex-direction: row; justify-content: flex-start; gap: 10px; padding: 10px 12px; font-size: .75rem; }
  body.nav-expanded .nav .mobile-more { display: flex !important; }
  .content { padding: 18px 12px 32px; }
  .quadrant-header { align-items: flex-start; }
  .quadrant-header h1 { font-size: 1.35rem; }
  .quadrant-header p { display: none; }
  .quadrant-actions { display: none; }
  .quadrant-toolbar { border-radius: 9px; padding: 8px; overflow-x: auto; }
  .quadrant-toolbar select { min-width: 145px; }
  .quadrant-toolbar select:nth-child(n+2), .legend, .published { display: none; }
  .mobile-week { display: flex; justify-content: space-between; align-items: center; padding: 12px 6px; background: white; border-left: 1px solid #d9e1e9; border-right: 1px solid #d9e1e9; font-size: .78rem; }
  .mobile-week button { border: 0; background: transparent; font-size: 1.3rem; }
  .roster-wrap { border-radius: 0 0 9px 9px; overflow: hidden; }
  .roster-grid { min-width: 100%; table-layout: fixed; }
  .roster-grid thead th:first-child { width: 42%; }
  .roster-grid thead th[data-day-index]:not([data-day-index="0"]), .roster-grid td[data-day-index]:not([data-day-index="0"]) { display: none; }
  .schedule-grid .date-group { width: 58%; }
  .schedule-grid .shift-heading { width: 29%; }
  .schedule-grid .assignment-name { font-size: .62rem; }
  .roster-grid th, .roster-grid td { height: 34px; }
  .roster-grid .group-row th { width: 100%; }
  .roster-chip { min-height: 26px; }
  .personal-tabs { width: 100%; }
  .personal-tabs button { padding: 9px 8px; }
  .duty-card { grid-template-columns: 54px 1fr; }
  .duty-card time { grid-column: 2; }
  .login-shell { grid-template-columns: 1fr; background: linear-gradient(160deg, #071a30, #0c3965); min-height: 100vh; }
  .login-intro { min-height: 245px; padding: 28px 25px; }
  .login-intro h1 { margin: 48px 0 13px; font-size: 2.3rem; }
  .login-intro p { font-size: .92rem; }
  .login-panel { background: transparent; padding: 0 16px 30px; align-items: start; }
  .login-card { margin-top: -18px; padding: 24px; }
}

/* Stable navigation, seven-day roster and annual planning. */
[hidden] { display:none !important; }
.header-logout,.bottom-nav { display:none; }
.account-avatar,.mobile-tagline { display:none; }
.notification-choice { display:flex; align-items:center; gap:9px; margin:14px 0 8px; font-size:.85rem; }
.notification-choice input, #push-wanted { width:18px; height:18px; flex:0 0 auto; accent-color:#1268ae; }
.annual-grid .annual-team-row th { position:static; text-align:left; background:#dceafb; color:#103d68; padding:10px 12px; font-weight:800; border-top:3px solid #6d91b4; }
.annual-grid .annual-team-row.team-2 th { background:#e4f1e5; }
.annual-grid .annual-team-row.team-3 th { background:#fff0d5; }
.annual-grid .annual-team-row.team-4 th { background:#eee5f7; }
.user-block { display:flex; gap:12px; flex-wrap:wrap; }
.logout { min-height:36px; }
.menu-panel { width:min(520px,94vw); border:0; border-radius:20px; padding:24px; max-height:85dvh; color:var(--ink); }
.menu-panel::backdrop { background:rgba(7,26,48,.55); }
.menu-title { display:flex; justify-content:space-between; align-items:center; }
.menu-title h2 { margin:0; }
.menu-panel nav { display:grid; gap:6px; margin:18px 0; }
.menu-panel nav button { border:0; padding:14px; border-radius:10px; text-align:left; display:flex; gap:16px; background:#f1f5f9; color:#16334c; }
.menu-panel nav button.active { background:#dcecff; font-weight:800; }
.menu-panel .nav-icon,.bottom-nav .nav-icon { color:inherit; }
.upcoming-list { list-style:none; padding:0; margin:0; }
.upcoming-list li { display:grid; gap:4px; border-top:1px solid var(--line); padding:14px 0; }
.upcoming-list small { color:var(--muted); }
.scroll-hint { font-size:.8rem; color:var(--muted); }
.annual-controls { display:flex; flex-wrap:wrap; gap:16px; }
.annual-controls .field { margin:0; flex:1 1 150px; }
.annual-legend { display:flex; flex-wrap:wrap; gap:12px; padding:16px 0; font-size:.75rem; }
.annual-legend span { background:white; border-radius:8px; padding:7px; }
.annual-grid { min-width:1600px; table-layout:fixed; }
.annual-grid th,.annual-grid td { padding:9px 4px; font-size:.7rem; text-align:center; border-right:1px solid #e5eaf0; }
.annual-grid th:first-child { position:sticky; left:0; z-index:2; width:140px; text-align:left; background:#eff4f8; }
.annual-grid thead th { background:#153e65; color:white; }
.annual-grid thead th:first-child { background:#153e65; }
.annual-month .table-wrap { max-height:72vh; max-height:72dvh; overflow:auto; }
.annual-grid thead th { position:sticky; top:0; z-index:4; box-shadow:0 1px 0 #153e65; }
.annual-grid thead th:first-child { left:0; z-index:5; }
.annual-grid .annual-team-row th { position:static; }
.annual-grid small { display:block; }
.annual-day { background:#e4f2e9; }.annual-night { background:#e2eafa; }.outside { background:#e6e8eb; }
button:disabled { cursor:not-allowed; opacity:.5; }
@media (max-width:1100px), (max-width:1366px) and (pointer:coarse) {
 body { padding-bottom:calc(80px + env(safe-area-inset-bottom)); }
 .sidebar { position:relative; padding:14px 16px 12px; }
 .sidebar .cecat-brand { min-height:40px; padding-right:56px; }
 .account-avatar { position:absolute; right:16px; top:14px; width:40px; height:40px; display:grid; place-items:center; border-radius:50%; border:1px solid #90bee3; background:#21649c; color:#fff; font-size:.85rem; font-weight:750; padding:0; }
 .account-avatar:focus-visible { outline:3px solid white; outline-offset:3px; }
 .mobile-tagline { display:block; color:#e0ebf5; font-size:.73rem; line-height:1.45; margin:9px 0 0; }
 .sidebar .desktop-nav,.sidebar .user-block { display:none !important; }
 .header-logout { display:block; position:absolute; right:10px; top:17px; font-size:.7rem; min-height:36px; }
 .bottom-nav { position:fixed; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); bottom:0; left:0; right:0; z-index:30; padding:6px 4px calc(6px + env(safe-area-inset-bottom)); border-top:1px solid #d6e0e8; background:white; }
 .bottom-nav button { border:0; display:grid; gap:3px; align-content:center; justify-items:center; min-height:58px; color:#526274; background:white; font-size:.65rem; padding:3px; border-radius:10px; }
 .bottom-nav button.active { color:#0868ba; background:#eaf4ff; }
 .bottom-nav .nav-icon { font-size:1.35rem; }
 .roster-wrap { overflow:auto; max-height:72dvh; }
 .roster-grid { min-width:900px; table-layout:fixed; }
 .roster-grid thead th:first-child { width:96px; }
 .roster-grid thead th[data-day-index]:not([data-day-index="0"]),.roster-grid td[data-day-index]:not([data-day-index="0"]) { display:table-cell; }
 .schedule-grid .date-group { width:auto; }.schedule-grid .shift-heading { width:auto; }
 .roster-grid .role-cell { position:sticky; left:0; background:#eef3f8; z-index:2; }
 .schedule-grid .assignment-name { font-size:.72rem; white-space:normal; }
 .annual-grid { min-width:1500px; }
 .annual-month h2 { font-size:1.3rem; }
 .menu-panel { margin:auto auto calc(84px + env(safe-area-inset-bottom)); }
}

.annual-cell-edit{font:inherit;color:inherit;background:transparent;border:1px dashed currentColor;border-radius:4px;padding:4px;min-width:30px;cursor:pointer}.planning-dialog{width:min(540px,94vw);max-height:90vh;overflow:auto;border:0;border-radius:16px;padding:24px}.planning-dialog::backdrop{background:#0008}.planning-dialog select,.planning-dialog textarea{width:100%}.planning-dialog textarea{min-height:70px}#planning-error{color:#b42318}

.roster-grid .assignment-cell.on-call-activated{background:#d1fae5!important;box-shadow:inset 0 0 0 2px #059669}.activation-label{display:block;font-size:10px;letter-spacing:.06em;color:#065f46;margin-top:5px}.activate-roster-name{font:inherit;color:inherit;background:transparent;border:0;padding:6px 3px;cursor:pointer;text-decoration:underline;text-decoration-style:dotted}.roster-person{display:inline-block}

.annual-month>summary{cursor:pointer;padding:12px 4px;color:var(--primary,#123b67)}.annual-month>summary h2{display:inline;margin:0 0 0 8px;font-size:1.3rem}.annual-month:not([open]){margin-top:8px;margin-bottom:8px;border-bottom:1px solid #dce3ed}.annual-month>summary:focus-visible{outline:2px solid #2675bd;outline-offset:3px}

/* Tablet navigation uses the same full menu as phones, including iPad landscape. */
.sidebar{overflow-y:auto;max-height:100vh;max-height:100dvh}
.menu-panel{box-sizing:border-box;max-width:calc(100vw - 24px);max-height:calc(100vh - 110px);max-height:calc(100dvh - 110px);overflow-y:auto;-webkit-overflow-scrolling:touch}
@media (max-width:1100px), (max-width:1366px) and (pointer:coarse){
 .app-shell{display:block;grid-template-columns:minmax(0,1fr)}
 .sidebar{height:auto;max-height:none;overflow:visible;min-width:0;position:relative}
 .sidebar .desktop-nav,.sidebar .user-block{display:none!important}
 .content{width:100%;min-width:0;padding-bottom:100px}
 .menu-panel nav{position:static!important;height:auto;display:grid!important;grid-template-columns:minmax(0,1fr);overflow:visible}
 .menu-panel nav button{min-width:0;min-height:48px;white-space:normal}
 .quadrant-header{flex-wrap:wrap}.quadrant-actions{display:flex;flex-wrap:wrap}.quadrant-actions>.secondary,.quadrant-actions>strong{display:none}
 .calendar-export .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:540px){.calendar-export .form-grid{grid-template-columns:1fr}}

.quadrant-toolbar.roster-filters{flex-wrap:wrap;overflow:visible;gap:12px;align-items:flex-end}
.roster-filters label{display:grid;gap:5px;font-size:.75rem;color:#35465b;flex:1 1 150px}
.quadrant-toolbar.roster-filters select{display:block!important;width:100%;min-width:0;max-width:100%}
.roster-filters .source-badge{margin-left:auto;align-self:center}

.annual-grid .annual-room-row th{position:static;background:#edf2f7;color:#163c5c;text-align:left;padding:8px 12px;font-weight:800;border-top:2px solid #a5b8ca}

.annual-grid.annual-compact tbody td,.annual-grid.annual-compact tbody tr:not(.annual-room-row):not(.annual-team-row)>th{padding:4px 3px;line-height:1.15;height:auto;vertical-align:middle}
.annual-compact .annual-cell-edit{padding:2px 3px;min-height:24px;line-height:1.1}
.annual-grid.annual-compact .annual-room-row th{padding:6px 10px}
.communication-row{display:grid;gap:6px;width:100%;padding:15px;text-align:left;border:1px solid #dce4ed;border-radius:10px;background:#fff;color:#16334c;margin:8px 0}.communication-row.unread{border-left:5px solid #126dc0;background:#edf6ff}.communication-row span,.communication-row small{color:#526274}.communication-dialog{border:0;border-radius:16px;width:min(900px,94vw);max-height:88vh;max-height:88dvh;overflow:auto;padding:24px}.communication-dialog::backdrop{background:#071d3580}.communication-dialog h2{font-size:1.5rem;overflow-wrap:anywhere}.communication-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;padding:18px 0;border-bottom:1px solid #dce4ed;margin-bottom:20px}.communication-people{max-height:300px;overflow:auto;border:1px solid #dce4ed;border-radius:10px;padding:10px}.communication-people label{display:flex;align-items:center;gap:10px;padding:9px}.communication-people small{display:block;color:#526274}.communication-people input{width:18px;height:18px;flex:0 0 auto}.communication-dialog .table-wrap table{min-width:650px}

.communication-unread-banner{display:flex;align-items:center;gap:14px;width:100%;padding:16px 20px;margin:0 0 20px;border:2px solid #e9a20a;border-radius:15px;background:linear-gradient(115deg,#fff0a3,#ffd66b);color:#4c3000;box-shadow:0 5px 16px #b9791226;text-align:left;cursor:pointer}
.communication-unread-banner strong{display:block;font-size:1.05rem}.communication-unread-banner small{display:block;margin-top:4px;font-size:.8rem;color:#664400}.unread-banner-icon{font-size:1.8rem}.unread-banner-arrow{margin-left:auto;font-size:1.5rem}.communication-unread-banner:hover{border-color:#a76b00;background:#ffe084}.communication-unread-banner:focus-visible{outline:3px solid #126dc0;outline-offset:3px}
.communication-unread-badge,.avatar-unread-badge{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#d52c35;color:#fff;font-size:.7rem;font-weight:800;line-height:1;border:2px solid white}.communication-unread-badge{margin-left:auto}.account-avatar{overflow:visible}.avatar-unread-badge{position:absolute;right:-8px;top:-7px;min-width:23px;height:23px;padding:0 4px;box-shadow:0 2px 6px #0003}

.personal-tabs{grid-template-columns:repeat(2,minmax(0,1fr));max-width:100%}.duty-date small{display:block;font-size:.66rem;font-weight:650;line-height:1.25;margin-top:3px;text-transform:uppercase;color:#40566d}.duty-date span{display:block}

.roster-filter-toggle{display:none}
@media(max-width:760px){
 .roster-filter-toggle{display:inline-flex;align-items:center;gap:12px;min-height:42px;margin:0 0 8px;color:#124b7c;border-color:#b7cde1;background:#edf6ff}
 .roster-filter-shell .roster-filters-panel:not(.is-open){display:none}
 .roster-filter-shell .roster-filters-panel.is-open{display:flex;margin-bottom:8px}
}

.personnel-list-item{margin-top:10px}.personnel-open{display:grid;gap:7px;width:100%;text-align:left;cursor:pointer;color:#18364f}.personnel-open:hover{border-color:#126bc0;background:#eef7ff}.personnel-open span,.personnel-open small{color:#51677b}.personnel-dialog{width:min(1100px,96vw);max-height:92vh;max-height:92dvh;overflow:auto;border:0;border-radius:16px;padding:24px}.personnel-dialog::backdrop{background:#071d3580}.personnel-dialog h2{font-size:1.6rem}.personnel-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0}.personnel-tabs .active{background:#126bc0;color:#fff;border-color:#126bc0}.personnel-note-text{white-space:pre-wrap;overflow-wrap:anywhere}.personnel-note-important{border-left:5px solid #df9f12;background:#fff9e5}#personnel-status{color:#a33724;font-weight:650}.personnel-dialog .table-wrap table{min-width:580px}
@media(max-width:760px){.personnel-dialog{padding:16px}.personnel-dialog .split{grid-template-columns:1fr}.personnel-tabs{gap:6px}.personnel-tabs button{font-size:.8rem;padding:9px}}
