:root {
  color-scheme: light;
  --ink: #19312f;
  --muted: #6e7f7d;
  --line: #dce7e4;
  --surface: #ffffff;
  --surface-soft: #f4f8f7;
  --canvas: #edf4f2;
  --primary: #157a70;
  --primary-strong: #0e625a;
  --primary-soft: #dff3ef;
  --nav: #163f3b;
  --nav-deep: #102f2c;
  --danger: #c54848;
  --warning: #ba7424;
  --shadow: 0 16px 40px rgba(23, 61, 57, 0.09);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 268px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 20;
  display: flex; flex-direction: column; color: #eaf7f4;
  background: linear-gradient(165deg, var(--nav) 0%, var(--nav-deep) 100%);
  padding: 25px 17px 20px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 9px 24px; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; font-size: 22px; background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.brand strong { display: block; font-size: 17px; letter-spacing: .02em; }
.brand span { display: block; margin-top: 4px; color: #a9c9c4; font-size: 11px; letter-spacing: .04em; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-group { padding: 17px 12px 6px; color: #7fa9a3; font-size: 11px; font-weight: 700; letter-spacing: .13em; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%; border: 0; border-radius: 11px;
  padding: 10px 12px; color: #c8ddd9; background: transparent; text-align: left; transition: .16s ease;
}
.nav-item:hover { color: white; background: rgba(255,255,255,.07); transform: translateX(2px); }
.nav-item.active { color: #fff; background: rgba(94, 216, 194, .17); box-shadow: inset 3px 0 #67d7c2; }
.nav-icon { width: 20px; text-align: center; }
.sidebar-note { margin-top: auto; padding: 18px 12px 0; color: #b0cbc6; font-size: 12px; line-height: 1.55; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-note small { display: block; color: #7da39d; margin-left: 14px; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #5ee0b7; box-shadow: 0 0 0 4px rgba(94,224,183,.12); }

.main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 15; min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px clamp(20px, 3vw, 42px); background: rgba(247, 251, 250, .88); border-bottom: 1px solid rgba(210,226,222,.85); backdrop-filter: blur(16px);
}
.topbar-title { display: flex; align-items: center; gap: 12px; }
.topbar-title strong { display: block; font-size: 15px; }
.topbar-title span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.menu-button { display: none; border: 0; color: var(--ink); background: transparent; font-size: 22px; }
.content { padding: 32px clamp(20px, 3vw, 42px) 54px; }
.page { max-width: 1500px; margin: 0 auto; animation: page-in .23s ease; }
@keyframes page-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.eyebrow { margin-bottom: 7px; color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(25px, 3vw, 34px); line-height: 1.2; letter-spacing: -.03em; }
.page-subtitle { max-width: 700px; margin: 9px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.head-actions, .toolbar-actions { display: flex; flex-wrap: wrap; gap: 9px; }

.button { min-height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 13px; color: var(--ink); background: var(--surface); font-size: 13px; font-weight: 650; transition: .16s ease; }
.button:hover { transform: translateY(-1px); border-color: #afc9c4; box-shadow: 0 7px 18px rgba(22,63,59,.08); }
.button-primary { border-color: var(--primary); color: #fff; background: var(--primary); }
.button-primary:hover { background: var(--primary-strong); border-color: var(--primary-strong); }
.button-soft { color: var(--primary-strong); background: #f0f8f6; }
.button-danger-soft { color: var(--danger); background: #fff8f8; border-color: #f0d9d9; }
.button-danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.button-small { min-height: 30px; padding: 5px 9px; font-size: 12px; border-radius: 8px; }
.icon-button { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; margin-bottom: 22px; }
.stat-card, .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-card { position: relative; overflow: hidden; padding: 20px; }
.stat-card::after { content: ""; position: absolute; width: 76px; height: 76px; right: -18px; bottom: -28px; border-radius: 50%; background: var(--primary-soft); }
.stat-icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 20px; border-radius: 12px; background: var(--surface-soft); font-size: 19px; }
.stat-value { font-size: 30px; font-weight: 800; letter-spacing: -.04em; }
.stat-label { margin-top: 4px; color: var(--muted); font-size: 12px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(320px,.65fr); gap: 18px; }
.card { padding: 20px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.card-title h2 { margin: 0; font-size: 17px; }
.card-title span { color: var(--muted); font-size: 12px; }
.quick-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.quick-action { display: flex; align-items: center; gap: 10px; min-height: 58px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; color: var(--ink); background: var(--surface-soft); text-align: left; }
.quick-action:hover { border-color: #aad2ca; background: var(--primary-soft); }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; padding: 12px; background: rgba(255,255,255,.68); border: 1px solid var(--line); border-radius: 14px; }
.search { min-width: min(360px, 100%); position: relative; }
.search input { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 0 13px 0 36px; color: var(--ink); background: #fff; outline: none; }
.search::before { content: "⌕"; position: absolute; left: 13px; top: 6px; color: var(--muted); font-size: 19px; }
.search input:focus, input:focus, select:focus, textarea:focus { border-color: #64aa9e !important; box-shadow: 0 0 0 3px rgba(21,122,112,.11); outline: none; }
.tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 15px; }
.tab { border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; color: var(--muted); background: #fff; font-size: 12px; font-weight: 700; }
.tab.active { color: var(--primary-strong); background: var(--primary-soft); border-color: #b7dfd7; }

.table-card { overflow: hidden; padding: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 790px; }
th { padding: 13px 15px; color: var(--muted); background: #f7faf9; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-align: left; }
td { padding: 14px 15px; border-bottom: 1px solid #edf2f1; font-size: 13px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfdfc; }
.primary-cell { font-weight: 750; }
.secondary { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px; color: #4d615f; background: #edf3f2; font-size: 11px; font-weight: 750; white-space: nowrap; }
.badge-green { color: #176856; background: #ddf4eb; }
.badge-amber { color: #895613; background: #fff0d7; }
.badge-red { color: #9e3939; background: #fde7e7; }
.badge-blue { color: #2c5f91; background: #e6f0fb; }
.empty { padding: 58px 24px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 18px; background: var(--surface-soft); font-size: 25px; }
.empty h3 { margin: 0 0 7px; font-size: 16px; }
.empty p { margin: 0 0 17px; color: var(--muted); font-size: 13px; }

.timeline { display: grid; gap: 10px; }
.timeline-item { display: grid; grid-template-columns: 58px 1fr; gap: 13px; padding: 11px 0; border-bottom: 1px solid #edf2f1; }
.timeline-item:last-child { border-bottom: 0; }
.timeline-time { color: var(--primary); font-size: 12px; font-weight: 800; }
.timeline-title { font-size: 13px; font-weight: 750; }
.timeline-meta { margin-top: 3px; color: var(--muted); font-size: 11px; }
.report-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.report-text { min-height: 280px; margin: 0; padding: 17px; overflow: auto; color: #33514e; background: #f7faf9; border: 1px solid var(--line); border-radius: 13px; font: 13px/1.8 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.notice { margin-bottom: 16px; padding: 13px 15px; border: 1px solid #d6eae6; border-radius: 12px; color: #496663; background: #f0f8f6; font-size: 13px; line-height: 1.6; }

.modal-mask { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(10,35,32,.52); backdrop-filter: blur(5px); }
.modal-mask[hidden] { display: none; }
.modal { width: min(680px, 100%); max-height: min(86vh, 820px); overflow-y: auto; background: #fff; border-radius: 20px; box-shadow: 0 28px 80px rgba(7,35,32,.26); animation: modal-in .18s ease; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 19px 22px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-body { padding: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.field { display: grid; gap: 7px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 750; }
.required { color: var(--danger); }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; color: var(--ink); background: #fff; }
.field textarea { min-height: 98px; resize: vertical; line-height: 1.55; }
.field-hint { color: var(--muted); font-size: 11px; line-height: 1.5; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 90; max-width: 380px; padding: 12px 16px; color: #fff; background: #183f3b; border-radius: 11px; box-shadow: 0 18px 45px rgba(10,45,41,.24); font-size: 13px; opacity: 0; pointer-events: none; transform: translateY(10px); transition: .2s ease; }
.toast.show { opacity: 1; transform: none; }

@media (max-width: 1120px) {
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-grid, .report-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; transform: translateX(-105%); width: min(290px, 86vw); transition: .22s ease; box-shadow: 20px 0 50px rgba(9,38,34,.2); }
  .sidebar.open { transform: none; }
  .menu-button { display: block; }
  .topbar { align-items: flex-start; }
}
@media (max-width: 600px) {
  .topbar { padding: 12px 15px; }
  .topbar-title span { display: none; }
  .content { padding: 24px 14px 42px; }
  .page-head, .toolbar { align-items: stretch; flex-direction: column; }
  .head-actions .button { flex: 1; }
  .stat-grid { gap: 10px; }
  .stat-card { padding: 16px; }
  .stat-value { font-size: 25px; }
  .form-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .quick-grid { grid-template-columns: 1fr; }
}

[hidden] { display: none !important; }
.archive-heading { margin-top: 24px; }
.timeline-item { grid-template-columns: minmax(115px, 175px) 1fr; }
.timeline-time { overflow-wrap: anywhere; }
a.button { display: inline-flex; align-items: center; text-decoration: none; }
.row-actions { flex-wrap: wrap; }

/* Shared compact controls use each device's native date and time picker. */
input, select, textarea { min-width: 0; max-width: 100%; }
input[type=date], input[type=time] { min-height: 44px; appearance: auto; }
button:disabled { cursor: wait; opacity: .65; }
a { color: var(--primary-strong); }
button:focus-visible, a:focus-visible { outline: 3px solid #64aa9e; outline-offset: 3px; }
h2 { font-size: 19px; margin: 0; }
.sidebar-backdrop { position: fixed; inset: 0; border: 0; z-index: 19; background: rgba(10,35,32,.5); }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.settings-link { margin-top: 18px; }
.danger-zone { border-color: #edcaca; }
.danger-zone h2 { color: var(--danger); }
.entry-body { min-height: 100dvh; background: radial-gradient(ellipse at top left, #d4ebe4, transparent 60%), var(--canvas); }
.entry-layout { width: min(780px, 100%); margin: 0 auto; padding: 48px 22px 32px; }
.login-layout { max-width: 490px; padding-top: max(40px, 12vh); }
.entry-brand { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 750; margin-bottom: 24px; }
.entry-brand .brand-mark { background: var(--nav); color: #fff; }
.entry-card { padding: 32px; }
.entry-card h1 { font-size: 29px; }
.entry-form { margin-top: 26px; }
.entry-submit { width: 100%; margin-top: 24px; min-height: 46px; font-size: 15px; }
.entry-link { display: block; text-align: center; margin-top: 24px; font-size: 13px; text-underline-offset: 4px; }
.password-control { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.password-control input { flex: 1; border: 0; border-radius: 0; }
.password-control button { border: 0; background: var(--surface-soft); padding: 10px 12px; color: var(--primary-strong); font-size: 13px; }
.form-error { border-radius: 10px; padding: 12px; color: #9e3939; background: #fde7e7; font-size: 13px; line-height: 1.6; }
.registration-notice { margin: 22px 0 0; }
.success-panel { text-align: center; }
.success-mark { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 20px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 32px; }
.success-panel button { margin-top: 24px; }
@media (min-width: 821px) { .sidebar-backdrop { display: none; } }
@media (max-width: 820px) {
  .sidebar { height: 100dvh; }
  .button, .nav-item, .tab, .menu-button { min-height: 44px; }
  .menu-button { min-width: 44px; }
  .topbar { align-items: center; gap: 8px; }
  .topbar-title { min-width: 0; gap: 5px; }
  .topbar-title strong { font-size: 13px; }
  .topbar-actions { flex-shrink: 0; }
  .field input, .field select, .field textarea, .search input { font-size: 16px; }
}
@media (max-width: 600px) {
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .entry-layout { padding: 24px 14px; }
  .login-layout { padding-top: 48px; }
  .entry-card { padding: 24px 20px; }
  .entry-card h1 { font-size: 27px; }
  .table-wrap { overflow: visible; }
  table, tbody, tr, td { display: block; width: 100%; min-width: 0; }
  thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  tr { padding: 10px 14px; border-bottom: 8px solid var(--canvas); }
  tbody tr:last-child { border-bottom: 0; }
  td { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; padding: 9px 0; overflow-wrap: anywhere; align-items: start; }
  td::before { content: attr(data-label); font-size: 12px; color: var(--muted); font-weight: 500; }
  td .badge { justify-self: start; white-space: normal; }
  .row-actions { justify-content: flex-start; }
  .modal-mask { padding: 10px; }
  .modal { max-height: calc(100dvh - 20px); border-radius: 16px; }
  .modal-head, .modal-body { padding: 16px; }
  .modal-actions { position: sticky; bottom: -16px; background: white; padding-bottom: max(16px, env(safe-area-inset-bottom)); flex-wrap: wrap; }
  .modal-actions .button { flex: 1; justify-content: center; }
  .toast { left: 14px; right: 14px; bottom: max(14px, env(safe-area-inset-bottom)); max-width: none; }
  .timeline-item { grid-template-columns: 90px minmax(0, 1fr); }
  .timeline-title, .timeline-meta, .page-subtitle, .report-text { overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.field.settings-link { margin-bottom: 12px; }

.booking-section { padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.booking-date { display: flex; align-items: flex-end; gap: 10px; }
.booking-date .field { flex: 1; }
.booking-date > button { min-width: 44px; height: 44px; font-size: 22px; }
.booking-section h3 { font-size: 13px; margin: 18px 0 10px; }
.busy-times { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.busy-times li { background: #f3efed; color: #73615b; border-radius: 8px; padding: 8px 10px; font-size: 12px; }
.slot-fieldset { min-width: 0; padding: 0; border: 0; margin: 20px 0 0; }
.slot-fieldset legend { padding: 0; margin-bottom: 12px; font-size: 13px; font-weight: 700; }
.booking-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.booking-slot { position: relative; display: grid; grid-template-columns: 18px 1fr; column-gap: 7px; row-gap: 4px; border: 1px solid #b7d8d0; border-radius: 11px; padding: 12px 9px; color: var(--primary-strong); cursor: pointer; font-size: 13px; }
.booking-slot input { margin: 2px 0 0; accent-color: var(--primary); grid-row: span 2; }
.booking-slot small { color: var(--muted); font-size: 11px; }
.booking-slot:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.booking-slot:has(input:focus-visible) { outline: 3px solid #64aa9e; outline-offset: 2px; }
.booking-slot.unavailable { cursor: not-allowed; background: #f3f5f4; border-color: var(--line); color: #87918f; }
.registration-details-title { margin-bottom: 18px; }
.booked-slot { padding: 16px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-strong); font-weight: 650; line-height: 1.7; }
@media (max-width: 600px) { .booking-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } .booking-slot { font-size: 12px; padding: 12px 8px; } }

/* Shared weekly appointment table, including narrow-screen horizontal scrolling. */
.week-layout{max-width:1180px;width:100%}.week-nav{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:20px 0 12px}.week-jump{display:flex;align-items:center;gap:8px;margin-left:auto;font-size:13px}.week-jump input{width:auto;min-width:135px;padding:8px;border:1px solid var(--line);border-radius:8px;background:#fff;color:inherit}.week-scroll{overflow:auto;max-height:70vh;border:1px solid var(--line);border-radius:12px;margin-top:12px}.week-table{border-collapse:separate;border-spacing:0;table-layout:fixed;min-width:850px;width:100%;font-size:13px}.week-table th,.week-table td{border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:0;text-align:center;vertical-align:middle}.week-table thead th{position:sticky;top:0;z-index:3;background:#f0f6f4;padding:12px 4px;color:#24504a}.week-table th span{display:block;font-size:12px;font-weight:400;margin-top:3px}.week-table tr>th:first-child{position:sticky;left:0;background:#f6f8f7;width:90px;z-index:2;padding:8px}.week-table thead tr>th:first-child{z-index:4}.week-table .week-today{background:#dbeee4}.week-free{background:#f1faf5}.week-busy{background:repeating-linear-gradient(135deg,#f4f5f5,#f4f5f5 8px,#eef0f0 8px,#eef0f0 16px)}.week-cell{display:block;width:100%;min-height:47px;border:0;background:transparent;color:#356c52;font:inherit;cursor:pointer;padding:8px 4px}.week-cell:hover:not(:disabled){background:#dcefe4}.week-cell:disabled{color:#87908b;cursor:default;opacity:1}.week-cell:focus-visible{outline:3px solid #367957;outline-offset:-3px}.week-break td,.week-break th{background:#f5f0e7!important;color:#8d806b;font-size:11px;height:25px}.week-appointment{display:block;border:1px solid #b5d2c6;background:#e1eee7;border-radius:6px;padding:5px;margin:4px;font:inherit;color:#264e3d;cursor:pointer;width:calc(100% - 8px);overflow-wrap:anywhere}.booking-dialog{width:calc(100% - 32px);max-width:420px;border:1px solid var(--line);border-radius:18px;padding:26px;color:var(--ink);box-shadow:0 20px 70px #0003;margin:auto}.booking-dialog::backdrop{background:#15292277}.mobile-week-hint{display:none}.week-card{padding:18px}.week-table button:disabled{pointer-events:none}
@media(max-width:760px){.week-layout{padding:20px 12px}.week-layout .entry-card{padding:20px 14px}.week-nav{gap:6px}.week-nav .button{padding:8px 10px;font-size:12px}.week-jump{margin-left:0;width:100%;order:2}.mobile-week-hint{display:block}.week-table thead{display:table-header-group!important}.week-table tr{display:table-row!important}.week-table th,.week-table td{display:table-cell!important}.week-table td:before{content:none!important}.week-table td{padding:0!important;border-bottom:1px solid var(--line)!important}.week-scroll{max-height:67vh}.week-card{padding:10px}}
@media(max-width:760px){.week-table{display:table}.week-table tbody{display:table-row-group;width:auto}.week-table thead{position:static;width:auto;height:auto;clip-path:none;overflow:visible}.week-table tr{width:auto;padding:0;border:0}.week-table th,.week-table td{width:auto}.week-table td{overflow-wrap:normal}.week-table .week-appointment{white-space:normal}}
/* Module workflows */
.workflow-stats { margin: 0 0 20px; grid-template-columns: repeat(auto-fit,minmax(145px,1fr)); }
.workflow-dashboard { align-items:start; grid-template-columns:repeat(2,minmax(0,1fr)); }
.workflow-dashboard .card, .report-grid>.card { min-width:0; }
.workflow-list { padding-left:20px; margin:12px 0; }
.workflow-list li { margin:12px 0; }
.workflow-list .button { margin-left:5px; }
.action-notice,.focus-filters,.project-meta,.month-picker { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.action-notice { justify-content:space-between; }
.focus-filters { padding:16px; margin-bottom:20px; }
.focus-filters select,.month-picker input { padding:9px; border:1px solid var(--border,#ddd);border-radius:8px;background:white; }
.tag-choices,.month-choices { display:flex;gap:16px;flex-wrap:wrap; }
.tag-choices label,.month-choices label { display:flex;align-items:center;gap:6px; }
.tag-choices input,.month-choices input,.project-tasks input { width:auto; }
.month-choices { border:1px solid #e2e8f0;padding:15px;border-radius:8px; }
.project-tasks { padding:0;list-style:none; }
.project-tasks li { display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:14px 0;border-bottom:1px solid #edf0f4; }
.project-tasks label { display:flex;align-items:center;gap:10px;flex:1;min-width:160px; }
.project-tasks .task-done label { color:#64748b;text-decoration:line-through; }
.project-meta { margin-bottom:15px; }
progress { width:100%;height:12px;accent-color:#38746e; }
.large-progress { font-size:28px;font-weight:700; }
.detail-list { display:grid;grid-template-columns:90px 1fr;gap:12px; }
.detail-list dd { margin:0;overflow-wrap:anywhere; }
.empty-line { padding:12px 0; }
.multiline { white-space:pre-wrap; }
.report-text { white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.85; }
.import-preview { max-height:50vh;overflow:auto; }
.admin-slot { min-height:62px;position:relative;padding-bottom:22px; }
.slot-more { position:absolute;bottom:1px;right:3px;background:transparent;border:0;cursor:pointer;color:#65748b;font-size:22px;line-height:24px;padding:0 8px; }
.week-appointment[draggable="true"] { cursor:grab; }
.week-table th small { display:block;font-size:10px;font-weight:400;color:#77869b; }
.card:has(>.project-meta) { margin-bottom:18px; }
.row-actions { flex-wrap:wrap;min-width:160px; }
.copy-text { width:100%; }
@media(max-width:640px) {
  .workflow-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .workflow-dashboard { grid-template-columns:1fr; }
  .project-tasks li>span { width:100%;padding-left:25px; }
  .focus-filters { gap:10px; }
  .focus-filters label { width:100%; }
  .detail-list { grid-template-columns:65px 1fr; }
}
