:root {
    --ink: #152035;
    --muted: #687386;
    --line: #dde3ee;
    --soft-line: #edf1f7;
    --surface: #ffffff;
    --surface-2: #f7f9fc;
    --sidebar: #0b1d34;
    --sidebar-2: #071529;
    --primary: #0969f6;
    --primary-2: #0052cc;
    --info: #1677ff;
    --ok: #19a35b;
    --warn: #f5a400;
    --danger: #e34855;
    --proposal: #e62b87;
    --purple: #7952ff;
    --radius: 8px;
    --shadow: 0 8px 30px rgba(21, 32, 53, .08);
    color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: #f4f7fb; letter-spacing: 0; }
body { font-size: 14px; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

.app-shell { display: grid; grid-template-columns: 176px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2)); color: #dbe8ff; display: flex; flex-direction: column; border-right: 1px solid rgba(255,255,255,.08); }
.brand { height: 74px; display: flex; align-items: center; justify-content: center; padding: 14px; }
.brand img { width: auto; max-width: 132px; max-height: 52px; height: auto; border-radius: 6px; object-fit: contain; }
.side-nav { display: flex; flex-direction: column; gap: 4px; padding: 0 8px 12px; overflow-y: auto; }
.side-nav a, .switch-company { min-height: 36px; display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 6px; color: #d8e4f6; border: 1px solid transparent; background: transparent; width: 100%; text-align: left; }
.side-nav a:hover, .switch-company:hover { background: rgba(255,255,255,.08); }
.side-nav a.is-active { background: var(--primary); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.side-nav i, .switch-company i { width: 18px; font-size: 18px; text-align: center; }
.nav-section { margin: 18px 8px 6px; color: #7890ad; font-size: 11px; text-transform: uppercase; }
.sidebar-footer { margin-top: auto; padding: 12px 10px; border-top: 1px solid rgba(255,255,255,.10); }
.switch-company { justify-content: space-between; background: rgba(255,255,255,.05); }

.app-main { min-width: 0; }
.topbar { height: 68px; display: flex; align-items: center; gap: 16px; padding: 10px 24px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.company-context { display: flex; align-items: center; gap: 10px; min-width: 260px; }
.company-context label { display: block; gap: 0; min-width: 0; }
.company-context i { font-size: 20px; color: #334155; }
.company-context small, .profile-menu small { display: block; color: var(--muted); font-size: 12px; }
.company-context strong, .profile-menu strong { display: block; color: var(--ink); font-size: 14px; white-space: nowrap; }
.company-switcher { margin: 0; }
.company-switcher select { min-height: 20px; height: 22px; padding: 0 18px 0 0; border: 0; background: transparent; color: var(--ink); font-weight: 800; font-size: 14px; max-width: 210px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; outline: 0; }
.plan-pill { margin-left: 10px; background: #eaf2ff; color: var(--primary-2); padding: 5px 10px; border-radius: 5px; font-size: 12px; font-weight: 700; }
.top-search { flex: 1; max-width: 440px; height: 38px; display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; padding: 0 12px; }
.top-search input { border: 0; background: transparent; outline: 0; width: 100%; }
.primary-action { height: 40px; display: inline-flex; align-items: center; gap: 10px; background: var(--primary); color: #fff; padding: 0 20px; border-radius: 7px; font-weight: 700; box-shadow: 0 8px 18px rgba(9,105,246,.22); }
.icon-button { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--surface); border-radius: 7px; color: var(--ink); position: relative; }
.icon-button.sm { width: 30px; height: 30px; font-size: 13px; }
.icon-button.danger { color: var(--danger); }
.icon-button.ok { color: var(--ok); }
.profile-menu { height: 48px; display: grid; grid-template-columns: 34px 1fr 28px; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; min-width: 198px; background: var(--surface); }
.profile-menu img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.profile-menu button { border: 0; background: transparent; color: var(--muted); }
.mobile-menu { display: none; }

.content { padding: 16px 20px 28px; }
.flash-stack { position: fixed; right: 18px; top: 78px; z-index: 50; display: grid; gap: 8px; }
.flash { min-width: 280px; display: flex; align-items: center; gap: 8px; padding: 11px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.flash.success { border-color: rgba(25,163,91,.22); color: #117246; }
.flash.error { border-color: rgba(227,72,85,.22); color: #b02d39; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.page-head h1 { margin: 0; font-size: 22px; line-height: 1.2; }
.page-head .eyebrow { color: var(--primary); font-weight: 800; font-size: 12px; text-transform: uppercase; }
.button-row { display: flex; gap: 8px; flex-wrap: wrap; }
.button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 7px; padding: 0 13px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; }
.button.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.button.success { background: var(--ok); color: #fff; border-color: var(--ok); }
.button.ghost { background: #fff; }
.button.sm { min-height: 30px; padding: 0 9px; font-size: 12px; }
.button.full { width: 100%; }

.surface { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 0 rgba(21,32,53,.03); }
.surface > h2, .surface > .section-title-row, .surface > h3 { margin: 0; padding: 14px 16px; border-bottom: 1px solid var(--soft-line); }
.surface > h2 { font-size: 16px; }
.toolbar { display: flex; align-items: end; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--soft-line); }
.toolbar.small { border: 0; padding: 0; }
.search-field { flex: 1; height: 38px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 7px; padding: 0 10px; }
.search-field input { flex: 1; border: 0; outline: 0; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; color: #3f4c60; font-size: 12px; font-weight: 800; padding: 11px 14px; border-bottom: 1px solid var(--line); background: #fbfcff; }
.data-table td { padding: 10px 14px; border-bottom: 1px solid var(--soft-line); vertical-align: middle; }
.data-table.compact th, .data-table.compact td { padding: 7px 10px; font-size: 13px; }
.actions-col { width: 140px; }
.row-actions { display: flex; align-items: center; gap: 6px; }
.row-actions form { margin: 0; }
.empty-row { text-align: center; color: var(--muted); padding: 28px !important; }
.status { display: inline-flex; align-items: center; justify-content: center; min-height: 22px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.status.ok { background: #e8f8ef; color: #11804b; }
.status.warn { background: #fff3d6; color: #a76600; }
.status.danger { background: #ffe8eb; color: #b92735; }
.status.muted { background: #eef2f7; color: #617086; }
.text-ok { color: var(--ok); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }
.muted { color: var(--muted); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px; }
.form-grid.compact { gap: 10px; }
.stack-form { display: grid; gap: 12px; }
.stack-form.compact { gap: 9px; padding: 14px; }
label { display: grid; gap: 5px; color: #344258; font-weight: 700; font-size: 13px; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); min-height: 38px; padding: 8px 10px; outline-color: rgba(9,105,246,.28); }
textarea { resize: vertical; }
.span-2 { grid-column: 1 / -1; }
.toggle-row { display: flex; align-items: center; gap: 8px; }
.toggle-row input { width: auto; min-height: auto; }
.form-actions { display: flex; align-items: center; gap: 10px; }
.password-field { display: grid; grid-template-columns: 1fr 38px; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.password-field input { border: 0; border-radius: 0; }
.password-field button { border: 0; background: #f8fafc; color: var(--muted); }

.agenda-shell { display: grid; grid-template-columns: minmax(0, 1fr) 348px; gap: 0; margin: -16px -20px -28px; min-height: calc(100vh - 68px); }
.agenda-workspace { padding: 14px 12px 18px 20px; min-width: 0; }
.agenda-filters { display: grid; grid-template-columns: minmax(320px, 1.15fr) minmax(260px, 1fr) auto auto; gap: 14px; align-items: end; background: #fff; border: 1px solid var(--line); border-radius: 0 0 8px 8px; padding: 14px 16px; margin-bottom: 12px; }
.filter-group { display: grid; gap: 7px; }
.filter-group span, .quick-create-actions span { font-size: 12px; font-weight: 800; color: #3f4c60; }
.period-filter { grid-template-columns: 1fr .65fr auto 1fr .65fr; align-items: end; }
.period-filter span { grid-column: 1 / -1; }
.period-filter label { display: block; }
.period-filter em { align-self: center; color: var(--muted); font-style: normal; }
.quick-create-actions { display: grid; grid-template-columns: repeat(3, auto); gap: 8px; }
.quick-create-actions span { grid-column: 1 / -1; }
.filter-submit { display: flex; align-items: end; }
.calendar-surface { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.calendar-toolbar { height: 74px; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 0 18px; border-bottom: 1px solid var(--line); }
.month-nav { display: flex; gap: 8px; align-items: center; }
.calendar-toolbar h1 { margin: 0; font-size: 23px; text-transform: lowercase; }
.segmented { display: inline-grid; grid-auto-flow: column; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: #fff; }
.segmented button { height: 34px; min-width: 68px; border: 0; border-right: 1px solid var(--line); background: #fff; color: #435267; font-weight: 800; }
.segmented button:last-child { border-right: 0; }
.segmented button.active { background: var(--primary); color: #fff; }
.segmented.wide { width: 100%; grid-template-columns: 1fr 1fr; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(96px, 1fr)); }
.weekday { height: 32px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: #364356; border-bottom: 1px solid var(--line); }
.calendar-cell { min-height: 104px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; background: #fff; }
.calendar-cell:nth-child(7n) { border-right: 0; }
.calendar-cell.is-muted { color: #a0adbf; background: #fbfcfe; }
.day-number { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; font-weight: 800; }
.calendar-cell.is-today .day-number { background: var(--primary); color: #fff; border-radius: 50%; }
.event-pill { display: block; margin-top: 5px; padding: 5px 7px; border-radius: 5px; border-left: 3px solid var(--primary); background: #f4f8ff; font-size: 11px; overflow: hidden; }
.event-pill strong, .event-pill span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-pill.ok { border-color: var(--ok); background: #f0fbf5; }
.event-pill.warn { border-color: var(--warn); background: #fff8e9; }
.event-pill.danger { border-color: var(--danger); background: #fff0f2; }
.event-pill.muted { border-color: #9aa6b7; background: #f3f5f8; }
.legend { height: 38px; display: flex; align-items: center; gap: 18px; padding: 0 18px; font-size: 12px; color: var(--muted); }
.dot { width: 11px; height: 11px; display: inline-block; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.proposal { background: var(--proposal); } .dot.info { background: var(--info); } .dot.muted { background: #9aa6b7; } .dot.danger { background: var(--danger); }
.bottom-panels { display: grid; grid-template-columns: 1.35fr .9fr; gap: 10px; margin-top: 10px; }
.item-cell { display: flex; align-items: center; gap: 10px; }
.item-cell img, .rental-list img { width: 34px; height: 34px; border-radius: 5px; object-fit: cover; border: 1px solid var(--line); }
.whatsapp-panel { padding: 0 14px 14px; }
.whatsapp-panel > h2 { margin: 0 -14px 12px; }
.message-preview { background: #dff7e6; border: 1px solid #a9e4bd; border-radius: 8px; padding: 12px; margin: 10px 0; min-height: 122px; position: relative; white-space: normal; }
.event-drawer { background: #fff; border-left: 1px solid var(--line); min-width: 0; overflow-y: auto; }
.drawer-head { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 18px; }
.drawer-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); border-bottom: 1px solid var(--line); }
.drawer-actions a { min-height: 68px; display: grid; place-items: center; gap: 3px; color: #334155; font-size: 11px; border-right: 1px solid var(--soft-line); }
.drawer-actions i { font-size: 19px; color: var(--primary); }
.drawer-section { padding: 12px 16px; border-bottom: 1px solid var(--soft-line); }
.drawer-section h3 { margin: 0 0 8px; font-size: 13px; color: #3a475c; }
.drawer-section p { margin: 4px 0 0; color: #536276; }
.inline-info { display: flex; gap: 18px; flex-wrap: wrap; }
.inline-info span { display: flex; gap: 7px; align-items: center; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-title-row a { color: var(--primary); font-size: 12px; font-weight: 800; }
.rental-list { display: grid; gap: 8px; }
.rental-list div { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 8px; align-items: center; }
.rental-list strong { font-size: 13px; }
.rental-list span, .rental-list em { font-size: 12px; color: var(--muted); font-style: normal; }
.financial-mini { display: grid; gap: 7px; margin: 0; }
.financial-mini div { display: flex; justify-content: space-between; gap: 12px; }
.financial-mini dt { color: var(--muted); }
.financial-mini dd { margin: 0; font-weight: 800; }
.checklist-mini { display: grid; gap: 7px; }
.checklist-mini div { display: grid; grid-template-columns: 18px 1fr auto; gap: 6px; align-items: center; font-size: 12px; }
.team-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.team-row div { text-align: center; min-width: 0; }
.team-row img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; margin: 0 auto 5px; }
.team-row strong, .team-row span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-row span { color: var(--muted); font-size: 12px; }

.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 13px 14px; }
.kpi span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.kpi strong { display: block; margin-top: 4px; font-size: 21px; }
.kpi.ok strong { color: var(--ok); } .kpi.danger strong { color: var(--danger); }
.dashboard-grid, .detail-grid, .report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.report-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mini-list { display: grid; }
.mini-list > a, .mini-list > div { display: grid; gap: 3px; padding: 11px 14px; border-bottom: 1px solid var(--soft-line); position: relative; }
.mini-list strong { font-size: 14px; }
.mini-list span { color: var(--muted); font-size: 12px; }
.mini-list em { position: absolute; right: 12px; top: 12px; font-style: normal; }
.bar-list { padding: 12px 14px; display: grid; gap: 10px; }
.bar-list div { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 8px; padding-bottom: 9px; border-bottom: 1px solid var(--soft-line); }
.bar-list i { position: absolute; left: 0; bottom: 0; height: 3px; border-radius: 99px; background: var(--primary); }
.info-list { display: grid; gap: 10px; padding: 14px 16px; margin: 0; }
.info-list div { display: grid; grid-template-columns: 150px 1fr; gap: 10px; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; font-weight: 700; }
.split-table { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px; }
.split-table h3 { margin: 0 0 8px; font-size: 14px; }
.item-editor { display: grid; gap: 8px; border: 1px solid var(--soft-line); border-radius: 8px; padding: 10px; background: #fbfcff; }
.item-row { display: grid; grid-template-columns: minmax(180px, 1fr) 72px 110px 110px minmax(120px, 1fr); gap: 8px; align-items: center; }
.item-row.header { font-size: 12px; color: var(--muted); font-weight: 800; }
.inline-payment { display: flex; gap: 6px; align-items: center; min-width: 460px; }
.inline-payment input, .inline-payment select { min-height: 30px; padding: 4px 7px; }
.operation-list { display: grid; gap: 12px; }
.operation-card { padding: 0; }
.operation-head { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--soft-line); }
.operation-head h2 { margin: 0; font-size: 18px; }
.operation-head p { margin: 4px 0 0; color: var(--muted); }
.operation-columns { display: grid; grid-template-columns: .6fr 1.4fr; gap: 14px; padding: 14px 16px; }
.plain-list { margin: 0 0 12px; padding-left: 18px; }
.checklist-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.check-button { width: 100%; min-height: 34px; display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 0 10px; text-align: left; }
.check-button.done { border-color: rgba(25,163,91,.3); color: #117246; background: #f0fbf5; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px; }
.tag-cloud span { padding: 5px 8px; border-radius: 6px; background: #edf4ff; color: var(--primary); font-weight: 800; font-size: 12px; }
.big-number { font-size: 44px; font-weight: 900; color: var(--primary); padding: 18px 16px 0; }
.contract-body { padding: 28px; line-height: 1.7; }
.platform-section { margin-top: 12px; }
.platform-status-form { min-width: 250px; }
.subscription-block { min-height: calc(100vh - 130px); display: grid; place-items: center; }
.subscription-card { padding: 18px; }
.subscription-card > h2 { margin: -18px -18px 16px; }
.subscription-card p { color: var(--muted); margin: 10px 0 16px; }
.subscription-price { font-size: 38px; line-height: 1; font-weight: 900; color: var(--primary); margin: 8px 0 12px; }
.subscription-price span { color: var(--muted); font-size: 14px; font-weight: 800; margin-left: 4px; }
.subscription-price.compact { font-size: 24px; margin: 0; }
.copy-value { border: 1px dashed var(--primary); background: #edf4ff; color: var(--primary); border-radius: 7px; padding: 7px 10px; font-weight: 900; }
.pg-pix-action { min-width: 520px; }
.pg-pix-company { min-width: 760px; }

.empty-state { min-height: 320px; display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; color: var(--muted); padding: 30px; }
.empty-state i { font-size: 42px; color: var(--primary); }
.empty-state h1, .empty-state h2 { color: var(--ink); margin: 0; }
.empty-state.compact { min-height: 240px; }

.public-shell { background: #eef4fb; min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-wrap { width: min(980px, 100%); display: grid; grid-template-columns: 1.05fr .95fr; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.auth-brand { background: var(--sidebar); color: #fff; padding: 42px; display: grid; align-content: center; gap: 18px; }
.auth-brand img { width: min(260px, 100%); border-radius: 8px; }
.auth-brand h1 { margin: 0; font-size: 30px; line-height: 1.1; }
.auth-brand p { color: #b8c8df; margin: 0; font-size: 15px; }
.auth-panel { padding: 40px; display: grid; align-content: center; }
.form-heading span { color: var(--primary); font-weight: 800; font-size: 12px; text-transform: uppercase; }
.form-heading h2 { margin: 4px 0 4px; font-size: 24px; }
.form-links { display: flex; justify-content: space-between; gap: 12px; font-weight: 800; color: var(--primary); }
.inline-reset-link { display: block; word-break: break-all; color: var(--primary); background: #edf4ff; padding: 8px; border-radius: 6px; }

.quick-create-modal[hidden] { display: none; }
.quick-create-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(15, 23, 42, .35); }
.quick-create-modal form { width: min(420px, calc(100vw - 28px)); }
.print-shell { background: #fff; padding: 28px; }
.print-doc { max-width: 820px; margin: 0 auto; color: #111827; }

@media (max-width: 1180px) {
    .agenda-shell { grid-template-columns: 1fr; }
    .event-drawer { border-left: 0; border-top: 1px solid var(--line); }
    .agenda-filters { grid-template-columns: 1fr; }
    .filter-submit .button { width: 100%; }
    .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; z-index: 60; transform: translateX(-100%); transition: transform .2s ease; width: 240px; }
    .sidebar.is-open { transform: translateX(0); }
    .mobile-menu { display: inline-flex; }
    .topbar { gap: 8px; padding: 8px 12px; }
    .company-context { min-width: 0; flex: 1; }
    .plan-pill, .top-search, .profile-menu div { display: none; }
    .profile-menu { min-width: auto; grid-template-columns: 34px 28px; border: 0; padding: 0; }
    .primary-action { padding: 0 12px; }
    .primary-action span { display: none; }
    .content { padding: 12px; }
    .agenda-shell { margin: -12px; }
    .agenda-workspace { padding: 10px; }
    .period-filter { grid-template-columns: 1fr 1fr; }
    .period-filter em { display: none; }
    .quick-create-actions { grid-template-columns: 1fr; }
    .calendar-toolbar { grid-template-columns: 1fr; height: auto; padding: 12px; }
    .calendar-grid { grid-template-columns: repeat(7, minmax(76px, 1fr)); overflow-x: auto; }
    .calendar-cell { min-height: 92px; }
    .bottom-panels, .detail-grid, .dashboard-grid, .split-table, .report-grid { grid-template-columns: 1fr; }
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid { grid-template-columns: 1fr; }
    .item-row { grid-template-columns: 1fr 68px; }
    .item-row.header { display: none; }
    .inline-payment { min-width: 0; flex-wrap: wrap; }
}

@media (max-width: 560px) {
    .page-head { align-items: flex-start; flex-direction: column; }
    .kpi-grid { grid-template-columns: 1fr; }
    .drawer-actions { grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); }
    .team-row { grid-template-columns: 1fr; }
    .calendar-grid { min-width: 760px; }
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-brand { padding: 24px; }
    .auth-panel { padding: 24px; }
}
