:root {
  --bg: #f4f7f8; --card: #ffffff; --ink: #0f2328; --muted: #5f7479; --line: #e3eaec;
  --accent: #14a99d; --accent-ink: #fff; --accent-soft: #dff4f2; --deep: #0e5f63;
  --ok: #1f9d55; --ok-soft: #e1f4e8; --warn: #b7791f; --warn-soft: #fdf2dc; --bad: #c8434a; --bad-soft: #fbe5e6;
  --radius: 20px; --shadow: 0 1px 2px rgba(15,35,40,.06), 0 8px 24px rgba(15,35,40,.06);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b1518; --card: #13232a; --ink: #e8f2f3; --muted: #93a9ad; --line: #22363d;
    --accent-soft: #123a37; --ok-soft: #12331f; --warn-soft: #3a2c10; --bad-soft: #3b1a1d; --shadow: none; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 17px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); min-height: 100vh; }
#app { max-width: 560px; margin: 0 auto; padding: 16px 16px 120px; }
h1 { font-size: 28px; line-height: 1.15; margin: 8px 0 4px; letter-spacing: -.01em; }
h2 { font-size: 19px; margin: 26px 0 10px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
button { font: inherit; cursor: pointer; }

/* butoane mari, ușor de atins */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 58px;
  padding: 14px 18px; border-radius: 16px; border: 0; font-weight: 700; font-size: 18px;
  background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.btn.ok { background: var(--ok); color: #fff; box-shadow: none; }
.btn.big { min-height: 72px; font-size: 20px; border-radius: 20px; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; }
.btn + .btn { margin-top: 10px; }
.link { background: none; border: 0; color: var(--accent); font-weight: 600; padding: 8px 0; }

.top { display: flex; align-items: center; justify-content: space-between; }
.logo { width: 40px; height: 40px; border-radius: 12px; }

/* carduri */
.cards { display: grid; gap: 12px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px;
  display: flex; gap: 14px; align-items: center; border: 0; width: 100%; text-align: left; color: inherit; }
.card .thumb { width: 72px; height: 128px; border-radius: 12px; background: var(--accent-soft) center/cover no-repeat;
  flex-shrink: 0; display: grid; place-items: center; font-size: 28px; }
.card .body { flex: 1; min-width: 0; }
.card .title { font-weight: 700; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.badge { display: inline-block; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 99px;
  background: var(--line); }
.b-review { background: var(--warn-soft); color: var(--warn); }
.b-ready { background: var(--ok-soft); color: var(--ok); }
.b-proc { background: var(--accent-soft); color: var(--deep); }
.b-bad { background: var(--bad-soft); color: var(--bad); }
@media (prefers-color-scheme: dark) { .b-proc { color: var(--accent); } }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .6s; }

.empty { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.empty ol { padding-left: 22px; margin: 10px 0 0; } .empty li { margin-bottom: 8px; }

/* video */
.player { width: 100%; aspect-ratio: 9/16; max-height: 70vh; background: #000; border-radius: var(--radius); display: block;
  object-fit: contain; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; background: none;
  border: 0; padding: 8px 0; font-size: 17px; }
.panel { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-top: 14px; }
.chip { display: inline-block; background: var(--accent-soft); border-radius: 99px; padding: 6px 12px; margin: 0 6px 8px 0; font-size: 15px; }
.note { background: var(--warn-soft); border-radius: 14px; padding: 12px 14px; font-size: 15px; margin-top: 14px; }
.note ul { margin: 6px 0 0; padding-left: 20px; }
.status { text-align: center; padding: 18px 8px; }
.status .big { font-size: 44px; }
.actions { position: sticky; bottom: 0; padding: 14px 0 calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--bg) 30%); margin-top: 6px; }

/* login */
.login { min-height: 88vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.login .logo { width: 76px; height: 76px; border-radius: 22px; margin-bottom: 14px; }
.dots { display: flex; gap: 14px; margin: 22px 0 26px; }
.dots span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--muted); }
.dots span.on { background: var(--ink); border-color: var(--ink); }
.dots.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 84px); gap: 14px; }
.keypad button { height: 84px; border-radius: 50%; border: 0; background: var(--card); color: var(--ink); font-size: 30px;
  font-weight: 500; box-shadow: var(--shadow); }
.keypad button:active { background: var(--accent-soft); }
.keypad .ghost { background: none; box-shadow: none; font-size: 17px; color: var(--muted); }

/* bottom sheet */
#sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 10; }
#sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 11; background: var(--bg); border-radius: 24px 24px 0 0;
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom)); max-height: 88vh; overflow: auto; max-width: 560px; margin: 0 auto; }
#sheet::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
textarea { width: 100%; min-height: 120px; font: inherit; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--ink); resize: vertical; }
.check { display: flex; gap: 12px; align-items: flex-start; background: var(--card); padding: 14px; border-radius: 14px;
  box-shadow: inset 0 0 0 1.5px var(--line); margin: 14px 0; font-size: 16px; }
.check input { width: 26px; height: 26px; flex-shrink: 0; accent-color: var(--accent); margin: 0; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px; }
.quick button { border: 0; background: var(--accent-soft); color: var(--ink); padding: 9px 14px; border-radius: 99px; font-size: 15px; }
.file-row { background: var(--card); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; }

#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: #0c1f24; color: #fff; padding: 12px 18px; border-radius: 14px; opacity: 0; transition: opacity .2s;
  pointer-events: none; z-index: 20; max-width: 90vw; text-align: center; font-size: 15px; }
#toast.show { opacity: 1; }
