/* ============================================================
   ProSport Portal - Light Theme (Full Replacement)
   File: /assets/css/portal.css
   Purpose: Single source of truth for portal/onboarding UI styles
   ============================================================ */

/* ---------- Theme Tokens ---------- */
:root{
  /* neutrals */
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f2f4f8;
  --border: #e6e8ef;

  /* text */
  --text: #121826;
  --text-2: #4b5565;
  --muted: #7b8496;
  --link: #1d4ed8;

  /* brand */
  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --primary-50: #eff6ff;

  /* feedback */
  --success: #16a34a;
  --success-50: #ecfdf3;
  --warning: #d97706;
  --warning-50: #fff7ed;
  --danger:  #dc2626;
  --danger-50: #fef2f2;

  /* sizing */
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 10px;
  --container: 1100px;

  /* spacing */
  --pad-1: 10px;
  --pad-2: 14px;
  --pad-3: 18px;
  --pad-4: 22px;
  --pad-5: 28px;

  /* effects */
  --ring: 0 0 0 4px rgba(37, 99, 235, 0.18);
  --shadow-sm: 0 1px 2px rgba(16,24,40,.06);
  --shadow-md: 0 10px 25px rgba(16,24,40,.08);
}

/* ---------- Base Reset ---------- */
*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}
img{ max-width:100%; display:block; }
a{ color: var(--link); text-decoration: none; }
a:hover{ text-decoration: underline; }
code, pre{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* ---------- Layout Helpers ---------- */
.container{
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}
.stack{ display:flex; flex-direction:column; gap: 14px; }
.row{ display:flex; gap: 14px; align-items:center; }
.row-wrap{ display:flex; gap:14px; flex-wrap: wrap; align-items:center; }
.spacer{ flex: 1 1 auto; }

.mt-1{ margin-top: 8px; }
.mt-2{ margin-top: 12px; }
.mt-3{ margin-top: 16px; }
.mt-4{ margin-top: 22px; }
.mb-1{ margin-bottom: 8px; }
.mb-2{ margin-bottom: 12px; }
.mb-3{ margin-bottom: 16px; }
.mb-4{ margin-bottom: 22px; }

.hide{ display:none !important; }
.muted{ color: var(--muted); }
.text-2{ color: var(--text-2); }
.small{ font-size: 0.92rem; }
.tiny{ font-size: 0.85rem; }

.hr{
  border:0;
  border-top: 1px solid var(--border);
  margin: 14px 0;
}

/* ---------- Top Bar / Header ---------- */
.topbar{
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar .inner{
  display:flex;
  align-items:center;
  gap: 14px;
  padding: 14px 0;
}
.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: .2px;
}
.brand .logo{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary);
  box-shadow: var(--shadow-sm);
}
.nav{
  display:flex;
  gap: 10px;
  align-items:center;
}
.nav a{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text-2);
}
.nav a:hover{
  background: var(--surface-2);
  color: var(--text);
  text-decoration:none;
}
.nav a.active{
  background: var(--primary-50);
  color: var(--primary-600);
}

/* ---------- Page ---------- */
.page{
  padding: 22px 0 46px;
}
.page-title{
  font-size: 1.55rem;
  font-weight: 850;
  margin: 0;
}
.page-subtitle{
  margin: 6px 0 0;
  color: var(--text-2);
}

/* ---------- Card ---------- */
.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow:hidden;
}

.card.allow-overflow{
  overflow: visible;
}
.card .card-hd{
  padding: var(--pad-4);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(0,0,0,0.00), rgba(0,0,0,0.01));
}
.card .card-bd{
  padding: var(--pad-4);
}
.card .card-ft{
  padding: var(--pad-4);
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.card-title{
  margin:0;
  font-size: 1.08rem;
  font-weight: 820;
}
.card-desc{
  margin: 6px 0 0;
  color: var(--text-2);
}

/* ---------- Grid ---------- */
.grid{
  display:grid;
  gap: 14px;
}
.grid.two{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px){
  .grid.two, .grid.three{ grid-template-columns: 1fr; }
}

/* ---------- Stepper (Onboarding) ---------- */
.stepper{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.step{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--text-2);
}
.step .dot{
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  display:grid;
  place-items:center;
  font-weight: 800;
  color: var(--muted);
}
.step.active{
  background: var(--primary-50);
  color: var(--primary-600);
}
.step.active .dot{
  border-color: rgba(37,99,235,0.35);
  background: var(--primary);
  color:#fff;
}
.step.done{
  background: rgba(22,163,74,0.08);
  color: var(--success);
}
.step.done .dot{
  border-color: rgba(22,163,74,0.35);
  background: var(--success);
  color:#fff;
}

/* ---------- Forms ---------- */
.form{
  display:flex;
  flex-direction:column;
  gap: 14px;
}
.field{
  display:flex;
  flex-direction:column;
  gap: 8px;
}
.label{
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}
.help{
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.input, select, textarea{
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  outline: none;
  box-shadow: 0 0 0 0 rgba(0,0,0,0);
  transition: box-shadow .12s ease, border-color .12s ease, transform .05s ease;
}
textarea{ min-height: 110px; resize: vertical; }
.input:focus, select:focus, textarea:focus{
  border-color: rgba(37,99,235,0.55);
  box-shadow: var(--ring);
}
.input[readonly], .input[disabled], select[disabled], textarea[disabled]{
  background: var(--surface-2);
  color: var(--text-2);
}
.prefill{
  background: var(--primary-50);
  border-color: rgba(37,99,235,0.25);
}
.inline{
  display:flex;
  gap: 12px;
  align-items:center;
  flex-wrap: wrap;
}
.checkbox{
  display:flex;
  align-items:center;
  gap: 10px;
  color: var(--text-2);
}
.checkbox input{ width: 18px; height: 18px; }

/* ---------- Validation / Messages ---------- */
.alert{
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 12px 12px;
  display:flex;
  gap: 12px;
  align-items:flex-start;
}
.alert .title{ font-weight: 800; margin:0; }
.alert .msg{ margin: 2px 0 0; color: var(--text-2); }

.alert.info{ background: var(--primary-50); border-color: rgba(37,99,235,0.25); }
.alert.success{ background: var(--success-50); border-color: rgba(22,163,74,0.25); }
.alert.warning{ background: var(--warning-50); border-color: rgba(217,119,6,0.25); }
.alert.danger{ background: var(--danger-50); border-color: rgba(220,38,38,0.25); }

.error-text{ color: var(--danger); font-size: 0.9rem; margin-top: 4px; }

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: .2px;
  user-select:none;
  transition: transform .05s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
}
.btn:active{ transform: translateY(1px); }
.btn[disabled]{ opacity: .55; cursor: not-allowed; }

.btn-primary{
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover{
  background: var(--primary-600);
  text-decoration:none;
}
.btn-secondary{
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover{
  background: var(--surface-2);
  text-decoration:none;
}
.btn-ghost{
  background: transparent;
  color: var(--text-2);
  border-color: transparent;
}
.btn-ghost:hover{
  background: var(--surface-2);
  color: var(--text);
  text-decoration:none;
}
.btn-danger{
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover{
  filter: brightness(0.95);
  text-decoration:none;
}
.btn-sm{ padding: 10px 12px; border-radius: 12px; font-weight: 800; }
.btn-lg{ padding: 14px 16px; border-radius: 16px; }

/* ---------- Table ---------- */
.table{
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow:hidden;
  background: #fff;
}
.table th, .table td{
  padding: 12px 12px;
  border-bottom: 1px solid var(--border);
  text-align:left;
  vertical-align: top;
}
.table th{
  background: var(--surface-2);
  color: var(--text);
  font-weight: 850;
  font-size: 0.95rem;
}
.table tr:last-child td{ border-bottom: 0; }
.table tr:hover td{ background: rgba(37,99,235,0.03); }

/* ---------- Upload / Dropzone ---------- */
.dropzone{
  border: 1px dashed rgba(16,24,40,.22);
  border-radius: 16px;
  background: #fff;
  padding: 16px;
  display:flex;
  flex-direction:column;
  gap: 8px;
}
.dropzone:hover{
  background: var(--surface-2);
}
.thumb{
  width: 84px;
  height: 84px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display:grid;
  place-items:center;
  overflow:hidden;
}

/* ---------- Footer ---------- */
.footer{
  color: var(--muted);
  font-size: .9rem;
  padding: 18px 0 26px;
}

/* ---------- Utility: page hero ---------- */
.hero{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  display:flex;
  align-items:flex-start;
  gap: 14px;
}
.hero .icon{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--primary-50);
  border: 1px solid rgba(37,99,235,0.25);
}
.hero h2{
  margin:0;
  font-size: 1.15rem;
  font-weight: 900;
}
.hero p{
  margin: 6px 0 0;
  color: var(--text-2);
}


/* ============================================================

/* ============================================================
   Compatibility layer for existing onboarding markup
   ============================================================ */

.grid{display:grid;gap:14px}
@media(min-width:900px){.grid{grid-template-columns:1.4fr .9fr}}

.row{display:flex;gap:12px;align-items:center}
.sep{border:0;border-top:1px solid var(--border);margin:14px 0}

.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
  padding:var(--pad-4)
}
.card.soft{background:var(--surface)}

.sub{margin:6px 0 0;color:var(--text-2)}
.small{font-size:.92rem;color:var(--muted)}
.help{color:var(--muted);font-size:.92rem}

.notice{
  display:flex;
  gap:12px;
  align-items:flex-start;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(37,99,235,.22);
  background:var(--primary-50)
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px 14px;
  border-radius:14px;
  font-weight:800;
  text-decoration:none
}
.btn.primary{background:var(--primary);color:#fff}
.btn.primary:hover{background:var(--primary-600)}
.btn.ghost{
  background:#fff;
  border:1px solid var(--border);
  color:var(--text)
}

.actions{
  display:flex;
  gap:12px;
  justify-content:flex-end;
  margin-top:16px;
  padding-top:12px;
  border-top:1px solid var(--border)
}


/* Header compat */
.topbar .inner{ display:flex; align-items:center; gap:14px; padding:14px 0; }
.topbar .pill{
  margin-left:auto;
  display:inline-flex;
  align-items:center;
  padding:8px 10px;
  border-radius:999px;
  background:var(--surface-2);
  border:1px solid var(--border);
  color:var(--text-2);
  font-weight:800;
  font-size:.86rem;
}
.brand img{ width:34px; height:34px; border-radius:10px; }
.brand .title span{ display:block; color:var(--muted); font-weight:700; font-size:.9rem; }


/* ============================================================
   Glass pass (stronger outlines + blur + better depth)
   ============================================================ */

:root{
  --glass-bg: rgba(255,255,255,.62);
  --glass-bg-strong: rgba(255,255,255,.74);
  --glass-border: rgba(15,23,42,.16);
  --glass-border-strong: rgba(15,23,42,.22);
  --glass-shadow: 0 18px 50px rgba(15,23,42,.10);
  --glass-shadow-sm: 0 6px 18px rgba(15,23,42,.08);
}

/* overall page */
body{
  background:
    radial-gradient(1200px 800px at 20% 10%, rgba(37,99,235,.10), transparent 60%),
    radial-gradient(900px 600px at 80% 0%, rgba(96,165,250,.12), transparent 55%),
    var(--bg);
}

/* glass surfaces */
.card, .hero, .stepper{
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow-sm);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* stronger “defined outline” for primary containers */
.card{
  box-shadow: var(--glass-shadow);
  border-color: var(--glass-border-strong);
}

/* topbar glass */
.topbar{
  background: rgba(255,255,255,.70);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* make buttons pop against glass */
.btn.primary{
  box-shadow: 0 12px 26px rgba(37,99,235,.18);
}
.btn.ghost{
  background: rgba(255,255,255,.72);
  border-color: var(--glass-border);
}

/* inputs */
input, select, textarea{
  background: rgba(255,255,255,.72);
  border-color: rgba(15,23,42,.16);
}

/* notices slightly more “outlined” */
.notice{
  background: rgba(239,246,255,.65);
  border-color: rgba(37,99,235,.24);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Glass edge highlight (more definition) */
.card, .hero, .stepper{
  position: relative;
}
.card:before, .hero:before, .stepper:before{
  content:"";
  position:absolute;
  inset:0;
  border-radius: inherit;
  pointer-events:none;
  border: 1px solid rgba(255,255,255,.55);
  mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  padding: 1px;
  opacity: .65;
}


/* Header logo polish */
.brand img{
  width:40px;
  height:40px;
  border-radius:12px;
  background: rgba(255,255,255,.55);
  border:1px solid rgba(15,23,42,.14);
  box-shadow: 0 8px 18px rgba(15,23,42,.08);
  padding:6px;
}

/* Force logo visibility */
.brand{ display:flex; align-items:center; gap:12px; }
.brand img{ display:block; width:40px; height:40px; opacity:1; visibility:visible; }

/* --- final brand/logo rule (wins last) --- */
.topbar-inner{ display:flex; align-items:center; justify-content:space-between; gap:14px; }
.brand{ display:flex; align-items:center; gap:12px; }
.brand img{ display:block; width:40px; height:40px; opacity:1; visibility:visible; }

/* Align CSS with header.php structure */
.topbar-inner{ display:flex; align-items:center; justify-content:space-between; gap:14px; }

.brand{ display:flex; align-items:center; gap:12px; }
.brand img{ display:block; width:40px; height:40px; opacity:1; visibility:visible; }

/* =========================
   ProSports Global Header
   ========================= */
.ps-header {
  background: #ffffff;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.ps-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
}

.ps-logo {
  height: 36px;
  width: auto;
  display: block;
}

.ps-logo-link {
  display: inline-flex;
  align-items: center;
}

/* ===== ProSports Onboarding: Review contrast + multi-contact UI ===== */
.review-card{
  background:#ffffff;
  color:#0b1220;
  border:1px solid rgba(20,40,80,0.18);
  box-shadow: 0 10px 28px rgba(0,0,0,0.08);
}
.review-card h2, .review-card h3, .review-card strong{ color:#0b1220; }
.review-card .sub{ color: rgba(11,18,32,0.72); }

.review-kv{
  display:grid;
  grid-template-columns: 160px 1fr;
  gap:10px;
  padding:10px 0;
  border-bottom:1px solid rgba(20,40,80,0.12);
}
.review-kv:last-child{ border-bottom:none; }

.contact-card{
  border:1px solid rgba(20,40,80,0.18);
  border-radius: 16px;
  padding:14px;
  background: rgba(255,255,255,0.02);
}

.role-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 10px;
  border:1px solid var(--border);
  border-radius: 999px;
  user-select:none;
  background: rgba(255,255,255,0.02);
}
.role-pill input{ transform: translateY(1px); }

.role-grid{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:10px;
}
.small-help{ font-size: 13px; opacity: 0.75; margin-top: 6px; }

/* ===== Branding / Assets upload readability fix ===== */
.asset-card,
.asset-upload,
.upload-box,
.dropzone {
  color: #0b1220 !important;
}

.asset-card label,
.asset-upload label,
.upload-box label {
  color: #0b1220 !important;
  font-weight: 600;
}

.asset-card .sub,
.asset-upload .sub,
.upload-box .sub {
  color: rgba(11,18,32,0.75) !important;
}

/* ===== Branding tiles (upload boxes) readability ===== */
.tile,
.tile *{
  color:#0b1220 !important;
}
.tile .mini{
  color: rgba(11,18,32,0.72) !important;
  font-weight: 600;
}
.tile input[type="file"]{
  color:#0b1220 !important;
}
