@charset "UTF-8";

:root {
    color-scheme: light;
    --ink: #173b35;
    --ink-dark: #102e29;
    --muted: #7a857c;
    --paper: #f7f8f2;
    --surface: #fff;
    --line: #e4e8df;
    --lime: #d5ee98;
    --lime-hover: #c9e786;
    --sage: #eff4e7;
    --error: #a43c39;
    --sidebar-width: 248px;
    --radius: 16px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; background: var(--paper); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; text-decoration: none; }
img, video, svg { max-width: 100%; }
img, video { display: block; }
svg { flex-shrink: 0; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { line-height: 1.25; }
h1 { font-size: clamp(27px, 2.8vw, 38px); font-weight: 650; letter-spacing: -1.4px; margin-bottom: 10px; }
h2 { font-size: 20px; font-weight: 650; letter-spacing: -.5px; margin-bottom: 8px; }
h3 { font-size: 16px; font-weight: 650; letter-spacing: -.25px; margin-bottom: 8px; }
p { margin-bottom: 14px; }
small { font-size: 12px; }
strong { font-weight: 650; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #8aaf46; outline-offset: 4px; }
::selection { background: var(--lime); color: var(--ink-dark); }
[hidden] { display: none !important; }

.skip-link { position: fixed; z-index: 200; top: 12px; left: 12px; padding: 12px 20px; background: var(--lime); color: var(--ink); border-radius: 8px; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.sidebar { position: fixed; z-index: 60; top: 0; bottom: 0; left: 0; width: var(--sidebar-width); background: var(--ink); color: #e3ece5; display: flex; flex-direction: column; padding: 35px 20px 0; overflow: auto; scrollbar-width: thin; scrollbar-color: #426158 transparent; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px; line-height: 1.1; font-size: 24px; font-weight: 700; letter-spacing: -.9px; color: white; }
.brand-light { font-weight: 350; }
.brand small { display: block; margin-top: 9px; color: #9eb5a8; font-size: 6.7px; letter-spacing: 1.65px; font-weight: 500; }
.brand-symbol { width: 31px; height: 31px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; flex-shrink: 0; transform: rotate(-1deg); }
.brand-symbol span { display: block; background: var(--lime); border-radius: 3px; }
.brand-symbol span:nth-child(2) { border-top-right-radius: 10px; }
.brand-symbol span:nth-child(3) { opacity: .55; border-bottom-left-radius: 10px; }
.workspace-label { margin: 48px 12px 12px; color: #9ab1a5; font-size: 10px; text-transform: uppercase; letter-spacing: 1.65px; font-weight: 600; }
.clinic-switch { margin: 0 2px 26px; padding: 12px 10px; border: 1px solid #37584e; border-radius: 11px; display: flex; align-items: center; gap: 10px; background: #1c433b; }
.clinic-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: #e8eee2; color: var(--ink); font-size: 16px; font-weight: 650; flex-shrink: 0; }
.clinic-switch div { min-width: 0; flex: 1; }
.clinic-switch strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 550; color: white; }
.clinic-switch div span { display: block; font-size: 10px; color: #9eb5a8; }
.clinic-switch > svg { width: 15px; height: 15px; color: #9eb5a8; }
.main-nav { display: flex; flex-direction: column; gap: 7px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-radius: 8px; font-size: 13px; font-weight: 450; color: #b9ccbf; transition: background .15s, color .15s; }
.nav-link svg { width: 19px; height: 19px; }
.nav-link:hover { color: white; background: #21483f; }
.nav-link.is-active { color: var(--ink-dark); background: var(--lime); font-weight: 650; }
.nav-active-dot { width: 5px; height: 5px; margin-left: auto; border-radius: 50%; background: var(--ink); }
.nav-divider { height: 1px; margin: 15px 12px 8px; background: #37584e; }
.sidebar-bottom { margin-top: auto; padding-top: 44px; }
.privacy-note { display: flex; align-items: center; gap: 10px; margin: 0 10px 23px; color: #b3c5b7; }
.privacy-note > svg { width: 21px; height: 21px; color: #a6c478; }
.privacy-note strong { display: block; font-size: 10px; font-weight: 500; }
.privacy-note span { display: block; margin-top: 2px; font-size: 9px; color: #8da99a; }
.sidebar-profile { display: flex; gap: 9px; align-items: center; border-top: 1px solid #35564c; margin: 0 -20px; padding: 20px; background: #12372f; }
.profile-avatar, .topbar-avatar { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; background: #e3ddd1; color: #6a6254; border-radius: 50%; font-size: 12px; font-weight: 650; }
.sidebar-profile > div { flex: 1; min-width: 0; }
.sidebar-profile strong, .sidebar-profile > div span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-profile strong { color: #edf2eb; font-size: 11px; font-weight: 500; }
.sidebar-profile > div span { color: #8eaa9a; font-size: 10px; }
.logout-button { display: grid; place-items: center; padding: 6px; width: 29px; height: 33px; color: #9db8a8; background: transparent; border: 0; border-radius: 5px; }
.logout-button:hover { color: white; background: #254b40; }
.logout-button svg { width: 18px; height: 18px; }
.app-main { margin-left: var(--sidebar-width); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { min-height: 82px; padding: 0 44px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: #fffefa; }
.topbar-leading, .topbar-trailing { display: flex; align-items: center; gap: 17px; }
.breadcrumb-brand { color: #8b9387; font-size: 12px; }
.breadcrumb-separator { color: #c3c9bc; font-size: 15px; font-weight: 300; }
.breadcrumb-current { font-size: 12px; font-weight: 550; }
.language-switch { display: inline-flex; align-items: center; gap: 7px; color: #56675a; font-size: 10px; font-weight: 650; letter-spacing: .6px; padding: 7px; border-radius: 6px; }
.language-switch:hover { background: var(--sage); }
.language-switch svg { width: 16px; height: 16px; }
.topbar-divider { width: 1px; height: 22px; background: var(--line); }
.topbar-avatar { width: 32px; height: 32px; font-size: 11px; }
.workspace-content { flex: 1; width: 100%; max-width: 1660px; margin: 0 auto; padding: 38px 44px 36px; outline: none; }
.app-footer { display: flex; align-items: center; justify-content: space-between; padding: 18px 44px; color: #929a8b; border-top: 1px solid var(--line); font-size: 10px; letter-spacing: .2px; }
.mobile-menu-toggle { display: none !important; }
.sidebar-backdrop { display: none; }
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sidebar-close.icon-button { display: none; }
.app-main, .topbar-leading, .workspace-content > *, .grid > *, .grid-2 > *, .grid-3 > *, .form-grid > * { min-width: 0; }
.card p, .card strong, .notice, .section-heading, .page-header, .key-value { overflow-wrap: anywhere; }
.table form.stack { display: flex; flex-direction: column; align-items: stretch; max-width: 100%; }
.table details { min-width: 0; }
.table details > .stack { margin-top: 16px; }
details > summary { cursor: pointer; }
.table-scroll-region { overscroll-behavior-x: contain; scrollbar-width: thin; }
.table-comparison { min-width: 580px; }
.table-scroll-hint { display: none; }
.table-scroll-region:focus-visible { outline: 3px solid #8aaf46; outline-offset: 4px; }

.page-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 29px; }
.page-header > div:first-child { min-width: 0; }
.page-header p { max-width: 650px; margin: 0; color: var(--muted); font-size: 13px; }
.page-header h1 { margin-bottom: 8px; }
.eyebrow { display: block; color: #7c886f; font-size: 9px; font-weight: 650; letter-spacing: 1.8px; text-transform: uppercase; margin-bottom: 12px; }
.page-actions, .actions, .button-group { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.page-actions { flex-shrink: 0; }
.grid { display: grid; gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 22px; }
.card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 25px; box-shadow: 0 2px 3px #173b3502; }
.card > :last-child { margin-bottom: 0; }
.card-header, .section-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.card-header h2, .card-header h3, .section-header h2, .section-header h3 { margin-bottom: 0; }
.card-header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.card-header .text-link, .section-header .text-link { flex-shrink: 0; }
.card-body { padding-top: 4px; }
.card-footer { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.card-subtitle { margin: -2px 0 22px; color: var(--muted); font-size: 12px; }
.card-flat { box-shadow: none; }
.card-sage { background: var(--sage); border-color: #e1e9d4; }
.section-space { margin-top: 25px; }
.section-bottom { margin-bottom: 25px; }
.muted { color: var(--muted); }
.text-small { font-size: 12px; }
.text-tiny { font-size: 10px; }
.text-link { color: #426743; font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #c3d1b5; }
.text-link:hover { color: var(--ink-dark); text-decoration-color: var(--ink-dark); }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

.btn { appearance: none; border: 1px solid transparent; border-radius: 8px; padding: 10px 17px; min-height: 41px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; line-height: 1.35; font-size: 12px; font-weight: 600; letter-spacing: -.1px; text-align: center; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-primary:hover { background: #245346; border-color: #245346; box-shadow: 0 3px 8px #173b3515; }
.btn-lime { color: var(--ink-dark); background: var(--lime); border-color: var(--lime); }
.btn-lime:hover { background: var(--lime-hover); border-color: var(--lime-hover); }
.btn-secondary { color: var(--ink); background: white; border-color: #dbe1d5; }
.btn-secondary:hover { background: #f3f6ec; border-color: #b8c6ac; }
.btn-danger { color: var(--error); background: #fff6f5; border-color: #f0d4cf; }
.btn-danger:hover { background: #fbe7e3; border-color: #e8bfb8; }
.btn-ghost { color: #526c54; background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--sage); }
.btn-sm { min-height: 32px; padding: 7px 11px; font-size: 11px; border-radius: 6px; }
.btn-block { width: 100%; }
.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); }
.icon-button:hover { background: var(--sage); }
.icon-button svg { width: 18px; height: 18px; }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 5px; padding: 4px 8px; background: #f1f4ed; color: #6d7d63; font-size: 9px; font-weight: 650; letter-spacing: .2px; line-height: 1.4; white-space: nowrap; }
.badge-success, .badge-green, .badge.online { color: #4d733b; background: #eef5e5; }
.badge-warning, .badge.pending { color: #9c7738; background: #fbf2dc; }
.badge-danger, .badge.offline { color: #a05a50; background: #fbefeb; }
.badge-neutral { color: #768173; background: #f0f2ed; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #74a344; }
.status-dot.offline { background: #a2a99b; }
.status-dot.warning { background: #c89e49; }

.stat-card { position: relative; padding: 21px 22px; background: white; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stat-card .stat-label, .stat-label { display: block; color: #7d8974; font-size: 10px; font-weight: 500; margin-bottom: 12px; }
.stat-value { display: block; color: var(--ink); font-size: 31px; font-weight: 650; line-height: 1.1; letter-spacing: -1.3px; margin-bottom: 8px; }
.stat-value small { font-size: 13px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.stat-footnote { color: #8b9584; font-size: 10px; }
.stat-icon { position: absolute; top: 19px; right: 19px; width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; background: #f2f5ec; color: #709052; }
.stat-icon svg { width: 16px; height: 16px; }
.stat-card.highlight { background: #edf3e3; border-color: #e0e8d2; }
.stat-card.highlight .stat-icon { background: #e1ebd2; }
.welcome-card { position: relative; padding: 30px; background: #e9efdf; border-color: #e0e6d4; overflow: hidden; }
.welcome-card h2 { font-size: 25px; max-width: 420px; margin-bottom: 12px; letter-spacing: -.8px; }
.welcome-card p { max-width: 420px; font-size: 12px; color: #738166; line-height: 1.8; }
.welcome-card .btn { margin-top: 5px; }
.welcome-mark { position: absolute; right: 24px; top: 28px; color: #cbd8b9; width: 90px; height: 90px; }

.field { min-width: 0; margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }
.field > label, .field-label { display: block; margin-bottom: 7px; color: #425b45; font-size: 11px; font-weight: 600; }
.field > label small { color: var(--muted); font-size: 10px; font-weight: 400; }
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]):not([type="range"]), select, textarea { display: block; width: 100%; min-height: 43px; padding: 10px 12px; color: var(--ink); background: #fdfefa; border: 1px solid #dce3d5; border-radius: 7px; font-size: 12px; line-height: 1.5; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 105px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #a1aa99; }
input:focus, select:focus, textarea:focus { border-color: #91aa73; box-shadow: 0 0 0 3px #93b05e15; }
input:disabled, select:disabled, textarea:disabled { background: #f2f4ed; color: #8b9584; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; accent-color: var(--ink); flex-shrink: 0; margin: 2px 0 0; }
input[type="file"] { display: block; width: 100%; font-size: 11px; color: var(--muted); }
input[type="file"]::file-selector-button { border: 1px solid #dbe1d5; padding: 9px 12px; background: white; color: var(--ink); border-radius: 6px; font: inherit; font-weight: 550; cursor: pointer; margin-right: 12px; }
input[type="color"] { width: 48px; height: 42px; padding: 4px; border: 1px solid #dce3d5; border-radius: 7px; background: white; cursor: pointer; }
input[type="range"] { accent-color: var(--ink); width: 100%; }
.field-help, .field small, .help-text { display: block; margin-top: 7px; color: #8b9584; font-size: 10px; line-height: 1.7; }
.field-error { display: block; margin-top: 6px; color: var(--error); font-size: 11px; }
[aria-invalid="true"] { border-color: #c88175 !important; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; }
.form-grid .full-width, .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; gap: 12px; padding-top: 22px; margin-top: 4px; border-top: 1px solid var(--line); }
.form-section { border: 0; border-bottom: 1px solid var(--line); margin: 0 0 24px; padding: 0 0 24px; min-width: 0; }
.form-section:last-of-type { border-bottom: 0; }
.form-section legend { font-size: 15px; font-weight: 650; margin-bottom: 18px; }
.checkbox-label, .check-row { display: flex; align-items: flex-start; gap: 9px; color: #5f7159; font-size: 12px; line-height: 1.6; }
.checkbox-label input, .check-row input { margin-top: 3px; }
.color-field { display: flex; align-items: center; gap: 12px; }
.color-value { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; color: #7d8974; }
.input-group { display: flex; gap: 10px; align-items: center; }
.input-group input { flex: 1; min-width: 0; }
.upload-area, .upload-zone { padding: 25px; border: 1px dashed #c6d4b9; border-radius: 10px; background: #fafcf6; text-align: center; }
.upload-area > svg, .upload-zone > svg { width: 32px; height: 32px; color: #91a37b; margin: 0 auto 10px; }
.upload-area p, .upload-zone p { font-size: 12px; color: #65785d; margin-bottom: 6px; }
.upload-area input, .upload-zone input { max-width: 330px; margin: 15px auto 0; }
.upload-name { overflow-wrap: anywhere; font-size: 11px; color: #5d764b; margin-top: 10px; }
.url-value, code { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
code { color: #537247; background: #f2f5ec; border-radius: 4px; padding: 3px 6px; }

.notice { display: flex; align-items: flex-start; gap: 12px; border: 1px solid #dce7ce; border-radius: 9px; padding: 14px 17px; background: #f0f6e6; color: #536f3a; font-size: 12px; margin-bottom: 22px; line-height: 1.7; }
.notice > svg { width: 20px; height: 20px; margin-top: 1px; }
.notice p { margin-bottom: 0; }
.notice strong { font-weight: 650; }
.notice ul { margin: 7px 0 0; padding-left: 19px; }
.notice-error, .notice-danger { color: #98574d; border-color: #eed6cf; background: #fff3ee; }
.notice-warning { color: #9b773c; border-color: #eddfb9; background: #fdf8e9; }
.notice-info { color: #5e746d; border-color: #d9e5dd; background: #f0f6f1; }
.inline-notice { padding: 10px 12px; font-size: 11px; margin: 12px 0 0; }
.table-wrap { overflow-x: auto; margin: 0 -25px; }
.table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.table thead { background: #fafbf7; }
.table th { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: #8a957d; padding: 13px 16px; white-space: nowrap; border-top: 1px solid #edf0e8; border-bottom: 1px solid #edf0e8; }
.table td { padding: 17px 16px; border-bottom: 1px solid #edf0e8; color: #6a7a61; vertical-align: middle; }
.table td:first-child, .table th:first-child { padding-left: 25px; }
.table td:last-child, .table th:last-child { padding-right: 25px; }
.table td strong { color: #38513c; font-size: 12px; }
.table td small { display: block; font-size: 10px; color: #94a088; margin-top: 3px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .actions { justify-content: flex-end; }
.table form { display: inline-flex; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 24px; min-height: 210px; }
.empty-state > svg { width: 40px; height: 40px; color: #a5b690; margin-bottom: 17px; }
.empty-state h3 { font-size: 16px; margin-bottom: 8px; }
.empty-state p { color: #8a967e; font-size: 12px; max-width: 350px; margin-bottom: 19px; }
.empty-state .empty-icon { width: 60px; height: 60px; border-radius: 16px; background: #f1f5e9; color: #91a47b; display: grid; place-items: center; margin-bottom: 18px; }
.empty-state .empty-icon svg { width: 28px; height: 28px; }

.media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.media-card { border: 1px solid var(--line); border-radius: 12px; background: white; overflow: hidden; min-width: 0; }
.media-thumbnail { position: relative; aspect-ratio: 16 / 10; background: #e9eee2; overflow: hidden; }
.media-thumbnail img, .media-thumbnail video { width: 100%; height: 100%; object-fit: cover; }
.media-thumbnail > .badge { position: absolute; top: 10px; left: 10px; background: #fffffff0; }
.media-thumbnail > .media-type { position: absolute; right: 10px; bottom: 10px; padding: 3px 7px; border-radius: 4px; background: #173b35dc; color: white; font-size: 9px; }
.media-info { padding: 15px 17px; }
.media-info h3 { font-size: 12px; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-info p { color: #8b9584; font-size: 10px; margin-bottom: 13px; }
.media-info .actions { justify-content: space-between; border-top: 1px solid #edf0e8; padding-top: 12px; }
.media-list-item { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid #edf0e8; }
.media-list-item:last-child { border-bottom: 0; padding-bottom: 0; }
.media-list-item > img { width: 69px; height: 44px; border-radius: 6px; object-fit: cover; background: #eef2e8; }
.media-list-item > div { flex: 1; min-width: 0; }
.media-list-item h3 { font-size: 12px; margin-bottom: 3px; }
.media-list-item p { font-size: 10px; margin: 0; color: #8b9584; }

.preview-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; padding: 8px; background: #243a30; border-radius: 10px; box-shadow: 0 5px 12px #173b3514; overflow: hidden; }
.preview-frame iframe, .preview-frame > img, .preview-frame > video { display: block; width: 100%; height: 100%; border: 0; border-radius: 4px; background: #f0f3e8; }
.preview-frame.is-portrait { aspect-ratio: 9 / 16; max-width: 290px; margin-inline: auto; }
.preview-frame::after { content: ""; width: 3px; height: 3px; border-radius: 50%; position: absolute; bottom: 2px; left: calc(50% - 1.5px); background: #a3c67f; }
.preview-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #91a081; font-size: 10px; margin-top: 13px; }
.preview-placeholder { width: 100%; height: 100%; display: grid; place-items: center; padding: 20px; text-align: center; color: #728467; background: #f0f4e6; font-size: 12px; border-radius: 4px; }
.screen-card { border: 1px solid var(--line); padding: 22px; border-radius: 13px; background: white; }
.screen-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.screen-card-header h3 { font-size: 14px; margin-bottom: 4px; }
.screen-card-header p { font-size: 11px; color: var(--muted); margin-bottom: 0; }
.screen-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 0; font-size: 10px; color: #87947a; }
.screen-actions { display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); padding-top: 15px; }
.pairing-code { display: block; font-size: 32px; font-weight: 600; letter-spacing: 8px; padding: 18px 12px; text-align: center; color: var(--ink); background: #f1f5e9; border-radius: 9px; font-variant-numeric: tabular-nums; }
.qr-preview { width: 150px; height: 150px; padding: 9px; background: white; border: 1px solid var(--line); border-radius: 9px; object-fit: contain; }

.plan-card { position: relative; padding: 27px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.plan-card.featured { border: 2px solid #809961; padding: 26px; background: #fafcf5; }
.plan-card .eyebrow { color: #799255; margin-bottom: 16px; }
.plan-price { font-size: 39px; font-weight: 650; letter-spacing: -1.8px; line-height: 1.15; margin-bottom: 3px; }
.plan-price small { font-size: 12px; font-weight: 400; letter-spacing: 0; color: #8b9584; }
.plan-description { color: #8b9584; font-size: 11px; margin-bottom: 24px; }
.plan-features { list-style: none; margin: 23px 0; padding: 0; border-top: 1px solid var(--line); }
.plan-features li { position: relative; padding: 13px 0 0 22px; color: #728268; font-size: 11px; }
.plan-features li::before { content: "✓"; position: absolute; left: 0; color: #789c50; font-weight: 650; }
.key-value { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 11px 0; border-bottom: 1px solid #edf0e8; font-size: 12px; }
.key-value:last-child { border: 0; }
.key-value > :first-child { color: #8b9584; }
.key-value > :last-child { text-align: right; font-weight: 550; overflow-wrap: anywhere; }
.progress-track { height: 5px; background: #edf1e6; border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; background: #9dbd71; border-radius: 10px; }
progress { width: 100%; height: 5px; border: none; border-radius: 10px; background: #edf1e6; accent-color: #9dbd71; }
progress::-webkit-progress-bar { background: #edf1e6; border-radius: 10px; }
progress::-webkit-progress-value { background: #9dbd71; border-radius: 10px; }
progress::-moz-progress-bar { background: #9dbd71; border-radius: 10px; }
.audit-row { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid #edf0e8; }
.audit-row:last-child { border: 0; }
.audit-icon { width: 30px; height: 30px; display: grid; place-items: center; background: #f0f5e7; color: #8ba96a; border-radius: 8px; flex-shrink: 0; }
.audit-icon svg { width: 15px; height: 15px; }
.audit-row strong { display: block; font-size: 11px; font-weight: 550; }
.audit-row small { display: block; font-size: 10px; color: #95a088; }

.auth-page { min-height: 100vh; display: grid; place-items: center; background: var(--paper); padding: 40px 22px; }
.auth-card { width: 100%; max-width: 460px; border: 1px solid var(--line); border-radius: 20px; padding: 38px; background: white; box-shadow: 0 15px 60px #173b3508; }
.auth-card h1 { font-size: 28px; margin-bottom: 10px; }
.auth-card > p { font-size: 12px; color: var(--muted); margin-bottom: 27px; }
.auth-card .brand { color: var(--ink); margin-bottom: 35px; padding: 0; }
.auth-card .brand small { color: #8c9b7b; }
.auth-footer { text-align: center; margin-top: 25px; font-size: 11px; color: var(--muted); }
.auth-footer a { color: #486940; text-decoration: underline; text-underline-offset: 3px; }
.auth-card .notice { font-size: 11px; }
.auth-card .field { margin-bottom: 19px; }
.auth-language { display: flex; justify-content: flex-end; gap: 10px; color: #7e8c72; font-size: 10px; margin-bottom: 18px; }
.auth-language a[aria-current] { color: var(--ink); font-weight: 650; }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 22px; }

/* Shared vocabulary for the account and publishing screens. */
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-heading h2, .section-heading h3 { margin-bottom: 0; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.inline-form .field { margin: 0; }
.inline-form input:not([type="checkbox"]):not([type="radio"]), .inline-form select { width: auto; min-width: 100px; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.kpi-value { display: block; color: var(--ink); font-size: 31px; font-weight: 650; line-height: 1.2; letter-spacing: -1.3px; margin: 9px 0; }
.kpi-value small { font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.kpi-label { display: block; color: #7d8974; font-size: 10px; font-weight: 500; }
.media-thumb { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #e9eee2; overflow: hidden; border-radius: 9px; }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; }
.screen-status { display: inline-flex; align-items: center; gap: 6px; color: #788c67; font-size: 10px; }
.screen-status::before { content: ""; display: block; width: 6px; height: 6px; border-radius: 50%; background: #86a95c; }
.screen-status.offline { color: #8e9788; }
.screen-status.offline::before { background: #a7ad9e; }
.feature-list { list-style: none; margin: 20px 0 25px; padding: 0; }
.feature-list li { position: relative; padding: 9px 0 9px 23px; color: #78886b; font-size: 11px; line-height: 1.7; }
.feature-list li::before { content: "✓"; position: absolute; top: 9px; left: 0; color: #84a25f; font-weight: 650; }
.code-display { padding: 16px; color: var(--ink); background: #f1f5e9; border: 1px solid #e3ead8; border-radius: 9px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 24px; letter-spacing: 4px; text-align: center; overflow-wrap: anywhere; }
.auth-shell { width: 100%; max-width: 1040px; display: grid; grid-template-columns: .95fr 1.05fr; min-height: 620px; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: white; box-shadow: 0 24px 90px #173b350a; }
.auth-brand { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 54px; color: #f5f8ef; background: var(--ink); overflow: hidden; }
.auth-brand::after { content: "+"; position: absolute; right: -20px; bottom: -115px; color: #294c3e; font-size: 370px; line-height: 1; font-weight: 200; pointer-events: none; }
.auth-brand > * { position: relative; z-index: 1; }
.auth-brand h1, .auth-brand h2 { max-width: 320px; color: #f3f7ea; font-size: 38px; line-height: 1.18; font-weight: 500; letter-spacing: -1.5px; }
.auth-brand p { max-width: 305px; color: #b7c9b7; font-size: 12px; line-height: 1.95; }
.auth-brand .eyebrow { color: #b6d381; margin-bottom: 18px; }
.auth-brand .brand { margin-bottom: 65px; padding: 0; }
.auth-brand .feature-list { margin-top: 25px; }
.auth-brand .feature-list li { color: #bfd0bc; font-size: 11px; }
.auth-brand .feature-list li::before { color: var(--lime); }
.auth-brand .brand-mark { display: inline-grid; place-items: center; width: 38px; height: 38px; margin-right: 9px; color: var(--ink); background: var(--lime); border-radius: 10px 10px 10px 3px; font-size: 26px; font-weight: 500; vertical-align: middle; }
.brand-name { color: white; font-size: 25px; font-weight: 650; letter-spacing: -.9px; }
.auth-panel { padding: 48px 52px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.auth-panel h1 { font-size: 28px; margin-bottom: 10px; letter-spacing: -.8px; }
.auth-panel > p { color: var(--muted); font-size: 12px; line-height: 1.8; margin-bottom: 25px; }
.auth-panel .form-actions { padding-top: 0; border: 0; }
.auth-panel .form-actions > .btn { width: 100%; }
.auth-panel .notice { font-size: 11px; }
.auth-panel .eyebrow { margin-bottom: 12px; }
.auth-panel .badge { align-self: flex-start; margin-bottom: 18px; }
.auth-brand { justify-content: flex-start; }
.auth-brand > div { margin: auto 0; }
.auth-brand .brand { gap: 10px; }
.auth-brand .brand-mark { position: relative; display: inline-flex; justify-content: center; align-items: center; margin-right: 0; font-size: 23px; padding-right: 3px; }
.auth-brand .brand-mark > span { position: absolute; right: 5px; bottom: 4px; font-size: 14px; line-height: 1; }
.auth-brand > .auth-footnote { margin-top: auto; margin-bottom: 0; padding-top: 45px; color: #92ad98; font-size: 10px; }
.auth-heading { margin-bottom: 25px; }
.auth-heading h2 { font-size: 28px; letter-spacing: -.85px; margin-bottom: 10px; }
.auth-heading > p:last-child { font-size: 12px; line-height: 1.8; margin-bottom: 0; }
.auth-switch { text-align: center; font-size: 11px; color: #8b9584; margin: 22px 0 0; }
.auth-switch a { color: #4d6e41; font-weight: 550; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #d0dbbf; }
.auth-panel > .auth-footnote { font-size: 9px; text-align: center; margin: 20px 0 0; line-height: 1.8; }
.form-stack > .btn { width: 100%; margin-top: 22px; }
.form-stack > .muted { font-size: 10px; line-height: 1.7; }
.form-stack > .notice { margin-bottom: 0; }
.checkbox-row { display: flex; align-items: flex-start; gap: 9px; color: #7c8b70; font-size: 10px; line-height: 1.7; }
.checkbox-row input { margin-top: 1px; width: 15px; height: 15px; }
input.pair-code-input { font-size: 25px !important; text-align: center; letter-spacing: 6px; font-weight: 550; font-variant-numeric: tabular-nums; text-transform: uppercase; }
input[type="hidden"] { display: none !important; }
label.field { display: block; color: #425b45; font-size: 11px; font-weight: 600; }
label.field > input, label.field > select, label.field > textarea { margin-top: 7px; font-weight: 400; }
label.field > .field-help { font-weight: 400; }
.workspace-content > .grid + .grid, .workspace-content > .card + .grid, .workspace-content > .grid + .section-heading, .workspace-content > .grid + .notice, .workspace-content > .notice + .card { margin-top: 24px; }
.stat-card > .muted { font-size: 10px; }
.kpi-text { font-size: 20px; line-height: 1.3; letter-spacing: -.55px; }
.plan-card .plan-price { font-size: 22px; line-height: 1.3; letter-spacing: -.65px; }
.section-heading > a { color: #64804f; font-size: 11px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #d0dbbf; }
.checkbox-field { display: flex; gap: 9px; align-items: flex-start; color: #4d6447; font-size: 12px; font-weight: 550; }
.checkbox-field input { margin-top: 3px; }
.onboarding-list { list-style: none; counter-reset: onboarding; margin: 22px 0 0; padding: 0; }
.onboarding-list li { counter-increment: onboarding; position: relative; padding: 0 0 20px 37px; color: #5c7152; font-size: 11px; }
.onboarding-list li::before { content: counter(onboarding, decimal-leading-zero); position: absolute; top: -2px; left: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: #f0f5e7; color: #7f9b5f; font-size: 9px; font-weight: 600; }
.onboarding-list li > a { font-size: 12px; color: #45603e; font-weight: 550; }
.onboarding-list li > a:hover { text-decoration: underline; text-underline-offset: 3px; }
.onboarding-list li > p { margin: 4px 0 0; font-size: 10px; }
.onboarding-list li:last-child { padding-bottom: 0; }
.preview-topline { position: absolute; top: 8px; left: 8px; right: 8px; height: 18%; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 5%; color: #496343; background: #f8faf1; border-radius: 3px 3px 0 0; font-size: clamp(9px, .8vw, 13px); }
.preview-topline strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: inherit; font-weight: 600; }
.preview-topline > span { font-weight: 450; font-variant-numeric: tabular-nums; }
.preview-welcome { position: absolute; inset: 8px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 11% 8% 8%; color: #2f503b; background: #edf2df; border-radius: 3px; }
.preview-welcome::after { content: "+"; position: absolute; right: 5%; bottom: 5%; font-weight: 250; font-size: clamp(80px, 11vw, 160px); line-height: 1; color: #d4dfbf; }
.preview-welcome .eyebrow { position: relative; z-index: 1; margin-bottom: 9px; font-size: clamp(6px, .55vw, 8px); letter-spacing: 1.5px; color: #7c9566; }
.preview-welcome h3 { position: relative; z-index: 1; margin-bottom: 9px; font-size: clamp(20px, 2.5vw, 36px); line-height: 1.13; letter-spacing: -.9px; font-weight: 500; }
.preview-welcome p { position: relative; z-index: 1; margin: 0; max-width: 70%; color: #82916e; font-size: clamp(7px, .7vw, 10px); }
.preview-footer { position: absolute; bottom: 8px; left: 8px; right: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 13%; padding: 0 5%; background: #e6ecd7; color: #869572; font-size: clamp(6px, .6vw, 8px); border-radius: 0 0 3px 3px; }
.screen-illustration { position: relative; width: 100%; max-width: 320px; aspect-ratio: 16 / 9; display: grid; place-items: center; margin: 23px auto 27px; border: 6px solid #345044; border-bottom-width: 10px; border-radius: 8px; color: #6e855b; background: #edf3df; font-size: 15px; font-weight: 550; letter-spacing: -.35px; }
.screen-illustration::before { content: ""; position: absolute; bottom: -25px; width: 4px; height: 15px; background: #345044; }
.screen-illustration::after { content: ""; position: absolute; bottom: -27px; width: 70px; height: 3px; border-radius: 3px; background: #345044; }
.screen-illustration.is-portrait { max-width: 125px; aspect-ratio: 9 / 16; font-size: 11px; }
.pairing-card { margin-bottom: 24px; }
.pairing-card > a { color: #4d6e41; text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; }
.two-factor-qr { width: 230px; max-width: 100%; padding: 12px; margin: 20px 0; border: 1px solid var(--line); border-radius: 10px; background: white; }
.two-factor-qr svg { display: block; width: 100%; height: auto; }
.two-factor-qr + .field .code-display { font-size: 15px; letter-spacing: 2px; line-height: 1.9; }

@media (min-width: 1650px) {
    :root { --sidebar-width: 268px; }
    .sidebar { padding-left: 24px; padding-right: 24px; }
    .sidebar-profile { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; }
    .workspace-content { padding-top: 48px; }
}
@media (max-width: 1270px) {
    :root { --sidebar-width: 224px; }
    .sidebar { padding-left: 15px; padding-right: 15px; }
    .brand { font-size: 22px; gap: 9px; }
    .brand small { font-size: 6px; letter-spacing: 1.4px; }
    .brand-symbol { width: 28px; height: 28px; }
    .sidebar-profile { margin-left: -15px; margin-right: -15px; padding-left: 15px; padding-right: 15px; }
    .topbar, .workspace-content { padding-left: 28px; padding-right: 28px; }
    .app-footer { padding-left: 28px; padding-right: 28px; }
    .grid-4 { gap: 12px; }
    .stat-card { padding: 18px; }
    .stat-icon { top: 16px; right: 15px; }
    .dashboard-grid { gap: 18px; grid-template-columns: minmax(0, 1.3fr) minmax(270px, 1fr); }
    .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility .2s; width: min(304px, calc(100vw - 24px)); max-height: 100dvh; padding: max(22px, env(safe-area-inset-top)) 20px 0 max(20px, env(safe-area-inset-left)); overscroll-behavior-y: contain; }
    .sidebar-heading .brand { padding-left: 0; }
    .sidebar-heading { position: sticky; top: 0; z-index: 1; padding-bottom: 8px; background: var(--ink); }
    .sidebar-close.icon-button { display: inline-grid; flex-shrink: 0; color: #d9e7d7; background: #21483f; border-color: #426158; }
    .sidebar-close:hover { background: #315a4d; }
    .sidebar .workspace-label { margin-top: 28px; }
    .sidebar-profile { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
    .sidebar-profile { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
    .app-main { margin-left: 0; }
    .mobile-menu-toggle { display: inline-grid !important; }
    .sidebar-open { overflow: hidden; }
    .sidebar-open .sidebar { transform: translateX(0); visibility: visible; transition: transform .2s ease; }
    .sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 50; background: #0e281f66; }
    .topbar { min-height: 72px; }
    .workspace-content { padding-top: 30px; }
    .sidebar .brand { font-size: 24px; }
    .sidebar .brand-symbol { width: 31px; height: 31px; }
    .sidebar .brand small { font-size: 6.7px; letter-spacing: 1.65px; }
    .icon-button, .logout-button { min-width: 44px; min-height: 44px; }
    .nav-link { min-height: 48px; }
    .language-switch { min-height: 44px; }
}
@media (max-width: 800px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .page-header { align-items: flex-start; }
    .page-header .page-actions { padding-top: 5px; }
    .card { padding: 22px; }
    .table-wrap { margin-left: -22px; margin-right: -22px; }
    .table td:first-child, .table th:first-child { padding-left: 22px; }
    .table td:last-child, .table th:last-child { padding-right: 22px; }
    .welcome-card { padding: 27px; }
    .auth-shell { grid-template-columns: .85fr 1.15fr; min-height: 570px; }
    .auth-brand { padding: 35px; }
    .auth-brand h1, .auth-brand h2 { font-size: 31px; }
    .auth-panel { padding: 38px 32px; }
}
@media (max-width: 620px) {
    body { font-size: 13px; }
    .topbar { padding: 0 18px; min-height: 68px; }
    .topbar-leading, .topbar-trailing { gap: 10px; }
    .breadcrumb-brand, .breadcrumb-separator { display: none; }
    .breadcrumb-current { font-size: 11px; }
    .workspace-content { padding: 26px 18px; }
    .app-footer { padding: 15px 18px; font-size: 9px; }
    h1 { font-size: 28px; letter-spacing: -.9px; }
    h2 { font-size: 18px; }
    .page-header { flex-direction: column; gap: 18px; margin-bottom: 24px; }
    .page-header p { font-size: 12px; }
    .page-header .page-actions { padding: 0; width: 100%; }
    .page-header .page-actions .btn { flex: 1; }
    .eyebrow { font-size: 8px; letter-spacing: 1.5px; margin-bottom: 10px; }
    .grid, .grid-2, .grid-3, .grid-4, .dashboard-grid, .stack { gap: 16px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card { padding: 20px; border-radius: 13px; }
    .card-header { gap: 12px; margin-bottom: 19px; }
    .card-header h2 { font-size: 17px; }
    .card-header .text-link { font-size: 10px; }
    .stat-card { padding: 17px; border-radius: 10px; }
    .stat-label, .stat-card .stat-label { font-size: 9px; padding-right: 24px; }
    .stat-value { font-size: 27px; }
    .stat-icon { top: 15px; right: 13px; width: 25px; height: 25px; border-radius: 6px; }
    .stat-icon svg { width: 13px; height: 13px; }
    .stat-footnote { font-size: 9px; }
    .welcome-card { padding: 25px; }
    .welcome-card h2 { font-size: 23px; max-width: 80%; }
    .welcome-mark { width: 55px; height: 55px; right: 20px; top: 25px; }
    .form-grid { grid-template-columns: 1fr; gap: 0; }
    .form-actions { flex-wrap: wrap; }
    .form-actions .btn { flex: 1; }
    .table-wrap { margin-left: -20px; margin-right: -20px; }
    .table td:first-child, .table th:first-child { padding-left: 20px; }
    .table td:last-child, .table th:last-child { padding-right: 20px; }
    .table td, .table th { padding-left: 12px; padding-right: 12px; }
    .media-grid { grid-template-columns: 1fr; gap: 16px; }
    .media-thumbnail { aspect-ratio: 16 / 9; }
    .card-footer { align-items: flex-start; flex-direction: column; }
    .auth-card { padding: 28px; border-radius: 16px; }
    .auth-page { padding: 25px 16px; }
    .notice { padding: 12px 14px; font-size: 11px; }
    .plan-card { padding: 24px; }
    .plan-card.featured { padding: 23px; }
    .plan-price { font-size: 34px; }
    .auth-shell { grid-template-columns: 1fr; max-width: 450px; min-height: auto; border-radius: 17px; }
    .auth-brand { padding: 27px 28px; }
    .auth-brand .brand { margin-bottom: 25px; }
    .auth-brand h1, .auth-brand h2 { font-size: 26px; max-width: 320px; margin-bottom: 10px; letter-spacing: -.8px; }
    .auth-brand p { font-size: 11px; line-height: 1.7; margin-bottom: 0; }
    .auth-brand > .auth-footnote { padding-top: 18px; font-size: 9px; }
    .auth-brand .brand { margin-bottom: 25px; }
    .auth-brand .feature-list { display: none; }
    .auth-brand::after { font-size: 220px; right: -5px; bottom: -80px; }
    .auth-panel { padding: 30px 27px; }
    .auth-panel h1 { font-size: 25px; }
    .section-heading { align-items: flex-start; }
}
@media (max-width: 700px) {
    .app-main { min-height: 100dvh; }
    .topbar { gap: 10px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
    .topbar-leading { flex: 1; }
    .topbar-trailing { flex-shrink: 0; }
    .breadcrumb-current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .topbar-divider, .topbar-avatar { display: none; }
    .workspace-content { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
    .app-footer { flex-wrap: wrap; gap: 6px 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
    .btn { min-height: 46px; font-size: 13px; max-width: 100%; white-space: normal; }
    .btn-sm { min-height: 44px; }
    input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]):not([type="range"]), select, textarea { min-width: 0; max-width: 100%; min-height: 48px; font-size: 16px; }
    input[type="file"] { min-width: 0; max-width: 100%; font-size: 16px; }
    input[type="color"] { font-size: 16px; }
    input[type="file"]::file-selector-button { min-height: 44px; }
    input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; }
    .checkbox-field, .checkbox-label, .checkbox-row, .check-row { min-height: 44px; align-items: flex-start; padding: 10px 0; font-size: 13px; }
    label.field, .field > label, .field-label { font-size: 12px; }
    .field-help, .field small, .help-text { font-size: 11px; }
    .page-header > .btn, .page-header > .actions, .page-header > .page-actions { width: 100%; }
    .page-header .page-actions, .actions, .button-group, .button-row, .form-actions { align-items: stretch; }
    .actions > .btn, .button-group > .btn, .button-row > .btn, .form-actions > .btn { flex: 1 1 180px; }
    .actions > a:not(.btn), .section-heading > a { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; }
    .card-header > a, .section-header > a { display: inline-flex; align-items: center; min-height: 44px; }
    .table-scroll-hint { display: block; }
    .stack > .btn { align-self: stretch; }
    .section-heading { flex-wrap: wrap; gap: 10px; }
    .section-heading > div { min-width: 0; }
    .badge { max-width: 100%; white-space: normal; }
    .notice { display: block; font-size: 12px; }
    .notice > svg { display: inline-block; vertical-align: middle; margin-right: 6px; }
    .notice > a { text-decoration: underline; text-underline-offset: 3px; }
    .inline-form { align-items: stretch; }
    .inline-form .field, .inline-form > input, .inline-form > select { flex: 1 1 100%; width: 100%; }
    .table-wrap:has(.table-mobile-cards) { margin: 0; overflow: visible; }
    .table-mobile-cards, .table-mobile-cards tbody { display: block; width: 100%; }
    .table-mobile-cards thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .table-mobile-cards tbody tr { display: block; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 10px; background: white; }
    .table-mobile-cards tbody tr:last-child { margin-bottom: 0; }
    .table-mobile-cards td, .table-mobile-cards td:first-child, .table-mobile-cards td:last-child { display: block; width: 100%; padding: 13px 14px; border: 0; white-space: normal; overflow-wrap: anywhere; }
    .table-mobile-cards td + td { border-top: 1px solid #edf0e8; }
    .table-mobile-cards td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 6px; color: #748468; font-size: 10px; font-weight: 650; line-height: 1.5; letter-spacing: .7px; text-transform: uppercase; }
    .table-mobile-cards td strong { font-size: 13px; }
    .table-mobile-cards td > a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }
    .table-mobile-cards form { display: flex; width: 100%; flex-wrap: wrap; gap: 10px; }
    .table-mobile-cards form.stack { flex-direction: column; flex-wrap: nowrap; gap: 16px; }
    .table-mobile-cards form .btn { width: 100%; }
    .table-mobile-cards .actions { justify-content: flex-start; }
    .table-mobile-cards details + details, .table-mobile-cards details + form { margin-top: 12px; }
    .table-mobile-cards summary { min-height: 44px; padding: 11px 0; color: #38513c; font-size: 13px; font-weight: 600; }
    .table-mobile-cards .field { width: 100%; margin-bottom: 0; }
    .table-mobile-cards .form-grid { grid-template-columns: 1fr; gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
    .sidebar, .topbar, .app-footer, .page-actions, .form-actions, .skip-link { display: none !important; }
    .app-main { margin-left: 0; }
    body, .workspace-content { background: white; padding: 0; }
    .card { box-shadow: none; break-inside: avoid; }
}

.button-arrow { width:16px; height:16px; flex-shrink:0; }

progress { width:100%; height:10px; accent-color:var(--ink); }

/* Administration diagnostics */
.monitor-summary { border-top: 3px solid #5d824b; }
.monitor-summary.monitor-state-warning { border-top-color: #b1812f; }
.monitor-summary.monitor-state-error { border-top-color: #ac554b; }
.monitor-summary-heading { display: flex; align-items: flex-start; gap: 16px; }
.monitor-summary-heading h2 { margin: 0 0 7px; }
.monitor-summary-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.monitor-symbol { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border-radius: 50%; background: #eef5e5; color: #4d733b; }
.monitor-state-warning > .monitor-summary-heading .monitor-symbol { background: #fbf2dc; color: #8a6328; }
.monitor-state-error > .monitor-summary-heading .monitor-symbol { background: #fbefeb; color: #95483e; }
.monitor-symbol svg { width: 24px; height: 24px; }
.monitor-timestamp { margin: 20px 0 13px; color: var(--muted); font-size: 12px; }
.monitor-timestamp time { color: var(--ink); font-weight: 600; }
.monitor-counts { display: flex; flex-wrap: wrap; gap: 9px; }
.monitor-counts .badge { font-size: 12px; padding: 8px 11px; gap: 8px; }
.monitor-counts strong { font-size: 17px; line-height: 1; }
.monitor-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 22px 0; }
.monitor-check { margin: 0; border-inline-start: 3px solid #dbe6d3; }
.monitor-check.monitor-state-error { border-inline-start-color: #b9675c; }
.monitor-check.monitor-state-warning { border-inline-start-color: #c69a4f; }
.monitor-check-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.monitor-check-heading h2 { font-size: 16px; margin: 0; }
.monitor-check > p { color: #52634f; font-size: 13px; line-height: 1.7; margin: 14px 0; }
.monitor-check code, .monitor-incidents code { overflow-wrap: anywhere; white-space: normal; font-size: 12px; }
.monitor-items { padding-inline-start: 20px; margin: 12px 0; }
.monitor-items li { margin: 5px 0; }
.monitor-help { padding-top: 12px; border-top: 1px solid var(--line); }
.monitor-help summary { cursor: pointer; color: var(--ink); font-size: 12px; font-weight: 600; padding: 3px 0; }
.monitor-help dl { font-size: 12px; line-height: 1.7; }
.monitor-help dt { font-weight: 650; color: var(--ink); margin-top: 10px; }
.monitor-help dd { margin: 3px 0 0; color: #52634f; overflow-wrap: anywhere; }
.monitor-incidents th { white-space: nowrap; }
.monitor-incidents .table-wrap { margin-top: 18px; }
.monitor-limits { font-size: 12px; line-height: 1.8; margin: 20px 0; }
@media (max-width: 1050px) { .monitor-checks { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 540px) {
    .monitor-summary-heading { gap: 12px; }
    .monitor-symbol { flex-basis: 34px; height: 34px; }
    .monitor-summary-heading h2 { font-size: 19px; }
    .monitor-timestamp time { display: block; margin-top: 4px; }
    .monitor-counts { gap: 7px; }
    .monitor-counts .badge { font-size: 11px; }
}

/* Invoice administration */
.invoice-lines { display: grid; gap: 18px; margin-bottom: 20px; }
.invoice-line { display: grid; grid-template-columns: minmax(0, 2fr) minmax(70px, .5fr) minmax(100px, .9fr); align-items: end; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: #f9faf7; }
.invoice-line .field { margin: 0; }
.invoice-line > button { grid-column: 1 / -1; justify-self: start; }
.invoice-logo-preview { max-width: 220px; max-height: 100px; object-fit: contain; margin: 15px 0; }
.invoice-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin: 22px 0; }
.invoice-meta dt { color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.invoice-meta dd { margin: 0; color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }
.invoice-party { min-width: 0; padding: 16px 0; overflow-wrap: anywhere; }
.invoice-party .kpi-label { display: block; margin-bottom: 8px; }
.invoice-party p { font-size: 13px; line-height: 1.8; color: var(--muted); margin-top: 8px; }
.invoice-totals { width: min(100%, 420px); margin: 24px 0 24px auto; }
.invoice-totals > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; font-size: 13px; }
.invoice-totals dd { margin: 0; white-space: nowrap; font-weight: 600; }
.invoice-totals .invoice-grand-total { font-size: 20px; color: var(--ink); font-weight: 650; border-top: 2px solid var(--ink); padding-top: 18px; margin-top: 10px; }
.invoice-notes { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; color: var(--muted); }
.invoice-payment-form { padding-top: 22px; }
.invoice-schedules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.invoice-schedule { padding: 20px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.invoice-schedule p { font-size: 13px; }
.invoice-pagination { margin-top: 18px; }
@media (max-width: 800px) { .invoice-schedules { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 540px) {
    .invoice-line { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 15px; }
    .invoice-line-description { grid-column: 1 / -1; }
    .invoice-meta { grid-template-columns: minmax(0, 1fr); }
    .invoice-totals .invoice-grand-total { font-size: 18px; }
}
