:root{
  --bg:#0b0f1a;
  --text:#e7ebf3;
  --muted:#bfc6d8;
  --brand:#ffffff;
  --accent:#9b8cff;
  --accent2:#38bdf8;
  --surface:rgba(255,255,255,.06);
  --glass-b:rgba(255,255,255,.12);
  --bd:rgba(255,255,255,.22);
  --radius:20px;
  --shadow:0 8px 30px rgba(0,0,0,.25);
}

/* Base */
*{box-sizing:border-box}
html,body{height:100%}
html{scroll-behavior:smooth}
body{
  margin:0; color:var(--text);
  font-family: ui-rounded, system-ui, -apple-system, Segoe UI, Roboto, Inter, sans-serif;
  font-size: clamp(15px, 1.1vw + 0.5rem, 18px);
  line-height:1.5;
  background:#0b0f1a url('assets/polydate-bg.jpg') no-repeat center/cover fixed;
}
body::before{
  content:""; position:fixed; inset:0; pointer-events:none;
  background:
    radial-gradient(900px 500px at 18% 0%, rgba(255,255,255,.10), rgba(0,0,0,.35) 60%),
    radial-gradient(900px 500px at 100% 100%, rgba(255,255,255,.06), rgba(0,0,0,.45) 60%);
}

/* Header + Tabs */
.topbar{
  position:sticky; top:0; z-index:6;
  backdrop-filter:saturate(160%) blur(8px);
  background:linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,0));
  padding: calc(env(safe-area-inset-top) + 12px) 20px 10px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.brand{ display:flex; align-items:center; gap:12px; padding:0 2px 8px; }
.logo{
  width:28px; height:28px; border-radius:10px;
  background:linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow:var(--shadow)
}
.brand-title{
  margin:0;
  font-size: clamp(22px, 3.2vw, 32px);
  letter-spacing:.8px; font-weight:900
}

/* Scrollable tabs on mobile */
.tabs{
  display:flex; gap:12px; overflow-x:auto; -webkit-overflow-scrolling:touch;
  scrollbar-width:none; padding-bottom:6px;
}
.tabs::-webkit-scrollbar{ display:none }
.tab-btn{
  appearance:none; border:1.5px solid var(--bd);
  background:var(--surface); color:var(--text);
  padding:10px 20px; border-radius:999px; font-weight:900;
  letter-spacing:.5px; text-transform:uppercase;
  white-space:nowrap; cursor:pointer; flex:0 0 auto;
}
.tab-btn[aria-selected="true"]{ border-color:#fff; box-shadow:var(--shadow) }

/* Layout */
.container{
  max-width:min(1100px, 100%);
  margin:16px auto 64px;
  padding:0 clamp(12px, 3vw, 24px);
}
.card{
  background:var(--surface); border:1px solid var(--bd);
  border-radius:var(--radius);
  padding: clamp(16px, 1.6vw, 24px);
  backdrop-filter:blur(6px); box-shadow:var(--shadow);
}
.hero{ text-align:center; padding:clamp(20px, 2.2vw, 32px) }
.center{text-align:center}
.lead{ font-size:clamp(16px, 1.1rem, 20px) }
.dim{ color:var(--muted) }
.rule{ margin:14px 0; border:0; border-top:1px solid rgba(255,255,255,.12) }
.mt{ margin-top:20px }

/* Grids and cards */
.grid{
  display:grid; gap:10px;
  grid-template-columns:repeat(auto-fit, minmax(220px,1fr));
}
.cards{
  display:grid; gap:12px;
  grid-template-columns:repeat(auto-fit, minmax(240px,1fr));
  margin:10px 0 0
}
.cardlet{
  background:rgba(255,255,255,.05);
  border:1px dashed rgba(255,255,255,.18);
  border-radius:14px; padding:12px
}

/* Inputs */
input, select, textarea{
  width:100%; border-radius:14px; border:1px solid var(--bd);
  background:rgba(255,255,255,.08); color:var(--text);
  padding:10px 12px; min-height:44px;
}
textarea{ min-height:100px }

/* Buttons: narrow by default */
button{ width:auto; touch-action:manipulation; -webkit-tap-highlight-color:transparent }
.actions{ display:flex; gap:10px; align-items:center; flex-wrap:wrap }
.pill{
  border-radius:999px; padding:10px 18px; font-weight:900;
  border:1.5px solid #fff;
  background:linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.08));
  color:#fff; cursor:pointer; min-height:40px;
  transition:transform .06s ease, filter .2s ease;
}
.pill:active{ transform:translateY(1px) }
.pill-small{ padding:6px 12px; font-weight:800; min-height:34px }
.badge{
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 10px; border-radius:999px;
  border:1px solid var(--bd); background:rgba(255,255,255,.08);
  font-size:12px; text-transform:uppercase; letter-spacing:.4px
}
.month-input{
  border-radius:999px; border:1.5px solid var(--bd);
  background:var(--surface); color:var(--text);
  padding:8px 12px; min-width: 135px;
}

/* Lists & rows */
.list{ list-style:none; padding:0; margin:10px 0 0; display:grid; gap:10px }
.row{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  border:1px dashed rgba(255,255,255,.18);
  border-radius:14px; padding:10px 12px; background:rgba(255,255,255,.05)
}

/* Calendar */
.cal-toolbar{
  display:flex; align-items:center; justify-content:center; gap:10px;
  margin:6px 0 12px; flex-wrap:wrap
}
.cal-grid{
  --cols:7; display:grid; gap:8px;
  grid-template-columns:repeat(var(--cols), minmax(0,1fr));
}
.cell{
  aspect-ratio:1/1; border-radius:14px;
  background:rgba(255,255,255,.04);
  border:1px solid var(--bd); padding:8px;
  position:relative; overflow:hidden; cursor:pointer
}
.cell .d{ font-weight:700; font-size:clamp(12px, 1rem, 16px) }
.cell .dot{
  position:absolute; right:8px; bottom:8px;
  width:6px; height:6px; border-radius:50%;
  background:var(--accent2)
}

/* Partner admin table, scroll on small screens */
.table-wrap{ overflow:auto; -webkit-overflow-scrolling:touch }
.table{
  width:100%; border-collapse:collapse;
  border:1px solid var(--bd); border-radius:14px; overflow:hidden;
  min-width:640px; /* keeps columns readable on phones */
}
.table th,.table td{
  padding:10px 12px; border-bottom:1px solid rgba(255,255,255,.12);
  text-align:left; vertical-align:middle
}
.table tr:last-child td{ border-bottom:0 }

/* Focus styles for accessibility */
:focus-visible{
  outline:2px solid var(--accent2);
  outline-offset:2px
}

/* Motion */
@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; scroll-behavior:auto !important }
}

/* Small screens */
@media (max-width: 720px){
  .brand{ gap:10px }
  .brand-title{ letter-spacing:.6px }
  .tabs{ gap:10px }
  .card{ padding:16px }
  .grid{ grid-template-columns:1fr } /* one column forms, cleaner on phones */
  .cal-grid{ gap:6px }
  .cell{ padding:6px; border-radius:12px }
  .month-input{ min-width:120px }
}

/* Large screens */
@media (min-width: 1200px){
  .container{ max-width:1200px }
}