:root {
  --ink: #14233f;
  --muted: #65758c;
  --line: #d9e2ee;
  --canvas: #f5f7fb;
  --surface: #fff;
  --brand: #126bd5;
  --brand-2: #2e91ff;
  --accent: #ffd34e;
  --accent-ink: #1b2b48;
  --danger: #b42318;
  --danger-soft: #fff0ee;
  --warning: #a85b00;
  --warning-soft: #fff7e8;
  --success: #087a55;
  --shadow: 0 14px 40px rgb(18 58 130 / 12%);
  --radius: 16px;
  --focus: 0 0 0 3px rgb(20 107 211 / 28%);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--canvas); }
html.project-folder-open, body.project-folder-open { overflow: hidden !important; overscroll-behavior: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; opacity: .55; }
img { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .4rem; font-size: clamp(1.65rem, 4vw, 2.35rem); letter-spacing: -.035em; }
h2 { margin-bottom: .5rem; letter-spacing: -.025em; }
h3 { margin: 1.4rem 0 .75rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: fixed; z-index: 1000; left: 1rem; top: -5rem; background: var(--surface); padding: .8rem 1rem; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--focus); }
.muted { color: var(--muted); }
.lead { color: var(--muted); font-size: 1.03rem; }
.eyebrow { color: var(--brand-2); font-weight: 800; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .35rem; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(260px, .8fr) minmax(360px, 1.2fr); background: var(--surface); }
.auth-brand { display: grid; place-content: center; background: radial-gradient(circle at 20% 20%, #67b3ff, var(--brand) 58%, #0a347d); color: #fff; }
.auth-brand p { margin: 1rem 0 0; font-weight: 800; font-size: 1.45rem; text-align: center; }
.brand-mark { display: grid; place-items: center; width: 88px; aspect-ratio: 1; border-radius: 28px 28px 28px 8px; background: linear-gradient(135deg, #45a3ff, var(--brand)); color: #fff; font-size: 3.2rem; font-weight: 900; box-shadow: 0 18px 55px rgb(0 0 0 / 24%); }
.brand-mark.small { width: 40px; border-radius: 13px 13px 13px 4px; font-size: 1.35rem; box-shadow: none; flex: 0 0 auto; }
.auth-card { width: min(430px, calc(100% - 2rem)); margin: auto; padding: 2.25rem; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.auth-card .muted { margin-bottom: 1.7rem; }
.remember-device { grid-template-columns: auto 1fr; align-items: start; gap: .65rem; margin: .15rem 0 .4rem; font-size: .82rem; font-weight: 600; }
.remember-device input { width: 18px; min-height: 18px; margin-top: .1rem; }
.remember-device small { display: block; margin-top: .2rem; color: var(--muted); font-weight: 500; line-height: 1.35; }
.setup-note { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.setup-note summary { color: var(--brand-2); cursor: pointer; font-weight: 700; }
.setup-note p { margin: .75rem 0 0; line-height: 1.5; }
.auth-legal { display: flex; flex-wrap: wrap; gap: .2rem; margin: 1rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.auth-legal a { color: inherit; font-weight: 700; }
.auth-legal a:hover { color: var(--brand); }

.app-shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.app-sidebar { position: sticky; top: 0; display: flex; flex-direction: column; grid-row: 1 / span 2; height: 100vh; padding: 1rem .8rem; overflow-y: auto; background: #071f4a; color: #edf3ff; }
.sidebar-brand { display: flex; align-items: center; gap: .65rem; padding: .45rem .55rem 1.15rem; color: #fff; text-decoration: none; }
.sidebar-brand > span:last-child { display: grid; gap: .12rem; }.sidebar-brand small { color: #b7cae9; font-size: .7rem; }
.sidebar-brand .brand-mark { background: #2e91ff; color: #fff; }
.sidebar-nav { display: grid; gap: .2rem; padding: .7rem 0; border-top: 1px solid rgb(255 255 255 / 12%); }
.sidebar-nav-button { min-height: 40px; padding: .55rem .7rem; border: 0; border-radius: 9px; background: transparent; color: #cad8ef; text-align: left; font-size: .86rem; font-weight: 750; }
.sidebar-nav-button:hover, .sidebar-nav-button.active { background: #123d7b; color: #fff; }
.sidebar-projects { display: grid; gap: .55rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgb(255 255 255 / 12%); }
.sidebar-projects-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 .55rem; color: #b7cae9; font-size: .72rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.sidebar-projects-heading button { width: 24px; height: 24px; border: 0; border-radius: 7px; background: #123d7b; color: #fff; font-size: 1.05rem; }
.sidebar-project-list { display: grid; gap: .35rem; }.sidebar-project-button { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: .5rem; min-height: 43px; padding: .42rem .5rem; overflow: hidden; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #cad8ef; text-align: left; font-size: .8rem; font-weight: 700; }.sidebar-project-button:hover, .sidebar-project-button.active { border-color: rgb(255 211 78 / 52%); background: #123d7b; color: #fff; }.sidebar-project-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #2054a2; color: #ffd34e; font-size: .76rem; font-weight: 850; }.sidebar-project-button span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.sidebar-project-empty { padding: .5rem; color: #b7cae9; font-size: .78rem; }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 68px; display: grid; grid-column: 2; grid-template-columns: 1fr auto; align-items: center; gap: 1rem; padding: .7rem clamp(1rem, 4vw, 3rem); background: rgb(255 255 255 / 94%); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar .brand { display: none; }
.brand { display: flex; align-items: center; gap: .7rem; color: inherit; text-decoration: none; justify-self: start; }
.brand > span:last-child { display: flex; flex-direction: column; }
.brand small { color: var(--muted); font-size: .7rem; }
.count-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-left: 3px; border-radius: 999px; color: #fff; background: #d92d20; font-size: .72rem; }
.user-menu { justify-self: end; display: flex; align-items: center; gap: .55rem; position: relative; }
.connection-status-wrapper { display: flex; align-items: center; gap: .35rem; min-height: 24px; }
.connection-state { font-size: .75rem; color: var(--success); }
.connection-state.offline { color: var(--danger); }

.signature-canvas { display:block; width:100%; height:190px; border:2px dashed var(--line); border-radius:12px; background:#fff; touch-action:none; cursor:crosshair; }
.qr-dialog { text-align:center; }
.project-qr-image { display:block; width:min(100%, 360px); height:auto; margin:8px auto 18px; background:#fff; }
.connection-state.syncing { color: var(--warning); }
.sync-badge { margin-left: 0; background: var(--warning); }
.avatar-button { width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; }
.popover { position: absolute; right: 0; top: calc(100% + .6rem); min-width: 220px; display: grid; gap: .25rem; padding: 1rem; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow); }
.popover .muted { font-size: .82rem; margin-bottom: .5rem; }
.text-button { display: block; text-align: left; text-decoration: none; border: 0; border-top: 1px solid var(--line); background: transparent; padding: .75rem 0 .2rem; color: inherit; }
.menu-view-button { display: flex; align-items: center; justify-content: space-between; gap: .6rem; font-weight: 800; }
.menu-view-button.active { color: var(--brand); }
.danger-text { color: var(--danger); }

main { width: min(1220px, calc(100% - 2rem)); grid-column: 2; margin: 0 auto; padding: clamp(1.4rem, 4vw, 3rem) 0 5rem; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.4rem; }
.page-heading h1 { margin: 0; }
.page-heading-title { display: flex; align-items: flex-end; gap: .6rem; }
.page-heading-title .icon-button { margin-bottom: .05rem; color: var(--brand); }
.heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .65rem; }
.button-icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-folder-icon { width: 17px; height: 17px; margin-right: .55rem; vertical-align: -.2rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.project-bar { display: grid; grid-template-columns: minmax(210px, 1fr) minmax(210px, .8fr) auto; align-items: end; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: 0 4px 18px rgb(24 52 45 / 5%); }
.project-picker { display: grid; gap: .4rem; min-width: 0; }
.project-bar select { width: 100%; min-width: 180px; }
.project-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.project-action-menu { position: relative; }
.project-action-menu > summary { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; cursor: pointer; list-style: none; }
.project-action-menu > summary::-webkit-details-marker { display: none; }
.project-action-menu > summary::after { content: "▾"; font-size: .72rem; }
.project-action-menu[open] > summary::after { transform: rotate(180deg); }
.project-action-menu-list { position: absolute; z-index: 5; top: calc(100% + .45rem); right: 0; display: none; min-width: 190px; padding: .45rem; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow); }
.project-action-menu[open] .project-action-menu-list { display: grid; gap: .35rem; }
.project-action-menu-list .button { justify-content: flex-start; }
.project-home-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 1rem; max-width: 680px; padding: 1.15rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
#home-view .project-home-card { display: none; }
.project-home-layout { display: grid; grid-template-columns: 1fr; align-items: start; gap: 1.2rem; margin-top: 1.4rem; }
.project-home-grid { display: grid; gap: .65rem; }
.project-home-tile { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: .65rem; min-height: 96px; padding: .8rem; overflow: hidden; text-align: left; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 4px 18px rgb(24 52 45 / 5%); transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.project-home-tile:hover, .project-home-tile:focus-visible { transform: translateY(-2px); border-color: #6d9589; box-shadow: 0 10px 24px rgb(24 52 45 / 12%); }
.project-home-tile.active { border-color: var(--brand-2); box-shadow: inset 0 3px var(--brand-2), 0 6px 20px rgb(24 52 45 / 8%); }
.project-home-tile-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: #e4f1ed; color: var(--brand); font-size: 1rem; font-weight: 850; }
.project-home-tile-main { display: grid; align-content: start; gap: .3rem; min-width: 0; }
.project-home-tile-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; }
.project-home-tile-main small, .project-home-tile-meta { color: var(--muted); font-size: .78rem; line-height: 1.4; }
.project-home-tile-action { align-self: end; color: var(--brand); font-size: .78rem; font-weight: 850; }
.project-home-tile-meta { display: none; }
.project-home-summary { min-height: 310px; padding: clamp(1.4rem, 4vw, 2.4rem); border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 8px 26px rgb(24 52 45 / 7%); }
.project-home-summary h2 { margin: 0 0 .8rem; font-size: clamp(1.45rem, 3vw, 2rem); }
.project-home-summary .lead { margin: 0 0 1.5rem; }
.project-dashboard-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 1.5rem 0; }.project-dashboard-stats article { display: grid; gap: .35rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: #f8fbfa; }.project-dashboard-stats span { font-size: 1.7rem; font-weight: 850; color: var(--brand); }.project-dashboard-stats small { color: var(--muted); font-weight: 700; }
.project-home-sections { margin: 1.3rem 0; padding-top: 1.15rem; border-top: 1px solid var(--line); }
.project-home-sections-heading { display: flex; align-items: end; justify-content: space-between; gap: .75rem; }
.project-home-sections-heading h3 { margin: 0; font-size: 1rem; }
.project-home-sections-heading .eyebrow { margin-bottom: .18rem; }
.project-home-sections-heading .button { min-height: 38px; padding: .5rem .75rem; }
.project-home-sections-help { margin: .6rem 0; font-size: .85rem; }
.project-home-section-list { display: flex; flex-wrap: wrap; gap: .45rem; }
.project-home-section-button { min-height: 38px; padding: .5rem .72rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 750; }
.project-home-section-button:hover, .project-home-section-button.active { border-color: var(--brand-2); background: #eaf4ff; color: var(--brand); }
.employee-today-dashboard { display: grid; gap: 1rem; margin: 0 0 1.2rem; padding: clamp(1rem, 3vw, 1.5rem); border: 2px solid #7eb8a5; border-radius: 18px; background: linear-gradient(135deg, #f2faf6, #fff); box-shadow: 0 8px 26px rgb(24 52 45 / 8%); }
.employee-today-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }.employee-today-heading h2 { margin: 0; font-size: clamp(1.3rem, 4vw, 1.7rem); }.employee-today-heading .eyebrow { margin-bottom: .15rem; }
.employee-today-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }.employee-today-stats article { display: grid; gap: .2rem; padding: .75rem; border: 1px solid #cbded8; border-radius: 12px; background: #fff; }.employee-today-stats span { color: var(--brand); font-size: 1.45rem; font-weight: 850; }.employee-today-stats small { color: var(--muted); font-weight: 750; }
.employee-today-time { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .8rem; border: 1px solid #7eb8a5; border-radius: 12px; background: #eaf7f1; }.employee-today-time div { display: grid; gap: .12rem; }.employee-today-time span { color: var(--muted); font-size: .86rem; }
.employee-today-list { display: grid; gap: .6rem; }.employee-today-task { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .8rem; padding: .85rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; }.employee-today-task strong { display: block; }.employee-today-task p { margin: .25rem 0 0; color: var(--muted); font-size: .84rem; }.employee-today-task-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .45rem; }.employee-today-task-actions .button { min-height: 48px; }

label { display: grid; gap: .4rem; color: #34433f; font-size: .86rem; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 44px; padding: .68rem .78rem; border: 1px solid #bccac6; border-radius: 9px; background: var(--surface); }
textarea { resize: vertical; line-height: 1.45; }
input:hover, select:hover, textarea:hover { border-color: #77948c; }
.compact-label { display: flex; align-items: center; gap: .5rem; }
.compact-label select { width: auto; min-width: 170px; }
.check-label { display: flex; flex-direction: row; align-items: center; gap: .6rem; min-height: 44px; }
.check-label input { width: 18px; min-height: 18px; accent-color: var(--brand-2); }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .65rem 1rem; border-radius: 9px; border: 1px solid transparent; font-weight: 800; white-space: nowrap; }
.button.primary { background: var(--brand); color: #fff; }
.button.primary:hover { background: var(--brand-2); }
.button.subtle { background: var(--surface); border-color: var(--line); color: var(--brand); }
.button.subtle:hover { background: #edf4f1; }
.button.danger { background: var(--danger); color: #fff; }
.button.danger-quiet { background: var(--danger-soft); color: var(--danger); }
.button.voice { background: var(--accent); color: var(--accent-ink); }
.button.wide { width: 100%; }
.icon-button { display: inline-grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--brand); font-size: 1.25rem; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin: 1.1rem 0; }
.stat-card { display: grid; text-align: left; gap: .35rem; padding: 1rem; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.stat-card span { font-size: 1.65rem; font-weight: 850; }
.stat-card small { color: var(--muted); }
.stat-card.active { border-color: var(--brand-2); box-shadow: inset 0 -3px var(--brand-2); }
.day-filters { display: flex; flex-wrap: wrap; gap: .55rem; margin: 0 0 1rem; }
.day-filters .button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.filter-count { display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; margin-left: .2rem; padding: 0 .28rem; border-radius: 999px; background: rgb(255 255 255 / 22%); font-size: .72rem; }
.day-filters .button:not(.active) .filter-count { background: var(--canvas); color: var(--brand); }
.filter-row { display: flex; align-items: end; gap: .75rem; margin: 1.25rem 0 .8rem; }
.search-field { flex: 1; }

.task-list { display: grid; gap: .65rem; }
.task-card { width: 100%; display: grid; grid-template-columns: 6px minmax(0, 1fr) auto; gap: 0; align-items: stretch; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); overflow: visible; }
.task-card:hover { border-color: #95aaa4; box-shadow: 0 7px 20px rgb(24 52 45 / 7%); }
.priority-stripe { align-self: stretch; min-height: 104px; background: #8aa29b; }
.priority-stripe.high { background: #e04f3f; }
.priority-stripe.low { background: #75a5ca; }
.task-card-main { min-width: 0; padding: .9rem 0; }
.task-card-open { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; min-width: 0; padding: 0 0 0 1rem; text-align: left; border: 0; background: transparent; color: inherit; cursor: pointer; }
.task-card-open:hover { background: rgb(32 115 212 / 4%); }
.task-card-top { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; }
.task-card h2 { margin: 0; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-card p { margin: .45rem 0 0; color: var(--muted); font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-card p.task-checklist-summary { color: var(--brand); font-weight: 800; }
.task-card-side { display: grid; justify-items: end; gap: .5rem; font-size: .78rem; color: var(--muted); }
.task-card-primary-action { align-self: center; min-width: 112px; margin: 0 .65rem 0 .35rem; }
.task-quick-assignment { position: relative; align-self: center; margin: 0 .65rem 0 .35rem; }
.task-quick-assignment > summary { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--brand-2); border-radius: 50%; color: var(--brand-2); font-size: 1.35rem; font-weight: 800; cursor: pointer; list-style: none; }
.task-quick-assignment > summary::-webkit-details-marker { display: none; }
.task-quick-assignment[open] > summary { background: var(--brand-2); color: #fff; }
.task-quick-assignment-list { position: absolute; z-index: 12; top: calc(100% + .4rem); right: 0; display: grid; min-width: 190px; max-height: 260px; overflow-y: auto; padding: .45rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 12px 34px rgb(24 52 45 / 18%); }
.task-quick-assignment-list .text-button { min-height: 38px; padding: .45rem .55rem; text-align: left; border-radius: 8px; }
.project-folder-section-picker { display: grid; grid-template-columns: minmax(180px, 280px); gap: .3rem; margin: -.1rem 0 .7rem; color: var(--muted); font-size: .8rem; font-weight: 800; }
.project-folder-section-picker select { min-height: 42px; background: var(--surface); }
.status-pill, .priority-pill { display: inline-flex; align-items: center; padding: .26rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 800; }
.status-pill.open { background: #eef1f0; color: #52605c; }
.status-pill.in_progress { background: #fff1d9; color: #895100; }
.status-pill.done { background: #dff6ec; color: #087a55; }
.priority-pill.high { background: var(--danger-soft); color: var(--danger); }
.priority-pill.due { background: #eaf2ff; color: #215c9b; }
.priority-pill.overdue { background: var(--danger-soft); color: var(--danger); }
.priority-pill.approval { background: #fff1d9; color: #895100; }
.feedback-badge { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; background: #d92d20; color: #fff; border-radius: 999px; font-weight: 850; }
.empty-state { padding: 3rem 1rem; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed #b9c8c3; border-radius: var(--radius); }
.empty-state > span { display: inline-grid; place-items: center; width: 54px; height: 54px; margin-bottom: 1rem; border-radius: 50%; background: #e5f4ee; color: var(--success); font-size: 1.5rem; }

.employee-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1rem; }
.employee-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.employee-card header { display: flex; align-items: center; gap: .7rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.employee-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #e2f1ed; color: var(--brand); font-weight: 850; }
.employee-card h2 { font-size: 1rem; margin: 0; }
.employee-card header p { margin: .15rem 0 0; font-size: .78rem; color: var(--muted); }
.mini-task-list { display: grid; gap: .5rem; margin-top: .8rem; }
.mini-task { padding: .65rem; background: var(--canvas); border-radius: 9px; font-size: .85rem; }
.mini-task small { display: block; color: var(--muted); margin-top: .25rem; }

.admin-note, .notice { display: flex; gap: .7rem; align-items: flex-start; padding: 1rem; border-radius: 11px; background: #e8f2ef; color: var(--brand); margin-bottom: 1rem; }
.admin-note { flex-direction: column; }
.notice.warning { background: var(--warning-soft); color: var(--warning); }
.data-list { display: grid; gap: .65rem; }
.data-row { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(140px, .7fr) auto; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.data-row h2 { font-size: 1rem; margin: 0; }
.data-row p { color: var(--muted); margin: .2rem 0 0; font-size: .82rem; }
.row-actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.section-row { grid-template-columns: minmax(220px, 1fr) auto; }
.inline-create-form { display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; gap: .75rem; }
.inline-create-form .form-error { grid-column: 1 / -1; }
.task-section-field { display: grid; gap: .4rem; padding: .8rem; border: 1px solid var(--line); border-radius: 11px; background: var(--canvas); }
.completed-task-card { cursor: default; }
.completed-task-card .row-actions { padding: .75rem 0; }

dialog { width: min(540px, calc(100% - 1.4rem)); max-height: calc(100vh - 2rem); padding: 0; border: 0; border-radius: 18px; box-shadow: 0 28px 80px rgb(8 35 29 / 35%); overflow: auto; }
dialog.large-dialog { width: min(820px, calc(100% - 1.4rem)); }
dialog.drawer-dialog { position: fixed; inset: 0 0 0 auto; width: min(720px, 100%); max-width: none; height: 100dvh; max-height: none; margin: 0; border-radius: 20px 0 0 20px; overscroll-behavior: contain; }
.image-preview-dialog { width: min(1100px, calc(100% - 1.4rem)); max-height: calc(100dvh - 1.4rem); background: #15231f; color: #fff; }
.image-preview-shell { display: grid; gap: .9rem; padding: clamp(1rem, 3vw, 1.5rem); }
.image-preview-shell > header, .image-preview-shell > footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.image-preview-shell h2 { margin: 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.image-preview-shell .eyebrow { margin: 0 0 .2rem; color: #b5dfd4; }
.image-preview-shell .icon-button { border-color: rgb(255 255 255 / 28%); background: rgb(255 255 255 / 10%); color: #fff; }
#project-image-preview, #project-file-preview { display: block; width: 100%; max-height: calc(100dvh - 12rem); margin: auto; border-radius: 10px; background: #0b1411; }
#project-image-preview { object-fit: contain; touch-action: pan-y; }
#project-file-preview { height: min(74dvh, 900px); border: 0; background: #fff; }
dialog::backdrop { background: rgb(7 27 23 / 58%); backdrop-filter: blur(3px); }
.dialog-form, .detail-shell { display: grid; gap: 1rem; margin: 0; padding: clamp(1.2rem, 4vw, 1.8rem); }
.nested-form { display: grid; gap: 1rem; margin: 0; }
.dialog-form > header, .detail-shell > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
@media (min-width: 821px) {
  dialog.drawer-dialog { inset: 0; width: 100%; height: 100dvh; margin: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
  dialog.drawer-dialog .project-folder-shell { width: min(720px, 100%); height: 100%; margin-left: auto; overflow-y: auto; overscroll-behavior: contain; background: var(--canvas); border-radius: 20px 0 0 20px; box-shadow: 0 28px 80px rgb(8 35 29 / 35%); }
}
.dialog-form header h2, .detail-shell header h2 { margin: 0; }
.dialog-form footer { display: flex; justify-content: flex-end; gap: .6rem; padding-top: .5rem; }
.form-grid { display: grid; gap: .9rem; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.span-2 { grid-column: 1 / -1; }
.form-error { min-height: 1.1em; margin: 0; color: var(--danger); font-size: .85rem; font-weight: 700; }
.field-help { margin: -.25rem 0 0; color: var(--muted); font-size: .8rem; font-weight: 400; }
.dictation-box { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .7rem; padding: .8rem; background: #eff6f3; border-radius: 11px; }
.dictation-box p { margin: .25rem 0 0; color: var(--muted); font-size: .8rem; }
.dictation-box .field-help { grid-column: 1 / -1; }
.secret-output { display: block; padding: 1rem; overflow-wrap: anywhere; border: 1px dashed var(--brand-2); border-radius: 9px; background: #eef6f3; font: 700 1rem Consolas, monospace; user-select: all; }
.secret-output.compact { padding: .7rem; font-size: .9rem; letter-spacing: .04em; }
.recovery-codes { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1.5rem; margin: 0; padding: 1rem 1rem 1rem 2.5rem; border: 1px dashed var(--brand-2); border-radius: 9px; background: #eef6f3; font: 700 .95rem Consolas, monospace; user-select: all; }
.check-list { display: grid; gap: .55rem; }
.check-row { display: flex; align-items: center; gap: .7rem; padding: .8rem; border: 1px solid var(--line); border-radius: 10px; }
.check-row input { width: 18px; min-height: 18px; }

.detail-meta { display: flex; flex-wrap: wrap; gap: .5rem; }
.meta-chip { padding: .36rem .6rem; border-radius: 8px; background: var(--canvas); color: #465651; font-size: .8rem; }
.detail-content { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.detail-panel { padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.detail-panel h3 { margin: 0 0 .55rem; font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.detail-panel p { margin: 0; line-height: 1.55; white-space: pre-wrap; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .65rem; }
.photo-card { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--canvas); }
.photo-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-card figcaption { padding: .45rem; color: var(--muted); font-size: .75rem; }
.timeline { display: grid; gap: .65rem; }
.timeline-item { position: relative; padding: .8rem .8rem .8rem 1rem; border-left: 3px solid #a8c8bf; background: var(--canvas); border-radius: 0 9px 9px 0; }
.timeline-item p { margin: .4rem 0 0; white-space: pre-wrap; }
.timeline-item small { color: var(--muted); }
.detail-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; border-top: 1px solid var(--line); padding-top: 1rem; }

.project-folder-shell { min-height: 100%; display: flex; flex-direction: column; gap: 1rem; padding: clamp(1.15rem, 3vw, 1.7rem); }
.project-folder-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.project-folder-header h2 { margin: 0; }
.project-folder-header .muted { margin: .25rem 0 0; }
.project-folder-header-actions { display: flex; align-items: center; gap: .55rem; }
.folder-user-menu { position: relative; }
.folder-user-popover { z-index: 5; }
.project-folder-toolbar { display: flex; align-items: end; gap: .65rem; }
.project-folder-mobile-quick-actions { display: none; }
.folder-filters { position: relative; z-index: 2; display: flex; flex: 0 0 auto; min-height: 44px; gap: .45rem; padding: .1rem 0 .7rem; overflow-x: auto; scrollbar-width: thin; background: var(--canvas); }
.folder-title-icon { display: inline-grid; place-items: center; width: 1.35em; height: 1.1em; margin-right: .14em; border-radius: .22em; background: var(--brand-2); color: #fff; font-size: .78em; vertical-align: .08em; }
.folder-title-icon svg, .folder-empty-icon svg { width: 72%; height: 72%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.folder-filter { min-height: 36px; padding: .45rem .72rem; white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .8rem; font-weight: 800; }
.folder-filter.active { border-color: var(--brand-2); background: #e5f1ed; color: var(--brand); }
.project-item-form { display: grid; gap: .85rem; padding: 1rem; border: 1px solid #bcd1ca; border-radius: 13px; background: #f2f8f6; }
.project-item-form footer { display: flex; justify-content: flex-end; gap: .55rem; }
.project-folder-list { position: relative; z-index: 1; display: grid; gap: .65rem; }
.project-folder-item { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: .8rem; padding: .85rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.project-item-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 11px; background: #e6f2ee; color: var(--brand); font-size: 1.25rem; font-weight: 850; }
.project-item-thumbnail { object-fit: cover; border: 1px solid #d9e5e0; }
.project-item-main { min-width: 0; }
.project-item-main h3 { margin: 0; font-size: .98rem; overflow-wrap: anywhere; }
.project-item-title-input { min-width: 0; min-height: 38px; font-weight: 800; }
.project-item-main p { margin: .25rem 0 0; color: var(--muted); font-size: .82rem; line-height: 1.45; overflow-wrap: anywhere; }
.project-item-meta { display: flex; flex-wrap: wrap; gap: .35rem .65rem; margin-top: .35rem; color: var(--muted); font-size: .72rem; }
.project-item-function-menu { position: relative; justify-self: end; }
.project-item-function-menu > summary { display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; cursor: pointer; list-style: none; }
.project-item-function-menu > summary::-webkit-details-marker { display: none; }
.project-item-function-menu > summary::after { content: "▾"; font-size: .72rem; }
.project-item-function-menu[open] > summary::after { transform: rotate(180deg); }
.project-item-actions { position: absolute; z-index: 4; top: calc(100% + .4rem); right: 0; display: none; min-width: max-content; padding: .45rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); flex-direction: column; gap: .35rem; }
.project-item-function-menu[open] .project-item-actions { display: flex; }
.project-item-actions .button { min-height: 36px; padding: .45rem .7rem; font-size: .78rem; }
.project-upload-panel { display: grid; gap: .75rem; padding: 1rem; border: 1px solid #bcd1ca; border-radius: 14px; background: #f2f8f6; }
.project-upload-panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.project-upload-panel-header .eyebrow { margin: 0 0 .15rem; }
.project-upload-panel-header h3 { margin: 0; font-size: 1rem; }
.project-file-dropzone { display: grid; place-items: center; gap: .2rem; min-height: 128px; padding: 1rem; border: 2px dashed #8eb8a8; border-radius: 12px; background: #fff; color: var(--muted); cursor: pointer; text-align: center; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.project-file-dropzone:hover, .project-file-dropzone:focus-visible, .project-file-dropzone.is-dragging { border-color: var(--brand); background: #e7f3ee; color: var(--brand); outline: none; transform: translateY(-1px); }
.project-file-dropzone strong { color: var(--ink); font-size: .95rem; }
.project-file-dropzone-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 1.35rem; font-weight: 800; }
.project-file-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.project-photo-picker { position: relative; overflow: hidden; }
.project-photo-input { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; opacity: 0; cursor: pointer; }
.project-upload-hint { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.project-file-queue { display: grid; gap: .55rem; }
.project-upload-card { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: .7rem; align-items: center; padding: .7rem; border: 1px solid #bcd1ca; border-radius: 12px; background: #f2f8f6; }
.project-upload-preview { width: 58px; height: 48px; border-radius: 8px; object-fit: cover; background: #e6f2ee; display: grid; place-items: center; color: var(--brand); font-size: .72rem; font-weight: 800; }
.project-upload-card p { margin: .18rem 0; color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.folder-empty { margin: auto 0; padding: 2.5rem 1rem; text-align: center; border: 1px dashed #b9c8c3; border-radius: 14px; background: var(--surface); color: var(--muted); }
.folder-empty h3 { margin: .6rem 0 .45rem; color: var(--ink); }
.folder-empty p { max-width: 430px; margin: 0 auto 1rem; line-height: 1.5; }
.folder-empty-icon { display: inline-grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; background: #e6f2ee; color: var(--brand); font-size: 2rem; }

.project-time-card { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 1rem; align-items: center; margin: 1rem 0 1.25rem; padding: 1.05rem 1.2rem; border: 1px solid #cbded8; border-radius: var(--radius); background: linear-gradient(135deg, #f4fbf8, #fff); box-shadow: var(--shadow-soft); }
.project-time-copy h2 { margin: .12rem 0 .25rem; font-size: 1.12rem; }
.project-time-copy p { margin: 0; }
.project-time-live { min-width: 130px; text-align: right; }
.project-time-live strong { display: block; color: var(--brand); font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.project-time-live span { display: block; margin-top: .2rem; color: var(--muted); font-size: .8rem; }
.project-time-actions { display: flex; gap: .55rem; }
.project-time-toggle { min-width: 116px; min-height: 48px; border-color: #16805f; background: #16805f; color: #fff; font-weight: 800; }
.project-time-toggle.is-running { border-color: #b93838; background: #b93838; }
.project-time-history { width: min(900px, 100%); }
.project-time-summary { display: flex; align-items: baseline; gap: .75rem; margin: .8rem 0 1rem; padding: .9rem 1rem; border-radius: 12px; background: var(--surface-alt); }
.project-time-summary strong { color: var(--brand); font-size: 1.25rem; }
.project-time-summary small { margin-left: auto; color: var(--muted); }
.project-time-table-wrap { overflow-x: auto; }
.project-time-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.project-time-table th, .project-time-table td { padding: .78rem .65rem; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.time-calendar-panel { display: grid; gap: 1rem; padding: clamp(1rem, 3vw, 1.5rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.time-calendar-panel h2 { margin: 0; }
.time-calendar-controls { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.time-calendar-controls label { width: min(220px, 100%); }.time-calendar-controls strong { color: var(--brand); font-size: 1.15rem; }.time-calendar-actions { display: flex; align-items: center; justify-content: end; flex-wrap: wrap; gap: .75rem; }
.time-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
.time-calendar-day { display: grid; align-content: start; gap: .35rem; min-height: 118px; padding: .65rem; border: 1px solid var(--line); border-radius: 11px; background: var(--canvas); }
.time-calendar-day.has-time { border-color: #7eb8a5; background: #f2faf6; }.time-calendar-day time { font-weight: 850; }.time-calendar-day strong { color: var(--brand); font-size: .82rem; }.time-calendar-day ul { display: grid; gap: .2rem; margin: 0; padding: 0; list-style: none; font-size: .74rem; }.time-calendar-day li { overflow-wrap: anywhere; }
.time-view-tabs { display: flex; flex-wrap: wrap; gap: .55rem; }.time-view-tabs .button { min-height: 42px; }
#company-time-project-field { width: min(420px, 100%); }
.time-breakdown { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: .75rem; }.time-breakdown-project { padding: .9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--canvas); }.time-breakdown-heading, .time-breakdown-list li { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }.time-breakdown-heading { padding-bottom: .55rem; border-bottom: 1px solid var(--line); }.time-breakdown-heading h3 { margin: 0; font-size: 1rem; }.time-breakdown-heading strong, .time-breakdown-list strong { color: var(--brand); white-space: nowrap; }.time-breakdown-list { display: grid; gap: .45rem; margin: .7rem 0 0; padding: 0; list-style: none; }.time-breakdown-list li { font-size: .9rem; }
.project-time-table th { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.project-time-table tr.is-running td { background: #edf9f4; font-weight: 700; }
.employee-time-summary-table td:last-child { font-weight: 800; color: var(--brand); }

.toast-region { position: fixed; z-index: 100; right: 1rem; bottom: 1rem; display: grid; gap: .5rem; width: min(380px, calc(100% - 2rem)); pointer-events: none; }
.toast { padding: .9rem 1rem; border-radius: 11px; background: #162d28; color: #fff; box-shadow: var(--shadow); animation: toast-in .2s ease-out; }
.toast.error { background: #8f1d17; }
.toast.warning { background: #8a4b00; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }
.noscript { margin: 2rem; padding: 1rem; color: var(--danger); background: var(--danger-soft); }
.mobile-bottom-nav { display: none; }
.task-more-fields { margin: .8rem 0 0; }
.checklist-builder { display: grid; gap: .7rem; margin: .9rem 0; padding: .9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--canvas); }
.checklist-builder legend { padding: 0 .35rem; color: var(--brand); font-weight: 850; }
.checklist-builder .field-help { margin: 0; }
.detail-checklist { margin: 1rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: 13px; background: #f8fbfa; }
.checklist-heading { display: flex; align-items: end; justify-content: space-between; gap: .8rem; margin-bottom: .75rem; }
.checklist-heading h3 { margin: 0; font-size: 1rem; }
.checklist-heading .eyebrow { margin-bottom: .18rem; }
.checklist-items { display: grid; gap: .6rem; }
.checklist-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .7rem; align-items: center; padding: .75rem; border: 1px solid var(--line); border-left: 5px solid #9aa8a3; border-radius: 10px; background: var(--surface); }
.checklist-item.checked { border-left-color: var(--success); }.checklist-item.deviation { border-left-color: var(--danger); background: var(--danger-soft); }.checklist-item.not_applicable { border-left-color: var(--muted); }
.checklist-item-copy { display: grid; gap: .2rem; }.checklist-item-copy small { color: var(--muted); font-weight: 700; }.checklist-item.deviation small { color: var(--danger); }
.checklist-item-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }.checklist-item-actions .button { min-height: 42px; padding: .5rem .7rem; }.checklist-note { grid-column: 1 / -1; margin: 0; padding-top: .55rem; border-top: 1px solid var(--line); color: var(--muted); white-space: pre-wrap; }

@media (max-width: 820px) {
  .app-shell { display: block; }
  .app-sidebar { display: none; }
  .topbar, main { grid-column: auto; }
  .topbar .brand { display: flex; }
  .topbar { grid-template-columns: minmax(0, 1fr) auto; }
  .brand > span:last-child { min-width: 0; }
  .user-menu { display: flex; justify-self: end; }
  .avatar-button { display: inline-grid; place-items: center; flex: 0 0 42px; }
  .popover { position: absolute; right: 0; bottom: auto; left: auto; top: calc(100% + .6rem); width: min(280px, calc(100vw - 1.5rem)); min-width: 0; }
  .connection-status-wrapper { display: none; }
  main { padding-bottom: 6.5rem; }
  .mobile-bottom-nav { position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .2rem; padding: .45rem max(.55rem, env(safe-area-inset-left)) calc(.45rem + env(safe-area-inset-bottom)) max(.55rem, env(safe-area-inset-right)); border-top: 1px solid var(--line); background: rgb(255 255 255 / 96%); box-shadow: 0 -8px 24px rgb(24 52 45 / 10%); backdrop-filter: blur(10px); }
  .mobile-bottom-nav[data-role="employee"] { grid-template-columns: repeat(3, 1fr); }
  .mobile-bottom-nav button { display: grid; place-items: center; gap: .16rem; min-height: 48px; padding: .2rem; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: .68rem; font-weight: 800; }
  .mobile-bottom-nav button > span:first-child, .project-folder-mobile-nav button > span:first-child { font-size: 1.25rem; line-height: 1; }
  .mobile-nav-icon { display: grid; place-items: center; width: 1.25rem; height: 1.25rem; }
  .mobile-nav-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
  .mobile-bottom-nav .mobile-quick-action { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgb(18 63 55 / 22%); }
  #project-folder-button, #new-task-button { display: none; }
  .project-folder-shell { padding-bottom: 6.5rem; }
  .project-folder-mobile-nav { position: fixed; z-index: 40; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .2rem; margin: 0; padding: .45rem max(.55rem, env(safe-area-inset-left)) calc(.45rem + env(safe-area-inset-bottom)) max(.55rem, env(safe-area-inset-right)); border-top: 1px solid var(--line); background: rgb(255 255 255 / 96%); box-shadow: 0 -8px 24px rgb(24 52 45 / 10%); backdrop-filter: blur(10px); }
  .project-folder-mobile-nav[data-role="admin"] { grid-template-columns: repeat(4, 1fr); }
  .project-folder-mobile-nav button { display: grid; place-items: center; gap: .16rem; min-height: 48px; padding: .2rem; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: .68rem; font-weight: 800; }
  .project-folder-mobile-nav .mobile-quick-action { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgb(18 63 55 / 22%); }
  #task-form[data-quick="true"] .task-optional { display: none; }
  #task-form[data-quick="true"] .checklist-builder { display: none; }
  #task-form[data-quick="true"] .task-more-fields { display: inline-flex; }
  .project-bar { align-items: stretch; flex-direction: column; }
  .project-bar > label { flex: auto; }
  .project-time-card { grid-template-columns: minmax(0, 1fr) auto; }
  .project-time-actions { grid-column: 1 / -1; }
  .project-time-actions .button { flex: 1; }
  .project-actions { display: grid; grid-template-columns: auto 1fr 1fr; }
  .project-action-menu, .project-action-menu-list { display: contents; }
  .project-action-menu > summary { display: none; }
  .project-actions .danger-quiet { grid-column: 1 / -1; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .day-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .project-home-card { grid-template-columns: 1fr; }
  .project-home-sections-heading { align-items: start; }
  .project-upload-panel { padding: .85rem; }
  .project-file-actions { display: grid; grid-template-columns: 1fr; }
  .project-folder-toolbar > .button { display: none; }
  .project-folder-mobile-quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .project-folder-mobile-quick-actions .button { min-width: 0; min-height: 48px; padding: .6rem .35rem; white-space: normal; text-align: center; }
  .project-item-mobile-function-button { grid-column: 1 / -1; width: 100%; min-height: 44px; }
  .project-folder-item { grid-template-columns: 42px minmax(0, 1fr); align-items: start; }
  .project-item-icon { width: 42px; height: 42px; }
  .project-item-function-menu { display: contents; }
  .project-item-function-menu > summary { display: none; }
  .project-folder-item.mobile-actions-open .project-item-actions { position: static; grid-column: 1 / -1; display: flex; min-width: 0; padding: .7rem 0 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; flex-direction: row; flex-wrap: wrap; justify-content: stretch; }
  .project-item-actions .button { flex: 1; min-height: 42px; }
  .project-item-tap-target { cursor: pointer; }
  .project-item-tap-target:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 3px; border-radius: 8px; }
  .filter-row { align-items: stretch; flex-direction: column; }
  .compact-label { justify-content: space-between; }
  .task-card { grid-template-columns: 5px minmax(0, 1fr) auto; }
  .task-card-open { grid-template-columns: 1fr; gap: 0; padding-left: .85rem; }
  .task-card-side { display: flex; justify-content: space-between; padding-bottom: .8rem; }
  .task-card-primary-action { min-width: 0; min-height: 46px; margin: .55rem .65rem .55rem .35rem; padding-inline: .7rem; }
  .priority-stripe { grid-row: 1 / span 2; }
  .task-quick-assignment { margin: .65rem .55rem .65rem .25rem; }
  .data-row { grid-template-columns: 1fr; }
  .inline-create-form { grid-template-columns: 1fr; }
  .inline-create-form .button { width: 100%; }
  .row-actions { justify-content: flex-start; }
  .project-bar { grid-template-columns: 1fr; align-items: stretch; }
  .project-actions { justify-content: flex-start; }
  dialog.drawer-dialog { width: 100%; border-radius: 0; }
}

@media (max-width: 580px) {
  .project-home-layout { grid-template-columns: 1fr; }
  .employee-today-task { grid-template-columns: 1fr; }.employee-today-task-actions { justify-content: stretch; }.employee-today-task-actions .button { flex: 1; }.employee-today-time { align-items: stretch; flex-direction: column; }.employee-today-time .button { width: 100%; min-height: 48px; }
  .project-dashboard-stats { grid-template-columns: 1fr; }
  .project-home-sections-heading { display: grid; grid-template-columns: 1fr auto; }
  .auth-shell { display: block; padding: 1rem 0; background: linear-gradient(180deg, var(--brand) 0 180px, var(--canvas) 180px); }
  .auth-brand { height: 140px; background: transparent; }
  .auth-brand .brand-mark { width: 62px; font-size: 2.2rem; border-radius: 20px 20px 20px 6px; }
  .auth-brand p { font-size: 1.1rem; margin-top: .5rem; }
  .auth-card { background: #fff; padding: 1.4rem; }
  .topbar { padding: .65rem .8rem; }
  .brand small { display: none; }
  main { width: min(100% - 1rem, 1220px); padding-top: .85rem; }
  .page-heading { align-items: stretch; flex-direction: column; margin-bottom: .8rem; }
  .page-heading .button, .heading-actions { width: 100%; }
  .heading-actions { display: grid; grid-template-columns: 1fr; }
  .project-bar { gap: .45rem; padding: .45rem; border: 0; border-radius: 16px; background: transparent; box-shadow: none; }
  .project-picker { gap: .2rem; }
  .mobile-project-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .project-bar select { min-height: 44px; padding-top: .3rem; padding-bottom: .3rem; }
  .project-time-card { position: relative; grid-template-columns: 1fr; gap: .45rem; margin: .5rem 0 .65rem; padding: .6rem .7rem; border-radius: 16px; }
  .project-time-copy { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .project-time-copy h2 { margin: .08rem 0 .12rem; }
  .project-time-copy p { line-height: 1.3; }
  .project-time-live { text-align: left; }
  .project-time-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
  .project-time-actions .button { min-height: 44px; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); gap: .3rem; margin: .45rem 0; }
  .stat-card { gap: .05rem; min-height: 52px; padding: .28rem .18rem; border-radius: 10px; }
  .stat-card span { font-size: 1rem; }
  .stat-card small { font-size: .56rem; line-height: 1.05; }
  .day-filters { grid-template-columns: repeat(3, 1fr); gap: .35rem; margin: 0 0 .65rem; }
  .day-filters .button { min-height: 40px; padding: .35rem .2rem; font-size: .68rem; }
  .project-time-summary { align-items: flex-start; flex-direction: column; }
  .project-time-summary small { margin-left: 0; }
  .project-time-table-wrap { overflow: visible; }
  .project-time-table, .project-time-table tbody, .project-time-table tr, .project-time-table td { display: block; width: 100%; }
  .project-time-table thead { display: none; }
  .project-time-table tr { margin-bottom: .75rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
  .time-calendar { grid-template-columns: repeat(2, minmax(0, 1fr)); }.time-calendar-day { min-height: 102px; }
  .project-time-table tr.is-running { border-color: #7eb8a5; background: #edf9f4; }
  .project-time-table th, .project-time-table td { padding: .35rem 0; border: 0; white-space: normal; }
  .project-time-table td { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: .5rem; }
  .project-time-table td::before { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
  .project-time-table td:nth-child(1)::before { content: "Datum"; }
  .project-time-table td:nth-child(2)::before { content: "Monteur"; }
  .project-time-table td:nth-child(3)::before { content: "Start"; }
  .project-time-table td:nth-child(4)::before { content: "Stopp"; }
  .project-time-table td:nth-child(5)::before { content: "Dauer"; }
  .employee-time-summary-table td:nth-child(1)::before { content: "Monteur"; }
  .employee-time-summary-table td:nth-child(2)::before { content: "Status"; }
  .employee-time-summary-table td:nth-child(3)::before { content: "Gesamtzeit"; }
  .project-actions { grid-template-columns: auto 1fr; }
  .time-calendar-controls { align-items: stretch; flex-direction: column; }.time-calendar-controls label { width: 100%; }.time-calendar { grid-template-columns: 1fr; }
  .project-actions #members-button, .project-actions .danger-quiet { grid-column: 1 / -1; }
  .form-grid.two, .detail-content { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  dialog { width: calc(100% - .5rem); max-height: calc(100vh - 1rem); }
  .dialog-form footer { flex-direction: column-reverse; }
  .dialog-form footer .button { width: 100%; }
  .dictation-box { grid-template-columns: 1fr; }
  .dictation-box .button { width: 100%; }
  .task-card h2 { white-space: normal; }
  .detail-checklist { padding: .8rem; }.checklist-heading { align-items: start; flex-direction: column; gap: .25rem; }.checklist-item { grid-template-columns: 1fr; }.checklist-item-actions { display: grid; grid-template-columns: 1fr 1fr; }.checklist-item-actions .button { min-height: 50px; white-space: normal; }.checklist-item-actions .button:last-child:nth-child(3) { grid-column: 1 / -1; }
  .completed-task-card .row-actions { grid-column: 2; padding: 0 0 .8rem; justify-content: flex-start; }
  .project-folder-toolbar { align-items: stretch; flex-direction: column; }
  .project-folder-toolbar .button { width: 100%; }
  .project-folder-section-picker { grid-template-columns: 1fr; margin: .1rem 0 .75rem; }
  .project-folder-item { grid-template-columns: 42px minmax(0, 1fr); }
  .project-item-form footer { flex-direction: column-reverse; }
  .project-item-form footer .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
