:root {
  --navy: #0B1220;
  --pink: #EC1E63;
  --blue: #1E9BEC;
  --green: #1BAA75;
  --bg: #F5F7FA;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-solid: #ffffff;
  --border: rgba(11, 18, 32, 0.08);
  --text: #0B1220;
  --text-muted: #6B7280;
  --shadow-sm: 0 2px 8px rgba(11, 18, 32, 0.06);
  --shadow-md: 0 8px 30px rgba(11, 18, 32, 0.08);
  --shadow-lg: 0 20px 60px rgba(11, 18, 32, 0.12);
  --radius: 18px;
}

* { box-sizing: border-box; }
[x-cloak] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, #FAFBFF 0%, #F1F4F9 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  min-height: 100vh;
}

a { color: var(--pink); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Top nav ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.navbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--navy); }
.brand img { height: 32px; display: block; }
.nav-links { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.nav-links a { color: var(--text); font-weight: 500; }
.nav-links a:hover { color: var(--pink); text-decoration: none; }

/* ---------- Glass panel ---------- */
.panel {
  background: var(--panel);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.panel-pad { padding: 28px; }

.card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: var(--pink); color: #fff; box-shadow: 0 6px 16px rgba(236,30,99,0.28); }
.btn-primary:hover { background: #d81759; text-decoration: none; }
.btn-secondary { background: rgba(11,18,32,0.06); color: var(--navy); }
.btn-secondary:hover { background: rgba(11,18,32,0.1); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-danger { background: rgba(236,30,99,0.08); color: var(--pink); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Forms ---------- */
label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(11,18,32,0.12);
  background: rgba(255,255,255,0.9);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
}
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(236,30,99,0.12);
}
.field { margin-bottom: 16px; }
.error-box {
  background: rgba(236,30,99,0.08);
  border: 1px solid rgba(236,30,99,0.25);
  color: #b3134d;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 16px;
}

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-box { width: 100%; max-width: 420px; }
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo img { height: 46px; }

/* ---------- Home / marketing ---------- */
.hero { text-align: center; padding: 90px 0 60px; }
.hero h1 { font-size: 44px; letter-spacing: -0.02em; margin-bottom: 14px; color: var(--navy); }
.hero p { font-size: 18px; color: var(--text-muted); max-width: 560px; margin: 0 auto 28px; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 50px 0; }
.type-tile { padding: 22px; text-align: center; }
.type-tile .emoji { font-size: 30px; margin-bottom: 8px; }
.type-tile h3 { margin: 0 0 4px; font-size: 15px; }

/* ---------- Dashboard ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; margin: 32px 0 24px; }
.page-head h1 { font-size: 26px; margin: 0; color: var(--navy); }
.list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; margin-bottom: 40px; }
.list-tile { padding: 20px; display: block; color: var(--text); }
.list-tile:hover { text-decoration: none; }
.list-tile .icon-badge {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 12px;
}
.list-tile h3 { margin: 0 0 4px; font-size: 16px; }
.list-tile .meta { font-size: 13px; color: var(--text-muted); }

.upcoming-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.upcoming-row:last-child { border-bottom: none; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(30,155,236,0.12); color: var(--blue); }

/* ---------- List detail ---------- */
.item-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.item-row:last-child { border-bottom: none; }
.item-row.done .item-title { text-decoration: line-through; color: var(--text-muted); }
.item-title { font-weight: 600; font-size: 15px; }
.item-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.item-actions { display: flex; gap: 8px; flex-shrink: 0; }
.item-actions form { display: inline; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }

footer { text-align: center; padding: 40px 0; color: var(--text-muted); font-size: 13px; }

/* ---------- Avatar chips ---------- */
.avatar-chip {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border);
}
.avatar-chip-initial {
  display: flex; align-items: center; justify-content: center;
  background: var(--pink); color: #fff; font-size: 12px; font-weight: 700;
}
.avatar-stack { display: flex; align-items: center; }
.avatar-stack .avatar-chip { margin-left: -8px; }
.avatar-stack .avatar-chip:first-child { margin-left: 0; }
.avatar-lg { width: 88px; height: 88px; font-size: 32px; }

/* ---------- Homepage hero banner ---------- */
.hero-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 64px 0 90px;
  background: linear-gradient(115deg, #0B1220 0%, #16233d 45%, #1E9BEC 100%);
  color: #fff;
}
.hero-banner::before {
  /* Illustrated "trolley + phone with a list" scene, drawn in CSS/SVG rather
     than a hotlinked stock photo - swap this block out for a real
     background-image: url(...) once you have a licensed photo. */
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 85% 20%, rgba(236,30,99,0.35), transparent 45%),
    radial-gradient(circle at 15% 85%, rgba(27,170,117,0.25), transparent 40%);
  pointer-events: none;
}
.hero-banner-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero-banner-copy h1 { font-size: 40px; line-height: 1.15; margin: 0 0 14px; letter-spacing: -0.02em; }
.hero-banner-copy p { font-size: 17px; color: rgba(255,255,255,0.85); max-width: 460px; margin: 0 0 26px; }
.hero-scene {
  position: absolute;
  right: 6%;
  bottom: 0;
  width: 220px;
  opacity: 0.9;
  pointer-events: none;
}
.auth-toggle-box {
  background: rgba(255,255,255,0.96);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  color: var(--text);
}
.auth-toggle-tabs { display: flex; gap: 4px; padding: 6px; }
.auth-toggle-tabs button {
  flex: 1; padding: 10px; border: none; background: transparent;
  border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer;
  color: var(--text-muted);
}
.auth-toggle-tabs button.active { background: rgba(236,30,99,0.1); color: var(--pink); }
.auth-toggle-body { padding: 20px 22px 24px; }

.quick-list-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  padding: 20px 22px;
  backdrop-filter: blur(6px);
}
.quick-list-card h3 { margin: 0 0 4px; font-size: 16px; }
.quick-list-card p { margin: 0 0 14px; font-size: 13px; color: rgba(255,255,255,0.75); }
.quick-list-card input[type=text] { background: rgba(255,255,255,0.95); }

@media (max-width: 860px) {
  .hero-banner-inner { grid-template-columns: 1fr; }
  .hero-scene { display: none; }
}

/* ---------- List type picker (new list page) ---------- */
.type-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.type-picker-option input { position: absolute; opacity: 0; pointer-events: none; }
.type-picker-card {
  display: block;
  text-align: center;
  padding: 20px 12px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: rgba(255,255,255,0.85);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.type-picker-card .emoji { font-size: 28px; display: block; margin-bottom: 8px; }
.type-picker-card .name { font-size: 13px; font-weight: 600; color: var(--text); }
.type-picker-option input:checked + .type-picker-card {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(236,30,99,0.12);
}
.type-picker-option input:focus-visible + .type-picker-card { outline: 2px solid var(--pink); outline-offset: 2px; }

/* ---------- Danger zone (list settings) ---------- */
.danger-zone {
  border: 1px solid rgba(236,30,99,0.25);
  background: rgba(236,30,99,0.04);
  border-radius: 14px;
  padding: 20px;
  margin-top: 28px;
}
.danger-zone h3 { margin-top: 0; color: var(--pink); }

/* ---------- Admin table ---------- */
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }

/* ---------- Settings button row ---------- */
.list-head-actions { display: flex; align-items: center; gap: 12px; }

@media (max-width: 600px) {
  .hero h1 { font-size: 32px; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 12px; }
}
