:root {
    color-scheme: light;
    --ink: #182a25;
    --muted: #70817a;
    --green: #16785d;
    --green-dark: #105a47;
    --line: #dce7e1;
    --paper: #ffffff;
    --wash: #f5f8f5;
    --danger: #a13a32;
    font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background: var(--wash); user-select: none; }
input, textarea, [contenteditable="true"], [contenteditable=""] { user-select: text; }

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-dark); }
select { cursor: pointer; }

.page-shell { display: grid; grid-template-columns: minmax(360px, 0.88fr) minmax(540px, 1.12fr); min-height: 100vh; }

.brand-panel { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; min-height: 100vh; padding: 42px clamp(32px, 6vw, 88px) 38px; color: #f4fbf6; background: #123c31; isolation: isolate; }
.brand-panel::before { position: absolute; z-index: -2; inset: 0; background: radial-gradient(circle at 92% 88%, rgba(67, 147, 112, .32), transparent 36%), linear-gradient(145deg, #143f33 0%, #0d3028 100%); content: ""; }
.brand { z-index: 1; display: inline-flex; align-items: center; gap: 11px; width: fit-content; color: #fff; font: 800 21px/1 "Manrope", sans-serif; letter-spacing: -.8px; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-mark { display: grid; width: 35px; height: 35px; place-items: center; border: 1px solid rgba(232, 255, 241, .45); border-radius: 11px; color: #153e32; background: #bcf0d3; font-size: 19px; }
.brand-light { color: #b4e8c9; font-weight: 600; }
.brand-copy { z-index: 1; max-width: 520px; margin: auto 0; padding: 60px 0; }
.eyebrow, .step-label { margin: 0; font-size: 10px; font-weight: 700; letter-spacing: 1.65px; }
.eyebrow { color: #9dd8b9; }
.brand-copy h1 { margin: 23px 0 20px; font: 700 clamp(38px, 4.7vw, 62px)/1.12 "Manrope", sans-serif; letter-spacing: -2.8px; }
.brand-copy h1 em { color: #ace5c5; font-style: normal; }
.brand-description { max-width: 395px; margin: 0; color: #d0e1d8; font-size: 15px; line-height: 1.75; }
.brand-note { z-index: 1; display: flex; align-items: center; gap: 12px; color: #c3d9ce; font-size: 12px; }
.note-icon { display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid rgba(171, 229, 197, .5); border-radius: 50%; color: #b7e7c8; }
.brand-orbit { position: absolute; z-index: -1; right: -195px; bottom: 4%; width: 470px; height: 470px; border: 1px solid rgba(182, 235, 199, .1); border-radius: 50%; }
.orbit-two { right: -145px; bottom: 9%; width: 370px; height: 370px; }
.brand-grid { position: absolute; z-index: -1; right: 6%; bottom: 20%; width: 230px; height: 230px; opacity: .15; background-image: radial-gradient(#b3e5c6 1px, transparent 1px); background-size: 18px 18px; mask-image: linear-gradient(135deg, transparent 0%, #000 50%, transparent 100%); }

.form-panel { display: grid; place-items: center; padding: 44px 30px 30px; background: #fbfcfa; }
.form-wrap { width: min(100%, 490px); }
.form-heading { margin-bottom: 26px; }
.step-label { display: inline-flex; align-items: center; gap: 8px; color: #688178; }
.step-dot { width: 7px; height: 7px; border-radius: 50%; background: #51a67e; box-shadow: 0 0 0 4px #e8f5ec; }
.form-heading h2 { margin: 14px 0 7px; font: 700 30px/1.2 "Manrope", sans-serif; letter-spacing: -1px; }
.form-heading > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.registration-form { display: grid; gap: 15px; }
.field-group { display: grid; align-content: start; gap: 7px; min-width: 0; }
.field-group label { color: #34453f; font-size: 12px; font-weight: 700; }
.label-note { color: #8a9892; font-size: 10px; font-weight: 500; }
.field-group input, .field-group select { width: 100%; height: 43px; padding: 0 13px; border: 1px solid #d9e4de; border-radius: 8px; outline: none; color: #263831; background: #fff; font: 13px "DM Sans", sans-serif; transition: border-color .16s, box-shadow .16s; }
.field-group textarea { width: 100%; min-height: 110px; padding: 11px 13px; border: 1px solid #d9e4de; border-radius: 8px; outline: none; color: #263831; background: #fff; font: 13px/1.5 "DM Sans", sans-serif; resize: vertical; transition: border-color .16s, box-shadow .16s; }
.field-group input::placeholder { color: #a1aea8; }
.field-group input:focus, .field-group select:focus, .field-group textarea:focus { border-color: #68aa88; box-shadow: 0 0 0 3px rgba(44, 136, 94, .11); }
.field-group input:invalid:not(:placeholder-shown) { border-color: #d38c83; }
.field-row { display: grid; grid-template-columns: 1fr 1.25fr; gap: 13px; }
.field-hint { display: block; margin-top: 0; color: #84918c; font-size: 10px; line-height: 1.5; }
.field-error { color: var(--danger); font-size: 11px; }
.check-row { display: flex; align-items: flex-start; gap: 10px; margin-top: 1px; color: #66766f; font-size: 11px; line-height: 1.6; cursor: pointer; }
.check-row input { width: 15px; height: 15px; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--green); }
.button-primary { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 47px; margin-top: 1px; padding: 0 15px 0 17px; border: 0; border-radius: 8px; color: white; background: var(--green); box-shadow: 0 5px 12px rgba(25, 100, 73, .14); font: 700 13px "DM Sans", sans-serif; cursor: pointer; transition: background .18s, transform .18s, box-shadow .18s; }
.button-primary:hover { transform: translateY(-1px); background: var(--green-dark); box-shadow: 0 8px 18px rgba(25, 100, 73, .18); }
.button-primary:focus-visible { outline: 3px solid #93c9a9; outline-offset: 3px; }
.button-arrow { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid rgba(255,255,255,.32); border-radius: 50%; }
.button-arrow svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease; }
.button-primary:hover .button-arrow svg { transform: translateX(2px); }
.button-back-link { gap: 8px; }
.button-back-chevron { width: 20px; height: 20px; border-color: currentColor; color: inherit; background: transparent; }
.button-back-chevron svg { width: 11px; height: 11px; }
.button-back-link:hover .button-back-chevron { transform: translateX(-1px); color: inherit; background: transparent; }
.secure-note { display: flex; justify-content: center; gap: 7px; margin: 0; color: #87948e; font-size: 10px; }
.secure-note span { color: #529775; font-size: 14px; line-height: 10px; }
.legal-footer { margin: 25px 0 0; color: #9aa49f; font-size: 10px; line-height: 1.6; text-align: center; }
.legal-footer a { color: #77877f; }
.alert { margin: 0 0 18px; padding: 12px 14px; border: 1px solid; border-radius: 8px; font-size: 12px; line-height: 1.5; }
.alert ul { margin: 7px 0 0; padding-left: 18px; }
.alert-error { border-color: #efd3cf; color: #873d36; background: #fff7f5; }
.alert-success { border-color: #cce8d5; color: #286b4a; background: #f1fbf4; }
.verify-heading { margin-bottom: 24px; }
.verify-heading h2 { margin-top: 16px; }
.verify-heading p strong { color: #344a40; font-weight: 600; }
.verification-icon { display: grid; width: 48px; height: 48px; margin-bottom: 22px; place-items: center; border: 1px solid #d9eee1; border-radius: 15px; color: #27805a; background: #edf8f0; font-size: 22px; }
.success-icon { border-color: #bfe4cd; color: #176747; background: #e2f5e9; }
.verify-hint { margin-top: 17px; }
.verify-hint code { padding: 1px 4px; border-radius: 3px; background: #eef2ee; font-size: 10px; }
.local-mail-note { margin-top: -5px; }
.local-mail-note code { padding: 1px 4px; border-radius: 3px; background: #eef2ee; font-size: 10px; }
.summary-card { display: grid; gap: 0; margin-top: 24px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.summary-card div { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 16px; }
.summary-card div + div { border-top: 1px solid #edf1ee; }
.summary-card span { color: #7d8c84; font-size: 11px; }
.summary-card strong { color: #263a31; font-size: 12px; font-weight: 700; text-align: right; }
.completion-note { margin-top: 19px; }
.auth-switch { margin: 22px 0 0; color: #78877f; font-size: 12px; text-align: center; }
.auth-switch a { font-weight: 700; }
.login-form { margin-top: 28px; }
.remember-row { margin-top: -1px; }
.logout-form { display: flex; justify-content: center; margin-top: 20px; }
.text-button { padding: 6px 10px; border: 0; color: #77877f; background: transparent; font: 600 11px "DM Sans", sans-serif; cursor: pointer; }
.text-button:hover { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; }

.dashboard-body { background: #f5f8f5; }
.topbar { position: sticky; z-index: 5; top: 0; display: flex; align-items: center; gap: 38px; min-height: 72px; padding: 0 15px; border-bottom: 1px solid #e3ebe5; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.topbar-brand { color: var(--ink); font-size: 19px; }
.topbar-brand:hover { color: var(--ink); }
.topbar-brand .brand-mark { width: 31px; height: 31px; font-size: 17px; }
.topbar-brand .brand-light { color: var(--green); }
.topbar-nav { display: flex; align-self: stretch; gap: 25px; }
.topbar-nav > a, .nav-trigger { display: flex; align-items: center; height: 100%; border: 0; border-bottom: 2px solid transparent; color: #718179; background: transparent; font: 600 12px "DM Sans", sans-serif; text-decoration: none; }
.topbar-nav > a[aria-current="page"], .nav-trigger-current, .nav-menu.is-open .nav-trigger { border-bottom-color: var(--green); color: var(--green-dark); }
.nav-menu { position: relative; display: flex; align-items: stretch; }
.nav-trigger { justify-content: center; gap: 8px; padding: 0 1px; cursor: pointer; }
.nav-chevron { display: grid; width: 18px; height: 18px; flex: 0 0 auto; place-items: center; border: 1px solid #dce7e1; border-radius: 50%; color: #74877c; background: #f7faf7; transition: transform .2s ease, color .2s ease, background .2s ease; }
.nav-chevron svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.nav-menu.is-open .nav-chevron { transform: rotate(180deg); color: var(--green-dark); background: #edf7f0; }
.nav-dropdown { position: absolute; z-index: 10; top: calc(100% + 1px); left: -12px; display: grid; min-width: 180px; padding: 7px; border: 1px solid #e1e9e3; border-radius: 0 0 10px 10px; background: #fff; box-shadow: 0 10px 24px rgba(29, 65, 47, .12); transform-origin: top center; }
.nav-dropdown[hidden] { display: none; }
.nav-dropdown.is-opening { animation: nav-curtain-open .28s cubic-bezier(.2,.75,.25,1) both; }
.nav-dropdown.is-closing { animation: nav-curtain-close .2s cubic-bezier(.4,0,.8,.3) both; pointer-events: none; }
@keyframes nav-curtain-open { from { clip-path: inset(0 0 100% 0); opacity: .55; transform: translateY(-5px) scaleY(.96); } to { clip-path: inset(0); opacity: 1; transform: translateY(0) scaleY(1); } }
@keyframes nav-curtain-close { from { clip-path: inset(0); opacity: 1; transform: translateY(0) scaleY(1); } to { clip-path: inset(0 0 100% 0); opacity: .5; transform: translateY(-4px) scaleY(.97); } }
.nav-dropdown a { display: block; padding: 10px 11px; border-radius: 6px; color: #53645b; font-size: 11px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.nav-dropdown a:hover, .nav-dropdown a[aria-current="page"] { color: var(--green-dark); background: #f1f8f3; }
@media (prefers-reduced-motion: reduce) { .nav-chevron, .nav-dropdown { transition: none; animation-duration: .01ms !important; } }
.topbar-user { display: flex; align-items: center; gap: 18px; margin-left: auto; color: #53645b; font-size: 12px; }
.topbar-user form { margin: 0; }
.topbar-user .text-button:hover { border-radius: 6px; color: #b42318; background: #fff1f0; text-decoration: none; }
.theme-toggle { position: relative; display: flex; width: 50px; height: 28px; flex: 0 0 auto; align-items: center; justify-content: space-between; padding: 0 6px; border: 1px solid #dce7e1; border-radius: 20px; color: #75857c; background: #f3f7f4; cursor: pointer; transition: background .2s ease, border-color .2s ease; }
.theme-toggle:focus-visible { outline: 3px solid rgba(44, 136, 94, .25); outline-offset: 2px; }
.theme-track-icon { display: grid; width: 13px; height: 13px; place-items: center; }
.theme-track-icon svg, .theme-toggle-thumb svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.theme-toggle-thumb { position: absolute; top: 3px; left: 3px; display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; color: #d99220; background: #fff; box-shadow: 0 1px 4px rgba(24, 42, 37, .18); transition: transform .22s ease, color .22s ease, background .22s ease; }
.theme-toggle-thumb svg { width: 12px; height: 12px; }
.theme-thumb-moon { display: none; }
.topbar-user .theme-toggle:hover { background: #eaf2ed; }
.topbar-user .theme-toggle:hover .theme-toggle-thumb { color: #d99220; }
.topbar-user .text-button { transition: color .18s ease, background .18s ease; }
.dashboard-main { width: min(100% - 48px, 1120px); margin: 0 auto; padding: 44px 0 72px; }
.dashboard-main > .alert { margin-bottom: 22px; }
.dashboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.dashboard-heading h1 { margin: 9px 0 6px; font: 700 30px/1.2 "Manrope", sans-serif; letter-spacing: -.9px; }
.dashboard-heading > div > p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.dashboard-eyebrow { color: var(--green); }
.button-link, .button-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 41px; padding: 0 15px; border: 1px solid var(--green); border-radius: 8px; color: white; background: var(--green); font: 700 12px "DM Sans", sans-serif; text-decoration: none; cursor: pointer; }
.button-link:hover { color: white; background: var(--green-dark); }
.button-secondary { border-color: #d9e4de; color: #53675d; background: #fff; }
.button-secondary:hover { color: var(--green-dark); border-color: #a9c9b6; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 22px; }
.metric-card, .content-card { border: 1px solid #e1e9e3; border-radius: 12px; background: #fff; box-shadow: 0 4px 14px rgba(29, 65, 47, .025); }
.metric-card { display: grid; gap: 10px; padding: 20px 21px; }
.metric-card span { color: #718179; font-size: 11px; font-weight: 600; }
.metric-card strong { color: #203a2e; font: 700 25px "Manrope", sans-serif; }
.content-card { padding: 22px 24px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 15px; }
.section-heading h2 { margin: 0 0 5px; font: 700 17px "Manrope", sans-serif; }
.section-heading p { margin: 0; color: #819087; font-size: 11px; }
.section-heading > a { font-size: 11px; font-weight: 700; }
.branch-row { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px 3px; border-top: 1px solid #edf1ee; color: inherit; text-decoration: none; }
a.branch-row:hover .branch-info strong { color: var(--green); }
.branch-avatar { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border: 1px solid #d8ebde; border-radius: 11px; color: #327452; background: #eff8f1; font: 700 15px "Manrope", sans-serif; }
.branch-info { display: grid; flex: 1; gap: 5px; min-width: 0; }
.branch-info strong { overflow: hidden; color: #2d4037; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.branch-info small { overflow: hidden; color: #87948d; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.main-badge { display: inline-block; margin-left: 5px; padding: 3px 6px; border-radius: 20px; color: #3b7856; background: #edf7ef; font: 600 9px "DM Sans", sans-serif; vertical-align: 1px; }
.status-badge { display: inline-flex; flex: 0 0 auto; padding: 5px 8px; border-radius: 20px; font-size: 9px; font-weight: 700; }
.status-active { color: #34734d; background: #edf8ef; }
.status-suspended { color: #9b651d; background: #fff5e5; }
.status-archived { color: #7c8580; background: #f0f2f1; }
.row-arrow { color: #98a59d; font-size: 24px; line-height: 1; }
.row-actions { display: flex; flex: 0 0 auto; gap: 14px; font-size: 10px; font-weight: 700; }
.branch-row-static { min-height: 82px; }
.empty-state { padding: 17px 0 5px; color: #87948d; font-size: 12px; }
.form-card, .product-form { width: 100%; max-width: none; }
.management-form { display: grid; gap: 17px; }
.management-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.management-form .field-group input, .management-form .field-group select { height: 42px; font-size: 12px; }
.management-form .field-group input[type="file"] { display: flex; align-items: center; height: 52px; padding: 0 10px; cursor: pointer; }
.management-form .field-group input[type="file"]::file-selector-button { align-self: center; height: 30px; margin-right: 10px; font: 600 12px "DM Sans", sans-serif; cursor: pointer; }
.management-check { width: fit-content; margin: 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 3px; }
.management-footnote { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid #edf1ee; color: #87948d; font-size: 10px; line-height: 1.6; }
.team-invite-card { margin-bottom: 22px; }
.team-section { margin-top: 22px; }
.team-row { display: flex; align-items: center; gap: 13px; min-height: 74px; padding: 12px 0; border-top: 1px solid #edf1ee; }
.team-row > form { margin: 0; }
.team-row .text-button { white-space: nowrap; }
.team-role { flex: 0 0 auto; color: #64766d; font-size: 10px; font-weight: 600; }
.branch-permission-list { margin: 0; padding: 13px 14px 14px; border: 1px solid #e2ebe5; border-radius: 9px; }
.branch-permission-list legend { padding: 0 5px; color: #34453f; font-size: 11px; font-weight: 700; }
.branch-permission-list > p { margin: 0 0 10px; color: #87948d; font-size: 10px; }
.branch-checkboxes { display: flex; flex-wrap: wrap; gap: 9px 18px; }
.branch-checkboxes .check-row { color: #52645b; font-size: 11px; }
.invitation-avatar { color: #668072; background: #f2f6f3; }
.invite-existing p { color: #70817a; font-size: 13px; line-height: 1.7; }
.invite-login { margin-top: 13px; text-decoration: none; }
.settings-card { display: grid; gap: 17px; }
.settings-section { margin-top: 22px; }
.settings-switches { display: flex; flex-wrap: wrap; gap: 14px 27px; padding: 4px 0; }
.settings-switches .check-row { margin: 0; }
.settings-note { margin: 0; padding: 12px 14px; border: 1px solid #e5eee8; border-radius: 8px; color: #738178; background: #f8faf8; font-size: 10px; line-height: 1.65; }
.color-field { display: flex; align-items: center; gap: 10px; }
.color-field input { width: 48px; height: 38px; padding: 4px; }
.color-field span { color: #728078; font: 11px ui-monospace, monospace; }
.settings-card textarea { width: 100%; min-height: 84px; padding: 11px 13px; border: 1px solid #d9e4de; border-radius: 8px; outline: none; color: #263831; background: #fff; font: 12px/1.5 "DM Sans", sans-serif; resize: vertical; }
.settings-card textarea:focus { border-color: #68aa88; box-shadow: 0 0 0 3px rgba(44, 136, 94, .11); }
.logo-preview { display: flex; align-items: center; gap: 16px; }
.logo-preview img { width: auto; max-width: 180px; height: auto; max-height: 76px; object-fit: contain; }
.logo-preview form { margin: 0; }
.brand-logo { display: block; width: 35px; height: 35px; border-radius: 8px; object-fit: contain; }
.logo-remove-form { margin: 7px 0 0 3px; }
.sequence-branch { padding: 16px 0 4px; border-top: 1px solid #edf1ee; }
.sequence-branch h3 { margin: 0 0 4px; font: 700 13px "Manrope", sans-serif; }
.sequence-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr .65fr auto; align-items: start; gap: 12px; padding: 13px 0; border-bottom: 1px solid #f0f3f1; }
.sequence-label { align-self: center; display: grid; gap: 5px; color: #46584e; font-size: 10px; }
.sequence-label small { color: #89958e; font-size: 9px; }
.sequence-row .field-group label { font-size: 10px; }
.sequence-row .button-secondary { min-height: 40px; margin-top: 24px; }
.heading-actions { display: flex; gap: 9px; }
.product-filters { display: grid; grid-template-columns: minmax(180px, 2fr) repeat(3, minmax(125px, 1fr)) auto; align-items: start; gap: 13px; margin-bottom: 18px; padding: 17px 20px; }
.filter-actions { display: flex; align-items: center; gap: 8px; margin-top: 24px; }
.filter-actions > * { min-height: 42px; white-space: nowrap; }
.table-card { padding: 0; overflow: hidden; }
.table-card[aria-busy="true"] { opacity: .58; transition: opacity .12s ease; pointer-events: none; }
.table-scroll { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; color: #42534a; font-size: 11px; text-align: left; }
.data-table th { padding: 12px 14px; color: #7b8981; background: #f8faf8; font-size: 9px; font-weight: 700; letter-spacing: .25px; white-space: nowrap; }
.data-table td { padding: 12px 14px; border-top: 1px solid #edf1ee; white-space: nowrap; }
.data-table td:first-child { white-space: normal; }
.product-cell { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.product-cell img, .product-placeholder { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border: 1px solid #e3ebe5; border-radius: 9px; object-fit: cover; color: #43805e; background: #f0f7f1; font-weight: 700; }
.product-cell > span:last-child { display: grid; gap: 4px; }
.product-cell strong { color: #33483c; font-size: 11px; }
.product-cell small, .table-subline { display: block; margin-top: 4px; color: #88948d; font-size: 9px; }
.table-action, .text-link { font-size: 10px; font-weight: 700; }
.pagination-wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; border-top: 1px solid #edf1ee; }
.pagination-summary { margin: 0; color: #7f8d85; font-size: 10px; }
.product-pagination { display: flex; align-items: center; gap: 7px; }
.product-pagination .page-link, .product-pagination .page-indicator { display: inline-flex; min-height: 32px; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid #e2ebe5; border-radius: 7px; color: #52705d; font-size: 10px; line-height: 1; text-decoration: none; white-space: nowrap; }
.product-pagination .page-link:hover { border-color: #a9c9b6; color: var(--green-dark); background: #f1f8f3; }
.product-pagination .page-link.is-disabled { color: #99a69f; background: #f7f9f7; cursor: default; }
.product-pagination .page-indicator { border-color: transparent; color: #718179; }
.product-image-preview { display: flex; align-items: center; gap: 15px; }
.product-image-preview img { width: 92px; height: 92px; border: 1px solid #e2ebe5; border-radius: 10px; object-fit: cover; }
.product-image-preview .check-row { margin: 0; }
.category-list { padding-top: 6px; }
.category-row { display: grid; grid-template-columns: 1fr 1.2fr .8fr auto; align-items: start; gap: 13px; padding: 15px 0; border-top: 1px solid #edf1ee; }
.category-row .field-group label { font-size: 10px; }
.category-row .button-secondary { min-height: 41px; margin-top: 24px; }
.import-help { margin-bottom: 18px; color: #687970; font-size: 11px; line-height: 1.8; }
.import-help h2 { margin: 0 0 8px; color: #33483c; font: 700 15px "Manrope", sans-serif; }
.import-help ul { margin: 0 0 10px; padding-left: 18px; }
.import-help code { padding: 1px 4px; border-radius: 3px; background: #eff3ef; font-size: 10px; }
.import-upload { margin-bottom: 20px; }
.import-preview { padding: 21px 0 0; overflow: hidden; }
.import-preview > .section-heading { padding: 0 22px 14px; }
.import-table { min-width: 760px; }
.import-row-error { background: #fff8f6; }
.import-errors { margin: 0; padding-left: 15px; color: #a13a32; font-size: 9px; line-height: 1.5; white-space: normal; }
.import-confirm { padding: 16px 22px 20px; }
.import-blocked { margin: 0; padding: 15px 22px 19px; color: #8c514b; font-size: 11px; }

@media (max-width: 920px) {
    .page-shell { grid-template-columns: minmax(300px, .72fr) minmax(490px, 1.28fr); }
    .brand-panel { padding-right: 38px; padding-left: 38px; }
    .product-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .product-filters > .filter-actions { grid-column: 1 / -1; justify-content: flex-end; margin-top: 0; }
}

@media (max-width: 720px) {
    .page-shell { display: block; }
    .brand-panel { min-height: auto; padding: 22px 24px 26px; }
    .brand-copy { margin: 34px 0 22px; padding: 0; }
    .brand-copy h1 { margin: 15px 0 10px; font-size: 35px; letter-spacing: -1.5px; }
    .brand-description { font-size: 13px; }
    .brand-note { font-size: 11px; }
    .brand-orbit { right: -245px; bottom: -270px; }
    .form-panel { padding: 34px 23px 30px; }
    .form-wrap { max-width: 520px; }
    .topbar { flex-wrap: wrap; gap: 10px 22px; padding: 12px 15px 0; }
    .topbar-nav { order: 3; width: 100%; height: 38px; }
    .topbar-user { gap: 10px; }
    .dashboard-main { width: min(100% - 32px, 620px); padding-top: 30px; }
    .dashboard-heading { align-items: flex-start; }
    .dashboard-heading h1 { font-size: 26px; }
    .metric-grid { gap: 9px; }
    .metric-card { padding: 15px 12px; }
    .metric-card span { font-size: 9px; }
    .metric-card strong { font-size: 20px; }
    .team-row { flex-wrap: wrap; gap: 8px 11px; }
    .team-row .branch-info { flex-basis: calc(100% - 55px); }
    .team-row .team-role { margin-left: 49px; }
    .sequence-row { grid-template-columns: 1fr 1fr; }
    .sequence-label { grid-column: 1 / -1; }
    .product-filters { grid-template-columns: 1fr 1fr; }
    .category-row { grid-template-columns: 1fr 1fr; }
    .heading-actions { flex-wrap: wrap; justify-content: flex-start; }
}

@media (max-width: 390px) {
    .field-row { grid-template-columns: 1fr; }
    .form-heading h2 { font-size: 27px; }
    .dashboard-heading { display: grid; }
    .metric-grid { grid-template-columns: 1fr; }
    .metric-card { grid-template-columns: 1fr auto; align-items: center; }
    .branch-row { gap: 9px; }
    .row-actions { flex-direction: column; gap: 4px; }
    .status-badge { font-size: 8px; }
    .content-card { padding: 17px 14px; }
    .management-grid { grid-template-columns: 1fr; }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --ink: #e5eee8;
    --muted: #a5b5ac;
    --green-dark: #8dd4b0;
    --line: #34463d;
    --paper: #1c2923;
    --wash: #111a16;
    --danger: #ffaaa0;
}

:root[data-theme="dark"] body.dashboard-body { color: var(--ink); background: #111a16; }
:root[data-theme="dark"] .topbar { border-color: #2d3d34; background: rgba(25, 37, 31, .97); }
:root[data-theme="dark"] .topbar-brand,
:root[data-theme="dark"] .topbar-brand:hover { color: #e5eee8; }
:root[data-theme="dark"] .topbar-nav > a,
:root[data-theme="dark"] .nav-trigger,
:root[data-theme="dark"] .topbar-user { color: #b3c1ba; }
:root[data-theme="dark"] .topbar-nav > a[aria-current="page"],
:root[data-theme="dark"] .nav-trigger-current,
:root[data-theme="dark"] .nav-menu.is-open .nav-trigger { color: #9be0bd; }
:root[data-theme="dark"] .nav-chevron { border-color: #3b5145; color: #b1c3b8; background: #24352c; }
:root[data-theme="dark"] .nav-menu.is-open .nav-chevron { color: #a4e6c2; background: #2c4939; }
:root[data-theme="dark"] .nav-dropdown { border-color: #35483d; background: #1c2923; box-shadow: 0 12px 28px rgba(0, 0, 0, .32); }
:root[data-theme="dark"] .nav-dropdown a { color: #c2d0c8; }
:root[data-theme="dark"] .nav-dropdown a:hover,
:root[data-theme="dark"] .nav-dropdown a[aria-current="page"] { color: #a4e6c2; background: #293c31; }
:root[data-theme="dark"] .theme-toggle { border-color: #43564b; color: #aebeb5; background: #293a30; }
:root[data-theme="dark"] .topbar-user .theme-toggle:hover { background: #34493b; }
:root[data-theme="dark"] .theme-toggle-thumb { transform: translateX(22px); color: #d8e6ff; background: #435a75; }
:root[data-theme="dark"] .theme-thumb-sun { display: none; }
:root[data-theme="dark"] .theme-thumb-moon { display: block; }
:root[data-theme="dark"] .theme-track-sun { color: #87958c; }
:root[data-theme="dark"] .theme-track-moon { color: #d7e3f4; }
:root[data-theme="dark"] .topbar-user .text-button { color: #bac7bf; }
:root[data-theme="dark"] .topbar-user .text-button:hover { color: #ffaaa0; background: #452d2b; }
:root[data-theme="dark"] .dashboard-heading h1,
:root[data-theme="dark"] .section-heading h2,
:root[data-theme="dark"] .sequence-branch h3 { color: #e5eee8; }
:root[data-theme="dark"] .dashboard-heading > div > p:last-child,
:root[data-theme="dark"] .section-heading p,
:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] .management-footnote { color: #a2b2a9; }
:root[data-theme="dark"] .metric-card,
:root[data-theme="dark"] .content-card,
:root[data-theme="dark"] .summary-card,
:root[data-theme="dark"] .branch-permission-list { border-color: #34463d; background: #1c2923; color: #e5eee8; }
:root[data-theme="dark"] .metric-card span,
:root[data-theme="dark"] .summary-card span,
:root[data-theme="dark"] .summary-card strong,
:root[data-theme="dark"] .branch-info strong,
:root[data-theme="dark"] .branch-permission-list legend,
:root[data-theme="dark"] .product-cell strong,
:root[data-theme="dark"] .import-help h2 { color: #dce8e0; }
:root[data-theme="dark"] .metric-card strong { color: #a6e4c2; }
:root[data-theme="dark"] .branch-info small,
:root[data-theme="dark"] .summary-card span,
:root[data-theme="dark"] .section-heading p,
:root[data-theme="dark"] .branch-permission-list > p,
:root[data-theme="dark"] .sequence-label small,
:root[data-theme="dark"] .product-cell small,
:root[data-theme="dark"] .table-subline,
:root[data-theme="dark"] .settings-note,
:root[data-theme="dark"] .color-field span { color: #a0b0a7; }
:root[data-theme="dark"] .branch-row,
:root[data-theme="dark"] .team-row,
:root[data-theme="dark"] .sequence-branch,
:root[data-theme="dark"] .sequence-row,
:root[data-theme="dark"] .category-row,
:root[data-theme="dark"] .pagination-wrap { border-color: #314239; }
:root[data-theme="dark"] .branch-row:hover .branch-info strong { color: #9be0bd; }
:root[data-theme="dark"] .branch-avatar,
:root[data-theme="dark"] .product-cell img,
:root[data-theme="dark"] .product-placeholder { border-color: #3a5143; color: #a5dfba; background: #26392d; }
:root[data-theme="dark"] .main-badge,
:root[data-theme="dark"] .status-active { color: #a7e4b7; background: #294333; }
:root[data-theme="dark"] .status-suspended { color: #f0c477; background: #493b25; }
:root[data-theme="dark"] .status-archived { color: #b2bcb6; background: #35413a; }
:root[data-theme="dark"] .button-secondary { border-color: #42564a; color: #d1dfd6; background: #24332b; }
:root[data-theme="dark"] .button-secondary:hover { border-color: #638b70; color: #b4ebca; background: #2c4033; }
:root[data-theme="dark"] .management-form .field-group input,
:root[data-theme="dark"] .management-form .field-group select,
:root[data-theme="dark"] .field-group input,
:root[data-theme="dark"] .field-group select,
:root[data-theme="dark"] .field-group textarea,
:root[data-theme="dark"] .settings-card textarea { border-color: #41564a; color: #e1ece5; background: #17231d; }
:root[data-theme="dark"] .field-group label,
:root[data-theme="dark"] .field-error,
:root[data-theme="dark"] .branch-checkboxes .check-row { color: #d0ddd5; }
:root[data-theme="dark"] .field-hint,
:root[data-theme="dark"] .label-note { color: #9aaba1; }
:root[data-theme="dark"] .settings-note { border-color: #374a3e; background: #202f27; }
:root[data-theme="dark"] .data-table { color: #c7d4cc; }
:root[data-theme="dark"] .data-table th { color: #b2c1b8; background: #24332b; }
:root[data-theme="dark"] .data-table td { border-color: #314239; }
:root[data-theme="dark"] .pagination-wrap a,
:root[data-theme="dark"] .pagination-wrap span[aria-current] { border-color: #41564a; color: #b4ddc4; background: #202f27; }
:root[data-theme="dark"] .settings-note,
:root[data-theme="dark"] .import-help,
:root[data-theme="dark"] .invite-existing p,
:root[data-theme="dark"] .team-role { color: #b4c2b9; }
:root[data-theme="dark"] .import-help code,
:root[data-theme="dark"] .verify-hint code,
:root[data-theme="dark"] .local-mail-note code { color: #d3e0d8; background: #2b3b32; }
:root[data-theme="dark"] .import-row-error { background: #382a28; }
:root[data-theme="dark"] .import-blocked { color: #efb2a9; }
:root[data-theme="dark"] .alert-success { border-color: #365e45; color: #b1e4bd; background: #20382a; }
:root[data-theme="dark"] .alert-error { border-color: #68423d; color: #ffc2b8; background: #392927; }
:root[data-theme="dark"] .dashboard-body .text-link,
:root[data-theme="dark"] .dashboard-body .table-action,
:root[data-theme="dark"] .dashboard-body .row-actions a { color: #9fdfba; }

@media (prefers-reduced-motion: reduce) {
    .theme-toggle, .theme-toggle-thumb { transition: none; }
}

/* Midnight Blue palette for the dark theme. */
:root[data-theme="dark"] {
    --green: #5ca7ff;
    --green-dark: #9bc9ff;
    --muted: #9fb0c8;
    --line: #2b3b54;
    --paper: #121f32;
    --wash: #0e1727;
}
:root[data-theme="dark"] body.dashboard-body { background: #0b1220; }
:root[data-theme="dark"] .topbar { border-color: #26364e; background: rgba(15, 25, 42, .97); }
:root[data-theme="dark"] .topbar-brand,
:root[data-theme="dark"] .topbar-brand:hover,
:root[data-theme="dark"] .dashboard-heading h1,
:root[data-theme="dark"] .section-heading h2,
:root[data-theme="dark"] .sequence-branch h3 { color: #e6eefb; }
:root[data-theme="dark"] .topbar-nav > a,
:root[data-theme="dark"] .nav-trigger,
:root[data-theme="dark"] .topbar-user { color: #aebdd2; }
:root[data-theme="dark"] .topbar-nav > a[aria-current="page"],
:root[data-theme="dark"] .nav-trigger-current,
:root[data-theme="dark"] .nav-menu.is-open .nav-trigger { color: #9bc9ff; }
:root[data-theme="dark"] .nav-chevron { border-color: #344966; color: #a9bad1; background: #1a2a40; }
:root[data-theme="dark"] .nav-menu.is-open .nav-chevron { color: #a8d2ff; background: #203752; }
:root[data-theme="dark"] .nav-dropdown { border-color: #2b3e59; background: #142238; }
:root[data-theme="dark"] .nav-dropdown a { color: #c2d0e4; }
:root[data-theme="dark"] .nav-dropdown a:hover,
:root[data-theme="dark"] .nav-dropdown a[aria-current="page"] { color: #a8d2ff; background: #20334d; }
:root[data-theme="dark"] .report-branch-field legend,
:root[data-theme="dark"] .report-branch-list label { color: #dce7f6; }
:root[data-theme="dark"] .theme-toggle { border-color: #344966; color: #afc0d7; background: #1a2a40; }
:root[data-theme="dark"] .topbar-user .theme-toggle:hover { background: #233752; }
:root[data-theme="dark"] .theme-toggle-thumb { color: #d8e6ff; background: #41658f; }
:root[data-theme="dark"] .theme-track-sun { color: #8192aa; }
:root[data-theme="dark"] .theme-track-moon { color: #d7e3f4; }
:root[data-theme="dark"] .topbar-user .text-button { color: #bac7d9; }
:root[data-theme="dark"] .dashboard-heading > div > p:last-child,
:root[data-theme="dark"] .section-heading p,
:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] .management-footnote { color: #9eafc7; }
:root[data-theme="dark"] .metric-card,
:root[data-theme="dark"] .content-card,
:root[data-theme="dark"] .summary-card,
:root[data-theme="dark"] .branch-permission-list { border-color: #2b3b54; background: #121f32; color: #e6eefb; }
:root[data-theme="dark"] .metric-card span,
:root[data-theme="dark"] .summary-card strong,
:root[data-theme="dark"] .branch-info strong,
:root[data-theme="dark"] .branch-permission-list legend,
:root[data-theme="dark"] .product-cell strong,
:root[data-theme="dark"] .import-help h2 { color: #dce7f6; }
:root[data-theme="dark"] .metric-card strong { color: #9bc9ff; }
:root[data-theme="dark"] .branch-info small,
:root[data-theme="dark"] .summary-card span,
:root[data-theme="dark"] .section-heading p,
:root[data-theme="dark"] .branch-permission-list > p,
:root[data-theme="dark"] .sequence-label small,
:root[data-theme="dark"] .product-cell small,
:root[data-theme="dark"] .table-subline,
:root[data-theme="dark"] .color-field span { color: #9eafc7; }
:root[data-theme="dark"] .branch-row,
:root[data-theme="dark"] .team-row,
:root[data-theme="dark"] .sequence-branch,
:root[data-theme="dark"] .sequence-row,
:root[data-theme="dark"] .category-row,
:root[data-theme="dark"] .pagination-wrap { border-color: #26364e; }
:root[data-theme="dark"] .branch-row:hover .branch-info strong,
:root[data-theme="dark"] .dashboard-body .text-link,
:root[data-theme="dark"] .dashboard-body .table-action,
:root[data-theme="dark"] .dashboard-body .row-actions a { color: #91c2ff; }
:root[data-theme="dark"] .branch-avatar,
:root[data-theme="dark"] .product-cell img,
:root[data-theme="dark"] .product-placeholder { border-color: #344966; color: #a8d2ff; background: #1a2b42; }
:root[data-theme="dark"] .main-badge,
:root[data-theme="dark"] .status-active { color: #a7d1ff; background: #1c3551; }
:root[data-theme="dark"] .status-suspended { color: #f0c477; background: #493b25; }
:root[data-theme="dark"] .status-archived { color: #b2bfd1; background: #2c394c; }
:root[data-theme="dark"] .button-secondary { border-color: #3a4e69; color: #d1deef; background: #192940; }
:root[data-theme="dark"] .button-secondary:hover { border-color: #5b83b3; color: #b4d7ff; background: #203752; }
:root[data-theme="dark"] .management-form .field-group input,
:root[data-theme="dark"] .management-form .field-group select,
:root[data-theme="dark"] .field-group input,
:root[data-theme="dark"] .field-group select,
:root[data-theme="dark"] .field-group textarea,
:root[data-theme="dark"] .settings-card textarea { border-color: #344966; color: #e1eaf7; background: #0f1a2b; }
:root[data-theme="dark"] .field-group label,
:root[data-theme="dark"] .field-error,
:root[data-theme="dark"] .branch-checkboxes .check-row { color: #d0dced; }
:root[data-theme="dark"] .field-hint,
:root[data-theme="dark"] .label-note { color: #9eafc7; }
:root[data-theme="dark"] .settings-note { border-color: #2c405b; color: #b4c4da; background: #17263b; }
:root[data-theme="dark"] .data-table { color: #c7d4e8; }
:root[data-theme="dark"] .data-table th { color: #b2c2d9; background: #192940; }
:root[data-theme="dark"] .data-table td { border-color: #26364e; }
:root[data-theme="dark"] .pagination-wrap a,
:root[data-theme="dark"] .pagination-wrap span[aria-current] { border-color: #344966; color: #b4d7ff; background: #17263b; }
:root[data-theme="dark"] .import-help,
:root[data-theme="dark"] .invite-existing p,
:root[data-theme="dark"] .team-role { color: #b4c4da; }
:root[data-theme="dark"] .import-help code,
:root[data-theme="dark"] .verify-hint code,
:root[data-theme="dark"] .local-mail-note code { color: #d3e0f1; background: #24344b; }
:root[data-theme="dark"] .import-row-error { background: #382a28; }
:root[data-theme="dark"] .import-blocked { color: #efb2a9; }
:root[data-theme="dark"] .alert-success { border-color: #31516f; color: #b1d7ff; background: #192e46; }
:root[data-theme="dark"] .pagination-summary { color: #9eafc7; }
:root[data-theme="dark"] .product-pagination .page-link,
:root[data-theme="dark"] .product-pagination .page-indicator { border-color: #344966; color: #b4d7ff; background: #17263b; }
:root[data-theme="dark"] .product-pagination .page-link:hover { border-color: #5b83b3; color: #c5e0ff; background: #203752; }
:root[data-theme="dark"] .product-pagination .page-link.is-disabled { color: #71829a; background: #121f32; }

@media (max-width: 520px) {
    .pagination-wrap { flex-wrap: wrap; justify-content: center; }
    .pagination-summary { width: 100%; text-align: center; }
}

.inventory-filters { display: grid; grid-template-columns: minmax(180px, 2fr) repeat(2, minmax(150px, 1fr)) auto; align-items: start; gap: 13px; margin-bottom: 18px; padding: 17px 20px; }
.inventory-adjustment, .inventory-movement-card { margin-top: 22px; }
.inventory-adjustment .section-heading { padding-bottom: 18px; }
.inventory-stock-card .data-table { min-width: 850px; }
.inventory-movement-card .data-table { min-width: 900px; }
.stock-quantity-in { color: #16805c !important; font-weight: 700; }
.stock-quantity-out { color: #bb5148 !important; font-weight: 700; }
.inventory-movement-heading { padding: 20px 22px 14px; }
.inventory-quick-adjust { min-height: 34px; padding: 0 11px; font-size: 10px; }
.inventory-adjust-dialog { width: min(100% - 28px, 520px); max-width: 520px; max-height: min(90vh, 760px); padding: 22px; overflow-y: auto; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--paper); box-shadow: 0 24px 70px rgba(0, 0, 0, .32); }
.inventory-adjust-dialog::backdrop { background: rgba(5, 12, 23, .68); backdrop-filter: blur(3px); }
.inventory-quick-adjust-form { display: grid; gap: 16px; }
.inventory-adjust-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.inventory-adjust-dialog-heading .eyebrow { margin: 0 0 5px; color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.inventory-adjust-dialog-heading h2 { margin: 0; font: 700 20px "Manrope", sans-serif; }
.inventory-adjust-close { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: transparent; font-size: 22px; line-height: 1; cursor: pointer; }
.inventory-adjust-current { display: grid; gap: 5px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--wash); }
.inventory-adjust-current span { color: var(--muted); font-size: 11px; }
.inventory-adjust-current span:first-child { color: var(--ink); font-size: 13px; font-weight: 700; }
.inventory-adjust-current strong { margin-top: 3px; color: var(--green); font-size: 12px; }
.inventory-quick-adjust-form .field-group small { color: var(--muted); font-size: 10px; }
.inventory-adjust-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 3px; }

@media (max-width: 920px) {
    .inventory-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inventory-filters > .filter-actions { margin-top: 0; }
}

@media (max-width: 520px) {
    .inventory-filters { grid-template-columns: 1fr; padding: 15px; }
    .inventory-movement-heading { padding-right: 15px; padding-left: 15px; }
    .inventory-adjust-dialog { padding: 18px; }
    .inventory-adjust-dialog-actions > * { flex: 1; }
}

:root[data-theme="dark"] .stock-quantity-in { color: #83d9b1 !important; }
:root[data-theme="dark"] .stock-quantity-out { color: #ffaaa0 !important; }

.customer-filters { display: grid; grid-template-columns: minmax(180px, 2fr) repeat(2, minmax(140px, 1fr)) auto; align-items: start; gap: 13px; margin-bottom: 18px; padding: 17px 20px; }
.customer-filters .filter-actions { margin-top: 24px; }
.customer-contact { display: block; }
.supplier-filters { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(150px, 1fr) auto; align-items: start; gap: 13px; margin-bottom: 18px; padding: 17px 20px; }
.supplier-filters .filter-actions { margin-top: 24px; }
.supplier-contact { display: block; }
.supplier-terms { max-width: 250px; white-space: normal !important; }
.quote-filters { display: grid; grid-template-columns: minmax(200px, 2fr) repeat(2, minmax(140px, 1fr)) auto; align-items: start; gap: 13px; margin-bottom: 18px; padding: 17px 20px; }
.quote-filters .filter-actions { margin-top: 24px; }
.status-draft { color: #697b8d; background: #eef2f5; }
.quote-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.quote-summary-grid .summary-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 10px; min-width: 0; min-height: 82px; margin: 0; padding: 15px 16px; }
.quote-summary-grid .summary-card strong { display: block; max-width: 100%; margin: 0; color: var(--ink); font-size: 14px; text-align: left; overflow-wrap: anywhere; }
.quote-detail-card { padding: 0; }
.quote-detail-heading { padding: 21px 22px 16px; }
.quote-grand-total { color: var(--green-dark); font-size: 20px; }
.quote-totals { width: min(100% - 44px, 340px); margin: 18px 22px 0 auto; }
.quote-totals p { display: flex; justify-content: space-between; gap: 20px; margin: 0; padding: 8px 0; }
.quote-grand-total-row { margin-top: 4px !important; padding-top: 13px !important; border-top: 1px solid var(--line); font-size: 16px; }
.quote-observations { margin: 20px 22px; }
.quote-observations h3, .quote-version-list h3, .quote-history h3 { margin: 0 0 8px; font-size: 13px; }
.quote-observations p { margin: 0; color: var(--muted); white-space: pre-line; }
.quote-actions-card { margin-top: 18px; }
.quote-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.quote-actions form { margin: 0; }
.quote-actions .button-secondary, .quote-actions .button-link { min-height: 39px; }
.quote-version-list, .quote-history { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.quote-version-list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.quote-version-list h3 { width: 100%; }
.quote-version-list a { display: inline-flex; gap: 8px; align-items: center; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); text-decoration: none; }
.quote-version-list a[aria-current="page"] { border-color: var(--green); }
.quote-version-list a span { color: var(--muted); font-size: 10px; }
.quote-history ol { display: grid; gap: 10px; margin: 0; padding-left: 20px; }
.quote-history li { padding-left: 2px; }
.quote-history li span, .quote-history li small { display: block; margin-top: 3px; color: var(--muted); }
.quote-form { gap: 20px; }
.quote-lines-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 3px; }
.quote-lines-heading h2 { margin: 0; font: 700 18px "Manrope", sans-serif; }
.quote-lines-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.quote-items { display: grid; gap: 12px; }
.quote-item-row { display: grid; grid-template-columns: minmax(200px, 2fr) minmax(90px, .75fr) minmax(130px, 1.15fr) minmax(100px, .8fr) minmax(120px, .9fr) 38px; align-items: end; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; }
.quote-item-row .field-group { min-width: 0; }
.quote-item-row .field-group label, .quote-line-total span { font-size: 10px; }
.quote-item-row .field-group input, .quote-item-row .field-group select { height: 39px; padding: 0 10px; font-size: 12px; }
.quote-item-row .quote-quantity, .quote-item-row .quote-unit-price-display, .quote-item-row .quote-discount { text-align: right; }
.quote-item-row .quote-line-total { gap: 7px; padding: 0; }
.quote-item-row .quote-line-total-input { width: 100%; min-width: 0; padding: 0 10px !important; font-size: 12px; font-weight: 700; text-align: right; cursor: default; }

/* Purchase orders */
.purchase-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.purchase-form-grid .field-group small { min-height: 14px; }
.purchase-lines-heading, .section-heading, .receipt-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.purchase-lines-heading { margin: 28px 0 14px; padding-top: 22px; border-top: 1px solid var(--line); }
.purchase-lines-heading h2, .section-heading h2, .purchase-actions-card h2 { margin: 0; font-size: 17px; }
.purchase-lines-heading p, .section-heading p, .purchase-actions-card p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.purchase-lines { display: grid; gap: 10px; }
.purchase-item-row { display: grid; grid-template-columns: minmax(210px, 2fr) minmax(100px, .72fr) minmax(130px, .95fr) minmax(130px, .9fr) 38px; align-items: end; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; }
.purchase-item-row .field-group { min-width: 0; }
.purchase-item-row .field-group label { font-size: 10px; }
.purchase-item-row .field-group input { height: 39px; padding: 0 10px; font-size: 12px; }
.purchase-line-total input { cursor: default; font-weight: 700; }
.purchase-total-card { display: flex; justify-content: flex-end; align-items: center; gap: 18px; margin: 18px 0; padding: 16px 20px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.purchase-total-card strong { color: var(--ink); font-size: 19px; }
.purchase-observations, .receipt-observations { margin-top: 20px; }
.purchase-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.purchase-summary > div { display: grid; align-content: start; gap: 6px; min-height: 72px; }
.purchase-summary span:not(.status-badge), .purchase-summary small { color: var(--muted); font-size: 11px; }
.purchase-summary strong { color: var(--text); font-size: 14px; }
.purchase-detail-card, .purchase-receipts { margin-top: 20px; }
.purchase-detail-card .section-heading, .purchase-receipts .section-heading { padding: 3px 0 16px; }
.purchase-notes { padding: 16px 0 0; color: var(--muted); font-size: 12px; }
.purchase-notes p { margin: 6px 0 0; white-space: pre-line; }
.receipt-card { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.receipt-heading { margin-bottom: 8px; }
.receipt-heading > div { display: grid; gap: 4px; }
.receipt-heading small, .receipt-heading > span { color: var(--muted); font-size: 11px; }
.purchase-actions-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; }
.purchase-action-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.purchase-action-buttons form { margin: 0; }
.purchase-cancel:hover { color: #ff8585; border-color: #a44452; }
.receipt-form .section-heading { margin-bottom: 12px; }
.receipt-quantity { width: 140px; }
@media (max-width: 780px) {
    .purchase-form-grid, .purchase-summary { grid-template-columns: 1fr 1fr; }
    .purchase-item-row { grid-template-columns: 1fr 1fr; padding: 11px; }
    .purchase-item-product { grid-column: 1 / -1; }
    .purchase-actions-card { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 520px) {
    .purchase-form-grid, .purchase-summary { grid-template-columns: 1fr; }
    .purchase-lines-heading { align-items: flex-start; flex-direction: column; }
}

/* Responsive layout refinements for phone and tablet screens */
@media (max-width: 1024px) {
    .topbar { flex-wrap: wrap; gap: 8px 18px; padding-top: 8px; }
    .topbar-nav { order: 3; width: 100%; height: auto; min-height: 42px; flex-wrap: wrap; align-content: center; gap: 0 14px; }
    .topbar-nav > a, .topbar-nav .nav-trigger { min-height: 40px; height: 40px; }
}

@media (max-width: 800px) {
    .page-shell { display: block; }
    .brand-panel { min-height: auto; padding: 22px 24px 26px; }
    .brand-copy { margin: 34px 0 22px; padding: 0; }
    .brand-copy h1 { margin: 15px 0 10px; font-size: 35px; letter-spacing: -1.5px; }
    .brand-description { font-size: 13px; }
    .brand-note { font-size: 11px; }
    .brand-orbit { right: -245px; bottom: -270px; }
}

@media (max-width: 720px) {
    .topbar { gap: 8px 14px; padding: 10px 12px 0; }
    .topbar-nav { order: 3; width: 100%; height: auto; min-height: 42px; flex-wrap: wrap; align-content: center; gap: 0 12px; }
    .topbar-nav > a, .topbar-nav .nav-trigger { min-height: 40px; height: 40px; font-size: 11px; }
    .topbar-user { gap: 9px; font-size: 11px; }
    .topbar-user .text-button { padding: 8px 6px; }
    .dashboard-main { width: calc(100% - 30px); max-width: none; padding: 27px 0 48px; }
    .dashboard-heading { flex-wrap: wrap; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
    .dashboard-heading h1 { font-size: clamp(23px, 5vw, 28px); overflow-wrap: anywhere; }
    .heading-actions { width: 100%; justify-content: flex-start; }
    .management-grid, .settings-card .management-grid { grid-template-columns: 1fr; }
    .content-card { padding: 18px; }
    .table-card { padding: 0; }
    .inventory-filters, .product-filters, .quote-filters, .customer-filters, .supplier-filters, .purchase-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inventory-filters > .filter-actions, .product-filters > .filter-actions, .quote-filters > .filter-actions, .customer-filters > .filter-actions, .supplier-filters > .filter-actions, .purchase-filters > .filter-actions { grid-column: 1 / -1; justify-content: flex-end; margin-top: 0; }
    .pos-layout { grid-template-columns: 1fr; }
    .dashboard-heading .heading-actions .button-link, .dashboard-heading .heading-actions .button-secondary { min-height: 42px; }
    .form-actions { flex-wrap: wrap; }
    .data-table th, .data-table td { padding: 11px 12px; }
}

@media (max-width: 520px) {
    .topbar { gap: 8px; }
    .topbar-brand { gap: 7px; font-size: 17px; }
    .topbar-brand .brand-mark { width: 29px; height: 29px; }
    .topbar-nav { justify-content: flex-start; gap: 0 8px; }
    .topbar-nav > a, .topbar-nav .nav-trigger { font-size: 10px; }
    .topbar-user { gap: 7px; margin-left: auto; }
    .topbar-user > span { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .theme-toggle { transform: scale(.92); transform-origin: right center; }
    .dashboard-main { width: calc(100% - 24px); padding-top: 22px; }
    .dashboard-heading { display: flex; }
    .dashboard-heading > div:first-child { min-width: 0; }
    .dashboard-heading > div:first-child > p:last-child { line-height: 1.5; }
    .dashboard-heading .heading-actions { width: 100%; }
    .heading-actions .button-link, .heading-actions .button-secondary { flex: 1 1 auto; }
    .content-card { padding: 15px; border-radius: 10px; }
    .table-card { padding: 0; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .metric-card { min-width: 0; }
    .inventory-filters, .product-filters, .quote-filters, .customer-filters, .supplier-filters, .purchase-filters { grid-template-columns: 1fr; padding: 15px; }
    .inventory-filters > .filter-actions, .product-filters > .filter-actions, .quote-filters > .filter-actions, .customer-filters > .filter-actions, .supplier-filters > .filter-actions, .purchase-filters > .filter-actions { grid-column: auto; justify-content: stretch; }
    .filter-actions > * { flex: 1 1 0; }
    .management-grid, .field-row, .category-row { grid-template-columns: 1fr; }
    .form-actions { display: grid; grid-template-columns: 1fr; }
    .form-actions > * { width: 100%; min-height: 44px; }
    .section-heading { align-items: flex-start; }
    .quote-total-card, .purchase-total-card { width: 100%; justify-content: space-between; gap: 10px; padding: 13px; }
    .quote-total-card strong, .purchase-total-card strong { font-size: 16px; }
    .purchase-action-buttons { width: 100%; }
    .purchase-action-buttons > *, .purchase-action-buttons form, .purchase-action-buttons form button { flex: 1 1 auto; }
    .pos-cart-row { grid-template-columns: minmax(0, 1fr) auto 38px; gap: 8px; }
    .pos-cart-row > .quote-remove { grid-column: 3; grid-row: 1 / span 2; }
    .pagination-wrap { align-items: flex-start; }
    .product-pagination { max-width: 100%; flex-wrap: wrap; }
    .nav-dropdown { max-width: min(88vw, 280px); }
    .nav-dropdown a { white-space: normal; }
    .field-group input, .field-group select, .field-group textarea { font-size: 16px; }
    .button-link, .button-secondary, .text-button { min-height: 42px; }
}

@media (max-width: 360px) {
    .topbar-user { gap: 3px; }
    .topbar-user > span { max-width: 78px; }
    .topbar-nav { gap: 0 5px; }
    .topbar-nav > a, .topbar-nav .nav-trigger { font-size: 9px; }
    .topbar-nav .nav-trigger { gap: 4px; }
    .topbar-nav .nav-chevron { width: 16px; height: 16px; }
    .metric-grid { grid-template-columns: 1fr; }
    .purchase-item-row, .quote-item-row, .sale-payment-row { grid-template-columns: 1fr; }
    .purchase-item-product, .quote-item-product { grid-column: auto; }
}
.quote-percent-field { position: relative; }
.quote-percent-field input { padding-right: 30px !important; }
.quote-percent-field > span { position: absolute; top: 50%; right: 12px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.quote-product-picker { position: relative; }
.quote-product-search { width: 100%; }
.quote-product-search::placeholder { color: var(--muted); }
.quote-product-results { position: absolute; z-index: 30; top: calc(100% + 5px); left: 0; width: 100%; max-height: 280px; overflow-y: auto; padding: 5px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 12px 28px rgba(0, 0, 0, .18); }
.quote-product-results[hidden] { display: none; }
.quote-product-option { display: grid; width: 100%; gap: 4px; padding: 9px 10px; border: 0; border-radius: 6px; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.quote-product-option:hover, .quote-product-option:focus-visible { outline: none; background: var(--wash); }
.quote-product-option strong { font-size: 12px; }
.quote-product-option span, .quote-product-empty { margin: 0; color: #9eafc7; font-size: 10px; }
.quote-line-total { display: grid; gap: 7px; min-width: 0; padding-bottom: 10px; }
.quote-line-total strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.quote-remove { display: grid; width: 38px; height: 39px; place-items: center; border: 1px solid #ead8d8; border-radius: 8px; color: #a95050; background: transparent; font-size: 20px; cursor: pointer; }
.quote-remove:hover { border-color: #d58d8d; background: #fff4f4; }
.quote-total-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-left: auto; padding: 15px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--wash); }
.quote-total-card strong { color: var(--green-dark); font-size: 18px; }
.quote-currency-value { display: flex; min-height: 42px; align-items: center; padding: 0 13px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--wash); }
.sale-payment-form { display: grid; gap: 14px; }
.sale-payment-rows { display: grid; gap: 10px; }
.sale-payment-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(140px, .8fr) minmax(180px, 1.2fr) 38px; align-items: end; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; }
.sale-void-form { display: flex; align-items: end; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.sale-void-form label { color: var(--muted); font-size: 12px; font-weight: 700; }
.sale-void-form input { min-width: 0; height: 42px; flex: 1; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--wash); font: 13px "DM Sans", sans-serif; }
.button-danger { min-height: 40px; padding: 0 14px; border: 1px solid #98585e; border-radius: 8px; color: #ffd5d6; background: #482b35; font: 700 12px "DM Sans", sans-serif; cursor: pointer; }
.button-danger:hover { border-color: #c7797e; background: #60323d; }
.sale-return-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.sale-return-form { display: grid; gap: 15px; }
.sale-return-form .sale-return-quantity { width: 100px; height: 38px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--wash); }
.sale-restock-choice { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; cursor: pointer; }
.sale-restock-choice input { width: 16px; height: 16px; accent-color: var(--green); cursor: pointer; }
.sale-return-fields { max-width: 680px; }
.sale-return-history { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.sale-return-history h3 { margin: 0 0 8px; font-size: 13px; }
.sale-return-history p { margin: 6px 0; color: var(--muted); font-size: 12px; }
.pos-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; gap: 18px; }
.pos-main, .pos-checkout { display: grid; gap: 18px; }
.pos-context { margin-bottom: 2px; }
.pos-search-group { position: relative; }
.pos-product-results { top: calc(100% + 3px); }
.pos-cart-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 3px; border-top: 1px solid var(--line); }
.pos-cart-heading h2, .pos-checkout h2 { margin: 0; font: 700 18px "Manrope", sans-serif; }
.pos-cart-heading span { color: var(--muted); font-size: 12px; }
.pos-cart { display: grid; gap: 9px; }
.pos-cart-row { display: grid; grid-template-columns: minmax(150px, 1fr) 130px minmax(110px, .55fr) 38px; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; }
.pos-product-name { display: grid; gap: 4px; min-width: 0; }
.pos-product-name strong { overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.pos-product-name small { color: var(--muted); font-size: 11px; }
.pos-quantity-control { display: flex; align-items: center; justify-content: center; gap: 5px; }
.pos-quantity-control button { width: 30px; height: 32px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--wash); font: 700 15px "DM Sans", sans-serif; cursor: pointer; }
.pos-quantity-control input { width: 52px; height: 32px; padding: 0 4px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--wash); text-align: center; }
.pos-line-price { display: grid; gap: 3px; text-align: right; }
.pos-line-price span { color: var(--muted); font-size: 10px; }
.pos-line-price strong { color: var(--ink); font-size: 13px; }
.pos-total { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.pos-total span { color: var(--muted); font-size: 13px; }
.pos-total strong { color: var(--green-dark); font: 800 20px "Manrope", sans-serif; }
.pos-charge-button { width: 100%; justify-content: center; min-height: 48px; font-size: 15px; }
.pos-charge-button:disabled { opacity: .45; cursor: not-allowed; }

@media (max-width: 920px) {
    .quote-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quote-filters > .filter-actions { grid-column: 1 / -1; justify-content: flex-end; margin-top: 0; }
    .quote-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quote-item-row { grid-template-columns: minmax(0, 2fr) repeat(2, minmax(100px, 1fr)) 38px; }
    .quote-item-product { grid-column: 1 / -1; }
    .quote-line-total { padding-bottom: 10px; }
}

@media (max-width: 520px) {
    .quote-filters { grid-template-columns: 1fr; padding: 15px; }
    .quote-filters > .filter-actions { grid-column: auto; justify-content: stretch; }
    .quote-filters .filter-actions > * { flex: 1; }
    .quote-summary-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .quote-item-row { grid-template-columns: 1fr 1fr; padding: 11px; }
    .quote-item-product { grid-column: 1 / -1; }
    .quote-remove { width: 100%; }
    .quote-lines-heading { align-items: flex-start; flex-direction: column; }
    .quote-total-card { width: 100%; }
    .sale-payment-row { grid-template-columns: 1fr 1fr; }
    .sale-void-form { align-items: stretch; flex-direction: column; }
    .sale-return-fields { grid-template-columns: 1fr; }
    .pos-layout { grid-template-columns: 1fr; }
    .pos-cart-row { grid-template-columns: minmax(130px, 1fr) 120px 38px; }
    .pos-line-price { grid-column: 1; text-align: left; }
    .pos-cart-row > .quote-remove { grid-column: 3; grid-row: 1 / span 2; }
    .quote-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .quote-actions form, .quote-actions button { width: 100%; }
}

:root[data-theme="dark"] .status-draft { color: #b6c5d8; background: #2c394c; }
:root[data-theme="dark"] .quote-grand-total { color: #a8d2ff; }
:root[data-theme="dark"] .quote-version-list a { border-color: #344966; color: #dbe6f5; }
:root[data-theme="dark"] .quote-total-card,
:root[data-theme="dark"] .quote-currency-value { background: #0f1a2b; }
:root[data-theme="dark"] .quote-remove { border-color: #684548; color: #ffaaa0; }
:root[data-theme="dark"] .quote-remove:hover { border-color: #a15e61; background: #36272c; }
:root[data-theme="dark"] .button-danger { border-color: #684548; color: #ffc7cb; background: #382731; }
:root[data-theme="dark"] .sale-return-form .sale-return-quantity { border-color: #344966; color: #e1eaf7; background: #0f1a2b; }
:root[data-theme="dark"] .quote-product-results { border-color: #344966; background: #142238; }
:root[data-theme="dark"] .quote-product-option { color: #e0eaf8; }
:root[data-theme="dark"] .quote-product-option:hover,
:root[data-theme="dark"] .quote-product-option:focus-visible { background: #203752; }
:root[data-theme="dark"] .quote-product-option span,
:root[data-theme="dark"] .quote-product-empty { color: #9eafc7; }

@media (max-width: 920px) {
    .customer-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .customer-filters > .filter-actions { grid-column: 1 / -1; justify-content: flex-end; margin-top: 0; }
    .supplier-filters { grid-template-columns: minmax(180px, 2fr) minmax(140px, 1fr); }
    .supplier-filters > .filter-actions { grid-column: 1 / -1; justify-content: flex-end; margin-top: 0; }
}

@media (max-width: 520px) {
    .customer-filters { grid-template-columns: 1fr; padding: 15px; }
    .customer-filters > .filter-actions { grid-column: auto; justify-content: stretch; }
    .customer-filters .filter-actions > * { flex: 1; }
    .supplier-filters { grid-template-columns: 1fr; padding: 15px; }
    .supplier-filters > .filter-actions { grid-column: auto; justify-content: stretch; }
    .supplier-filters .filter-actions > * { flex: 1; }
}

.purchase-filters { display: grid; grid-template-columns: minmax(250px, 2fr) minmax(170px, 1fr) minmax(170px, 1fr) auto; align-items: start; gap: 13px; margin-bottom: 18px; padding: 17px 20px; }
.purchase-filters .filter-actions { margin-top: 24px; }

@media (max-width: 920px) {
    .purchase-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .purchase-filters > .filter-actions { grid-column: 1 / -1; justify-content: flex-end; margin-top: 0; }
}

@media (max-width: 520px) {
    .purchase-filters { grid-template-columns: 1fr; padding: 15px; }
    .purchase-filters > .filter-actions { grid-column: auto; justify-content: stretch; }
    .purchase-filters .filter-actions > * { flex: 1; }
}

/* Interbranch stock transfers */
.transfer-filters { display: grid; grid-template-columns: minmax(240px, 2fr) minmax(160px, 1fr) minmax(180px, 1.2fr) auto; align-items: start; gap: 13px; margin-bottom: 18px; padding: 17px 20px; }
.transfer-filters .filter-actions { margin-top: 24px; }
.transfer-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.transfer-form-grid .field-group small { min-height: 14px; color: var(--muted); font-size: 10px; }
.transfer-lines-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 26px 0 14px; padding-top: 20px; border-top: 1px solid var(--line); }
.transfer-lines-heading h2, .transfer-actions-card h2 { margin: 0; font-size: 17px; }
.transfer-lines-heading p, .transfer-actions-card p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.transfer-lines { display: grid; gap: 10px; }
.transfer-item-row { display: grid; grid-template-columns: minmax(240px, 2fr) minmax(150px, 1fr) minmax(150px, .9fr) 38px; align-items: end; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; }
.transfer-item-row .field-group { min-width: 0; }
.transfer-item-row .field-group label { font-size: 10px; }
.transfer-item-row .field-group input { height: 39px; padding: 0 10px; font-size: 12px; }
.transfer-stock-label { display: grid; gap: 8px; min-height: 59px; align-content: end; padding: 0 0 10px; }
.transfer-stock-label span { color: var(--muted); font-size: 10px; }
.transfer-stock-label strong { color: var(--ink); font-size: 12px; }
.transfer-form-notes { margin-top: 22px; }
.transfer-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.transfer-summary > div { display: grid; align-content: start; gap: 6px; min-height: 70px; }
.transfer-summary span:not(.status-badge), .transfer-summary small { color: var(--muted); font-size: 11px; }
.transfer-summary strong { color: var(--ink); font-size: 13px; }
.transfer-detail-card, .transfer-receipts { margin-top: 20px; }
.transfer-detail-card .section-heading, .transfer-receipts .section-heading { padding: 3px 0 16px; }
.transfer-arrow { display: inline-block; margin: 0 7px; color: var(--green); }
.transfer-notes { padding-top: 14px; color: var(--muted); font-size: 12px; }
.transfer-notes p { margin: 6px 0; }
.transfer-actions-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; }
.transfer-action-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.transfer-action-buttons form { margin: 0; }
.transfer-cancel:hover { color: #ffaaa0; border-color: #94545a; }
.transfer-receipt-card { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.transfer-receipt-card header { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 10px; }
.transfer-receipt-card header > div { display: grid; align-content: start; gap: 4px; }
.transfer-receipt-card header small, .transfer-receipt-card header p { margin: 0; color: var(--muted); font-size: 11px; }
.transfer-receive-form .section-heading { margin-bottom: 12px; }
.transfer-receive-table input { width: 120px; min-height: 39px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--wash); }
.transfer-receive-notes { margin-top: 20px; }
.transfer-requirement-alert { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: -8px; }
.transfer-requirement-alert a { color: inherit; font-weight: 700; text-underline-offset: 3px; }
.transfer-disabled-action { cursor: not-allowed; opacity: .72; }
@media (max-width: 920px) {
    .transfer-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .transfer-filters > .filter-actions { grid-column: 1 / -1; justify-content: flex-end; margin-top: 0; }
}
@media (max-width: 720px) {
    .transfer-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .transfer-item-row { grid-template-columns: minmax(0, 1fr) minmax(130px, .7fr); }
    .transfer-item-product { grid-column: 1 / -1; }
    .transfer-stock-label { min-height: 40px; align-content: center; padding: 0; }
    .transfer-item-row > .quote-remove { justify-self: end; }
    .transfer-actions-card { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 520px) {
    .transfer-filters { grid-template-columns: 1fr; padding: 15px; }
    .transfer-filters > .filter-actions { grid-column: auto; justify-content: stretch; }
    .transfer-filters .filter-actions > * { flex: 1; }
    .transfer-form-grid, .transfer-summary { grid-template-columns: 1fr; }
    .transfer-lines-heading { align-items: flex-start; flex-direction: column; }
    .transfer-action-buttons, .transfer-action-buttons form, .transfer-action-buttons a, .transfer-action-buttons button { width: 100%; }
    .transfer-receipt-card header { flex-direction: column; }
    .transfer-receive-table input { width: 100px; }
}
.cash-branch-select { display: flex; align-items: flex-end; min-width: 220px; margin: 0; }
.cash-branch-select .field-group { width: 100%; }
.cash-branch-select label, .cash-form-grid label, .cash-open-form label, .cash-register-form label { font-weight: 700; }
.cash-session-card, .cash-action-grid, .cash-ledger-card, .cash-open-card, .cash-register-admin, .cash-history { margin-bottom: 20px; }
.cash-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.cash-section-heading h2 { margin: 12px 0 4px; }
.cash-section-heading p, .cash-action-grid > .content-card > p, .cash-open-card > p { color: var(--muted); margin: 0; }
.cash-totals-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cash-totals-grid article { display: grid; gap: 7px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.cash-totals-grid article > span { color: var(--muted); font-size: 13px; }
.cash-totals-grid article strong { font-size: 20px; }
.cash-totals-grid article small { color: var(--muted); font-size: 11px; }
.cash-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.cash-action-grid h2, .cash-ledger-card h2, .cash-register-admin h2, .cash-history h2 { margin: 0 0 6px; }
.cash-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.cash-form-grid .field-group, .cash-open-form .field-group, .cash-register-form .field-group { display: grid; align-content: start; gap: 7px; }
.cash-form-grid .cash-notes-field { grid-column: 1 / -1; }
.cash-form-grid button { justify-self: start; }
.cash-open-form { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(220px, 1fr) auto; align-items: end; gap: 16px; margin-top: 18px; }
.cash-register-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.cash-register-list span { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; }
.cash-register-form { display: flex; align-items: end; gap: 12px; max-width: 550px; }
.cash-register-form .field-group { flex: 1; }
.cash-reopen-form { display: flex; gap: 8px; margin-top: 8px; }
.cash-reopen-form input { min-width: 220px; }
.cash-negative { color: #e28383; }
.report-filters { margin-bottom: 22px; }
.report-filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.report-branch-field { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 0; border: 0; }
.report-branch-field legend { margin-bottom: 8px; color: var(--ink); font-size: 12px; font-weight: 700; }
.report-branch-list { display: flex; flex-wrap: wrap; gap: 8px; }
.report-branch-list label { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-size: 11px; cursor: pointer; }
.report-branch-list input { width: 14px; height: 14px; margin: 0; accent-color: var(--green); }
.report-filters .filter-actions { margin-top: 16px; }
.report-metric-grid { margin-bottom: 22px; }
.report-charts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
.report-chart-card { min-width: 0; }
.report-chart-card .section-heading { min-height: 58px; padding-bottom: 10px; }
.report-chart-card .section-heading h2 { margin: 0 0 4px; }
.report-chart-card .section-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.chart-legend { display: flex; gap: 16px; margin: 0 0 4px 58px; color: var(--muted); font-size: 10px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { display: inline-block; width: 16px; height: 3px; border-radius: 3px; }
.chart-legend-gross { background: #57a7ff; }
.chart-legend-net { background: #40c795; }
.report-line-chart, .report-payment-chart { display: block; width: 100%; overflow: visible; }
.report-line-chart { height: 270px; }
.report-payment-chart { height: auto; min-height: 260px; }
.chart-grid-line { stroke: var(--line); stroke-width: 1; }
.chart-axis-label { fill: var(--muted); font: 10px "DM Sans", sans-serif; }
.chart-series-gross, .chart-series-net { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-series-gross { stroke: #57a7ff; }
.chart-series-net { stroke: #40c795; }
.chart-point-gross, .chart-point-net { stroke: var(--paper); stroke-width: 2; }
.chart-point-gross { fill: #57a7ff; }
.chart-point-net { fill: #40c795; }
.chart-bar-positive { fill: #57a7ff; }
.chart-bar-negative { fill: #ef8b8b; }
.report-secondary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
.report-secondary-grid article { display: grid; gap: 8px; }
.report-secondary-grid span { color: var(--muted); font-size: 12px; }
.report-secondary-grid strong { font: 700 22px "Manrope", sans-serif; }
.report-secondary-grid small, .report-updated { color: var(--muted); font-size: 11px; }
.report-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.report-detail-card { min-width: 0; }
.report-detail-card .section-heading { padding-bottom: 12px; }
.report-detail-card .section-heading h2 { margin: 0 0 4px; }
.report-updated { margin: 12px 2px 22px; }
@media (max-width: 800px) {
    .cash-action-grid { grid-template-columns: 1fr; }
    .cash-totals-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-charts-grid { grid-template-columns: 1fr; }
    .report-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .cash-branch-select, .cash-open-form { width: 100%; }
    .cash-section-heading { align-items: flex-start; flex-direction: column; }
    .cash-totals-grid, .cash-form-grid, .cash-open-form { grid-template-columns: 1fr; }
    .report-filter-grid, .report-secondary-grid { grid-template-columns: 1fr; }
    .cash-register-form, .cash-reopen-form { align-items: stretch; flex-direction: column; }
    .cash-register-form .button-secondary, .cash-reopen-form .button-secondary { width: 100%; }
}

/* Centro de notificaciones */
.notification-center-link { position: relative; display: inline-flex; align-items: center; gap: 7px; color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 700; }
.notification-center-link svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notification-center-link:hover { color: var(--green); }
.notification-center-link b { display: grid; min-width: 17px; height: 17px; place-items: center; padding: 0 4px; border-radius: 999px; color: #fff; background: #e45d63; font-size: 9px; line-height: 1; }
.notification-filters { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(180px, .8fr) auto; align-items: end; gap: 14px; margin-bottom: 20px; }
.notification-filters .field-group { min-width: 0; }
.notification-filters .filter-actions { display: flex; align-items: center; gap: 8px; }
.notification-list { display: grid; gap: 12px; }
.notification-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 16px; }
.notification-unread { border-color: color-mix(in srgb, var(--green) 48%, var(--line)); box-shadow: inset 3px 0 var(--green); }
.notification-priority { display: inline-flex; align-items: center; justify-content: center; padding: 5px 9px; border-radius: 999px; color: var(--muted); background: var(--soft); font-size: 10px; font-weight: 700; white-space: nowrap; }
.notification-priority-high { color: #a74b22; background: #fff0df; }
.notification-content { min-width: 0; }
.notification-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; color: var(--muted); font-size: 11px; }
.notification-content h2 { margin: 8px 0 4px; font: 700 16px "Manrope", sans-serif; }
.notification-content p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.notification-email-error { display: inline-block; margin-top: 8px; color: #d46d6d; }
.notification-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.notification-actions .button-secondary, .notification-resolve { min-height: 36px; padding: 0 11px; font-size: 11px; }
.notification-resolve { border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; font: inherit; font-size: 11px; }
.notification-resolve:hover { color: var(--green); border-color: var(--green); }
.notification-empty { display: grid; justify-items: center; text-align: center; padding: 42px 20px; }
.notification-empty h2 { margin: 10px 0 4px; font: 700 18px "Manrope", sans-serif; }
.notification-empty p { margin: 0; color: var(--muted); font-size: 13px; }
.notification-empty-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; color: var(--green); background: color-mix(in srgb, var(--green) 13%, var(--paper)); font-size: 20px; font-weight: 700; }
.notification-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.notification-pagination > p { margin: 0; color: var(--muted); font-size: 11px; }
.notification-preferences-form { display: grid; gap: 16px; }
.notification-preference-card .section-heading { margin-bottom: 12px; }
.notification-preference-card .section-heading h2 { margin: 0 0 4px; font-size: 17px; }
.notification-preference-card .section-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.notification-preference-table { min-width: 520px; }
.notification-preference-table th:not(:first-child), .notification-preference-table td:not(:first-child) { width: 115px; text-align: center; }
.notification-preference-table td:first-child strong, .notification-preference-table .table-subline { display: block; }
.notification-preference-table .table-subline { margin-top: 3px; color: var(--muted); font-size: 11px; }
.notification-channel-toggle { display: inline-flex; align-items: center; justify-content: center; }
.notification-channel-toggle input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--green); cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:root[data-theme="dark"] .notification-priority-high { color: #ffd0a4; background: #493321; }
:root[data-theme="dark"] .notification-empty-icon { background: #1b3451; }
:root[data-theme="dark"] .notification-unread { border-color: #365b82; box-shadow: inset 3px 0 #57a7ff; }
@media (max-width: 800px) {
    .notification-card { grid-template-columns: auto minmax(0, 1fr); }
    .notification-actions { grid-column: 2; justify-content: flex-start; }
}
@media (max-width: 560px) {
    .notification-filters { grid-template-columns: 1fr; }
    .notification-filters .filter-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .notification-filters .filter-actions > * { justify-content: center; }
    .notification-card { grid-template-columns: 1fr; gap: 10px; }
    .notification-actions { grid-column: 1; }
    .notification-pagination { align-items: stretch; flex-direction: column; }
    .notification-pagination .product-pagination { justify-content: center; flex-wrap: wrap; }
}

/* Planes y suscripciones */
.subscription-overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .9fr); gap: 18px; margin-bottom: 20px; }
.subscription-plan-card, .subscription-usage-card { min-width: 0; }
.subscription-plan-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.subscription-plan-top .eyebrow { margin: 0 0 5px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.subscription-plan-top h2 { margin: 0; font: 700 22px "Manrope", sans-serif; }
.subscription-plan-card > p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.subscription-status-trial { color: #2d7556; background: #e8f5ed; }
.subscription-status-active { color: #197450; background: #e5f6ed; }
.subscription-status-past_due { color: #956514; background: #fff4d6; }
.subscription-status-suspended, .subscription-status-cancelled { color: #a43d42; background: #ffe8e8; }
.subscription-trial-count { display: flex; align-items: baseline; gap: 9px; margin: 20px 0 3px; }
.subscription-trial-count strong { font: 800 32px "Manrope", sans-serif; color: var(--green); }
.subscription-trial-count span, .subscription-date-note { color: var(--muted); font-size: 12px; }
.subscription-date-note { margin: 0 0 18px; }
.subscription-billing-note { display: grid; gap: 4px; margin-top: 18px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.subscription-billing-note strong { font-size: 12px; }
.subscription-billing-note span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.subscription-usage-card .section-heading { margin: 0 0 8px; }
.subscription-usage-card .section-heading h2 { margin: 0 0 4px; font-size: 17px; }
.subscription-usage-card .section-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.subscription-usage-row { display: grid; gap: 8px; margin-top: 18px; }
.subscription-usage-row > div:first-child { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.subscription-usage-row > div:first-child span { color: var(--muted); }
.subscription-usage-row > div:first-child strong { font-size: 11px; white-space: nowrap; }
.subscription-progress { height: 7px; overflow: hidden; border-radius: 999px; background: var(--soft); }
.subscription-progress span { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width .2s ease; }
.subscription-data-note h2 { margin: 0 0 6px; font-size: 15px; }
.subscription-data-note p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
:root[data-theme="dark"] .subscription-status-trial, :root[data-theme="dark"] .subscription-status-active { color: #a8e3c4; background: #183c34; }
:root[data-theme="dark"] .subscription-status-past_due { color: #f2d18b; background: #493a24; }
:root[data-theme="dark"] .subscription-status-suspended, :root[data-theme="dark"] .subscription-status-cancelled { color: #ffb0b0; background: #482b34; }
:root[data-theme="dark"] .subscription-billing-note { background: #17263b; }
:root[data-theme="dark"] .subscription-progress { background: #253650; }
@media (max-width: 800px) { .subscription-overview-grid { grid-template-columns: 1fr; } }
.subscription-catalog-section { margin: 24px 0 20px; }
.subscription-catalog-section > .section-heading { margin-bottom: 13px; }
.subscription-catalog-section > .section-heading h2 { margin: 0 0 4px; font: 700 20px "Manrope", sans-serif; }
.subscription-catalog-section > .section-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.subscription-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 15px; }
.subscription-tier-card { position: relative; display: flex; min-width: 0; flex-direction: column; padding: 22px; }
.subscription-tier-featured { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.subscription-recommended { position: absolute; top: -11px; right: 17px; padding: 5px 9px; border-radius: 999px; color: #fff; background: var(--green); font-size: 9px; font-weight: 800; letter-spacing: .03em; }
.subscription-tier-name { margin: 0; font: 700 19px "Manrope", sans-serif; }
.subscription-tier-description { min-height: 35px; margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.subscription-tier-price { margin: 16px 0; font: 800 28px "Manrope", sans-serif; white-space: nowrap; }
.subscription-tier-price > span { color: var(--muted); font: 700 11px "DM Sans", sans-serif; vertical-align: middle; }
.subscription-tier-price small { color: var(--muted); font: 500 11px "DM Sans", sans-serif; }
.subscription-tier-limits, .subscription-tier-includes ul { display: grid; gap: 8px; margin: 0; padding: 14px 0; list-style: none; border-top: 1px solid var(--line); }
.subscription-tier-limits li, .subscription-tier-includes li { position: relative; padding-left: 18px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.subscription-tier-limits li::before, .subscription-tier-includes li::before { position: absolute; left: 0; color: var(--green); content: "✓"; font-weight: 800; }
.subscription-tier-limits strong { color: var(--ink); }
.subscription-tier-includes { flex: 1; border-top: 1px solid var(--line); }
.subscription-tier-includes > strong { display: block; margin: 12px 0 0; font-size: 11px; }
.subscription-tier-includes ul { gap: 7px; padding: 10px 0 14px; border: 0; }
.subscription-plan-unavailable { display: flex; min-height: 38px; align-items: center; justify-content: center; margin-top: auto; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--soft); font-size: 10px; font-weight: 700; }
.subscription-checkout-button { width: 100%; }
:root[data-theme="dark"] .subscription-tier-featured { border-color: #57a7ff; box-shadow: 0 0 0 1px #57a7ff; }
@media (max-width: 900px) { .subscription-plan-grid { grid-template-columns: 1fr; } .subscription-tier-description { min-height: 0; } }
.platform-topbar { justify-content: space-between; padding-right: 24px; }
.platform-topbar .topbar-brand { margin-right: 0; }
.platform-label { margin-left: 8px; padding: 5px 8px; border: 1px solid #344966; border-radius: 999px; color: #9fcaff; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.platform-main { width: min(100% - 48px, 1320px); }
.platform-metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.platform-metric-grid .metric-card small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }
.platform-health-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.platform-health-card { display: flex; align-items: center; gap: 10px; padding: 14px; }
.platform-health-card > div { display: grid; gap: 3px; min-width: 0; }
.platform-health-card strong { font-size: 11px; }
.platform-health-card small { overflow-wrap: anywhere; color: var(--muted); font-size: 10px; }
.platform-health-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #71839a; }
.platform-health-dot.is-healthy { background: #36c98a; box-shadow: 0 0 0 4px rgb(54 201 138 / 12%); }
.platform-health-dot.is-down { background: #f36b73; box-shadow: 0 0 0 4px rgb(243 107 115 / 12%); }
.platform-plans-card, .platform-tenants-card, .platform-audit-card { margin-bottom: 18px; }
.platform-plans-card .section-heading, .platform-tenants-card .section-heading, .platform-audit-card .section-heading { margin: 0 0 12px; }
.platform-plans-card .section-heading h2, .platform-tenants-card .section-heading h2, .platform-audit-card .section-heading h2 { margin: 0 0 4px; font-size: 16px; }
.platform-plans-card .section-heading p, .platform-tenants-card .section-heading p, .platform-audit-card .section-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.platform-filters { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(190px, .7fr) auto; align-items: end; gap: 13px; margin-bottom: 18px; }
.platform-filters .filter-actions { display: flex; gap: 8px; }
.platform-tenants-card .data-table, .platform-plans-card .data-table, .platform-audit-card .data-table { min-width: 760px; }
.platform-tenants-card .table-subline { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.platform-tenants-card .pagination-wrap { border-top: 1px solid var(--line); }
.platform-data-boundary { margin: 12px 2px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.platform-mfa-card { width: min(100%, 680px); margin: 5vh auto; padding: 30px; }
.platform-mfa-card > .eyebrow { margin: 0 0 8px; color: #57a7ff; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.platform-mfa-card h1 { margin: 0 0 10px; font: 800 25px "Manrope", sans-serif; }
.platform-mfa-card > p:not(.eyebrow) { color: var(--muted); font-size: 13px; line-height: 1.6; }
.platform-mfa-secret { display: grid; gap: 8px; margin: 20px 0 12px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.platform-mfa-secret span { color: var(--muted); font-size: 11px; }
.platform-mfa-secret code, .platform-mfa-details code, .platform-recovery-list code { color: #9ecaff; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 14px; overflow-wrap: anywhere; user-select: text; }
.platform-mfa-details { color: var(--muted); font-size: 11px; }
.platform-mfa-details summary { cursor: pointer; }
.platform-mfa-details code { display: block; margin: 8px 0 14px; font-size: 10px; }
.platform-mfa-form { display: grid; gap: 14px; margin-top: 20px; }
.platform-mfa-form .field-group { max-width: 340px; }
.platform-mfa-form input { text-align: center; letter-spacing: .25em; font-size: 18px; }
.platform-recovery-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 20px 0; padding: 0; list-style: none; }
.platform-recovery-list li { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); text-align: center; }
.platform-recovery-list code { font-size: 13px; }

.security-audit-filters { display: grid; grid-template-columns: minmax(240px, 1fr) auto; align-items: end; gap: 18px; margin-bottom: 24px; padding: 20px 22px; }
.security-audit-filters .field-group { min-width: 0; }
.security-audit-filters .filter-actions { align-self: end; margin-top: 0; }
.security-audit-table > .section-heading { margin: 0; padding: 21px 22px 17px; }
.security-audit-table .pagination-wrap { min-height: 58px; padding: 13px 20px; }
.security-audit-table .pagination-wrap > span:first-child { color: var(--muted); font-size: 11px; }
:root[data-theme="dark"] .security-audit-filters { border-color: #2b3b54; background: #121f32; }
.api-token-create-card, .api-token-guide, .api-token-list { margin-bottom: 20px; }
.api-token-created { display: grid; gap: 10px; margin-bottom: 20px; border-color: #78b5ff; background: #f1f7ff; }
.api-token-created > strong { color: #184c82; font-size: 13px; }
.api-token-created > small { color: var(--muted); font-size: 11px; }
.api-token-secret { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--paper); font: 600 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; user-select: text; }
.api-token-guide ul { display: grid; gap: 10px; margin: 0 0 12px; padding-left: 20px; color: var(--muted); font-size: 12px; }
.api-token-guide > p { margin: 0; color: var(--muted); font-size: 11px; }
.api-token-guide code { color: var(--green-dark); font: 600 11px ui-monospace, SFMono-Regular, Consolas, monospace; }
.api-token-guide .section-heading { padding-bottom: 13px; }
.api-token-list > .section-heading { padding: 20px 22px 15px; }
.api-token-list .data-table { min-width: 820px; }
.api-token-list form { margin: 0; }
.api-token-revoke { min-height: 33px; padding: 0 10px; font-size: 10px; }
.webhook-create-card, .webhook-endpoints-card, .webhook-deliveries-card { margin-bottom: 20px; }
.webhook-events-fieldset { margin: 0; padding: 13px 15px 15px; border: 1px solid var(--line); border-radius: 9px; }
.webhook-events-fieldset legend { padding: 0 5px; color: var(--ink); font-size: 11px; font-weight: 700; }
.webhook-events-options { display: flex; flex-wrap: wrap; gap: 12px 22px; }
.webhook-events-options .check-row { margin: 0; }
.webhook-create-card .section-heading { padding-bottom: 18px; }
.webhook-endpoints-card > .section-heading, .webhook-deliveries-card > .section-heading { padding: 20px 22px 15px; }
.webhook-endpoints-card .data-table { min-width: 790px; }
.webhook-deliveries-card .data-table { min-width: 900px; }
.webhook-endpoints-card form, .webhook-deliveries-card form { margin: 0; }
:root[data-theme="dark"] .webhook-events-fieldset { border-color: #344966; }
:root[data-theme="dark"] .webhook-events-fieldset legend { color: #dce7f6; }
:root[data-theme="dark"] .api-token-created { border-color: #41658f; background: #162a43; }
:root[data-theme="dark"] .api-token-created > strong { color: #b5d8ff; }
:root[data-theme="dark"] .api-token-secret { border-color: #344966; color: #dce7f6; background: #0f1a2b; }
:root[data-theme="dark"] .api-token-guide code { color: #a9d2ff; }
@media (max-width: 650px) {
    .security-audit-filters { grid-template-columns: 1fr; gap: 13px; padding: 16px; }
    .security-audit-filters .filter-actions { width: 100%; }
    .security-audit-filters .filter-actions > * { flex: 1; }
    .security-audit-table > .section-heading { padding: 18px 16px 14px; }
    .security-audit-table .pagination-wrap { align-items: flex-start; padding: 13px 15px; }
    .api-token-create-card, .api-token-guide, .api-token-list { padding: 16px; }
    .api-token-list { padding: 0; }
    .api-token-list > .section-heading { padding: 17px 15px 13px; }
    .webhook-create-card { padding: 16px; }
    .webhook-events-options { display: grid; gap: 10px; }
    .webhook-endpoints-card > .section-heading, .webhook-deliveries-card > .section-heading { padding: 17px 15px 13px; }
}
@media (max-width: 900px) { .platform-metric-grid, .platform-health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) {
    .platform-main { width: calc(100% - 24px); padding-top: 20px; }
    .platform-topbar { padding: 0 12px; }
    .platform-label { display: none; }
    .platform-metric-grid, .platform-health-grid { grid-template-columns: 1fr 1fr; }
    .platform-filters { grid-template-columns: 1fr; }
    .platform-filters .filter-actions > * { flex: 1; justify-content: center; }
    .platform-mfa-card { padding: 21px; }
}
/* Teclado y lectores de pantalla */
.skip-link {
    position: fixed;
    z-index: 10000;
    top: 10px;
    left: 10px;
    padding: 11px 15px;
    transform: translateY(calc(-100% - 16px));
    border: 1px solid #174d83;
    border-radius: 8px;
    color: #fff;
    background: #174d83;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .16s ease;
}
.skip-link:focus { transform: translateY(0); color: #fff; }
:where(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
    outline: 3px solid #145fa5 !important;
    outline-offset: 3px !important;
}
#main-content:focus { outline: none; }
:root[data-theme="dark"] .skip-link { border-color: #b6d8ff; color: #091525; background: #b6d8ff; }
:root[data-theme="dark"] .skip-link:focus { color: #091525; }
:root[data-theme="dark"] :where(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
    outline-color: #b6d8ff !important;
}
@media (prefers-reduced-motion: reduce) {
    .skip-link { transition: none; }
}
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    clip-path: inset(50%) !important;
}
.global-search-form { display: flex; align-items: center; width: 190px; height: 34px; overflow: hidden; border: 1px solid #dce7e1; border-radius: 18px; background: #f7faf8; }
.global-search-form input { width: 100%; min-width: 0; height: 100%; padding: 0 4px 0 13px; border: 0; outline: 0; color: #34453f; background: transparent; font: 11px "DM Sans", sans-serif; }
.global-search-form input::placeholder { color: #819087; }
.global-search-form button { display: grid; width: 34px; height: 32px; flex: 0 0 auto; place-items: center; border: 0; color: #687a70; background: transparent; cursor: pointer; }
.global-search-form button:hover { color: var(--green-dark); }
.global-search-form svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; }
.global-search-page-form { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.global-search-page-form input { width: 100%; min-width: 0; height: 43px; padding: 0 13px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--wash); font: 13px "DM Sans", sans-serif; }
.global-search-results { display: grid; gap: 18px; }
.global-search-group ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.global-search-group li a { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--wash); text-decoration: none; }
.global-search-group li a:hover { border-color: var(--green); }
.global-search-group li a > span:first-child { display: grid; gap: 4px; min-width: 0; }
.global-search-group li strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; }
.global-search-group li small { color: var(--muted); font-size: 10px; }
.global-search-open { flex: 0 0 auto; color: var(--green); font-size: 11px; font-weight: 700; }
.global-search-empty { text-align: center; }
.global-search-empty > span { color: var(--green); font-size: 30px; }
.global-search-empty h2 { margin: 8px 0 4px; font: 700 17px "Manrope", sans-serif; }
.global-search-empty p { margin: 0; color: var(--muted); font-size: 12px; }
:root[data-theme="dark"] .global-search-form { border-color: #344966; background: #101b2c; }
:root[data-theme="dark"] .global-search-form input { color: #e6eefb; }
:root[data-theme="dark"] .global-search-form button { color: #aebdd2; }
:root[data-theme="dark"] .global-search-group li a { border-color: #2b3b54; color: #e6eefb; background: #101b2c; }
:root[data-theme="dark"] .global-search-group li a:hover { border-color: #5ca7ff; }
@media (max-width: 1080px) and (min-width: 721px) {
    .topbar { gap: 18px; }
    .topbar-nav { gap: 13px; }
    .global-search-form { width: 145px; }
    .topbar-user { gap: 10px; }
}
@media (max-width: 720px) {
    .topbar-user { order: 2; width: 100%; flex-wrap: wrap; justify-content: space-between; }
    .topbar-user .global-search-form { width: 100%; flex: 1 1 100%; }
    .global-search-page-form { align-items: stretch; flex-direction: column; }
}
.breadcrumbs { margin: -17px 0 18px; }
.breadcrumbs ol { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 10px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--green); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--ink); font-weight: 600; }
.breadcrumb-separator { display: grid; place-items: center; color: var(--muted); }
.breadcrumb-separator svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.table-card[aria-busy="true"] { cursor: progress; }
.table-card[aria-busy="true"] .table-scroll { opacity: .55; transition: opacity .14s ease; }
:root[data-theme="dark"] .breadcrumbs [aria-current="page"] { color: #e6eefb; }
@media (max-width: 720px) {
    .breadcrumbs { margin-top: -8px; margin-bottom: 15px; }
}
