/* Angel — "Shitjet e mia". Brand tokens lifted from the dashboard's globals.css
   so the app reads as part of the same system. Phone-first: everything is sized
   for a thumb, and every input is 16px so iOS Safari never auto-zooms on focus. */

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600&family=Cormorant:wght@400;500;600&display=swap");

:root {
  --cream: #faf3ea;
  --cream-soft: #fdf8f1;
  --blush: #f5e2cf;
  --ink: #1a1410;
  --ink-soft: #3a2c22;
  --muted: #6d5b47;
  --accent: #c69373;
  --accent-deep: #a3725a;
  --positive: #5f8a6b;
  --negative: #b5654c;
  --line: rgba(26, 20, 16, 0.09);
  --line-strong: rgba(26, 20, 16, 0.16);
  --radius: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: 20px;
}

* { box-sizing: border-box; border-color: var(--line); }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--cream);
  background-image:
    radial-gradient(1200px 600px at 88% -8%, rgba(198, 147, 115, 0.10), transparent 60%),
    radial-gradient(900px 500px at -6% 8%, rgba(236, 201, 168, 0.14), transparent 55%);
  color: var(--ink);
  font-family: "Outfit", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}

.tnum { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.serif { font-family: "Cormorant", Georgia, serif; }

/* ── shell ───────────────────────────────────────────────────────────── */

.wrap { max-width: 560px; margin: 0 auto; padding: 0 var(--pad) 140px; }

header.top {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 0 18px;
}
header.top img { width: 34px; height: 34px; object-fit: contain; }
header.top .who { flex: 1; min-width: 0; }
header.top .name {
  font-family: "Cormorant", Georgia, serif;
  font-size: 25px; font-weight: 600; line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
header.top .date { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ── cards ───────────────────────────────────────────────────────────── */

.card {
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset,
              0 8px 24px -16px rgba(26, 20, 16, 0.18);
}

.section-label {
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin: 26px 0 10px;
}

/* ── buttons ─────────────────────────────────────────────────────────── */

.btn {
  font-family: inherit; font-size: 16px; font-weight: 500;
  border-radius: 14px; border: 1px solid var(--line-strong);
  background: var(--cream-soft); color: var(--ink);
  padding: 14px 18px; cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
              border-color 0.18s var(--ease), color 0.18s var(--ease);
  will-change: transform;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; pointer-events: none; }

.btn-primary {
  background: var(--ink); color: var(--cream); border-color: var(--ink);
  width: 100%; padding: 17px; font-size: 17px; font-weight: 500;
}
.btn-big { width: 100%; padding: 20px; font-size: 17px; }
.btn-ghost { background: transparent; border-color: var(--line-strong); }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

/* ── inputs ──────────────────────────────────────────────────────────── */

label.field, .field { display: block; margin: 22px 0 0; }
label.field .lab, .field .lab {
  display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px;
}

/* the date spelled out, because the native picker uses the phone's order */
.datehint {
  margin-top: 8px; font-size: 14px; color: var(--ink-soft);
  padding-left: 2px;
}
input[type="text"], input[type="date"], textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px;                 /* < 16px triggers iOS zoom-on-focus */
  color: var(--ink);
  background: var(--cream-soft);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 15px 16px;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-deep);
  background: #fff;
}
:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 2px; }

/* ── service picker: big tap targets, price always visible ───────────── */

.svc-grid { display: grid; gap: 10px; margin-top: 8px; }
.svc {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  text-align: left; padding: 17px 18px; font-size: 16px;
  border-radius: 14px; border: 1px solid var(--line-strong);
  background: var(--cream-soft); color: var(--ink);
  font-family: inherit; cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
              border-color 0.18s var(--ease);
}
.svc:active { transform: scale(0.98); }
.svc[aria-pressed="true"] {
  border-color: var(--ink); background: var(--blush);
}
.svc .price { font-size: 14px; color: var(--muted); white-space: nowrap; }
.svc[aria-pressed="true"] .price { color: var(--ink-soft); }

/* ── sale rows ───────────────────────────────────────────────────────── */

.sale {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 16px; border-bottom: 1px solid var(--line);
  transition: background 0.15s var(--ease);
}
.sale:last-child { border-bottom: 0; }
.sale:hover { background: rgba(26, 20, 16, 0.035); }
.sale .body { flex: 1; min-width: 0; }
.sale .client {
  font-size: 16px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sale .meta { font-size: 13px; color: var(--muted); margin-top: 3px; }
.sale .x {
  border: 0; background: transparent; color: var(--muted);
  font-size: 22px; line-height: 1; padding: 8px 10px; cursor: pointer;
  border-radius: 10px;
}
.sale .x:active { transform: scale(0.9); }
.sale.blocked { background: rgba(181, 101, 76, 0.07); }
.sale .why { font-size: 12px; color: var(--negative); margin-top: 4px; }

.empty { padding: 34px 20px; text-align: center; color: var(--muted); font-size: 15px; }

/* ── sticky send bar ─────────────────────────────────────────────────── */

.sendbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 12px var(--pad) calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--cream) 62%, rgba(250, 243, 234, 0));
}
.sendbar .inner { max-width: 560px; margin: 0 auto; }
.sendbar[hidden] { display: none; }

/* ── earnings ────────────────────────────────────────────────────────── */

.kpi { padding: 22px; text-align: center; }
.kpi .big {
  font-family: "Cormorant", Georgia, serif;
  font-size: 46px; font-weight: 600; line-height: 1;
}
.kpi .sub { font-size: 13px; color: var(--muted); margin-top: 8px; }
.mrow {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 15px;
}
.mrow:last-child { border-bottom: 0; }
.mrow .m { color: var(--muted); }

/* ── tabs ────────────────────────────────────────────────────────────── */

.tabs { display: flex; gap: 8px; margin: 4px 0 8px; }
.tabs button {
  flex: 1; font-family: inherit; font-size: 14px; padding: 11px;
  border-radius: 12px; border: 1px solid transparent; background: transparent;
  color: var(--muted); cursor: pointer; transition: all 0.18s var(--ease);
}
.tabs button[aria-selected="true"] {
  background: var(--cream-soft); border-color: var(--line); color: var(--ink);
}

/* ── toast / notices ─────────────────────────────────────────────────── */

.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  z-index: 60; max-width: 90vw;
  background: var(--ink); color: var(--cream);
  padding: 13px 20px; border-radius: 999px; font-size: 15px;
  animation: toastInOut 3.2s var(--ease) both;
}
.toast.bad { background: var(--negative); }
@keyframes toastInOut {
  0% { opacity: 0; transform: translateX(-50%) translateY(8px); }
  9% { opacity: 1; transform: translateX(-50%) translateY(0); }
  88% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(8px); }
}

.notice {
  padding: 16px 18px; border-radius: 14px; font-size: 14px; line-height: 1.5;
  background: rgba(198, 147, 115, 0.14); border: 1px solid rgba(163, 114, 90, 0.3);
  margin-bottom: 14px;
}
.notice.warn {
  background: rgba(181, 101, 76, 0.1); border-color: rgba(181, 101, 76, 0.35);
}
.notice strong { font-weight: 600; }

.foot { font-size: 12px; color: var(--muted); text-align: center; margin-top: 22px; line-height: 1.6; }

/* ── blocking screen for unsent drafts from a previous day ───────────── */

.blocker {
  position: fixed; inset: 0; z-index: 80;
  background: var(--cream); display: flex; align-items: center; justify-content: center;
  padding: var(--pad);
}
.blocker .box { max-width: 420px; text-align: center; }
.blocker h2 { font-family: "Cormorant", Georgia, serif; font-size: 30px; margin: 0 0 12px; }
.blocker p { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0 0 22px; }

.spinner {
  width: 26px; height: 26px; margin: 0 auto;
  border: 3px solid var(--line-strong); border-top-color: var(--accent-deep);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
