/* EasyTax.ge: საერთო სტილი (დიზაინის მიხედვით) */
:root {
  --green: #0F5132; --green-dark: #0A3A24; --green-soft: #DCEBE2; --green-tint: #EEF5F0;
  --ink: #18211C; --ink-2: #3E4943; --muted: #5B6660; --line: #E3E6E1; --line-2: #D3D8D2;
  --bg: #F5F6F3; --chip: #EEF0EC; --amber: #B45309; --amber-ink: #8A4B08; --amber-bg: #FFF7ED; --amber-line: #F3D9B5;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, "Noto Sans Georgian", system-ui, sans-serif; color: var(--ink); background: #fff; }
body.app { background: var(--bg); }
a { color: var(--green); } a:hover { color: var(--green-dark); }
h1, h2, h3 { margin: 0; }
.muted { color: var(--muted); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 28px; }

/* ზედა ზოლი */
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 28px; max-width: 1360px; margin: 0 auto; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 19px; font-weight: 700; }
.logo-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--green); display: flex; align-items: center; justify-content: center; }
.logo span.tld { color: var(--green); }
.topnav { display: flex; gap: 24px; flex-wrap: wrap; }
.topnav a { color: var(--ink-2); text-decoration: none; font-size: 15px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ენის გადამრთველი */
.lang-switch { display: flex; background: var(--chip); border-radius: 10px; padding: 3px; gap: 2px; }
.lang-switch button { border: 0; background: transparent; color: #4F5A54; font: inherit; font-size: 13px; padding: 8px 12px; border-radius: 8px; min-height: 36px; cursor: pointer; }
.lang-switch button.active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* ღილაკები */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 15px; font-weight: 600; padding: 12px 20px; border-radius: 12px; min-height: 46px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-white { background: #fff; color: var(--green); border-color: #fff; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }

/* ფორმები */
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], select {
  font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid #C9D2CB; border-radius: 10px; width: 100%; background: #fff; color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--green); outline-offset: 1px; }
.errorlist { color: #B42318; font-size: 13px; margin: 4px 0 0; padding-left: 18px; }

/* აპის განლაგება */
.layout { display: flex; flex-wrap: wrap; gap: 24px; padding: 24px 28px; max-width: 1360px; margin: 0 auto; }
.sidebar { flex: 1 1 200px; max-width: 230px; display: flex; flex-direction: column; gap: 4px; }
.sidebar a { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px; color: var(--ink-2); font-size: 14px; text-decoration: none; }
.sidebar a.active { background: #fff; color: var(--green); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.content { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.grid-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.card h2 { font-size: 17px; font-weight: 600; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.hero-card { background: var(--green); color: #fff; border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.hero-card h2 { font-size: 15px; font-weight: 500; color: #D5E8DC; }
.big-number { font-size: 56px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.pill { display: inline-block; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; }
.pill-light { background: rgba(255,255,255,.14); }
.bar { height: 10px; background: var(--chip); border-radius: 999px; overflow: hidden; }
.bar > div { height: 100%; background: var(--green); border-radius: 999px; }

/* ნაბიჯები */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 10px 4px; font-size: 14px; }
.dot { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; font-size: 13px; font-weight: 700; }
.dot.done { background: var(--green-soft); }
.dot.todo { border: 2px solid var(--line-2); color: var(--muted); }
.steps li.done span.label { color: var(--muted); text-decoration: line-through; }

/* კალენდარი */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.cal .wd { font-size: 12px; color: var(--muted); padding: 4px 0; font-weight: 500; }
.cal .day { height: 36px; display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--ink-2); border-radius: 10px; }
.cal .day.due { background: var(--amber); color: #fff; font-weight: 700; }
.cal .day.today { border: 2px solid var(--green); color: var(--green); font-weight: 600; }

/* ცხრილი */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 680px; }
th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; padding: 10px 8px; border-bottom: 1px solid var(--line); }
td { padding: 14px 8px; border-bottom: 1px solid var(--chip); }
td.num, th.num { text-align: right; white-space: nowrap; font-weight: 600; }
.tag { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.tag-in { color: var(--green); background: var(--green-soft); }
.tag-out { color: var(--ink-2); background: var(--chip); }
.tag-unknown, .tag-review { color: var(--amber-ink); background: var(--amber-bg); }
.tag-ok { color: var(--green); background: transparent; padding-left: 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs a { font-size: 14px; background: var(--chip); color: var(--ink-2); border-radius: 999px; padding: 9px 16px; text-decoration: none; }
.tabs a.active { background: var(--ink); color: #fff; font-weight: 600; }
.banner-warn { background: var(--amber-bg); border: 1px solid var(--amber-line); color: #5C3205; border-radius: 14px; padding: 14px 18px; font-size: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.kpi .v { font-size: 24px; font-weight: 700; margin-top: 6px; }
.kpi.warn { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber-ink); }

/* საჯარო გვერდი */
.section { padding: 80px 0; }
.section.alt { background: var(--bg); }
.section h2.title { font-size: 34px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 8px; }
.hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.hero-text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero-text h1 { font-size: 50px; line-height: 1.12; letter-spacing: -.02em; }
.badge { align-self: flex-start; background: var(--green-soft); color: var(--green); font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 999px; }
.calc { flex: 1 1 380px; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: 0 12px 32px rgba(15,81,50,.08); display: flex; flex-direction: column; gap: 18px; }
.choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.choice label { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border: 1px solid var(--line-2); border-radius: 10px; font-size: 14px; cursor: pointer; }
.choice input:checked + span { font-weight: 700; color: var(--green); }
.result { background: var(--bg); border-radius: 14px; padding: 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.result strong { font-size: 32px; color: var(--green); }
.cards-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 36px; }
.num-badge { width: 40px; height: 40px; border-radius: 12px; background: var(--green); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--muted); }

/* ონბორდინგი და ავტორიზაცია */
.narrow { max-width: 640px; margin: 0 auto; padding: 48px 20px; display: flex; flex-direction: column; gap: 24px; }
.progress { height: 4px; background: var(--chip); } .progress > div { height: 100%; background: var(--green); }
.option { display: flex; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--line-2); border-radius: 16px; padding: 18px 20px; cursor: pointer; }
.option:has(input:checked) { border: 2px solid var(--green); background: var(--green-tint); padding: 17px 19px; }
.option input { width: 20px; height: 20px; accent-color: var(--green); flex: none; }
.option .t { display: block; font-size: 16px; font-weight: 600; }
.option .d { display: block; font-size: 14px; color: var(--muted); margin-top: 3px; }
.info { display: flex; gap: 12px; background: var(--green-tint); border-radius: 12px; padding: 14px 16px; font-size: 14px; line-height: 1.55; }
.nav-buttons { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* კურსის ზოლი */
.fx-strip { background: #fff; border-bottom: 1px solid var(--line); }
.fx-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding-top: 10px; padding-bottom: 10px; }
.fx-label { font-size: 13px; color: var(--muted); }
.fx-list { display: flex; flex-wrap: wrap; gap: 10px; }
.fx { display: inline-flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px 4px 4px; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx-code { background: var(--green); color: #fff; font-weight: 700; font-size: 12px; letter-spacing: .02em; border-radius: 999px; padding: 5px 10px; }
.fx-rate { font-weight: 700; color: var(--ink); }
.fx-diff { font-size: 12px; font-weight: 600; }
.fx-diff.up { color: #0F7A3D; }
.fx-diff.down { color: #B42318; }
.fx-diff.same { color: var(--muted); font-size: 8px; }

/* კალკულატორის შედეგი */
.result-box { background: var(--bg); border-radius: 14px; padding: 6px 18px; }
.result-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.result-line:last-child { border-bottom: 0; }
.result-line.total { font-size: 16px; }
.result-line.total strong { font-size: 24px; color: var(--green); }

/* კონტაქტი */
.contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.contact-list li { display: flex; flex-direction: column; gap: 2px; }
.contact-list .k { font-size: 13px; color: var(--muted); }
.contact-list .v { font-size: 17px; font-weight: 600; }
textarea { font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid #C9D2CB; border-radius: 10px; width: 100%; min-height: 140px; resize: vertical; }
.hp { position: absolute; left: -9999px; }

/* რეპორტები */
.bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; align-items: end; height: 220px; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; min-width: 0; }
.bar-val { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-track { flex: 1; width: 100%; max-width: 44px; display: flex; align-items: flex-end; }
.bar-fill { width: 100%; background: #9CC5AE; border-radius: 6px 6px 2px 2px; min-height: 2px; }
.bar-fill.paid { background: var(--green); }
.bar-lbl { font-size: 12px; color: var(--ink-2); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.link-btn { font: inherit; font-size: 13px; color: var(--green); background: none; border: 0; padding: 8px 0; cursor: pointer; text-decoration: underline; white-space: nowrap; }
tfoot td { border-top: 2px solid var(--line); border-bottom: 0; font-weight: 700; }

/* ჩამოსაშლელი მენიუ და ქვედა ნავიგაცია (ტელეფონისთვის) */
.mobile-only { display: none !important; }
.mnav { position: relative; }
.mnav summary { list-style: none; cursor: pointer; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; color: var(--ink); }
.mnav summary::-webkit-details-marker { display: none; }
.mnav[open] summary { background: var(--chip); }
.mnav-panel { position: absolute; right: 0; top: 52px; width: min(300px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 40px rgba(0,0,0,.12); padding: 10px; display: flex; flex-direction: column; gap: 4px; z-index: 50; }
.mnav-panel > a:not(.btn) { padding: 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 16px; }
.mnav-panel > a:not(.btn):active { background: var(--chip); }
.mnav-panel .btn { margin-top: 4px; }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; font-size: 10px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); text-decoration: none; min-height: 48px; justify-content: center; }
.bottom-nav a.active { color: var(--green); font-weight: 600; }
.bottom-nav a.add span { width: 44px; height: 44px; margin-top: -18px; border-radius: 50%; background: var(--green); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(15,81,50,.3); }

@media (max-width: 760px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: flex !important; }
  details.mobile-only { display: block !important; }

  .container { padding: 0 16px; }
  .topbar-inner { padding: 10px 16px; flex-wrap: nowrap; }
  .topbar .row { flex-wrap: nowrap; gap: 6px; }
  .topbar .btn-ghost { padding: 8px; min-height: 40px; }
  .logo { font-size: 17px; } .logo-mark { width: 32px; height: 32px; }
  .lang-switch button { padding: 6px 9px; min-height: 34px; font-size: 12px; }

  /* მთავარი გვერდი */
  .fx-inner { gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .fx-label { font-size: 12px; width: 100%; }
  .fx-list { gap: 6px; width: 100%; }
  .fx { padding: 3px 10px 3px 3px; gap: 6px; font-size: 13px; }
  .fx-code { padding: 4px 8px; font-size: 11px; }
  .hero { padding-top: 28px; padding-bottom: 36px; gap: 28px; }
  .hero-text { gap: 16px; }
  .hero-text h1 { font-size: 32px; }
  .hero-text p { font-size: 16px !important; }
  .hero-text .btn { width: 100%; }
  .badge { font-size: 12px; }
  .calc { padding: 20px; border-radius: 18px; }
  .section { padding: 48px 0; }
  .section h2.title { font-size: 26px; }
  .cards-3 { margin-top: 24px; gap: 14px; }
  .footer .row { flex-direction: column; align-items: flex-start; }

  /* აპი */
  body.app { padding-bottom: 84px; }
  .layout { padding: 16px; gap: 16px; }
  .content { gap: 16px; }
  .card { padding: 18px; border-radius: 16px; }
  .hero-card { padding: 22px; border-radius: 16px; gap: 14px; }
  .big-number { font-size: 44px; }
  .hero-card .btn { width: 100%; }
  .grid-2 { grid-template-columns: 1fr; gap: 16px; }
  .grid-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; } .kpi .v { font-size: 19px; }
  .content h1 { font-size: 22px !important; }
  .content > .row .btn:not(.keep) { display: none; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .tabs a { white-space: nowrap; }

  /* ცხრილი ბარათებად */
  table.cards-on-mobile { min-width: 0; }
  table.cards-on-mobile thead { display: none; }
  table.cards-on-mobile tbody { display: block; }
  table.cards-on-mobile tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  table.cards-on-mobile td { border: 0; padding: 0; font-size: 12px; color: var(--muted); }
  table.cards-on-mobile td.doc-cell { order: -2; flex: 1 1 calc(100% - 130px); font-size: 14px; color: var(--ink); }
  table.cards-on-mobile td.num { order: -1; flex: 0 0 110px; text-align: right; font-size: 15px; color: var(--ink); }
  table.cards-on-mobile td[colspan] { flex: 1 1 100%; }
  table.cards-on-mobile td.num[data-label] { order: 0; flex: none; text-align: left; font-size: 13px; }
  table.cards-on-mobile td.num[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 400; }
  table.cards-on-mobile td.num.muted { display: none; }
  .grid-kpi > :nth-child(3):last-child { grid-column: 1 / -1; }
  table.cards-on-mobile tfoot { display: block; } table.cards-on-mobile tfoot td[colspan] { display: none; }
  .bars { gap: 3px; height: 170px; } .bar-val { display: none; } .bar-lbl { font-size: 10px; }
  .hero-card form { width: 100%; } .hero-card form .btn { width: 100%; }

  /* ფორმები და სხვა */
  .narrow { padding: 28px 16px; gap: 18px; }
  .narrow h1 { font-size: 24px !important; }
  .option { padding: 14px 16px; } .option:has(input:checked) { padding: 13px 15px; }
  .nav-buttons .btn-primary { flex: 1; }
}

/* იმპორტი */
.dropzone { border: 2px dashed #C9D2CB; border-radius: 16px; padding: 28px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; background: #FAFBF9; cursor: pointer; }
.dropzone input[type=file] { max-width: 100%; font-size: 14px; }

/* სამართლებრივი გვერდები */
.legal { max-width: 780px; padding-top: 48px; padding-bottom: 64px; line-height: 1.7; color: var(--ink-2); }
.legal h1 { font-size: 34px; color: var(--ink); margin-bottom: 4px; }
.legal h2 { font-size: 19px; color: var(--ink); margin: 32px 0 8px; }
.legal ul { padding-left: 22px; }
.btn-danger { background: #B42318; border-color: #B42318; color: #fff; }
.btn-danger:hover { background: #8F1C13; color: #fff; }
.danger-zone { border-color: #F3C7C3; }
@media (max-width: 760px) { .legal { padding-top: 28px; } .legal h1 { font-size: 26px; } }

/* ბუღალტრის კაბინეტი */
.acc-kpi { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
a.kpi { text-decoration: none; color: inherit; }
a.kpi:hover { border-color: var(--green); }
.kpi.danger { background: #FEF3F2; border-color: #F3C7C3; color: #912018; }
.tag-danger { color: #912018; background: #FEF3F2; }

/* გარე ბუღალტერი */
.ws-banner { display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between; background:var(--green); color:#fff; border-radius:12px; padding:12px 16px; font-size:14px; }
.ws-banner .btn { padding:8px 12px; font-size:13px; }
.option-acct { border-style: dashed; }
.price-box { display:flex; flex-wrap:wrap; gap:18px; align-items:center; background:var(--green-soft); border-radius:12px; padding:14px 18px; font-size:14px; }
.price-box strong { font-size:20px; }

/* PWA: „დააყენე აპი“ */
.pwa-install { position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 50; width: min(560px, calc(100% - 24px));
  display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid #DCE3DE; border-radius: 16px; padding: 12px 12px 12px 14px;
  box-shadow: 0 10px 30px rgba(15, 30, 20, .15); }
.pwa-install[hidden] { display: none; }
.pwa-text { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.35; }
.pwa-text .muted { font-size: 13px; }
.pwa-install .btn { padding: 9px 14px; font-size: 14px; }
@media (max-width: 760px) { .app .pwa-install { bottom: 84px; } }
@media (display-mode: standalone) { .pwa-install { display: none !important; } }
.pwa-install [hidden] { display: none !important; }
