:root {
  --ink: #0b1f2c;
  --navy: #071926;
  --navy-2: #0c2b3a;
  --ocean: #08769a;
  --teal: #21b7a8;
  --aqua: #dff8f5;
  --sky: #e8f5fa;
  --paper: #ffffff;
  --canvas: #f2f6f8;
  --line: #dbe5e9;
  --muted: #6c7f89;
  --danger: #c43c45;
  --warning: #b86b16;
  --success: #17765f;
  --shadow: 0 12px 36px rgba(7, 25, 38, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { letter-spacing: -.035em; }

.eyebrow { margin: 0 0 8px; color: var(--ocean); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.muted { color: var(--muted); }
.fine-print { margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; }
.desktop-only { display: inline; }

.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); color: var(--ink); font-weight: 750; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(7,25,38,.08); }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.button-primary { border-color: transparent; color: #fff; background: linear-gradient(135deg, #0a819f, #159b94); box-shadow: 0 9px 20px rgba(8, 118, 154, .2); }
.button-dark { border-color: var(--navy); color: #fff; background: var(--navy); }
.button-light { background: #f8fbfc; }
.button-wide { width: 100%; }
.back-link, .text-link, .row-link, .panel-header > a { color: var(--ocean); font-weight: 750; }
.row-link { white-space: nowrap; font-size: 13px; }

.alert { margin-bottom: 18px; padding: 13px 16px; border: 1px solid; border-radius: 12px; font-weight: 650; line-height: 1.4; }
.alert-success { color: #0f634f; border-color: #a7ddcf; background: #e7f8f2; }
.alert-error { color: #91353e; border-color: #edb7bc; background: #fff0f1; }

label { display: flex; flex-direction: column; gap: 7px; color: #35505d; font-size: 13px; font-weight: 750; }
label small { color: var(--muted); font-weight: 500; }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #cbd9de; border-radius: 10px; outline: none; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--ocean); box-shadow: 0 0 0 3px rgba(8,118,154,.12); }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
fieldset:disabled { opacity: .78; }
.stack-form { display: grid; gap: 15px; }
.inline-form, .filter-form, .search-form { display: flex; align-items: end; gap: 10px; }
.search-form { flex: 1; max-width: 720px; }
.search-form input { min-width: 280px; }
.filter-form input, .filter-form select { width: auto; min-width: 170px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 17px; }
.form-grid.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.protection-note, .lock-note { color: var(--muted); font-size: 12px; font-weight: 650; }
.section-title { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 20px; }
.section-title h2 { margin: 0; font-size: 23px; }
.section-divider { height: 1px; margin: 28px 0; background: var(--line); }

.install-body, .login-body { min-height: 100vh; background: var(--navy); }
.install-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.brand-panel, .login-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: clamp(38px, 7vw, 100px); color: #fff; background: radial-gradient(circle at 15% 20%, rgba(33,183,168,.28), transparent 32%), radial-gradient(circle at 90% 80%, rgba(8,118,154,.36), transparent 38%), #071926; }
.brand-panel::after, .login-brand::after { content: ""; position: absolute; width: 420px; height: 420px; right: -150px; bottom: -180px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 60px rgba(255,255,255,.03), 0 0 0 120px rgba(255,255,255,.02); }
.brand-panel > *, .login-brand > * { position: relative; z-index: 1; }
.brand-panel h1 { max-width: 620px; margin: 12px 0 20px; font-size: clamp(42px, 5.4vw, 72px); line-height: .98; }
.brand-panel > p:not(.eyebrow) { max-width: 560px; color: #c9d9df; font-size: 18px; line-height: 1.65; }
.check-list { display: grid; gap: 12px; margin: 28px 0 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 29px; color: #d9e8ec; line-height: 1.45; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: -1px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: var(--navy); background: var(--teal); font-size: 12px; font-weight: 900; }
.install-card { align-self: center; width: min(570px, calc(100% - 48px)); margin: 42px auto; padding: clamp(28px, 4vw, 50px); border-radius: 24px; background: #fff; box-shadow: 0 26px 80px rgba(0,0,0,.25); }
.install-card h2, .login-card h2 { margin: 16px 0 6px; font-size: 30px; }
.step-pill { display: inline-flex; padding: 6px 10px; border-radius: 999px; color: #086b73; background: var(--aqua); font-size: 11px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.system-checks { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 7px 9px; margin: 22px 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; color: #4c626c; font-size: 13px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; }
.status-dot.ok { background: #20a678; box-shadow: 0 0 0 4px #e1f7ef; }
.status-dot.bad { background: #d94c54; box-shadow: 0 0 0 4px #ffe8ea; }

.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(430px, .85fr); }
.brand-lockup { display: flex; align-items: center; gap: 13px; }
.brand-lockup div { display: flex; flex-direction: column; }
.brand-lockup strong { font-size: 22px; letter-spacing: -.03em; }
.brand-lockup span { color: #7f98a4; font-size: 12px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.login-brand .brand-lockup { position: absolute; top: 42px; left: clamp(38px, 7vw, 100px); }
.login-copy h1 { max-width: 700px; margin: 12px 0 22px; font-size: clamp(48px, 6.2vw, 88px); line-height: .96; }
.login-copy h1 span { color: #55d5c8; }
.login-copy > p:not(.eyebrow) { max-width: 600px; color: #bed0d7; font-size: 18px; line-height: 1.65; }
.login-proof { position: absolute; left: clamp(38px, 7vw, 100px); bottom: 42px; display: flex; gap: 12px; }
.login-proof span { padding: 8px 11px; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; color: #bcd0d7; font-size: 12px; }
.login-card-wrap { display: grid; place-items: center; padding: 30px; background: #f5f8f9; }
.login-card { width: min(440px, 100%); display: grid; gap: 18px; padding: 40px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.client-portal-link { display: block; margin-top: 4px; color: var(--ocean); font-size: 13px; font-weight: 750; text-align: center; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 252px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; z-index: 20; height: 100vh; display: flex; flex-direction: column; padding: 25px 17px 18px; color: #dce9ed; background: radial-gradient(circle at 50% -15%, rgba(33,183,168,.2), transparent 35%), var(--navy); }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 25px; }
.sidebar-brand span { display: flex; flex-direction: column; }
.sidebar-brand strong { color: #fff; font-size: 20px; letter-spacing: -.03em; }
.sidebar-brand small { color: #7f9aa5; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.sidebar-nav { display: grid; gap: 5px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 47px; padding: 10px 13px; border-radius: 11px; color: #9fb4bd; font-size: 14px; font-weight: 700; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-link.active { color: #fff; background: linear-gradient(90deg, rgba(33,183,168,.24), rgba(8,118,154,.13)); box-shadow: inset 3px 0 0 #36c6b7; }
.nav-icon { width: 20px; height: 20px; flex: 0 0 auto; }
.sidebar-user { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 10px; margin-top: auto; padding: 14px 8px 0; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-user > div:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.sidebar-user strong { overflow: hidden; color: #fff; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user span { color: #849da7; font-size: 10px; }
.sidebar-user > a { color: #8da5af; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: linear-gradient(135deg,var(--ocean),var(--teal)); font-weight: 850; }
.main-panel { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 15; min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px clamp(20px, 3vw, 42px); border-bottom: 1px solid rgba(219,229,233,.8); background: rgba(242,246,248,.9); backdrop-filter: blur(16px); }
.topbar h1 { margin: 0; font-size: 25px; }
.topbar-kicker { margin: 0 0 3px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .15em; }
.topbar-actions { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 650; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #1bac76; box-shadow: 0 0 0 4px rgba(27,172,118,.12); }
.menu-button { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.content-wrap { width: min(1480px, 100%); margin: 0 auto; padding: 28px clamp(18px, 3vw, 42px) 60px; }

.panel { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 4px 18px rgba(7,25,38,.035); }
.panel-header { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.panel-header h2 { margin: 0; font-size: 21px; }
.panel-header > span, .panel-header > a { color: var(--muted); font-size: 12px; }
.panel-header > a { color: var(--ocean); }
.form-panel { padding: clamp(22px,3vw,34px); }
.page-actions { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-actions > div { display: flex; gap: 10px; }
.welcome-strip { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; padding: 8px 2px; }
.welcome-strip h2 { margin: 0 0 5px; font-size: 30px; }
.welcome-strip p:last-child { margin: 0; color: var(--muted); }
.quick-actions { display: flex; gap: 9px; }
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.metric-card { position: relative; overflow: hidden; min-height: 145px; display: flex; flex-direction: column; justify-content: center; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 4px 18px rgba(7,25,38,.035); }
.metric-card::after { content: ""; position: absolute; right: -25px; top: -28px; width: 90px; height: 90px; border-radius: 50%; background: var(--card-accent, #e8f5fa); opacity: .75; }
.metric-card > * { position: relative; z-index: 1; }
.metric-card span { color: var(--muted); font-size: 12px; font-weight: 750; }
.metric-card strong { margin: 8px 0 6px; font-size: clamp(25px,2.1vw,35px); letter-spacing: -.045em; }
.metric-card small { color: #8da0a9; }
.accent-1 { --card-accent: #d8f7f1; }.accent-2 { --card-accent: #dceffa; }.accent-3 { --card-accent: #fff0d9; }.accent-4 { --card-accent: #e7e4fb; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(270px,.72fr); gap: 18px; }
.route-list { display: grid; }
.route-row { display: grid; grid-template-columns: 58px minmax(0,1fr) auto; align-items: center; gap: 16px; padding: 14px 3px; border-top: 1px solid #edf2f4; }
.route-row:first-child { border-top: 0; }
.route-row:hover .route-main strong { color: var(--ocean); }
.route-row time { height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; background: var(--sky); }
.route-row time strong { font-size: 19px; }.route-row time span { color: var(--ocean); font-size: 8px; font-weight: 850; }
.route-main, .route-meta { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.route-main strong, .route-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-main span, .route-meta small { color: var(--muted); font-size: 12px; }
.route-meta { align-items: end; }
.attention-panel { color: #fff; background: linear-gradient(150deg,#0c3142,#071926); border-color: transparent; }
.attention-panel .eyebrow { color: #5cdbcf; }.attention-panel h2 { margin-bottom: 20px; }.attention-panel .text-link { color: #64d9cf; font-size: 12px; }
.rule-item { display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 15px 0; border-top: 1px solid rgba(255,255,255,.1); }
.rule-item strong { color: #5cdbcf; font-size: 20px; }.rule-item span { color: #b7cbd2; font-size: 12px; line-height: 1.55; }
.empty-inline, .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 150px; padding: 30px; color: var(--muted); text-align: center; }
.empty-inline strong { color: var(--ink); }.empty-inline span { margin-top: 5px; font-size: 13px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 12px; color: #81939b; font-size: 10px; font-weight: 850; letter-spacing: .09em; text-align: left; text-transform: uppercase; background: #f7fafb; }
th:first-child { border-radius: 9px 0 0 9px; } th:last-child { border-radius: 0 9px 9px 0; }
td { padding: 14px 12px; border-bottom: 1px solid #edf2f4; font-size: 13px; vertical-align: middle; }
td small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
tbody tr:hover { background: #fbfdfe; }
.status { display: inline-flex; align-items: center; gap: 5px; width: fit-content; padding: 5px 8px; border-radius: 999px; color: #44616e; background: #eaf0f3; font-size: 10px; font-weight: 800; white-space: nowrap; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-actif,.status-paid,.status-termine,.status-facture { color: #14735d; background: #e4f6ef; }
.status-planifie,.status-sent { color: #176e93; background: #e5f3fa; }
.status-demande,.status-draft { color: #996019; background: #fff2dc; }
.status-en_route,.status-en_cours { color: #6b50a1; background: #eee9fa; }
.status-inactif,.status-annule,.status-cancelled,.status-archive { color: #8d454b; background: #fbe9eb; }
.online-badge { display: block; width: fit-content; margin-top: 5px; padding: 4px 7px; border-radius: 6px; color: #07666c; background: var(--aqua); font-size: 9px; font-weight: 850; }
.online-badge.large { padding: 8px 11px; font-size: 11px; }
.pagination { display: flex; justify-content: flex-end; gap: 9px; padding-top: 18px; }
.import-panel { margin-top: 18px; }
.import-panel summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.import-panel summary::-webkit-details-marker { display: none; }
.import-panel summary > span:first-child { display: flex; flex-direction: column; gap: 5px; }.import-panel summary small { color: var(--muted); font-weight: 500; }
.import-form { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.import-form input[type=file] { flex: 1; padding: 7px; }

.client-hero, .job-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; padding: 22px 25px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(105deg,#fff,#f0f9fa); }
.client-hero > div:nth-child(2), .job-hero > div:first-child { min-width: 0; flex: 1; }
.client-hero h2, .job-hero h2 { margin: 0 0 5px; font-size: 28px; }.client-hero p:last-child, .job-hero p:last-child { margin: 0; color: var(--muted); }
.client-monogram { width: 58px; height: 58px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 16px; color: #fff; background: linear-gradient(135deg,var(--ocean),var(--teal)); font-size: 22px; font-weight: 850; }
.job-hero > div:last-child { display: flex; flex-direction: column; align-items: end; gap: 4px; }
.two-column { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-top: 18px; }
.mini-list { display: grid; }
.mini-list > a, .portal-list-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 2px; border-top: 1px solid #edf2f4; }
.mini-list > a:first-child, .portal-list-row:first-child { border-top: 0; }
.mini-list > a > span, .portal-list-row > span:first-child { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mini-list small, .portal-list-row small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.portal-invite { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(320px,.8fr); align-items: center; gap: 30px; margin-top: 18px; color: #fff; background: linear-gradient(135deg,#0b3344,#0b5f70); border-color: transparent; }
.portal-invite .eyebrow { color: #5cdbcf; }.portal-invite h2 { margin-bottom: 8px; }.portal-invite p { margin: 0; color: #c5d9df; line-height: 1.55; }
.invite-result { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; }.invite-result label { color: #dcecef; }.invite-result input { color: var(--ink); }
.detail-list { margin: 0 0 18px; }
.detail-list > div { display: grid; grid-template-columns: 105px 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid #edf2f4; }
.detail-list > div:first-child { border-top: 0; }.detail-list dt { color: var(--muted); font-size: 11px; font-weight: 750; }.detail-list dd { margin: 0; font-size: 13px; line-height: 1.5; }.detail-list a { color: var(--ocean); font-weight: 750; }
.note-box { padding: 14px 0; border-top: 1px solid #edf2f4; }.note-box:first-of-type { border-top: 0; }.note-box strong { font-size: 12px; }.note-box p { margin: 6px 0 0; color: #526a75; font-size: 13px; line-height: 1.55; }
.field-work { margin-top: 18px; border: 1px solid #badbdc; }

.catalog-layout { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(310px,.7fr); align-items: start; gap: 18px; }
.sticky-panel { position: sticky; top: 105px; }.sticky-panel h2 { margin: 4px 0 8px; }.toggle-form { margin-top: 10px; }
.team-list { display: grid; }
.team-row { display: grid; grid-template-columns: 42px minmax(0,1fr) auto auto; align-items: center; gap: 12px; padding: 14px 2px; border-top: 1px solid #edf2f4; }
.team-row:first-child { border-top: 0; }.team-row > div:nth-child(2) { display: flex; flex-direction: column; gap: 4px; }.team-row span:not(.status) { color: var(--muted); font-size: 11px; }

.invoice-editor { padding: clamp(24px,3vw,38px); }
.invoice-editor-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 26px; }.invoice-editor-head h2 { margin: 0 0 6px; font-size: 30px; }.invoice-editor-head p:last-child { margin: 0; color: var(--muted); }
.invoice-lines { margin: 30px 0; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #f8fbfc; }
.line-head, .invoice-line { display: grid; grid-template-columns: 1.25fr 1.45fr 90px 130px 38px; align-items: center; gap: 8px; }
.line-head { padding: 0 4px 8px; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.invoice-line { padding: 8px 0; border-top: 1px solid #e7eef1; }.invoice-line:first-child { border-top: 0; }
.line-remove { width: 34px; height: 34px; border: 0; border-radius: 9px; color: #a24850; background: #fdebed; font-size: 22px; cursor: pointer; }
.invoice-lines > .button { margin-top: 10px; }
.invoice-bottom { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,.55fr); gap: 38px; }
.invoice-live-totals, .invoice-totals { display: grid; align-content: start; }
.invoice-live-totals > div, .invoice-totals > div { display: flex; justify-content: space-between; gap: 20px; padding: 9px 0; border-bottom: 1px solid #e6edef; font-size: 13px; }
.invoice-live-totals .grand-total, .invoice-totals .grand-total { margin-top: 7px; padding: 15px 0; border-top: 2px solid var(--ink); border-bottom: 0; font-size: 19px; }.discount { color: var(--success); }

.invoice-document { width: min(980px,100%); margin: 0 auto; padding: clamp(28px,5vw,60px); border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.invoice-doc-head { display: flex; justify-content: space-between; gap: 30px; padding-bottom: 28px; border-bottom: 2px solid var(--ink); }
.invoice-brand { display: flex; align-items: center; gap: 13px; }.invoice-brand div { display: flex; flex-direction: column; }.invoice-brand strong { font-size: 22px; }.invoice-brand span { color: var(--muted); font-size: 12px; }
.invoice-number { display: flex; flex-direction: column; align-items: end; }.invoice-number > span { color: var(--ocean); font-size: 10px; font-weight: 850; letter-spacing: .15em; }.invoice-number strong { margin: 4px 0; font-size: 25px; }.invoice-number small { color: var(--muted); }
.invoice-addresses { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; padding: 32px 0; }.invoice-addresses > div:last-child { text-align: right; }.invoice-addresses span, .invoice-notes span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .13em; }.invoice-addresses p { margin: 7px 0 0; color: #536a74; font-size: 13px; line-height: 1.65; }
.invoice-table th { color: #fff; background: var(--navy); }.invoice-table td:last-child,.invoice-table th:last-child { text-align: right; }
.invoice-summary { display: grid; grid-template-columns: 1fr minmax(290px,.55fr); gap: 50px; margin-top: 30px; }.invoice-notes p { color: #536a74; font-size: 13px; line-height: 1.6; }
.invoice-footer { display: flex; justify-content: space-between; margin-top: 50px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.status-editor { width: min(980px,100%); display: flex; align-items: end; justify-content: flex-end; gap: 10px; margin: 18px auto 0; }.status-editor label { width: 220px; }

.settings-form { max-width: 1050px; }.security-panel { max-width: 1050px; display: grid; grid-template-columns: .65fr 1.35fr; gap: 30px; margin-top: 18px; color: #fff; background: var(--navy); }.security-panel .eyebrow { color: #5bd4c8; }.security-panel .check-list { margin: 0; }.check-list.dark li { color: #c4d5dc; }

.portal-body { min-height: 100vh; background: #edf4f6; }
.portal-auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 20% 10%, rgba(33,183,168,.2), transparent 28%), radial-gradient(circle at 90% 90%, rgba(8,118,154,.28), transparent 33%), var(--navy); }
.portal-auth-card { width: min(480px,100%); display: grid; gap: 24px; padding: clamp(28px,5vw,46px); border-radius: 23px; background: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.28); }.portal-auth-card h1 { margin: 8px 0; font-size: 34px; }
.portal-shell { min-height: 100vh; }.portal-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px max(22px,calc((100vw - 1180px)/2)); color: #fff; background: var(--navy); }.portal-header > div { display: flex; align-items: center; gap: 15px; font-size: 12px; }.portal-header > div a { color: #64d7cd; font-weight: 750; }
.portal-main, .portal-invoice-page { width: min(1180px,calc(100% - 36px)); margin: 0 auto; padding: 34px 0 60px; }.portal-welcome { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-bottom: 22px; }.portal-welcome h1 { margin: 0 0 7px; font-size: 34px; }.portal-welcome p { margin: 0; color: var(--muted); }.portal-discount { max-width: 260px; padding: 14px 17px; border: 1px solid #a9ddd7; border-radius: 14px; color: #296b69; background: var(--aqua); font-size: 12px; line-height: 1.45; }.portal-discount strong { margin-right: 5px; color: #087c75; font-size: 24px; }
.portal-grid { display: grid; grid-template-columns: minmax(330px,.72fr) minmax(0,1.28fr); gap: 18px; margin-bottom: 18px; }.request-card { color: #fff; background: linear-gradient(150deg,#0c3546,#087b8c); border: 0; }.request-card .eyebrow { color: #74e1d8; }.request-card p { color: #cde1e6; font-size: 13px; line-height: 1.55; }.request-card label { color: #e4f1f4; }.request-card input,.request-card select,.request-card textarea { border-color: rgba(255,255,255,.18); }
.portal-list-row > span:last-child { flex: 0 0 auto; }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-grid, .catalog-layout { grid-template-columns: 1fr; }
  .sticky-panel { position: static; }
  .login-layout { grid-template-columns: 1fr 450px; }
  .login-proof { display: none; }
}

@media (max-width: 820px) {
  .desktop-only { display: none; }
  .install-shell, .login-layout { display: block; }
  .brand-panel { min-height: 430px; padding: 52px 28px; }
  .brand-panel h1 { font-size: 45px; }
  .login-brand { min-height: 390px; padding: 100px 28px 45px; }
  .login-brand .brand-lockup { left: 28px; top: 28px; }.login-copy h1 { font-size: 51px; }
  .login-card-wrap { min-height: 520px; }
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; width: 270px; transform: translateX(-103%); transition: transform .22s ease; box-shadow: 16px 0 40px rgba(0,0,0,.24); }
  .sidebar.open { transform: translateX(0); }
  .menu-button { display: grid; place-items: center; }
  .topbar { justify-content: flex-start; }.topbar-actions { margin-left: auto; }
  .form-grid.three-col { grid-template-columns: repeat(2,minmax(0,1fr)); }.span-3 { grid-column: span 2; }
  .two-column, .portal-grid, .portal-invite, .security-panel { grid-template-columns: 1fr; }
  .portal-invite { gap: 20px; }
  .line-head { display: none; }.invoice-line { grid-template-columns: 1fr 1fr 75px 105px 34px; }
  .invoice-bottom, .invoice-summary { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .content-wrap { padding: 20px 13px 45px; }.topbar { min-height: 76px; padding: 12px 14px; }.topbar h1 { font-size: 20px; }
  .welcome-strip, .page-actions, .portal-welcome { align-items: stretch; flex-direction: column; }.quick-actions,.page-actions > div { width: 100%; }.quick-actions .button,.page-actions > div .button { flex: 1; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 9px; }.metric-card { min-height: 120px; padding: 16px; }.metric-card strong { font-size: 23px; }
  .panel { padding: 18px; border-radius: 14px; }.form-panel { padding: 20px 17px; }
  .form-grid.three-col { grid-template-columns: 1fr; }.span-2,.span-3 { grid-column: span 1; }
  .form-actions { align-items: stretch; flex-direction: column; }.form-actions .button { width: 100%; }
  .inline-form, .filter-form, .search-form { align-items: stretch; flex-direction: column; }.search-form input,.filter-form input,.filter-form select { width: 100%; min-width: 0; }
  .route-row { grid-template-columns: 50px minmax(0,1fr); }.route-meta { grid-column: 2; align-items: start; }
  .client-hero, .job-hero { align-items: start; padding: 18px; }.client-monogram { width: 48px; height: 48px; }.client-hero h2,.job-hero h2 { font-size: 22px; }.job-hero > div:last-child { align-items: start; }
  .team-row { grid-template-columns: 38px minmax(0,1fr) auto; }.team-row .row-link { grid-column: 2; }
  .invoice-editor { padding: 18px 13px; }.invoice-editor-head { flex-direction: column; }.invoice-lines { margin-inline: -4px; padding: 12px; }
  .invoice-line { grid-template-columns: 1fr 78px 98px 32px; gap: 6px; }.invoice-line select { grid-column: 1 / -1; }.invoice-line [data-description] { grid-column: 1; }.line-remove { width: 32px; }
  .invoice-document { padding: 24px 17px; }.invoice-doc-head { align-items: start; flex-direction: column; }.invoice-number { align-items: start; }.invoice-addresses { grid-template-columns: 1fr; gap: 20px; }.invoice-addresses > div:last-child { text-align: left; }.invoice-table th:nth-child(3),.invoice-table td:nth-child(3) { display: none; }.invoice-footer { gap: 10px; flex-direction: column; }
  .status-editor { align-items: stretch; flex-direction: column; }.status-editor label { width: 100%; }
  .portal-main,.portal-invoice-page { width: min(100% - 24px,1180px); padding-top: 22px; }.portal-header { padding: 13px 14px; }.portal-header > div span { display: none; }.portal-discount { max-width: none; }.login-card { padding: 28px 22px; }.login-card-wrap { padding: 20px; }
  .install-card { width: calc(100% - 24px); padding: 26px 20px; }.install-body { background: #f5f8f9; }.brand-panel { min-height: 380px; }
}

@media print {
  body { background: #fff; }
  .sidebar,.topbar,.no-print,.status-editor { display: none !important; }
  .app-shell { display: block; }.content-wrap,.portal-invoice-page { width: 100%; padding: 0; }.invoice-document { width: 100%; padding: 16mm; border: 0; box-shadow: none; }
  .invoice-table th { color: #fff !important; background: #071926 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

