/* DUIT! — Design system */
:root {
  --lime: #D4FF3F;
  --lime-dark: #B8E625;
  --ink: #0E0E10;
  --ink-2: #1A1A1D;
  --paper: #FAF8F3;
  --card: #FFFFFF;
  --muted: #6B6B70;
  --line: #E8E6DE;
  --success: #16A34A;
  --danger: #EF4444;
  --warn: #F59E0B;

  /* backward-compat aliases for app components */
  --dark: var(--ink);
  --bg: var(--paper);
  --border: rgba(14,14,16,0.08);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #1a1a1d;
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--ink);
  overflow-x: hidden;
}

.display {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* Scrollbar hide inside phone frame */
.phone-scroll::-webkit-scrollbar { display: none; }
.phone-scroll { scrollbar-width: none; -ms-overflow-style: none; }

/* ── Animations ── */
@keyframes bounceIn {
  0% { transform: scale(0.9); opacity: 0; }
  60% { transform: scale(1.02); opacity: 1; }
  100% { transform: scale(1); }
}
.bounce-in { animation: bounceIn 0.28s cubic-bezier(0.2, 1.2, 0.4, 1); }

@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.slide-up { animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

@keyframes slideInRight {
  from { transform: translateX(30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.slide-in-right { animation: slideInRight 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

@keyframes pulseRing {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}
.pulse-ring { animation: pulseRing 1.6s ease-out infinite; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.fade-in { animation: fadeIn 0.25s ease forwards; }

@keyframes spin360 {
  to { transform: rotate(360deg); }
}
.spin { animation: spin360 1s linear infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.pulse { animation: pulse 1.5s ease infinite; }

/* Press effect */
.press { transition: transform 0.12s ease, background 0.15s ease; cursor: pointer; }
.press:active { transform: scale(0.97); }

/* Shine underline (hand-drawn lime accent) */
.underline-accent {
  position: relative;
  display: inline-block;
}
.underline-accent::after {
  content: '';
  position: absolute;
  left: -2%; right: -2%; bottom: -2px;
  height: 10px;
  background: var(--lime);
  z-index: -1;
  transform: skewX(-8deg);
  border-radius: 2px;
}

/* Dotted map pattern */
.dot-map {
  background-image:
    radial-gradient(circle at 20% 30%, rgba(212,255,63,0.15) 0 2px, transparent 2px),
    radial-gradient(circle at 70% 60%, rgba(212,255,63,0.1) 0 2px, transparent 2px),
    radial-gradient(circle at 45% 80%, rgba(0,0,0,0.06) 0 1.5px, transparent 1.5px),
    radial-gradient(circle at 85% 25%, rgba(0,0,0,0.06) 0 1.5px, transparent 1.5px);
  background-size: 60px 60px, 80px 80px, 40px 40px, 50px 50px;
  background-color: #F4F1E8;
}

/* Striped placeholder */
.stripe-ph {
  background-image: repeating-linear-gradient(
    135deg,
    #EAE6D8, #EAE6D8 8px,
    #F4F1E8 8px, #F4F1E8 16px
  );
}

/* Map placeholder (used in app screens) */
.map-placeholder {
  background: linear-gradient(135deg, #e8f4e8 0%, #d4ecd4 50%, #c8e4d8 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.map-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000000' fill-opacity='0.03'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.focus-ring:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 2px;
}

input, textarea {
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
button {
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
}

h1, h2, h3, h4, p { margin: 0; }

/* ── App component helpers ── */
.card {
  background: var(--card);
  border-radius: 20px;
  border: 1px solid var(--border);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  border-radius: 999px;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--lime);
  color: var(--dark);
  padding: 14px 24px;
  font-size: 15px;
  width: 100%;
}
.btn-primary:hover { filter: brightness(1.05); }

.btn-secondary {
  background: rgba(14,14,16,0.06);
  color: var(--dark);
  padding: 12px 20px;
  font-size: 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.chip-errand   { background: rgba(212,255,63,0.15); color: #4a6900; }
.chip-delivery { background: rgba(0,217,163,0.15);  color: #006b52; }
.chip-help     { background: rgba(123,92,255,0.15); color: #4c35b0; }
.chip-other    { background: rgba(255,107,53,0.15); color: #8b3000; }
.chip-urgent   { background: #FF4D4D; color: #fff; }

.input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--dark);
  background: rgba(14,14,16,0.04);
  border: 1.5px solid rgba(14,14,16,0.1);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.15s;
}
.input:focus { border-color: var(--lime); background: #fff; }
.input::placeholder { color: rgba(14,14,16,0.35); }
textarea.input { resize: none; line-height: 1.5; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.status-posted    { background: rgba(14,14,16,0.06); color: var(--dark); }
.status-accepted  { background: rgba(212,255,63,0.2); color: #4a6900; }
.status-progress  { background: rgba(0,150,255,0.12); color: #004fa3; }
.status-completed { background: rgba(0,200,100,0.15); color: #006632; }
.status-paid      { background: rgba(212,255,63,0.3); color: #4a6900; }

.divider { height: 1px; background: var(--border); width: 100%; }

.star { font-size: 28px; cursor: pointer; color: rgba(14,14,16,0.15); transition: color 0.1s; }
.star.filled { color: #FFB800; }

.progress-bar { height: 4px; background: rgba(14,14,16,0.1); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--lime); border-radius: 999px; transition: width 0.4s ease; }

.avatar {
  border-radius: 50%;
  background: rgba(212,255,63,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-display);
  flex-shrink: 0;
}

.bottom-nav {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(250,248,243,0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(14,14,16,0.08);
  padding: 8px 0 24px;
  z-index: 100;
}
