:root{
  --bg: #f5f6f8;
  --panel: rgba(255,255,255,.92);
  --panel-2: rgba(255,255,255,.98);
  --stroke: rgba(15,23,42,.10);
  --text: rgba(15,23,42,.92);
  --muted: rgba(15,23,42,.62);
  --shadow: 0 18px 55px rgba(2,6,23,.12);
  --shadow-soft: 0 10px 28px rgba(2,6,23,.10);

  /* Status colors */
  --green: #16a34a;
  --green-soft: rgba(22,163,74,.12);

  --yellow: #f59e0b;
  --yellow-soft: rgba(245,158,11,.14);

  --red: #ef4444;
  --red-soft: rgba(239,68,68,.12);

  /* Role colors */
  --admin-green: #15803d;
  --user-green-soft: rgba(34,197,94,.14);

  /* BLUE buttons (Save/Filter) */
  --blue: #0a84ff;
  --blue-2: #006fe6;

  --r-xl: 22px;
  --r-lg: 16px;

  --max: 1040px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  color:var(--text);
  background:
    radial-gradient(900px 600px at 20% -10%, rgba(10,132,255,.10), transparent 60%),
    radial-gradient(900px 650px at 40% 120%, rgba(22,163,74,.08), transparent 60%),
    var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, "SF Pro Display", "SF Pro Text",
               "Segoe UI", Roboto, Helvetica, Arial;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.container{
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 18px;
}

.shell{
  min-height: calc(100vh - 56px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 28px 18px;
}

.card{
  width: 100%;
  max-width: 520px;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  overflow:hidden;
  backdrop-filter: blur(10px);
}

.card .card-body{ padding: 22px; }
.card .card-header{
  padding: 18px 22px;
  border-bottom: 1px solid var(--stroke);
  display:flex;
  align-items:center;
  gap:12px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.92));
}



.brand-dot{
  width: 12px; height: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #60a5fa, var(--blue));
  box-shadow: 0 0 0 6px rgba(10,132,255,.10);
  animation: brandPulse 1.8s ease-in-out infinite;
}

@keyframes brandPulse {
  0%   { transform: scale(1);   box-shadow: 0 0 0 6px rgba(10,132,255,.10); }
  50%  { transform: scale(1.12); box-shadow: 0 0 0 10px rgba(10,132,255,.18); }
  100% { transform: scale(1);   box-shadow: 0 0 0 6px rgba(10,132,255,.10); }
}




.brand-title{ font-weight: 650; letter-spacing: .2px; }

.subtle{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.h1{ margin: 0 0 10px 0; font-size: 22px; letter-spacing: .2px; }
.h2{ margin: 0 0 10px 0; font-size: 18px; letter-spacing: .2px; }
.p{ margin: 0 0 14px 0; color: var(--muted); line-height: 1.55; }

.row{ display:flex; gap:12px; }
.row > *{ flex:1; }

.field{ margin: 12px 0; }
.label{
  display:block;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 8px 0;
}

.input{
  width:100%;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.96);
  color: var(--text);
  outline: none;
}
.input:focus{
  border-color: rgba(10,132,255,.35);
  box-shadow: 0 0 0 5px rgba(10,132,255,.12);
}

.btn{
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor:pointer;
  font-weight: 650;
  letter-spacing: .15px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  user-select:none;
  transition: transform .06s ease, filter .15s ease, background .15s ease, border-color .15s ease;
}
.btn:active{ transform: translateY(1px); }

.btn-ghost{
  background: rgba(2,6,23,.04);
  border-color: var(--stroke);
  color: var(--text);
}
.btn-ghost:hover{ background: rgba(2,6,23,.06); }

/* BLUE PRIMARY (Save/Filter) */
.btn-primary{
  background: linear-gradient(180deg, var(--blue), var(--blue-2));
  border-color: rgba(10,132,255,.28);
  color: white;
}
.btn-primary:hover{ filter: brightness(1.03); }

.hr{
  height: 1px;
  background: var(--stroke);
  margin: 16px 0;
}

/* Admin layout */
.admin{
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 18px;
  display:grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  
  align-items: start;
}

.sidebar{
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-soft);
  padding: 16px;

  position: sticky;
  top: 18px;

  height: calc(100vh - 44px);
  max-height: calc(100vh - 44px);
  overflow: auto;

  backdrop-filter: blur(10px);

  /* critical to prevent bleed + stacking issues */
  z-index: 2;
  overflow-x: hidden;
}


.nav{
  margin-top: 14px;
  display:flex;
  flex-direction:column;
  gap: 8px;
}

.nav a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(2,6,23,.03);
  color: var(--text);
  text-decoration:none;
}
.nav a:hover{ background: rgba(2,6,23,.05); }

.main{
  positoin: relative;
  z-index: 1;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-soft);
  padding: 18px;
  backdrop-filter: blur(10px);
}

.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 16px;
  border: 1px solid var(--stroke);
}

.table th, .table td{
  padding: 10px 10px;
  text-align:left;
  border-bottom: 1px solid var(--stroke);
  font-size: 14px;
  vertical-align: middle;
}
.table th{
  color: var(--muted);
  font-weight: 650;
  background: rgba(2,6,23,.02);
}

/* Badges */
.badge{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(2,6,23,.03);
  font-size: 13px;
  font-weight: 700;
  color: rgba(15,23,42,.72);
  line-height: 1;
}

.badge-active{ border-color: rgba(22,163,74,.22); background: var(--green-soft); color: var(--green); }
.badge-pending{ border-color: rgba(245,158,11,.24); background: var(--yellow-soft); color: #b45309; }
.badge-disabled{ border-color: rgba(239,68,68,.22); background: var(--red-soft); color: var(--red); }

.badge-admin{ border-color: rgba(21,128,61,.22); background: rgba(21,128,61,.10); color: var(--admin-green); }
.badge-user{ border-color: rgba(34,197,94,.22); background: var(--user-green-soft); color: #15803d; }

/* KPI */
.kpi{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
}
.kpi .chip{
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(2,6,23,.03);
  display:flex;
  align-items:center;
  gap:10px;
}
.kpi .num{
  min-width: 34px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight: 800;
  border: 1px solid var(--stroke);
}
.num-green{ border-color: rgba(22,163,74,.22); background: var(--green-soft); color: var(--green); }
.num-yellow{ border-color: rgba(245,158,11,.24); background: var(--yellow-soft); color: #b45309; }
.num-red{ border-color: rgba(239,68,68,.22); background: var(--red-soft); color: var(--red); }

/* ===== SUPER COMPACT USER ROW ===== */
.usercell{
  display:flex;
  flex-direction:column;
  gap: 6px;
}
.user-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}
.user-email{
  font-weight: 650;
  white-space: nowrap;
}
.pillrow{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items:center;
}

/* Mini controls under email */
.mini-actions{
  display:flex;
  gap: 8px;
  align-items:center;
  flex-wrap: wrap;
}
.mini-select{
  height: 30px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.96);
  font-size: 13px;
  min-width: 120px; /* small */
}
.mini-select.role{ min-width: 100px; }
.mini-select.status{ min-width: 110px; }
.mini-btn{
  height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 13px;
}

/* Make practice dropdown fit nicely */
.practice-select{
  height: 30px;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 13px;
}

/* Responsive */
@media (max-width: 980px){
  .admin{ grid-template-columns: 1fr; }
  .sidebar{ height:auto; position:relative; top:auto; }
  .user-email{ white-space: normal; }
}

/* ===== ADMIN NAV FINAL (single source of truth) ===== */

/* Sidebar scroll only; nav itself never scrolls */
.sidebar{
  overflow: auto !important;
  max-height: calc(100vh - 44px) !important;
  overflow-x: hidden !important;
}
.sidebar .nav,
.sidebar .admin-nav-wrap,
.sidebar .admin-nav-wrap .nav{
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
}

/* Tighten spacing to reduce scrolling */
.sidebar .nav a.nav-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 8px 10px !important;
  margin: 4px 0 !important;
  border-radius: 14px !important;
  border: 1px solid rgba(15,23,42,.10) !important;
  background: rgba(255,255,255,.70) !important;
  color: rgba(15,23,42,.86) !important;
  text-decoration:none !important;
  transition: all .14s ease !important;
}

/* Section titles */
.admin-nav-wrap .nav-section-title{
  margin: 8px 0 6px !important;
  font-weight: 900 !important;
  font-size: 12px !important;
  letter-spacing: .10em !important;
  text-transform: uppercase !important;
  color: rgba(15,23,42,.55) !important;
}

/* MAIN (blue theme) */
.sidebar .nav-main a.nav-item{
  background: rgba(10,132,255,.06) !important;
  border-color: rgba(10,132,255,.14) !important;
}
.sidebar .nav-main a.nav-item:hover{
  background: rgba(10,132,255,.10) !important;
  border-color: rgba(10,132,255,.22) !important;
}
.sidebar .nav-main a.nav-item.is-active{
  background: rgba(10,132,255,.18) !important;
  border-color: rgba(10,132,255,.45) !important;
  font-weight: 900 !important;
  box-shadow: 0 10px 24px rgba(10,132,255,.10) !important;
}

/* SUB (teal theme) */
.sidebar .nav-sub a.nav-item{
  background: rgba(16,185,129,.08) !important;
  border-color: rgba(16,185,129,.18) !important;
}
.sidebar .nav-sub a.nav-item:hover{
  background: rgba(16,185,129,.12) !important;
  border-color: rgba(16,185,129,.28) !important;
}
.sidebar .nav-sub a.nav-item.is-active{
  background: rgba(16,185,129,.18) !important;
  border-color: rgba(16,185,129,.45) !important;
  font-weight: 900 !important;
  box-shadow: 0 10px 24px rgba(16,185,129,.10) !important;
}

/* HR spacing */
.sidebar .hr{
  margin: 10px 0 !important;
}

/* ========== Admin: Practice Pricing (Quarter) layout widen ========== */

/* widen the admin content area so cards aren't smooshed */
.admin .container,
.admin .wrap,
.admin .content,
.admin main {
  max-width: 1200px;
}

/* widen cards a bit more on desktop */
.admin .card {
  max-width: 1200px;
}

/* make form rows breathe (two columns on desktop) */
.admin .card .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 22px;
}

/* file row: give file input more room than button */
.admin .card form .row:last-of-type {
  grid-template-columns: 2fr 1fr;
}

/* mobile: stack */
@media (max-width: 900px) {
  .admin .container,
  .admin .wrap,
  .admin .content,
  .admin main,
  .admin .card {
    max-width: 100%;
  }

  .admin .card .row,
  .admin .card form .row:last-of-type {
    grid-template-columns: 1fr;
  }
}


/* ===== Dropdown shading (cards + admin) ===== */

/* Base select styling */
select,
.select,
.card select {
  background: #eef6ff;            /* light blue shading */
  border: 1px solid #bcd7ff;
  border-radius: 10px;
  padding: 8px 12px;
  color: inherit;
}

/* Stronger focus ring so it's obvious it's a dropdown */
select:focus,
.select:focus,
.card select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  border-color: #60a5fa;
}

/* If your theme applies a background to inputs but not selects */
.card select {
  background-image: linear-gradient(to bottom, #f4f9ff, #eaf4ff);
}

/* Ensure disabled selects don't look broken */
select:disabled {
  background: #f2f2f2;
  border-color: #d0d0d0;
  color: #777;
  cursor: not-allowed;
}

/* Admin main content: give it room */
.admin .main { width: 100%; max-width: 1300px; }

/* UI ticket pill (yellow) */
.ui-pill{
  border: 1px solid #f3c400;
  background: #fff7cc;
  color: #6b4e00;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.ui-pill:hover{ filter: brightness(0.98); }

