/* TriniBuyAndSell.COM - Final Polish UI (landing + auth)
   Safe: namespaced under .tbsp-*
*/
:root{
  --tbsp-bg1:#0b1220;
  --tbsp-bg2:#0f1b35;
  --tbsp-surface:rgba(255,255,255,0.08);
  --tbsp-surface2:rgba(255,255,255,0.12);
  --tbsp-border:rgba(255,255,255,0.16);
  --tbsp-text:#e5e7eb;
  --tbsp-muted:rgba(229,231,235,0.72);
  --tbsp-primary:#60a5fa;
  --tbsp-primary2:#a78bfa;
  --tbsp-danger:#fb7185;
  --tbsp-success:#34d399;
  --tbsp-shadow: 0 20px 60px rgba(0,0,0,0.40);
  --tbsp-radius: 18px;
}

.tbsp-page{
  min-height:100vh;
  background:
    radial-gradient(900px 600px at 20% 10%, rgba(96,165,250,0.25), transparent 60%),
    radial-gradient(900px 600px at 80% 20%, rgba(167,139,250,0.22), transparent 60%),
    linear-gradient(180deg, var(--tbsp-bg1), var(--tbsp-bg2));
  color: var(--tbsp-text);
}
.tbsp-wrap{ max-width: 1120px; margin: 0 auto; padding: 22px 16px 64px; }

.tbsp-topnav{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding: 10px 14px;
  border:1px solid var(--tbsp-border);
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.tbsp-brand{
  display:flex; align-items:center; gap:10px; text-decoration:none; color: var(--tbsp-text);
  font-weight:800; letter-spacing:0.02em;
}
.tbsp-dot{
  width:12px; height:12px; border-radius:999px;
  background: linear-gradient(135deg, var(--tbsp-primary), var(--tbsp-primary2));
  box-shadow: 0 0 0 5px rgba(96,165,250,0.10);
}
.tbsp-navlinks{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; justify-content:flex-end; }
.tbsp-link{
  color: var(--tbsp-muted);
  text-decoration:none;
  padding: 8px 10px;
  border-radius: 999px;
  border:1px solid transparent;
}
.tbsp-link:hover{ color: var(--tbsp-text); border-color: rgba(255,255,255,0.14); background: rgba(255,255,255,0.06); }

.tbsp-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  border-radius: 999px;
  padding: 10px 14px;
  text-decoration:none;
  font-weight:700;
  border:1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: var(--tbsp-text);
}
.tbsp-btn:hover{ background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.22); }
.tbsp-btn-primary{
  border: 0;
  background: linear-gradient(135deg, var(--tbsp-primary), var(--tbsp-primary2));
  color:#07101f;
}
.tbsp-btn-primary:hover{ filter: brightness(1.04); }
.tbsp-btn-ghost{ background: transparent; }

.tbsp-hero{
  display:grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  margin-top: 18px;
  align-items: stretch;
}
.tbsp-heroCard{
  border-radius: var(--tbsp-radius);
  border: 1px solid var(--tbsp-border);
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  box-shadow: var(--tbsp-shadow);
  padding: 26px 22px;
}
.tbsp-hero h1{
  font-size: clamp(1.75rem, 2.4vw, 2.4rem);
  margin:0;
  line-height:1.15;
}
.tbsp-hero p{ margin-top:10px; color: var(--tbsp-muted); font-size: 1.02rem; }
.tbsp-kpis{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.tbsp-kpi{
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.16);
  padding: 10px 12px;
}
.tbsp-kpi b{ display:block; font-size: 1.05rem; }
.tbsp-kpi span{ color: var(--tbsp-muted); font-size: .9rem; }

.tbsp-panelTitle{ font-weight:800; margin:0 0 10px; }
.tbsp-formLabel{ display:block; margin: 12px 0 6px; font-weight:700; color: rgba(229,231,235,0.90); }
.tbsp-input{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(0,0,0,0.18);
  color: var(--tbsp-text);
  outline:none;
}
.tbsp-input:focus{
  border-color: rgba(96,165,250,0.55);
  box-shadow: 0 0 0 4px rgba(96,165,250,0.14);
}
.tbsp-help{ color: var(--tbsp-muted); font-size: 0.92rem; margin-top: 8px; }

.tbsp-alert{
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  padding: 12px 12px;
  margin-top: 12px;
  background: rgba(255,255,255,0.06);
}
.tbsp-alert.error{ border-color: rgba(251,113,133,0.45); background: rgba(251,113,133,0.12); }
.tbsp-alert.success{ border-color: rgba(52,211,153,0.45); background: rgba(52,211,153,0.12); }
.tbsp-alert.info{ border-color: rgba(96,165,250,0.45); background: rgba(96,165,250,0.12); }

.tbsp-stores{ margin-top: 22px; }
.tbsp-storesHeader{
  display:flex; justify-content:space-between; align-items:flex-end; gap: 14px; flex-wrap:wrap;
  margin-bottom: 12px;
}
.tbsp-storesHeader h2{ margin:0; font-size: 1.2rem; }
.tbsp-storesHeader p{ margin:0; color: var(--tbsp-muted); }

.tbsp-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.tbsp-card{
  border-radius: 18px;
  overflow:hidden;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.tbsp-card:hover{ transform: translateY(-2px); border-color: rgba(255,255,255,0.22); background: rgba(255,255,255,0.08); }
.tbsp-card img{ width:100%; height: 160px; object-fit: cover; display:block; }
.tbsp-cardBody{ padding: 12px 12px 14px; }
.tbsp-cardTitle{ font-weight: 850; margin: 0; font-size: 1.05rem; }
.tbsp-cardSub{ margin-top: 6px; color: var(--tbsp-muted); font-size: 0.92rem; }
.tbsp-cardMeta{ margin-top: 10px; display:flex; justify-content:space-between; align-items:center; gap:10px; }
.tbsp-chip{
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.16);
  color: rgba(229,231,235,0.86);
  font-size: 0.84rem;
}

.tbsp-auth{
  max-width: 520px;
  margin: 26px auto 0;
}
.tbsp-auth .tbsp-heroCard{ padding: 22px 20px; }

.tbsp-footer{
  margin-top: 34px;
  text-align:center;
  color: rgba(229,231,235,0.52);
  font-size: 0.9rem;
}

@media (max-width: 980px){
  .tbsp-hero{ grid-template-columns: 1fr; }
  .tbsp-kpis{ grid-template-columns: repeat(3, 1fr); }
  .tbsp-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .tbsp-grid{ grid-template-columns: 1fr; }
  .tbsp-topnav{ border-radius: 18px; }
  .tbsp-navlinks{ justify-content:flex-start; }
}

.tbsp-formGrid{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
@media (max-width: 720px){.tbsp-formGrid{grid-template-columns:1fr;}}

/* ===== Dashboard + Admin Shell ===== */

.tbsp-shell{
  display:grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 980px){
  .tbsp-shell{ grid-template-columns: 1fr; }
}

.tbsp-sidebar{
  position: sticky;
  top: 18px;
  border:1px solid var(--tbsp-border);
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  border-radius: var(--tbsp-radius);
  box-shadow: var(--tbsp-shadow);
  padding: 14px;
}
.tbsp-sidebrand{ display:flex; gap:12px; align-items:center; padding: 8px 8px 14px; border-bottom:1px solid var(--tbsp-border); margin-bottom: 12px;}
.tbsp-sidebrand__logo{
  width:42px;height:42px;border-radius: 14px;
  background: linear-gradient(135deg, rgba(96,165,250,0.9), rgba(167,139,250,0.85));
  display:flex;align-items:center;justify-content:center;
  font-weight:800; letter-spacing:0.5px;
}
.tbsp-sidebrand__name{ font-weight:800; }
.tbsp-sidebrand__sub{ font-size: 12px; color: var(--tbsp-muted); margin-top:2px; }

.tbsp-sidenav{ display:flex; flex-direction:column; gap:6px; padding: 6px 2px 10px; }
.tbsp-sidenav__item{
  display:flex; align-items:center; gap:10px;
  padding: 10px 10px;
  border-radius: 14px;
  text-decoration:none;
  color: var(--tbsp-text);
  border: 1px solid transparent;
}
.tbsp-sidenav__dot{
  width:10px;height:10px;border-radius:999px;
  border:1px solid var(--tbsp-border);
  background: rgba(255,255,255,0.04);
}
.tbsp-sidenav__item:hover{
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.10);
}
.tbsp-sidenav__item.is-active{
  background: rgba(96,165,250,0.14);
  border-color: rgba(96,165,250,0.30);
}
.tbsp-sidenav__item.is-active .tbsp-sidenav__dot{
  background: rgba(96,165,250,0.75);
  border-color: rgba(96,165,250,0.55);
}

.tbsp-sidefoot{ border-top:1px solid var(--tbsp-border); padding-top: 12px; margin-top: 10px; }
.tbsp-sidefoot__user{ display:flex; align-items:center; gap:10px; padding: 6px 6px 10px; }
.tbsp-avatar{
  width:36px;height:36px;border-radius: 14px;
  background: rgba(255,255,255,0.10);
  border:1px solid var(--tbsp-border);
  display:flex;align-items:center;justify-content:center;
  font-weight:800;
}
.tbsp-sidefoot__email{ font-size: 13px; font-weight: 700; }
.tbsp-sidefoot__role{ font-size: 12px; color: var(--tbsp-muted); }
.tbsp-sidefoot__actions{ display:flex; gap:10px; padding: 6px; }

.tbsp-main{
  border:1px solid var(--tbsp-border);
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  border-radius: var(--tbsp-radius);
  box-shadow: var(--tbsp-shadow);
  overflow:hidden;
}
.tbsp-topbar{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding: 14px 16px;
  border-bottom:1px solid var(--tbsp-border);
  background: rgba(255,255,255,0.04);
}
.tbsp-topbar__title{ font-size: 16px; font-weight: 800; letter-spacing: 0.2px; }
.tbsp-topbar__right{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.tbsp-pill{
  display:inline-flex; align-items:center;
  padding: 6px 10px;
  border-radius: 999px;

  /* Force readable store badge (top-right) */
  background: rgba(0,0,0,0.45) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.28) !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.35);
  font-size: 12px;
}
.tbsp-content{ padding: 16px; }

/* Cards / tables inside shells */
.tbsp-card{
  border:1px solid var(--tbsp-border);
  background: rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 14px;
}
.tbsp-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.tbsp-kpi{ font-size: 26px; font-weight: 900; margin: 6px 0 2px; }
.tbsp-muted{ color: var(--tbsp-muted); }
.tbsp-table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 14px;
}
.tbsp-table th, .tbsp-table td{
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.tbsp-table th{ text-align:left; font-size: 12px; color: var(--tbsp-muted); font-weight: 800; }
.tbsp-table tr:hover td{ background: rgba(255,255,255,0.04); }

/* Make existing inputs/buttons look premium even if page still uses old markup */
.tbsp-page input[type="text"],
.tbsp-page input[type="email"],
.tbsp-page input[type="password"],
.tbsp-page input[type="number"],
.tbsp-page select,
.tbsp-page textarea{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--tbsp-text);
  border-radius: 14px;
  padding: 10px 12px;
}
.tbsp-page input::placeholder, .tbsp-page textarea::placeholder{ color: rgba(229,231,235,0.55); }
.tbsp-page select option{ color:#111; }

/* Legacy admin classes (mapped to polish) */
.tbsp-page .admin-header{ display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom: 14px; }
.tbsp-page .admin-badges{ display:flex; gap:10px; flex-wrap:wrap; }
.tbsp-page .admin-badge{
  display:inline-flex; align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  border:1px solid var(--tbsp-border);
  background: rgba(255,255,255,0.06);
  color: var(--tbsp-text);
  font-size: 12px;
}
.tbsp-page .admin-grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 14px; }
.tbsp-page .admin-card{
  border:1px solid var(--tbsp-border);
  background: rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 14px;
}
.tbsp-page .admin-card .number{ font-size: 28px; font-weight: 900; }
.tbsp-page table{ width:100%; border-collapse: collapse; }
.tbsp-page th, .tbsp-page td{ padding: 10px 10px; border-bottom: 1px solid rgba(255,255,255,0.10); }
.tbsp-page th{ color: var(--tbsp-muted); font-size: 12px; text-transform: none; }

/* --- Admin empty-state links: ensure readable on dark cards --- */
.admin-card a,
.admin-card a:visited,
.admin-header a,
.admin-header a:visited,
.admin-grid a,
.admin-grid a:visited {
  color: rgba(255,255,255,0.92);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Make outline buttons readable on dark admin backgrounds */
a.btn.btn-outline,
button.btn.btn-outline {
  color: #fff !important;
  border-color: rgba(255,255,255,0.35) !important;
  background: rgba(0,0,0,0.25) !important;
}
a.btn.btn-outline:hover,
button.btn.btn-outline:hover {
  background: rgba(255,255,255,0.12) !important;
}

/* ==========================================================
   ✅ STOREFRONT PREMIUM BRIDGE (for store.php / styles.css)
   This makes the store header/nav look Shopify-glass
   without breaking admin/landing (scoped to .storefront-premium).
   ========================================================== */

.storefront-premium .tbsp-wrap{
  max-width: 1180px;
  padding: 18px 16px 56px;
}

.storefront-premium .container{
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header shell */
.storefront-premium .site-header{
  position: sticky;
  top: 0;
  z-index: 40;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(6,10,22,0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  border-radius: 16px;
  margin: 12px auto 0;
}
.storefront-premium .header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 10px 12px;
}

/* Brand */
.storefront-premium .logo a{
  display:inline-flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  font-weight: 900;
  letter-spacing: .02em;
  color: #fff;
}
.storefront-premium .logo a::before{
  content:"";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--tbsp-primary), var(--tbsp-primary2));
  box-shadow: 0 0 0 5px rgba(96,165,250,0.10);
}

/* Nav links */
.storefront-premium .main-nav{
  display:flex;
  gap: 8px;
  align-items:center;
  flex-wrap:wrap;
}
.storefront-premium .main-nav a{
  text-decoration:none;
  color: rgba(255,255,255,0.86);
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  font-weight: 800;
  font-size: 0.92rem;
}
.storefront-premium .main-nav a:hover{
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
}
.storefront-premium .main-nav a.active{
  background: rgba(96,165,250,0.16);
  border-color: rgba(96,165,250,0.30);
}

/* Header actions button harmonize (your .btn exists in styles.css) */
.storefront-premium .header-actions .btn{
  border-radius: 999px;
  font-weight: 900;
}
.storefront-premium .header-actions .btn.btn-outline{
  background: rgba(0,0,0,0.22) !important;
}

/* Mobile menu toggle */
.storefront-premium .menu-toggle{
  display:none;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 900;
}

/* Mobile nav collapse using your existing "nav-open" toggle */
@media (max-width: 860px){
  .storefront-premium .menu-toggle{ display:inline-flex; align-items:center; justify-content:center; }
  .storefront-premium .main-nav{
    display:none;
    width: 100%;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.10);
  }
  .storefront-premium .main-nav.nav-open{
    display:flex;
  }
  .storefront-premium .header-inner{
    flex-wrap:wrap;
  }
}

/* Category chips: make them premium on dark backgrounds */
.storefront-premium .category-chip{
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.92);
  font-weight: 800;
}
.storefront-premium .category-chip:hover{
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.18);
}

/* If any legacy page uses "btn-outline" without enough contrast */
.storefront-premium a.btn.btn-outline,
.storefront-premium button.btn.btn-outline{
  color:#fff !important;
}

/* Footer look */
.storefront-premium .tbsp-footer{
  opacity: .9;
}
