/* ============================================================
   CURSE AGREGATE - stiluri (mobil-first, butoane mari pentru tableta)
   ============================================================ */
:root{
  --bg:#0f172a; --card:#1e293b; --card2:#273449;
  --accent:#f59e0b; --accent-d:#d97706;
  --ok:#22c55e; --err:#ef4444; --muted:#94a3b8;
  --text:#f1f5f9; --line:#334155;
  --radius:16px;
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent}
html,body{margin:0; padding:0}
body{
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  background:var(--bg); color:var(--text);
  font-size:18px; line-height:1.4; overscroll-behavior-y:contain;
}
.hidden{display:none !important}
button{font-family:inherit; cursor:pointer}

/* ---------- Bara sus ---------- */
.topbar{
  position:sticky; top:0; z-index:20;
  display:flex; align-items:center; gap:10px;
  padding:12px 16px; background:var(--card); border-bottom:1px solid var(--line);
}
.topbar .title{font-weight:700; font-size:18px}
.topbar .spacer{flex:1}
.badge{
  background:var(--accent); color:#000; font-weight:700;
  border-radius:999px; padding:4px 12px; font-size:14px;
}
.badge.sync-on{background:var(--ok); color:#052e16}
.badge.sync-off{background:var(--err); color:#fff}
.iconbtn{
  background:var(--card2); color:var(--text); border:none;
  border-radius:12px; padding:10px 14px; font-size:16px;
}

.wrap{max-width:560px; margin:0 auto; padding:16px}

/* ---------- Ecran login ---------- */
.login-box{max-width:400px; margin:8vh auto; padding:24px}
.login-box h1{font-size:22px; margin:0 0 4px}
.login-box p{color:var(--muted); margin:0 0 24px}
.field{margin-bottom:16px}
.field label{display:block; font-size:14px; color:var(--muted); margin-bottom:6px}
.input{
  width:100%; padding:16px; font-size:18px;
  background:var(--card); border:2px solid var(--line);
  border-radius:12px; color:var(--text);
}
.input:focus{outline:none; border-color:var(--accent)}

/* ---------- Butoane mari ---------- */
.btn{
  display:block; width:100%; padding:20px; font-size:20px; font-weight:700;
  border:none; border-radius:var(--radius); color:#000; background:var(--accent);
  margin-top:8px;
}
.btn:active{background:var(--accent-d)}
.btn.secondary{background:var(--card2); color:var(--text)}
.btn.ghost{background:transparent; color:var(--muted); border:2px solid var(--line)}
.btn.ok{background:var(--ok); color:#052e16}
.btn.big{padding:28px; font-size:24px}

/* ---------- Butonul principal Cursa noua ---------- */
.new-trip{
  background:linear-gradient(135deg,var(--accent),var(--accent-d));
  color:#000; font-size:28px; font-weight:800; padding:36px 20px;
  border-radius:24px; text-align:center; border:none; width:100%;
  box-shadow:0 8px 24px rgba(245,158,11,.35);
}
.new-trip .plus{font-size:44px; display:block; line-height:1}

/* ---------- Liste de optiuni (beneficiar, material etc.) ---------- */
.option{
  display:flex; align-items:center; gap:12px;
  width:100%; text-align:left; padding:20px; margin-bottom:10px;
  background:var(--card); border:2px solid var(--line);
  border-radius:14px; color:var(--text); font-size:19px; font-weight:600;
}
.option:active,.option.sel{border-color:var(--accent); background:var(--card2)}
.option .chev{margin-left:auto; color:var(--muted); font-size:22px}

/* ---------- Pasul (wizard) ---------- */
.step-head{margin:4px 0 16px}
.step-head .kicker{color:var(--accent); font-weight:700; font-size:14px; letter-spacing:.5px}
.step-head h2{margin:4px 0 0; font-size:24px}
.crumbs{display:flex; flex-wrap:wrap; gap:6px; margin-bottom:14px}
.crumb{background:var(--card2); color:var(--muted); font-size:13px; padding:5px 10px; border-radius:8px}
.crumb b{color:var(--text)}

.step-nav{display:flex; gap:10px; margin-top:16px}
.step-nav .btn{margin-top:0}

/* ---------- Selector cantitate: roti (wheel) ---------- */
.qty-display{
  text-align:center; font-size:56px; font-weight:800; letter-spacing:2px;
  padding:12px; color:var(--accent); font-variant-numeric:tabular-nums;
}
.qty-display .unit{font-size:24px; color:var(--muted); margin-left:8px}
.wheels{display:flex; justify-content:center; align-items:center; gap:4px; margin:8px 0}
.wheel{
  height:180px; width:56px; overflow:hidden; position:relative;
  background:var(--card); border-radius:12px; border:1px solid var(--line);
  scroll-snap-type:y mandatory; overflow-y:scroll; text-align:center;
  scrollbar-width:none;
}
.wheel::-webkit-scrollbar{display:none}
.wheel .sp{height:60px}                 /* spatiu sus/jos ca sa centreze */
.wheel .d{height:60px; line-height:60px; font-size:34px; font-weight:700; scroll-snap-align:center; color:var(--muted)}
.wheel .d.on{color:var(--text)}
.wheel-sep{font-size:40px; font-weight:800; color:var(--accent); padding:0 2px}
.wheel-mask{
  position:absolute; left:0; right:0; top:60px; height:60px;
  border-top:2px solid var(--accent); border-bottom:2px solid var(--accent);
  pointer-events:none;
}
.wheels-frame{position:relative}

/* ---------- Tastatura numerica ---------- */
.keypad{display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:8px}
.key{
  padding:22px; font-size:28px; font-weight:700; border-radius:14px;
  background:var(--card2); color:var(--text); border:2px solid var(--line);
}
.key:active{background:var(--accent); color:#000}
.key.wide{grid-column:span 1}
.key.del{background:var(--card); color:var(--err)}

.toggle-row{display:flex; gap:8px; margin-bottom:14px}
.toggle-row .btn{margin-top:0; padding:12px; font-size:15px}
.toggle-row .btn.secondary{opacity:.6}
.toggle-row .btn.secondary.active{opacity:1; background:var(--accent); color:#000}

/* ---------- Poze ---------- */
.photo-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:12px 0}
.photo-grid .ph{position:relative; aspect-ratio:1; border-radius:10px; overflow:hidden; background:var(--card)}
.photo-grid .ph img{width:100%; height:100%; object-fit:cover}
.photo-grid .ph .x{
  position:absolute; top:4px; right:4px; width:26px; height:26px;
  background:rgba(0,0,0,.7); color:#fff; border:none; border-radius:50%;
  font-size:16px; line-height:26px; text-align:center;
}
.photo-add{
  border:2px dashed var(--line); border-radius:10px; aspect-ratio:1;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  color:var(--muted); font-size:13px; background:var(--card);
}
.photo-add .big{font-size:32px}

/* ---------- Rezumat ---------- */
.summary{background:var(--card); border-radius:14px; overflow:hidden; margin-bottom:8px}
.summary .row{display:flex; justify-content:space-between; gap:12px; padding:14px 16px; border-bottom:1px solid var(--line)}
.summary .row:last-child{border-bottom:none}
.summary .row .k{color:var(--muted); font-size:15px}
.summary .row .v{font-weight:700; text-align:right}

/* ---------- Toast + status ---------- */
.toast{
  position:fixed; left:50%; bottom:24px; transform:translateX(-50%);
  background:var(--card2); color:var(--text); padding:14px 20px;
  border-radius:12px; box-shadow:0 8px 24px rgba(0,0,0,.4);
  z-index:100; font-weight:600; border:1px solid var(--line); max-width:90%;
}
.toast.ok{border-color:var(--ok)} .toast.err{border-color:var(--err)}

.recent h3{font-size:15px; color:var(--muted); margin:24px 0 8px}
.recent .item{
  display:flex; justify-content:space-between; gap:10px; padding:14px;
  background:var(--card); border-radius:12px; margin-bottom:8px; font-size:15px;
}
.recent .item .st{font-size:13px; font-weight:700}
.recent .item .st.pending{color:var(--accent)}
.recent .item .st.sent{color:var(--ok)}

.center{text-align:center}
.muted{color:var(--muted)}
.err-text{color:var(--err); font-size:15px; min-height:20px; margin-top:8px}
