/* AkmazX e-Arşiv — telefon öncelikli arayüz (tasarım: Giriş, Faturalarım, Yeni fatura, İmza, Tamam). */
:root {
  --ea-bg: #F4F6FA;
  --ea-surface: #FFFFFF;
  --ea-text: #0F172A;
  --ea-muted: #5B6475;
  --ea-border: #E3E7EE;
  --ea-input: #CBD2DD;
  --ea-accent: #1F5FD1;
  --ea-accent-dark: #174AA6;
  --ea-accent-soft: #EEF3FD;
  --ea-warn-bg: #FFF4DB;
  --ea-warn-border: #F2D58E;
  --ea-warn-text: #6B4200;
  --ea-ok-bg: #E6F4EC;
  --ea-ok-text: #0F5A33;
  --ea-ok-icon: #157347;
  --ea-grey-bg: #EEF0F4;
  --ea-grey-text: #4A5262;
  --ea-danger: #B42318;
  --ea-danger-soft: #FDECEA;
  --ea-radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--ea-bg);
  color: var(--ea-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--ea-accent); }
a:hover { color: var(--ea-accent-dark); }
h1, h2 { margin: 0; }
[hidden] { display: none !important; }
.ea-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.ea-app { max-width: 480px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; display: flex; flex-direction: column; background: var(--ea-bg); }
@media (min-width: 520px) { .ea-app { border-left: 1px solid var(--ea-border); border-right: 1px solid var(--ea-border); } }
.ea-muted { color: var(--ea-muted); }
.ea-fine { margin: 0; font-size: 12px; line-height: 1.5; color: var(--ea-muted); }
.ea-center { text-align: center; }
.ea-link, .ea-link-btn { color: var(--ea-accent); font-weight: 600; font-size: 14px; text-decoration: none; }
.ea-link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; cursor: pointer; }
.ea-hint { font-size: 12px; color: var(--ea-muted); }

/* düğmeler: ana mavi, ikincil beyaz/mavi; kırmızı yalnız sil/iptal */
.ea-btn { height: 52px; border-radius: 12px; border: 0; font: inherit; font-weight: 600; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; cursor: pointer; width: 100%; padding: 0 16px; }
.ea-btn-primary { background: var(--ea-accent); color: #FFFFFF; }
.ea-btn-primary:hover { background: var(--ea-accent-dark); color: #FFFFFF; }
.ea-btn-secondary { background: #FFFFFF; color: var(--ea-accent); border: 1.5px solid var(--ea-accent); }
.ea-btn-secondary:hover { background: var(--ea-accent-soft); color: var(--ea-accent-dark); }
.ea-btn-danger { background: #FFFFFF; color: var(--ea-danger); border: 1.5px solid var(--ea-danger); }
.ea-btn-sm { height: 44px; font-size: 14px; width: auto; }
.ea-btn-dashed { height: 44px; border-radius: 10px; border: 1px dashed #9AA6B8; background: #FFFFFF; color: var(--ea-accent-dark); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; width: 100%; }
.ea-icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--ea-text); background: transparent; border: 0; border-radius: 12px; cursor: pointer; flex: none; }
.ea-icon-btn-bordered { border: 1px solid var(--ea-border); background: #FFFFFF; }

.ea-card { background: var(--ea-surface); border: 1px solid var(--ea-border); border-radius: var(--ea-radius); }

/* iletiler */
.ea-flash { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.ea-flash svg { flex: none; margin-top: 1px; }
.ea-flash-ok { background: var(--ea-ok-bg); color: var(--ea-ok-text); }
.ea-flash-warn { background: var(--ea-warn-bg); color: var(--ea-warn-text); border: 1px solid var(--ea-warn-border); }
.ea-flash-error { background: var(--ea-danger-soft); color: var(--ea-danger); border: 1px solid #F5C2BC; }
.ea-ok-text { display: flex; gap: 6px; align-items: center; color: var(--ea-ok-text); font-weight: 600; margin: 0 0 10px; }

/* formlar */
.ea-form { display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.ea-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ea-field label, .ea-sms-label { font-size: 13px; font-weight: 600; }
.ea-field input, .ea-field select { height: 46px; width: 100%; border: 1px solid var(--ea-input); border-radius: 10px; padding: 0 12px; font: inherit; font-size: 16px; background: #FFFFFF; color: var(--ea-text); }
.ea-login .ea-field input { height: 48px; padding: 0 14px; }
.ea-field input:focus, .ea-field select:focus, .ea-code-input:focus { outline: 2px solid var(--ea-accent); outline-offset: 1px; border-color: var(--ea-accent); }
.ea-inline { display: flex; gap: 8px; }
.ea-inline input { flex: 1; }
.ea-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ea-grid-3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 0.9fr); gap: 8px; }
.ea-check { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.ea-check input { width: 20px; height: 20px; accent-color: var(--ea-accent); }
.ea-note { display: flex; gap: 10px; align-items: flex-start; background: var(--ea-accent-soft); border-radius: 10px; padding: 12px; font-size: 13px; line-height: 1.45; color: var(--ea-accent-dark); }
.ea-note svg { flex: none; margin-top: 1px; }

/* giriş */
.ea-login-wrap { flex: 1; display: flex; flex-direction: column; gap: 24px; padding: 56px 24px 28px; }
.ea-brand { display: flex; align-items: center; gap: 10px; }
.ea-logo { width: 40px; height: 40px; border-radius: 10px; background: var(--ea-accent); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }
.ea-brand-text { display: flex; flex-direction: column; }
.ea-brand-name { font-weight: 700; font-size: 18px; }
.ea-brand-text .ea-muted { font-size: 13px; }
.ea-intro { display: flex; flex-direction: column; gap: 8px; }
.ea-intro h1 { font-size: 26px; line-height: 1.25; font-weight: 700; }
.ea-intro p { margin: 0; font-size: 15px; line-height: 1.5; }
.ea-login-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; }
.ea-help summary { color: var(--ea-accent); font-size: 14px; font-weight: 500; cursor: pointer; list-style: none; }
.ea-help summary::-webkit-details-marker { display: none; }
.ea-help p { font-size: 13px; color: var(--ea-muted); margin: 8px 0 0; }
.ea-test-flag { margin: 0; font-size: 12px; text-align: center; color: var(--ea-warn-text); background: var(--ea-warn-bg); border-radius: 10px; padding: 8px 12px; }

/* üst çubuk */
.ea-topbar { padding: 48px 12px 12px; display: flex; align-items: center; gap: 4px; background: #FFFFFF; border-bottom: 1px solid var(--ea-border); position: sticky; top: 0; z-index: 5; }
.ea-topbar h1 { font-size: 20px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ea-scroll { flex: 1; padding: 16px 20px 24px; display: flex; flex-direction: column; gap: 12px; }

/* liste başı */
.ea-listhead { padding: 48px 20px 16px; display: flex; flex-direction: column; gap: 14px; background: #FFFFFF; border-bottom: 1px solid var(--ea-border); }
.ea-listhead-row { display: flex; align-items: center; justify-content: space-between; }
.ea-listhead-title { display: flex; flex-direction: column; gap: 2px; }
.ea-listhead h1 { font-size: 24px; font-weight: 700; }
.ea-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--ea-bg); border-radius: 12px; padding: 4px; gap: 4px; }
.ea-tab { text-align: center; padding: 8px 0; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--ea-muted); text-decoration: none; }
.ea-tab.is-active { background: #FFFFFF; color: var(--ea-text); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08); }
.ea-sign-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--ea-warn-bg); border: 1px solid var(--ea-warn-border); border-radius: 12px; padding: 12px 14px; }
.ea-sign-banner span { font-size: 14px; color: var(--ea-warn-text); font-weight: 500; }
.ea-sign-banner a { font-size: 14px; font-weight: 600; color: var(--ea-accent-dark); text-decoration: none; }
.ea-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.ea-chip { flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--ea-border); background: #FFFFFF; color: var(--ea-muted); font-size: 13px; font-weight: 600; text-decoration: none; }
.ea-chip.is-active { border-color: var(--ea-accent); color: var(--ea-accent); background: var(--ea-accent-soft); }
/* dönem seçimi: tek kartta iki tarih alanı + Göster */
.ea-range-form { background: #FFFFFF; border: 1px solid var(--ea-border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.ea-range-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ea-range-fields input[type="date"] { min-width: 0; font-size: 16px; padding: 0 10px; }
.ea-range-btn { height: 46px; font-size: 16px; }
@media (max-width: 359px) { .ea-range-fields { grid-template-columns: 1fr; } }
.ea-status-chips { -webkit-overflow-scrolling: touch; scrollbar-width: none; flex-wrap: nowrap; }
.ea-status-chips::-webkit-scrollbar { display: none; }
.ea-range-summary { margin: 0; font-size: 14px; color: var(--ea-muted); }
.ea-range-summary strong { color: var(--ea-text); font-weight: 600; }
.ea-loading { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--ea-accent-soft); border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.45; color: var(--ea-accent-dark); }
.ea-loading a { flex: none; font-weight: 600; text-decoration: none; }
.ea-row { background: #FFFFFF; border: 1px solid var(--ea-border); border-radius: 12px; padding: 14px; display: flex; align-items: center; gap: 12px; color: var(--ea-text); text-decoration: none; }
.ea-row:hover { border-color: #C9D8F6; color: var(--ea-text); }
.ea-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ea-row-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ea-row-sub { font-size: 13px; }
.ea-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ea-row-amount { font-size: 15px; font-weight: 700; white-space: nowrap; }
.ea-badge { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.ea-badge-signed { background: var(--ea-ok-bg); color: var(--ea-ok-text); }
.ea-badge-draft { background: var(--ea-warn-bg); color: var(--ea-warn-text); }
.ea-badge-cancelled { background: var(--ea-grey-bg); color: var(--ea-grey-text); }
.ea-empty { text-align: center; padding: 32px 0; color: var(--ea-muted); }

/* Gelen: Dijital Vergi Dairesi bağlantısı ve liste */
.ea-row-static { cursor: default; }
.ea-row-static:hover { border-color: var(--ea-border); }
.ea-dvd-head { display: flex; flex-direction: column; gap: 4px; }
.ea-captcha { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ea-captcha-img { width: 160px; height: 50px; border: 1px solid var(--ea-border); border-radius: 8px; background: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; object-fit: contain; }
.ea-consent { align-items: flex-start; line-height: 1.45; }
.ea-consent input { flex: none; margin-top: 1px; }
.ea-dvd-out { display: flex; justify-content: center; }
.ea-empty p { margin: 8px 0 0; }
.ea-bottombar { padding: 12px 20px calc(28px + env(safe-area-inset-bottom)); background: #FFFFFF; border-top: 1px solid var(--ea-border); position: sticky; bottom: 0; z-index: 5; }
.ea-sign .ea-bottombar, .ea-stack .ea-bottombar { margin: 0 -20px -24px; }
.ea-bottombar-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* yeni fatura */
.ea-section { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ea-section h2 { font-size: 15px; font-weight: 700; }
.ea-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ea-picker { position: relative; display: inline-flex; align-items: center; }
.ea-picker .ea-link { font-size: 13px; pointer-events: none; }
.ea-picker select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; font-size: 16px; }
.ea-line { padding: 10px 0 12px; border-bottom: 1px solid var(--ea-grey-bg); display: flex; flex-direction: column; gap: 8px; }
.ea-line-foot { display: flex; align-items: flex-end; gap: 8px; }
.ea-grow { flex: 1; }
.ea-line-total { font-size: 15px; font-weight: 600; min-width: 90px; text-align: right; padding-bottom: 12px; white-space: nowrap; }
.ea-total-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--ea-muted); }
.ea-total-grand { font-size: 18px; font-weight: 700; color: var(--ea-text); padding-top: 6px; border-top: 1px solid var(--ea-grey-bg); }
.ea-totals { gap: 8px; }
.ea-more summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ea-accent); }
.ea-more[open] summary { margin-bottom: 10px; }
.ea-more > form, .ea-more > div { display: flex; flex-direction: column; gap: 10px; }
[data-ea-person][hidden], [data-ea-company][hidden] { display: none; }
[data-ea-person], [data-ea-company] { display: flex; flex-direction: column; gap: 12px; }

/* imza */
.ea-stack { display: flex; flex-direction: column; gap: 16px; }
.ea-sign-list { padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.ea-sign-caption { font-size: 13px; padding-bottom: 6px; }
.ea-sign-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--ea-grey-bg); cursor: pointer; }
.ea-sign-row input { width: 20px; height: 20px; accent-color: var(--ea-ok-icon); flex: none; }
.ea-sign-name { flex: 1; font-size: 15px; font-weight: 600; display: flex; flex-direction: column; min-width: 0; }
.ea-sign-name small { font-size: 12px; font-weight: 400; }
.ea-sign-amount { font-size: 15px; font-weight: 600; white-space: nowrap; }
.ea-sign-total { display: flex; justify-content: space-between; font-size: 16px; font-weight: 700; padding-top: 10px; border-top: 1px solid var(--ea-grey-bg); }
.ea-sms { padding: 20px 16px; display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.ea-sms-head { display: flex; flex-direction: column; gap: 4px; }
.ea-sms-title { font-size: 16px; font-weight: 700; }
.ea-sms-head .ea-muted { font-size: 14px; }
.ea-sms-label { align-self: flex-start; }
.ea-code-input { width: 100%; height: 56px; border: 1.5px solid var(--ea-accent); border-radius: 12px; text-align: center; font: inherit; font-size: 24px; letter-spacing: 6px; font-weight: 600; }
.ea-sms-resend { font-size: 13px; }

/* tamam + detay */
.ea-done { flex: 1; display: flex; flex-direction: column; gap: 20px; padding: 64px 20px calc(28px + env(safe-area-inset-bottom)); }
.ea-done-head { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.ea-done-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--ea-ok-bg); display: flex; align-items: center; justify-content: center; }
.ea-done-head h1 { font-size: 24px; font-weight: 700; }
.ea-done-head p { margin: 0; font-size: 15px; line-height: 1.5; }
.ea-done-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ea-done-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
section.ea-done-row { padding: 16px; }
.ea-done-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ea-share-title { font-size: 13px; font-weight: 600; }
.ea-share { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ea-btn-share { height: 48px; border-radius: 10px; font-size: 14px; padding: 0 6px; }
.ea-upgrade { background: var(--ea-accent-soft); border-color: #C9D8F6; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ea-upgrade-title { font-size: 15px; font-weight: 700; color: var(--ea-accent-dark); }
.ea-upgrade-text { font-size: 14px; line-height: 1.5; color: #23395E; }
.ea-upgrade a { font-size: 14px; font-weight: 600; text-decoration: none; }
.ea-done-back { margin-top: auto; }
.ea-detail-head { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ea-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ea-actions .ea-btn { flex: 1 1 auto; }
.ea-doc-frame { background: #FFFFFF; border: 1px solid var(--ea-border); border-radius: var(--ea-radius); overflow: hidden; height: 70vh; }
.ea-doc-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.ea-list-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--ea-grey-bg); }
.ea-list-item span { display: flex; flex-direction: column; font-weight: 600; font-size: 14px; min-width: 0; }
.ea-list-item small { font-weight: 400; font-size: 12px; }

/* yazdırma sarmalayıcısı */
.ea-print-page .ea-app { max-width: 900px; }
.ea-print-bar { display: flex; gap: 8px; padding: 16px 16px 8px; justify-content: flex-end; }
.ea-print-hint { padding: 0 16px 8px; text-align: right; }
.ea-print-frame { width: 100%; height: calc(100vh - 110px); border: 0; background: #FFFFFF; display: block; }
@media print {
  .ea-print-bar, .ea-print-hint { display: none; }
  .ea-print-page .ea-app { max-width: none; border: 0; }
  .ea-print-frame-tall { height: 2900px; }
}
