:root {
    --gv2-bg: #f6f8fb;
    --gv2-surface: #ffffff;
    --gv2-sidebar: #111827;
    --gv2-sidebar-soft: #1f2937;
    --gv2-text: #111827;
    --gv2-muted: #6b7280;
    --gv2-border: #e5e7eb;
    --gv2-primary: #2563eb;
    --gv2-primary-soft: #eff6ff;
    --gv2-radius: 14px;
    --gv2-sidebar-width: 252px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--gv2-bg); color: var(--gv2-text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
button, input, select, textarea { font-family: inherit; }
a { color: inherit; }

.gv2-app-shell { min-height: 100vh; background: var(--gv2-bg); }
.gv2-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: var(--gv2-sidebar-width); display: flex; flex-direction: column; background: var(--gv2-sidebar); color: #fff; }
.gv2-sidebar-head { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.gv2-brand { display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; }
.gv2-brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--gv2-primary); font-size: 18px; font-weight: 700; }
.gv2-brand-copy { display: flex; align-items: baseline; gap: 6px; }
.gv2-brand-copy strong { font-size: 16px; letter-spacing: -.01em; }
.gv2-brand-copy small { font-size: 10px; font-weight: 700; color: #9ca3af; }
.gv2-sidebar-close { display: none; border: 0; background: transparent; color: #9ca3af; padding: 6px; }
.gv2-sidebar-close svg { width: 22px; height: 22px; }

.gv2-company-switcher { position: relative; margin: 14px 12px 10px; }
.gv2-company-switcher summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; background: rgba(255,255,255,.05); }
.gv2-company-switcher summary::-webkit-details-marker, .gv2-user-menu summary::-webkit-details-marker { display: none; }
.gv2-company-switcher summary > svg, .gv2-user-menu summary > svg { width: 16px; height: 16px; margin-left: auto; color: #9ca3af; flex: none; }
.gv2-company-avatar, .gv2-user-avatar { width: 34px; height: 34px; display: grid; place-items: center; flex: none; border-radius: 9px; background: #fff; color: var(--gv2-sidebar); font-size: 13px; font-weight: 700; }
.gv2-company-copy, .gv2-user-copy { min-width: 0; display: flex; flex-direction: column; }
.gv2-company-copy small, .gv2-user-copy small { color: #9ca3af; font-size: 10px; line-height: 1.2; }
.gv2-company-copy strong, .gv2-user-copy strong { margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.gv2-company-menu { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 70; overflow: hidden; border: 1px solid var(--gv2-border); border-radius: 12px; background: #fff; color: var(--gv2-text); box-shadow: 0 18px 45px rgba(15,23,42,.2); }
.gv2-company-option { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 0; border-bottom: 1px solid #f3f4f6; padding: 10px 12px; background: #fff; color: var(--gv2-text); text-align: left; font: inherit; cursor: pointer; }
.gv2-company-option:hover { background: #f9fafb; }
.gv2-company-option span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.gv2-company-option small { color: var(--gv2-muted); font-size: 10px; }
.gv2-company-option-active small { color: var(--gv2-primary); font-weight: 700; }
.gv2-company-manage { display: block; padding: 10px 12px; color: var(--gv2-primary); text-decoration: none; font-size: 11px; font-weight: 700; }

.gv2-nav { flex: 1; overflow-y: auto; padding: 8px 10px 18px; }
.gv2-nav-section { margin: 18px 10px 7px; color: #6b7280; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.gv2-nav-link { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 11px; border-radius: 10px; color: #cbd5e1; text-decoration: none; font-size: 13px; font-weight: 500; transition: background .15s ease, color .15s ease; }
.gv2-nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.gv2-nav-link.is-active { background: var(--gv2-primary); color: #fff; }
.gv2-nav-link svg { width: 19px; height: 19px; flex: none; }

.gv2-sidebar-footer { padding: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.gv2-user-menu { position: relative; }
.gv2-user-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.gv2-user-menu summary:hover { background: rgba(255,255,255,.06); }
.gv2-user-avatar { width: 32px; height: 32px; }
.gv2-user-copy strong { font-size: 12px; }
.gv2-user-copy small { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gv2-user-popover { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); overflow: hidden; border: 1px solid var(--gv2-border); border-radius: 11px; background: #fff; color: var(--gv2-text); box-shadow: 0 18px 45px rgba(15,23,42,.2); }
.gv2-user-popover a, .gv2-user-popover button { display: block; width: 100%; border: 0; padding: 10px 12px; background: #fff; color: var(--gv2-text); text-align: left; text-decoration: none; font: inherit; font-size: 12px; cursor: pointer; }
.gv2-user-popover a:hover, .gv2-user-popover button:hover { background: #f9fafb; }

.gv2-main-shell { min-height: 100vh; margin-left: var(--gv2-sidebar-width); }
.gv2-mobile-topbar { display: none; }
.gv2-page-header { border-bottom: 1px solid var(--gv2-border); background: rgba(255,255,255,.92); }
.gv2-page-header-inner { width: 100%; max-width: 1500px; margin: 0 auto; padding: 26px 32px; }
.gv2-page-content { width: 100%; }
.gv2-header-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.gv2-eyebrow { margin-bottom: 5px; color: var(--gv2-primary); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.gv2-title { margin: 0; color: var(--gv2-text); font-size: 28px; font-weight: 700; line-height: 1.2; letter-spacing: -.025em; }
.gv2-subtitle { margin: 6px 0 0; color: var(--gv2-muted); font-size: 13px; }
.gv2-header-actions { display: flex; align-items: center; gap: 10px; }
.gv2-button { display: inline-flex; align-items: center; justify-content: center; min-height: 39px; padding: 0 15px; border: 1px solid transparent; border-radius: 9px; text-decoration: none; font-size: 12px; font-weight: 700; }
.gv2-button-primary { background: var(--gv2-primary); color: #fff; }
.gv2-button-primary:hover { background: #1d4ed8; }
.gv2-button-secondary { border-color: var(--gv2-border); background: #fff; color: #374151; }
.gv2-button-secondary:hover { background: #f9fafb; }

.gv2-dashboard { max-width: 1500px; margin: 0 auto; padding: 28px 32px 48px; }
.gv2-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.gv2-stat-card { display: flex; align-items: center; gap: 15px; min-height: 112px; padding: 20px; border: 1px solid var(--gv2-border); border-radius: var(--gv2-radius); background: var(--gv2-surface); text-decoration: none; box-shadow: 0 1px 2px rgba(15,23,42,.03); transition: transform .15s ease, box-shadow .15s ease; }
.gv2-stat-card:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(15,23,42,.06); }
.gv2-stat-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: none; border-radius: 11px; background: var(--gv2-primary-soft); color: var(--gv2-primary); }
.gv2-stat-icon svg { width: 21px; height: 21px; }
.gv2-stat-card > div:last-child { display: flex; flex-direction: column; }
.gv2-stat-card span { color: var(--gv2-muted); font-size: 12px; font-weight: 500; }
.gv2-stat-card strong { margin-top: 4px; color: var(--gv2-text); font-size: 26px; line-height: 1; }

.gv2-dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin-top: 16px; }
.gv2-dashboard-grid-bottom { align-items: start; }
.gv2-panel { min-width: 0; overflow: hidden; border: 1px solid var(--gv2-border); border-radius: var(--gv2-radius); background: var(--gv2-surface); box-shadow: 0 1px 2px rgba(15,23,42,.03); }
.gv2-panel-span-2 { grid-column: span 2; }
.gv2-panel-head { padding: 20px 20px 14px; }
.gv2-panel-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.gv2-panel-head h2 { margin: 0; color: var(--gv2-text); font-size: 14px; font-weight: 700; }
.gv2-panel-head p { margin: 4px 0 0; color: var(--gv2-muted); font-size: 11px; }
.gv2-quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; padding: 0 20px 20px; }
.gv2-quick-card { min-height: 130px; display: flex; flex-direction: column; justify-content: flex-end; padding: 15px; border: 1px solid var(--gv2-border); border-radius: 11px; background: #fbfcfe; text-decoration: none; transition: border-color .15s ease, background .15s ease; }
.gv2-quick-card:hover { border-color: #bfdbfe; background: var(--gv2-primary-soft); }
.gv2-quick-plus { width: 30px; height: 30px; display: grid; place-items: center; margin-bottom: auto; border-radius: 8px; background: var(--gv2-primary); color: #fff; font-size: 20px; line-height: 1; }
.gv2-quick-card strong { font-size: 12px; }
.gv2-quick-card small { margin-top: 4px; color: var(--gv2-muted); font-size: 10px; line-height: 1.35; }
.gv2-company-summary { margin: 0; padding: 0 20px 8px; }
.gv2-company-summary > div { display: grid; grid-template-columns: 82px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f3f4f6; }
.gv2-company-summary > div:last-child { border-bottom: 0; }
.gv2-company-summary dt { color: var(--gv2-muted); font-size: 11px; }
.gv2-company-summary dd { margin: 0; overflow: hidden; color: var(--gv2-text); text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600; }
.gv2-text-link { display: inline-block; color: var(--gv2-primary); text-decoration: none; font-size: 11px; font-weight: 700; }
.gv2-panel > .gv2-text-link { margin: 6px 20px 20px; }
.gv2-list-row, .gv2-document-row { display: flex; align-items: center; gap: 11px; min-height: 58px; padding: 10px 20px; border-top: 1px solid #f3f4f6; text-decoration: none; }
.gv2-list-row:hover, .gv2-document-row:hover { background: #fafafa; }
.gv2-list-avatar { width: 32px; height: 32px; display: grid; place-items: center; flex: none; border-radius: 9px; background: #f3f4f6; color: #374151; font-size: 11px; font-weight: 700; }
.gv2-list-copy, .gv2-document-row > span:first-child { min-width: 0; display: flex; flex: 1; flex-direction: column; }
.gv2-list-copy strong, .gv2-document-row strong { overflow: hidden; color: var(--gv2-text); text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 700; }
.gv2-list-copy small, .gv2-document-row small { margin-top: 3px; overflow: hidden; color: var(--gv2-muted); text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.gv2-status-pill { flex: none; border-radius: 999px; background: #f3f4f6; padding: 4px 8px; color: #4b5563; font-size: 9px; font-weight: 700; }
.gv2-empty-state { padding: 28px 20px; border-top: 1px solid #f3f4f6; color: var(--gv2-muted); font-size: 11px; text-align: center; }

/* L'ancien dock reste dans le composant RC9 pour préserver ses modales, mais le nouveau switcher est désormais dans la sidebar. */
#gv2-company-dock { display: none !important; }

.gv2-sidebar-overlay { display: none; }

@media (max-width: 1180px) {
    .gv2-quick-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .gv2-stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 900px) {
    .gv2-sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 18px 0 55px rgba(15,23,42,.25); }
    .gv2-sidebar.gv2-sidebar-open { transform: translateX(0); }
    .gv2-sidebar-close { display: block; }
    .gv2-main-shell { margin-left: 0; }
    .gv2-mobile-topbar { height: 58px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--gv2-border); background: #fff; }
    .gv2-icon-button { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--gv2-border); border-radius: 9px; background: #fff; color: #374151; }
    .gv2-icon-button svg { width: 19px; height: 19px; }
    .gv2-mobile-brand { color: var(--gv2-text); text-decoration: none; font-size: 14px; font-weight: 700; }
    .gv2-sidebar-overlay { position: fixed; inset: 0; z-index: 40; display: block; background: rgba(15,23,42,.45); }
    .gv2-page-header-inner, .gv2-dashboard { padding-left: 18px; padding-right: 18px; }
    .gv2-dashboard-grid { grid-template-columns: 1fr; }
    .gv2-panel-span-2 { grid-column: auto; }
}

@media (max-width: 620px) {
    .gv2-header-row { align-items: flex-start; flex-direction: column; }
    .gv2-header-actions { width: 100%; }
    .gv2-header-actions .gv2-button { flex: 1; }
    .gv2-title { font-size: 24px; }
    .gv2-stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .gv2-stat-card { min-height: 96px; padding: 14px; }
    .gv2-stat-icon { width: 36px; height: 36px; }
    .gv2-stat-card strong { font-size: 22px; }
    .gv2-quick-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 430px) {
    .gv2-stat-grid, .gv2-quick-grid { grid-template-columns: 1fr; }
}

/* Phase 2 — list pages and organization */
.gv2-list-page { max-width: 1500px; margin: 0 auto; padding: 24px 32px 48px; }
.gv2-list-summary { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; padding: 0 2px; }
.gv2-list-summary > div:first-child { display: flex; align-items: baseline; gap: 10px; }
.gv2-list-summary-label { color: var(--gv2-muted); font-size: 12px; font-weight: 500; }
.gv2-list-summary strong { color: var(--gv2-text); font-size: 20px; font-weight: 700; }
.gv2-list-summary-note { color: #9ca3af; font-size: 11px; }
.gv2-data-card { overflow: hidden; border: 1px solid var(--gv2-border); border-radius: var(--gv2-radius); background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.03); }
.gv2-table-wrap { width: 100%; overflow-x: auto; }
.gv2-data-table { width: 100%; min-width: 900px; border-collapse: collapse; }
.gv2-data-table thead { background: #fbfcfe; }
.gv2-data-table th { height: 44px; padding: 0 18px; border-bottom: 1px solid var(--gv2-border); color: #8a94a6; text-align: left; white-space: nowrap; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.gv2-data-table td { min-height: 64px; padding: 13px 18px; border-bottom: 1px solid #eef1f5; color: #344054; vertical-align: middle; font-size: 12px; }
.gv2-data-table tbody tr:last-child td { border-bottom: 0; }
.gv2-data-table tbody tr { transition: background .12s ease; }
.gv2-data-table tbody tr:hover { background: #fbfcff; }
.gv2-align-right { text-align: right !important; }
.gv2-table-identity, .gv2-doc-number { min-width: 0; display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.gv2-table-avatar, .gv2-doc-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: none; border-radius: 9px; background: #f2f6ff; color: var(--gv2-primary); font-size: 11px; font-weight: 800; }
.gv2-table-avatar-product { background: #f5f3ff; color: #7c3aed; }
.gv2-table-identity > span:last-child, .gv2-doc-number > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.gv2-table-identity strong, .gv2-doc-number strong { max-width: 270px; overflow: hidden; color: #111827; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; }
.gv2-table-identity small, .gv2-doc-number small { max-width: 300px; margin-top: 2px; overflow: hidden; color: #98a2b3; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.gv2-table-stack { display: flex; flex-direction: column; }
.gv2-table-stack span, .gv2-table-main-text { color: #475467; font-size: 12px; font-weight: 500; }
.gv2-table-stack small { margin-top: 3px; color: #98a2b3; font-size: 10px; }
.gv2-muted-value { color: #667085; font-size: 12px; }
.gv2-money { color: #101828; white-space: nowrap; font-size: 12px; font-weight: 700; }
.gv2-pill { display: inline-flex; align-items: center; min-height: 23px; border-radius: 999px; padding: 3px 8px; white-space: nowrap; font-size: 9px; font-weight: 700; }
.gv2-pill-neutral { background: #f2f4f7; color: #475467; }
.gv2-pill-info { background: #eff6ff; color: #2563eb; }
.gv2-pill-success { background: #ecfdf3; color: #027a48; }
.gv2-pill-warning { background: #fffaeb; color: #b54708; }
.gv2-pill-danger { background: #fff1f3; color: #c01048; }
.gv2-row-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 11px; white-space: nowrap; }
.gv2-row-actions a, .gv2-row-actions button { border: 0; padding: 0; background: transparent; color: #667085; text-decoration: none; font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; }
.gv2-row-actions a:hover, .gv2-row-actions button:hover { color: #101828; }
.gv2-row-actions .is-primary { color: var(--gv2-primary); }
.gv2-row-actions .is-danger { color: #d92d20; }
.gv2-pagination { padding: 14px 18px; border-top: 1px solid var(--gv2-border); background: #fff; }
.gv2-empty-large { min-height: 330px; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 40px; text-align: center; }
.gv2-empty-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 15px; border-radius: 14px; background: var(--gv2-primary-soft); color: var(--gv2-primary); font-size: 15px; font-weight: 800; }
.gv2-empty-large h2 { margin: 0; color: var(--gv2-text); font-size: 15px; font-weight: 700; }
.gv2-empty-large p { max-width: 430px; margin: 7px 0 18px; color: var(--gv2-muted); font-size: 12px; line-height: 1.6; }
.gv2-company-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gv2-company-card { position: relative; min-width: 0; padding: 20px; border: 1px solid var(--gv2-border); border-radius: var(--gv2-radius); background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.03); }
.gv2-company-card.is-active { border-color: #9fc0ff; box-shadow: 0 0 0 3px #edf4ff; }
.gv2-company-card-top { display: flex; align-items: flex-start; gap: 11px; }
.gv2-company-card-avatar { width: 38px; height: 38px; display: grid; place-items: center; flex: none; border-radius: 10px; background: #111827; color: #fff; font-size: 13px; font-weight: 800; }
.gv2-company-card-heading { min-width: 0; display: flex; flex: 1; flex-direction: column; }
.gv2-company-card-heading strong { overflow: hidden; color: #101828; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.gv2-company-card-heading small { margin-top: 4px; overflow: hidden; color: #98a2b3; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.gv2-company-card-data { margin: 18px 0 0; }
.gv2-company-card-data > div { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 8px 0; border-top: 1px solid #f2f4f7; }
.gv2-company-card-data dt { color: #98a2b3; font-size: 10px; }
.gv2-company-card-data dd { margin: 0; color: #344054; text-align: right; font-size: 10px; font-weight: 600; }
.gv2-company-card-action { display: flex; justify-content: flex-end; margin-top: 14px; }
.gv2-company-card-action form { margin: 0; }
.gv2-company-card-action .gv2-button { min-height: 34px; padding: 0 12px; font-size: 10px; }
.gv2-company-access { border-radius: 8px; background: #f2f4f7; padding: 8px 10px; color: #667085; font-size: 10px; font-weight: 600; }
.gv2-company-create-card { margin-top: 18px; padding: 22px; }
.gv2-section-heading h2 { margin: 0; color: #101828; font-size: 15px; font-weight: 700; }
.gv2-section-heading p { margin: 5px 0 0; color: #667085; font-size: 11px; }
.gv2-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin-top: 20px; }
.gv2-form-field { min-width: 0; }
.gv2-form-field label { display: block; margin-bottom: 6px; color: #344054; font-size: 11px; font-weight: 600; }
.gv2-form-field input, .gv2-form-field select { width: 100%; height: 40px; border: 1px solid #d0d5dd; border-radius: 9px; background: #fff; padding: 0 11px; color: #101828; outline: none; font: inherit; font-size: 12px; transition: border-color .15s ease, box-shadow .15s ease; }
.gv2-form-field input:focus, .gv2-form-field select:focus { border-color: #84adff; box-shadow: 0 0 0 3px #eff4ff; }
.gv2-uppercase { text-transform: uppercase; }
.gv2-form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; padding-top: 3px; }

@media (max-width: 1180px) {
    .gv2-company-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 900px) {
    .gv2-list-page { padding-left: 18px; padding-right: 18px; }
    .gv2-list-summary-note { display: none; }
    .gv2-company-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .gv2-list-summary { min-height: 44px; }
    .gv2-form-grid { grid-template-columns: 1fr; }
    .gv2-form-actions { grid-column: auto; }
    .gv2-form-actions .gv2-button { width: 100%; }
}


/* Phase 5 — client 360 + system font */
.gv2-client-page { max-width: 1500px; margin: 0 auto; padding: 28px 32px 50px; }
.gv2-client-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.gv2-client-kpi { min-height: 116px; padding: 20px; border: 1px solid var(--gv2-border); border-radius: var(--gv2-radius); background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.03); }
.gv2-client-kpi > span { display: block; color: var(--gv2-muted); font-size: 11px; font-weight: 600; }
.gv2-client-kpi > strong, .gv2-kpi-multi strong { display: block; margin-top: 8px; color: var(--gv2-text); font-size: 21px; line-height: 1.18; letter-spacing: -.02em; }
.gv2-client-kpi > small { display: block; margin-top: 7px; color: #98a2b3; font-size: 10px; }
.gv2-kpi-multi { margin-top: 4px; }
.gv2-kpi-multi strong { margin-top: 3px; font-size: 16px; }
.gv2-client-grid { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 14px; margin-top: 14px; }
.gv2-client-info-card, .gv2-client-activity-card { min-height: 390px; }
.gv2-client-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 28px; margin: 0; padding: 0 20px 18px; }
.gv2-client-details > div { padding: 11px 0; border-top: 1px solid #f1f3f6; }
.gv2-client-details dt { color: #98a2b3; font-size: 10px; }
.gv2-client-details dd { margin: 4px 0 0; color: #344054; font-size: 12px; font-weight: 600; line-height: 1.45; }
.gv2-client-notes { margin: 0 20px 20px; padding: 14px; border-radius: 10px; background: #f8fafc; }
.gv2-client-notes span { color: #98a2b3; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.gv2-client-notes p { margin: 6px 0 0; color: #475467; white-space: pre-line; font-size: 11px; line-height: 1.55; }
.gv2-activity-list { padding: 0 20px 18px; }
.gv2-activity-item { position: relative; display: grid; grid-template-columns: 10px minmax(0,1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid #f1f3f6; }
.gv2-activity-dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: #98a2b3; }
.gv2-activity-dot-estimate { background: #7c3aed; }
.gv2-activity-dot-invoice { background: #2563eb; }
.gv2-activity-dot-payment { background: #16a34a; }
.gv2-activity-content { min-width: 0; display: flex; flex-direction: column; }
.gv2-activity-content a { color: #101828; text-decoration: none; font-size: 12px; }
.gv2-activity-content a:hover { color: var(--gv2-primary); }
.gv2-activity-content span { margin-top: 2px; color: #667085; font-size: 10px; }
.gv2-activity-content small { margin-top: 3px; color: #344054; font-size: 10px; font-weight: 700; }
.gv2-activity-item time { color: #98a2b3; white-space: nowrap; font-size: 9px; }
.gv2-client-empty { padding: 34px 0; color: #98a2b3; text-align: center; font-size: 11px; }
.gv2-client-documents { margin-top: 14px; }
.gv2-client-table { min-width: 760px; }
.gv2-client-empty-cell { padding: 34px !important; color: #98a2b3 !important; text-align: center !important; }
@media (max-width: 1050px) { .gv2-client-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); } .gv2-client-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .gv2-client-page { padding-left: 18px; padding-right: 18px; } }
@media (max-width: 620px) { .gv2-client-kpis { grid-template-columns: 1fr; } .gv2-client-details { grid-template-columns: 1fr; } }

/* ========================================================================== 
   Billing workspace - ZipBooks-inspired reference implementation
   Scoped to .zb-billing-mode so the dashboard/clients/company UI stays intact.
   ========================================================================== */
.zb-billing-mode {
    margin: 0;
    background: #fafafa;
    color: #343944;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.zb-billing-mode button,
.zb-billing-mode input,
.zb-billing-mode select,
.zb-billing-mode textarea { font-family: inherit; }
.zb-app-shell { min-height: 100vh; background: #fafafa; }
.zb-app-main { padding-top: 66px; min-height: 100vh; }
.zb-topbar {
    position: fixed; z-index: 100; inset: 0 0 auto 0; height: 66px;
    display: grid; grid-template-columns: minmax(320px,1fr) auto minmax(260px,.75fr);
    align-items: stretch; background: #fff; border-bottom: 1px solid #e8eaee;
}
.zb-topbar-brand-area { display:flex; align-items:center; gap:42px; padding:0 34px; min-width:0; }
.zb-brand { display:flex; align-items:center; gap:10px; text-decoration:none; color:#343944; font-size:24px; letter-spacing:-.03em; }
.zb-brand-bars { display:flex; align-items:flex-end; gap:3px; width:24px; height:22px; }
.zb-brand-bars i { display:block; width:4px; border-radius:2px 2px 0 0; }
.zb-brand-bars i:nth-child(1){height:10px;background:#ff375f}.zb-brand-bars i:nth-child(2){height:17px;background:#0064ff}.zb-brand-bars i:nth-child(3){height:13px;background:#7c4dff}.zb-brand-bars i:nth-child(4){height:21px;background:#00cf7b}
.zb-search-hint { display:flex; align-items:center; gap:12px; color:#b1b7c2; font-size:14px; white-space:nowrap; }
.zb-search-hint:first-letter{font-size:28px;font-weight:300;color:#9aa2b0}
.zb-topnav { display:flex; align-items:stretch; height:66px; border-left:1px solid #e8eaee; }
.zb-topnav a { min-width:110px; padding:0 19px; display:flex; align-items:center; justify-content:center; border-right:1px solid #e8eaee; color:#343944; text-decoration:none; font-size:14px; font-weight:500; }
.zb-topnav a:hover,.zb-topnav a.is-active { background:#fcfcfd; color:#0064ff; }
.zb-topbar-account { display:flex; align-items:stretch; justify-content:flex-end; border-left:1px solid #e8eaee; }
.zb-company-menu { position:relative; min-width:240px; }
.zb-company-menu summary { list-style:none; cursor:pointer; height:65px; padding:0 24px; display:flex; align-items:center; gap:10px; }
.zb-company-menu summary::-webkit-details-marker{display:none}
.zb-company-mini-avatar { width:31px;height:31px;border-radius:4px;display:grid;place-items:center;background:#eef2ff;color:#0064ff;font-size:13px;font-weight:800; }
.zb-company-menu summary > span:nth-child(2){display:flex;flex-direction:column;min-width:0}
.zb-company-menu summary strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.zb-company-menu summary small{font-size:10px;color:#858c99;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:145px}
.zb-chevron{margin-left:auto;color:#858c99}
.zb-company-popover { position:absolute; top:60px; right:12px; width:250px; background:#fff; border:1px solid #e8eaee; box-shadow:0 8px 28px rgba(52,57,68,.14); z-index:120; }
.zb-company-popover-current { padding:12px 15px; display:flex; flex-direction:column; border-bottom:1px solid #e8eaee; }
.zb-company-popover-current small{color:#858c99;font-size:10px}
.zb-company-popover button,.zb-company-popover a{display:block;width:100%;padding:11px 15px;border:0;border-bottom:1px solid #f0f1f3;background:#fff;color:#343944;text-decoration:none;text-align:left;font-size:12px;cursor:pointer}
.zb-company-popover button:hover,.zb-company-popover a:hover{background:#f9f9fa;color:#0064ff}

.zb-workspace { max-width:1450px; margin:0 auto; padding:32px 26px 70px; display:grid; grid-template-columns:220px minmax(640px,1fr) 230px; gap:26px; align-items:start; }
.zb-workspace.zb-workspace-list { grid-template-columns:220px minmax(660px,1fr) 230px; }
.zb-workspace.zb-workspace-edit { grid-template-columns:220px minmax(720px,1fr) 230px; }
.zb-side-stack { display:flex; flex-direction:column; gap:18px; min-width:0; }
.zb-box { background:#fff; border:1px solid #e8eaee; box-shadow:0 2px 10px rgba(52,57,68,.08); }
.zb-box-title { min-height:48px; display:flex; align-items:center; gap:9px; padding:0 16px; border-bottom:1px solid #e8eaee; color:#343944; font-size:14px; font-weight:700; }
.zb-box-title a { color:#858c99; text-decoration:none; font-size:22px; font-weight:300; }
.zb-side-nav { padding:10px 0 14px; }
.zb-side-nav a { display:flex;align-items:center;gap:11px;min-height:45px;padding:0 19px;color:#858c99;text-decoration:none;font-size:14px; }
.zb-side-nav a:hover,.zb-side-nav a.is-active{color:#00b86b}
.zb-side-icon { width:20px;height:20px;border:1.5px solid #00cf7b;border-radius:50%;display:grid;place-items:center;color:#00b86b;font-size:11px;line-height:1;flex:none; }
.zb-side-icon.dashed{border-style:dashed}.zb-side-icon.cube{border-color:#9aa2b0;color:#858c99;border-radius:2px}
.zb-history-box .zb-box-title{justify-content:space-between}
.zb-history-list{max-height:520px;overflow:auto}
.zb-history-entry{padding:17px 16px;border-bottom:1px solid #e8eaee;border-left:3px solid #9aa2b0}
.zb-history-entry:first-child{border-left-color:#0064ff}
.zb-history-entry strong{display:block;font-size:12px;margin-bottom:5px}
.zb-history-entry p{margin:0;color:#59606d;font-size:12px;line-height:1.5}
.zb-history-empty{padding:18px 16px;color:#858c99;font-size:12px}

.zb-center-column,.zb-right-column{min-width:0}
.zb-action-strip { min-height:50px; display:flex;align-items:center;justify-content:space-between;gap:16px; margin-bottom:14px; }
.zb-action-links,.zb-action-buttons{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.zb-text-action{display:inline-flex;align-items:center;gap:7px;color:#59606d;text-decoration:none;font-size:13px;padding:5px 0}
.zb-text-action:hover{color:#0064ff}.zb-text-action .icon{color:#ff496f;font-size:13px}.zb-text-action.preview .icon{color:#7c4dff}
.zb-btn { min-height:44px;padding:0 24px;border:1px solid transparent;border-radius:2px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;font-size:14px;font-weight:700;letter-spacing:.01em;cursor:pointer; }
.zb-btn-blue{background:#0064ff;color:#fff}.zb-btn-green{background:#00cf7b;color:#fff}.zb-btn-gray{background:#9299a6;color:#fff}.zb-btn-white{background:#fff;color:#59606d;border-color:#dfe2e7}.zb-btn-red{background:#fff;color:#d84343;border-color:#efb1b1}
.zb-btn:hover{filter:brightness(.98)}.zb-btn:disabled{opacity:.45;cursor:not-allowed}
.zb-btn-block{width:100%}

.zb-document-card { position:relative; overflow:hidden; background:#fff; border:1px solid #eceef1; border-top:17px solid #eeeeee; box-shadow:0 2px 12px rgba(52,57,68,.08); min-height:640px; padding:0; }
.zb-document-inner { max-width:720px; margin:0 auto; padding:48px 42px 52px; color:#343944; }
.zb-ribbon { position:absolute;top:4px;left:-37px;width:135px;height:36px;display:flex;align-items:center;justify-content:center;transform:rotate(-45deg);color:#fff;font-size:13px;font-weight:700;letter-spacing:.03em;z-index:2; }
.zb-ribbon.draft{background:#9299a6}.zb-ribbon.sent{background:#0064ff}.zb-ribbon.paid{background:#00cf7b}.zb-ribbon.partial{background:#7c4dff}.zb-ribbon.overdue{background:#ff5964}.zb-ribbon.cancelled{background:#858c99}.zb-ribbon.accepted{background:#00cf7b}.zb-ribbon.refused{background:#ff5964}
.zb-doc-logo-row{height:88px;display:flex;align-items:flex-start}.zb-doc-logo{max-width:120px;max-height:70px;object-fit:contain}.zb-doc-logo-fallback{width:52px;height:52px;background:#f1f3f7;display:grid;place-items:center;font-weight:800;color:#343944}
.zb-doc-parties { display:grid;grid-template-columns:1fr 1fr;gap:36px;padding:20px 0 28px;border-bottom:1px solid #f1f2f4; }
.zb-doc-party-right{text-align:right}.zb-doc-label{color:#858c99;font-size:11px;text-transform:uppercase;letter-spacing:.04em;margin-bottom:5px}.zb-doc-party strong{display:block;font-size:13px;margin-bottom:3px}.zb-doc-party div{font-size:12px;line-height:1.5;color:#4f5663}
.zb-doc-head { display:grid;grid-template-columns:1fr auto;gap:30px;padding:28px 0 20px;align-items:start; }
.zb-doc-title{font-size:24px;line-height:1.15;font-weight:800;letter-spacing:.01em;color:#414141;margin:0 0 9px}.zb-doc-meta{font-size:12px;line-height:1.6}.zb-doc-meta strong{font-weight:700}.zb-doc-amount{text-align:right;font-size:24px;font-weight:800;color:#343944;white-space:nowrap}.zb-doc-due{text-align:right;font-size:12px;margin-top:8px;color:#59606d}
.zb-doc-table{width:100%;border-collapse:collapse;margin-top:24px;color:#343944}.zb-doc-table th{padding:0 0 9px;border-bottom:1px solid #e8eaee;color:#858c99;font-size:11px;font-weight:400;text-align:right}.zb-doc-table th:first-child{text-align:left}.zb-doc-table td{padding:12px 0;border-bottom:1px solid #e8eaee;vertical-align:top;font-size:12px;text-align:right}.zb-doc-table td:first-child{text-align:left}.zb-line-name{font-weight:700;color:#414141}.zb-line-desc{margin-top:4px;color:#59606d;line-height:1.55;white-space:pre-line}.zb-doc-total{font-weight:600;white-space:nowrap}
.zb-doc-bottom{display:grid;grid-template-columns:1fr 250px;gap:30px;margin-top:34px}.zb-doc-section-title{font-size:12px;font-weight:700;margin-bottom:5px}.zb-doc-copy{font-size:12px;line-height:1.6;color:#59606d;white-space:pre-line}.zb-doc-notes{margin-top:18px}.zb-summary-row{display:flex;justify-content:space-between;gap:18px;padding:3px 0;font-size:12px}.zb-summary-row strong{font-weight:700}.zb-summary-row.total{border-top:1px solid #e8eaee;margin-top:7px;padding-top:10px;font-size:13px}.zb-summary-row.due{font-size:14px;font-weight:700}
.zb-converted-tag{display:inline-flex;align-items:center;margin-left:7px;padding:2px 7px;border-radius:10px;background:#eaf7ff;color:#0064ff;font-size:10px;font-weight:700;vertical-align:middle}

.zb-right-card{background:#fff;border:1px solid #e8eaee;box-shadow:0 2px 10px rgba(52,57,68,.08);margin-bottom:18px}.zb-right-card h3{margin:0;padding:13px 16px;border-bottom:1px solid #e8eaee;font-size:14px}.zb-right-card-body{padding:14px 12px}.zb-right-card-body .zb-btn + .zb-btn,.zb-right-card-body form + .zb-btn,.zb-right-card-body .zb-btn + form{margin-top:10px}.zb-right-card-body form .zb-btn{width:100%}.zb-right-note{font-size:11px;color:#858c99;line-height:1.5;margin:0 0 10px}.zb-score{padding:24px 10px;text-align:center;color:#00cf7b;font-size:48px;font-weight:700}.zb-score small{font-size:15px;color:#858c99;font-weight:600}

/* Lists */
.zb-list-toolbar{display:flex;align-items:center;gap:6px;margin-bottom:8px;min-height:45px}.zb-filter{height:39px;min-width:130px;padding:0 12px;border:1px solid #dfe2e7;background:#fff;color:#59606d;font-size:12px;border-radius:2px}.zb-filter-scope{min-width:110px}.zb-list-counter{margin-left:auto;color:#59606d;font-size:12px;white-space:nowrap}.zb-create-circle{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:#00cf7b;color:#fff;text-decoration:none;font-size:25px;line-height:1;font-weight:300}
.zb-list-box{background:#fff;border:1px solid #e8eaee;border-left:3px solid #9299a6;box-shadow:0 2px 10px rgba(52,57,68,.08)}.zb-list-row{display:grid;grid-template-columns:32px 54px minmax(160px,1.3fr) minmax(120px,1fr) minmax(115px,.8fr) 24px;align-items:center;gap:12px;min-height:112px;padding:17px 18px;border-bottom:1px solid #e8eaee;color:#343944;text-decoration:none}.zb-list-row:last-child{border-bottom:0}.zb-list-row:hover{background:#f9f9fa}.zb-list-check{width:17px;height:17px}.zb-client-circle{width:44px;height:44px;border-radius:50%;background:#dfe3ea;display:grid;place-items:center;color:#fff;font-size:13px;font-weight:700}.zb-list-primary{font-size:13px;font-weight:700;margin-bottom:3px}.zb-list-secondary{font-size:12px;color:#343944;line-height:1.45}.zb-list-doc-number{font-size:13px;font-weight:700}.zb-status-badge{display:inline-flex;margin-top:5px;padding:3px 8px;border-radius:2px;background:#9299a6;color:#fff;font-size:10px;font-weight:700}.zb-status-badge.sent{background:#0064ff}.zb-status-badge.accepted,.zb-status-badge.paid{background:#00cf7b}.zb-status-badge.refused,.zb-status-badge.overdue,.zb-status-badge.cancelled{background:#ff5964}.zb-status-badge.partial{background:#7c4dff}.zb-list-amount{text-align:right;font-size:18px;font-weight:700;white-space:nowrap}.zb-list-menu{color:#858c99;font-size:22px;text-align:right;position:relative}.zb-list-row-actions{display:flex;gap:7px;margin-top:8px}.zb-list-row-actions a,.zb-list-row-actions button{border:0;background:none;padding:0;color:#858c99;font-size:10px;text-decoration:none;cursor:pointer}.zb-list-row-actions a:hover,.zb-list-row-actions button:hover{color:#0064ff}
.zb-bulkbar{min-height:45px;display:none;align-items:center;justify-content:space-between;gap:10px;padding:7px 10px;margin-bottom:8px;background:#eef5ff;border:1px solid #cfe0ff;font-size:12px}.zb-bulkbar.has-selection{display:flex}.zb-bulk-actions{display:flex;gap:7px;flex-wrap:wrap}.zb-bulk-actions button{height:30px;padding:0 10px;border:1px solid #cad0d9;background:#fff;color:#59606d;font-size:11px;cursor:pointer}.zb-bulk-actions button.danger{color:#d84343;border-color:#efb1b1}.zb-pagination{margin-top:18px;font-size:12px;color:#59606d}.zb-empty{background:#fff;border:1px solid #e8eaee;box-shadow:0 2px 10px rgba(52,57,68,.08);padding:46px;text-align:center;color:#858c99}.zb-empty strong{display:block;color:#343944;font-size:16px;margin-bottom:8px}.zb-list-side-summary{padding:14px 12px}.zb-list-side-summary p{font-size:12px;color:#858c99;line-height:1.5}.zb-list-side-summary .zb-btn{margin-top:8px}

/* Editing */
.zb-edit-page .zb-document-card{padding:0}.zb-edit-page .zb-document-inner{max-width:760px}.zb-edit-form-shell{color:#343944}.zb-edit-form-shell > .grid:first-of-type{display:grid;grid-template-columns:1fr 1fr;gap:16px 28px;margin:0 0 24px}.zb-edit-form-shell label{font-size:11px;color:#858c99;font-weight:500}.zb-edit-form-shell input,.zb-edit-form-shell select,.zb-edit-form-shell textarea{width:100%;border:0!important;border-radius:0!important;box-shadow:none!important;background:#fffad9!important;color:#343944;font-size:12px;padding:5px 7px;line-height:1.4}.zb-edit-form-shell input:focus,.zb-edit-form-shell select:focus,.zb-edit-form-shell textarea:focus{outline:1px solid #ffe88a!important;box-shadow:none!important}.zb-edit-form-shell input[readonly],.zb-edit-form-shell select:disabled,.zb-edit-form-shell textarea[readonly]{background:#f5f5f5!important;color:#59606d}.zb-edit-form-shell .invoice-row,.zb-edit-form-shell .estimate-row{border:0!important;border-bottom:1px solid #e8eaee!important;border-radius:0!important;padding:11px 0!important;background:#fff}.zb-edit-form-shell #invoice-rows,.zb-edit-form-shell #estimate-rows{margin-top:7px!important}.zb-edit-form-shell .invoice-row .grid,.zb-edit-form-shell .estimate-row .grid{display:grid!important;grid-template-columns:1.7fr 2fr .8fr 1fr .7fr 35px!important;gap:8px!important;align-items:start}.zb-edit-form-shell .invoice-row .lg\:col-span-12,.zb-edit-form-shell .estimate-row .lg\:col-span-12{grid-column:1 / -1!important}.zb-edit-form-shell .invoice-row .lg\:col-span-3,.zb-edit-form-shell .estimate-row .lg\:col-span-3,.zb-edit-form-shell .invoice-row .lg\:col-span-2,.zb-edit-form-shell .estimate-row .lg\:col-span-2,.zb-edit-form-shell .invoice-row .lg\:col-span-1,.zb-edit-form-shell .estimate-row .lg\:col-span-1{grid-column:auto!important}.zb-edit-form-shell h3{font-size:13px}.zb-edit-form-shell button[id^="add-"]{background:#00cf7b!important;border:0!important;color:#fff!important;border-radius:2px!important;font-size:11px!important;padding:7px 12px!important}.zb-edit-form-shell .remove-invoice-row,.zb-edit-form-shell .remove-estimate-row{border:0!important;color:#a9afb9!important;font-size:18px!important;background:transparent!important}.zb-edit-form-shell > .mt-8.grid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:28px!important}.zb-edit-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:25px;padding-top:18px;border-top:1px solid #e8eaee}.zb-edit-note{font-size:11px;color:#858c99;margin:4px 0 0}

/* Payments and secondary panels */
.zb-financial-panel{margin-top:18px;background:#fff;border:1px solid #e8eaee;box-shadow:0 2px 10px rgba(52,57,68,.06);padding:20px}.zb-financial-panel h3{margin:0 0 5px;font-size:14px}.zb-financial-panel > p{margin:0 0 14px;color:#858c99;font-size:11px}.zb-payment-form{display:grid;grid-template-columns:1fr 1fr;gap:9px}.zb-payment-form input,.zb-payment-form select,.zb-payment-form textarea{border:1px solid #dfe2e7;border-radius:2px;font-size:12px;padding:9px}.zb-payment-form textarea{grid-column:1/-1}.zb-payment-list{display:flex;flex-direction:column;gap:10px;margin-top:16px}.zb-payment-item{border:1px solid #e8eaee;padding:12px;font-size:11px}.zb-payment-item-head{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.zb-payment-item strong{display:block;font-size:12px;margin-top:2px}.zb-payment-controls{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}.zb-payment-controls details{border:1px solid #e8eaee;padding:10px}.zb-payment-controls summary{cursor:pointer;font-weight:700}.zb-payment-controls form{display:grid;gap:7px;margin-top:10px}.zb-payment-controls input,.zb-payment-controls select,.zb-payment-controls textarea{width:100%;border:1px solid #dfe2e7;padding:7px;font-size:11px}.zb-warning{margin:0 0 14px;padding:10px 12px;border:1px solid #f1d98b;background:#fff8d9;color:#765b16;font-size:11px;line-height:1.5}.zb-info{margin:0 0 14px;padding:10px 12px;border:1px solid #cfe0ff;background:#eef5ff;color:#245da8;font-size:11px;line-height:1.5}.zb-danger-zone{margin-top:18px;background:#fff;border:1px solid #f1c4c4;padding:16px}.zb-danger-zone h3{margin:0 0 7px;color:#b53a3a;font-size:13px}.zb-danger-zone p{font-size:11px;color:#59606d}.zb-danger-zone textarea{width:100%;border:1px solid #dfe2e7;padding:8px;font-size:11px}

/* Public estimate */
.zb-public-body{margin:0;background:#f7f7f8;color:#343944;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif}.zb-public-wrap{max-width:1320px;margin:0 auto;padding:24px 24px 60px;display:grid;grid-template-columns:minmax(0,900px) 280px;gap:24px;align-items:start}.zb-public-toolbar{grid-column:1/-1;min-height:35px}.zb-public-toolbar a{color:#343944;font-size:13px}.zb-public-card{position:relative;background:#fff;border-top:17px solid #eee;box-shadow:0 2px 12px rgba(52,57,68,.08)}.zb-public-card .zb-document-inner{max-width:720px}.zb-public-actions{display:flex;flex-direction:column;gap:16px}.zb-public-accept{min-height:50px;background:#1f925d;color:#fff;border:0;font-size:15px;font-weight:700;cursor:pointer;width:100%}.zb-public-refuse{min-height:42px;background:#fff;color:#c44747;border:1px solid #e2b5b5;font-size:13px;font-weight:700;cursor:pointer;width:100%}.zb-public-history{background:#fff;border:1px solid #e8eaee;box-shadow:0 2px 10px rgba(52,57,68,.08)}.zb-public-history h3{margin:0;padding:14px 16px;border-bottom:1px solid #e8eaee;font-size:14px}.zb-public-history p{margin:0;padding:16px;color:#59606d;font-size:12px;line-height:1.5}

@media (max-width:1180px){
 .zb-topbar{grid-template-columns:260px 1fr 220px}.zb-search-hint{display:none}.zb-topnav a{min-width:90px;padding:0 12px}.zb-workspace,.zb-workspace.zb-workspace-list,.zb-workspace.zb-workspace-edit{grid-template-columns:190px minmax(0,1fr);}.zb-right-column{grid-column:2}.zb-side-stack{grid-row:1 / span 2}.zb-list-row{grid-template-columns:30px 48px minmax(150px,1.2fr) minmax(110px,1fr) minmax(100px,.75fr) 18px}.zb-list-amount{font-size:16px}
}
@media (max-width:820px){
 .zb-topbar{grid-template-columns:1fr auto;height:58px}.zb-app-main{padding-top:58px}.zb-topbar-brand-area{padding:0 16px}.zb-brand{font-size:20px}.zb-topnav{display:none}.zb-topbar-account{border-left:0}.zb-company-menu{min-width:180px}.zb-company-menu summary{height:57px;padding:0 14px}.zb-workspace,.zb-workspace.zb-workspace-list,.zb-workspace.zb-workspace-edit{display:block;padding:16px}.zb-side-stack{margin-bottom:16px}.zb-side-nav-box{display:none}.zb-right-column{margin-top:16px}.zb-document-inner{padding:36px 22px}.zb-action-strip{align-items:flex-start;flex-direction:column}.zb-doc-parties,.zb-doc-head,.zb-doc-bottom{grid-template-columns:1fr}.zb-doc-party-right,.zb-doc-amount,.zb-doc-due{text-align:left}.zb-list-row{grid-template-columns:28px 44px 1fr auto;gap:9px;min-height:96px;padding:12px}.zb-list-row > :nth-child(4),.zb-list-row > :nth-child(6){display:none}.zb-list-amount{font-size:15px}.zb-edit-form-shell > .grid:first-of-type,.zb-edit-form-shell > .mt-8.grid{grid-template-columns:1fr!important}.zb-edit-form-shell .invoice-row .grid,.zb-edit-form-shell .estimate-row .grid{grid-template-columns:1fr 1fr!important}.zb-edit-form-shell .invoice-row .lg\:col-span-12,.zb-edit-form-shell .estimate-row .lg\:col-span-12{grid-column:1/-1!important}.zb-public-wrap{display:block;padding:14px}.zb-public-actions{margin-top:16px}.zb-payment-form,.zb-payment-item-head,.zb-payment-controls{grid-template-columns:1fr}
}

/* === AXE / Phase 7 global ZipBooks theme === */
:root{
    --axe-blue:#0064ff;
    --axe-green:#00cf7b;
    --axe-purple:#7c4dff;
    --axe-red:#ff5964;
    --axe-text:#343944;
    --axe-muted:#858c99;
    --axe-border:#e8eaee;
    --axe-bg:#fafafa;
}
.axe-app{background:var(--axe-bg);color:var(--axe-text);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif}
.axe-general-mode .zb-app-main{padding-top:66px}
.axe-workspace{max-width:1450px;margin:0 auto;padding:32px 26px 70px;display:grid;grid-template-columns:220px minmax(0,1fr);gap:26px;align-items:start}
.axe-side-stack{display:flex;flex-direction:column;gap:18px;position:sticky;top:98px}
.axe-side-box,.axe-company-context{margin:0}
.axe-global-nav .is-active{color:var(--axe-green)!important}
.axe-line-icon{width:20px;height:20px;display:inline-grid;place-items:center;flex:none;color:currentColor}
.axe-line-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.axe-company-context-body{padding:15px 16px;display:flex;flex-direction:column;gap:4px}
.axe-company-context-body strong{font-size:12px}.axe-company-context-body small{font-size:10px;color:var(--axe-muted);overflow-wrap:anywhere}
.axe-general-main{min-width:0}
.axe-page-header{background:transparent;border:0;margin:0 0 18px;padding:0}
.axe-page-content{min-width:0}
.axe-page-content>.py-8,.axe-page-content>.py-12{padding-top:0!important;padding-bottom:0!important}
.axe-page-content .mx-auto{max-width:none!important;padding-left:0!important;padding-right:0!important}
.gv2-header-row{min-height:52px;display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
.gv2-eyebrow{color:var(--axe-green)!important;font-size:10px!important;font-weight:700!important;letter-spacing:.08em!important;text-transform:uppercase}
.gv2-title{margin:3px 0 2px!important;color:var(--axe-text)!important;font-size:25px!important;line-height:1.15!important;letter-spacing:-.02em!important}
.gv2-subtitle{margin:0!important;color:var(--axe-muted)!important;font-size:12px!important}
.gv2-button{border-radius:2px!important;min-height:40px!important;padding:0 17px!important;font-size:12px!important;box-shadow:none!important}
.gv2-button-primary{background:var(--axe-blue)!important;border-color:var(--axe-blue)!important;color:#fff!important}
.gv2-button-secondary{background:#fff!important;border:1px solid #dfe2e7!important;color:#59606d!important}
.gv2-panel,.gv2-data-card,.gv2-client-kpi,.gv2-company-card,.axe-page-content .bg-white{border:1px solid var(--axe-border)!important;border-radius:0!important;box-shadow:0 2px 10px rgba(52,57,68,.06)!important;background:#fff!important}
.gv2-list-page,.gv2-client-page,.gv2-dashboard,.gv2-companies-page{max-width:none!important;margin:0!important;padding:0!important}
.gv2-list-summary{border:1px solid var(--axe-border)!important;border-radius:0!important;box-shadow:none!important;background:#fff!important}
.gv2-data-table th{background:#fbfbfc!important;color:var(--axe-muted)!important;font-size:10px!important;text-transform:uppercase!important;letter-spacing:.03em!important}
.gv2-data-table td{font-size:12px!important;border-color:var(--axe-border)!important}.gv2-data-table tbody tr:hover{background:#f9f9fa!important}
.gv2-table-avatar,.gv2-list-avatar{background:#dfe3ea!important;color:#fff!important;border-radius:50%!important}
.gv2-pill{border-radius:2px!important}.gv2-pill-success{background:#e5fbf2!important;color:#00a861!important}.gv2-pill-info{background:#eaf2ff!important;color:#0064ff!important}.gv2-pill-danger{background:#fff0f1!important;color:#e04854!important}
.gv2-row-actions a,.gv2-row-actions button{font-size:11px!important;color:#858c99!important}.gv2-row-actions .is-primary{color:#0064ff!important}
.gv2-form-field input,.gv2-form-field select,.gv2-form-field textarea,.axe-general-main input:not([type=checkbox]):not([type=radio]):not([type=file]),.axe-general-main select,.axe-general-main textarea{border-radius:2px!important;border-color:#dfe2e7!important;box-shadow:none!important;font-size:12px!important}
.axe-general-main input:focus,.axe-general-main select:focus,.axe-general-main textarea:focus{border-color:#7ba7ff!important;box-shadow:0 0 0 2px rgba(0,100,255,.08)!important}
.axe-general-main .rounded-lg,.axe-general-main .rounded-xl,.axe-general-main .sm\:rounded-lg,.axe-general-main .rounded-md{border-radius:2px!important}
.axe-simple-textarea{width:100%;border:1px solid #dfe2e7;padding:8px;font-size:11px;margin-bottom:10px}

/* Topbar rebrand refinements */
.zb-brand strong{text-transform:lowercase;font-weight:800;letter-spacing:-.04em}
.axe-search-icon{font-size:23px;color:#9aa2b0;line-height:1}
.zb-topbar{grid-template-columns:minmax(370px,1fr) auto minmax(245px,.55fr)}
.zb-topnav a{min-width:105px}

/* Clickable document rows */
.zb-click-row{cursor:pointer;transition:background .12s ease}.zb-click-row:focus{outline:2px solid rgba(0,100,255,.18);outline-offset:-2px}.zb-click-row:hover{background:#f7f9fc}

/* Dashboard */
.axe-dashboard-page{display:flex;flex-direction:column;gap:18px}
.axe-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.axe-kpi-card{background:#fff;border:1px solid var(--axe-border);box-shadow:0 2px 10px rgba(52,57,68,.05);padding:18px 20px;text-decoration:none;display:flex;flex-direction:column;min-height:108px}
.axe-kpi-card:hover{border-color:#d9dde4}.axe-kpi-card span{font-size:11px;color:var(--axe-muted)}.axe-kpi-card strong{margin-top:6px;font-size:21px;color:var(--axe-text);letter-spacing:-.02em}.axe-kpi-card small{margin-top:auto;font-size:10px;color:#a0a6b1}
.axe-dashboard-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.axe-dashboard-card{background:#fff;border:1px solid var(--axe-border);box-shadow:0 2px 10px rgba(52,57,68,.05);padding:18px}.axe-dashboard-card.span-2{grid-column:span 2}.axe-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:16px}.axe-card-head h2{margin:0;font-size:14px}.axe-card-head p{margin:3px 0 0;color:var(--axe-muted);font-size:10px}.axe-card-head>a{font-size:10px;color:var(--axe-blue);text-decoration:none}
.axe-chart-legend{display:flex;gap:12px;color:var(--axe-muted);font-size:10px}.axe-chart-legend span:before{content:"";display:inline-block;width:7px;height:7px;margin-right:5px}.axe-chart-legend .invoiced:before{background:var(--axe-blue)}.axe-chart-legend .paid:before{background:var(--axe-green)}
.axe-bars-chart{height:190px;border-bottom:1px solid var(--axe-border);display:grid;grid-template-columns:repeat(6,1fr);align-items:end;gap:10px;padding:5px 10px 0}.axe-bars-month{height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center}.axe-bars-pair{height:155px;display:flex;gap:4px;align-items:flex-end}.axe-bar{width:13px;display:block;min-height:3px}.axe-bar.invoiced{background:var(--axe-blue)}.axe-bar.paid{background:var(--axe-green)}.axe-bars-month small{height:28px;padding-top:7px;color:var(--axe-muted);font-size:9px}
.axe-status-stack{display:flex;flex-direction:column;gap:12px}.axe-status-line>div:first-child{display:flex;justify-content:space-between;font-size:11px}.axe-status-line strong{font-size:11px}.axe-status-track{height:5px;background:#f0f1f3;margin-top:6px}.axe-status-track span{display:block;height:100%;background:#9299a6}.axe-status-track .sent{background:var(--axe-blue)}.axe-status-track .partial{background:var(--axe-purple)}.axe-status-track .paid{background:var(--axe-green)}.axe-status-track .overdue{background:var(--axe-red)}
.axe-ranked-list{display:flex;flex-direction:column}.axe-ranked-list>a{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid #f0f1f3;text-decoration:none}.axe-ranked-list>a:last-child{border-bottom:0}.axe-rank-avatar{width:32px;height:32px;border-radius:50%;background:#dfe3ea;color:#fff;display:grid;place-items:center;font-size:10px;font-weight:700}.axe-ranked-list a>span:last-child{display:flex;flex-direction:column;min-width:0}.axe-ranked-list strong{font-size:11px}.axe-ranked-list small{font-size:10px;color:var(--axe-muted);margin-top:2px}
.axe-mini-stats{display:grid;grid-template-columns:1fr 1fr}.axe-mini-stats a{min-height:80px;padding:12px;text-decoration:none;border:1px solid #f0f1f3;margin:-1px 0 0 -1px;display:flex;flex-direction:column;justify-content:center}.axe-mini-stats strong{font-size:22px}.axe-mini-stats span{font-size:10px;color:var(--axe-muted);margin-top:3px}
.axe-recent-columns{display:grid;grid-template-columns:1fr 1fr;gap:24px}.axe-recent-columns h3{margin:0 0 6px;font-size:11px;color:var(--axe-muted);text-transform:uppercase}.axe-recent-columns a{display:flex;justify-content:space-between;gap:12px;text-decoration:none;padding:9px 0;border-bottom:1px solid #f0f1f3}.axe-recent-columns a>span{display:flex;flex-direction:column}.axe-recent-columns strong,.axe-recent-columns b{font-size:11px}.axe-recent-columns small{font-size:10px;color:var(--axe-muted);margin-top:2px}.axe-empty-mini{font-size:11px;color:var(--axe-muted);padding:12px 0}

/* Settings */
.axe-settings-page{max-width:980px}.axe-settings-stack{display:flex;flex-direction:column;gap:16px}.axe-settings-card{background:#fff;border:1px solid var(--axe-border);box-shadow:0 2px 10px rgba(52,57,68,.05);padding:20px}.axe-settings-head{display:flex;justify-content:space-between;gap:14px;margin-bottom:18px;padding-bottom:14px;border-bottom:1px solid #f0f1f3}.axe-settings-head h2{margin:0;font-size:14px}.axe-settings-head p{margin:4px 0 0;color:var(--axe-muted);font-size:10px;line-height:1.5}.axe-settings-head code{background:#f4f5f7;padding:1px 4px}.axe-form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.axe-form-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.axe-field{display:flex;flex-direction:column;gap:6px}.axe-field.full{grid-column:1/-1}.axe-field>span{font-size:10px;font-weight:600;color:#59606d}.axe-field input,.axe-field select,.axe-field textarea{width:100%;padding:9px 10px;border:1px solid #dfe2e7;background:#fff;color:var(--axe-text);font-size:12px}.axe-settings-savebar{display:flex;justify-content:flex-end;padding:4px 0 20px}

/* Existing cards made more ZipBooks-like */
.gv2-client-kpis{gap:12px!important}.gv2-client-kpi{padding:17px!important}.gv2-client-kpi span{color:var(--axe-muted)!important;font-size:10px!important}.gv2-client-kpi strong{font-size:18px!important}.gv2-panel-head{border-bottom:1px solid #f0f1f3!important}.gv2-company-grid{gap:14px!important}.gv2-company-card.is-active{border-left:3px solid var(--axe-green)!important}.gv2-company-card-avatar{border-radius:50%!important;background:#dfe3ea!important;color:#fff!important}

/* Modal theme */
.gv2-modal-card{border-radius:2px!important;border:1px solid var(--axe-border);box-shadow:0 20px 60px rgba(52,57,68,.2)!important}.gv2-btn{border-radius:2px!important}.gv2-btn-primary{background:var(--axe-blue)!important}

/* Document tune-up */
.zb-document-inner{width:100%;max-width:760px}.zb-doc-parties{align-items:start}.zb-doc-party{min-width:0}.zb-doc-party div{overflow-wrap:anywhere}.zb-doc-table th:not(:first-child),.zb-doc-table td:not(:first-child){text-align:center}.zb-doc-table .zb-doc-total{text-align:right!important}.zb-line-desc{white-space:pre-line;overflow-wrap:anywhere}.zb-public-card .zb-document-inner{max-width:760px}

@media(max-width:1100px){.zb-topnav a{min-width:84px;padding:0 12px}.zb-topbar{grid-template-columns:1fr auto}.zb-topbar-account{grid-column:2}.axe-workspace{grid-template-columns:190px minmax(0,1fr)}.axe-kpi-grid{grid-template-columns:1fr 1fr}.axe-dashboard-grid{grid-template-columns:1fr 1fr}.axe-dashboard-card.span-2{grid-column:span 2}}
@media(max-width:820px){.zb-topnav{display:none}.zb-topbar{grid-template-columns:1fr auto}.zb-search-hint{display:none}.axe-workspace{display:block;padding:20px 14px 50px}.axe-side-stack{position:static;margin-bottom:18px}.axe-side-box .zb-side-nav{display:grid;grid-template-columns:1fr 1fr}.axe-company-context{display:none}.axe-kpi-grid,.axe-dashboard-grid{grid-template-columns:1fr}.axe-dashboard-card.span-2{grid-column:span 1}.axe-recent-columns{grid-template-columns:1fr}.axe-form-grid,.axe-form-grid.two{grid-template-columns:1fr}.axe-field.full{grid-column:auto}}
.axe-public-result{min-height:100vh;display:grid;place-items:center;padding:24px}.axe-public-result-card{width:min(520px,100%);background:#fff;border:1px solid var(--axe-border);box-shadow:0 2px 12px rgba(52,57,68,.08);padding:32px;text-align:center}.axe-public-brand{display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:22px;font-size:24px}.axe-public-result-card h1{margin:0;font-size:22px}.axe-public-result-card p{margin:13px 0;color:#59606d;font-size:13px;line-height:1.65}.axe-public-result-card small{display:block;color:var(--axe-muted);margin-bottom:22px}
