/* =========================
   SmartPay360 — SaaS UI PRO
   COMPATIBLE WITH app_shell.php (container-xl / grid)
   Edge-to-edge + all devices
   ========================= */

:root{
  --bg0:#0b1220;
  --bg1:#0b1b33;

  --glass: rgba(255,255,255,.08);
  --glass2: rgba(255,255,255,.06);
  --stroke: rgba(255,255,255,.14);

  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.65);

  --accent: #ffcf4d;
  --accent2:#ffa34d;
  --brand: #3ea3ff;
  --brand2:#5ad2ff;

  --shadow: 0 18px 55px rgba(0,0,0,.35);
  --shadow2: 0 10px 28px rgba(0,0,0,.28);

  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 14px;

  --ring: 0 0 0 .25rem rgba(62,163,255,.18);

  --topbar-h: 64px;
  --gutter: clamp(12px, 2.2vw, 28px);
}

/* ---------- Base ---------- */
*{ box-sizing:border-box }
html,body{ height:100% }
body{
  margin:0;
  color:var(--text);
  background:
    radial-gradient(1000px 520px at 10% 5%, rgba(62,163,255,.26), transparent 60%),
    radial-gradient(900px 420px at 92% 0%, rgba(255,207,77,.18), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow-x:hidden;
}

a{ color:inherit }
code{
  background:rgba(255,255,255,.08);
  padding:.15rem .35rem;
  border-radius:.4rem
}

/* Premium texture */
body:before{
  content:"";
  position:fixed; inset:0;
  pointer-events:none;
  opacity:.10;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  mix-blend-mode:overlay;
}

/* ---------- Bootstrap container overrides (edge-to-edge like your app_shell) ---------- */
.container, .container-sm, .container-md, .container-lg, .container-xl, .container-xxl, .container-fluid{
  max-width: 100% !important;
}
.container-xl{
  width:100% !important;
  padding-left: var(--gutter) !important;
  padding-right: var(--gutter) !important;
}

/* ---------- Topbar (matches your .topbar markup) ---------- */
.topbar{
  position: sticky;
  top: 0;
  z-index: 60;
  min-height: var(--topbar-h);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: linear-gradient(90deg, rgba(18,28,51,.80), rgba(10,18,32,.58));
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-badge{
  display:inline-flex;
  align-items:center;
  gap:.55rem;
  font-weight: 950;
  letter-spacing: .2px;
  padding:.48rem .80rem;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 10px 30px rgba(0,0,0,.22);
}

.brand-dot{
  width:12px; height:12px;
  border-radius:50%;
  background: radial-gradient(circle at 30% 30%, #fff, var(--accent));
  box-shadow: 0 0 0 6px rgba(255,207,77,.10);
}

/* ---------- Glass cards ---------- */
.glass{
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow2);
}

/* Sidebar specifically (you use .glass.sidebar) */
.glass.sidebar{
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.06));
}

/* Sticky sidebar on desktop (works with your column layout) */
@media (min-width: 992px){
  .sidebar{
    position: sticky;
    top: calc(var(--topbar-h) + 14px);
  }
}

/* ---------- Navigation pills (you use <a class="nav-pill">...) ---------- */
.nav-pill{
  display:flex;
  align-items:center;
  gap: .65rem;
  padding: .72rem .80rem;
  border-radius: 14px;
  text-decoration:none;
  color: rgba(255,255,255,.88);
  border: 1px solid transparent;
  margin-bottom: .42rem;
  background: transparent;
  transition: transform .08s ease, background .12s ease, border-color .12s ease;
}

.nav-pill:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.08);
  transform: translateY(-1px);
}

.nav-pill.active{
  background: linear-gradient(135deg, rgba(255,207,77,.14), rgba(62,163,255,.12));
  border-color: rgba(255,207,77,.26);
  color: rgba(255,255,255,.98);
}

/* ---------- Badges (you use .badge-soft) ---------- */
.badge-soft{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  padding:.30rem .58rem;
  border-radius:999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.88);
  font-size: .78rem;
}

.badge-soft:before{
  content:"";
  width:7px; height:7px;
  border-radius:50%;
  background: rgba(255,255,255,.45);
}

/* ---------- Buttons ---------- */
.btn-accent{
  background: linear-gradient(135deg, var(--accent), var(--accent2)) !important;
  border: 0 !important;
  color: #151515 !important;
  font-weight: 950 !important;
}
.btn-accent:hover{ filter: brightness(1.03); }

.btn-brand{
  background: linear-gradient(135deg, var(--brand), var(--brand2)) !important;
  border: 0 !important;
  color: #07111f !important;
  font-weight: 950 !important;
}
.btn-brand:hover{ filter: brightness(1.03); }

/* ---------- Forms ---------- */
.form-control,.form-select{
  background: rgba(255,255,255,.07) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  color: var(--text) !important;
}
.form-control::placeholder{ color: rgba(255,255,255,.55); }
.form-control:focus,.form-select:focus{
  box-shadow: var(--ring) !important;
  border-color: rgba(62,163,255,.55) !important;
}

/* ---------- Tables ---------- */
.table{
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(255,255,255,.05);
  --bs-table-hover-bg: rgba(255,255,255,.06);
}
.table thead th{
  font-size: .78rem;
  color: rgba(255,255,255,.70) !important;
  letter-spacing: .02em;
  border-bottom: 1px solid rgba(255,255,255,.10) !important;
}
.table td{
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
}

/* ---------- Page title helper (optional) ---------- */
.page-title{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin-bottom: 14px;
}
.page-title .sub{
  color: rgba(255,255,255,.60);
  font-size:.92rem;
}

/* ---------- Mobile fixes (this is where most “not showing” issues happen) ---------- */
@media (max-width: 991.98px){
  /* Force sidebar to look SOLID readable on phones */
  .glass.sidebar{
    background: rgba(10, 14, 24, 0.94) !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    box-shadow: 0 10px 34px rgba(0,0,0,.40) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Big tap targets */
  .nav-pill{
    padding: 12px 12px !important;
    border-radius: 14px;
  }

  /* Topbar buttons less cramped */
  .topbar .btn{
    padding: .45rem .55rem !important;
  }
}

/* ---------- Modals (Bootstrap) ---------- */
.modal-backdrop.show{ opacity: .74; }
.modal-content{
  background: rgba(12,12,14,.96) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  border-radius: 18px !important;
  box-shadow: 0 30px 90px rgba(0,0,0,.75) !important;
}
.modal-header{
  border-bottom: 1px solid rgba(255,255,255,.10) !important;
}
.btn-close{
  filter: invert(1);
  opacity: .9;
}

/* ---------- Print ---------- */
.print-wrap{
  max-width:920px;
  margin:24px auto;
  padding:20px;
  background:#fff;
  color:#111;
  border-radius:12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
}
.print-wrap hr{border:0; border-top:1px solid rgba(0,0,0,.12); margin:16px 0}
.print-wrap table{width:100%; border-collapse:collapse; font-size:14px}
.print-wrap th,.print-wrap td{padding:10px 8px; border-bottom:1px solid rgba(0,0,0,.1)}
.print-wrap thead th{background:rgba(0,0,0,.03)}
.print-wrap .muted{color:rgba(0,0,0,.65); font-size:13px}

@media print{
  body{ background:#fff }
  .topbar,.sidebar{ display:none !important }
  .container-xl{ padding:0 !important }
  .print-wrap{ box-shadow:none; margin:0; border-radius:0 }
}
