/* Rarplo app: one responsive codebase. Phone = one column + bottom navigation; computer = side menu. */
:root {
  --accent: #E8553A; --accent-ink: #9A3412; --accent-soft: #FFF0EB;
  --bg: #FAF7F4; --card: #FFFFFF; --ink: #1D1B1A; --muted: #6B6460; --line: #EFE9E4; --line-2: #E7E1DC;
  --ok: #166534; --ok-soft: #E8F5EC; --info: #3730A3; --info-soft: #EEF2FF; --bad: #B42318; --bad-soft: #FFF4F2;
  --dark-btn: #1D1B1A; --dark-btn-ink: #fff;
  --radius: 16px; --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #F06A4F; --accent-ink: #FFB49F; --accent-soft: #3A2019;
    --bg: #141211; --card: #1F1C1A; --ink: #F3EEEA; --muted: #A89F99; --line: #2C2826; --line-2: #3A3532;
    --ok: #7DDC9C; --ok-soft: #16301F; --info: #B9C2FF; --info-soft: #1E2140; --bad: #FF9B8E; --bad-soft: #3A1A17;
    --dark-btn: #F3EEEA; --dark-btn-ink: #1D1B1A;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: Heebo, system-ui, sans-serif; -webkit-text-size-adjust: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent-ink); }
.splash { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.logo-mark { width: 40px; height: 40px; border-radius: 11px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-family: Georgia, serif; font-style: italic; font-weight: 700; font-size: 24px; flex: none; }
.wordmark { font-family: Nunito, sans-serif; font-weight: 800; font-size: 22px; direction: ltr; }

/* Layout */
.shell { display: flex; min-height: 100vh; }
.side { display: none; }
.main { flex: 1; min-width: 0; padding: 16px 16px calc(96px + var(--safe-b)); max-width: 760px; margin: 0 auto; width: 100%; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; }
.bottom-nav { position: fixed; bottom: 0; right: 0; left: 0; background: var(--card); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); padding-bottom: var(--safe-b); z-index: 20; }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 64px; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 700; }
.bottom-nav a.on { color: var(--accent); }
.fab { position: fixed; left: 20px; bottom: calc(84px + var(--safe-b)); width: 60px; height: 60px; border-radius: 20px; background: var(--accent); color: #fff; border: 0; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(194,65,12,.3); z-index: 21; text-decoration: none; }
@media (min-width: 900px) {
  .side { display: flex; flex-direction: column; gap: 24px; width: 260px; flex: none; background: var(--card); border-left: 1px solid var(--line); padding: 24px 16px; position: sticky; top: 0; height: 100vh; }
  .side nav a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 500; }
  .side nav a.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
  .main { padding: 32px 40px 48px; max-width: 1100px; }
  .bottom-nav, .fab, .topbar .brand { display: none; }
  .topbar .client-pill { display: none; }
}

/* Pieces */
h1 { margin: 4px 0 2px; font-size: 26px; font-weight: 800; }
h2 { margin: 22px 0 10px; font-size: 17px; font-weight: 800; }
.sub { margin: 0; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.stat { padding: 12px; } .stat b { display: block; font-size: 24px; font-weight: 800; } .stat span { font-size: 13px; color: var(--muted); }
.list { display: flex; flex-direction: column; gap: 10px; }
.post { display: flex; gap: 12px; align-items: center; padding: 10px; text-decoration: none; color: var(--ink); }
.thumb { width: 54px; height: 72px; border-radius: 10px; background: #1D1B1A; flex: none; display: flex; align-items: center; justify-content: center; }
.post .t { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post .w { font-size: 13px; color: var(--muted); margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.chip.ok { background: var(--ok-soft); color: var(--ok); } .chip.info { background: var(--info-soft); color: var(--info); } .chip.bad { background: var(--bad-soft); color: var(--bad); }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); border: 1.5px dashed var(--line-2); border-radius: var(--radius); }
.btn { min-height: 48px; padding: 0 20px; border-radius: 14px; border: 0; background: var(--accent); color: #fff; font-weight: 800; font-size: 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.block { width: 100%; min-height: 54px; font-size: 17px; }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line-2); font-weight: 700; }
.btn.danger { background: var(--bad-soft); color: var(--bad); border: 1px solid transparent; font-weight: 700; }
.btn.dark { background: var(--dark-btn); color: var(--dark-btn-ink); font-weight: 700; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); text-decoration: none; }
.client-pill { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); font-weight: 700; font-size: 14px; cursor: pointer; }
label.f { display: block; font-weight: 800; font-size: 15px; margin: 18px 0 8px; }
textarea, input[type=text], input[type=datetime-local], select { width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid var(--line-2); padding: 12px; background: var(--card); font-size: 16px; }
textarea { min-height: 96px; resize: vertical; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.seg button, .pill { min-height: 48px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--card); font-weight: 700; cursor: pointer; }
.seg button.on { background: var(--dark-btn); color: var(--dark-btn-ink); border-color: var(--dark-btn); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 44px; padding: 0 16px; border-radius: 999px; color: var(--muted); }
.pill.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.pill:disabled { opacity: .45; text-decoration: line-through; cursor: not-allowed; }
.hint { font-size: 13px; color: var(--muted); margin-top: 8px; }
.err { color: var(--bad); font-weight: 700; margin-top: 10px; }
.picker { display: flex; gap: 12px; align-items: stretch; }
.picker .preview { width: 120px; aspect-ratio: 9 / 16; border-radius: 14px; background: #1D1B1A; overflow: hidden; flex: none; display: flex; align-items: center; justify-content: center; }
.picker .preview video, .picker .preview img { width: 100%; height: 100%; object-fit: cover; }
.picker .choose { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.picker .choose label { min-height: 52px; border-radius: 12px; border: 1.5px dashed var(--line-2); background: var(--card); display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; cursor: pointer; }
.picker input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.sticky-cta { position: sticky; bottom: calc(76px + var(--safe-b)); padding: 12px 0; background: linear-gradient(transparent, var(--bg) 30%); }
@media (min-width: 900px) { .sticky-cta { bottom: 0; } }
.progress { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; } .progress > div { height: 100%; background: var(--accent); width: 0; transition: width .2s; }
.center { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; }
.done-mark { width: 88px; height: 88px; border-radius: 50%; background: var(--ok-soft); display: flex; align-items: center; justify-content: center; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.days button { min-height: 64px; border-radius: 14px; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; }
.days button.on { background: var(--dark-btn); color: var(--dark-btn-ink); }
.days .dot { width: 6px; height: 6px; border-radius: 50%; } .days .dot.has { background: var(--accent); }
.row { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 14px; border-top: 1px solid var(--line); gap: 8px; } .row:first-child { border-top: 0; }
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--card); width: 100%; max-width: 520px; border-radius: 22px 22px 0 0; padding: 10px 16px calc(24px + var(--safe-b)); }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 0 auto 14px; }
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; }
.gbtn { min-height: 52px; padding: 0 22px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--card); font-weight: 700; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.toast { position: fixed; bottom: calc(150px + var(--safe-b)); right: 50%; transform: translateX(50%); background: var(--dark-btn); color: var(--dark-btn-ink); padding: 12px 18px; border-radius: 12px; font-weight: 700; z-index: 60; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
