@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&family=Raleway:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --paper: #d1dacd;
  --surface: #ffffff;
  --ink: #202b29;
  --muted: #667571;
  --line: #dfe6e1;
  --green: #167d78;
  --green-dark: #0e5b58;
  --topbar-dark: #252525;
  --topbar-surface: #333333;
  --topbar-line: #505050;
  --coral: #d8765e;
  --zebra: #f1f4f1;
  --shadow: 0 16px 45px rgba(25, 48, 42, .10);
  font-family: 'DM Sans', sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; padding: 0 0 178px; background: var(--paper); color: var(--ink); font-family: 'DM Sans', sans-serif; overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; }
.topbar { position: sticky; top: 0; z-index: 20; height: auto; min-height: 68px; background: var(--topbar-dark); border-bottom: 1px solid var(--topbar-line); backdrop-filter: blur(14px); transition: transform .24s ease; }
.topbar.has-logo { background: var(--topbar-dark); border-bottom-color: var(--topbar-line); backdrop-filter: blur(14px); }
.topbar.is-hidden { transform: translateY(-102%); }
.topbar-inner { width: min(1180px, calc(100% - 64px)); min-height: 68px; max-width: 1180px; padding: 7px 0; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.header-controls { min-width: 0; flex: 1; display: flex; flex-wrap: nowrap; align-items: center; gap: 7px; overflow: visible; white-space: nowrap; }
.header-controls .date-filter { gap: 4px; color: #d2e1df; font-size: 10px; }
.header-controls .date-filter input { width: 108px; padding: 5px 4px; border: 1px solid var(--topbar-line); border-radius: 5px; background: var(--topbar-surface); color: #f3f8f7; color-scheme: dark; font-size: 10px; }
.header-controls .select-filter select { max-width: 118px; height: 30px; padding: 0 5px; border: 1px solid var(--topbar-line); border-radius: 5px; background: var(--topbar-surface); color: #f3f8f7; font-size: 10px; }
.header-controls .quiet-button { padding: 4px; color: #9be2d4; font-size: 10px; }
.header-controls .search-box { width: 228px; min-width: 150px; height: 34px; flex: 0 1 228px; gap: 7px; padding: 0 8px; border-color: var(--topbar-line); background: var(--topbar-surface); color: #c5d8d5; }
.header-controls .search-box input { color: #f3f8f7; font-size: 11px; }
.header-controls .search-box input::placeholder { color: #c0d2cf; }
.header-controls .search-box kbd { display: none; }
.header-controls .task-count { margin-left: auto; padding-left: 6px; color: #d2e1df; }
.icon-button { width: 40px; height: 40px; flex: 0 0 40px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #40514d; cursor: pointer; transition: background .16s, color .16s, border .16s; }
.icon-button:hover { background: #eaf2ee; color: var(--green-dark); border-color: #d9e7df; }
.topbar .icon-button { color: #ecf5f3; }
.topbar .icon-button:hover { background: var(--topbar-surface); color: #9be2d4; border-color: var(--topbar-line); }
.brand { min-width: 204px; display: flex; align-items: center; gap: 10px; text-decoration: none; color: #f3f8f7; }
.brand-mark { display: block; width: 38px; height: 38px; object-fit: cover; border-radius: 10px; }
.brand strong, .brand small { display: block; }
.brand strong { font: 700 14px 'Manrope', sans-serif; }
.brand small { margin-top: 2px; color: #c0d2cf; font-size: 11px; }
.header-tools { display: flex; align-items: center; justify-content: flex-end; gap: 14px; flex: 1; }
.search-box { display: flex; align-items: center; gap: 10px; width: min(360px, 100%); height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; color: #89938f; background: #fbfcfb; }
.search-box i { color: #32839a; }
.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.search-box kbd { padding: 3px 5px; white-space: nowrap; border: 1px solid #e1e7e3; border-radius: 4px; background: #fff; color: #87928e; font: 10px 'DM Sans', sans-serif; }
.connection-pill { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 12px; font-weight: 600; }
.connection-pill i { font-size: 8px; }
.connection-pill.is-online { color: #236b3d; }
.connection-pill.is-online i { color: #2d9a56; }
.connection-pill.is-offline { color: #a9342d; }
.connection-pill.is-offline i { color: #d5433b; }
.connection-pill.is-error { color: #a9342d; }
.connection-pill.is-error i { color: #d5433b; }
.connection-pill.is-syncing { color: #286b91; }
.connection-pill.is-syncing i { color: #348dc0; }
#connectionStatus { padding: 4px 7px; border-radius: 5px; }
#connectionStatus.is-online { background: #edf7ef; }
#connectionStatus.is-offline { background: #fff0ed; }
#connectionStatus.is-error { background: #fff0ed; }
#connectionStatus.is-syncing { background: #edf5fb; }
.menu-trigger { margin-left: 2px; }
.filters-trigger { display: none; }
.topbar .menu-trigger { flex: 0 0 36px; width: 36px; }
.menu-trigger i { color: #ffff00; font-size: 25px; }
.week-summary { min-height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 5px 16px; text-align: center; }
.week-summary strong { color: var(--ink); font: 700 14px 'Manrope', sans-serif; }
.week-summary span { color: var(--muted); font-size: 10px; line-height: 1.25; }
.workspace { width: min(1180px, calc(100% - 64px)); margin: 0 auto; padding: 0 0 50px; }
.day-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 0 0 28px; }
.eyebrow { margin: 0 0 8px; color: var(--green); font-size: 10px; line-height: 1; font-weight: 700; letter-spacing: 1.2px; }
h1, h2, h3 { font-family: 'Manrope', sans-serif; }
.day-heading h1 { margin: 0; font-size: 30px; line-height: 1.2; font-weight: 700; }
.day-subtitle { margin: 10px 0 0; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.date-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }
.timezone-label { padding-left: 8px; border-left: 1px solid #cfd9d3; color: #84908c; font-size: 11px; }
.day-count { min-width: 124px; text-align: right; }
.day-count strong { display: block; font: 700 27px 'Manrope', sans-serif; }
.day-count span { color: #75817d; font-size: 11px; text-transform: uppercase; letter-spacing: .7px; }
.filters { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 15px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.filter-caption { display: flex; align-items: center; gap: 8px; padding-right: 14px; border-right: 1px solid var(--line); color: #52625d; font-size: 12px; font-weight: 600; }
.filter-caption i { color: var(--green); }
.date-filter { display: flex; align-items: center; gap: 7px; color: #87918d; font-size: 11px; }
.date-filter input { width: 130px; padding: 6px 7px; border: 1px solid #e2e8e4; border-radius: 5px; color: var(--ink); font-size: 11px; }
.select-filter select { max-width: 170px; height: 31px; padding: 0 8px; border: 1px solid #e2e8e4; border-radius: 5px; background: #fff; color: #40514a; font-size: 11px; }
.quiet-button { border: 0; background: none; color: var(--green); font-size: 11px; font-weight: 600; cursor: pointer; }
.filter-result { margin-left: auto; color: var(--muted); font-size: 11px; }
.task-count { display: inline-flex; align-items: baseline; gap: 5px; margin-left: auto; padding-left: 12px; color: #687670; white-space: nowrap; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; }
.task-count strong { color: var(--ink); font: 700 16px 'Manrope', sans-serif; letter-spacing: 0; }
.header-controls .task-count strong { color: #ffffff; }
.logbook-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: 0 3px 12px rgba(31, 59, 50, .025); }
.list-head { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.6fr) 126px; gap: 16px; align-items: center; min-height: 43px; padding: 0 20px; background: #e9eeea; color: #5f6d68; font-size: 9px; font-weight: 700; letter-spacing: .9px; }
.logbook-sheet { padding: 14px 20px 8px; border-top: 1px solid var(--line); background: #fff; }
.logbook-sheet:nth-of-type(even) { background: var(--zebra); }
.sheet-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 54px; padding: 8px 14px; border: 1px solid #dbe3dd; border-top: 2px solid var(--staff-color, var(--green)); background: var(--staff-color, var(--green)); color: var(--staff-ink, #fff); }
.sheet-identity { min-width: 0; text-align: left; }
.sheet-staff { display: block; color: var(--staff-ink, #fff); font: 700 16px 'Manrope', sans-serif; }
.sheet-role { display: block; margin-top: 2px; color: var(--staff-ink, #fff); opacity: .82; font-size: 11px; }
.sheet-heading-meta { display: grid; min-width: 0; max-width: 100%; gap: 3px; color: var(--staff-ink, #fff); font-size: 12px; text-align: right; }
.sheet-date { font-weight: 700; }
.sheet-shift { color: var(--staff-ink, #fff); opacity: .88; }
.task-list { padding: 0; margin: 0; list-style: none; }
.task-line { display: grid; grid-template-columns: 68px minmax(0, 1fr) 126px; gap: 14px; align-items: start; padding: 12px 10px; border-bottom: 1px solid rgba(208,218,211,.72); background: #fff; }
.task-line:nth-child(even) { background: var(--zebra); }
.task-line.is-disabled { opacity: .56; }
.task-time { padding-top: 2px; color: #202b29; font-size: 13px; font-weight: 700; }
.task-main { position: relative; min-width: 0; padding-left: 17px; }
.task-main::before { position: absolute; top: 0; left: 0; color: var(--task-color, var(--staff-color, var(--green))); content: '•'; font-size: 17px; line-height: 1.15; }
.entry-body { min-width: 0; color: var(--staff-color, var(--ink)); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.task-prefix { color: inherit; margin-right: .3em; font-weight: 800; }
.pending-sync { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; margin-top: 6px; padding: 3px 6px; border-radius: 4px; background: #fff4df; color: #77541b; font-size: 9px; font-weight: 600; line-height: 1.4; white-space: normal; }
.entry-body p { margin: 0 0 6px; }
.entry-body p:last-child { margin-bottom: 0; }
.entry-body ul, .entry-body ol { margin: 6px 0; padding-left: 20px; }
.entry-body blockquote { padding-left: 10px; margin: 5px 0; border-left: 2px solid var(--green); color: #53615c; }
.entry-attachments { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.attachment-link { display: inline-flex; align-items: center; gap: 6px; max-width: min(220px, 100%); padding: 5px 8px; border: 1px solid #dce5df; border-radius: 5px; color: #45625a; background: rgba(255,255,255,.7); font-size: 10px; text-decoration: none; overflow-wrap: anywhere; }
.entry-actions { display: flex; justify-content: flex-end; align-items: flex-start; gap: 2px; }
.action-button { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #687772; cursor: pointer; }
.action-button:hover { background: #e2ebe5; color: var(--green-dark); }
.action-button.delete:hover { background: #fae8e4; color: #b54437; }
.action-button[data-action="edit"] { color: #347bb5; }
.action-button[data-action="disable"] { color: #b47921; }
.action-button[data-action="delete"] { color: #c5443b; }
.action-button[data-action="comment"] { color: #16877e; }
.action-button[data-action="edit"]:hover { background: #eaf3fb; color: #24669e; }
.action-button[data-action="disable"]:hover { background: #fbf2e1; color: #98621a; }
.action-button[data-action="comment"]:hover { background: #e7f5f2; color: #116c64; }
.directory-actions [data-directory-action="edit"] { color: #347bb5; }
.directory-actions [data-directory-action="toggle"] { color: #b47921; }
.directory-actions [data-directory-action="delete"] { color: #c5443b; }
#attachButton i { color: #347bb5; }
#cameraButton i { color: #c86549; }
.comments { padding-top: 7px; }
.comment { display: flex; flex-wrap: wrap; min-width: 0; gap: 8px; margin-top: 9px; padding: 9px 11px; border-left: 2px solid var(--comment-color, var(--green)); background: rgba(255,255,255,.6); font-size: 11px; }
.comment-content { flex: 1 1 180px; min-width: 0; color: var(--comment-color, var(--staff-color)); }
.comment-by { min-width: 0; color: var(--comment-color, var(--green)); font-size: 10px; font-weight: 700; white-space: normal; }
.empty-state { min-height: 240px; display: grid; align-content: center; justify-items: center; color: #7b8983; text-align: center; }
.empty-state > i { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 50%; background: #edf3ef; color: var(--green); }
.empty-state p { margin: 12px 0 0; font-size: 13px; }
.empty-state.is-no-results { min-height: clamp(260px, 36vh, 420px); }
.empty-state.is-no-results > i { width: 88px; height: 88px; font-size: 48px; }
.empty-state.is-no-results p { margin-top: 17px; color: var(--ink); font-size: 16px; font-weight: 700; }
.loader { width: 22px; height: 22px; border: 2px solid #d9e5de; border-top-color: var(--green); border-radius: 50%; animation: spin .7s linear infinite; }
.page-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding: 14px 4px; color: #87938e; font-size: 10px; }
.page-foot i { margin-right: 5px; color: var(--green); }
.page-foot .history-open { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.page-foot .history-open:hover { color: var(--green-dark); }
.composer-wrap { position: fixed; z-index: 15; bottom: 0; left: 0; width: 100%; padding: 15px max(24px, calc((100vw - 900px)/2)) 18px; background: transparent; pointer-events: none; transition: transform .22s ease; }
.composer-wrap.is-hidden { transform: translateY(110%); }
.composer-wrap:not(.is-hidden):focus-within { transform: translateY(0); }
.attention-ticker, .composer { pointer-events: auto; }
.attention-ticker { position: relative; display: block; width: min(900px, 100%); height: 46px; overflow: hidden; margin: 0 auto 9px; border: 1px solid #d9dfdc; border-radius: 7px; background: #fff; box-shadow: 0 4px 16px rgba(25, 48, 42, .08); opacity: 0; transform: translateY(100%); font-family: 'Raleway', sans-serif; }
.attention-ticker[hidden] { display: none; }
.attention-ticker.is-visible { animation: attention-slide-up 1.25s cubic-bezier(.2,.75,.25,1) forwards; }
.attention-ticker.is-exiting { animation: attention-slide-down 1.25s cubic-bezier(.55,0,.8,.35) forwards; }
.attention-label { position: absolute; z-index: 2; inset: 0 auto 0 0; display: flex; overflow: hidden; align-items: center; padding: 0 13px; background: #c93632; box-shadow: 0 0 12px rgba(255, 72, 58, .52), inset 0 0 9px rgba(255,255,255,.1); color: #fff; font: 700 15px 'Raleway', sans-serif; text-shadow: 0 0 5px rgba(255,255,255,.4); white-space: nowrap; animation: attention-glow 1.8s ease-in-out infinite alternate; }
.attention-label::after { position: absolute; z-index: 1; inset: -40% auto -40% 0; width: 48%; background: linear-gradient(105deg, transparent 5%, rgba(255,255,255,.08) 30%, rgba(255,255,255,.72) 50%, rgba(255,255,255,.12) 70%, transparent 95%); content: ''; pointer-events: none; transform: translateX(-180%) skewX(-18deg); animation: attention-shine 2.8s ease-in-out infinite; }
.attention-viewport { position: absolute; z-index: 1; inset: 0 42px 0 0; overflow: hidden; background: #252525; cursor: grab; touch-action: pan-y; user-select: none; }
.attention-viewport.is-dragging { cursor: grabbing; }
.attention-track { display: flex; width: max-content; height: 100%; align-items: center; will-change: transform; }
.attention-group { display: flex; flex: 0 0 auto; align-items: center; gap: 30px; padding: 0 30px 0 18px; white-space: nowrap; }
.attention-item { display: inline-flex; height: 100%; flex: 0 0 auto; flex-wrap: nowrap; align-items: center; gap: 7px; padding: 0; border: 0; background: transparent; color: #f3f8f7; font: 500 16px 'Raleway', sans-serif; line-height: 1.1; text-align: left; white-space: nowrap; cursor: pointer; }
.attention-item:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.attention-task-date { flex: 0 0 auto; color: #c0d2cf; font-size: 14px; line-height: 1.1; white-space: nowrap; }
.attention-item-separator { flex: 0 0 auto; color: #879590; font-size: 14px; }
.attention-task-copy { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 4px; color: #f3f8f7; white-space: nowrap; }
.attention-prefix { color: var(--attention-staff-color, #ff8b80); font-weight: 700; }
.attention-task-text { color: #f3f8f7; }
.attention-task-author { flex: 0 0 auto; color: var(--attention-staff-color, #b3c0bc); font-size: 13px; white-space: nowrap; }
.attention-divider { display: grid; width: 74px; height: 30px; flex: 0 0 74px; place-items: center; margin-left: 3px; }
.attention-divider img { display: block; width: 26px; height: 26px; object-fit: contain; }
.attention-pause { position: absolute; z-index: 3; inset: 0 0 0 auto; display: grid; width: 42px; place-items: center; border: 0; border-left: 1px solid #e5e9e6; background: #fff; color: #4e5a56; cursor: pointer; }
.attention-pause:hover { background: #f1f4f2; color: #202b29; }
.attention-pause:focus-visible { outline: 2px solid #348dc0; outline-offset: -3px; }
@keyframes attention-slide-up { from { opacity: 0; transform: translateY(100%); } to { opacity: 1; transform: translateY(0); } }
@keyframes attention-slide-down { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(100%); } }
@keyframes attention-glow {
  from { background-color: #b92c29; box-shadow: 0 0 9px rgba(255, 72, 58, .45), inset 0 0 8px rgba(255,255,255,.08); text-shadow: 0 0 3px rgba(255,255,255,.28); }
  to { background-color: #f0443d; box-shadow: 0 0 24px rgba(255, 72, 58, 1), inset 0 0 17px rgba(255,255,255,.32); text-shadow: 0 0 12px rgba(255,255,255,.95); }
}
@keyframes attention-shine { to { transform: translateX(360%) skewX(-18deg); } }
.composer { max-width: 900px; margin: 0 auto; padding: 10px 13px 8px; border: 1px solid #484848; border-radius: 12px; background: #252525; box-shadow: var(--shadow); }
.composer-controls { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.composer-tools { display: contents; }
.composer-tools-toggle { display: none; }
.composer-tool-label { display: none; }
.composer-color-tool { display: inline-flex; align-items: center; gap: 7px; color: #d4d7d7; font-size: 10px; }
.staff-color-toggle { display: inline-flex; align-items: center; gap: 4px; color: #d4d7d7; white-space: nowrap; font-size: 10px; cursor: pointer; }
.staff-color-toggle input { appearance: none; position: relative; width: 32px; height: 18px; flex: 0 0 32px; padding: 0; margin: 0; border: 0; border-radius: 999px; background: #687270; cursor: pointer; transition: background .18s ease; }
.staff-color-toggle input::before { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; content: ''; transition: transform .18s ease; }
.staff-color-toggle input:checked { background: var(--switch-active-color, var(--green)); }
.staff-color-toggle input:checked::before { transform: translateX(14px); }
.staff-color-toggle input:focus-visible { outline: 2px solid #9be2d4; outline-offset: 2px; }
.composer-status { flex: 0 0 auto; font-size: 10px; }
.staff-select-wrap, .prefix-wrap { display: flex; align-items: center; gap: 7px; color: #d4d7d7; }
.staff-select-wrap > i { color: #347bb5; }
.staff-select-wrap select, .prefix-wrap select { max-width: 190px; border: 0; outline: 0; background: transparent; color: #f4f4f4; font-size: 11px; }
.prefix-wrap select { color: #9be2d4; font-weight: 600; }
.staff-select-wrap select { padding: 4px 6px; border-radius: 4px; background: #fff; color: #111715; color-scheme: light; }
#entryVolunteer option { background: #fff; color: #111715; }
.prefix-wrap select { padding: 4px 6px; border-radius: 4px; background: #fff; color: #111715; color-scheme: light; }
.prefix-wrap select option { background: #fff; color: #111715; }
.color-control { width: 28px; height: 28px; overflow: hidden; border: 1px solid #646464; border-radius: 50%; }
.color-control input { width: 40px; height: 40px; padding: 0; margin: -7px; border: 0; cursor: pointer; }
.compose-spacer { flex: 1; }
.composer-week-summary { display: flex; min-width: 0; max-width: none; flex: 1 1 0; align-items: center; justify-content: center; overflow: hidden; color: #ffff00; font-size: 10px; line-height: 1.25; text-align: center; }
.composer-week-summary[hidden] { display: none; }
.composer-week-summary-text { display: inline-block; width: max-content; flex: 0 0 auto; white-space: nowrap; }
.composer-week-summary.is-animated .composer-week-summary-text { animation: week-summary-slide 3.8s ease-in-out infinite alternate; }
.staff-select-wrap { order: 1; }
.composer-color-tool { order: 2; }
.staff-color-toggle { order: 3; }
.prefix-wrap { order: 4; }
#connectionStatus { order: 5; }
.composer-week-summary { order: 6; }
.compose-spacer { display: none; order: 7; }
.composer-tool-actions { display: flex; align-items: center; gap: 4px; order: 8; margin-left: auto; }
.camera-button { position: relative; overflow: hidden; }
.camera-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.compose-main { display: flex; align-items: stretch; gap: 10px; padding: 7px 2px 1px; }
.compose-main textarea { flex: 1; min-height: 58px; max-height: 130px; resize: none; padding: 10px 12px; border: 1px solid #d2d7d5; border-radius: 7px; outline: 0; background: #eceeed; color: #111715; caret-color: var(--green-dark); font-size: 13px; line-height: 1.5; }
.compose-main textarea::placeholder { color: #77827e; }
.send-button { width: 35px; min-height: 58px; height: auto; align-self: stretch; flex: 0 0 35px; border: 0; border-radius: 9px; background: var(--send-color, var(--green)); color: #fff; cursor: pointer; transition: filter .16s, transform .16s; }
.send-button:hover { filter: brightness(.9); transform: translateY(-1px); }
.powered-by { padding-top: 3px; color: #c0c6c5; font-size: 10px; line-height: 1.4; text-align: center; }
.powered-by a { color: #77d4c3; font-weight: 600; text-decoration: none; }
.powered-by a:hover { color: #baf1e6; text-decoration: underline; }
.app-version { display: block; color: #9da5a3; font-size: 8px; line-height: 1.2; }
.compose-foot { display: flex; justify-content: space-between; gap: 10px; min-height: 0; padding-left: 2px; color: #c0c6c5; font-size: 9px; }
.compose-foot button { padding: 0 0 0 5px; border: 0; background: transparent; color: #9be2d4; cursor: pointer; }
.drawer-backdrop { position: fixed; z-index: 29; inset: 0; background: rgba(23, 37, 32, .28); opacity: 0; visibility: hidden; transition: .2s; }
.drawer-backdrop.is-open { opacity: 1; visibility: visible; }
.side-drawer { position: fixed; z-index: 30; inset: 0 auto 0 0; width: min(360px, 88vw); padding: 27px 22px; display: flex; flex-direction: column; overflow-y: auto; transform: translateX(-102%); background: #fff; box-shadow: 14px 0 40px rgba(22, 42, 34, .12); transition: transform .25s ease; }
.side-drawer.is-open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin: -27px -22px 15px; padding: 27px 22px 18px; background: #252525; color: #f3f8f7; }
.drawer-brand { display: flex; min-width: 0; align-items: center; gap: 10px; }
.drawer-logo { flex: 0 0 42px; width: 42px; height: 42px; object-fit: contain; }
.drawer-head h2 { margin: 0; color: #f3f8f7; font-size: 18px; }
.drawer-head .eyebrow { color: #9be2d4; }
.drawer-head .icon-button { color: #f3f8f7; }
.drawer-head .icon-button:hover { border-color: #505050; background: #333; color: #9be2d4; }
.drawer-link { display: flex; align-items: center; gap: 13px; width: 100%; padding: 13px 8px; border: 0; border-bottom: 1px solid transparent; background: transparent; color: #354540; text-align: left; text-decoration: none; font-size: 13px; cursor: pointer; }
.drawer-link:nth-of-type(odd) { background: #f0f2f1; }
.drawer-link:nth-of-type(odd) { border-bottom-color: #d2d7d5; }
.drawer-link.download-agent { background: transparent; }
.drawer-link .drawer-number { flex: 0 0 22px; color: var(--green-dark); font: 700 16px 'Manrope', sans-serif; }
.drawer-link span { min-width: 0; flex: 1 1 auto; }
.drawer-link > i:first-child { width: 19px; color: var(--green); }
.drawer-link[data-section="history"] > i:first-child { color: #347bb5; }
.drawer-link[data-section="staff-directory"] > i:first-child { color: #16877e; }
.drawer-link[data-section="shift-directory"] > i:first-child { color: #b47921; }
.drawer-link[data-section="position-directory"] > i:first-child { color: #c86549; }
.drawer-link > i:last-child { margin-left: auto; color: #a1aaa6; font-size: 10px; }
.drawer-link:hover { color: var(--green-dark); background: #f7faf8; }
.drawer-setting { padding: 20px 8px 14px; margin-top: auto; border-top: 1px solid #edf0ed; }
.timezone-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.drawer-setting label { display: block; margin-bottom: 0; color: #40514b; font-size: 12px; font-weight: 600; }
.drawer-setting label i { margin-right: 6px; color: #b47921; }
.timezone-unlock { flex: 0 0 32px; width: 32px; height: 32px; color: var(--green-dark); }
.timezone-unlock i { font-size: 13px; }
.drawer-setting select:disabled { background-color: #f2f4f2; color: #65716c; opacity: 1; }
.drawer-setting small { display: block; margin-top: 7px; color: #89958f; font-size: 10px; }
.drawer-note { display: flex; gap: 10px; margin-top: 20px; padding: 12px; border-left: 3px solid transparent; border-radius: 5px; font-size: 11px; line-height: 1.5; }
.drawer-note[hidden] { display: none; }
.drawer-note.is-offline { border-left-color: #d5433b; background: #fff0ed; color: #a9342d; }
.drawer-note.is-syncing { border-left-color: #348dc0; background: #edf7fc; color: #286b91; }
.drawer-note i { font-size: 15px; }
.drawer-note.is-offline i { color: #d5433b; animation: cloud-bob 1.1s ease-in-out infinite; }
.drawer-note.is-syncing i { color: #348dc0; animation: cloud-bob 1.1s ease-in-out infinite; }
.modal-content { overflow: hidden; border: 1px solid #e0e7e2; border-radius: 10px; box-shadow: var(--shadow); }
.modal-fallback-open { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; overflow: auto; padding: 20px; background: rgba(23, 37, 32, .48); }
.modal-fallback-open .modal-dialog { width: 100%; max-width: 680px; margin: auto; }
.modal-open { overflow: hidden; }
.modal-header { padding: 21px 24px 15px; border-bottom: 1px solid #e7ece8; }
.modal-header .eyebrow { margin-bottom: 6px; }
.modal-title { font: 700 20px 'Manrope', sans-serif; }
.modal-body { padding: 22px 24px 25px; }
.data-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.data-form .wide { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.data-form label { display: block; color: #56645f; font-size: 11px; font-weight: 600; }
.data-form input, .data-form select { display: block; width: 100%; height: 40px; margin-top: 6px; padding: 0 10px; border: 1px solid #dce5df; border-radius: 6px; background: #fff; color: var(--ink); font-size: 12px; }
.data-form textarea { display: block; width: 100%; min-height: 132px; margin-top: 6px; padding: 10px; border: 1px solid #dce5df; border-radius: 6px; background: #fff; color: var(--ink); font-size: 12px; line-height: 1.5; resize: vertical; }
.data-form input[type=color] { padding: 4px; }
.position-shift-option { display: flex !important; align-items: center; justify-content: space-between; gap: 14px; min-height: 56px; padding: 10px 12px; border: 1px solid #dce5df; border-radius: 6px; background: #f8faf8; cursor: pointer; }
.position-shift-option > span:first-child { display: grid; gap: 4px; }
.position-shift-option strong { color: #40514b; font-size: 11px; }
.position-shift-option small { color: #78847f; font-size: 10px; font-weight: 400; }
.iphone-switch { position: relative; display: block; width: 46px; height: 27px; flex: 0 0 46px; }
.iphone-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.iphone-switch-track { position: absolute; inset: 0; border-radius: 999px; background: #9ba59f; transition: background .2s ease; }
.iphone-switch-track::before { position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.24); content: ''; transition: transform .2s ease; }
.iphone-switch input:checked + .iphone-switch-track { background: #34b66a; }
.iphone-switch input:checked + .iphone-switch-track::before { transform: translateX(19px); }
.iphone-switch input:focus-visible + .iphone-switch-track { outline: 3px solid #348dc0; outline-offset: 2px; }
.work-days { min-width: 0; margin: 0; padding: 0; border: 0; }
.work-days legend { float: none; width: auto; margin: 0 0 6px; padding: 0; color: #56645f; font-size: 11px; font-weight: 600; }
.workday-options { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.work-day-option { display: flex !important; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 34px; padding: 4px 2px; border: 1px solid #dce5df; border-radius: 5px; color: #56645f; font-size: 10px; cursor: pointer; }
.work-day-option:has(input:checked) { border-color: #b9d9c7; background: #e7f3ec; color: #0e5b58; }
.work-day-option input[type=checkbox] { display: block; width: 14px; height: 14px; flex: 0 0 14px; margin: 0; padding: 0; accent-color: var(--green); }
.form-submit { min-height: 40px; padding: 0 15px; border: 0; border-radius: 6px; background: var(--green); color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; }
.history-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.history-filters label { display: block; color: #64726d; font-size: 10px; }
.history-filters input, .history-filters select { width: 100%; height: 36px; margin-top: 5px; padding: 0 8px; border: 1px solid #dce5df; border-radius: 5px; font-size: 11px; }
.history-results { max-height: 48vh; overflow: auto; border-top: 1px solid #e4eae6; }
.history-row { padding: 12px 4px; border-bottom: 1px solid #e7ece8; font-size: 12px; }
.history-row small { display: block; margin-bottom: 5px; color: #78847f; }
.directory-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.directory-offline-note { padding: 9px 11px; margin: 0 0 12px; border-left: 3px solid #b47921; background: #fbf2e1; color: #77541b; font-size: 11px; line-height: 1.5; }
.directory-toolbar span { color: #76837d; font-size: 11px; }
.directory-list { display: grid; gap: 8px; max-height: 58vh; overflow: auto; }
.directory-record { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 13px; border: 1px solid #e3e9e5; border-radius: 7px; background: #fff; }
.directory-record:nth-child(even) { background: #f5f7f5; }
.directory-main { min-width: 0; }
.directory-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; color: #2a3732; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.directory-subtitle { margin-top: 4px; color: #738079; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.directory-status { flex: 0 0 auto; padding: 3px 6px; border-radius: 4px; background: #e7f3ec; color: #287752; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.directory-status.is-disabled { background: #f1f0ed; color: #777a75; }
.directory-actions { display: flex; align-items: center; gap: 2px; }
.directory-actions .action-button { width: 31px; height: 31px; }
.directory-empty { padding: 24px 8px; color: #7b8983; font-size: 12px; text-align: center; }
.notice-open { overflow: hidden; }
.notice-overlay { position: fixed; z-index: 1300; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(23, 37, 32, .52); }
.notice-overlay[hidden] { display: none; }
.notice-dialog { width: min(440px, 100%); padding: 22px 24px; border: 1px solid #e0e7e2; border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.notice-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.notice-header .eyebrow { margin: 0 0 7px; color: var(--green); }
.notice-overlay.is-error .notice-header .eyebrow { color: #b54437; }
.notice-header h2 { margin: 0; color: var(--ink); font: 700 20px 'Manrope', sans-serif; }
.notice-header .icon-button { flex: 0 0 34px; width: 34px; height: 34px; }
.notice-message { margin: 16px 0 0; color: #56645f; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.notice-actions { display: flex; justify-content: flex-end; margin-top: 22px; }
.notice-dialog button:focus-visible { outline: 3px solid #86c9bb; outline-offset: 2px; }
.confirm-overlay { position: fixed; z-index: 1200; inset: 0; box-sizing: border-box; display: grid; place-items: center; padding: 20px; background: rgba(23, 37, 32, .48); }
.confirm-overlay[hidden] { display: none; }
.confirm-dialog { width: min(440px, 100%); padding: 24px; border: 1px solid #e0e7e2; border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.confirm-dialog .eyebrow { margin-bottom: 7px; color: var(--green); }
.confirm-dialog h2 { margin: 0 0 12px; color: var(--ink); font: 700 20px 'Manrope', sans-serif; }
.confirm-message { margin: 0; color: #56645f; font-size: 13px; line-height: 1.55; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.confirm-cancel { min-height: 40px; padding: 0 14px; border: 1px solid #dce5df; border-radius: 6px; background: #fff; color: #40514b; font-size: 12px; font-weight: 600; cursor: pointer; }
.confirm-cancel:hover { background: #f3f6f4; }
.confirm-dialog button:focus-visible { outline: 3px solid #86c9bb; outline-offset: 2px; }
.camera-frame { overflow: hidden; display: grid; place-items: center; min-height: 220px; border-radius: 7px; background: #18221f; }
.camera-frame video { display: block; width: 100%; max-height: min(60vh, 520px); object-fit: contain; }
.camera-controls { display: flex; justify-content: center; gap: 10px; padding-top: 14px; }
.camera-hint { margin: 10px 0 0; color: #75827c; font-size: 11px; text-align: center; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes week-summary-slide {
  from { transform: translateX(calc(0px - var(--week-slide-distance, 0px))); }
  to { transform: translateX(var(--week-slide-distance, 0px)); }
}
@keyframes cloud-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

@media (min-width: 761px) and (max-width: 1100px) {
  .topbar-inner { gap: 8px; }
  .brand { min-width: 145px; flex: 0 0 145px; gap: 7px; }
  .header-controls { gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .header-controls::-webkit-scrollbar { display: none; }
  .header-controls .date-filter { flex: 0 0 auto; }
  .header-controls .date-filter input { width: 92px; }
  .header-controls .select-filter select { max-width: 105px; }
  .header-controls .search-box { width: 165px; min-width: 140px; flex: 0 0 165px; }
  .header-controls .task-count { margin-left: 2px; padding-left: 2px; }
}

@media (max-width: 760px) {
  .topbar { overflow-x: clip; }
  body { padding-bottom: 192px; }
  .topbar { min-height: 58px; }
  .topbar-inner { display: grid; grid-template-columns: minmax(0, 1fr) 34px 34px; width: calc(100% - 16px); max-width: none; min-height: 58px; padding: 6px 0 8px; margin: 0 auto; gap: 7px 8px; }
  .brand { grid-column: 1; grid-row: 1; min-width: 0; flex: 0 1 auto; gap: 5px; }
  .brand-mark { width: 29px; height: 29px; }
  .header-controls { grid-column: 1 / -1; grid-row: 2; width: 100%; min-height: 0; max-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 6px; align-self: start; overflow: hidden; opacity: 0; transform: translateY(-8px); visibility: hidden; pointer-events: none; white-space: normal; transition: max-height .48s ease-in-out, opacity .28s ease, transform .48s ease-in-out, visibility 0s linear .48s; }
  .topbar.filters-open .header-controls { max-height: min(142px, calc(100vh - 80px)); opacity: 1; transform: translateY(0); visibility: visible; pointer-events: auto; transition: max-height .48s ease-in-out, opacity .3s ease, transform .48s ease-in-out, visibility 0s; }
  .header-controls .date-filter { display: flex; min-width: 0; align-items: center; gap: 4px; font-size: 10px; white-space: nowrap; }
  .header-controls .date-filter input { flex: 1 1 auto; width: auto; min-width: 0; height: 30px; margin: 0; font-size: 10px; }
  .header-controls .select-filter { min-width: 0; }
  .header-controls .select-filter select { display: block; width: 100%; max-width: none; height: 30px; font-size: 10px; }
  .header-controls #clearFilters { grid-column: 1; grid-row: 3; justify-self: start; }
  .header-controls .task-count { grid-column: 2; grid-row: 3; margin: 0; padding-left: 0; justify-self: end; font-size: 9px; }
  .header-controls .search-box { grid-column: 1 / -1; grid-row: 4; position: static; width: 100%; min-width: 0; height: 32px; flex: initial; padding: 0 7px; border-color: var(--topbar-line); background: var(--topbar-surface); }
  .header-controls .search-box input { width: 100%; padding: 0; font-size: 10px; }
  .connection-pill { font-size: 9px; }
  .topbar .filters-trigger { display: inline-grid; grid-column: 2; grid-row: 1; justify-self: end; width: 34px; height: 34px; color: #9be2d4; }
  .topbar .filters-trigger i { font-size: 17px; }
  .topbar .menu-trigger { grid-column: 3; grid-row: 1; justify-self: end; flex: initial; width: 34px; height: 34px; }
  .workspace { width: calc(100% - 28px); padding-top: 0; }
  .day-heading { margin-bottom: 20px; }
  .day-heading h1 { font-size: 25px; }
  .day-subtitle { flex-wrap: wrap; font-size: 11px; }
  .day-count { min-width: 85px; }
  .day-count strong { font-size: 23px; }
  .day-count span { font-size: 9px; }
  .filters { flex-wrap: wrap; gap: 7px 10px; padding: 10px; }
  .filter-caption { padding-right: 8px; }
  .date-filter { gap: 4px; font-size: 10px; }
  .date-filter input { width: 116px; font-size: 10px; }
  .select-filter select { max-width: 142px; font-size: 10px; }
  .filter-result { display: none; }
  .list-head { display: none; }
  .logbook-sheet { padding: 10px 9px 5px; }
  .sheet-head { min-height: 48px; padding: 7px 9px; }
  .sheet-head { gap: 8px; }
  .sheet-staff { font-size: 14px; }
  .sheet-role { font-size: 10px; }
  .sheet-heading-meta { font-size: 11px; }
  .task-line { grid-template-columns: 45px minmax(0, 1fr); gap: 5px 8px; padding: 11px 4px; }
  .task-time { grid-column: 1; grid-row: 1; font-size: 12px; }
  .task-main { grid-column: 2; grid-row: 1 / span 2; padding-left: 14px; }
  .entry-body { font-size: 12px; }
  .entry-actions { grid-column: 2; grid-row: 3; gap: 0; }
  .action-button { width: 30px; height: 30px; }
  .page-foot { font-size: 9px; }
  .composer-wrap { padding: 9px 9px max(10px, env(safe-area-inset-bottom)); }
  .attention-ticker { height: 42px; margin-bottom: 7px; }
  .attention-label { padding: 0 10px; font-size: 14px; }
  .attention-group { gap: 22px; padding: 0 22px; }
  .attention-item { gap: 5px; font-size: 15px; }
  .attention-task-date, .attention-task-author { font-size: 12px; }
  .attention-divider { width: 74px; height: 26px; flex-basis: 74px; }
  .attention-divider img { width: 23px; height: 23px; }
  .attention-viewport { right: 38px; }
  .attention-pause { width: 38px; }
  .composer { padding: 8px 10px 6px; }
  .composer-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto 34px; align-items: center; gap: 8px; overflow: visible; }
  .staff-select-wrap { grid-column: 1; grid-row: 1; min-width: 0; }
  .staff-select-wrap select { width: 100%; min-width: 0; max-width: none; flex: 1 1 auto; }
  #connectionStatus { grid-column: 2; grid-row: 1; justify-self: start; width: max-content; max-width: 120px; }
  .composer-week-summary { grid-column: 1 / -1; grid-row: 2; max-width: none; min-width: 0; color: #ffff00; font-size: 9px; text-align: center; }
  .composer-tools-toggle { display: inline-grid; grid-column: 3; grid-row: 1; justify-self: end; width: 34px; height: 34px; flex: 0 0 34px; color: #9be2d4; }
  .composer-tools-toggle i { font-size: 16px; }
  .composer-tools { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 8px; width: 100%; min-height: 0; max-height: 0; padding: 0 4px; overflow: hidden; opacity: 0; transform: translateY(10px); visibility: hidden; pointer-events: none; border-top: 1px solid transparent; transition: max-height .48s ease-in-out, padding .48s ease-in-out, opacity .28s ease, transform .48s ease-in-out, border-color .25s ease, visibility 0s linear .48s; }
  .composer-tools.is-open { max-height: 128px; padding: 9px 4px 1px; overflow: hidden; opacity: 1; transform: translateY(0); visibility: visible; pointer-events: auto; border-top-color: rgba(255,255,255,.14); transition: max-height .48s ease-in-out, padding .48s ease-in-out, opacity .3s ease, transform .48s ease-in-out, border-color .25s ease, visibility 0s; }
  .composer-tools .composer-tool-label { display: inline; }
  .composer-tools .composer-color-tool, .composer-tools .staff-color-toggle { width: 100%; min-height: 36px; justify-content: space-between; padding: 0 8px; border: 1px solid #484848; border-radius: 6px; }
  .composer-tools .prefix-wrap { grid-column: 1 / -1; width: 100%; }
  .composer-tools .prefix-wrap select { width: 100%; max-width: none; }
  .composer-color-tool { order: initial; }
  .staff-color-toggle { order: initial; }
  .prefix-wrap { order: initial; }
  .composer-tools .composer-tool-actions { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-self: stretch; gap: 8px; width: 100%; margin-left: 0; }
  .composer-tools .composer-tool-action { display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-width: 0; min-height: 36px; flex: initial; padding: 0 8px; border: 1px solid #484848; border-radius: 6px; color: #d4d7d7; font-size: 10px; }
  .composer-tools .camera-button { overflow: visible; }
  .compose-spacer { display: none; }
  #connectionStatus { max-width: 120px; overflow: visible; font-size: 8px; white-space: normal; flex-wrap: wrap; }
  #connectionStatus span { max-width: none; overflow: visible; overflow-wrap: anywhere; text-overflow: clip; white-space: normal; }
  .prefix-wrap select { max-width: 110px; font-size: 10px; }
  .color-control { width: 25px; height: 25px; }
  .icon-button { width: 34px; height: 34px; flex-basis: 34px; }
  .compose-main textarea { font-size: 12px; }
  .compose-foot { font-size: 8px; }
  .history-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-header { padding: 17px 17px 12px; }
  .modal-body { padding: 17px; }
}

@media (max-width: 600px) {
  .brand { gap: 5px; }
  .brand > span { display: block; }
}

@media (max-width: 420px) {
  .menu-trigger { width: 30px; flex-basis: 30px; margin-left: 0; }
  .brand { min-width: 0; gap: 6px; }
  .header-tools { gap: 4px; }
  .connection-pill span { max-width: 75px; overflow: hidden; text-overflow: ellipsis; }
  .task-count { padding-left: 5px; }
  .date-filter input { width: 104px; }
  .workday-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .data-form { grid-template-columns: 1fr; }
  .data-form .wide { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .attention-ticker.is-visible, .attention-ticker.is-exiting { animation: none; opacity: 1; transform: none; }
}