/* ============ PayHO — global styles ============ */
:root {
  --yellow: #f8c93a;
  --yellow-dark: #e5b420;
  --yellow-soft: #fdf3d0;
  --ink: #1d1d1f;
  --ink-soft: #5c5c60;
  --green: #1f9d55;
  --green-soft: #d9f3e3;
  --red: #d64545;
  --red-soft: #fbe3e3;
  --blue: #2f6fd0;
  --blue-soft: #e2ecfb;
  --bg: #f6f6f4;
  --card: #ffffff;
  --border: #e6e4de;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(0,0,0,.06);
  font-size: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Helvetica Neue", Arial, "Noto Sans Georgian", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.container-sm { max-width: 480px; margin: 0 auto; padding: 0 16px; }

/* ---------- header ---------- */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; gap: 12px;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.25rem; letter-spacing: -.5px; }
.logo .pay { background: var(--ink); color: var(--yellow); padding: 2px 7px; border-radius: 7px; }
.logo .ho { background: var(--yellow); color: var(--ink); padding: 2px 7px; border-radius: 7px; border: 2px solid var(--ink); }
.logo-sub { font-size: .72rem; color: var(--ink-soft); font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--yellow); color: var(--ink);
  border: none; border-radius: var(--radius);
  padding: 14px 22px; font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: background .15s; width: auto;
}
.btn:hover { background: var(--yellow-dark); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: .85rem; border-radius: 10px; }
.btn-outline { background: transparent; border: 1.5px solid var(--border); }
.btn-outline:hover { background: var(--bg); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #187a42; }
.btn-red { background: var(--red-soft); color: var(--red); }
.btn-red:hover { background: #f5cccc; }
.btn-ghost { background: transparent; color: var(--ink-soft); }
label { display: block; font-size: .85rem; color: var(--ink-soft); margin: 14px 0 6px; }
input[type=text], input[type=tel], input[type=number], input[type=email],
input[type=password], select, textarea {
  width: 100%; padding: 13px 14px; font-size: 1rem;
  border: 1.5px solid var(--border); border-radius: 12px; background: #fff;
  outline: none; transition: border-color .15s; font-family: inherit;
}
input:focus, select:focus, textarea:focus { border-color: var(--yellow-dark); }

/* ---------- cards ---------- */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin: 14px 0;
}
.card-green { background: var(--green-soft); }
.card-dark { background: var(--ink); color: #fff; }
.muted { color: var(--ink-soft); font-size: .85rem; }
.balance-card { display: flex; justify-content: space-between; align-items: center; }
.balance-value { font-size: 2.4rem; font-weight: 800; }
.balance-value small { font-size: 1.2rem; }
.park-name { font-weight: 700; display: flex; gap: 6px; align-items: center; }
.rating { color: #c99a06; font-weight: 600; font-size: .9rem; }

/* ---------- alerts ---------- */
.alert { padding: 12px 16px; border-radius: 12px; margin: 12px 0; font-size: .92rem; }
.alert-ok { background: var(--green-soft); color: var(--green); }
.alert-error { background: var(--red-soft); color: var(--red); }
.alert-info { background: var(--blue-soft); color: var(--blue); }

/* ---------- badges ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.badge-pending { background: var(--yellow-soft); color: #96700a; }
.badge-approved { background: var(--blue-soft); color: var(--blue); }
.badge-processing { background: var(--blue-soft); color: var(--blue); }
.badge-paid { background: var(--green-soft); color: var(--green); }
.badge-rejected { background: #eee; color: var(--ink-soft); }
.badge-failed { background: var(--red-soft); color: var(--red); }
.badge-active { background: var(--green-soft); color: var(--green); }
.badge-blocked { background: var(--red-soft); color: var(--red); }
.badge-disabled { background: #eee; color: var(--ink-soft); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th {
  text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .4px;
  color: var(--ink-soft); padding: 10px 12px; border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
table.data td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:hover td { background: #fbfaf7; }
.amount-pos { color: var(--green); font-weight: 700; }
.amount-neg { color: var(--red); font-weight: 700; }

/* ---------- driver auth ---------- */
.auth-page { display: flex; flex-direction: column; align-items: center; padding: 48px 16px; }
.auth-title { font-size: 1.5rem; font-weight: 800; margin: 18px 0 4px; text-align: center; }
.auth-sub { color: var(--ink-soft); text-align: center; margin-bottom: 10px; }
.auth-card { width: 100%; max-width: 420px; }
.taxi-hero { font-size: 64px; line-height: 1; margin-top: 12px; }
.code-input { text-align: center; font-size: 1.6rem; letter-spacing: 8px; }

/* ---------- history rows ---------- */
.history-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); gap: 10px; }
.history-row:last-child { border-bottom: none; }
.history-meta { font-size: .8rem; color: var(--ink-soft); }

/* ---------- admin layout ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 230px; background: var(--ink); color: #ddd; flex-shrink: 0;
  display: flex; flex-direction: column; padding: 18px 12px;
}
.sidebar .logo { margin: 4px 8px 22px; }
.sidebar a.nav-item {
  display: block; padding: 11px 14px; border-radius: 10px; margin: 2px 0;
  color: #cfcfcf; font-size: .95rem;
}
.sidebar a.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar a.nav-item.active { background: var(--yellow); color: var(--ink); font-weight: 700; }
.sidebar .spacer { flex: 1; }
.admin-main { flex: 1; padding: 24px 28px; min-width: 0; }
.page-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 16px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 8px; }
.stat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.stat .num { font-size: 1.7rem; font-weight: 800; }
.stat .lbl { color: var(--ink-soft); font-size: .82rem; margin-top: 2px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.filters a { padding: 7px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); font-size: .85rem; }
.filters a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.inline-form { display: inline; }
.actions-cell { display: flex; gap: 6px; flex-wrap: wrap; }

@media (max-width: 820px) {
  .admin-shell { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; overflow-x: auto; align-items: center; padding: 10px; }
  .sidebar .logo { margin: 0 12px 0 4px; }
  .sidebar a.nav-item { white-space: nowrap; }
  .sidebar .spacer { display: none; }
  .admin-main { padding: 16px; }
}

/* ---------- landing ---------- */
.hero { text-align: center; padding: 70px 16px 40px; }
.hero h1 { font-size: 2.3rem; font-weight: 800; letter-spacing: -1px; max-width: 700px; margin: 0 auto 14px; }
.hero p { color: var(--ink-soft); max-width: 640px; margin: 0 auto 26px; font-size: 1.05rem; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; padding: 20px 0 40px; }
.feature { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.feature .icon { font-size: 30px; margin-bottom: 10px; }
.feature h3 { margin-bottom: 8px; font-size: 1.05rem; }
.feature p { color: var(--ink-soft); font-size: .92rem; }
.site-footer { text-align: center; color: var(--ink-soft); font-size: .85rem; padding: 30px 0; border-top: 1px solid var(--border); margin-top: 30px; }
.lang-switch { display: flex; gap: 4px; }
.lang-switch a { padding: 5px 9px; border-radius: 8px; font-size: .8rem; font-weight: 700; color: var(--ink-soft); }
.lang-switch a.active { background: var(--ink); color: var(--yellow); }

/* ---------- mobile: tables collapse into cards ---------- */
@media (max-width: 700px) {
  :root { font-size: 15px; }
  .hero { padding: 44px 16px 24px; }
  .hero h1 { font-size: 1.65rem; letter-spacing: -.5px; }
  .page-title { font-size: 1.2rem; }
  .balance-value { font-size: 2rem; }
  .card { padding: 16px; }
  .btn { padding: 13px 18px; }
  .topbar-right { gap: 6px; }
  .topbar-right .btn-sm { padding: 8px 10px; }

  table.data.stack { display: block; }
  table.data.stack thead, table.data.stack tr:first-child { display: none; }
  table.data.stack tr { display: block; border: 1px solid var(--border); border-radius: 12px; margin: 10px 0; padding: 4px 12px; }
  table.data.stack tr:hover td { background: transparent; }
  table.data.stack td { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px dashed var(--border); padding: 9px 0; text-align: right; }
  table.data.stack td:last-child { border-bottom: none; }
  table.data.stack td::before { content: attr(data-label); color: var(--ink-soft); font-size: .76rem; text-align: left; flex-shrink: 0; }
  table.data.stack td[data-label=""]::before { content: none; }
  table.data.stack .actions-cell { width: 100%; justify-content: flex-end; }
  table.data.stack .actions-cell .btn { flex: 1; }
}

/* ---------- misc ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
.kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: .95rem; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--ink-soft); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.center { text-align: center; }
.error-page { text-align: center; padding: 80px 16px; }
.error-page .code { font-size: 4rem; font-weight: 800; color: var(--yellow-dark); }
