/* =====================================================================
   İTO Seçim Çalışması – shared styles (public form + admin panel)
   Values are taken 1:1 from the design files in /design (*.dc.html).
   ===================================================================== */
:root {
  --navy: #1B3A6B; --navy-hover: #16305A; --blue: #2F7DE1; --blue-soft: #EAF2FD; --blue-line: #BFD4F2; --blue-light: #F1F5FB;
  --bg: #F7F9FC; --card: #FFFFFF; --border: #E5E9F0; --border-input: #D8DEE9; --row-border: #EEF1F6; --row-hover: #FAFBFD;
  --text: #111827; --text-2: #374151; --text-3: #4B5563; --muted: #6B7280; --faint: #9CA3AF;
  --red: #DC2626; --red-hover: #B91C1C; --red-bg: #FEF2F2; --green: #16A34A; --green-dark: #15803D; --green-bg: #DCFCE7; --green-soft: #F0FDF4;
  --amber-bg: #FEF3C7; --amber: #B45309; --amber-line: #FCD34D; --orange: #F59E0B; --dark: #111827;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow-card: 0 1px 3px rgba(0,0,0,.08); --shadow-pop: 0 12px 32px rgba(17,24,39,.12); --shadow-modal: 0 20px 60px rgba(0,0,0,.25);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); font-family: var(--font); color: var(--text); -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.45; }
a { color: var(--blue); }
a:hover { color: var(--navy); }
input, button, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: none; border-color: var(--blue) !important; box-shadow: 0 0 0 3px rgba(47,125,225,.18); }
input::placeholder, textarea::placeholder { color: var(--faint); }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.tnum { font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted { color: var(--muted); }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes rowIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slideUp { from { transform: translate(-50%, 20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
.fade-in { animation: fadeIn .3s ease; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; height: 46px; padding: 0 22px; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-hover); color: #fff; }
.btn-secondary { background: #fff; border-color: var(--border-input); color: var(--text-2); font-weight: 500; }
.btn-secondary:hover { background: var(--bg); color: var(--text-2); }
.btn-ghost { background: transparent; color: var(--blue); font-size: 13px; padding: 6px 8px; height: auto; border-radius: 6px; }
.btn-ghost:hover { background: var(--blue-soft); color: var(--blue); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: var(--red-hover); color: #fff; }
.btn-dashed { background: #fff; border: 1.5px dashed var(--blue); color: var(--blue); height: 42px; padding: 0 18px; font-size: 14px; }
.btn-dashed:hover { background: var(--blue-soft); color: var(--blue); }
.btn-green { background: var(--green); color: #fff; height: 38px; padding: 0 14px; font-size: 13.5px; }
.btn-green:hover { background: var(--green-dark); color: #fff; }
.btn-green-outline { background: #fff; border-color: var(--green); color: var(--green-dark); height: 40px; padding: 0 16px; font-size: 14px; }
.btn-green-outline:hover { background: var(--green-soft); color: var(--green-dark); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; font-weight: 500; border-radius: 8px; }
.btn-xs { height: 30px; padding: 0 10px; font-size: 12.5px; font-weight: 500; border-radius: 8px; }
.btn-md { height: 42px; padding: 0 16px; font-size: 14px; }
.btn-lg { height: 52px; padding: 0 32px; font-size: 16px; border-radius: 12px; }
.btn-icon { width: 40px; height: 40px; padding: 0; border: 0; background: transparent; border-radius: 8px; color: var(--faint); display: inline-flex; align-items: center; justify-content: center; }
.btn-icon:hover { background: var(--red-bg); color: var(--red); }
.btn-link { border: 0; background: transparent; color: var(--blue); font-size: 13px; font-weight: 600; padding: 0; cursor: pointer; }
.btn-link:hover { color: var(--navy); }
.btn-text { border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; padding: 5px 8px; cursor: pointer; }
.btn-text:hover { color: var(--text); }
.btn-outline-red { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--red); font-size: 13px; font-weight: 500; padding: 8px 10px; border-radius: 8px; min-height: 44px; }
.btn-outline-red:hover { background: var(--red-bg); }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
.spinner-green { border-color: rgba(21,128,61,.3); border-top-color: var(--green-dark); width: 14px; height: 14px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 500; color: var(--text-2); display: flex; gap: 6px; align-items: baseline; }
.field-label .optional { font-size: 12px; font-weight: 400; color: var(--muted); }
.input { height: 44px; border: 1px solid var(--border-input); border-radius: 10px; padding: 0 14px; font-size: 15px; color: var(--text); background: #fff; width: 100%; }
.input-sm { height: 40px; border-radius: 8px; padding: 0 12px; font-size: 14px; }
.input.is-invalid, .is-invalid .input { border-color: var(--red) !important; }
.field-error { font-size: 12px; color: var(--red); }
.field-error:empty { display: none; }
textarea.input { height: auto; min-height: 200px; padding: 12px 14px; line-height: 1.55; resize: vertical; }
.select { height: 32px; border: 1px solid var(--border-input); border-radius: 8px; padding: 0 8px; font-size: 13px; background: #fff; color: var(--text); }
.checkbox { width: 18px; height: 18px; accent-color: var(--navy); cursor: pointer; margin: 0; }
kbd { border: 1px solid var(--border-input); border-radius: 5px; padding: 1px 6px; font-size: 11px; background: var(--bg); font-family: inherit; }

/* ---------- Cards, badges, states ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
.card-lg { border-radius: 14px; }
.badge-dup { display: inline-block; background: var(--amber-bg); color: var(--amber); border: 1px solid transparent; border-radius: 6px; padding: 2px 7px; font-size: 11px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.badge-dup-exact { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-line); }
.badge-dup-possible { background: var(--blue-light); color: var(--navy); border-color: var(--blue-line); }
.badge-type { display: inline-block; border-radius: 6px; padding: 2px 8px; font-size: 11px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.badge-type-mm { background: var(--blue-soft); color: var(--navy); border-color: var(--blue-line); }
.badge-type-ozguc { background: #EDE9FE; color: #5B21B6; border-color: #DDD6FE; }
.badge-type-stk { background: var(--green-bg); color: var(--green-dark); border-color: #BBF7D0; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.pill-green { background: var(--green-bg); color: var(--green-dark); }
.pill-red { background: var(--red-bg); color: var(--red); }
.pill-gray { background: var(--blue-light); color: var(--muted); }
.count-badge { background: var(--blue); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
.empty-state { padding: 64px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.empty-state .icon { width: 56px; height: 56px; border-radius: 14px; background: var(--blue-light); display: flex; align-items: center; justify-content: center; }
.empty-state .title { font-size: 16px; font-weight: 600; color: var(--text); }
.empty-state .desc { font-size: 13.5px; color: var(--muted); max-width: 340px; line-height: 1.5; }
/* Inside horizontally scrolling tables the empty state stays pinned to the visible area */
.grid-table .empty-state { position: sticky; left: 0; max-width: 100vw; box-sizing: border-box; }
@media (min-width: 900px) { .grid-table .empty-state { max-width: calc(100vw - 304px); } }
.skeleton-row { padding: 14px 16px; border-bottom: 1px solid var(--row-border); }
.skeleton-row div { height: 16px; border-radius: 6px; background: linear-gradient(90deg, #F1F5FB 25%, #E5E9F0 50%, #F1F5FB 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.alert-error { display: flex; align-items: center; gap: 10px; background: var(--red-bg); color: var(--red); border: 1px solid #FECACA; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.alert-info { background: var(--blue-soft); color: var(--navy); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; line-height: 1.5; }

/* ---------- Toast ---------- */
.toast { position: fixed; top: 20px; right: 20px; z-index: 70; display: flex; align-items: center; gap: 10px; background: var(--dark); color: #fff; padding: 12px 16px; border-radius: 10px; font-size: 14px; box-shadow: 0 10px 30px rgba(17,24,39,.25); animation: fadeIn .25s ease; max-width: calc(100vw - 40px); }
.toast .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
.toast[data-type="error"] .dot { background: #EF4444; }
.toast[data-type="warning"] .dot { background: var(--orange); }
.toast[data-type="info"] .dot { background: var(--blue); }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(17,24,39,.45); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: #fff; border-radius: 16px; padding: 24px; width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-modal); animation: fadeIn .2s ease; }
.modal-wide { max-width: 560px; padding: 28px; max-height: 80vh; overflow: auto; }
.modal h3 { margin: 4px 0 0; font-size: 17px; font-weight: 600; color: var(--text); }
.modal-wide h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--navy); }
.modal p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.modal-wide p { color: var(--text-3); line-height: 1.65; }
.modal .icon-danger { width: 40px; height: 40px; border-radius: 10px; background: var(--red-bg); display: flex; align-items: center; justify-content: center; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* ---------- Drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(17,24,39,.35); z-index: 50; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 100%; max-width: 520px; background: var(--bg); display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(17,24,39,.15); animation: slideIn .25s ease; }
.drawer-narrow { max-width: 380px; background: #fff; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; background: #fff; border-bottom: 1px solid var(--border); gap: 10px; }
.drawer-title { font-size: 17px; font-weight: 700; }
.drawer-sub { font-size: 12.5px; color: var(--muted); }
.drawer-close { border: 0; background: transparent; font-size: 22px; color: var(--muted); cursor: pointer; width: 36px; height: 36px; border-radius: 8px; line-height: 1; }
.drawer-close:hover { background: var(--bg); }
.drawer-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; overflow: auto; flex: 1; }
.drawer-foot { display: flex; gap: 8px; padding: 16px 22px; border-top: 1px solid var(--border); background: #fff; }
.detail-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.detail-card .eyebrow { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.company-detail { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.company-detail.is-dup { border-color: var(--amber-line); }
.company-detail .num { font-size: 12px; font-weight: 700; color: var(--navy); }
.company-detail .name { font-size: 15px; font-weight: 600; }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.kv-grid .k { font-size: 11.5px; color: var(--faint); display: block; }
.kv-grid .v { font-size: 13.5px; }

/* =====================================================================
   PUBLIC FORM
   ===================================================================== */
.pub-header { background: #fff; border-bottom: 1px solid var(--border); }
.pub-header-inner { max-width: 1040px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.brand-title { font-size: 14px; font-weight: 700; color: var(--navy); letter-spacing: -.01em; display: block; }
.brand-sub { font-size: 12px; color: var(--muted); display: block; margin-top: 2px; }
.privacy-pill { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); background: var(--blue-light); padding: 8px 12px; border-radius: 999px; }
.privacy-inline { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.pub-main { max-width: 1040px; margin: 0 auto; padding: 32px 24px 96px; display: flex; flex-direction: column; gap: 24px; }
.pub-title h1 { margin: 0; font-size: 28px; font-weight: 700; color: var(--navy); letter-spacing: -.02em; }
.pub-title .lead { margin: 0; font-size: 16px; font-weight: 500; color: var(--text-2); }
.pub-title .desc { margin: 4px 0 0; font-size: 14px; color: var(--muted); line-height: 1.6; max-width: 640px; text-wrap: pretty; }
.stepper { display: flex; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; }
.step { display: flex; align-items: center; gap: 10px; flex: 1 1 0; min-width: 0; }
.step:last-child { flex: 0 0 auto; }
.step-num { width: 28px; height: 28px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; background: #fff; color: var(--faint); border: 1.5px solid var(--border-input); }
.step-name { font-size: 13px; font-weight: 500; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-line { flex: 1; height: 2px; background: var(--border); margin: 0 12px; border-radius: 2px; }
.step.is-active .step-num { background: var(--blue); color: #fff; border-color: var(--blue); }
.step.is-active .step-name { color: var(--text); font-weight: 600; }
.step.is-done .step-num { background: var(--navy); color: #fff; border-color: var(--navy); }
.step.is-done .step-name { color: var(--navy); }
.step.is-done .step-line { background: var(--navy); }
.panel-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 20px; max-width: 640px; animation: fadeIn .3s ease; }
.panel-title h2 { margin: 0; font-size: 18px; font-weight: 600; color: var(--text); }
.panel-title p { margin: 0; font-size: 13px; color: var(--muted); }
.panel-actions { display: flex; justify-content: space-between; gap: 12px; padding-top: 4px; }
.panel-actions.end { justify-content: flex-end; }
.count-pill { display: flex; align-items: center; gap: 10px; background: var(--blue-soft); color: var(--navy); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 500; }
.count-pill .sep { width: 1px; height: 14px; background: var(--blue-line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.no-js .form-panel[hidden] { display: block !important; }
.no-js [data-js-only] { display: none !important; }

/* Company table (desktop) → cards (mobile) */
.company-table { background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.company-head { display: grid; grid-template-columns: 52px 130px 1.4fr 1fr 160px 120px 44px; gap: 10px; padding: 12px 16px; background: var(--bg); border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.company-row { display: grid; grid-template-columns: 52px 130px 1.4fr 1fr 160px 120px 44px; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--row-border); align-items: start; }
.company-row.is-new { animation: rowIn .3s ease; }
.company-row .row-num { height: 40px; display: flex; align-items: center; font-size: 13px; font-weight: 600; color: var(--muted); }
.company-row .row-label { display: none; }
.company-row .field { gap: 4px; }
.company-row .input { height: 40px; border-radius: 8px; padding: 0 12px; font-size: 14px; }
.company-row .field-error { font-size: 11.5px; }
.company-row .field-warn { font-size: 11.5px; color: var(--amber); }
.company-row .field-warn:empty { display: none; }
.company-row .row-actions { display: flex; align-items: center; height: 40px; }
.company-row .row-top .btn-outline-red { display: none; }
.company-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; gap: 12px; flex-wrap: wrap; }
.company-hint { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.phone-2col { display: contents; }
@media (max-width: 759px) {
  .company-table { background: transparent; border: 0; border-radius: 0; overflow: visible; }
  .company-head { display: none; }
  .company-list { display: flex; flex-direction: column; gap: 14px; }
  .company-row { display: flex; flex-direction: column; align-items: stretch; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
  .company-row .row-num { display: none; }
  .company-row .row-top { display: flex; align-items: center; justify-content: space-between; }
  .company-row .row-top .title { font-size: 14px; font-weight: 700; color: var(--navy); }
  .company-row .row-label { display: block; }
  .company-row .input { height: 46px; border-radius: 10px; padding: 0 14px; font-size: 16px; }
  .company-row .field-error { font-size: 12px; }
  .company-row .row-actions { display: none; }
  .company-row .row-top .btn-outline-red { display: inline-flex; }
  .phone-2col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
  .company-foot { padding: 0; }
  .company-foot .btn-dashed { width: 100%; height: 50px; border-radius: 12px; font-size: 15px; }
  .company-hint { display: none; }
}
@media (min-width: 760px) {
  .company-row .row-top { display: contents; }
  .company-row .row-top .title { display: none; }
}
.review-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.review-card .eyebrow { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.review-head { display: flex; align-items: center; justify-content: space-between; }
.review-name { font-size: 17px; font-weight: 600; color: var(--text); }
.review-sub { font-size: 14px; color: var(--text-3); }
.review-note { font-size: 13px; color: var(--muted); }
.review-list { display: flex; flex-direction: column; border-top: 1px solid var(--row-border); }
.review-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--row-border); align-items: center; }
.review-row .n { font-size: 12px; font-weight: 600; color: var(--faint); }
.review-row .name { font-size: 14px; font-weight: 500; color: var(--text); }
.review-row .meta { font-size: 12.5px; color: var(--muted); }
.review-row .komite { font-size: 12px; color: var(--navy); background: var(--blue-soft); border-radius: 6px; padding: 3px 8px; font-weight: 600; white-space: nowrap; }
.kvkk-box { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px 20px; cursor: pointer; }
.kvkk-box.is-invalid { border-color: var(--red); }
.kvkk-box input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--navy); flex: none; }
.kvkk-box span { font-size: 14px; color: var(--text-2); line-height: 1.55; }
.kvkk-box a { color: var(--blue); font-weight: 600; text-decoration: underline; }
.submit-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding-top: 4px; flex-wrap: wrap; }
.turnstile-box { display: flex; flex-direction: column; gap: 8px; }
.turnstile-box [data-turnstile-widget], .turnstile-box .cf-turnstile { min-height: 65px; }
.turnstile-box iframe { max-width: 100%; }
.submit-row .btn-lg { min-width: 220px; flex: 1; max-width: 320px; }
.success { max-width: 560px; margin: 0 auto; padding: 72px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; animation: fadeIn .4s ease; }
.success .check { width: 88px; height: 88px; border-radius: 50%; background: var(--green-bg); display: flex; align-items: center; justify-content: center; animation: pop .5s cubic-bezier(.2,.8,.2,1); }
.success h1 { margin: 8px 0 0; font-size: 26px; font-weight: 700; color: var(--navy); letter-spacing: -.02em; }
.success p { margin: 0; font-size: 15px; color: var(--text-3); line-height: 1.6; }
.success .count { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 10px 16px; font-size: 14px; color: var(--text); font-weight: 500; }
.success .count .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

/* ---------- Form Seçimi (landing) ---------- */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: stretch; }
.choice-card { display: flex; flex-direction: column; gap: 14px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 24px; text-decoration: none; color: inherit; box-shadow: var(--shadow-card); transition: border-color .15s, box-shadow .15s, transform .15s; }
.choice-card:hover { border-color: var(--blue); box-shadow: 0 10px 28px rgba(27,58,107,.10); transform: translateY(-2px); color: inherit; }
.choice-card:focus-visible { border-color: var(--blue); }
.choice-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--blue-soft); color: var(--navy); display: flex; align-items: center; justify-content: center; flex: none; }
.choice-body { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.choice-title { font-size: 17px; font-weight: 700; color: var(--navy); letter-spacing: -.01em; }
.choice-desc { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.choice-cta { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--blue); margin-top: 2px; }
.choice-card:hover .choice-cta { color: var(--navy); }
.choice-note { margin: 0; font-size: 13px; color: var(--muted); }
.back-home { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-size: 13px; font-weight: 500; color: var(--muted); text-decoration: none; padding: 4px 0; }
.back-home:hover { color: var(--navy); }
.success-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
@media (max-width: 599px) { .success-actions .btn { width: 100%; } }

.legal { max-width: 720px; margin: 0 auto; padding: 40px 24px 96px; display: flex; flex-direction: column; gap: 16px; }
.legal h1 { margin: 0; font-size: 24px; color: var(--navy); }
.legal p { margin: 0; font-size: 15px; color: var(--text-3); line-height: 1.7; }
.legal .version { font-size: 13px; color: var(--faint); }
@media (max-width: 759px) {
  .pub-main { padding: 20px 16px 80px; }
  .pub-title h1 { font-size: 24px; }
  .panel-card { padding: 20px; }
  .step-name { display: none; }
  .step.is-active .step-name { display: block; }
  .step-line { margin: 0 8px; }
  .privacy-pill { display: none; }
  .panel-actions .btn { flex: 1; }
}

/* =====================================================================
   ADMIN
   ===================================================================== */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(180deg, #F7F9FC 0%, #EAF2FD 100%); }
.login-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 36px 32px; width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 22px; box-shadow: 0 12px 40px rgba(27,58,107,.08); }
.login-head { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.login-head img { width: 64px; height: 64px; border-radius: 14px; }
.login-head h1 { margin: 0; font-size: 22px; font-weight: 700; color: var(--navy); letter-spacing: -.02em; }
.login-head span { font-size: 13px; color: var(--muted); }
.login-card .btn { height: 46px; }
.login-card .forgot { text-align: center; font-size: 13px; color: var(--muted); }

.admin-shell { display: flex; min-height: 100vh; }
.sidebar { width: 240px; flex: none; background: var(--navy); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 16px; text-decoration: none; color: #fff; }
.sidebar-brand img { width: 36px; height: 36px; border-radius: 9px; }
.sidebar-brand b { font-size: 13px; font-weight: 700; letter-spacing: -.01em; display: block; }
.sidebar-brand span { font-size: 11px; color: rgba(255,255,255,.6); display: block; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; flex: 1; }
.nav-item { display: flex; align-items: center; gap: 10px; background: transparent; color: rgba(255,255,255,.75); border: 0; border-radius: 8px; padding: 0 12px; height: 40px; font-size: 14px; font-weight: 500; text-decoration: none; text-align: left; }
.nav-item:hover { background: rgba(255,255,255,.12); color: #fff; }
.nav-item .dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.25); flex: none; }
.nav-item.is-active { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; }
.nav-item.is-active .dot { background: #7CC4FF; }
.sidebar-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-direction: column; gap: 6px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; flex: none; }
.sidebar-user b { font-size: 13px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user span { font-size: 11px; color: rgba(255,255,255,.6); display: block; }
.logout-btn { display: flex; align-items: center; gap: 10px; background: transparent; color: rgba(255,255,255,.75); border: 0; border-radius: 8px; padding: 0 12px; height: 38px; font-size: 14px; cursor: pointer; text-align: left; width: 100%; }
.logout-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.admin-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 30; }
.topbar .brand-mini { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; }
.topbar .brand-mini img { width: 32px; height: 32px; border-radius: 8px; }
.topbar .menu-btn { width: 44px; height: 44px; border: 0; background: transparent; color: #fff; display: flex; align-items: center; justify-content: center; border-radius: 8px; }
.mobile-menu-backdrop { position: fixed; inset: 0; background: rgba(17,24,39,.5); z-index: 40; }
.mobile-menu { position: absolute; top: 0; left: 0; bottom: 0; width: 260px; background: var(--navy); color: #fff; padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; animation: fadeIn .2s ease; }
.mobile-menu .nav-item { height: 44px; font-size: 15px; }
.mobile-menu .logout-btn { margin-top: auto; height: 44px; font-size: 15px; }
.admin-main { padding: 28px 32px 100px; display: flex; flex-direction: column; gap: 20px; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
.page-head .sub { font-size: 13px; color: var(--muted); display: block; margin-top: 4px; }
.back-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; padding: 4px 0; text-decoration: none; }
.back-link:hover { color: var(--text); }
@media (max-width: 899px) {
  .sidebar { display: none; }
  .topbar { display: flex; }
  .admin-main { padding: 16px 16px 100px; }
}

/* Dashboard */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.kpi .label { font-size: 12px; font-weight: 500; color: var(--muted); }
.kpi .value { font-size: 26px; font-weight: 700; color: var(--text); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .value.navy { color: var(--navy); } .kpi .value.blue { color: var(--blue); }
.kpi.is-link { text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.kpi.is-link:hover { border-color: var(--blue); box-shadow: 0 2px 10px rgba(47,125,225,.12); color: inherit; }
.segmented-wrap { flex-wrap: wrap; align-self: flex-start; }
.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 899px) { .dash-grid { grid-template-columns: 1fr; } }
.panel { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head .title { font-size: 15px; font-weight: 600; }
.segmented { display: flex; background: var(--blue-light); border-radius: 8px; padding: 3px; gap: 2px; }
.segmented button { border: 0; border-radius: 6px; padding: 0 12px; height: 28px; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; background: transparent; color: var(--muted); }
.segmented button.is-active { background: #fff; color: var(--navy); }
.bars { display: flex; align-items: flex-end; gap: 12px; height: 160px; border-bottom: 1px solid var(--border); }
.bars.dense, .bar-labels.dense { gap: 4px; }
.bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.bar .val { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; min-height: 14px; }
.bar .fill { width: 100%; max-width: 36px; background: var(--blue-line); border-radius: 6px 6px 0 0; min-height: 3px; transition: height .3s ease; }
.bar.is-last .fill { background: var(--blue); }
.bar-labels { display: flex; gap: 12px; }
.bar-labels span { flex: 1; text-align: center; font-size: 11px; color: var(--faint); }
.komite-row { display: grid; grid-template-columns: 80px 1fr 36px; gap: 10px; align-items: center; }
.komite-row .k { font-size: 13px; color: var(--text-2); }
.komite-row .track { height: 8px; background: var(--blue-light); border-radius: 4px; overflow: hidden; }
.komite-row .track div { height: 100%; background: var(--blue); border-radius: 4px; }
.komite-row .n { font-size: 13px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* Tables */
.table-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.table-card-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.table-card-head .title { font-size: 15px; font-weight: 600; }
.table-scroll { overflow: auto; }
.table-scroll.tall { max-height: 640px; }
.grid-table { min-width: 720px; }
.grid-head, .grid-row { display: grid; gap: 12px; align-items: center; padding: 10px 20px; }
.grid-head { background: var(--bg); font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; position: sticky; top: 0; z-index: 2; }
.grid-row { border-top: 1px solid var(--row-border); }
.grid-row:hover { background: var(--row-hover); }
.grid-row.is-link { cursor: pointer; }
.grid-row.is-selected { background: var(--blue-soft); }
.grid-row .c-name { font-size: 14px; font-weight: 500; }
.grid-row .c-text { font-size: 13.5px; color: var(--text-3); }
.grid-row .c-main { font-size: 13.5px; }
.grid-row .c-small { font-size: 13px; color: var(--text-3); }
.grid-row .c-id { font-size: 13px; color: var(--muted); }
.grid-row .c-num { font-size: 13.5px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.grid-row .c-right { text-align: right; }
.grid-row .btn-sm { justify-self: end; }
.sort-btn { border: 0; background: transparent; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; white-space: nowrap; user-select: none; text-align: left; }
.sort-btn.is-active { color: var(--navy); }
.cols-recent { grid-template-columns: 118px 1.4fr 1fr 110px 130px 90px; }
.cols-accountants { grid-template-columns: 1.5fr 1fr 1fr 120px 140px 90px; }
.cols-acc-companies { grid-template-columns: 36px 1.6fr 200px 1fr 130px 70px 110px; }
.cols-records { grid-template-columns: 40px 64px 118px 160px 130px 240px 160px 70px 150px 140px 150px 110px 80px; gap: 8px; padding: 9px 16px; }
.grid-head.cols-records { padding: 10px 16px; }
.cols-companies { grid-template-columns: 40px 118px 240px 140px 160px 130px 70px 150px 150px 110px 120px 80px; gap: 8px; padding: 9px 16px; }
.grid-head.cols-companies { padding: 10px 16px; }
.grid-table.wide { min-width: 1700px; }
.grid-table.wide-companies { min-width: 1620px; }
.avatar-sm { width: 30px; height: 30px; border-radius: 50%; background: var(--blue-soft); color: var(--navy); font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.name-with-avatar { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; min-width: 0; }
.check-cell { display: flex; align-items: center; height: 30px; }
.check-cell input { width: 16px; height: 16px; accent-color: var(--navy); cursor: pointer; display: block; margin: 0; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.table-foot .size { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.pagination { display: flex; align-items: center; gap: 4px; }
.page-btn { border: 1px solid var(--border-input); background: #fff; border-radius: 8px; height: 32px; min-width: 32px; padding: 0 6px; cursor: pointer; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; text-decoration: none; }
.page-btn:hover { background: var(--bg); color: var(--text-2); }
.page-btn.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.page-btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* Records toolbar */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search-box { flex: 1; min-width: 240px; position: relative; }
.search-box svg { position: absolute; left: 14px; top: 13px; }
.search-box input { width: 100%; height: 44px; border: 1px solid var(--border-input); border-radius: 10px; padding: 0 14px 0 42px; font-size: 14px; background: #fff; }
.filter-btn { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border-input); color: var(--text-2); border-radius: 10px; padding: 0 16px; height: 44px; font-size: 14px; font-weight: 500; }
.filter-btn:hover { background: var(--bg); }
.filter-btn.has-filters { border-color: var(--blue); color: var(--navy); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--blue-soft); color: var(--navy); border-radius: 999px; padding: 5px 6px 5px 12px; font-size: 13px; font-weight: 500; }
.chip a, .chip button { border: 0; background: rgba(27,58,107,.1); color: var(--navy); width: 20px; height: 20px; border-radius: 50%; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; line-height: 1; text-decoration: none; padding: 0; }
.export-wrap { position: relative; }
.export-menu { position: absolute; right: 0; top: 46px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; width: 300px; z-index: 20; display: flex; flex-direction: column; gap: 2px; animation: fadeIn .15s ease; }
.export-menu button { display: flex; justify-content: space-between; align-items: center; border: 0; background: transparent; border-radius: 8px; padding: 10px 12px; font-size: 14px; color: var(--text); cursor: pointer; text-align: left; gap: 10px; }
.export-menu button:hover { background: var(--bg); }
.export-menu button:disabled { color: var(--faint); cursor: not-allowed; }
.export-menu button span { font-size: 12px; color: var(--faint); }
.bulk-bar { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 45; background: var(--dark); color: #fff; border-radius: 14px; padding: 10px 10px 10px 18px; display: flex; align-items: center; gap: 14px; box-shadow: 0 16px 40px rgba(17,24,39,.35); animation: slideUp .25s ease; max-width: calc(100vw - 32px); flex-wrap: wrap; }
.bulk-bar .count { font-size: 14px; font-weight: 600; white-space: nowrap; }
.bulk-bar .sep { width: 1px; height: 20px; background: rgba(255,255,255,.2); }
.bulk-bar .btn-clear { background: transparent; color: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.25); border-radius: 10px; height: 38px; padding: 0 14px; font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.bulk-bar .btn-clear:hover { background: rgba(255,255,255,.1); }
.date-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.date-chip { border: 1px solid var(--border-input); background: #fff; color: var(--text-2); border-radius: 999px; padding: 0 14px; height: 34px; font-size: 13px; font-weight: 500; cursor: pointer; }
.date-chip.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.filter-group { display: flex; flex-direction: column; gap: 10px; }
.filter-group .lbl { font-size: 13px; font-weight: 600; color: var(--text-2); }
.check-row { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--text-2); }

/* Exports & settings */
.export-row { display: grid; grid-template-columns: 40px 1fr auto auto; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--row-border); }
.export-row:last-child { border-bottom: 0; }
.export-row .icon { width: 40px; height: 40px; border-radius: 10px; background: var(--green-soft); display: flex; align-items: center; justify-content: center; }
.export-row .file { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.export-row .meta { font-size: 12.5px; color: var(--muted); }
.export-row .date { font-size: 13px; color: var(--muted); white-space: nowrap; }
@media (max-width: 599px) { .export-row { grid-template-columns: 40px 1fr; } .export-row .date { grid-column: 2; } .export-row .btn-sm { grid-column: 2; justify-self: start; } }
.settings-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 8px 0; max-width: 720px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--row-border); flex-wrap: wrap; }
.setting-row:last-child { border-bottom: 0; }
.setting-row .t { font-size: 14px; font-weight: 500; display: block; }
.setting-row .d { font-size: 12.5px; color: var(--muted); display: block; margin-top: 2px; }
.setting-row .actions { display: flex; align-items: center; gap: 10px; }
.setting-editor { padding: 6px 20px 18px; display: flex; flex-direction: column; gap: 14px; border-bottom: 1px solid var(--row-border); }
.stat-trio { display: flex; gap: 24px; }
.stat-trio .lbl { font-size: 12px; color: var(--muted); display: block; }
.stat-trio .val { font-size: 22px; font-weight: 700; color: var(--navy); display: block; }
.stat-trio .val.sm { font-size: 15px; font-weight: 600; color: var(--text); padding-top: 5px; }
.profile-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.profile-card .who { display: flex; align-items: center; gap: 16px; }
.avatar-lg { width: 52px; height: 52px; border-radius: 50%; background: var(--blue-soft); color: var(--navy); font-size: 17px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.profile-card h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.profile-card .phone { font-size: 14px; color: var(--text-3); }
.profile-card .ref { font-size: 13px; color: var(--muted); }
.error-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.error-page .box { max-width: 460px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.error-page .code { font-size: 13px; font-weight: 700; color: var(--blue); letter-spacing: .1em; }
.error-page h1 { margin: 0; font-size: 24px; color: var(--navy); }
.error-page p { margin: 0; color: var(--muted); line-height: 1.6; }
