@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --black: #050605;
  --ink: #0a0b0a;
  --panel: #111311;
  --panel-2: #171917;
  --white: #f8f9f5;
  --muted: #969a92;
  --line: rgba(255, 255, 255, .11);
  --acid: #b4ff22;
  --acid-soft: rgba(180, 255, 34, .12);
  --danger: #ff7d6e;
  --display: "Space Grotesk", Arial, sans-serif;
  --body: "Inter", Arial, sans-serif;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { background: var(--black); }
body { margin: 0; color: var(--white); font-family: var(--body); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a { color: inherit; }
a { text-decoration: none; }
img { display: block; max-width: 100%; }
.skip-link { position: fixed; z-index: 99; top: 12px; left: 12px; padding: 10px 14px; color: #061000; background: var(--acid); transform: translateY(-180%); }
.skip-link:focus { transform: none; }

.admin-body { min-height: 100vh; background: var(--ink); }
.admin-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.admin-sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 28px 22px; border-right: 1px solid var(--line); background: #070807; }
.admin-brand { display: flex; align-items: center; gap: 14px; padding: 0 8px 28px; border-bottom: 1px solid var(--line); }
.admin-brand img { width: 82px; }
.admin-brand span { color: var(--muted); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.admin-nav { display: grid; gap: 5px; margin-top: 26px; }
.admin-nav a { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 11px; color: #c7cac3; font-size: .9rem; }
.admin-nav a:hover, .admin-nav a.is-active { color: var(--white); background: var(--panel-2); }
.admin-nav a.is-active { box-shadow: inset 3px 0 var(--acid); }
.nav-icon { display: inline-grid; place-items: center; width: 22px; color: var(--acid); font-size: 1rem; }
.admin-user { display: grid; margin-top: auto; padding: 18px 10px 0; border-top: 1px solid var(--line); }
.admin-user span { font-weight: 600; }
.admin-user small { overflow: hidden; margin: 3px 0 8px; color: var(--muted); text-overflow: ellipsis; }

.admin-main { width: min(100%, 1480px); padding: 44px clamp(24px, 4vw, 64px) 80px; }
.admin-main-wide { max-width: 1700px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 36px; }
.page-header h1 { margin: 0; font: 600 clamp(2.4rem, 4vw, 4.5rem)/.95 var(--display); letter-spacing: -.06em; }
.page-header p:not(.eyebrow) { max-width: 680px; margin: 14px 0 0; color: var(--muted); }
.compact-header { align-items: flex-end; }
.compact-header h1 { font-size: clamp(2.1rem, 3.2vw, 3.7rem); }
.eyebrow { margin: 0 0 12px; color: var(--acid); font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.back-link { display: inline-block; margin-bottom: 22px; color: var(--muted); font-size: .85rem; }
.back-link:hover { color: var(--acid); }

.btn { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 0 20px; border: 1px solid transparent; border-radius: 999px; cursor: pointer; font-weight: 700; transition: 180ms ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #071000; background: var(--acid); }
.btn-primary:hover { background: #c4ff52; }
.btn-secondary { border-color: var(--line); color: var(--white); background: transparent; }
.btn-secondary:hover { border-color: rgba(180, 255, 34, .5); color: var(--acid); }
.btn-block { width: 100%; }
.text-button { width: max-content; padding: 0; border: 0; color: var(--muted); background: none; cursor: pointer; font-size: .82rem; }
.text-button:hover { color: var(--acid); }
.text-button.danger:hover { color: var(--danger); }

.alert { margin: 0 0 24px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 12px; font-size: .9rem; }
.alert ul { margin-bottom: 0; }
.alert-success { border-color: rgba(180,255,34,.35); color: #dcff9a; background: var(--acid-soft); }
.alert-error { border-color: rgba(255,125,110,.38); color: #ffd4cf; background: rgba(255,125,110,.09); }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.stat-card { min-height: 164px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.stat-card small, .stat-card span { display: block; color: var(--muted); }
.stat-card strong { display: block; margin: 24px 0 3px; font: 600 2.9rem/1 var(--display); letter-spacing: -.06em; }
.stat-card.stat-accent { border-color: rgba(180,255,34,.3); background: var(--acid-soft); }
.stat-card.stat-accent strong { color: var(--acid); }

.panel, .form-section, .aside-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.panel { overflow: hidden; }
.panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; padding: 24px 26px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font: 600 1.45rem var(--display); letter-spacing: -.035em; }
.panel-head p:not(.eyebrow) { margin: 6px 0 0; color: var(--muted); font-size: .88rem; }
.filters { display: flex; gap: 8px; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; outline: 0; color: var(--white); background: #0b0c0b; }
input, select { height: 46px; padding: 0 13px; }
textarea { min-height: 90px; padding: 12px 13px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: rgba(180,255,34,.68); box-shadow: 0 0 0 3px rgba(180,255,34,.08); }
.filters input { min-width: 240px; }
.filters select { min-width: 170px; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.data-table th, .data-table td { padding: 18px 20px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.data-table th { color: var(--muted); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.data-table td strong, .data-table td small { display: block; }
.data-table td small { margin-top: 3px; color: var(--muted); }
.data-table tbody tr:hover { background: rgba(255,255,255,.025); }
.row-link { color: var(--acid); font-weight: 700; }
.status { display: inline-flex; width: max-content; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: #c9ccc5; background: rgba(255,255,255,.035); font-size: .72rem; font-weight: 700; }
.status-accepted { border-color: rgba(180,255,34,.4); color: var(--acid); background: var(--acid-soft); }
.status-declined, .status-expired { color: #ffb0a7; }
.status-viewed { color: #b7d9ff; }
.status-draft { color: #c4c5c2; }

.empty-state { display: grid; justify-items: start; max-width: 520px; padding: 64px 28px; }
.empty-state > span { color: var(--acid); font: 600 3.5rem var(--display); opacity: .5; }
.empty-state h1, .empty-state h3 { margin: 12px 0 4px; font: 600 2rem var(--display); letter-spacing: -.04em; }
.empty-state p { margin: 0 0 22px; color: var(--muted); }
.centered-page { display: grid; min-height: 80vh; place-items: center; }

.proposal-editor { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 20px; align-items: start; }
.editor-main { display: grid; gap: 16px; }
.editor-aside { display: grid; gap: 16px; }
.form-section { padding: 26px; }
.form-section-head { display: flex; gap: 16px; margin-bottom: 26px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.form-section-head > span { color: var(--acid); font: 600 1.1rem var(--display); }
.form-section-head h2, .aside-card h2 { margin: 0; font: 600 1.35rem var(--display); letter-spacing: -.03em; }
.form-section-head p { margin: 4px 0 0; color: var(--muted); font-size: .85rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; align-content: start; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field > span { color: #cfd1cc; font-size: .78rem; font-weight: 600; }
.field small { color: var(--muted); font-size: .73rem; }
.check-field { display: flex; align-items: flex-start; gap: 10px; color: #cfd1cc; font-size: .82rem; line-height: 1.45; }
.check-field input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--acid); }
.proposal-items { display: grid; gap: 12px; margin-bottom: 14px; }
.item-editor { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #0c0d0c; }
.item-editor-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.item-editor-head strong { font: 600 .92rem var(--display); }
.drag-handle { color: var(--muted); }
.icon-button { margin-left: auto; padding: 4px 8px; border: 0; color: var(--muted); background: none; cursor: pointer; font-size: 1.35rem; }
.icon-button:hover { color: var(--danger); }
.aside-card { padding: 22px; }
.sticky-card { position: sticky; top: 18px; }
.service-library { display: grid; gap: 8px; margin-top: 20px; }
.service-library details { border-top: 1px solid var(--line); }
.service-library summary { padding: 14px 0; cursor: pointer; font-weight: 700; }
.service-options { display: grid; gap: 8px; padding-bottom: 12px; }
.service-options button { display: grid; gap: 5px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; color: var(--white); background: #0b0c0b; cursor: pointer; text-align: left; }
.service-options button:hover { border-color: rgba(180,255,34,.45); background: var(--acid-soft); }
.service-options strong { font-size: .82rem; }
.service-options span { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: .72rem; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.commercial-card { display: grid; gap: 16px; }
.aside-note { margin: 0; color: var(--muted); font-size: .75rem; }

.proposal-detail-header { align-items: flex-end; }
.title-status { display: flex; align-items: center; gap: 14px; }
.title-status h1 { font-size: clamp(2rem, 3.5vw, 3.8rem); }
.header-actions { display: flex; gap: 8px; }
.header-actions form { display: flex; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.detail-grid > div { display: grid; gap: 18px; }
.detail-aside { display: grid; gap: 14px; }
.proposal-overview .panel-head h2 { max-width: 740px; font-size: clamp(1.4rem, 2.4vw, 2.35rem); }
.summary-list { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; }
.summary-list div { min-height: 126px; padding: 20px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.summary-list dt { color: var(--muted); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }
.summary-list dd { margin: 22px 0 0; }
.summary-list dd strong, .summary-list dd small { display: block; }
.summary-list dd strong { color: var(--acid); font: 600 1.4rem var(--display); }
.summary-list dd small { margin-top: 3px; color: var(--muted); }
.scope-list article { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 18px; padding: 24px 26px; border-bottom: 1px solid var(--line); }
.scope-list article > span { color: var(--acid); font: 600 .8rem var(--display); }
.scope-list h3 { margin: 0; font: 600 1.2rem var(--display); }
.scope-list p { color: var(--muted); white-space: pre-line; }
.scope-list ul { padding-left: 18px; color: #c7cac3; }
.scope-list article > strong { color: var(--acid); white-space: nowrap; }
.link-card { border-color: rgba(180,255,34,.32); background: var(--acid-soft); }
.link-card h2 { margin-bottom: 16px; }
.copy-field { display: flex; gap: 6px; margin-bottom: 10px; }
.copy-field input { min-width: 0; font-size: .75rem; }
.copy-field button { border: 0; border-radius: 9px; color: #071000; background: var(--acid); cursor: pointer; font-weight: 700; }
.stack-actions { display: grid; gap: 12px; }
.timeline-card { padding-bottom: 8px; }
.event-list { display: grid; gap: 0; margin: 18px 0 0; padding: 0; list-style: none; }
.event-list li { position: relative; display: grid; grid-template-columns: 12px 1fr; gap: 12px; padding-bottom: 18px; }
.event-list li::before { position: absolute; top: 10px; bottom: 0; left: 4px; width: 1px; content: ""; background: var(--line); }
.event-list li > span { z-index: 1; width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: var(--acid); }
.event-list p, .event-list small { margin: 3px 0 0; color: var(--muted); font-size: .75rem; }
.event-list strong { font-size: .8rem; }

.auth-body { min-height: 100vh; background: var(--black); }
.auth-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(420px, .8fr); min-height: 100vh; }
.auth-brand-panel { display: flex; flex-direction: column; justify-content: space-between; padding: clamp(34px, 6vw, 88px); background: radial-gradient(circle at 78% 28%, rgba(180,255,34,.13), transparent 28rem), linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px), #050605; background-size: auto, 70px 70px, 70px 70px, auto; }
.auth-brand-panel img { width: 116px; }
.auth-brand-panel h1 { max-width: 760px; margin: 0; font: 600 clamp(3.2rem, 6vw, 6.8rem)/.92 var(--display); letter-spacing: -.07em; }
.auth-brand-panel h1 span { color: var(--acid); }
.auth-brand-panel p:not(.eyebrow) { max-width: 620px; color: var(--muted); font-size: 1.05rem; }
.auth-form-panel { display: grid; place-items: center; padding: 36px; border-left: 1px solid var(--line); background: #0c0d0c; }
.auth-card { width: min(100%, 430px); }
.auth-card h2 { margin: 0; font: 600 2.4rem var(--display); letter-spacing: -.05em; }
.auth-card .field { margin-top: 15px; }
.auth-card .btn { margin-top: 20px; }
.form-intro { margin: 10px 0 24px; color: var(--muted); }

@media (max-width: 1100px) {
  .proposal-editor, .detail-grid { grid-template-columns: 1fr; }
  .editor-aside { grid-row: 1; grid-template-columns: 1fr 1fr; }
  .sticky-card { position: static; }
  .auth-layout { grid-template-columns: 1fr 440px; }
  .auth-brand-panel h1 { font-size: clamp(3rem, 5vw, 5rem); }
}

@media (max-width: 820px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto; align-items: center; height: auto; padding: 14px 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-brand { padding: 0; border: 0; }
  .admin-brand span, .admin-user { display: none; }
  .admin-nav { display: flex; margin: 0; }
  .admin-nav a { padding: 9px 10px; font-size: 0; }
  .admin-nav .nav-icon { font-size: 1rem; }
  .admin-main { padding: 30px 18px 64px; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .page-header .btn { width: 100%; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 126px; }
  .stat-card strong { margin-top: 15px; }
  .panel-head, .filters { align-items: stretch; flex-direction: column; }
  .filters input, .filters select { min-width: 0; }
  .form-grid, .editor-aside, .summary-list { grid-template-columns: 1fr; }
  .summary-list div { border-right: 0; }
  .scope-list article { grid-template-columns: 30px 1fr; }
  .scope-list article > strong { grid-column: 2; }
  .header-actions { width: 100%; flex-wrap: wrap; }
  .header-actions > * { flex: 1; }
  .header-actions .btn { width: 100%; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand-panel { min-height: 42vh; padding: 32px 24px; }
  .auth-brand-panel h1 { font-size: 3rem; }
  .auth-form-panel { padding: 44px 24px; border: 0; }
}

