/* The VintageInvoice atelier: ink, brass, sea glass and good paper. */
:root { --navy: #142c3c; --teal: #1a6f74; --gold: #a8843a; --brick: #8f3f36; --cream: #f6f3ea; --paper: #fffcf7; --muted: #4f5c58; --line: #cbb892; }
html { background:
    radial-gradient(1200px 480px at 10% -10%, #d7ebea55, transparent 55%),
    radial-gradient(900px 420px at 90% 0%, #f0e2c455, transparent 50%),
    var(--cream);
  color: var(--navy); font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif; }
body { margin: 0; }
*, *::before, *::after { box-sizing: border-box; }
a { color: var(--teal); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid #147b87; outline-offset: 3px; }
button:disabled { opacity: .65; cursor: wait; }
::placeholder { color: #53605b; opacity: 1; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: 0; transform: translateY(-200%); left: 16px; z-index: 2000; background: var(--cream); color: var(--navy); padding: 12px 18px; }
.skip-link:focus { top: 12px; transform: none; }
.vintage-site { background: var(--cream) !important; }
.vintage-site .vintage-header { background: var(--navy); color: var(--cream); border: 0; border-top: 5px solid var(--gold); border-bottom: 1px solid #47616b; padding: 20px 3vw; gap: 20px; }
.vintage-site .vintage-brand a { font-family: Georgia, serif; font-size: 29px; color: var(--cream); letter-spacing: -.05em; text-decoration: none; }
.vintage-site .vintage-brand small { color: #e6c782; font-size: 9px; letter-spacing: .15em; margin-top: 6px; }
.vintage-site .vintage-navigation { gap: 14px; font-family: system-ui, sans-serif; font-size: 12px; }
.vintage-site .vintage-navigation a { color: var(--cream); text-decoration: none; padding-block: 9px; font-family: inherit; font-weight: 500; }
.vintage-site .vintage-navigation a:hover { color: #e6c782; text-decoration: underline; }
.vintage-site .vintage-navigation .header-signin-button, .vintage-site .header-signout-button { color: var(--cream); background: transparent; border: 1px solid #bca366; border-radius: 0; padding: 9px 12px; font-size: 12px; }
.vintage-site .header-signout-button:hover { background: var(--cream); color: var(--navy); }
.navigation-toggle { display: none; background: transparent; color: var(--cream); border: 1px solid #bca366; padding: 10px 14px; }
.vintage-site .vintage-content { min-width: 0; }
.vintage-site .vintage-footer { background: var(--navy); color: #e9dec5; border-top: 4px double var(--gold); font-family: system-ui, sans-serif; font-size: 12px; padding: 24px 3vw; }
.design-library { max-width: 1240px; margin: 0 auto; padding: 34px 24px 24px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 36px; align-items: start; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fffcf780, transparent); }
.collection-eyebrow { color: var(--teal); text-transform: uppercase; font-size: 10px; font-weight: 750; letter-spacing: .2em; margin: 0 0 12px; }
.design-library h1 { font: normal clamp(30px, 3.2vw, 44px)/1.1 "Fraunces", "Palatino Linotype", Georgia, serif; letter-spacing: -.04em; color: var(--navy); margin: 0 0 10px; }
.design-library-intro > p:last-child { font-size: 14px; line-height: 1.55; color: var(--muted); margin: 0; max-width: 36ch; }
.design-selectors { display: grid; grid-template-columns: 1fr 1.25fr auto; gap: 12px; align-items: end; }
.design-selectors label { display: block; color: var(--navy); font-size: 11px; text-transform: uppercase; font-weight: 700; letter-spacing: .08em; margin-bottom: 8px; }
.design-selectors select { width: 100%; min-width: 0; min-height: 46px; background: var(--paper); color: var(--navy); border: 1px solid #b7a67c; border-bottom: 3px solid var(--teal); padding: 10px; font-size: 13px; }
.design-favorite-toggle { min-height: 46px; min-width: 46px; border: 1px solid #b7a67c; background: var(--paper); color: var(--brick); font-size: 20px; line-height: 1; }
.design-favorite-toggle[aria-pressed="true"] { background: #fff4e8; border-bottom: 3px solid var(--brick); }
.design-period-count { margin: 6px 0 0; font-size: 11px; color: var(--muted); grid-column: 1 / -1; }
.design-selection-detail { grid-column: 1 / -1; display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 16px; align-items: stretch; }
.design-preview-chip { min-height: 88px; padding: 12px; border: 1px solid var(--rule, #9c823f); background: var(--paper, #f4df83); color: var(--ink, #292514); display: flex; flex-direction: column; justify-content: center; gap: 8px; box-shadow: inset 0 0 0 1px #0000000d; }
.design-preview-masthead { font: 700 11px/1.2 Georgia, serif; letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.design-preview-rule { height: 3px; background: var(--rule, #9c823f); opacity: .85; }
.design-preview-row { height: 6px; background: var(--wash, #dfc45f); opacity: .9; }
.design-preview-row.short { width: 62%; }
#design-description { font: 12px/1.6 system-ui, sans-serif; color: var(--muted); min-height: 38px; margin: 0; display: grid; gap: 4px; align-content: center; }
.design-selected-name { display: block; color: var(--navy); font: 700 14px/1.2 Georgia, serif; letter-spacing: -.01em; }
.design-selected-period { display: block; color: var(--brick); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.payment-status-hint { display: block; margin-top: 6px; font-size: 11px; color: var(--muted); line-height: 1.4; }
.invoice-quick-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.invoice-quick-actions a, .invoice-quick-actions button { font: 12px/1.2 system-ui, sans-serif; }
.dashboard-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 0 0 16px; }
.dashboard-toolbar label { display: grid; gap: 6px; font-size: 12px; font-weight: 700; color: var(--navy); }
.dashboard-toolbar input, .dashboard-toolbar select { min-height: 40px; min-width: 180px; padding: 8px 10px; border: 1px solid #b7a67c; background: var(--paper); }
.status-pill { display: inline-block; padding: 3px 8px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border: 1px solid currentColor; }
.status-pill.paid { color: #426348; }
.status-pill.sent { color: #2f5f86; }
.status-pill.draft { color: #6b6458; }
.status-pill.failed { color: #8f3f36; }
.status-pill.unpaid { color: #8f3f36; }
.invoice-table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.invoice-bottom-controls { position: sticky; bottom: 0; z-index: 5; }
.invoice-workspace { max-width: 1240px; padding: 0 24px; gap: 28px; margin-top: 24px; }
.vintage-invoice.document-sheet { width: 100%; margin-top: 0; box-shadow: 0 10px 25px #162e4019, 0 1px 3px #162e4015; }
.vintage-invoice .invoice-title-editor h2 { border: 0; }
.vintage-invoice.document-sheet input { min-height: 34px; }
.vintage-invoice.document-sheet select { min-height: 36px; }
.vintage-invoice.document-sheet input[type=checkbox] { min-height: 0; width: 24px; height: 24px; accent-color: var(--teal); }
.document-sheet .invoice-customer-fields { width: 100%; max-width: 580px; }
.document-sheet .invoice-customer-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 10px; }
.document-sheet .invoice-customer-row a { grid-column: 2; font: 12px system-ui, sans-serif; }
.document-sheet .invoice-customer-row label { font-size: 12px; }
.document-sheet .invoice-price-wrapper { align-items: center; flex-wrap: nowrap; }
.document-sheet .invoice-details label { font-weight: normal; }
.document-sheet .invoice-table button { font: 11px system-ui, sans-serif; padding: 7px; }
.invoice-ad-sidebar .ad-placeholder { background: #eee5cf; color: var(--navy); border-radius: 0; border: 1px solid #b3a27a; border-top: 5px solid var(--brick); min-height: 300px; padding: 25px 18px; }
.invoice-ad-sidebar .ad-placeholder span { color: #59615b; letter-spacing: .16em; font-size: 9px; }
.invoice-ad-sidebar .ad-placeholder h3 { font: normal 24px/1.15 Georgia, serif; margin-top: 45px; }
.invoice-ad-sidebar .ad-placeholder p { font-size: 12px; line-height: 1.7; color: #4c5a53; }
.invoice-bottom-controls .invoice-editor-toolbar { background: var(--teal); color: #fff9e9; border: 0; border-top: 4px double #d0b573; border-radius: 0; padding: 22px; }
.invoice-editor-toolbar .stamp-controls { gap: 8px 12px; }
.invoice-editor-toolbar .stamp-controls label { font-size: 11px; }
.invoice-editor-toolbar .stamp-controls select { background: var(--cream); color: var(--navy); border: 1px solid #bdc7b5; min-height: 38px; font-size: 12px; }
.invoice-actions button { background: var(--navy); color: white; border-radius: 0; border: 1px solid #b7c7b9; min-height: 42px; }
.invoice-actions button:hover { background: #0c2630; }
.invoice-actions input { min-height: 42px; padding: 9px; background: var(--cream); color: var(--navy); border: 1px solid #a4b6a7; max-width: 100%; }
.save-status { font-size: 13px; line-height: 1.5; }
.vintage-site .vintage-home { text-align: left; padding: 42px 28px; }
.vintage-site .vintage-home h1 { max-width: 850px; color: var(--navy); font-size: clamp(36px, 5vw, 68px); font-weight: normal; line-height: 1.08; letter-spacing: -.04em; }
.vintage-site .vintage-home-lead { margin: 0; color: #4d5f5d; font-size: 18px; }
.vintage-site .vintage-home-button { border-radius: 0; background: var(--teal); padding: 15px 24px; }
.vintage-site .vintage-home-secondary-button { border-radius: 0; color: var(--brick); border-color: var(--brick); padding: 13px 24px; }
.vintage-site .vintage-home-image { border-radius: 0; border: 8px solid #e8d7af; box-shadow: none; margin-block: 35px; }
.vintage-site .vintage-feature-card { border-radius: 0; border-top: 5px solid var(--teal); background: #f5ebd4; box-shadow: none; }
.vintage-site .vintage-feature-card:nth-child(2) { border-top-color: var(--brick); }
.vintage-site .vintage-feature-card:nth-child(3) { border-top-color: var(--gold); }
.vintage-site .vintage-dashboard-container { max-width: 1240px; }
.vintage-site .vintage-dashboard-title { color: var(--navy); font-weight: normal; overflow-wrap: anywhere; }
.vintage-site .vintage-stat-card { border-radius: 0; border: 1px solid #cdbb8e; border-top: 5px solid var(--teal); box-shadow: none; background: #f5ecd8; }
.vintage-site .vintage-stat-card:nth-child(2) { border-top-color: var(--brick); }
.vintage-site .vintage-stat-card:nth-child(3) { border-top-color: var(--gold); }
.vintage-site .vintage-dashboard-card { border-radius: 0; border: 1px solid #cdbb8e; box-shadow: none; background: #fffcf4; }
.vintage-site .vintage-dashboard-button { background: var(--navy); border-radius: 0; color: var(--cream); }
.dashboard-table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.dashboard-table-scroll table { min-width: 660px; }
.vintage-site .company-form, .vintage-site .customer-form-card { border-radius: 0; background: #f5ecd8; border: 1px solid #bba575; border-top: 6px solid var(--teal); box-shadow: none; }
.vintage-site .customer-card { border-radius: 0; border-left: 4px solid var(--gold); background: #fffcf4; }
.vintage-site .customer-primary-button, .vintage-site .save-business-button { background: var(--teal); color: white; border-radius: 0; box-shadow: none; border: 1px solid var(--teal); }
.vintage-site .customer-secondary-button { border-radius: 0; border: 1px solid var(--teal); color: var(--teal); }
@media (max-width: 1050px) {
    .vintage-site .vintage-header { align-items: center; justify-content: space-between; }
    .navigation-toggle { display: block; }
    .vintage-site .vintage-navigation { display: none; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; border-top: 1px solid #738177; padding-top: 14px; }
    .vintage-site .vintage-navigation.is-open { display: grid; }
    .vintage-site .vintage-navigation a { padding: 10px 0; }
}
@media (max-width: 650px) {
    .vintage-site .vintage-header { padding: 16px; gap: 12px; }
    .vintage-site .vintage-brand a { font-size: 26px; }
    .vintage-site .vintage-brand small { font-size: 8px; }
    .design-library { padding: 26px 16px 18px; grid-template-columns: 1fr; gap: 22px; }
    .design-selectors { grid-template-columns: 1fr auto; }
    .design-selectors > div:first-child, .design-selectors > div:nth-child(2) { grid-column: 1 / -1; }
    .design-selectors select { font-size: 16px; }
    .design-favorite-button { min-height: 44px; min-width: 44px; }
    .design-selection-detail { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; }
    .invoice-workspace { padding: 0 12px; gap: 12px; grid-template-columns: 1fr; }
    .invoice-ad-sidebar { display: none; }
    .document-sheet .invoice-customer-row { display: flex; align-items: stretch; }
    .document-sheet .invoice-customer-row a { align-self: start; }
    .document-sheet input, .document-sheet select, .document-sheet textarea { font-size: 16px; }
    .document-sheet .invoice-table { min-width: 520px; }
    .document-sheet .invoice-table button { min-height: 42px; width: 100%; }
    .invoice-editor-toolbar .stamp-controls { display: grid; grid-template-columns: 1fr; gap: 6px; }
    .invoice-editor-toolbar .stamp-controls select { width: 100%; font-size: 16px; margin-bottom: 10px; }
    .invoice-actions { flex-direction: column; align-items: stretch; }
    .invoice-actions button, .invoice-actions input { width: 100%; min-height: 44px; }
    .invoice-bottom-controls .invoice-editor-toolbar { padding: 18px; box-shadow: 0 -8px 24px #162e4030; }
    .invoice-ad-sidebar .ad-placeholder { min-height: 160px; margin-bottom: 20px; }
    .invoice-ad-sidebar .ad-placeholder h3 { margin-top: 20px; }
    .dashboard-toolbar label { width: 100%; }
    .dashboard-toolbar input, .dashboard-toolbar select { min-width: 0; width: 100%; font-size: 16px; }
    .vintage-site .vintage-home { padding: 22px 16px; }
    .vintage-site .vintage-home-actions { display: flex; flex-direction: column; gap: 12px; }
    .vintage-site .vintage-footer { padding: 20px 16px; }
}
@media print {
    .skip-link, .vintage-header, .vintage-footer, .navigation-toggle, .design-library, .invoice-ad-sidebar, .invoice-bottom-controls, .editor-only { display: none !important; }
    .vintage-site { background: transparent !important; }
    .document-sheet input, .document-sheet select { appearance: none; }
    .vintage-invoice .invoice-table th:last-child, .vintage-invoice .invoice-table td:last-child { display: none; }
}
