:root{
  --orange:#F97316;
  --orange-dark:#C2410C;
  --blue:#0EA5E9;
  --blue-dark:#0284C7;
  --navy:#0F172A;
  --bg:#F8FAFC;
  --card-bg:#ffffff;
  --border:#E5E7EB;
  --muted:#64748B;
  --radius:10px;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  background: linear-gradient(180deg, #fff7ed 0%, var(--bg) 55%, var(--bg) 100%) fixed;
  color:var(--navy);
}

.container{
  max-width: 1100px;
  margin: 28px auto;
  padding: 0 20px 32px;
}

.card{
  background:var(--card-bg);
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.06), 0 10px 25px rgba(15,23,42,0.06);
  margin-bottom: 18px;
}

.card.tight{ padding: 18px; }

/* Flat page layout — single shell, sections handle their own padding */
.page-card{
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(15,23,42,0.06), 0 10px 25px rgba(15,23,42,0.06);
  margin-bottom: 18px;
  overflow: hidden;
}
.section{
  padding: 20px;
}
.section + .section{
  border-top: 1px solid var(--border);
}
.section h3{
  margin: 0 0 12px;
}
/* Inside a split, add dividers between stacked columns on mobile */
.section .split > div{
  min-width: 0;
}
@media (max-width: 900px){
  .section .split > div + div{
    border-top: 1px solid var(--border);
    padding-top: 16px;
  }
}

.card.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding: 14px 18px;
}

h1,h2,h3{ margin:0 0 10px; letter-spacing:-0.3px; }
h2{ font-size:22px; }
h3{ font-size:16px; color: var(--navy); }

.muted{ color: var(--muted); font-size: 13px; }
.small{ font-size: 12px; }
.hr, hr{ border:none; border-top:1px solid var(--border); margin: 18px 0; }

.row{
  display:flex;
  gap: 14px;
  align-items:flex-start;
  flex-wrap: wrap;
}
.admin-member-topcards{ align-items: stretch; }

.page-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom: 14px;
}

.actions{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
}

.badge{
  display:inline-flex;
  align-items:center;
  padding: 3px 10px;
  border-radius: 999px;
  background: #F1F5F9;
  border: 1px solid var(--border);
  color: var(--navy);
  font-size: 12px;
  font-weight: 600;
}
.badge-success{ background:#d1fae5; color:#065f46; border-color:#6ee7b7; }
.badge-info{ background:#dbeafe; color:#1e40af; border-color:#93c5fd; }
.badge-warning{ background:#fef3c7; color:#92400e; border-color:#fcd34d; }
.badge-danger{ background:#fee2e2; color:#991b1b; border-color:#fca5a5; }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor:pointer;
  text-decoration:none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
  user-select:none;
  white-space:nowrap;
  background:#F3F4F6;
  color: var(--navy);
  border-color: var(--border);
}

.btn:disabled{ opacity:0.55; cursor:not-allowed; transform:none; }
.btn:focus-visible{ outline: 2px solid var(--blue); outline-offset: 2px; }

.btn:hover{ transform: translateY(-1px); box-shadow: 0 8px 18px rgba(2,132,199,0.10); }

.btn.primary{
  background: var(--blue);
  color:#fff;
}
.btn.primary:hover{ background: var(--blue-dark); }

.btn.secondary{
  background:#F3F4F6;
  color: var(--navy);
  border-color: var(--border);
}
.btn.secondary:hover{ background:#E5E7EB; box-shadow: 0 8px 18px rgba(15,23,42,0.08); }

.btn.danger{
  background:#FEE2E2;
  color:#991B1B;
  border-color:#FECACA;
}
.btn.danger:hover{ background:#FECACA; box-shadow: 0 8px 18px rgba(153,27,27,0.12); }

.btn.sm{ padding: 7px 10px; font-size: 13px; border-radius: 9px; }
.btn.lg{ padding: 12px 16px; font-size: 15px; border-radius: 12px; }

/* Primary in-app "big action" button (Grab a Drink, etc.) */
.btn.action{
  width:100%;
  padding: 20px 16px;
  font-size: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--team-accent, var(--blue)) 0%, var(--team-accent-light, #6366F1) 100%);
  color: #fff;
  box-shadow: 0 4px 15px var(--team-accent-shadow, rgba(14,165,233,0.35));
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn.action:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--team-accent-shadow, rgba(14,165,233,0.45));
}
.btn.action:active:not(:disabled) {
  transform: translateY(1px) scale(0.97);
  box-shadow: 0 2px 8px var(--team-accent-shadow, rgba(14,165,233,0.25));
}

/* Punch card background support */
.punchcard{
  position: relative;
  overflow: hidden;
}
.punchcard .punchcard-bg{
  position:absolute;
  top:0; left:0; right:0; bottom:0;
  width:100%;
  height:100%;
  background-size: cover;
  background-position: center;
  opacity: 0.25; /* 75% transparent so content stays readable */
  pointer-events:none;
  z-index:0;
}
.punchcard .punchcard-inner{
  position: relative;
  z-index: 1;
}

.input, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], textarea, select{
  width:100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background:#fff;
  font-size: 14px;
  outline:none;
  transition: border-color .12s ease, box-shadow .12s ease;
}

.input:focus, input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="number"]:focus, input[type="search"]:focus, textarea:focus, select:focus{
  border-color: rgba(14,165,233,0.55);
  box-shadow: 0 0 0 4px rgba(14,165,233,0.12);
}

.table{
  width:100%;
  border-collapse: collapse;
}

.table th{
  text-align:left;
  padding: 12px;
  background:#F8FAFC;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
}

.table td{
  padding: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

/* Toast notifications (fixed top-center) */
.toast-container{
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 90%;
  max-width: 440px;
  pointer-events: none;
}
.toast{
  padding: 12px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(15,23,42,0.12);
  animation: toastSlideIn 0.3s ease-out both;
  pointer-events: auto;
  cursor: pointer;
}
.toast.ok{ background:#ECFDF5; border-color:#A7F3D0; color:#065F46; }
.toast.err{ background:#FEF2F2; border-color:#FECACA; color:#991B1B; }
.toast.fade-out{ animation: toastFadeOut 0.3s ease-in forwards; }

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toastFadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-12px); }
}

.kpi-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px){
  .kpi-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px){
  .kpi-grid{ grid-template-columns: 1fr; }
}

.kpi{
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  position: relative;
  overflow: hidden;
}
.kpi::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--team-accent, var(--blue)), var(--team-accent-light, var(--orange)));
  border-radius: 3px 3px 0 0;
}
.kpi .label{ color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.kpi .value{
  font-size: 20px;
  font-weight: 900;
  color: var(--navy);
}

.split{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 900px){
  .split{ grid-template-columns: 1fr; }
}

.details{
  border:1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  background:#fff;
}
.details summary{
  list-style:none;
  cursor:pointer;
  padding: 14px;
  font-weight: 800;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.details summary::-webkit-details-marker{ display:none; }
.details .content{ padding: 0 14px 14px; }

.toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap: wrap;
}

.tap-btn{ /* legacy class kept for compatibility */
  all: unset;
}



/* --- Responsive tables (mobile) --- */
.show-sm{ display:none; }

.table-wrap{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

@media (max-width: 720px){
  .hide-sm{ display:none !important; }
  .show-sm{ display:block !important; }


  /* Stack table rows into cards when .stack is applied */
  .table.stack thead{ display:none; }
  .table.stack, .table.stack tbody, .table.stack tr, .table.stack td{ display:block; width:100%; }
  .table.stack tr{
    border: 1px solid var(--border);
    border-radius: 12px;
    margin: 0 0 12px 0;
    overflow:hidden;
    background:#fff;
  }
  .table.stack td{
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 10px 12px;
    display:flex;
    justify-content: space-between;
    gap: 12px;
  }
  .table.stack td:last-child{ border-bottom:none; }
  .table.stack td::before{
    content: attr(data-label);
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: .04em;
    padding-right: 12px;
    flex: 0 0 auto;
  }
  .table.stack td .muted.small{ margin-top:2px; }
  .table.stack td.actions-cell{ justify-content:flex-end; }
  .table.stack td.actions-cell::before{ content:''; }


  /* Admin member page: top action panels should stack on mobile */
  .admin-member-topcards{
    flex-direction: column;
  }
  .admin-member-topcards > .card{
    width: 100%;
  }
}

/* Mobile "list cards" helper */
.list-cards{ display:grid; gap:12px; }
.list-card{
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
  background:#fff;
}
.list-card .topline{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.list-card .meta{
  display:grid;
  gap:6px;
  margin-top:10px;
}
.kv{ display:flex; justify-content:space-between; gap:10px; }
.kv .k{ color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing:.04em; font-weight:700; }
.kv .v{ font-weight:700; }

/* --- Micro polish pass --- */
.table tr:hover td{
  background: #F8FAFC;
}
.table tr:hover td:first-child{
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}
.table tr:hover td:last-child{
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

.card + .card{ margin-top: 0; }
.card .section-title{
  margin: 0 0 14px; font-size: 18px; font-weight: 800; letter-spacing: -0.2px;
  color: var(--navy);
}

.btn.full{ width:100%; }
.btn.sm{ padding: 7px 12px; font-size: 13px; }
.btn.lg{ padding: 11px 16px; font-size: 15px; }

.input:focus, input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="number"]:focus, select:focus, textarea:focus{
  outline: none;
  box-shadow: 0 0 0 4px rgba(14,165,233,0.15);
  border-color: rgba(14,165,233,0.75);
}

/* Header hamburger */
.nav-right{
  display:flex;
  align-items:center;
  gap:12px;
}
.icon-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.icon-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15,23,42,0.08);
}
.hamburger{
  display:inline-flex;
  flex-direction:column;
  gap:5px;
}
.hamburger span{
  width: 18px;
  height: 2px;
  background: var(--navy);
  border-radius: 999px;
  display:block;
}
.x{
  position:relative;
  width: 18px;
  height: 18px;
  display:block;
}
.x::before,.x::after{
  content:'';
  position:absolute;
  left: 8px;
  top: 1px;
  width: 2px;
  height: 16px;
  background: var(--navy);
  border-radius: 999px;
}
.x::before{ transform: rotate(45deg); }
.x::after{ transform: rotate(-45deg); }

.nav-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.38);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .18s ease;
  z-index: 80;
}
.nav-backdrop.show{ opacity: 1; }

.nav-drawer{
  position: fixed;
  top: 18px;
  right: 18px;
  width: 320px;
  max-width: calc(100vw - 36px);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(15,23,42,0.18);
  transform: translateY(-6px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 90;
}
.nav-drawer.open{
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.nav-drawer-header{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border);
}
.nav-drawer-title{
  font-weight: 900;
  letter-spacing: -0.2px;
}
.nav-drawer-body{
  padding: 10px 14px 14px;
  display:flex;
  flex-direction:column;
  gap: 8px;
}
.nav-link{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration:none;
  color: var(--navy);
  background: #F8FAFC;
  border: 1px solid var(--border);
  font-weight: 800;
}
.nav-link:hover{
  background:#F1F5F9;
}
.nav-form{ margin: 4px 0 0; }

/* Mobile: slide-out drawer */
@media (max-width: 720px){
  .card.nav{
    align-items: center;
  }
  .nav-drawer{
    top: 0;
    right: 0;
    height: 100vh;
    width: 86vw;
    max-width: 360px;
    border-radius: 0;
    transform: translateX(16px);
  }
  .nav-drawer.open{ transform: translateX(0); }
  .nav-drawer-header{ padding: 16px; }
  .nav-drawer-body{ padding: 12px 16px 18px; }

  /* Admin: Member detail top panels should stack on mobile */
  .admin-member-panels{ flex-direction: column; }
  .admin-member-panels > .card{ width: 100%; }
  .admin-member-topcards{ flex-direction: column; }
  .admin-member-topcards > .card{ width: 100%; }
}

/* Micro layout: tighten stacked actions on small screens */
@media (max-width: 640px){
  .actions{ gap: 8px; }
  .btn{ width: auto; }
  .row{ gap: 12px; }
  .page-header { margin-bottom: 16px; }
  .page-header .actions { margin-top: 4px; }
  .admin-tabs { margin-top: 4px; }
}


/* Responsive tables */
.table-wrap{overflow-x:auto; -webkit-overflow-scrolling:touch;}
.table{width:100%; border-collapse:collapse;}
.table th,.table td{padding:10px 12px; border-bottom:1px solid var(--border); text-align:left; vertical-align:top;}
.table thead th{font-size:12px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted);}

/* Progress bar — uses team accent color with fallback to orange */
.progress{height:10px; background:#E5E7EB; border-radius:999px; overflow:hidden; position:relative;}
.progress .bar{height:100%; background:linear-gradient(90deg, var(--team-accent, var(--orange)), var(--team-accent-light, #FBBF24)); border-radius:999px; position:relative; animation: growWidth 0.8s ease-out both;}

.grid-2{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px;}
@media (max-width:720px){.grid-2{grid-template-columns:1fr;}}

/* --- Animations & Visual Enhancements --- */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.card { animation: fadeInUp 0.35s ease-out both; }
.card:nth-child(2) { animation-delay: 0.06s; }
.card:nth-child(3) { animation-delay: 0.12s; }
.card:nth-child(4) { animation-delay: 0.18s; }

@keyframes growWidth {
  from { width: 0; }
}

.progress .bar::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.btn:active:not(:disabled) { transform: translateY(1px) scale(0.98); box-shadow: none; }

@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.table td { transition: background 0.15s ease; }

/* Leaderboard rank styles */
.rank-1, .rank-2, .rank-3 { font-weight: 900; }
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
}
.rank-badge.gold { background: linear-gradient(135deg, #FCD34D, #F59E0B); color: #78350F; box-shadow: 0 2px 8px rgba(245,158,11,0.35); }
.rank-badge.silver { background: linear-gradient(135deg, #E5E7EB, #9CA3AF); color: #374151; box-shadow: 0 2px 8px rgba(107,114,128,0.25); }
.rank-badge.bronze { background: linear-gradient(135deg, #FDBA74, #EA580C); color: #7C2D12; box-shadow: 0 2px 8px rgba(234,88,12,0.25); }
.rank-badge.default { background: #F1F5F9; color: var(--muted); }

/* Leaderboard enhancements */
.rank-move { font-size: 11px; font-weight: 700; margin-left: 4px; }
.rank-move.up { color: #059669; }
.rank-move.down { color: #DC2626; }
.drinks-remaining { font-size: 13px; color: var(--muted); font-weight: 600; }
.streak-badge { font-size: 13px; font-weight: 700; white-space: nowrap; }

/* Activity feed */
.activity-feed { display: flex; flex-direction: column; gap: 0; }
.activity-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon { font-size: 20px; flex-shrink: 0; width: 32px; text-align: center; }
.activity-text { flex: 1; font-size: 14px; }
.activity-time { flex-shrink: 0; font-size: 12px; }

/* ---- Landing / Login page ---- */

/* Override container on login page so split can go full-width */
body.page-login{
  background: #fff;
}
body.page-login .container{
  max-width: none;
  margin: 0;
  padding: 0;
}

.login-split{
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* Left branding panel */
.login-brand{
  background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 30%, #FED7AA 70%, #FDBA74 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  position: relative;
  overflow: hidden;
}
/* Frosted bottom gradient */
.login-frost{
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 35%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(186,230,253,0.08) 25%,
    rgba(186,230,253,0.18) 50%,
    rgba(224,242,254,0.35) 70%,
    rgba(240,249,255,0.6) 85%,
    rgba(255,255,255,0.8) 100%
  );
  pointer-events: none;
  z-index: 1;
}
.login-brand-inner{
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 380px;
  animation: fadeInUp 0.5s ease-out both;
}
.login-brand-logo{
  height: 200px;
  border-radius: 50%;
  box-shadow: 0 12px 40px rgba(249,115,22,0.2);
  margin-bottom: 20px;
}
.login-brand-title{
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--navy);
  margin: 0 0 6px;
}
.login-brand-tagline{
  font-size: 18px;
  font-weight: 700;
  color: var(--orange-dark);
  margin: 0 0 20px;
}
.login-brand-desc{
  font-size: 15px;
  line-height: 1.6;
  color: #78350F;
  margin: 0;
}

/* Right form panel */
.login-form-panel{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  background: #fff;
}
.login-form-inner{
  width: 100%;
  max-width: 400px;
  animation: fadeInUp 0.5s ease-out 0.1s both;
}

/* Mobile-only header (hidden on desktop) */
.login-mobile-header{
  display: none;
  text-align: center;
  margin-bottom: 28px;
}

.login-welcome{ margin-bottom: 24px; }
.login-welcome-title{
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin: 0 0 6px;
  color: var(--navy);
}

.login-label{
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.login-form .input{
  padding: 12px 14px;
  font-size: 15px;
}

/* "or" divider */
.login-divider{
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0;
  color: var(--muted);
  font-size: 13px;
}
.login-divider::before,
.login-divider::after{
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Alt action cards (create / join team) */
.login-alt-action{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--navy);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  margin-bottom: 10px;
}
.login-alt-action div{
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.login-alt-action .arrow{
  font-size: 18px;
  color: var(--muted);
  transition: transform 0.15s ease, color 0.15s ease;
}
.login-alt-action:hover{
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(15,23,42,0.08);
  border-color: rgba(14,165,233,0.3);
}
.login-alt-action:hover .arrow{
  transform: translateX(3px);
  color: var(--blue);
}

/* Mobile: collapse to single column */
@media (max-width: 900px){
  .login-split{
    grid-template-columns: 1fr;
    min-height: 100vh;
  }
  .login-brand{
    padding: 24px 20px 28px;
  }
  .login-frost{
    height: 40%;
  }
  .login-form-panel{
  }
  .login-brand-inner{
    max-width: 100%;
  }
  .login-brand-logo{
    height: 120px;
    margin-bottom: 12px;
  }
  .login-brand-title{
    font-size: 22px;
    margin: 0 0 2px;
  }
  .login-brand-tagline{
    font-size: 14px;
    margin: 0 0 8px;
  }
  .login-brand-desc{
    font-size: 13px;
    line-height: 1.4;
  }
  .login-mobile-header{
    display: none;
  }
  .login-form-panel{
    padding: 28px 20px 40px;
    min-height: auto;
    align-items: flex-start;
  }
  .login-welcome-title{
    font-size: 22px;
  }
}

/* Team card list */
.team-cards { display: grid; gap: 14px; }
.team-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(15,23,42,0.06), 0 10px 25px rgba(15,23,42,0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  color: var(--navy);
  animation: fadeInUp 0.35s ease-out both;
}
.team-card:nth-child(2) { animation-delay: 0.06s; }
.team-card:nth-child(3) { animation-delay: 0.12s; }
.team-card:nth-child(4) { animation-delay: 0.18s; }
.team-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(15,23,42,0.12);
}
.team-card .team-info { flex: 1; }
.team-card .team-name { font-size: 17px; font-weight: 800; margin: 0; }
.team-card .team-role { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; margin-top: 3px; }
.team-card .arrow {
  font-size: 18px;
  color: var(--muted);
  transition: transform 0.15s ease;
}
.team-card:hover .arrow { transform: translateX(3px); color: var(--blue); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
.empty-state .emoji { font-size: 40px; display: block; margin-bottom: 10px; }
.empty-state p { margin: 6px 0; font-size: 14px; }

/* Event type icons in activity */
.event-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 13px;
  flex-shrink: 0;
}
.event-icon.consume { background: #ECFDF5; }
.event-icon.undo { background: #FEF2F2; }
.event-icon.adjust { background: #EFF6FF; }

/* Punch card visual enhancement */
.punchcard .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.punch-dots {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 10px 0;
}
.punch-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.3s ease;
}
.punch-dot.filled {
  background: linear-gradient(135deg, var(--team-accent, var(--orange)), var(--team-accent-light, #FBBF24));
  border-color: var(--team-accent, var(--orange));
  color: #fff;
  box-shadow: 0 2px 8px var(--team-accent-shadow, rgba(249,115,22,0.3));
}
.punch-dot.filled.latest {
  animation: punchPop 0.4s ease-out;
}
@keyframes punchPop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* Admin tabs */
.admin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 0;
}
.admin-tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.admin-tab:hover { color: var(--navy); }
.admin-tab.active {
  color: var(--team-accent, var(--orange));
  border-bottom-color: var(--team-accent, var(--orange));
}
.admin-tab-panel { display: none; }
.admin-tab-panel.active { display: block; }

/* Settings section cards */
.settings-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
  background: var(--bg);
}
.settings-card:last-child { margin-bottom: 0; }
.settings-card h4 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 800;
}
.settings-card .settings-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 14px;
}

/* Help pages */
.help-section { margin-bottom: 24px; }
.help-section:last-child { margin-bottom: 0; }
.help-section h3 { font-size: 17px; font-weight: 800; margin: 0 0 10px; }
.help-section p { font-size: 14px; line-height: 1.6; margin: 0 0 10px; color: var(--navy); }
.help-section ol, .help-section ul { font-size: 14px; line-height: 1.6; padding-left: 22px; margin: 0 0 10px; }
.help-section li { margin-bottom: 6px; }
.help-section dl { margin: 0; }
.help-section dt { font-weight: 800; font-size: 14px; margin: 12px 0 4px; }
.help-section dt:first-child { margin-top: 0; }
.help-section dd { margin: 0 0 8px; font-size: 14px; line-height: 1.6; color: #475569; }
.help-section code { background: #F1F5F9; padding: 2px 6px; border-radius: 6px; font-size: 13px; }
.help-section a { color: var(--blue); text-decoration: none; font-weight: 600; }
.help-section a:hover { text-decoration: underline; }
.help-section .details { margin-bottom: 8px; }
.help-section .details summary { font-size: 14px; font-weight: 700; }
.help-section .details .content p { margin: 0; color: #475569; }

/* ============================================================
   KIOSK MODE — Member Selection (Avatar Grid)
   ============================================================ */
.kiosk-avatar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
  max-height: 400px;
  overflow-y: auto;
  padding: 4px;
}
.kiosk-avatar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 6px;
  border: 2px solid var(--border);
  border-radius: 16px;
  background: var(--card-bg);
  cursor: pointer;
  transition: all 0.15s ease;
}
.kiosk-avatar-btn:hover:not(:disabled) {
  border-color: var(--team-accent, var(--orange));
  transform: scale(1.04);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.kiosk-avatar-btn:active:not(:disabled) {
  transform: scale(0.97);
}
.kiosk-avatar-btn.selected {
  border-color: var(--team-accent, var(--orange));
  background: var(--team-accent-light, #FFF3E0);
  box-shadow: 0 0 0 3px var(--team-accent-shadow, rgba(234,88,12,0.25));
}
.kiosk-avatar-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.kiosk-avatar-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--team-accent, var(--orange));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  text-transform: uppercase;
  flex-shrink: 0;
}
.kiosk-avatar-btn:disabled .kiosk-avatar-circle {
  background: var(--border);
}
.kiosk-avatar-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
}
.kiosk-avatar-btn:disabled .kiosk-avatar-label {
  color: #94A3B8;
}
.kiosk-nopin-tag {
  font-size: 10px;
  color: var(--team-accent, var(--orange));
  font-weight: 600;
  opacity: 0.8;
}

/* No-PIN members: neutral grey circle so contrast with coloured avatars is unmistakable */
.kiosk-avatar-grid .kiosk-avatar-btn[data-no-pin="1"] {
  border-style: dashed;
}
.kiosk-avatar-circle.kiosk-avatar-circle--nopin {
  background: #E2E8F0;
  color: var(--team-accent, var(--orange));
}
.kiosk-avatar-grid .kiosk-avatar-btn[data-no-pin="1"] .kiosk-avatar-label {
  color: #94A3B8;
}

@media (max-width: 480px) {
  .kiosk-avatar-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .kiosk-avatar-circle { width: 50px; height: 50px; font-size: 20px; }
  .kiosk-avatar-label { font-size: 12px; }
}

/* ============================================================
   KIOSK MODE — Card View
   ============================================================ */
.kiosk-progress-count {
  font-size: 48px;
  font-weight: 900;
  text-align: center;
  margin: 20px 0 12px;
  letter-spacing: -1px;
}
.kiosk-progress-count .kiosk-slash {
  color: #CBD5E1;
  margin: 0 4px;
}

.kiosk-drink-btn {
  width: 100%;
  padding: 18px 24px !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  border-radius: 16px !important;
  letter-spacing: 0.5px;
  background: color-mix(in srgb, var(--team-accent, var(--blue)) 80%, #000) !important;
  box-shadow: 0 4px 15px var(--team-accent-shadow, rgba(14,165,233,0.35));
  transition: all 0.15s ease;
}
.kiosk-drink-btn:hover {
  background: color-mix(in srgb, var(--team-accent, var(--blue)) 70%, #000) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--team-accent-shadow, rgba(14,165,233,0.45));
}
.kiosk-drink-btn:active {
  transform: scale(0.96);
  background: color-mix(in srgb, var(--team-accent, var(--blue)) 65%, #000) !important;
}

/* Punch dot bounce animation for latest drink */
@keyframes punchPop {
  0% { transform: scale(1); }
  30% { transform: scale(1.35); }
  50% { transform: scale(0.9); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.punch-dot.kiosk-celebrate {
  animation: punchPop 0.5s ease-out;
}

/* Progress bar smooth fill */
@keyframes barGrow {
  from { width: 0%; }
}
.kiosk-card .progress .bar {
  animation: barGrow 0.6s ease-out;
}

/* ============================================================
   KIOSK MODE — Card Complete Celebration
   ============================================================ */
.kiosk-celebration {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.7);
  animation: celebFadeIn 0.3s ease-out;
  cursor: pointer;
}
@keyframes celebFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.kiosk-celebration-content {
  text-align: center;
  animation: celebPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes celebPop {
  0% { transform: scale(0.3); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.kiosk-celebration-emoji {
  font-size: 80px;
  display: block;
  margin-bottom: 16px;
}
.kiosk-celebration-title {
  font-size: 36px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
}
.kiosk-celebration-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.7);
}

/* Confetti particles */
.kiosk-confetti {
  position: fixed;
  top: -10px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  z-index: 10000;
  pointer-events: none;
}
@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
.kiosk-confetti:nth-child(1) { left: 10%; background: #FF6B6B; animation: confettiFall 2.0s ease-in forwards 0.0s; }
.kiosk-confetti:nth-child(2) { left: 20%; background: #4ECDC4; animation: confettiFall 2.2s ease-in forwards 0.1s; width: 8px; height: 12px; }
.kiosk-confetti:nth-child(3) { left: 30%; background: #FFE66D; animation: confettiFall 1.8s ease-in forwards 0.2s; }
.kiosk-confetti:nth-child(4) { left: 40%; background: #A78BFA; animation: confettiFall 2.4s ease-in forwards 0.15s; width: 12px; height: 8px; }
.kiosk-confetti:nth-child(5) { left: 50%; background: #FB923C; animation: confettiFall 2.0s ease-in forwards 0.05s; }
.kiosk-confetti:nth-child(6) { left: 60%; background: #34D399; animation: confettiFall 2.1s ease-in forwards 0.25s; width: 8px; height: 12px; }
.kiosk-confetti:nth-child(7) { left: 70%; background: #F472B6; animation: confettiFall 1.9s ease-in forwards 0.1s; }
.kiosk-confetti:nth-child(8) { left: 80%; background: #60A5FA; animation: confettiFall 2.3s ease-in forwards 0.2s; width: 12px; height: 8px; }
.kiosk-confetti:nth-child(9) { left: 15%; background: #FBBF24; animation: confettiFall 2.1s ease-in forwards 0.3s; }
.kiosk-confetti:nth-child(10) { left: 45%; background: #C084FC; animation: confettiFall 1.7s ease-in forwards 0.05s; width: 6px; height: 14px; }
.kiosk-confetti:nth-child(11) { left: 55%; background: #FF6B6B; animation: confettiFall 2.5s ease-in forwards 0.15s; }
.kiosk-confetti:nth-child(12) { left: 75%; background: #4ECDC4; animation: confettiFall 2.0s ease-in forwards 0.35s; width: 14px; height: 6px; }
.kiosk-confetti:nth-child(13) { left: 85%; background: #FFE66D; animation: confettiFall 1.8s ease-in forwards 0.1s; }
.kiosk-confetti:nth-child(14) { left: 25%; background: #34D399; animation: confettiFall 2.2s ease-in forwards 0.25s; width: 8px; height: 12px; }
.kiosk-confetti:nth-child(15) { left: 90%; background: #FB923C; animation: confettiFall 2.0s ease-in forwards 0.0s; }
.kiosk-confetti:nth-child(16) { left: 5%; background: #60A5FA; animation: confettiFall 2.4s ease-in forwards 0.2s; width: 12px; height: 8px; }

/* Kiosk teammate button (moved from inline) */
.kiosk-teammate-btn {
  display: block; width: 100%; padding: 12px 16px; border: none;
  border-bottom: 1px solid var(--border); background: var(--card-bg);
  font-size: 14px; font-weight: 600; color: var(--navy); cursor: pointer;
  text-align: left; transition: background 0.12s ease;
}
.kiosk-teammate-btn:last-child { border-bottom: none; }
.kiosk-teammate-btn:hover { background: #F1F5F9; }
.kiosk-teammate-btn:active { background: #E2E8F0; }

/* Kiosk nav bar */
.kiosk-nav {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ── Game Day Banners ── */
.gameday-banner {
  background: linear-gradient(135deg, #FFF7ED, #FEF3C7);
  border: 2px solid #F59E0B;
  border-radius: var(--radius);
  padding: 14px 18px;
  text-align: center;
  margin-bottom: 12px;
  animation: gamedayPulse 3s ease-in-out infinite;
}
.gameday-banner div:first-child {
  color: #B45309;
}
.gameday-banner div:last-child {
  color: #92400E;
  font-size: 14px;
}
@keyframes gamedayPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.3); }
  50% { box-shadow: 0 0 16px 4px rgba(245, 158, 11, 0.2); }
}

.next-game-banner {
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 12px;
}

/* ── PWA ── */
.pwa-ios-tip[hidden] { display: none; }