:root {
  --blue: #1973ff; --blue-dark: #0759db; --blue-light: #edf4ff;
  --sidebar: #f3f4f6; --text: #334155; --heading: #223047; --muted: #768294;
  --border: #dce1e8; --soft-border: #e9ecf0; --green: #237558; --green-light: #edf7f2;
  --rest: #9b5b60; --rest-light: #faf0f1; --danger: #bd3542;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: var(--text); font-size: 14px; background: #fff; font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .52; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #8bb7ff; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 27px; line-height: 1.4; color: var(--heading); font-weight: 600; }
h2 { font-size: 19px; line-height: 1.45; color: var(--heading); font-weight: 600; overflow-wrap: anywhere; }
h3 { font-size: 16px; color: var(--heading); font-weight: 600; overflow-wrap: anywhere; }
p { line-height: 1.7; }
svg { width: 20px; height: 20px; flex-shrink: 0; }
.subtle { color: var(--muted); font-size: 13px; }
.skip-link { position: fixed; top: -100px; left: 12px; z-index: 100; background: #fff; color: var(--blue); padding: 12px; }
.skip-link:focus { top: 12px; }
.button, .icon-button { min-height: 44px; border: 1px solid var(--border); border-radius: 5px; background: #fff; color: var(--text); display: inline-flex; justify-content: center; align-items: center; gap: 7px; padding: 9px 15px; font-weight: 500; text-decoration: none; line-height: 1.4; }
.button:hover:not(:disabled), .icon-button:hover:not(:disabled) { background: #f7f9fc; }
.button.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.button.primary:hover:not(:disabled) { background: var(--blue-dark); border-color: var(--blue-dark); }
.button.rest-action { background: var(--rest); border-color: var(--rest); color: #fff; }
.button.rest-action:hover:not(:disabled) { background: #864b50; }
.button.danger { color: var(--danger); }
.icon-button { width: 44px; padding: 0; flex-shrink: 0; }
.text-button { min-height: 44px; border: 0; padding: 8px 10px; background: transparent; color: var(--blue); font-weight: 500; }
.badge { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; font-size: 12px; font-weight: 500; border-radius: 4px; padding: 4px 7px; background: #f0f2f5; color: #637084; }
.badge.blue { background: var(--blue-light); color: var(--blue); }
.badge.inactive { background: #f0f2f5; color: #64748b; }

.session-screen { min-height:100dvh; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; padding:24px; background:var(--sidebar); text-align:center; }
.session-brand { color:var(--heading); font-size:20px; font-weight:500; }
.session-screen p { color:var(--muted); font-size:13px; }
.login-screen { min-height: 100dvh; background: var(--sidebar); display: flex; flex-direction: column; align-items: center; padding: 76px 24px 30px; }
.login-brand, .brand { display: flex; align-items: center; gap: 11px; color: var(--heading); font-weight: 650; }
.login-brand { margin-bottom: 32px; font-size: 21px; }
.login-brand svg { width: 36px; height: 36px; }
.login-panel { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--border); border-radius: 7px; padding: 32px; }
.login-panel h1 { font-size: 24px; margin-bottom: 8px; }
.login-panel form { margin-top: 28px; }
label { display: block; font-size: 13px; font-weight: 500; color: var(--heading); margin-bottom: 7px; }
input, select, textarea { display: block; width: 100%; min-height: 44px; border: 1px solid #cfd6e1; border-radius: 4px; color: var(--text); background: #fff; padding: 11px 12px; line-height: 1.4; }
input::placeholder, textarea::placeholder { color: #929baa; }
.login-panel input { margin-bottom: 20px; }
.login-panel .primary { width: 100%; margin-top: 6px; }
.login-footnote { margin-top: 22px; color: var(--muted); font-size: 12px; }
.login-note { color: var(--muted); font-size: 12px; margin-top: 28px; }
.form-error { background: #fff3f4; border: 1px solid #f0cbd0; border-radius: 4px; padding: 10px 12px; color: #ad2635; font-size: 13px; overflow-wrap: anywhere; margin: 12px 0; }

.app-shell { min-height: 100dvh; }
.workspace { margin-left: 206px; min-width: 0; }
.app-header { min-height: 72px; padding: 0 36px; background: #fafbfc; border-bottom: 1px solid var(--soft-border); display: flex; align-items: center; justify-content: space-between; }
.header-context { font-size: 13px; color: var(--muted); }
.mobile-brand { display: none; }
.profile-button { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; min-height: 44px; color: var(--text); padding: 4px 0 4px 8px; font-size: 13px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #e4f5fa; color: #12829d; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 500; flex-shrink: 0; }
.profile-role { color: var(--muted); font-size: 11px; }
.profile-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
main#main-content { padding: 32px 36px 48px; max-width: 1550px; margin: 0 auto; }
.page-heading { display: flex; gap: 18px; justify-content: space-between; align-items: center; margin-bottom: 23px; }
.page-heading p { margin-top: 6px; color: var(--muted); font-size: 13px; }
.page-heading > div { min-width: 0; }
.app-message { padding: 12px 14px; border: 1px solid #f0d799; background: #fff8e9; border-radius: 5px; margin-bottom: 18px; line-height: 1.65; overflow-wrap: anywhere; }
.app-message .text-button { padding: 0 6px; min-height: 44px; }
.section-box { border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
.calendar-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px 12px; }
.calendar-toolbar h2 { font-size: 21px; }
.period-controls { display: flex; align-items: center; gap: 6px; }
.today-button { padding-inline: 13px; }
.calendar-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px 17px; }
.legend { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--muted); }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.legend-item.work { color: var(--green); }
.legend-item.rest { color: var(--rest); }
.calendar-loading { font-size: 11px; color: var(--muted); }
.weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--soft-border); border-bottom: 1px solid var(--border); padding: 11px 0; color: #7d8796; font-size: 12px; text-align: center; background: #fafbfc; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-day { min-width: 0; min-height: 126px; padding: 9px 9px 12px; border-right: 1px solid var(--soft-border); border-bottom: 1px solid var(--soft-border); background: #fff; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day:nth-last-child(-n+7) { border-bottom: 0; }
.calendar-day.outside { background: #fafbfc; }
.day-top { display: flex; align-items: center; min-height: 28px; margin-bottom: 7px; }
.day-number { font-size: 14px; font-weight: 550; color: #526176; width: 27px; height: 27px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.calendar-day.outside .day-number { color: #a0a9b6; }
.calendar-day.today .day-number { color: #fff; background: var(--blue); }
.day-people { display: flex; flex-direction: column; gap: 5px; }
.roster-person { display: block; width: 100%; min-width: 0; border: 1px solid transparent; border-radius: 4px; padding: 7px 5px; min-height: 32px; font-size: 12px; line-height: 1.45; text-align: left; overflow-wrap: anywhere; white-space: normal; }
.roster-person.work { color: var(--green); background: var(--green-light); }
.roster-person.rest { color: var(--rest); background: var(--rest-light); }
.roster-person.unread { color: var(--muted); background: #f4f5f7; }
.roster-person:hover:not(:disabled) { border-color: currentColor; }
.roster-person:focus-visible { outline-offset: 0; }
.calendar-empty { margin-top: 20px; }

.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-heading p { margin-top: 5px; font-size: 12px; color: var(--muted); }
.staff-initial { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 7px; background: #f0f3f7; color: #77869a; font-size: 14px; flex-shrink: 0; }
.staff-details { display: flex; flex-direction: column; min-width: 0; gap: 5px; flex: 1; }
.staff-name { font-weight: 500; color: var(--heading); overflow-wrap: anywhere; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.filter-group { display: flex; gap: 6px; align-items: center; }
.filter-group button { min-height: 44px; border: 0; background: transparent; color: var(--muted); padding: 9px 12px; border-radius: 5px; }
.filter-group button.active { background: var(--blue-light); color: var(--blue); }
.people-list { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.people-row { min-width: 0; display: flex; gap: 15px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--soft-border); }
.people-row:last-child { border-bottom: 0; }
.people-row.inactive { background: #fafbfc; }
.people-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.people-description { margin-top: 6px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.row-actions { display: flex; gap: 5px; flex-shrink: 0; }
.empty-state { padding: 36px 22px; text-align: center; border: 1px dashed var(--border); border-radius: 6px; color: var(--muted); }
.empty-state h3 { margin-bottom: 8px; font-size: 15px; }
.empty-state p { font-size: 13px; }
.empty-state .button { margin-top: 16px; }
.audit-block { margin-top: 28px; }
.audit-list { margin-top: 14px; border-top: 1px solid var(--border); }
.audit-row { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--soft-border); font-size: 12px; }
.audit-row time { color: var(--muted); flex-shrink: 0; }
.audit-row span { overflow-wrap: anywhere; }
.account-panel { max-width: 710px; border: 1px solid var(--border); border-radius: 6px; padding: 25px; }
.account-summary { display: flex; align-items: center; gap: 15px; padding-bottom: 24px; border-bottom: 1px solid var(--soft-border); margin-bottom: 24px; }
.account-summary .avatar { width: 48px; height: 48px; font-size: 21px; }
.account-summary > div { min-width: 0; flex: 1; }
.account-summary p { color: var(--muted); font-size: 12px; margin-top: 6px; }
.account-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.account-note { margin-top: 20px; font-size: 12px; color: var(--muted); }

dialog { width: min(440px, calc(100% - 32px)); border: 1px solid var(--border); border-radius: 8px; padding: 0; background: #fff; color: var(--text); max-height: calc(100dvh - 40px); box-shadow: 0 16px 70px #1e335426; }
dialog::backdrop { background: #24334866; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; padding: 17px 16px 13px 24px; border-bottom: 1px solid var(--soft-border); }
.dialog-heading h2 { font-size: 18px; padding-right: 12px; }
.dialog-heading .icon-button { border: 0; font-size: 25px; color: #8792a1; }
.dialog-body { padding: 22px 24px; }
.dialog-body .field { margin-bottom: 18px; }
.dialog-body .field:last-child { margin-bottom: 0; }
.dialog-body .field-help { font-size: 12px; color: var(--muted); margin-top: 7px; line-height: 1.65; }
.person-date { font-size: 13px; color: var(--muted); }
.person-status { display: flex; align-items: center; gap: 9px; font-size: 20px; font-weight: 600; margin-block: 18px; }
.person-status.work { color: var(--green); }
.person-status.rest { color: var(--rest); }
.person-status .legend-dot { width: 9px; height: 9px; }
.dialog-body .rest-help { background: #f7f9fb; border-radius: 5px; padding: 12px 14px; }
.dialog-footer { display: flex; gap: 8px; justify-content: flex-end; padding: 16px 24px 20px; border-top: 1px solid var(--soft-border); flex-wrap: wrap; }
.dialog-footer .button { min-width: 88px; }
.dialog-error { margin: 0 24px 18px; }
.toast { position: fixed; left: calc(50% + 103px); bottom: 28px; transform: translateX(-50%); z-index: 100; padding: 13px 20px; border: 1px solid #dce4f0; border-radius: 6px; background: #fff; color: var(--text); box-shadow: 0 6px 28px #2436531f; max-width: min(550px, calc(100% - 32px)); font-size: 13px; overflow-wrap: anywhere; }

@media (min-width: 1600px) { main#main-content { padding-inline: 46px; } }
@media (max-width: 1100px) {
  .sidebar { width: 180px; padding-inline: 10px; }
  .workspace { margin-left: 180px; }
  .app-header { padding-inline: 25px; }
  main#main-content { padding: 26px 25px 40px; }
  .calendar-day { padding-inline: 6px; }
  .toast { left: calc(50% + 90px); }
}
@media (max-width: 760px) {
  .sidebar { display: none; }
  .workspace { margin-left: 0; }
  .app-header { min-height: 60px; padding: 7px 16px; background: var(--sidebar); }
  .mobile-brand { display: block; font-size: 15px; font-weight: 600; }
  .header-context { display: none; }
  .profile-button .profile-name, .profile-role { display: none; }
  .avatar { width: 33px; height: 33px; }
  main#main-content { padding: 21px 14px calc(86px + env(safe-area-inset-bottom)); }
  h1 { font-size: 22px; }
  .page-heading { margin-bottom: 18px; gap: 12px; align-items: flex-start; }
  .page-heading p { max-width: 30em; font-size: 12px; }
  .page-heading .button { font-size: 12px; padding-inline: 11px; white-space: nowrap; }
  .calendar-toolbar { padding: 14px 12px 10px; gap: 8px; }
  .calendar-toolbar h2 { font-size: 18px; white-space: nowrap; }
  .period-controls { gap: 3px; }
  .period-controls .icon-button { width: 36px; }
  .today-button { padding-inline: 8px; font-size: 12px; }
  .calendar-caption { padding: 0 12px 12px; }
  .legend { gap: 12px; font-size: 11px; }
  .calendar-loading { font-size: 10px; }
  .weekdays { padding-block: 9px; font-size: 11px; }
  .calendar-day { min-height: 112px; padding: 5px 3px 8px; }
  .day-top { justify-content: center; margin-bottom: 5px; min-height: 26px; }
  .day-number { font-size: 12px; width: 25px; height: 25px; }
  .day-people { gap: 4px; }
  .roster-person { font-size: 11px; text-align: center; padding: 7px 1px; min-height: 34px; line-height: 1.5; }
  .section-heading { align-items: flex-start; margin-bottom: 13px; }
  .section-heading h2 { font-size: 17px; }
  .section-heading p { font-size: 11px; }
  .staff-name { font-size: 13px; }
  .staff-initial { width: 32px; height: 32px; }
  .list-toolbar { align-items: flex-start; }
  .filter-group button { font-size: 12px; padding-inline: 10px; }
  .people-row { padding: 15px 13px; gap: 10px; flex-wrap: wrap; }
  .people-row .staff-details { flex-basis: calc(100% - 48px); }
  .people-row .row-actions { margin-left: 42px; margin-top: 1px; flex-wrap: wrap; }
  .people-meta { gap: 6px; }
  .people-meta .badge { font-size: 10px; }
  .people-description { font-size: 11px; }
  .row-actions .text-button { padding-inline: 10px; font-size: 12px; }
  .audit-row { flex-direction: column; gap: 5px; }
  .account-panel { padding: 21px 18px; }
  .account-summary { align-items: flex-start; }
  .account-summary p { overflow-wrap: anywhere; }
  dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
  .dialog-heading { padding: 15px 12px 11px 19px; }
  .dialog-body { padding: 20px 19px; }
  .dialog-error { margin: 0 19px 17px; }
  .dialog-footer { padding: 15px 19px 18px; }
  .dialog-heading h2 { font-size: 17px; }
  .toast { left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); width: max-content; }
  .login-screen { padding: 48px 20px 25px; }
  .login-panel { padding: 27px 23px; }
  input, select, textarea { font-size: 16px; }
}
@media (max-width: 360px) {
  .calendar-toolbar { flex-wrap: wrap; }
  .calendar-toolbar h2 { width: 100%; }
  .period-controls { width: 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
.permission-summary { font-size:11px; color:var(--muted); }
.permission-group { border:1px solid var(--border); border-radius:6px; padding:4px 14px; margin:16px 0 0; }
.permission-group legend { padding:0 5px; font-size:12px; color:var(--muted); }
.permission-option { display:flex; justify-content:space-between; align-items:center; min-height:43px; gap:16px; margin:0; font-size:13px; font-weight:400; }
.permission-option+.permission-option { border-top:1px solid var(--soft-border); }
.permission-option input { width:20px; height:20px; min-height:0; margin:0; padding:0; accent-color:var(--blue); }

/* The month shares the available mobile viewport with the existing bottom nav. */
@media (max-width: 760px) {
  .schedule-view .workspace {
    height: calc(100vh - var(--clinic-nav-height, 64px) - env(safe-area-inset-bottom));
    height: calc(100dvh - var(--clinic-nav-height, 64px) - env(safe-area-inset-bottom));
    display: flex; flex-direction: column;
  }
  .schedule-view .app-header {
    flex: none; position: static;
    min-height: calc(60px + env(safe-area-inset-top));
    padding-top: calc(7px + env(safe-area-inset-top));
  }
  .schedule-view main#main-content {
    flex: 1; min-height: 0; width: 100%; max-width: none;
    display: flex; flex-direction: column; padding: 6px 10px;
  }
  .schedule-view #view-content { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .schedule-view .schedule-heading { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .schedule-view .schedule-heading h1 { font-size: 18px; font-weight: 500; line-height: 25px; }
  .schedule-view .schedule-calendar { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .schedule-view .calendar-toolbar { flex: none; flex-wrap: nowrap; padding: 4px 9px 2px; gap: 4px; }
  .schedule-view .calendar-toolbar h2 { width: auto; font-size: 17px; font-weight: 500; }
  .schedule-view .period-controls { width: auto; gap: 1px; }
  .schedule-view .period-controls .icon-button { width: 33px; min-height: 40px; }
  .schedule-view .today-button { min-height: 40px; padding-inline: 7px; font-size: 12px; }
  .schedule-view .calendar-caption { flex: none; padding: 0 10px 4px; gap: 6px; }
  .schedule-view .legend { gap: 10px; }
  .schedule-view .calendar-loading { font-size: 10px; }
  .schedule-view .weekdays { flex: none; padding: 5px 0; line-height: 16px; }
  .schedule-view .calendar-grid { flex: 1; min-height: 0; grid-auto-rows: minmax(0, 1fr); }
  .schedule-view .calendar-day { min-height: 0; display: flex; flex-direction: column; padding: 3px 2px 4px; }
  .schedule-view .day-top { flex: none; min-height: 21px; height: 21px; margin-bottom: 2px; }
  .schedule-view .day-number { width: 21px; height: 21px; font-size: 11px; font-weight: 500; }
  .schedule-view .day-people { flex: 1; min-height: 0; gap: 3px; overflow-y: auto; overscroll-behavior: contain; }
  .schedule-view .roster-person { flex: 1 0 22px; min-height: 22px; max-height: 38px; padding: 3px 0; font-size: 11px; line-height: 16px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .schedule-view .app-message { flex: none; max-height: 96px; overflow-y: auto; margin-bottom: 6px; padding: 6px 8px; font-size: 12px; }
  .schedule-view .calendar-empty { flex: none; margin-top: 6px; padding: 8px; }
  .schedule-view .calendar-empty p { font-size: 11px; }
}
@media (max-width: 760px) and (max-height: 740px) {
  .schedule-view .calendar-day { padding-block: 2px; }
  .schedule-view .day-top { min-height: 18px; height: 18px; margin-bottom: 1px; }
  .schedule-view .day-number { width: 18px; height: 18px; }
  .schedule-view .day-people { gap: 2px; }
  .schedule-view .roster-person { flex-basis: 20px; min-height: 20px; padding-block: 1px; }
}
@media (max-width: 760px) and (max-height: 660px) {
  .schedule-view .app-header { min-height: calc(48px + env(safe-area-inset-top)); padding: calc(4px + env(safe-area-inset-top)) 14px 4px; }
  .schedule-view .profile-button { min-height: 36px; }
  .schedule-view .avatar { width: 28px; height: 28px; }
  .schedule-view .calendar-toolbar { padding: 2px 8px; }
  .schedule-view .period-controls .icon-button, .schedule-view .today-button { min-height: 36px; }
  .schedule-view .calendar-caption { line-height: 12px; }
  .schedule-view .weekdays { padding-block: 3px; line-height: 14px; }
  .schedule-view main#main-content { padding-block: 4px; }
  .schedule-view .calendar-toolbar { padding-top: 2px; }
  .schedule-view .calendar-day { padding-block: 1px 2px; }
  .schedule-view .day-top { min-height: 18px; height: 18px; margin-bottom: 1px; }
  .schedule-view .day-number { width: 18px; height: 18px; }
  .schedule-view .day-people { gap: 2px; }
  .schedule-view .roster-person { flex-basis: 18px; min-height: 18px; padding-block: 0; }
}

.forms-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 380px)); gap: 20px; }
.form-card { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: #fff; }
.form-cover { display: block; position: relative; width: 100%; border: 0; padding: 16px; background: #f7f9fc; color: var(--text); cursor: zoom-in; }
.form-cover img { display: block; width: 100%; height: auto; border: 1px solid var(--soft-border); }
.form-cover span { position: absolute; right: 24px; bottom: 24px; padding: 5px 9px; background: #fff; border: 1px solid var(--border); border-radius: 4px; font-size: 11px; }
.form-card-body { padding: 18px; }
.form-card-body h2 { font-size: 17px; font-weight: 500; }
.form-card-body p { font-size: 12px; margin-top: 5px; }
.form-card-actions { display: flex; gap: 8px; margin-top: 18px; }
.form-card-actions .button { flex: 1; font-size: 12px; white-space: nowrap; padding-inline: 8px; }
.form-preview-dialog { width: min(1100px, calc(100% - 32px)); }
.form-preview-dialog .dialog-body { padding: 0; }
.form-sheet-scroll { max-height: calc(100dvh - 205px); overflow: auto; overscroll-behavior: contain; background: #f7f9fc; }
.form-sheet { display: block; width: 100%; min-width: 1100px; height: auto; }
.form-preview-dialog .dialog-footer .button { font-size: 12px; }
@media(max-width:760px) {
  .forms-list { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .form-card-body { padding: 15px; }
  .form-cover { padding: 12px; }
  .form-cover span { right: 20px; bottom: 20px; }
  .form-preview-dialog { width: calc(100% - 16px); }
  .form-preview-dialog .dialog-heading { padding: 10px 10px 8px 14px; }
  .form-preview-dialog .dialog-footer { padding: 12px; flex-wrap: nowrap; }
  .form-preview-dialog .dialog-footer .button { flex: 1; padding-inline: 7px; }
}
@media(max-width:360px) {
  .form-cover { padding: 8px; }
  .form-cover img { max-height: 160px; object-fit: contain; }
  .form-card-body { padding: 12px; }
  .form-card-actions { margin-top: 12px; }
}
