/* DESi-FieldSync — night highway: midnight base, saffron→pink, cyan for done. */
:root {
  --page: #060A18;
  --panel: rgba(255, 255, 255, 0.045);
  --panel2: rgba(255, 255, 255, 0.075);
  --line: rgba(150, 165, 255, 0.16);
  --ink: #E9EDFF;
  --muted: #8E98BE;
  --saffron: #FF9F1C;
  --pink: #FF3D81;
  --cyan: #2DE2E6;
  --violet: #8B7CFF;
  --grad: linear-gradient(100deg, #FF9F1C 0%, #FF3D81 100%);
  --warn: #FFC53D;
  --bad: #FF5A5F;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body { font-family: 'Manrope', system-ui, sans-serif; color: var(--ink); font-size: 15px; min-height: 100vh;
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(124, 108, 255, 0.22), transparent 60%),
    radial-gradient(700px 400px at -10% 10%, rgba(45, 226, 230, 0.10), transparent 60%),
    var(--page); }
input, select, textarea, button { font-family: inherit; font-size: 15px; color: var(--ink); }
input, select, textarea { width: 100%; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
  border-radius: 12px; padding: 13px 14px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: rgba(45, 226, 230, 0.55); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
select option { background: #0E1430; color: var(--ink); }
label { font-size: .8rem; font-weight: 700; color: var(--muted); display: block; margin: 14px 0 6px; letter-spacing: .04em; text-transform: uppercase; }

.screen { min-height: 100vh; }
.center { display: grid; place-items: center; padding: 20px; }

/* login */
.login-card { width: min(380px, 94vw); background: var(--panel); border: 1px solid var(--line); border-radius: 24px;
  padding: 34px 26px 28px; text-align: center; backdrop-filter: blur(12px); display: flex; flex-direction: column; gap: 12px; }
.mark { width: 58px; height: 58px; border-radius: 17px; background: var(--grad); display: grid; place-items: center; margin: 0 auto;
  font-family: 'Unbounded', sans-serif; font-weight: 800; font-size: 1.2rem; color: #0A0F26; box-shadow: 0 0 28px rgba(255, 61, 129, 0.55); }
.mark.sm { width: 40px; height: 40px; border-radius: 12px; font-size: .85rem; margin: 0; flex: none; }
.brand { font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: 1.5rem; margin: 6px 0 0; color: #fff; letter-spacing: -.5px; }
.brand span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { color: var(--muted); font-size: .9rem; margin: 0 0 8px; }
.btn-grad { background: var(--grad); color: #0A0F26; font-weight: 800; border: none; border-radius: 12px; padding: 14px;
  box-shadow: 0 8px 30px -8px rgba(255, 61, 129, 0.65); cursor: pointer; }
.btn-grad:disabled { opacity: .5; }
.ghost { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); border-radius: 10px; padding: 8px 13px;
  font-weight: 600; font-size: .82rem; cursor: pointer; }
.note { background: rgba(255, 90, 95, 0.12); border: 1px solid rgba(255, 90, 95, 0.4); color: #FFB4B6;
  border-radius: 10px; padding: 10px 12px; font-size: .85rem; text-align: left; }
.note.ok { background: rgba(45, 226, 230, 0.10); border-color: rgba(45, 226, 230, 0.4); color: #9FF2F4; }
.note.warn { background: rgba(255, 197, 61, 0.10); border-color: rgba(255, 197, 61, 0.4); color: #FFE2A0; }

.spin { width: 40px; height: 40px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.12); border-top-color: var(--pink);
  animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* app shell */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  padding-top: calc(14px + env(safe-area-inset-top)); background: rgba(6, 10, 24, 0.85); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); }
.top .t1 { font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: .95rem; color: #fff; }
.top .t2 { color: var(--muted); font-size: .78rem; margin-top: 1px; }
.top .tt { flex: 1; min-width: 0; }

main { padding: 16px 16px calc(86px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; }

/* progress hero */
.hero-card { position: relative; overflow: hidden; border-radius: 20px; border: 1px solid var(--line); padding: 18px;
  background: linear-gradient(135deg, #10163A 0%, #0A0F26 55%, #160B2E 100%); margin-bottom: 14px; }
.hero-card::after { content: ""; position: absolute; right: -60px; top: -80px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 61, 129, 0.4) 0%, rgba(255, 159, 28, 0.2) 40%, transparent 70%); filter: blur(4px); }
.hero-card .big { font-family: 'Unbounded', sans-serif; font-weight: 800; font-size: 2rem; color: #fff; }
.hero-card .big span { color: var(--muted); font-size: 1.1rem; font-weight: 600; }
.hero-card .lbl { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); margin-top: 12px; overflow: hidden; position: relative; z-index: 1; }
.bar i { display: block; height: 100%; background: var(--grad); border-radius: 999px; box-shadow: 0 0 14px rgba(255, 61, 129, 0.6); }

/* store rows */
.store { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 13px 14px; margin-bottom: 9px; cursor: pointer; transition: border-color .15s; }
.store:active { border-color: rgba(45, 226, 230, 0.5); }
.store .nm { flex: 1; min-width: 0; font-weight: 700; font-size: .92rem; line-height: 1.3; }
.store .nm small { display: block; color: var(--muted); font-weight: 500; font-size: .76rem; margin-top: 2px; }
.pill { flex: none; font-size: .72rem; font-weight: 800; padding: 5px 11px; border-radius: 999px; letter-spacing: .02em; }
.pill.done { background: rgba(45, 226, 230, 0.14); color: var(--cyan); border: 1px solid rgba(45, 226, 230, 0.45); }
.pill.todo { background: rgba(255, 159, 28, 0.12); color: var(--saffron); border: 1px solid rgba(255, 159, 28, 0.45); }
.pill.closed { background: rgba(139, 124, 255, 0.14); color: var(--violet); border: 1px solid rgba(139, 124, 255, 0.45); }

.h2 { font-family: 'Unbounded', sans-serif; font-weight: 600; font-size: 1rem; color: #fff; margin: 20px 0 10px; }

/* sheet */
#sheet-wrap { position: fixed; inset: 0; z-index: 50; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow: auto; background: #0B1028;
  border: 1px solid var(--line); border-bottom: none; border-radius: 22px 22px 0 0; padding: 20px 18px calc(22px + env(safe-area-inset-bottom));
  max-width: 560px; margin: 0 auto; }
.sheet .snm { font-family: 'Unbounded', sans-serif; font-weight: 600; font-size: 1.02rem; color: #fff; padding-right: 36px; }
.sheet .x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05); color: var(--muted); font-size: 1rem; cursor: pointer; }
.row2 { display: flex; gap: 10px; align-items: center; }
.chk { display: flex; gap: 10px; align-items: center; background: rgba(139, 124, 255, 0.08); border: 1px solid rgba(139, 124, 255, 0.35);
  border-radius: 12px; padding: 12px 14px; margin-top: 14px; font-weight: 700; font-size: .9rem; cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--violet); }
.gps { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .8rem; margin-top: 12px; }
.gps .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.gps.ok .dot { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

/* history */
.hrow { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; }
.hrow .d1 { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; font-size: .88rem; }
.hrow .d1 .dt { color: var(--muted); font-weight: 600; font-size: .78rem; white-space: nowrap; }
.hrow .d2 { color: var(--muted); font-size: .8rem; margin-top: 3px; }

/* bottom nav */
.bottom { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 30;
  display: flex; gap: 4px; background: rgba(14, 20, 48, 0.92); border: 1px solid var(--line); border-radius: 999px; padding: 6px;
  backdrop-filter: blur(14px); box-shadow: 0 14px 40px -10px rgba(0, 0, 0, 0.6); }
.bottom button { display: flex; flex-direction: column; align-items: center; gap: 2px; border: none; background: transparent;
  color: var(--muted); font-weight: 700; font-size: .68rem; border-radius: 999px; padding: 8px 18px; cursor: pointer; }
.bottom button .ic { font-size: 1.05rem; }
.bottom button.on { background: linear-gradient(100deg, rgba(255, 159, 28, 0.18), rgba(255, 61, 129, 0.18));
  color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 61, 129, 0.45); }

#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 60;
  background: #11183A; border: 1px solid rgba(45, 226, 230, 0.5); color: var(--ink); padding: 12px 20px; border-radius: 999px;
  font-weight: 700; font-size: .86rem; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.6); white-space: nowrap; }
