:root {
  --bg: #071426;
  --bg-2: #0c2340;
  --panel: #102848;
  --line: rgba(255, 255, 255, 0.1);
  --text: #ffffff;
  --muted: #c5d0dc;
  --accent: #2ec4b6;
  --accent-2: #178f86;
  --danger: #f07167;
  --warn: #e9c46a;
  --ok: #2ec4b6;
  --shadow: 0 18px 44px rgba(4, 12, 28, 0.38);
  font-family: "Segoe UI", "PT Root UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: radial-gradient(900px 480px at 0% -10%, rgba(46, 196, 182, 0.28) 0%, var(--bg) 46%); color: var(--text); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.login-wrap {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card, .panel, .card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.login-card { width: min(440px, 100%); padding: 32px 28px; text-align: center; }
.login-card h1 { font-size: 32px; letter-spacing: 0.14em; margin-top: 12px; }
.slogan { margin: 0; color: var(--accent); font-size: 13px; letter-spacing: 0.04em; }
.login-logo { width: 72px; height: 72px; }
.login-card label, .login-card .error { text-align: left; }
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.mark, .mark-img {
  width: 46px; height: 46px; border-radius: 14px;
}
.mark {
  background: #0b1f3a; display: grid; place-items: center; font-weight: 800; color: #fff;
  border: 1px solid rgba(46, 196, 182, 0.6);
}
h1, h2, h3 { margin: 0 0 8px; letter-spacing: 0.02em; }
.muted { color: var(--muted); }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
input, select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: #071426; color: var(--text);
}
.btn {
  border: 0; border-radius: 12px; padding: 12px 16px; font-weight: 650;
  background: var(--accent); color: #06221f;
}
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: var(--danger); color: #2b0b09; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1; }
.error { color: var(--danger); min-height: 1.2em; margin: 8px 0; }

.app-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100dvh; }
.side {
  padding: 20px 14px 96px;
  background: rgba(7, 20, 38, 0.88);
  border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100dvh; overflow: auto;
}
.nav-btn {
  width: 100%; text-align: left; background: transparent; color: var(--text);
  border: 0; padding: 10px 12px; border-radius: 12px; margin: 4px 0;
}
.nav-btn.active { background: rgba(46, 196, 182, 0.18); color: #ffffff; }
.main { padding: 20px 20px 110px; }
.topbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.card { padding: 16px; }
button.card { width: 100%; text-align: left; color: inherit; cursor: pointer; }
button.card:hover { border-color: #2ec4b6; }
.card .k { color: var(--muted); font-size: 13px; }
.card .v { font-size: 26px; font-weight: 750; margin-top: 6px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 12px; background: #234; }
.badge.pending { background: rgba(233, 196, 106, 0.2); color: var(--warn); }
.badge.confirmed { background: rgba(42, 157, 143, 0.2); color: #8eebdc; }
.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.point { padding: 14px; }
.bottom {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0;
  background: #0c2429; border-top: 1px solid var(--line);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
}
.bottom { overflow-x: auto; }
.bottom button { flex: 1 0 auto; background: transparent; color: var(--muted); border: 0; padding: 8px 10px; font-size: 12px; white-space: nowrap; }
.bottom button.active { color: #99f6e4; }
.perms { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; }
.toast {
  position: fixed; top: 16px; right: 16px; background: #123; padding: 10px 14px;
  border-radius: 12px; border: 1px solid var(--line); z-index: 20;
}
.qr svg { width: 180px; height: 180px; background: #fff; border-radius: 12px; }
.hidden { display: none !important; }

.hero {
  padding: 22px;
  margin-bottom: 16px;
  background:
    radial-gradient(420px 160px at 100% 0%, rgba(45, 212, 191, 0.22), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}
.hero .say { font-size: 15px; color: var(--muted); }
.hero .big { font-size: clamp(32px, 7vw, 48px); font-weight: 800; letter-spacing: -0.03em; margin: 8px 0 4px; }
.hero .why { font-size: 14px; max-width: 46ch; }
.money-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.money-row .card .v { font-size: 22px; }
.help {
  background: rgba(233, 196, 106, 0.1);
  border: 1px solid rgba(233, 196, 106, 0.28);
  border-radius: 16px;
  padding: 14px 16px;
  margin: 12px 0 16px;
}
.help ol { margin: 8px 0 0 18px; padding: 0; color: var(--muted); }
.help li { margin: 6px 0; }
.task {
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  padding: 14px; margin-bottom: 10px;
}
.task .sum { font-size: 22px; font-weight: 750; white-space: nowrap; }
.task-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.tile {
  text-align: left; padding: 16px; border-radius: 16px;
  border: 1px solid var(--line); background: rgba(12, 36, 41, 0.7); color: var(--text);
}
.tile b { display: block; margin-bottom: 6px; }
.tile span { color: var(--muted); font-size: 13px; }
.bar { height: 12px; background: #0c2429; border-radius: 99px; overflow: hidden; margin-top: 10px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, #14b8a6, #99f6e4); }
.staff-chip { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.payer-row { display: grid; grid-template-columns: 1fr 140px auto; gap: 8px; align-items: end; margin-bottom: 8px; }
.check { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 14px; }
.check input { width: auto; }
.demo-banner {
  margin: 0 0 14px; padding: 10px 14px; border-radius: 12px;
  background: rgba(233, 196, 106, 0.16); border: 1px solid rgba(233, 196, 106, 0.4); color: #f6e7b2;
}
.splash {
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(900px 480px at 50% 28%, #1c5c5a 0%, #0b1f24 58%);
  transition: opacity .45s ease, visibility .45s ease;
}
.splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-mark {
  width: 88px; height: 88px; border-radius: 26px;
  background: linear-gradient(135deg, #2dd4bf, #0f766e);
  display: grid; place-items: center; font-weight: 800; font-size: 30px; color: #042f2e;
}
.splash-title { font-size: 28px; font-weight: 750; letter-spacing: 0.22em; }
.splash-bar { width: 148px; height: 3px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; opacity: 0; }
.splash.wait .splash-bar { opacity: 1; }
.splash-bar i { display: block; height: 100%; width: 42%; background: #99f6e4; animation: dewash-slide 1.05s ease-in-out infinite; }
.topwho { display: flex; justify-content: flex-end; margin-bottom: 12px; position: relative; }
.who-btn { display: flex; gap: 10px; align-items: center; max-width: min(100%, 280px); background: rgba(12, 36, 41, .72); color: inherit; border: 1px solid var(--line); border-radius: 16px; padding: 6px 12px 6px 6px; }
.who-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; text-align: left; line-height: 1.25; }
.who-text b, .who-text small { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-text b { font-size: 14px; }
.who-text small { color: var(--muted); font-size: 12px; }
.avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #2dd4bf, #0f766e); color: #042f2e; font-weight: 800; flex: none; }
.who-menu { position: absolute; right: 0; top: 54px; min-width: 210px; padding: 6px; z-index: 15; background: #123038; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.who-menu button { width: 100%; text-align: left; background: transparent; color: inherit; border: 0; border-radius: 10px; padding: 10px 12px; }
.who-menu button:hover { background: rgba(20, 184, 166, .16); }
.who-line { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
@keyframes dewash-slide { from { transform: translateX(-130%); } to { transform: translateX(320%); } }

.lang-switch { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 10px 0 2px; }
.who-menu .lang-switch { justify-content: flex-start; padding: 4px 8px 8px; }
.lang-btn {
  border: 1px solid var(--line); background: transparent; color: var(--text);
  border-radius: 999px; padding: 6px 10px; font-size: 12px;
}
.lang-btn.active { background: rgba(46, 196, 182, 0.22); }
.palette-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.palette-sample { border-radius: 20px; padding: 16px; border: 1px solid rgba(255,255,255,.14); }
.palette-no { font-size: 28px; font-weight: 800; letter-spacing: 0.04em; }
.nav-btn, .btn, th, td, label, .tile span, .toast { overflow-wrap: anywhere; }
.toast { max-width: min(440px, calc(100vw - 24px)); }
.bottom button { white-space: normal; line-height: 1.15; font-size: 11px; max-width: 7.5rem; text-align: center; }

@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .bottom { display: flex; }
  .main { padding: 16px 12px 120px; }
  .card .v { font-size: 22px; }
  .money-row { grid-template-columns: 1fr; }
  .task { flex-direction: column; align-items: flex-start; }
  .payer-row { grid-template-columns: 1fr; }
  .who-text b, .who-text small { white-space: normal; }
  .topbar, .topbar > div { min-width: 0; }
}
