:root {
    --green: #183e31;
    --green-dark: #102f24;
    --green-soft: #eaf1e8;
    --sand: #f4f1e9;
    --sand-deep: #ebe5d8;
    --ink: #1c3026;
    --muted: #536359;
    --line: #d9dfd8;
    --line-strong: #a9b6ab;
    --warm: #a4492b;
    --danger: #9c2929;
    --radius: 8px;
    --radius-sm: 6px;
    --shadow: 0 1px 2px rgba(16, 47, 36, .06), 0 4px 16px rgba(16, 47, 36, .05);
}

body { color: var(--ink); }
::selection { background: #d8e6d6; }
.site-skip { position: absolute; left: 16px; top: -60px; z-index: 200; padding: 12px 16px; background: var(--green); color: #fff; border-radius: var(--radius-sm); }
.site-skip:focus { top: 16px; }

.site-nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); }
.site-nav-row { min-height: 68px; }
.site-nav-links a:not(.site-button) { color: var(--ink); text-decoration: none; border-radius: var(--radius-sm); padding: 8px 10px; }
.site-nav-links a:not(.site-button):hover { background: var(--sand); text-decoration: none; }
.site-nav-links .site-button { padding: 10px 18px; min-height: 44px; }

.site-button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--green); background: var(--green); color: #fff; text-decoration: none; border-radius: var(--radius-sm); }
.site-button.secondary { background: #fff; color: var(--green); border-color: var(--line-strong); }
.site-button:disabled { background: #e7ece8; border-color: var(--line-strong); color: var(--muted); cursor: not-allowed; }
.site-link { border: 0; background: none; padding: 0; color: var(--green); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; font-weight: 600; min-height: 32px; }

.site-panel { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.site-notice { padding: 14px 18px; border-left: 3px solid var(--warm); background: #fbf6ef; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: .92rem; }
.site-error, .site-success { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-top: 16px; }
.site-empty { text-align: left; border-style: dashed; border-color: var(--line-strong); background: #fbfcfa; }
.site-empty > a { display: inline-block; margin-top: 12px; font-weight: 600; }
.site-hint { color: var(--muted); }
.site-field { display: grid; gap: 6px; }
.site-field input:focus, .site-field select:focus, .site-field textarea:focus { outline: 3px solid #cfe0cc; outline-offset: 0; border-color: var(--green); }
.site-field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.site-choice { display: flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer; transition: border-color .15s, background-color .15s; }
.site-choice:hover { border-color: var(--green); }

.site-home-hero { background: var(--sand); }
.site-home-copy .site-button { min-height: 54px; padding-inline: 28px; font-size: 1rem; }
.site-home-photo { box-shadow: var(--shadow); }
.site-home-assurances li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.site-home-need:hover h3 { color: var(--green); }
.site-home-final { border: 1px solid var(--sand-deep); }
.site-faq summary { list-style: none; position: relative; }
.site-faq summary::-webkit-details-marker { display: none; }
.site-faq summary::after { content: '+'; position: absolute; right: 0; top: 0; font-size: 1.3rem; line-height: 1; color: var(--green); }
.site-faq[open] summary::after { content: '−'; }

body:has([data-ca-question]) .site-narrow { width: min(680px, calc(100% - 32px)); }
[data-ca-question] { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 36px); box-shadow: var(--shadow); }
[data-ca-question] .site-choices { display: grid; gap: 10px; }
[data-ca-question] .site-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-top: 28px; }
[data-ca-question] [data-next] { min-width: 180px; }
.site-progress { width: 100%; }

.crm-workspace main { min-height: calc(100dvh - 72px); }
.crm-heading { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; }
.crm-heading h1 { margin: 0; }
.crm-stat, .crm-list, .crm-filterbar { box-shadow: var(--shadow); }
.crm-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.crm-row > div { min-width: 0; flex: 1 1 260px; }
.crm-row h3 { font-size: 1rem; }
.crm-secondary-links { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); gap: 4px; }
.crm-secondary-links a { padding: 10px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 600; }
.crm-secondary-links a:hover { color: var(--green); }
.crm-secondary-links a[aria-current] { color: var(--green); border-bottom-color: var(--green); }
.crm-chip[data-state="PAID"], .crm-chip[data-state="SIGNED"] { background: var(--green-soft); border-color: #9fbf9c; color: var(--green); }
.crm-chip[data-state="FAILED"], .crm-chip[data-state="REVIEW"] { background: #fbefec; border-color: #d9a69a; color: #8a2d1c; }
.crm-chip[data-state="EXPIRED"], .crm-chip[data-state="OPEN"], .crm-chip[data-state="CREATED"] { background: #f2f3f1; border-color: #c8cdc6; color: #526259; }
.site-table td { font-variant-numeric: tabular-nums; }

.crm-balance { font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--green); }
.crm-opportunity-intro { display: grid; gap: 16px; align-items: stretch; }
.crm-balance-card { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); display: grid; gap: 4px; }
.crm-balance-card a { font-weight: 600; font-size: .9rem; }
.crm-opportunity { box-shadow: var(--shadow); display: flex; flex-direction: column; }
.crm-opportunity form { margin-top: auto; }
.crm-opportunity-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.crm-price { font-size: 1.45rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.crm-price small { font-size: .75rem; color: var(--muted); font-weight: 600; }
.crm-locked { border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); padding: 14px; background: #fafbf8; display: grid; gap: 10px; }
.crm-locked-preview { display: grid; gap: 6px; filter: blur(5px); user-select: none; pointer-events: none; color: var(--muted); font-size: .9rem; }
.crm-locked p { display: flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 600; margin: 0; }
.crm-locked svg { width: 18px; height: 18px; color: var(--green); }
.crm-deadline { font-size: .9rem; }

.crm-recharge { box-shadow: var(--shadow); }
.crm-recharge-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.crm-recharge-head .site-hint { max-width: 40ch; }
.crm-recharge-amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.crm-recharge-amounts button { font-weight: 600; font-variant-numeric: tabular-nums; transition: border-color .15s, background-color .15s; }
.crm-recharge-amounts button:hover { border-color: var(--green); }
.crm-recharge-amounts button[aria-pressed="true"] { background: var(--green); color: #fff; border-color: var(--green); }
.crm-recharge-summary { display: grid; margin: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.crm-recharge-summary > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 16px; }
.crm-recharge-summary > div + div { border-top: 1px solid var(--line); }
.crm-recharge-summary dt { color: var(--muted); font-size: .9rem; }
.crm-recharge-summary dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.crm-recharge-summary > div:last-child { background: var(--sand); }
.crm-recharge-summary > div:last-child dd { font-size: 1.15rem; }
.crm-recharge form .site-button { width: 100%; }

.crm-kanban-column { background: #eef1ec; }
.crm-kanban-column > h3 { align-items: center; }
.crm-kanban-column [data-crm-count] { display: inline-flex; min-width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 13px; background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: .75rem; }
.crm-kanban-column article { box-shadow: var(--shadow); cursor: grab; }

@media (min-width: 720px) {
    .crm-opportunity-intro { grid-template-columns: minmax(0, 1fr) 280px; }
    .crm-opportunity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .crm-recharge form { max-width: 520px; }
}
@media (min-width: 1280px) {
    .crm-opportunity-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
    .site-nav { position: static; }
    .crm-recharge-amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    [data-ca-question] { padding: 18px; box-shadow: none; }
    [data-ca-question] .site-actions { flex-direction: column-reverse; align-items: stretch; }
    [data-ca-question] .site-actions .site-button { width: 100%; }
    .crm-heading .site-button { width: 100%; }
    .crm-secondary-links { overflow-x: auto; flex-wrap: nowrap; }
    .crm-secondary-links a { white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
    .site-choice, .crm-recharge-amounts button { transition: none; }
}
