/*
  GymSystem - Clean UI Theme
  Notes:
  - We keep the background image set inline in _Layout.cshtml (from Settings).
  - This CSS uses a subtle dark overlay (configurable) so the background stays visible.
  - Colors are defined as CSS variables for easy tweaking.
*/

:root{
  /* Pro Gym theme: Dark base + Neon Green accent */
  --bg: #070a0f;

  /* Dark glass surfaces so content stays readable and not "washed out" */
  --surface: rgba(0,0,0,.38);
  --surface-2: rgba(0,0,0,.48);
  --border: rgba(255,255,255,.14);

  --text: #f3f7ff;
  --muted: rgba(243,247,255,.78);

  /* Accent palette */
  --accent: #22c55e;   /* neon green */
  --accent-2: #06b6d4; /* cyan */

  /* background overlay (0 = transparent, 1 = fully black) */
  /* Darken slightly (less "washed out" than white overlays) */
  /* Keep background image vivid by default */
  /* Slightly darker overlay keeps the background visible without washing UI */
  /* lower overlay so chosen background image stays clear */
  /* Default overlay: keep contrast but let the image stay clear */
  /* overlay: keep the background visible but ensure contrast */
  --bg-overlay-opacity: .28;
}

/*
  Adaptive readability
  -------------------
  Default palette is DARK (above).
  When the background image is detected as "light", JS sets:
    <body data-bg-tone="light">
  and we switch variables to a LIGHT surface palette.
*/
body[data-bg-tone="light"]{
  --bg: #f6f7fb;
  --surface: rgba(255,255,255,.78);
  --surface-2: rgba(255,255,255,.88);
  --border: rgba(0,0,0,.12);
  --text: #0b1220;
  --muted: rgba(11,18,32,.72);
  --bg-overlay-opacity: .06;
}

html, body {
  height: 100%;
}



body{
  background-color: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* App background wrapper (see _Layout.cshtml: <body class="app-body">) */
.app-body{
  min-height: 100vh;
  /* When no custom background image is set, we still show a professional
     gym-themed dark background with subtle neon highlights. */
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 540px at 85% -10%, rgba(16,185,129,.22), transparent 60%),
    radial-gradient(780px 520px at 15% 10%, rgba(34,211,238,.16), transparent 55%),
    linear-gradient(180deg, rgba(0,0,0,.20), rgba(0,0,0,.55));
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}

.app-body::before{
  content: "";
  position: absolute;
  inset: 0;
  /* dark overlay so text stays readable, without washing the image out */
  background: rgba(0,0,0,var(--bg-overlay-opacity));
  pointer-events: none;
  z-index: 0;
}

/* Keep page content above overlay */
.app-body > *{ position: relative; z-index: 1; }

/* Links */
a{ color: var(--text); text-decoration: none; }
a:hover{ color: white; text-decoration: underline; }

/* Layout containers */
.container, .container-fluid{
  padding-top: 18px;
  padding-bottom: 24px;
}

/* Cards / panels */
.card, .panel, .box, .content-box{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
}

/* Dashboard KPI cards (Home/Index) - make numbers/icons clearly visible */
.card-kpi{
  /* darker surface -> higher contrast with text/icons */
  background: linear-gradient(180deg, rgba(0,0,0,.38), rgba(0,0,0,.28));
  border: 1px solid rgba(16,185,129,.28);
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
}
.card-kpi .text-muted{ color: rgba(255,255,255,.82) !important; }
.card-kpi i.text-muted{ color: rgba(255,255,255,.7) !important; }

.card-header, .panel-heading{
  background: transparent;
  border-bottom: 1px solid var(--border);
}

/* Tables */
table{ color: var(--text); }
.table{
  --bs-table-color: var(--text);
  --bs-table-striped-color: var(--text);
  --bs-table-hover-color: var(--text);
  --bs-table-bg: transparent;
}
.table thead th{
  color: var(--muted);
  border-bottom-color: var(--border);
}
.table td, .table th{
  border-top-color: var(--border);
}
.table-hover tbody tr:hover{
  background: rgba(255,255,255,.05);
}

/* Forms */
label{ color: var(--muted); }
.form-control, .form-select{
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
}
.form-control:focus, .form-select:focus{
  outline: none;
  box-shadow: 0 0 0 .2rem rgba(79,140,255,.25);
  border-color: rgba(79,140,255,.55);
  background: rgba(255,255,255,.08);
  color: var(--text);
}

/* Buttons */
.btn{
  border-radius: 12px;
  border: 1px solid var(--border);
}

.btn-primary{
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 0;
}
.btn-primary:hover{ filter: brightness(1.05); }

.btn-outline-primary{
  color: var(--text);
  border-color: rgba(79,140,255,.55);
}
.btn-outline-primary:hover{
  background: rgba(79,140,255,.15);
  color: white;
}

.btn-danger{
  background: linear-gradient(135deg, #ef4444, #fb7185);
  border: 0;
}

/* Badges */
.badge{
  border-radius: 999px;
  padding: .4rem .65rem;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.07);
  color: var(--text);
}

/* Navbar (Bootstrap) */
.navbar{
  background: rgba(0,0,0,.35) !important;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.navbar .navbar-brand, .navbar .nav-link{ color: var(--text) !important; }
.navbar .nav-link:hover{ color: white !important; }

/* Sidebar / menu blocks */
.sidebar, .side-nav, .app-sidebar{
  background: linear-gradient(180deg, rgba(8,14,28,.96), rgba(10,18,34,.92));
  border-left: 1px solid rgba(148,163,184,.14);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.app-sidebar{
  width: 196px;
  flex: 0 0 196px;
  margin: 12px 12px 12px 0;
  border-radius: 24px;
  box-shadow: 0 18px 42px rgba(0,0,0,.38);
  overflow: hidden;
  padding-top: 1rem !important;
}

.app-sidebar .text-muted{
  color: rgba(191,219,254,.56) !important;
  letter-spacing: .02em;
  font-size: .76rem !important;
  font-weight: 800;
  margin-top: .6rem;
  margin-bottom: .2rem;
}

.app-sidebar .nav-link{
  color: rgba(226,232,240,.82) !important;
  border-radius: 16px;
  padding: .74rem .82rem;
  margin: .18rem 0;
  font-size: .96rem;
  display:flex;
  align-items:center;
  gap:.7rem;
  min-height: 46px;
  transition: background .18s ease, border-color .18s ease, transform .18s ease, color .18s ease;
  border: 1px solid transparent;
}

.app-sidebar .nav-link i{
  opacity: .96;
  font-size: 1rem;
  width: 1.1rem;
  text-align:center;
}

.app-sidebar .nav-link:hover{
  color: #fff !important;
  background: rgba(255,255,255,.055);
  border-color: rgba(148,163,184,.14);
  transform: translateX(-1px);
}

.app-sidebar .nav-link.active{
  color: #fff !important;
  background: linear-gradient(135deg, rgba(37,99,235,.28), rgba(59,130,246,.18));
  border: 1px solid rgba(96,165,250,.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 10px 24px rgba(30,64,175,.16);
}

.app-sidebar .sidebar-header{
  padding: 1rem 1rem .5rem;
}

/* Alerts */
.alert{
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.07);
  color: var(--text);
}

/* Fix common "washed" look for background images: allow user to increase visibility */
.bg-more-visible{ --bg-overlay-opacity: .04; }
.bg-more-dark{ --bg-overlay-opacity: .18; }

/* Login page helper: center nicely if it uses plain bootstrap container */
.auth-wrap{
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===============================
   Extra readability overrides
   =============================== */

/* Bootstrap defaults are designed for light backgrounds */
.text-muted{ color: var(--muted) !important; }

/* Placeholders were too dim */
.form-control::placeholder,
.form-control::-webkit-input-placeholder,
.form-control::-moz-placeholder{
  color: color-mix(in srgb, var(--text) 55%, transparent) !important;
}

/* Make KPI numbers and important values always readable */
.card-kpi .kpi-number,
.card-kpi .display-6,
.card-kpi .h2,
.card-kpi .h3{ color: #fff !important; font-weight: 800; text-shadow: 0 2px 10px rgba(0,0,0,.55); }

/* Slightly stronger card borders for better visibility */
.card, .card-kpi{
  border-color: var(--border) !important;
}

/* Tables: ensure numbers/text are not gray */
.table td, .table th{ color: color-mix(in srgb, var(--text) 92%, transparent); }
.table td.text-muted, .table th.text-muted{ color: var(--muted) !important; }

/* Inputs: higher contrast everywhere (Members search, CheckIn, Reports filters) */
.form-control, .form-select{
  background: color-mix(in srgb, var(--surface-2) 55%, transparent) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}
.form-control:focus, .form-select:focus{
  border-color: rgba(16,185,129,.65) !important;
  box-shadow: 0 0 0 .25rem rgba(16,185,129,.18) !important;
}

/* Headings inside pages */
h1,h2,h3,h4,h5,h6{ color: var(--text); }

/* Sidebar section titles (like "الإعدادات" / "المستخدمين") */
.app-sidebar .text-muted{ color: rgba(255,255,255,.70) !important; }


/* ===============================
   Login page (professional)
   =============================== */
.login-page{
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}
.login-card{
  width: 100%;
  max-width: 420px;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 18px 60px rgba(0,0,0,.45);
  backdrop-filter: blur(10px);
}
.login-brand{display:flex;align-items:center;gap:12px;margin-bottom:18px}
.login-logo{width:44px;height:44px;border-radius:14px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg, rgba(56,189,248,.55), rgba(129,140,248,.55));border:1px solid rgba(255,255,255,.18)}
.login-logo-mark{font-weight:900;font-size:20px;color:#fff}
.login-title{font-weight:800;letter-spacing:.2px}
.login-subtitle{color:rgba(255,255,255,.72);font-size:.95rem}
.login-field{position:relative}
.login-field i{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:rgba(255,255,255,.55)}
.login-field .form-control{padding-left:44px}
.login-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px}
.login-actions .btn{flex:1}


/* ===========================
   PRO THEME OVERRIDES (v6)
   - Better contrast + readability
   - Gym background + overlay
   - Smooth animations
   =========================== */

:root{
  --bg-overlay: rgba(6, 10, 18, .62);
  --surface: rgba(16, 24, 40, .72);
  --surface-2: rgba(16, 24, 40, .82);
  --stroke: rgba(255,255,255,.14);
  --text: rgba(255,255,255,.92);
  --text-dim: rgba(255,255,255,.72);
  --accent: #2f7cff;
  --accent-2: #3dd6ff;
  --danger: #ff4d6d;
}

/* Background image + overlay (works even if BrandingService sets a different image) */
body.app-body{
  position: relative;
  color: var(--text);
  background-color: #0b1020;
  background-image:
    radial-gradient(1200px 700px at 20% 15%, rgba(47,124,255,.28), transparent 60%),
    radial-gradient(900px 600px at 80% 10%, rgba(61,214,255,.18), transparent 55%),
    url('/images/bg-gym.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

body.app-body::before{
  content:"";
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(2px);
  z-index: 0;
  pointer-events: none;
}

/* Make app content sit above overlay */
body.app-body > .d-flex,
body.app-body > .container,
body.app-body > main{
  position: relative;
  z-index: 1;
}

/* Smooth entrance */
@keyframes fadeUp{
  from{ opacity:0; transform: translateY(10px); }
  to{ opacity:1; transform: translateY(0); }
}
@keyframes softGlow{
  0%,100%{ box-shadow: 0 0 0 rgba(47,124,255,0); }
  50%{ box-shadow: 0 0 26px rgba(47,124,255,.26); }
}

/* Sidebar improvements */
.app-sidebar{
  width: 190px !important;
  border-left: 1px solid var(--stroke);
  background: rgba(10, 16, 30, .58);
  backdrop-filter: blur(10px);
  animation: fadeUp .45s ease both;
}
.app-sidebar .fs-5{ color: var(--text) !important; }
.app-nav .nav-link{
  color: var(--text-dim) !important;
  border: 1px solid transparent;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.app-nav .nav-link:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.06);
  border-color: var(--stroke);
}
.app-nav .nav-link.active{
  color: var(--text) !important;
  background: linear-gradient(135deg, rgba(47,124,255,.35), rgba(61,214,255,.18));
  border-color: rgba(47,124,255,.35);
  animation: softGlow 2.4s ease-in-out infinite;
}

/* Cards / KPI */
.kpi-card, .glass-card{
  background: var(--surface-2) !important;
  border: 1px solid var(--stroke) !important;
  backdrop-filter: blur(10px) !important;
}
.kpi-card{
  animation: fadeUp .45s ease both;
}
.kpi-title{
  color: var(--text-dim) !important;
  letter-spacing: .2px;
}
.kpi-value{
  color: #fff !important;
  font-weight: 800 !important;
  text-shadow: 0 1px 0 rgba(0,0,0,.35);
}

/* Buttons */
.btn-primary, .btn-accent{
  background: linear-gradient(135deg, rgba(47,124,255,1), rgba(61,214,255,.85)) !important;
  border: none !important;
  box-shadow: 0 10px 24px rgba(47,124,255,.18);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary:hover, .btn-accent:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(47,124,255,.24);
}

/* Inputs / placeholders visibility */
.form-control, input, select, textarea{
  background: rgba(10, 16, 30, .55) !important;
  border: 1px solid var(--stroke) !important;
  color: #fff !important;
}
.form-control::placeholder,
input::placeholder,
textarea::placeholder{
  color: rgba(255,255,255,.65) !important;
}
.form-control:focus{
  box-shadow: 0 0 0 .2rem rgba(47,124,255,.18) !important;
  border-color: rgba(47,124,255,.55) !important;
}

/* Tables */
.table, table{
  color: var(--text) !important;
}
.table thead th{
  color: rgba(255,255,255,.85) !important;
}
.table tbody td{
  color: rgba(255,255,255,.9) !important;
}
.table-hover tbody tr:hover{
  background: rgba(255,255,255,.05) !important;
}

/* Report headline + totals */
.report-title, .page-title{
  color: #fff !important;
  text-shadow: 0 1px 0 rgba(0,0,0,.35);
}
.text-danger, .danger{
  color: var(--danger) !important;
  font-weight: 800;
}

/* Auth (Login) */
.auth-shell{
  min-height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 40px 16px;
  animation: fadeUp .45s ease both;
}
.auth-card{
  width: min(440px, 96vw);
  background: rgba(10, 16, 30, .72);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 22px 22px 18px;
  backdrop-filter: blur(12px);
}
.auth-card h1,.auth-card h2,.auth-card h3{ color:#fff; }
.auth-brand{
  display:flex;
  align-items:center;
  gap: 10px;
  margin-bottom: 16px;
}
.auth-brand .logo{
  height: 36px;
  width: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(47,124,255,1), rgba(61,214,255,.85));
  box-shadow: 0 12px 26px rgba(47,124,255,.18);
}

/* WhatsApp button */
.btn-whatsapp{
  background: rgba(37, 211, 102, .92) !important;
  border: 1px solid rgba(37, 211, 102, .85) !important;
  color: #07130b !important;
  font-weight: 800;
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(37,211,102,.18);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.btn-whatsapp:hover{
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 14px 30px rgba(37,211,102,.26);
  filter: saturate(1.1);
}
.btn-whatsapp:active{
  transform: translateY(0) scale(.99);
}
.btn-whatsapp.pulse{
  animation: waPulse 1.4s ease-in-out infinite;
}
@keyframes waPulse{
  0%{ box-shadow: 0 10px 22px rgba(37,211,102,.18); }
  50%{ box-shadow: 0 0 0 10px rgba(37,211,102,.12), 0 14px 30px rgba(37,211,102,.22); }
  100%{ box-shadow: 0 10px 22px rgba(37,211,102,.18); }
}

/* Modal preview text */
.wa-preview{
  white-space: pre-wrap;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 12px;
  color: #fff;
}


/* =========================================================
   Contrast fix: keep text readable on ANY background image
   (License page + global cards)
   ========================================================= */
:root{
  --card-bg-strong: rgba(0,0,0,0.72);
  --card-border-strong: rgba(255,255,255,0.18);
  --text-on-strong: #ffffff;
  --muted-on-strong: rgba(255,255,255,0.78);
}

/* Common containers used across the app */
.card,
.modal-content,
.offcanvas,
.dropdown-menu,
.table-responsive,
.glass,
.glass-card,
.content-card,
.license-card{
  background: var(--card-bg-strong) !important;
  border-color: var(--card-border-strong) !important;
  color: var(--text-on-strong) !important;
}

/* Ensure nested text is readable */
.card *,
.modal-content *,
.offcanvas *,
.dropdown-menu *,
.table-responsive *,
.glass *,
.glass-card *,
.content-card *,
.license-card *{
  color: var(--text-on-strong) !important;
  opacity: 1 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.70);
}

/* Muted text + placeholders */
.text-muted,
.form-text,
.small,
::placeholder{
  color: var(--muted-on-strong) !important;
  opacity: 1 !important;
}

/* Inputs on dark card */
.form-control,
.form-select,
input[type="text"],
input[type="date"],
textarea{
  background: rgba(255,255,255,0.08) !important;
  color: var(--text-on-strong) !important;
  border-color: rgba(255,255,255,0.22) !important;
}
.form-control:focus,
.form-select:focus,
textarea:focus{
  box-shadow: 0 0 0 .2rem rgba(255,255,255,0.12) !important;
}

/* Tables */
.table{
  color: var(--text-on-strong) !important;
}
.table thead th{
  color: var(--text-on-strong) !important;
}


/* =====================
   Dropdowns / Selects readability fix
   Ensures native <select> option list is readable on dark UI.
   ===================== */
select, .form-select {
  color-scheme: dark; /* helps some browsers render controls in dark */
}
select option, .form-select option {
  background-color: #0f1115 !important;
  color: #ffffff !important;
}
select optgroup, .form-select optgroup {
  background-color: #0f1115 !important;
  color: rgba(255,255,255,0.92) !important;
}

/* Bootstrap dropdown menus (if used) */
.dropdown-menu {
  background-color: rgba(15,17,21,0.96) !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
}
.dropdown-item {
  color: rgba(255,255,255,0.92) !important;
}
.dropdown-item:hover,
.dropdown-item:focus {
  background-color: rgba(255,255,255,0.10) !important;
  color: #fff !important;
}
.dropdown-divider {
  border-top: 1px solid rgba(255,255,255,0.14) !important;
}


/* ===== polished dashboard / cards ===== */
.dashboard-kpi, .feature-card, .alert-card{
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border-radius: 20px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  overflow: hidden;
}
.dashboard-kpi:hover, .feature-card:hover, .alert-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(0,0,0,.18);
  border-color: rgba(255,255,255,.24);
}
.quick-actions{
  display:flex;
  gap:.75rem;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.quick-actions .btn{
  min-width:120px;
}
.alert-card{
  padding: 1rem 1.1rem;
  color: #fff;
  height:100%;
}
.alert-card.warning{ background: linear-gradient(135deg, rgba(207,168,92,.34), rgba(150,118,58,.16)); }
.alert-card.danger{ background: linear-gradient(135deg, rgba(201,120,168,.34), rgba(151,83,131,.16)); }
.alert-card.info{ background: linear-gradient(135deg, rgba(70,182,212,.34), rgba(39,123,167,.16)); }
.alert-card-title{ font-weight:700; margin-bottom:.35rem; }
.alert-card-number{ font-size:2rem; font-weight:800; line-height:1; }
.alert-card-sub{ opacity:.85; margin-top:.4rem; font-size:.92rem; }
.feature-card{
  padding: 1.35rem;
  text-align:center;
  color: var(--text);
}
.feature-icon{
  width:56px; height:56px; margin:0 auto 1rem;
  display:flex; align-items:center; justify-content:center;
  border-radius:16px;
  background: rgba(34,197,94,.16);
  font-size:1.4rem;
}
.feature-title{ font-size:1.15rem; font-weight:800; margin-bottom:.35rem; }
.feature-value{ font-size:1.8rem; font-weight:900; margin-bottom:.25rem; }
.feature-sub{ color: var(--muted); font-size:.95rem; }
.page-hero{ margin-bottom:1rem; }
.page-hero h2{ font-weight:900; }
.mini-stat{
  display:flex; align-items:center; justify-content:space-between;
  gap:1rem; padding:.9rem 1rem;
  border:1px solid var(--border); border-radius:16px;
  background: rgba(255,255,255,.04);
}
#memberSearchResults{
  inset-inline-start:0;
  top: calc(100% + .35rem);
}

/* ===== dashboard hero refresh ===== */
.dashboard-shell{ animation: fadeUp .35s ease both; }
.dashboard-hero{ margin-bottom: 1rem; }
.overview-panel,
.hero-command{
  height:100%;
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg, rgba(17,24,39,.8), rgba(11,18,31,.7));
  border-radius: 28px;
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
  backdrop-filter: blur(12px);
  padding: 1.6rem;
}
.overview-panel-head{
  display:flex;
  align-items:center;
  gap:1rem;
  margin-bottom:1.25rem;
}
.overview-pulse{
  width:56px;
  height:56px;
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-size:1.3rem;
  background: linear-gradient(135deg, rgba(37,99,235,.32), rgba(14,165,233,.22));
  border:1px solid rgba(255,255,255,.12);
}
.overview-kicker{
  color:rgba(255,255,255,.72);
  font-size:.9rem;
  margin-bottom:.15rem;
}
.overview-title{
  font-size:2rem;
  font-weight:900;
  color:#fff;
}
.overview-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:1rem;
}
.overview-card{
  position:relative;
  display:block;
  min-height:152px;
  padding:1.15rem;
  border-radius:22px;
  border:1px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg, rgba(53,90,170,.28), rgba(37,53,94,.20));
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.overview-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0,0,0,.22);
  border-color: rgba(255,255,255,.22);
  text-decoration:none;
}
.overview-card-icon{
  position:absolute;
  top:1rem;
  inset-inline-end:1rem;
  width:44px;
  height:44px;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-size:1.05rem;
  background: linear-gradient(135deg, rgba(56,189,248,.95), rgba(59,130,246,.78));
  box-shadow: 0 10px 24px rgba(56,189,248,.22);
}
.overview-card-members .overview-card-icon{
  background: linear-gradient(135deg, rgba(14,165,233,.98), rgba(59,130,246,.82));
}
.overview-card-checkin .overview-card-icon{
  background: linear-gradient(135deg, rgba(45,212,191,.98), rgba(6,182,212,.78));
}
.overview-card-store .overview-card-icon{
  background: linear-gradient(135deg, rgba(250,204,21,.98), rgba(245,158,11,.82));
}
.overview-card-revenue .overview-card-icon{
  background: linear-gradient(135deg, rgba(96,165,250,.98), rgba(14,165,233,.78));
}
.overview-card-title{
  color:rgba(255,255,255,.82);
  font-weight:700;
  font-size:1.05rem;
  padding-top:.1rem;
  padding-inline-end:3.4rem;
}
.overview-card-value{
  margin-top:1rem;
  font-size:2.2rem;
  font-weight:900;
  color:#fff;
  line-height:1;
}
.overview-card-sub{
  margin-top:.5rem;
  color:rgba(255,255,255,.76);
  font-size:.98rem;
}
.hero-command{
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
}
.hero-badge{
  align-self:flex-end;
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  padding:.55rem .95rem;
  margin-bottom:1rem;
  border-radius:999px;
  color:#dbeafe;
  background: rgba(37,99,235,.22);
  border:1px solid rgba(255,255,255,.12);
  font-weight:700;
}
.hero-title{
  font-size:3rem;
  font-weight:900;
  color:#f8fbff;
  margin-bottom:.35rem;
  line-height:1.2;
}
.hero-subtitle{
  color:rgba(230,238,250,.82);
  font-size:1.08rem;
  margin-bottom:1rem;
}
.command-box{
  border-radius:24px;
  padding:1.05rem 1.15rem 1rem;
  border:1px solid rgba(255,255,255,.1);
  background: linear-gradient(180deg, rgba(22,31,50,.48), rgba(12,18,30,.36));
}
.search-wrap{ margin-bottom:.85rem; }
.search-icon{
  position:absolute;
  top:50%;
  inset-inline-end:1.1rem;
  transform:translateY(-50%);
  color:rgba(255,255,255,.65);
  font-size:1.25rem;
  pointer-events:none;
}
.command-search{
  min-height:64px;
  border-radius:20px !important;
  padding-inline-start:1.25rem !important;
  padding-inline-end:3.4rem !important;
  font-size:1.15rem !important;
}
.hero-actions{
  justify-content:flex-start;
  align-items:flex-start;
  gap:.75rem;
}
.hero-actions .btn-action{
  min-width:132px;
  min-height:54px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  font-weight:800;
  border:1px solid rgba(255,255,255,.08);
  color:#f8fbff;
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
  border-radius:16px;
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.hero-actions .btn-action:hover{
  transform:translateY(-2px);
  box-shadow: 0 14px 28px rgba(0,0,0,.18);
  filter:brightness(1.04);
}
.hero-actions .btn-action i{ font-size:1rem; }
.hero-actions .btn-payment{ background:linear-gradient(135deg, #f2c14e, #d9981b); color:#2f1b00; }
.hero-actions .btn-member{ background:linear-gradient(135deg, #36c9ff, #2684ff); }
.hero-actions .btn-checkin{ background:linear-gradient(135deg, #41d7b3, #1db89a); }
.hero-actions .btn-renew{ background:linear-gradient(135deg, #5c8bff, #3f6ff0); }
.hero-actions .btn-store{ background:linear-gradient(135deg, #1fd0d8, #0fa8c6); }


.member-action-modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:1.5rem;
  background:rgba(5,10,20,.58);
  backdrop-filter:blur(10px);
  z-index:2000;
}
.member-action-modal.is-open{ display:flex; }
.member-action-card{
  position:relative;
  width:min(100%, 560px);
  padding:1.5rem;
  border-radius:26px;
  border:1px solid rgba(255,255,255,.10);
  background:linear-gradient(180deg, rgba(11,19,34,.97), rgba(7,12,22,.96));
  box-shadow:0 32px 80px rgba(0,0,0,.46);
  overflow:hidden;
}
.member-action-card::before{
  content:"";
  position:absolute;
  inset:auto auto -70px -60px;
  width:180px;
  height:180px;
  border-radius:999px;
  background:radial-gradient(circle, rgba(56,189,248,.16), transparent 70%);
  pointer-events:none;
}
.member-action-card::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  border-radius:inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.member-action-close{
  position:absolute;
  top:1rem;
  inset-inline-start:1rem;
  width:44px;
  height:44px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.05);
  color:#e8f2ff;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:background .18s ease, transform .18s ease, border-color .18s ease;
}
.member-action-close:hover{ background:rgba(255,255,255,.10); transform:translateY(-1px); border-color:rgba(148,163,184,.3); }
.member-action-head{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:.9rem;
  margin-bottom:1.15rem;
  padding-inline:3rem;
}
.member-action-head-clean{
  margin-top:.1rem;
}

.member-action-card{
  width:min(100%, 580px);
  padding:1.45rem;
}
.member-action-head-clean{
  gap:.65rem;
  margin-bottom:1rem;
}
.member-action-badge{
  min-height:34px;
  padding:.35rem .85rem;
  font-size:.88rem;
}
.member-action-title{
  font-size:1.85rem;
}
.member-action-search-wrap-clean{
  min-height:58px;
  border-radius:18px;
}
.member-action-search-wrap .form-control{
  font-size:1rem;
}

.member-action-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:.45rem .95rem;
  border-radius:999px;
  color:#fff4c7;
  font-weight:800;
  font-size:.92rem;
  background:linear-gradient(135deg, rgba(180,139,54,.32), rgba(132,97,26,.18));
  border:1px solid rgba(255,219,113,.16);
  box-shadow:0 10px 26px rgba(0,0,0,.12);
}
.member-action-title{
  color:#fff;
  font-size:2rem;
  font-weight:900;
  margin:0;
  text-align:center;
  line-height:1.2;
}
.member-action-form{
  display:block;
}
.member-action-form-live{
  margin-top:.2rem;
}
.member-action-search-wrap{
  display:flex;
  align-items:center;
  gap:.8rem;
  border:1px solid rgba(96,165,250,.18);
  background:rgba(255,255,255,.04);
  border-radius:18px;
  padding:1rem 1rem;
  min-height:64px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.member-action-search-wrap-standalone{ margin-top:.1rem; }
.member-action-search-wrap-clean{
  background:rgba(11,19,33,.84);
  border:1px solid rgba(96,165,250,.24);
  border-radius:20px;
  box-shadow:0 0 0 1px rgba(255,255,255,.02) inset, 0 12px 26px rgba(4,12,24,.18);
}
.member-action-search-wrap i{ color:rgba(255,255,255,.7); font-size:1.18rem; }
.member-action-search-wrap .form-control{
  border:0;
  background:transparent !important;
  box-shadow:none !important;
  padding:0;
  min-height:auto;
  font-size:1.08rem;
  color:#fff;
}
.member-action-search-wrap .form-control::placeholder{ color:rgba(226,232,240,.56); }
.member-action-message{
  margin-top:.9rem;
  padding:.72rem .95rem;
  border-radius:14px;
  background:rgba(245,158,11,.08);
  border:1px solid rgba(251,191,36,.12);
  color:#fcd34d;
  font-weight:700;
  text-align:center;
}
.member-action-results{
  margin-top:.9rem;
  display:grid;
  gap:.6rem;
  max-height:280px;
  overflow:auto;
  padding-inline-end:.15rem;
}
.member-action-results-clean:empty{ display:none !important; }
.member-result-item{
  width:100%;
  text-align:inherit;
  border:1px solid rgba(255,255,255,.07);
  background:linear-gradient(180deg, rgba(18,28,46,.92), rgba(12,18,31,.9));
  border-radius:16px;
  padding:.92rem .95rem;
  display:grid;
  grid-template-columns:44px minmax(0,1fr) auto;
  align-items:center;
  gap:.78rem;
  color:#fff;
  transition:transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.member-result-item:hover{
  transform:translateY(-1px);
  border-color:rgba(96,165,250,.24);
  background:linear-gradient(180deg, rgba(24,39,66,.96), rgba(15,24,40,.94));
  box-shadow:0 12px 24px rgba(2,8,18,.24);
}
.member-result-avatar{
  width:42px;
  height:42px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg, rgba(56,189,248,.2), rgba(59,130,246,.2));
  border:1px solid rgba(125,211,252,.15);
  color:#e0f2fe;
  font-weight:900;
  font-size:.95rem;
}
.member-result-main{ display:flex; flex-direction:column; gap:.24rem; min-width:0; }
.member-result-name{ font-weight:800; color:#fff; font-size:.98rem; }
.member-result-meta{ display:flex; flex-wrap:wrap; gap:.45rem; color:rgba(226,232,240,.7); font-size:.86rem; }
.member-result-meta span{
  display:inline-flex;
  align-items:center;
  padding:.13rem .38rem;
  border-radius:999px;
  background:rgba(255,255,255,.035);
  border:1px solid rgba(255,255,255,.05);
}
.member-result-action{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:.3rem;
  border-radius:999px;
  padding:.38rem .72rem;
  background:rgba(34,197,94,.10);
  border:1px solid rgba(74,222,128,.14);
  color:#d1fae5;
  font-weight:800;
  font-size:.78rem;
}
.member-action-modal[data-mode="payment"] .member-result-action{
  background:rgba(245,158,11,.12);
  border-color:rgba(251,191,36,.18);
  color:#fde68a;
}
.member-action-footer{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  margin-top:.95rem;
}
.member-action-footer-clean{ margin-top:.95rem; }
.member-action-cancel{
  min-height:42px;
  padding-inline:1rem;
  border-radius:14px;
  font-weight:800;
  background:rgba(255,255,255,.05);
  color:#fff;
  border:1px solid rgba(255,255,255,.10);
}
.member-action-cancel:hover{
  background:rgba(255,255,255,.08);
  color:#fff;
}
@media (max-width: 767.98px){
  .member-action-card{ width:min(100%, 92vw); padding:1.2rem; }
  .member-action-head{ padding-inline:2.6rem; }
  .member-action-title{ font-size:1.55rem; }
  .member-result-item{ grid-template-columns:40px minmax(0,1fr); }
  .member-result-action{ grid-column:1 / -1; justify-self:start; }
}
.btn-renew-submit{
  background:linear-gradient(135deg, #3b82f6, #2563eb);
  color:#fff;
  border:0;
}
.btn-renew-submit:disabled{ opacity:.75; }
.btn-renew-cancel{
  background:rgba(255,255,255,.06);
  color:#fff;
  border:1px solid rgba(255,255,255,.12);
}
@media (max-width: 1199.98px){
  .hero-title{ font-size:2.3rem; }
}
@media (max-width: 767.98px){
  .overview-grid{ grid-template-columns:1fr; }
  .hero-actions .btn-action{ min-width:100%; }
  .hero-title{ font-size:2rem; }
  .overview-title{ font-size:1.65rem; }
}

/* ===== dashboard lower sections fix ===== */
.table-wrap{
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg, rgba(13,20,34,.86), rgba(10,14,24,.8));
  border-radius: 24px;
  box-shadow: 0 18px 42px rgba(0,0,0,.22);
  backdrop-filter: blur(10px);
}
.table-wrap h4{
  font-weight: 800;
  color:#fff;
}
.table-wrap .btn-outline-light{
  border-color: rgba(255,255,255,.18) !important;
  background: rgba(255,255,255,.05) !important;
  color:#fff !important;
}
.table-wrap .btn-outline-light:hover{
  background: rgba(255,255,255,.1) !important;
}
.mini-stat{
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
}
.table-wrap .text-muted,
.table-wrap .small.text-muted{
  color: rgba(255,255,255,.72) !important;
}
.table-wrap .table-responsive{
  border-radius: 16px;
  overflow: hidden;
}
.table-wrap .table thead th{
  background: rgba(255,255,255,.04);
}
.table-wrap .table tbody tr:hover{
  background: rgba(255,255,255,.04) !important;
}
.table-wrap canvas{
  width:100% !important;
  background: rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: .75rem;
}
.table-wrap hr{
  border-color: rgba(255,255,255,.08);
  margin: 1rem 0;
}

@media (min-width: 992px){
  .dashboard-shell .row.g-3.mt-1{
    --bs-gutter-y: 1rem;
  }
}


/* ===== recent activity refresh ===== */
.recent-activity-list{display:flex;flex-direction:column;gap:.9rem;}
.recent-activity-item{display:flex;align-items:flex-start;gap:.85rem;padding:1rem 1rem 1rem 1.1rem;border-radius:18px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);transition:transform .18s ease,border-color .18s ease,background .18s ease;}
.recent-activity-item:hover{transform:translateY(-2px);border-color:rgba(255,255,255,.18);background:rgba(255,255,255,.07);}
.recent-activity-dot{width:12px;height:12px;margin-top:.45rem;border-radius:999px;flex:0 0 auto;background:linear-gradient(135deg, rgba(34,211,238,.95), rgba(59,130,246,.9));box-shadow:0 0 0 6px rgba(34,211,238,.10);}
.recent-activity-content{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;width:100%;}
.recent-activity-text,.recent-activity-text a{color:#fff;text-decoration:none;font-weight:600;}
.recent-activity-text a:hover{color:#93c5fd;}
.recent-activity-time{color:rgba(255,255,255,.68);font-size:.88rem;white-space:nowrap;}
@media (max-width: 575.98px){.recent-activity-content{flex-direction:column;gap:.35rem;}.recent-activity-time{white-space:normal;}}


/* ===== responsive dashboard tuning ===== */
.dashboard-shell{
  max-width: min(100%, 1480px);
  margin-inline: auto;
}
.dashboard-hero .row,
.dashboard-shell .row.g-3.mt-1{
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 1rem;
}

@media (max-width: 1599.98px){
  main.flex-grow-1.p-4{ padding: 1.15rem !important; }
  .dashboard-shell{ max-width: min(100%, 1360px); }
  .overview-panel,
  .hero-command,
  .table-wrap{ border-radius: 24px; }
  .overview-panel,
  .hero-command{ padding: 1.35rem; }
  .hero-title{ font-size: clamp(2.15rem, 2vw + 1.2rem, 2.7rem); }
  .hero-subtitle{ font-size: 1rem; margin-bottom: 1.15rem; }
  .command-box{ padding: 1.05rem; }
  .command-search{ min-height: 58px; font-size: 1.02rem !important; }
  .hero-actions .btn-action{ min-width: 124px; min-height: 52px; }
  .overview-title{ font-size: 1.7rem; }
  .overview-card{ min-height: 132px; padding: 1rem; }
  .overview-card-value{ font-size: 1.9rem; margin-top: .85rem; }
  .overview-card-sub{ font-size: .9rem; }
  .table-wrap{ padding: 1.15rem !important; }
}

@media (max-width: 1399.98px){
  .app-sidebar{ width: 182px !important; flex-basis:182px !important; }
  main.flex-grow-1.p-4{ padding: 1rem !important; }
  .dashboard-shell{ max-width: 100%; }
  .overview-panel,
  .hero-command{ padding: 1.15rem; }
  .hero-badge{ margin-bottom: .75rem; }
  .overview-panel-head{ margin-bottom: 1rem; }
  .overview-pulse{ width: 48px; height: 48px; border-radius: 16px; }
  .overview-title{ font-size: 1.5rem; }
  .overview-grid{ gap: .85rem; }
  .overview-card{ min-height: 120px; border-radius: 18px; }
  .overview-card-icon{ width: 40px; height: 40px; border-radius: 14px; }
  .overview-card-title{ font-size: .98rem; padding-inline-end: 3rem; }
  .overview-card-value{ font-size: 1.75rem; }
  .hero-actions{ gap: .65rem; }
  .hero-actions .btn-action{ min-width: calc(50% - .35rem); flex: 1 1 calc(50% - .35rem); }
  .table-wrap h4{ font-size: 1.15rem; }
  .mini-stat{ padding: .75rem .9rem; }
}

@media (max-width: 1199.98px){
  .app-sidebar{ width: 160px !important; flex-basis:160px !important; }
  .dashboard-hero .row{ --bs-gutter-y: .9rem; }
  .hero-command,
  .overview-panel,
  .table-wrap{ border-radius: 22px; }
  .hero-actions .btn-action{ min-width: calc(50% - .35rem); }
}

@media (max-width: 991.98px){
  .app-sidebar{ width: 116px !important; flex-basis:116px !important; padding: .8rem !important; }
  .app-sidebar .nav-link span,
  .app-sidebar .text-muted,
  .app-sidebar .fs-5{ font-size: .9rem !important; }
  main.flex-grow-1.p-4{ padding: .85rem !important; }
  .hero-title{ font-size: 2rem; }
  .hero-subtitle{ font-size: .96rem; }
  .overview-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px){
  .app-sidebar{ width: 92px !important; flex-basis:92px !important; }
  .app-sidebar .nav-link span,
  .app-sidebar .text-muted,
  .app-sidebar .fs-5{ display:none; }
  .app-sidebar .nav-link{ justify-content: center; }
  .hero-command,
  .overview-panel,
  .table-wrap{ padding: 1rem; border-radius: 18px; }
  .hero-title{ font-size: 1.75rem; }
  .hero-badge{ align-self: flex-start; }
  .command-search{ min-height: 54px; }
  .overview-grid{ grid-template-columns: 1fr; }
  .recent-activity-item{ padding: .85rem; }
}

@media (max-height: 900px){
  .dashboard-hero{ margin-bottom: .75rem; }
  .hero-command,
  .overview-panel{ padding: 1.05rem; }
  .overview-panel-head{ margin-bottom: .8rem; }
  .overview-card{ min-height: 112px; }
  .overview-card-value{ font-size: 1.6rem; margin-top: .7rem; }
  .hero-subtitle{ margin-bottom: .9rem; }
  .command-box{ padding: .95rem; }
  .command-search{ min-height: 54px; }
  .hero-actions .btn{ min-height: 48px; }
  .table-wrap{ padding: 1rem !important; }
  .table-wrap h4{ margin-bottom: .8rem !important; }
}


/* Auto responsive shell */
.app-shell{ width:100%; min-height:100vh; }
main.flex-grow-1.p-4{ width:min(100%, 1600px); margin-inline:auto; }


/* ===== automatic responsive polish ===== */
.dashboard-shell{ width:min(100%, 1520px); margin-inline:auto; }
.dashboard-shell .row{ --bs-gutter-x: 1rem; --bs-gutter-y: 1rem; }

@media (max-width: 1400px){
  .dashboard-shell{ width:100%; }
  .overview-panel, .hero-command, .table-wrap{ padding:1.1rem !important; }
  .hero-title{ font-size:clamp(2rem, 2vw + 1rem, 2.6rem); }
  .hero-actions .btn-action{ min-width:125px; min-height:50px; }
  .overview-card{ min-height:118px; }
}

@media (max-width: 1199.98px){
  .dashboard-hero .col-xl-7, .dashboard-hero .col-xl-5{ width:100%; }
  .hero-actions{ justify-content:stretch; }
  .hero-actions .btn-action{ flex:1 1 calc(50% - .5rem); min-width:unset; }
}

@media (max-width: 767.98px){
  main.flex-grow-1.p-4{ padding:.85rem !important; }
  .hero-command, .overview-panel, .table-wrap{ border-radius:18px; padding:1rem !important; }
  .overview-grid{ grid-template-columns:1fr !important; }
  .hero-actions .btn-action{ flex:1 1 100%; }
  .table-wrap .d-flex.justify-content-between.align-items-center.mb-3{
    flex-direction:column; align-items:flex-start !important; gap:.5rem;
  }
}

@media (max-height: 900px){
  .dashboard-hero{ margin-bottom:.75rem; }
  .overview-card{ min-height:108px; }
  .hero-subtitle{ margin-bottom:.85rem; }
}

@media (max-width: 767.98px){
  .member-action-card{ padding:1.1rem; border-radius:22px; }
  .member-action-head{ padding-inline:2.2rem; }
  .member-action-title{ font-size:1.45rem; }
  .member-action-footer{ justify-content:stretch; }
  .member-result-item{ grid-template-columns:1fr; align-items:flex-start; }
  .member-result-avatar{ width:48px; height:48px; border-radius:14px; }
  .member-result-action{ width:100%; justify-content:center; }
}


/* ===== sidebar/menu fixed + fast v20 ===== */
.app-sidebar,
.app-sidebar ul,
.app-nav{
  list-style:none !important;
}

.app-nav{
  padding:0 !important;
  margin:0 !important;
}

.app-sidebar{
  width: 228px !important;
  flex: 0 0 228px !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  margin: 12px 12px 12px 0 !important;
  padding: 1rem .85rem !important;
  border-radius: 22px !important;
  background: linear-gradient(180deg, rgba(10,16,30,.98), rgba(12,20,36,.96)) !important;
  border-left: 1px solid rgba(148,163,184,.10) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  transition: none !important;
}

.app-sidebar .d-flex.align-items-center.gap-2.mb-3{
  min-height: 44px;
  margin-bottom: 1rem !important;
  padding: .15rem .2rem .7rem;
  border-bottom: 1px solid rgba(255,255,255,.05);
  overflow:hidden;
}

.app-sidebar .d-flex.align-items-center.gap-2.mb-3 img{
  flex:0 0 32px;
}

.app-sidebar .fs-5,
.app-sidebar .nav-link span,
.app-sidebar .text-muted{
  opacity: 1 !important;
  max-width: none !important;
  white-space: nowrap;
  overflow: visible;
  transition: none !important;
}

.app-sidebar .nav-link,
.app-nav .nav-link{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:.78rem;
  min-height:46px;
  padding:.72rem .82rem !important;
  margin:.18rem 0 !important;
  border-radius:16px !important;
  color: rgba(226,232,240,.88) !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  transition: background .15s ease, border-color .15s ease, color .15s ease !important;
}

.app-sidebar .nav-link i,
.app-nav .nav-link i{
  flex:0 0 1.2rem;
  width:1.2rem;
  text-align:center;
  font-size:1.08rem;
}

.app-sidebar .nav-link:hover,
.app-nav .nav-link:hover{
  color:#fff !important;
  background: rgba(255,255,255,.055) !important;
  border-color: rgba(148,163,184,.12) !important;
  transform: none !important;
}

.app-sidebar .nav-link.active,
.app-nav .nav-link.active{
  color:#fff !important;
  background: linear-gradient(135deg, rgba(37,99,235,.30), rgba(59,130,246,.19)) !important;
  border-color: rgba(96,165,250,.24) !important;
  box-shadow: none !important;
}

.app-sidebar .text-muted{
  color: rgba(191,219,254,.58) !important;
  font-size: .76rem !important;
  font-weight: 800 !important;
  margin-top: .65rem !important;
  margin-bottom: .22rem !important;
  padding-inline: .25rem;
}

.app-sidebar .btn.btn-outline-danger.w-100{
  min-height: 44px;
  border-radius: 14px;
  padding-inline: .85rem;
}

@media (max-width: 1199.98px){
  .app-sidebar{
    width: 196px !important;
    flex-basis: 196px !important;
    padding: 1rem .75rem !important;
  }
}

@media (max-width: 991.98px){
  .app-sidebar{ width: 164px !important; flex-basis:164px !important; }
}

@media (max-width: 767.98px){
  .app-sidebar{ width: 104px !important; flex-basis:104px !important; padding:.8rem .55rem !important; }
  .app-sidebar .fs-5,
  .app-sidebar .nav-link span,
  .app-sidebar .text-muted{ opacity:0 !important; max-width:0 !important; overflow:hidden !important; }
  .app-sidebar .nav-link{ justify-content:center; }
}

.member-action-card{
  width:min(100%, 560px) !important;
  padding:1.35rem !important;
  border-radius:24px !important;
}
.member-action-head{
  gap:.6rem !important;
  margin-bottom: .9rem !important;
}
.member-action-badge{
  min-height:34px !important;
  padding:.34rem .82rem !important;
  font-size:.86rem !important;
}
.member-action-title{
  font-size:1.8rem !important;
}
.member-action-form,
.member-action-form-live{ display:block !important; margin-top:.1rem !important; }
.member-action-search-wrap-clean{
  min-height:58px !important;
  border-radius:18px !important;
}
.member-action-search-wrap .form-control{ font-size:1rem !important; }
.member-action-results{ margin-top:.85rem !important; max-height:250px !important; }
.member-action-footer{ justify-content:flex-end !important; margin-top:.85rem !important; }
.member-action-cancel{
  min-height:42px !important;
  padding-inline:1rem !important;
}

@media (max-width: 1199.98px){
  .app-sidebar{
    width: 196px !important;
    flex-basis: 196px !important;
    padding: 1rem .85rem !important;
  }
  .app-sidebar .fs-5,
  .app-sidebar .nav-link span,
  .app-sidebar .text-muted{
    opacity: 1;
    max-width: 220px;
  }
  .app-sidebar .nav-link{ justify-content:flex-start; }
}

@media (max-width: 991.98px){
  .app-sidebar{ width: 164px !important; flex-basis:164px !important; }
}

@media (max-width: 767.98px){
  .app-sidebar{ width: 104px !important; flex-basis:104px !important; padding:.8rem .55rem !important; }
  .app-sidebar .fs-5,
  .app-sidebar .nav-link span,
  .app-sidebar .text-muted{ opacity:0; max-width:0; }
  .app-sidebar .nav-link{ justify-content:center; }
}


/* ===== sidebar/menu slim + clean v21 ===== */
.app-sidebar{
  width: 190px !important;
  flex: 0 0 190px !important;
  margin: 10px 10px 10px 0 !important;
  padding: .9rem .65rem !important;
  border-radius: 20px !important;
}

.app-sidebar .d-flex.align-items-center.gap-2.mb-3{
  margin-bottom: .7rem !important;
  padding: .05rem .15rem .55rem !important;
  min-height: 40px !important;
}

.app-sidebar .fs-5{
  font-size: 1rem !important;
}

.app-sidebar .nav-link,
.app-nav .nav-link{
  gap: .58rem !important;
  min-height: 40px !important;
  padding: .58rem .62rem !important;
  margin: .12rem 0 !important;
  border-radius: 12px !important;
  font-size: .9rem !important;
}

.app-sidebar .nav-link i,
.app-nav .nav-link i{
  flex: 0 0 1rem !important;
  width: 1rem !important;
  font-size: .95rem !important;
}

.app-sidebar .text-muted{
  font-size: .68rem !important;
  margin-top: .5rem !important;
  margin-bottom: .14rem !important;
  padding-inline: .18rem !important;
}

.app-sidebar .btn.btn-outline-danger.w-100{
  min-height: 40px !important;
  border-radius: 12px !important;
  font-size: .88rem !important;
}

@media (max-width: 1199.98px){
  .app-sidebar{
    width: 176px !important;
    flex-basis: 176px !important;
    padding: .9rem .6rem !important;
  }
}

@media (max-width: 991.98px){
  .app-sidebar{
    width: 154px !important;
    flex-basis: 154px !important;
  }
}

@media (max-width: 767.98px){
  .app-sidebar{
    width: 98px !important;
    flex-basis: 98px !important;
    padding: .75rem .5rem !important;
  }
}

/* ===== sidebar/menu slim + clean v21 ===== */
.app-sidebar{
  width: 190px !important;
  flex: 0 0 190px !important;
  margin: 10px 10px 10px 0 !important;
  padding: .9rem .65rem !important;
  border-radius: 20px !important;
}

.app-sidebar .d-flex.align-items-center.gap-2.mb-3{
  margin-bottom: .7rem !important;
  padding: .05rem .15rem .55rem !important;
  min-height: 40px !important;
}

.app-sidebar .fs-5{
  font-size: 1rem !important;
}

.app-sidebar .nav-link,
.app-nav .nav-link{
  gap: .58rem !important;
  min-height: 40px !important;
  padding: .58rem .62rem !important;
  margin: .12rem 0 !important;
  border-radius: 12px !important;
  font-size: .9rem !important;
}

.app-sidebar .nav-link i,
.app-nav .nav-link i{
  flex: 0 0 1rem !important;
  width: 1rem !important;
  font-size: .95rem !important;
}

.app-sidebar .text-muted{
  font-size: .68rem !important;
  margin-top: .5rem !important;
  margin-bottom: .14rem !important;
  padding-inline: .18rem !important;
}

.app-sidebar .btn.btn-outline-danger.w-100{
  min-height: 40px !important;
  border-radius: 12px !important;
  font-size: .88rem !important;
}

@media (max-width: 1199.98px){
  .app-sidebar{
    width: 176px !important;
    flex-basis: 176px !important;
    padding: .9rem .6rem !important;
  }
}

@media (max-width: 991.98px){
  .app-sidebar{
    width: 154px !important;
    flex-basis: 154px !important;
  }
}

@media (max-width: 767.98px){
  .app-sidebar{
    width: 98px !important;
    flex-basis: 98px !important;
    padding: .75rem .5rem !important;
  }
}

/* ===== sidebar final polish v22 ===== */
.app-sidebar{
  width: 180px !important;
  flex: 0 0 180px !important;
  margin: 10px 8px 10px 0 !important;
  padding: .85rem .55rem !important;
  border-radius: 18px !important;
}
.app-sidebar .d-flex.align-items-center.gap-2.mb-3{
  margin-bottom: .55rem !important;
  padding: 0 .12rem .42rem !important;
  min-height: 36px !important;
}
.app-sidebar .fs-5{
  font-size: .96rem !important;
  font-weight: 700 !important;
}
.app-sidebar .nav-link,
.app-nav .nav-link{
  gap: .45rem !important;
  min-height: 36px !important;
  padding: .5rem .45rem !important;
  margin: .08rem 0 !important;
  border-radius: 10px !important;
  font-size: .82rem !important;
}
.app-sidebar .nav-link i,
.app-nav .nav-link i{
  flex: 0 0 .92rem !important;
  width: .92rem !important;
  font-size: .86rem !important;
}
.app-sidebar .text-muted{
  font-size: .62rem !important;
  margin-top: .42rem !important;
  margin-bottom: .08rem !important;
  padding-inline: .14rem !important;
}
.app-sidebar .btn.btn-outline-danger.w-100{
  min-height: 36px !important;
  border-radius: 10px !important;
  font-size: .8rem !important;
  padding: .42rem .5rem !important;
}
@media (max-width: 1199.98px){
  .app-sidebar{ width: 168px !important; flex-basis: 168px !important; }
}
@media (max-width: 991.98px){
  .app-sidebar{ width: 148px !important; flex-basis: 148px !important; }
}
@media (max-width: 767.98px){
  .app-sidebar{ width: 96px !important; flex-basis: 96px !important; }
}

/* ===== responsive polish v23 ===== */
.app-shell.d-flex{
  gap: .15rem;
}

main.flex-grow-1.p-4{
  padding: 1rem 1rem 1.25rem !important;
}

.dashboard-shell{
  width: min(100%, 1380px) !important;
  margin-inline: auto !important;
}

.hero-command,
.overview-panel,
.table-wrap{
  padding: 1.15rem !important;
}

.hero-title{
  font-size: clamp(1.9rem, 2.9vw, 3rem) !important;
}

.hero-subtitle{
  font-size: clamp(.95rem, 1.15vw, 1.08rem) !important;
}

.command-search{
  min-height: 58px !important;
}

.hero-actions{
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .7rem !important;
}

.hero-actions .btn-action{
  min-width: 0 !important;
  width: 100%;
  min-height: 48px !important;
  padding: .78rem .75rem !important;
  font-size: .88rem !important;
  border-radius: 14px !important;
}

.overview-grid{
  gap: .85rem !important;
}

.overview-card{
  min-height: 136px;
}

.app-sidebar{
  width: 176px !important;
  flex: 0 0 176px !important;
  margin: 10px 8px 10px 0 !important;
  padding: .8rem .52rem !important;
  border-radius: 18px !important;
}

.app-sidebar .d-flex.align-items-center.gap-2.mb-3{
  margin-bottom: .55rem !important;
  padding: 0 .15rem .42rem !important;
}

.app-sidebar .fs-5{
  font-size: .94rem !important;
}

.app-sidebar .nav-link,
.app-nav .nav-link{
  gap: .42rem !important;
  min-height: 35px !important;
  padding: .48rem .42rem !important;
  margin: .08rem 0 !important;
  border-radius: 10px !important;
  font-size: .8rem !important;
}

.app-sidebar .nav-link i,
.app-nav .nav-link i{
  width: .88rem !important;
  flex: 0 0 .88rem !important;
  font-size: .82rem !important;
}

.app-sidebar .text-muted{
  font-size: .6rem !important;
  margin-top: .42rem !important;
  margin-bottom: .08rem !important;
}

.app-sidebar .btn.btn-outline-danger.w-100{
  min-height: 34px !important;
  border-radius: 10px !important;
  font-size: .78rem !important;
  padding: .38rem .45rem !important;
}

@media (max-width: 1399.98px){
  .dashboard-shell{ width: 100% !important; }
  .hero-actions{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1199.98px){
  .app-sidebar{ width: 164px !important; flex-basis: 164px !important; }
  .hero-command,
  .overview-panel,
  .table-wrap{ padding: 1rem !important; }
  .hero-actions{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991.98px){
  .app-sidebar{ width: 144px !important; flex-basis: 144px !important; }
  .app-sidebar .fs-5{ font-size: .88rem !important; }
  .app-sidebar .nav-link,
  .app-nav .nav-link{ font-size: .75rem !important; min-height: 33px !important; }
  .overview-card{ min-height: 126px; }
}

@media (max-width: 767.98px){
  main.flex-grow-1.p-4{ padding: .75rem !important; }
  .app-sidebar{ width: 92px !important; flex-basis: 92px !important; padding: .75rem .48rem !important; }
  .app-sidebar .fs-5,
  .app-sidebar .nav-link span,
  .app-sidebar .text-muted{ opacity: 0 !important; max-width: 0 !important; overflow: hidden !important; }
  .app-sidebar .nav-link{ justify-content: center !important; }
  .hero-actions{ grid-template-columns: 1fr; }
  .overview-grid{ grid-template-columns: 1fr !important; }
}

/* ===== final responsive shrink v24 ===== */
html{
  font-size: 13.5px;
}

.app-shell.d-flex{
  gap: .1rem;
}

main.flex-grow-1.p-4{
  padding: .85rem .9rem 1rem !important;
}

.dashboard-shell{
  width: min(100%, 1340px) !important;
}

.hero-command,
.overview-panel,
.table-wrap{
  padding: 1rem !important;
}

.hero-title{
  font-size: clamp(1.72rem, 2.45vw, 2.7rem) !important;
}

.hero-subtitle{
  font-size: clamp(.88rem, 1vw, .98rem) !important;
}

.command-search{
  min-height: 52px !important;
}

.hero-actions{
  gap: .55rem !important;
}

.hero-actions .btn-action{
  min-height: 42px !important;
  padding: .62rem .62rem !important;
  font-size: .8rem !important;
  border-radius: 12px !important;
}

.overview-grid{
  gap: .7rem !important;
}

.overview-card{
  min-height: 124px !important;
}

.app-sidebar{
  width: 168px !important;
  flex: 0 0 168px !important;
  margin: 8px 7px 8px 0 !important;
  padding: .72rem .46rem !important;
  border-radius: 16px !important;
}

.app-sidebar .d-flex.align-items-center.gap-2.mb-3{
  margin-bottom: .45rem !important;
  padding: 0 .12rem .34rem !important;
}

.app-sidebar .fs-5{
  font-size: .88rem !important;
}

.app-sidebar .nav-link,
.app-nav .nav-link{
  gap: .36rem !important;
  min-height: 32px !important;
  padding: .4rem .36rem !important;
  margin: .06rem 0 !important;
  border-radius: 9px !important;
  font-size: .74rem !important;
}

.app-sidebar .nav-link i,
.app-nav .nav-link i{
  width: .8rem !important;
  flex: 0 0 .8rem !important;
  font-size: .78rem !important;
}

.app-sidebar .text-muted{
  font-size: .56rem !important;
  margin-top: .36rem !important;
}

.app-sidebar .btn.btn-outline-danger.w-100{
  min-height: 32px !important;
  border-radius: 9px !important;
  font-size: .72rem !important;
  padding: .34rem .4rem !important;
}

@media (max-width: 1399.98px){
  .dashboard-shell{ width: 100% !important; }
}

@media (max-width: 1199.98px){
  html{ font-size: 13px; }
  .app-sidebar{ width: 156px !important; flex-basis: 156px !important; }
  .hero-actions{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991.98px){
  .app-sidebar{ width: 138px !important; flex-basis: 138px !important; }
  .app-sidebar .fs-5{ font-size: .82rem !important; }
  .app-sidebar .nav-link,
  .app-nav .nav-link{ font-size: .7rem !important; min-height: 31px !important; }
  .overview-card{ min-height: 116px !important; }
}

@media (max-width: 767.98px){
  html{ font-size: 12.75px; }
  main.flex-grow-1.p-4{ padding: .65rem !important; }
  .app-sidebar{ width: 88px !important; flex-basis: 88px !important; padding: .68rem .42rem !important; }
  .hero-actions{ grid-template-columns: 1fr; }
  .overview-grid{ grid-template-columns: 1fr !important; }
}

/* === User avatars + compact clearer sidebar === */
.user-cell{
  display:flex;
  align-items:center;
  gap:12px;
  min-height:52px;
}
.user-avatar,
.user-avatar-letter{
  width:36px;
  height:36px;
  border-radius:50%;
  flex:0 0 36px;
}
.user-avatar{
  object-fit:cover;
  background:#1f2937;
  border:1px solid rgba(255,255,255,.08);
}
.user-avatar-letter,
.sidebar-avatar-letter{
  display:flex;
  align-items:center;
  justify-content:center;
  background:#2563eb;
  color:#fff;
  font-weight:700;
}
.user-avatar-letter{ font-size:14px; }
.user-meta{ min-width:0; }
.user-name{
  font-weight:700;
  font-size:.92rem;
  line-height:1.15;
}
.user-job{
  font-size:.76rem;
  color:#7dd3fc;
  margin-top:2px;
}
.user-email{
  font-size:.75rem;
  color:#aeb8c7;
  margin-top:2px;
  word-break:break-word;
}

.app-sidebar{
  height:100vh !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
}
.app-sidebar .nav-link,
.app-nav .nav-link{
  font-size:.96rem !important;
  font-weight:700 !important;
  min-height:40px !important;
  padding:.62rem .54rem !important;
  line-height:1.22 !important;
}
.app-sidebar .nav-link i,
.app-nav .nav-link i{
  font-size:1.05rem !important;
  width:1.2rem !important;
}
.app-sidebar .text-muted{
  font-size:.76rem !important;
}
.sidebar-user-card{
  border-top:1px solid rgba(255,255,255,.08);
  padding-top:.7rem;
}
.sidebar-user-row{
  display:flex;
  align-items:center;
  gap:.55rem;
  min-width:0;
}
.sidebar-avatar,
.sidebar-avatar-letter{
  width:30px;
  height:30px;
  border-radius:50%;
  flex:0 0 30px;
}
.sidebar-avatar{
  object-fit:cover;
  border:1px solid rgba(255,255,255,.09);
  background:#1f2937;
}
.sidebar-avatar-letter{ font-size:12px; }
.sidebar-user-text{ min-width:0; }
.sidebar-user-name{
  font-size:.86rem;
  font-weight:700;
  color:#fff;
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.sidebar-user-job{
  font-size:.74rem;
  color:#c3cedd;
  line-height:1.1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}


/* === Sidebar layout fix: menu scroll only, user fixed bottom === */
.app-sidebar{
  display:flex !important;
  flex-direction:column !important;
  justify-content:flex-start !important;
  height:100vh !important;
  overflow:hidden !important;
}
.sidebar-menu{
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  padding-bottom:10px !important;
  margin-bottom:0 !important;
}
.sidebar-user-card{
  margin-top:auto !important;
  flex:0 0 auto !important;
  border-top:1px solid rgba(255,255,255,.08) !important;
  padding-top:.7rem !important;
}

/* === Sidebar polish: cleaner scroll + balanced spacing === */
.sidebar-menu{
  padding-inline-end: 4px !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.26) transparent;
}
.sidebar-menu::-webkit-scrollbar{
  width: 6px;
}
.sidebar-menu::-webkit-scrollbar-track{
  background: transparent;
}
.sidebar-menu::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.22);
  border-radius: 999px;
}
.sidebar-menu::-webkit-scrollbar-thumb:hover{
  background: rgba(255,255,255,.34);
}
.app-sidebar .nav-item{
  margin-bottom: 4px !important;
}
.app-sidebar .nav-item.mt-2.text-muted.small.px-2{
  margin-top: 10px !important;
  margin-bottom: 6px !important;
  padding-inline: 6px !important;
  opacity: .82;
}
.app-sidebar .nav-link,
.app-nav .nav-link{
  border-radius: 14px !important;
}
.sidebar-user-card{
  padding-bottom: 2px !important;
}


/* === AI final sidebar/dashboard polish === */
.app-shell{
  align-items:stretch !important;
}
main.flex-grow-1.p-4{
  min-width:0 !important;
}
.app-sidebar{
  position:sticky !important;
  top:0 !important;
  align-self:stretch !important;
  height:100vh !important;
  max-height:100vh !important;
  min-height:100vh !important;
  width:168px !important;
  flex:0 0 168px !important;
  overflow:hidden !important;
  padding-top:1rem !important;
  padding-bottom:.85rem !important;
}
.sidebar-menu{
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  scroll-behavior:smooth;
  scrollbar-gutter:stable both-edges;
}
.app-sidebar .nav-link,
.app-nav .nav-link{
  position:relative;
  font-size:1rem !important;
  font-weight:700 !important;
  min-height:42px !important;
  padding:.68rem .60rem !important;
  gap:.46rem !important;
  border-radius:14px !important;
  border:1px solid transparent !important;
  transition:background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease !important;
}
.app-sidebar .nav-link i,
.app-nav .nav-link i{
  width:1.15rem !important;
  flex:0 0 1.15rem !important;
  font-size:1.03rem !important;
}
.app-sidebar .nav-link:hover,
.app-nav .nav-link:hover{
  background:rgba(59,130,246,.18) !important;
  border-color:rgba(96,165,250,.32) !important;
  box-shadow:inset 0 0 0 1px rgba(125,211,252,.14) !important;
  transform:translateY(-1px);
}
.app-sidebar .nav-link.active,
.app-nav .nav-link.active{
  background:linear-gradient(135deg, rgba(37,99,235,.34), rgba(14,165,233,.18)) !important;
  border-color:rgba(96,165,250,.42) !important;
  box-shadow:0 8px 18px rgba(2,6,23,.18), inset 0 0 0 1px rgba(125,211,252,.18) !important;
}
.app-sidebar .nav-link.active::before,
.app-nav .nav-link.active::before{
  content:"";
  position:absolute;
  inset-block:8px;
  inset-inline-end:-7px;
  width:3px;
  border-radius:999px;
  background:linear-gradient(180deg, #7dd3fc, #60a5fa);
  box-shadow:0 0 10px rgba(96,165,250,.42);
}
.app-sidebar .nav-link.active span,
.app-sidebar .nav-link.active i,
.app-nav .nav-link.active span,
.app-nav .nav-link.active i{
  color:#f8fbff !important;
}
.app-sidebar .text-muted{
  font-size:.78rem !important;
  font-weight:600 !important;
  opacity:.88 !important;
}
.sidebar-user-card{
  margin-top:auto !important;
  background:rgba(37,99,235,.08) !important;
  border-radius:16px !important;
  padding:.72rem !important;
  border:1px solid rgba(125,211,252,.1) !important;
}
.sidebar-user-row{
  gap:.5rem !important;
  align-items:center !important;
}
.sidebar-user-name{
  font-size:.88rem !important;
  line-height:1.2 !important;
}
.sidebar-user-job{
  font-size:.74rem !important;
}
.sidebar-avatar,
.sidebar-avatar-letter{
  width:30px !important;
  height:30px !important;
  flex:0 0 30px !important;
}
.app-sidebar .btn.btn-outline-danger.w-100{
  min-height:34px !important;
  font-size:.78rem !important;
  white-space:nowrap !important;
}
.recent-activity-toggle{
  min-width:130px;
  border-radius:999px;
  font-weight:700;
}
.recent-activity-extra.d-none{
  display:none !important;
}


/* === Final sidebar + recent activity fix === */
.app-sidebar{
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
}
.sidebar-menu{
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  padding-inline:2px !important;
}
.app-sidebar .nav-link,
.app-nav .nav-link{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  width:100% !important;
  min-width:0 !important;
  gap:.55rem !important;
  color:#eef6ff !important;
}
.app-sidebar .nav-link span,
.app-nav .nav-link span{
  flex:1 1 auto !important;
  min-width:0 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}
.app-sidebar .nav-link i,
.app-nav .nav-link i{
  flex:0 0 1.1rem !important;
  text-align:center !important;
  opacity:.95 !important;
}
.app-sidebar .nav-link:hover,
.app-nav .nav-link:hover{
  color:#ffffff !important;
  background:rgba(59,130,246,.22) !important;
  border-color:rgba(125,211,252,.36) !important;
}
.app-sidebar .nav-link.active,
.app-nav .nav-link.active{
  color:#fff !important;
}
.app-sidebar .nav-link.active::before,
.app-nav .nav-link.active::before{
  inset-inline-start:6px !important;
  inset-inline-end:auto !important;
}
.app-sidebar .text-muted{
  display:block !important;
  font-size:.72rem !important;
  line-height:1.2 !important;
  padding-inline:.45rem !important;
  color:rgba(226,238,255,.72) !important;
}
.sidebar-user-card{
  margin-top:.75rem !important;
}
.sidebar-user-row{
  justify-content:space-between !important;
}
.sidebar-user-text{
  flex:1 1 auto !important;
  min-width:0 !important;
}
.sidebar-user-name,
.sidebar-user-job{
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
.recent-activity-list{
  display:flex;
  flex-direction:column;
  gap:.7rem;
}
.recent-activity-item{
  display:flex;
  align-items:flex-start;
  gap:.7rem;
}
.recent-activity-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background:linear-gradient(135deg,#22d3ee,#2563eb);
  box-shadow:0 0 0 4px rgba(34,211,238,.10);
  flex:0 0 10px;
  margin-top:.35rem;
}
.recent-activity-content{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.8rem;
  width:100%;
}
.recent-activity-text{
  font-weight:600;
  color:#f8fbff;
}
.recent-activity-text a{
  color:inherit;
  text-decoration:none;
}
.recent-activity-text a:hover{
  text-decoration:underline;
}
.recent-activity-time{
  flex:0 0 78px;
  font-size:.82rem;
  color:#bfd0ea;
  text-align:left;
}
.recent-activity-filters{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:1rem;
  align-items:end;
}
.recent-activity-filter-actions{
  display:flex;
  gap:.75rem;
  flex-wrap:wrap;
}
.recent-activity-full-list{
  display:flex;
  flex-direction:column;
  gap:.8rem;
}
.recent-activity-row-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:1rem 1.1rem;
  border-radius:16px;
  border:1px solid rgba(125,211,252,.12);
  background:rgba(15,23,42,.38);
}
.recent-activity-row-main{
  display:flex;
  align-items:center;
  gap:.8rem;
  min-width:0;
}
.recent-activity-row-text{
  font-weight:700;
  min-width:0;
}
.recent-activity-row-text a{ color:#eef6ff; text-decoration:none; }
.recent-activity-row-text a:hover{ text-decoration:underline; }
.recent-activity-row-time{
  color:#bfd0ea;
  font-size:.85rem;
  white-space:nowrap;
}
.activity-type-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:84px;
  padding:.35rem .7rem;
  border-radius:999px;
  background:rgba(59,130,246,.16);
  border:1px solid rgba(125,211,252,.18);
  color:#eaf4ff;
  font-size:.8rem;
  font-weight:700;
}
@media (max-width: 991.98px){
  .recent-activity-filters{ grid-template-columns:1fr; }
  .recent-activity-row-card,
  .recent-activity-content{ flex-direction:column; align-items:flex-start; }
  .recent-activity-time,
  .recent-activity-row-time{ text-align:right; }
}


/* === hard fix: sidebar item overlap + scroll bleed === */
.app-sidebar{
  isolation:isolate !important;
}
.sidebar-menu{
  display:flex !important;
  flex-direction:column !important;
  flex-wrap:nowrap !important;
  align-items:stretch !important;
  gap:4px !important;
  list-style:none !important;
  margin:0 !important;
  padding:0 2px 8px 2px !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  overscroll-behavior:contain !important;
  scroll-behavior:auto !important;
  scrollbar-gutter:stable !important;
  overflow-anchor:none !important;
}
.sidebar-menu > .nav-item{
  flex:0 0 auto !important;
  min-height:auto !important;
}
.app-sidebar .nav-link,
.app-nav .nav-link{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  flex-wrap:nowrap !important;
  width:100% !important;
  min-width:0 !important;
  overflow:hidden !important;
  white-space:nowrap !important;
  transform:none !important;
}
.app-sidebar .nav-link:hover,
.app-nav .nav-link:hover{
  transform:none !important;
}
.app-sidebar .nav-link span,
.app-nav .nav-link span{
  display:block !important;
  flex:1 1 auto !important;
  min-width:0 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}
.app-sidebar .nav-link i,
.app-nav .nav-link i{
  order:2 !important;
  margin-inline-start:auto !important;
  margin-inline-end:0 !important;
}
.app-sidebar .nav-link span,
.app-nav .nav-link span{
  order:1 !important;
}
.app-sidebar .text-muted.small{
  flex:0 0 auto !important;
  display:block !important;
  line-height:1.15 !important;
}


/* === Hide sidebar menu scrollbar but keep scrolling === */
.sidebar-menu{
  -ms-overflow-style:none !important;
  scrollbar-width:none !important;
}
.sidebar-menu::-webkit-scrollbar{
  width:0 !important;
  height:0 !important;
  display:none !important;
}

/* ===============================
   Modern auth screen
   =============================== */
.modern-login-page{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px 18px 22px;
}

.modern-login-card{
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 28px;
  background: linear-gradient(135deg, rgba(9,16,34,.78), rgba(8,15,32,.62));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 30px;
  box-shadow: 0 28px 80px rgba(0,0,0,.42);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
}

.modern-login-side{
  position: relative;
  padding: 38px 34px;
  background:
    radial-gradient(520px 260px at 80% 20%, rgba(59,130,246,.22), transparent 60%),
    radial-gradient(420px 240px at 15% 80%, rgba(6,182,212,.16), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.00));
}

.modern-login-side::after{
  content:"";
  position:absolute;
  inset: 20px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 24px;
  pointer-events:none;
}

.modern-login-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 14px;
  border-radius:999px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.88);
  font-size:.9rem;
  margin-bottom:24px;
}

.modern-login-brand{
  display:flex;
  align-items:center;
  gap:16px;
  margin-bottom:28px;
}

.modern-login-logo{
  width:72px;
  height:72px;
  border-radius:22px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(135deg, rgba(56,189,248,.85), rgba(99,102,241,.88));
  border:1px solid rgba(255,255,255,.18);
  box-shadow: 0 12px 28px rgba(37,99,235,.26);
  overflow:hidden;
  flex: 0 0 72px;
}

.modern-login-logo.has-image{
  background: rgba(255,255,255,.08);
}

.modern-login-logo img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.modern-login-logo span{
  font-size:2rem;
  font-weight:900;
  color:#fff;
}

.modern-login-system-name{
  font-size:1.85rem;
  font-weight:900;
  color:#fff;
  line-height:1.1;
}

.modern-login-system-subtitle{
  color: rgba(255,255,255,.7);
  margin-top:6px;
  font-size:1rem;
}

.modern-login-heading{
  font-size:2.2rem;
  line-height:1.28;
  margin: 0 0 14px;
  color:#fff;
  font-weight:900;
  max-width: 480px;
}

.modern-login-description{
  color: rgba(255,255,255,.78);
  font-size:1.02rem;
  line-height:1.9;
  max-width: 500px;
  margin-bottom:26px;
}

.modern-login-features{
  display:grid;
  gap:14px;
  max-width: 430px;
}

.modern-login-feature{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 16px;
  border-radius:18px;
  background: rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08);
  color:#fff;
}

.modern-login-feature i{
  width:40px;
  height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  background: linear-gradient(135deg, rgba(34,197,94,.18), rgba(56,189,248,.18));
  color:#7dd3fc;
  font-size:1.15rem;
}

.modern-login-form-panel{
  padding: 40px 34px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  background: linear-gradient(180deg, rgba(9,16,34,.66), rgba(9,16,34,.50));
  border-right: 1px solid rgba(255,255,255,.08);
}

.modern-login-form-header{
  margin-bottom:26px;
}

.modern-login-form-title{
  font-size:1.75rem;
  font-weight:900;
  color:#fff;
  margin-bottom:6px;
}

.modern-login-form-note{
  color: rgba(255,255,255,.7);
}

.modern-login-form{
  width:100%;
}

.modern-field-group{
  margin-bottom:18px;
}

.modern-field-label{
  display:block;
  font-size:.96rem;
  color:rgba(255,255,255,.88);
  margin-bottom:8px;
}

.modern-field-wrap{
  position:relative;
}

.modern-field-icon{
  position:absolute;
  right:14px;
  top:50%;
  transform:translateY(-50%);
  width:44px;
  height:44px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(135deg, rgba(37,99,235,.22), rgba(6,182,212,.22));
  color:#bfdbfe;
  border:1px solid rgba(255,255,255,.08);
  pointer-events:none;
}

.modern-field-input{
  min-height:62px;
  border-radius:18px !important;
  padding: 0 72px 0 18px !important;
  background: rgba(255,255,255,.06) !important;
  border:1px solid rgba(255,255,255,.12) !important;
  font-size:1.06rem;
}

.modern-field-input:focus{
  background: rgba(255,255,255,.08) !important;
}

.modern-login-options{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin: 6px 0 20px;
  color: rgba(255,255,255,.74);
}

.modern-login-help{
  font-size:.92rem;
}

.modern-login-submit{
  width:100%;
  min-height:58px;
  border:none !important;
  border-radius:18px !important;
  color:#fff !important;
  font-size:1.18rem;
  font-weight:800;
  background: linear-gradient(135deg, #06b6d4, #2563eb 52%, #7c3aed) !important;
  box-shadow: 0 18px 34px rgba(37,99,235,.24);
}

.modern-login-submit:hover{
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.modern-login-mini-note{
  margin-top:16px;
  text-align:center;
  color: rgba(255,255,255,.68);
  font-size:.92rem;
  line-height:1.8;
}

.modern-login-footer{
  width:min(1120px, 100%);
  margin-top:16px;
  padding: 0 6px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  color: rgba(255,255,255,.82);
  font-size:.95rem;
}

.modern-login-footer a{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#fff;
  text-decoration:none;
  padding:10px 14px;
  border-radius:999px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
}

.modern-login-footer a:hover{
  text-decoration:none;
  background: rgba(37,211,102,.16);
  border-color: rgba(37,211,102,.28);
}

.modern-login-footer i{
  color:#25d366;
  font-size:1.15rem;
}

@media (max-width: 991.98px){
  .modern-login-card{
    grid-template-columns: 1fr;
  }

  .modern-login-form-panel{
    border-right: 0;
    border-top: 1px solid rgba(255,255,255,.08);
  }
}

@media (max-width: 767.98px){
  .modern-login-page{
    padding: 18px 12px 16px;
  }

  .modern-login-card{
    border-radius: 22px;
    gap:0;
  }

  .modern-login-side,
  .modern-login-form-panel{
    padding: 24px 18px;
  }

  .modern-login-heading{
    font-size: 1.7rem;
  }

  .modern-login-system-name,
  .modern-login-form-title{
    font-size: 1.45rem;
  }

  .modern-login-footer{
    flex-direction:column;
    text-align:center;
  }
}


/* ===============================
   Modern login requested tweaks
   =============================== */
.modern-login-card{
  grid-template-columns: .95fr 1.05fr;
  gap: 0;
}

.modern-login-side{ order:2; }
.modern-login-form-panel{ order:1; }

.modern-password-wrap .modern-field-input{
  padding-left: 64px !important;
}

.modern-password-toggle{
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%);
  width:42px;
  height:42px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color:#dbeafe;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:.2s ease;
}

.modern-password-toggle:hover,
.modern-password-toggle:focus{
  background: rgba(37,99,235,.18);
  border-color: rgba(96,165,250,.32);
  outline:none;
}

.modern-login-card.shake-ready{
  animation: modern-login-shake .45s ease-in-out;
}

@keyframes modern-login-shake{
  0%,100%{ transform: translateX(0); }
  20%{ transform: translateX(8px); }
  40%{ transform: translateX(-8px); }
  60%{ transform: translateX(6px); }
  80%{ transform: translateX(-6px); }
}

.modern-login-meta-box{
  grid-column: 1 / -1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding: 16px 22px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
}

.modern-login-meta-item{
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-height:50px;
  padding: 10px 14px;
  border-radius:18px;
  background: rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.92);
}

.modern-login-meta-label{
  color: rgba(255,255,255,.66);
  font-size:.9rem;
}

.modern-login-meta-link{
  color:#fff;
  text-decoration:none;
}

.modern-login-meta-link:hover{
  text-decoration:none;
  background: rgba(37,211,102,.16);
  border-color: rgba(37,211,102,.28);
}

.modern-login-meta-link i{
  color:#25d366;
  font-size:1.15rem;
}

@media (max-width: 991.98px){
  .modern-login-side,
  .modern-login-form-panel{
    order: initial;
  }
}

@media (max-width: 767.98px){
  .modern-login-meta-box{
    flex-direction:column;
    align-items:stretch;
    text-align:center;
    padding: 14px;
  }

  .modern-login-meta-item,
  .modern-login-meta-link{
    justify-content:center;
  }
}

/* ===============================
   Login redesign: centered + cleaner
   =============================== */
.modern-login-page-simple{
  position: relative;
  min-height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 32px 16px;
  overflow:hidden;
  background:
    radial-gradient(620px 320px at 10% 8%, rgba(34,211,238,.16), transparent 62%),
    radial-gradient(520px 300px at 92% 92%, rgba(59,130,246,.14), transparent 58%),
    linear-gradient(180deg, rgba(5,10,22,.22), rgba(5,10,22,.40));
}

.modern-login-page-simple::before,
.modern-login-page-simple::after{
  content:"";
  position:absolute;
  inset:auto;
  width:340px;
  height:340px;
  border-radius:50%;
  filter: blur(70px);
  opacity:.28;
  pointer-events:none;
}

.modern-login-page-simple::before{
  top:-90px;
  left:-100px;
  background: rgba(14,165,233,.55);
}

.modern-login-page-simple::after{
  right:-110px;
  bottom:-110px;
  background: rgba(37,99,235,.48);
}

.modern-login-card-simple{
  position:relative;
  width:min(480px, 100%);
  display:block;
  isolation:isolate;
  background: linear-gradient(180deg, rgba(8,15,32,.86), rgba(7,12,25,.78));
  border:1px solid rgba(255,255,255,.12);
  border-radius: 30px;
  box-shadow: 0 32px 90px rgba(0,0,0,.42);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  overflow:hidden;
}

.modern-login-card-simple::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  padding:1px;
  background: linear-gradient(135deg, rgba(56,189,248,.45), rgba(255,255,255,.05), rgba(59,130,246,.35));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events:none;
}

.modern-login-orb{
  position:absolute;
  border-radius:50%;
  filter: blur(0px);
  pointer-events:none;
  opacity:.85;
  z-index:-1;
}

.modern-login-orb-one{
  top:20px;
  right:28px;
  width:90px;
  height:90px;
  background: radial-gradient(circle at 30% 30%, rgba(34,211,238,.55), rgba(37,99,235,.08) 70%);
}

.modern-login-orb-two{
  left:24px;
  bottom:90px;
  width:120px;
  height:120px;
  background: radial-gradient(circle at 50% 50%, rgba(59,130,246,.24), rgba(59,130,246,0) 72%);
}

.modern-login-card-simple .modern-login-top{
  padding: 34px 30px 12px;
  text-align:center;
}

.modern-login-brand-stack{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
}

.modern-login-logo-centered{
  margin-inline:auto;
}

.modern-login-card-simple .modern-login-logo{
  width:78px;
  height:78px;
  border-radius:24px;
  box-shadow: 0 16px 38px rgba(37,99,235,.22);
  border:1px solid rgba(255,255,255,.18);
}

.modern-login-card-simple .modern-login-logo img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.modern-login-card-simple .modern-login-system-name{
  font-size: 1.85rem;
  font-weight:900;
  letter-spacing:.3px;
}

.modern-login-card-simple .modern-login-system-subtitle{
  font-size: .95rem;
  color: rgba(255,255,255,.72);
  margin-bottom:2px;
}

.modern-login-header-line{
  width:88px;
  height:4px;
  margin: 18px auto 16px;
  border-radius:999px;
  background: linear-gradient(90deg, rgba(34,211,238,1), rgba(59,130,246,1));
  box-shadow: 0 8px 24px rgba(34,211,238,.28);
}

.modern-login-card-simple .modern-login-heading{
  max-width:none;
  font-size: 2rem;
  font-weight:900;
  margin:0;
}

.modern-login-card-simple .modern-login-form{
  padding: 12px 30px 26px;
}

.modern-login-card-simple .modern-field-group{
  margin-bottom:18px;
}

.modern-login-card-simple .modern-field-label{
  margin-bottom:9px;
  color: rgba(255,255,255,.92);
  font-weight:700;
}

.modern-login-card-simple .modern-field-wrap{
  position:relative;
}

.modern-login-card-simple .modern-field-input{
  min-height: 60px;
  padding-inline: 58px 18px;
  border-radius: 18px !important;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.04)) !important;
  border:1px solid rgba(255,255,255,.10) !important;
  color:#fff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 10px 24px rgba(0,0,0,.10);
}

.modern-login-card-simple .modern-field-input::placeholder{
  color: rgba(255,255,255,.42);
}

.modern-login-card-simple .modern-field-input:focus{
  border-color: rgba(56,189,248,.42) !important;
  box-shadow: 0 0 0 .18rem rgba(34,211,238,.12), inset 0 1px 0 rgba(255,255,255,.05) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.04)) !important;
  color:#fff !important;
}

.modern-login-card-simple .modern-field-input:-webkit-autofill,
.modern-login-card-simple .modern-field-input:-webkit-autofill:hover,
.modern-login-card-simple .modern-field-input:-webkit-autofill:focus,
.modern-login-card-simple .modern-field-input:-webkit-autofill:active{
  -webkit-text-fill-color:#fff !important;
  caret-color:#fff;
  border:1px solid rgba(56,189,248,.24) !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(12,20,40,.92) inset, 0 0 0 .18rem rgba(34,211,238,.10) !important;
  box-shadow: 0 0 0 1000px rgba(12,20,40,.92) inset, 0 0 0 .18rem rgba(34,211,238,.10) !important;
  transition: background-color 9999s ease-in-out 0s;
}

.modern-login-card-simple .modern-field-icon,
.modern-login-card-simple .modern-password-toggle{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:42px;
  height:42px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.78);
}

.modern-login-card-simple .modern-field-icon{
  right:10px;
}

.modern-login-card-simple .modern-password-toggle{
  left:10px;
}

.modern-login-card-simple .modern-login-options{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin: 4px 0 20px;
  font-size: .94rem;
}

.modern-login-card-simple .form-check{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0;
}

.modern-login-card-simple .form-check-input{
  margin:0;
  width:1.1rem;
  height:1.1rem;
  background-color: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.18);
}

.modern-login-card-simple .form-check-label,
.modern-login-card-simple .modern-login-help{
  color: rgba(255,255,255,.74);
}

.modern-login-card-simple .modern-login-submit{
  min-height: 58px;
  width:100%;
  border:none !important;
  border-radius: 18px !important;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  font-weight:800;
  font-size:1rem;
  color:#fff;
  background: linear-gradient(90deg, #20d9d2 0%, #2ea5ff 52%, #4f7cff 100%);
  box-shadow: 0 18px 40px rgba(46,165,255,.28);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.modern-login-card-simple .modern-login-submit:hover{
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 22px 44px rgba(46,165,255,.34);
}

.modern-login-card-simple .modern-login-submit:active{
  transform: translateY(0);
}

.modern-login-card-simple .modern-login-mini-note{
  margin-top: 16px;
  padding: 14px 16px;
  border-radius:16px;
  background: rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.68);
  font-size: .9rem;
  line-height:1.8;
  text-align:center;
}

.modern-login-meta-box-simple{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 18px 20px 20px;
  border-top:1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.018));
}

.modern-login-meta-box-simple .modern-login-meta-item{
  min-height: 58px;
  justify-content:center;
  text-align:center;
  border-radius:18px;
  flex-direction:column;
  gap:4px;
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
}

.modern-login-meta-box-simple .modern-login-meta-link{
  flex-direction:row;
  gap:8px;
}

.modern-login-meta-box-simple .modern-login-meta-link span{
  direction:ltr;
}

.modern-login-card-simple.shake-ready{
  animation: modern-login-shake .45s ease-in-out;
}

@media (max-width: 767.98px){
  .modern-login-page-simple{
    padding: 18px 12px;
  }

  .modern-login-card-simple{
    width:min(100%, 100%);
    border-radius: 24px;
  }

  .modern-login-card-simple .modern-login-top,
  .modern-login-card-simple .modern-login-form{
    padding-left:18px;
    padding-right:18px;
  }

  .modern-login-card-simple .modern-login-logo{
    width:70px;
    height:70px;
    border-radius:22px;
  }

  .modern-login-card-simple .modern-login-system-name{
    font-size:1.65rem;
  }

  .modern-login-card-simple .modern-login-heading{
    font-size:1.75rem;
  }

  .modern-login-card-simple .modern-login-options{
    align-items:flex-start;
  }

  .modern-login-meta-box-simple{
    grid-template-columns:1fr;
    padding: 14px 14px 16px;
  }
}

@media (max-width: 420px){
  .modern-login-card-simple .modern-login-top{
    padding-top: 26px;
  }

  .modern-login-card-simple .modern-field-input{
    min-height:56px;
    font-size:.95rem;
  }

  .modern-login-card-simple .modern-field-icon,
  .modern-login-card-simple .modern-password-toggle{
    width:38px;
    height:38px;
    border-radius:12px;
  }

  .modern-login-card-simple .modern-login-submit{
    min-height:54px;
  }
}


/* ===== final dashboard quick actions + license refresh ===== */
.hero-actions{
  display:grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap:.6rem !important;
  align-items:stretch;
}
.hero-actions .btn-action{
  min-width:0 !important;
  width:100% !important;
  min-height:44px !important;
  height:44px !important;
  padding:.52rem .6rem !important;
  border-radius:12px !important;
  font-size:.82rem !important;
  font-weight:700 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:.4rem !important;
  white-space:nowrap;
}
.hero-actions .btn-action span{ overflow:hidden; text-overflow:ellipsis; }
.hero-actions .btn-action i{ font-size:.95rem !important; }

.overview-panel{
  display:flex;
  flex-direction:column;
}
.overview-grid{
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap:.7rem !important;
}
.overview-card{
  min-height:118px !important;
  padding:.95rem !important;
  border-radius:18px !important;
}
.overview-card-icon{
  width:40px !important;
  height:40px !important;
  border-radius:14px !important;
}
.overview-card-title{
  font-size:.95rem !important;
  padding-inline-end:3rem !important;
}
.overview-card-value{
  margin-top:.7rem !important;
  font-size:1.9rem !important;
}
.overview-card-sub{
  font-size:.88rem !important;
}

.compact-alert-card{
  min-height:124px;
  border-radius:18px;
  padding:.95rem 1rem;
  display:flex;
  flex-direction:column;
  justify-content:center;
  text-align:center;
  background: rgba(255,255,255,.04) !important;
  border:1px solid rgba(255,255,255,.1) !important;
}
.compact-alert-card.warning,
.compact-alert-card.danger,
.compact-alert-card.info{
  background: rgba(255,255,255,.04) !important;
}
.compact-alert-card .alert-card-title{
  font-size:1rem;
  font-weight:800;
  color:#f8fbff;
}
.compact-alert-card .alert-card-number{
  font-size:1.9rem;
  margin:.25rem 0;
  color:#fff;
}
.compact-alert-card.warning .alert-card-number{ color:#f5d487; }
.compact-alert-card.danger .alert-card-number{ color:#f3a8c8; }
.compact-alert-card.info .alert-card-number{ color:#7ed7ff; }
.compact-alert-card .alert-card-sub{
  font-size:.86rem;
  color:rgba(255,255,255,.72);
}

.license-page{
  width:min(100%, 1180px);
  margin-inline:auto;
  animation:fadeUp .35s ease both;
}
.license-page-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
  margin-bottom:1.2rem;
}
.license-kicker{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  padding:.4rem .8rem;
  border-radius:999px;
  background:rgba(37,99,235,.18);
  border:1px solid rgba(255,255,255,.1);
  color:#cfe2ff;
  font-weight:700;
  margin-bottom:.75rem;
}
.license-title{
  font-size:2.2rem;
  font-weight:900;
  color:#fff;
  margin-bottom:.35rem;
}
.license-subtitle{
  color:rgba(255,255,255,.74);
  max-width:760px;
  margin-bottom:0;
}
.license-grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:1rem;
  margin-bottom:1rem;
}
.license-card{
  background:linear-gradient(180deg, rgba(17,24,39,.82), rgba(11,18,31,.74));
  border:1px solid rgba(255,255,255,.1);
  border-radius:24px;
  padding:1.4rem;
  box-shadow:0 18px 42px rgba(0,0,0,.24);
  backdrop-filter:blur(12px);
}
.license-status-card.is-valid{ border-color:rgba(45,212,191,.26); }
.license-status-card.is-invalid{ border-color:rgba(244,114,182,.28); }
.license-status-top{
  display:flex;
  align-items:center;
  gap:1rem;
  margin-bottom:1rem;
}
.license-status-icon{
  width:58px;
  height:58px;
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.45rem;
  color:#fff;
  background:linear-gradient(135deg, rgba(56,189,248,.92), rgba(59,130,246,.78));
}
.license-status-card.is-valid .license-status-icon{ background:linear-gradient(135deg, rgba(45,212,191,.92), rgba(6,182,212,.78)); }
.license-status-card.is-invalid .license-status-icon{ background:linear-gradient(135deg, rgba(244,114,182,.92), rgba(225,29,72,.78)); }
.license-section-label{
  color:rgba(255,255,255,.66);
  font-size:.82rem;
  font-weight:700;
}
.license-status-card h2,
.license-card-title{
  color:#fff;
  font-weight:900;
  margin:0;
}
.license-card-title{ margin:.25rem 0 1rem; font-size:1.25rem; }
.license-reason{
  color:rgba(255,255,255,.82);
  margin-bottom:1rem;
}
.license-meta-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.75rem;
}
.license-meta-box,
.license-path-box{
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.035);
  border-radius:16px;
  padding:.9rem 1rem;
}
.license-meta-box span,
.license-path-box span{
  display:block;
  color:rgba(255,255,255,.62);
  font-size:.8rem;
  margin-bottom:.2rem;
}
.license-meta-box strong,
.license-path-box code,
.license-device-box{
  color:#fff;
  font-weight:800;
}
.license-notes{
  margin-top:1rem;
  display:grid;
  gap:.55rem;
}
.license-note-item,
.license-flash{
  display:flex;
  align-items:flex-start;
  gap:.6rem;
  border-radius:16px;
  padding:.85rem 1rem;
}
.license-note-item{
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
  color:rgba(255,255,255,.82);
}
.license-note-item i{ margin-top:.1rem; }
.license-details-list{ display:grid; gap:.75rem; }
.license-detail-row{
  display:flex;
  justify-content:space-between;
  gap:1rem;
  padding:.85rem 1rem;
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  background:rgba(255,255,255,.03);
}
.license-detail-row span{ color:rgba(255,255,255,.68); }
.license-detail-row strong{ color:#fff; text-align:left; }
.license-feature-tags{
  display:flex;
  flex-wrap:wrap;
  gap:.55rem;
}
.license-feature-tag{
  display:inline-flex;
  align-items:center;
  padding:.45rem .8rem;
  border-radius:999px;
  background:rgba(37,99,235,.18);
  border:1px solid rgba(255,255,255,.09);
  color:#e8f2ff;
  font-weight:700;
  font-size:.82rem;
}
.license-form .license-input{
  background:rgba(255,255,255,.05) !important;
  border:1px solid rgba(255,255,255,.1) !important;
  color:#fff !important;
  border-radius:14px !important;
}
.license-textarea{ min-height:170px; }
.license-submit-btn{
  min-height:46px;
  border-radius:14px;
  padding-inline:1.2rem;
  font-weight:700;
}
.license-device-box{
  user-select:all;
  white-space:pre-wrap;
  word-break:break-all;
  border:1px dashed rgba(255,255,255,.18);
  background:rgba(255,255,255,.04);
  border-radius:18px;
  padding:1rem;
  margin:1rem 0 .9rem;
  line-height:1.7;
}
.license-help-text{ color:rgba(255,255,255,.76); }
.license-flash{ margin-bottom:1rem; }
.license-flash.success{
  background:rgba(45,212,191,.12);
  border:1px solid rgba(45,212,191,.22);
  color:#d1fae5;
}
.license-flash.error{
  background:rgba(244,114,182,.11);
  border:1px solid rgba(244,114,182,.2);
  color:#ffd7e8;
}
.license-path-mini{ font-size:.9rem; }

@media (max-width: 1399.98px){
  .hero-actions{ grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
  .overview-grid{ grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
@media (max-width: 1199.98px){
  .hero-actions{ grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .overview-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .license-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 767.98px){
  .hero-actions{ grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .overview-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .license-page-head{ flex-direction:column; }
  .license-title{ font-size:1.75rem; }
  .license-meta-grid{ grid-template-columns:1fr; }
}
@media (max-width: 575.98px){
  .hero-actions{ grid-template-columns: 1fr !important; }
  .overview-grid{ grid-template-columns: 1fr !important; }
  .hero-actions .btn-action{ font-size:.78rem !important; }
}

/* ===== dashboard quick actions: balanced 3 + 2 layout ===== */
.hero-command .hero-actions{
  display:grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap:.8rem !important;
  align-items:stretch !important;
}
.hero-command .hero-actions .btn-action{
  min-width:0 !important;
  width:100% !important;
  min-height:56px !important;
  height:56px !important;
  padding:.78rem .9rem !important;
  border-radius:16px !important;
  font-size:.92rem !important;
  font-weight:800 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:.52rem !important;
  white-space:nowrap !important;
  box-shadow:0 12px 24px rgba(2,8,23,.14) !important;
}
.hero-command .hero-actions .btn-action span{
  overflow:hidden;
  text-overflow:ellipsis;
}
.hero-command .hero-actions .btn-action i{
  font-size:1.02rem !important;
}
.hero-command .hero-actions .btn-action:nth-child(4){ grid-column: 1 / span 2; }
.hero-command .hero-actions .btn-action:nth-child(5){ grid-column: 3; }

/* restore نظرة عامة اليوم */
.overview-grid{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:1rem !important;
}
.overview-card{
  position:relative;
  display:block;
  min-height:152px !important;
  padding:1.15rem !important;
  border-radius:22px !important;
  border:1px solid rgba(255,255,255,.12) !important;
  background: linear-gradient(180deg, rgba(53,90,170,.28), rgba(37,53,94,.20)) !important;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.overview-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0,0,0,.22);
  border-color: rgba(255,255,255,.22) !important;
}
.overview-card-icon{
  position:absolute;
  top:1rem;
  inset-inline-end:1rem;
  width:44px !important;
  height:44px !important;
  border-radius:16px !important;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-size:1.05rem;
  background: linear-gradient(135deg, rgba(56,189,248,.95), rgba(59,130,246,.78));
  box-shadow: 0 10px 24px rgba(56,189,248,.22);
}
.overview-card-members .overview-card-icon{
  background: linear-gradient(135deg, rgba(14,165,233,.98), rgba(59,130,246,.82));
}
.overview-card-checkin .overview-card-icon{
  background: linear-gradient(135deg, rgba(45,212,191,.98), rgba(6,182,212,.78));
}
.overview-card-store .overview-card-icon{
  background: linear-gradient(135deg, rgba(250,204,21,.98), rgba(245,158,11,.82));
}
.overview-card-revenue .overview-card-icon{
  background: linear-gradient(135deg, rgba(96,165,250,.98), rgba(14,165,233,.78));
}
.overview-card-title{
  color:rgba(255,255,255,.82) !important;
  font-weight:700;
  font-size:1.05rem !important;
  padding-top:.1rem;
  padding-inline-end:3.4rem !important;
}
.overview-card-value{
  margin-top:1rem !important;
  font-size:2.2rem !important;
  font-weight:900;
  color:#fff;
  line-height:1;
}
.overview-card-sub{
  margin-top:.5rem;
  color:rgba(255,255,255,.76) !important;
  font-size:.98rem !important;
}

/* restore تنبيهات مهمة */
.compact-alert-card{
  min-height:unset !important;
  border-radius:20px !important;
  padding:1rem 1.1rem !important;
  display:block !important;
  text-align:initial !important;
  background: rgba(255,255,255,.05) !important;
  border:1px solid rgba(255,255,255,.10) !important;
}
.compact-alert-card.warning{
  background: linear-gradient(135deg, rgba(207,168,92,.34), rgba(150,118,58,.16)) !important;
}
.compact-alert-card.danger{
  background: linear-gradient(135deg, rgba(201,120,168,.34), rgba(151,83,131,.16)) !important;
}
.compact-alert-card.info{
  background: linear-gradient(135deg, rgba(70,182,212,.34), rgba(39,123,167,.16)) !important;
}
.compact-alert-card .alert-card-title{
  font-weight:700;
  margin-bottom:.35rem;
  font-size:1rem !important;
  color:#fff !important;
}
.compact-alert-card .alert-card-number{
  font-size:2rem !important;
  font-weight:800;
  line-height:1;
  color:#fff !important;
  margin:0 !important;
}
.compact-alert-card .alert-card-sub{
  opacity:.85;
  margin-top:.4rem;
  font-size:.92rem !important;
  color:rgba(255,255,255,.8) !important;
}

@media (max-width: 1399.98px){
  .hero-command .hero-actions{ grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 1199.98px){
  .hero-command .hero-actions{ grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .hero-command .hero-actions .btn-action:nth-child(4),
  .hero-command .hero-actions .btn-action:nth-child(5){ grid-column:auto; }
  .overview-grid{ grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
}
@media (max-width: 767.98px){
  .hero-command .hero-actions{ grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .hero-command .hero-actions .btn-action:nth-child(4),
  .hero-command .hero-actions .btn-action:nth-child(5){ grid-column:auto; }
  .overview-grid{ grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
}
@media (max-width: 575.98px){
  .hero-command .hero-actions{ grid-template-columns: 1fr !important; }
  .hero-command .hero-actions .btn-action:nth-child(4),
  .hero-command .hero-actions .btn-action:nth-child(5){ grid-column:auto; }
  .overview-grid{ grid-template-columns:1fr !important; }
}


/* ===== force password change ===== */
.auth-page-force{
  min-height: calc(100vh - 4rem);
  display:grid;
  place-items:center;
  padding:1rem;
}
.auth-page-force .auth-card{
  width:min(520px, 100%);
}

/* ===== mobile sidebar fix (mobile only, desktop unchanged) ===== */
.mobile-menu-toggle,
.mobile-sidebar-close,
.mobile-sidebar-backdrop{
  display:none;
}

@media (max-width: 767.98px){
  .mobile-menu-toggle{
    display:inline-flex;
    position:fixed;
    top:calc(env(safe-area-inset-top, 0px) + 12px);
    inset-inline-start:12px;
    z-index:1205;
    width:46px;
    height:46px;
    border:none;
    border-radius:14px;
    align-items:center;
    justify-content:center;
    background:rgba(15,23,42,.88);
    color:#fff;
    box-shadow:0 12px 28px rgba(2,6,23,.34);
    backdrop-filter: blur(12px);
  }

  .mobile-sidebar-backdrop{
    display:block;
    position:fixed;
    inset:0;
    background:rgba(2,6,23,.55);
    opacity:0;
    pointer-events:none;
    transition:opacity .2s ease;
    z-index:1198;
  }

  body.mobile-menu-open .mobile-sidebar-backdrop{
    opacity:1;
    pointer-events:auto;
  }

  .mobile-sidebar-backdrop.is-visible{
    opacity:1 !important;
    pointer-events:auto !important;
  }

  .app-shell.d-flex{
    display:block !important;
  }

  .app-main.flex-grow-1.p-4{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    padding:calc(env(safe-area-inset-top, 0px) + 4.2rem) .75rem 1rem !important;
  }

  .app-sidebar{
    position:fixed !important;
    top:0 !important;
    bottom:0 !important;
    inset-inline-end:0 !important;
    width:min(84vw, 320px) !important;
    flex:none !important;
    height:100vh !important;
    max-height:100vh !important;
    margin:0 !important;
    border-radius:0 !important;
    padding:1rem .85rem calc(env(safe-area-inset-bottom, 0px) + 1rem) !important;
    overflow:hidden !important;
    transform:translateX(105%);
    transition:transform .22s ease;
    z-index:1200 !important;
    box-shadow:-18px 0 36px rgba(2,6,23,.42);
  }

  body.mobile-menu-open .app-sidebar{
    transform:translateX(0);
  }

  .app-sidebar.is-open{
    transform:translateX(0) !important;
  }

  .mobile-sidebar-close{
    display:inline-flex;
    width:40px;
    height:40px;
    border:none;
    border-radius:12px;
    align-items:center;
    justify-content:center;
    background:rgba(255,255,255,.08);
    color:#fff;
    margin-bottom:.5rem;
  }

  .app-sidebar .fs-5,
  .app-sidebar .nav-link span,
  .app-sidebar .text-muted{
    opacity:1 !important;
    max-width:none !important;
    overflow:visible !important;
    display:block !important;
  }

  .app-sidebar .nav-link{
    justify-content:flex-start !important;
    min-height:44px !important;
    font-size:.95rem !important;
    padding:.72rem .8rem !important;
  }

  .app-sidebar .nav-link i{
    width:1.2rem !important;
    flex:0 0 1.2rem !important;
    font-size:1rem !important;
  }

  .sidebar-user-card{
    margin-top:.85rem !important;
  }

  .dashboard-shell,
  .dashboard-shell .row,
  .dashboard-shell [class*="col-"]{
    min-width:0 !important;
  }

  .table-wrap,
  .hero-command,
  .overview-panel{
    overflow:hidden;
  }
}

/* === mobile drawer final hotfix v5 (mobile only, desktop unchanged) === */
@media (max-width: 767.98px){
  html, body,
  .app-body,
  .app-shell,
  .app-main{
    max-width:100% !important;
    overflow-x:hidden !important;
  }

  .mobile-menu-toggle{
    inset-inline-start:auto !important;
    inset-inline-end:12px !important;
    z-index:1405 !important;
  }

  body.mobile-menu-open .mobile-menu-toggle{
    opacity:0 !important;
    pointer-events:none !important;
    transform:scale(.96) !important;
  }


  .mobile-menu-toggle.is-hidden{
    display:none !important;
  }

  .mobile-sidebar-backdrop{
    z-index:1398 !important;
    background:rgba(2,6,23,.72) !important;
    backdrop-filter:blur(6px) !important;
  }

  .app-main.flex-grow-1.p-4{
    position:relative !important;
    z-index:1 !important;
    padding-inline:.85rem !important;
  }

  .app-sidebar{
    inset-inline-start:auto !important;
    inset-inline-end:0 !important;
    width:min(88vw, 340px) !important;
    z-index:1400 !important;
    background:linear-gradient(180deg, rgba(5,12,28,.985), rgba(4,10,24,.975)) !important;
    border-inline-start:1px solid rgba(125,211,252,.18) !important;
    box-shadow:-24px 0 48px rgba(2,6,23,.52) !important;
    padding-top:calc(env(safe-area-inset-top, 0px) + .9rem) !important;
  }

  .mobile-sidebar-close{
    align-self:flex-start !important;
    margin-bottom:.8rem !important;
    background:rgba(255,255,255,.1) !important;
    z-index:1 !important;
  }

  .app-sidebar .d-flex.align-items-center.gap-2.mb-3{
    margin-bottom:1rem !important;
    padding-inline:.35rem !important;
  }

  .sidebar-menu{
    padding-top:.15rem !important;
    padding-bottom:1rem !important;
    gap:.35rem !important;
  }

  .app-sidebar .nav-link,
  .app-nav .nav-link{
    min-height:50px !important;
    padding:.78rem .9rem !important;
    border-radius:18px !important;
    font-size:1rem !important;
  }

  .app-sidebar .nav-link.active::before,
  .app-nav .nav-link.active::before{
    display:none !important;
  }

  .app-sidebar .text-muted.small,
  .app-sidebar .text-muted{
    padding-inline:.6rem !important;
    margin-top:.55rem !important;
    margin-bottom:.2rem !important;
    opacity:.9 !important;
  }

  .sidebar-user-card{
    margin-top:.9rem !important;
    background:rgba(15,23,42,.55) !important;
  }
}

/* ===== final mobile polish v7 (mobile only, desktop unchanged) ===== */
@media (max-width: 767.98px){
  html, body{
    width:100%;
    max-width:100%;
    overflow-x:hidden !important;
  }

  body.mobile-menu-open{
    overflow:hidden !important;
    touch-action:none;
  }

  .mobile-menu-toggle{
    display:inline-flex !important;
    inset-inline-start:12px !important;
    inset-inline-end:auto !important;
    top:calc(env(safe-area-inset-top, 0px) + 14px) !important;
    z-index:1450 !important;
  }

  .mobile-menu-toggle[hidden],
  .mobile-sidebar-backdrop[hidden]{
    display:none !important;
  }

  .mobile-sidebar-backdrop{
    display:block;
    z-index:1435 !important;
  }

  .app-shell,
  .app-shell.d-flex,
  .app-main,
  .app-main.flex-grow-1.p-4{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
  }

  .app-main.flex-grow-1.p-4{
    padding:calc(env(safe-area-inset-top, 0px) + 4.4rem) .85rem calc(env(safe-area-inset-bottom, 0px) + 1rem) !important;
  }

  .app-main > *{
    min-width:0 !important;
  }

  .app-sidebar{
    width:min(84vw, 330px) !important;
    max-width:min(84vw, 330px) !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    overscroll-behavior:contain;
  }

  .app-sidebar .sidebar-user-card,
  .app-sidebar .sidebar-user-row,
  .app-sidebar .sidebar-user-text,
  .app-sidebar .sidebar-user-name,
  .app-sidebar .sidebar-user-job,
  .app-sidebar .sidebar-logout-form,
  .app-sidebar .btn{
    min-width:0 !important;
    max-width:100% !important;
  }

  .container,
  .container-fluid,
  .row,
  [class*="col-"]{
    min-width:0 !important;
  }

  .row{
    --bs-gutter-x: 1rem;
  }

  .btn,
  .form-control,
  .form-select{
    min-height:44px;
  }

  .table-wrap,
  .overview-panel,
  .hero-command,
  .members-header-box,
  .members-table-wrap,
  .card,
  .panel,
  .box,
  .content-box{
    border-radius:20px !important;
  }

  .table-responsive{
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch;
  }

  .table-responsive > .table{
    min-width:640px;
  }

  /* Dashboard */
  .dashboard-shell .hero-title{
    font-size:2rem !important;
    line-height:1.15 !important;
  }

  .dashboard-shell .hero-subtitle{
    font-size:.98rem !important;
  }

  .dashboard-shell .command-box,
  .dashboard-shell .hero-command,
  .dashboard-shell .overview-panel{
    padding:1rem !important;
  }

  .quick-actions.hero-actions,
  .quick-actions{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:.75rem !important;
  }

  .quick-actions .btn,
  .hero-actions .btn{
    width:100% !important;
    justify-content:center !important;
  }

  .overview-grid{
    grid-template-columns:1fr !important;
  }

  /* Members */
  .members-page-shell{
    gap:12px !important;
  }

  .members-header-box{
    padding:14px !important;
  }

  .members-hero-grid{
    grid-template-columns:1fr !important;
    gap:10px !important;
  }

  .member-hero-card{
    min-height:110px !important;
  }

  .members-toolbar{
    grid-template-columns:1fr !important;
    gap:10px !important;
  }

  .members-search-shell,
  .disabled-toggle-btn,
  .btn-add-member{
    width:100% !important;
  }

  .members-search-shell{
    padding:.8rem .9rem !important;
    gap:.6rem !important;
  }

  .members-search-shell .btn{
    min-width:72px !important;
    padding-inline:.8rem !important;
  }

  .members-table-wrap{
    padding:10px !important;
  }

  .members-table-wrap .table-responsive{
    overflow:visible !important;
  }

  .members-table-wrap .table,
  .members-table-wrap thead,
  .members-table-wrap tbody,
  .members-table-wrap tr,
  .members-table-wrap th,
  .members-table-wrap td{
    display:block;
    width:100%;
  }

  .members-table-wrap thead{
    display:none;
  }

  .members-table-wrap tbody{
    display:grid;
    gap:12px;
  }

  .members-table-wrap tbody tr{
    padding:14px;
    border-radius:18px;
    border:1px solid rgba(255,255,255,.10);
    background:linear-gradient(180deg,rgba(255,255,255,.045),rgba(255,255,255,.02));
    box-shadow:0 12px 30px rgba(0,0,0,.16);
  }

  .members-table-wrap tbody td{
    min-width:0 !important;
    padding:.45rem 0 !important;
    border:0 !important;
    text-align:start !important;
  }

  .members-table-wrap tbody td::before{
    content:attr(data-label);
    display:block;
    margin-bottom:.25rem;
    font-size:.76rem;
    font-weight:800;
    color:#9fb0d4;
  }

  .members-table-wrap tbody td.member-primary-cell::before,
  .members-table-wrap tbody td.action-btn-cell::before{
    display:none;
  }

  .member-primary-cell{
    min-width:0 !important;
    padding-bottom:.2rem !important;
  }

  .member-name-cell{
    max-width:none !important;
    white-space:normal !important;
  }

  .member-status-cell,
  .members-actions{
    display:flex !important;
    flex-wrap:wrap;
    gap:.5rem;
    align-items:center;
  }

  .action-btn-cell{
    display:inline-flex !important;
    width:auto !important;
    padding:0 !important;
    margin-inline-end:.35rem;
  }

  /* Generic filters/forms/tables */
  .d-flex.justify-content-between.align-items-center{
    gap:.75rem;
    flex-wrap:wrap;
  }

  .input-group,
  .search-wrap,
  .member-action-search-wrap,
  .member-action-form,
  .filters-row{
    min-width:0 !important;
  }

  /* POS / Store */
  .pos-items-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
    gap:10px !important;
  }

  .pos-item-card{
    padding:10px !important;
  }

  .pos-item-img{
    height:84px !important;
  }

  .pos-cart-column{
    margin-top:12px;
  }

  .pos-cart-card .card-body{
    padding:1rem !important;
  }
}

@media (max-width: 575.98px){
  .app-main.flex-grow-1.p-4{
    padding-inline:.7rem !important;
  }

  .mobile-menu-toggle{
    width:44px !important;
    height:44px !important;
  }

  .dashboard-shell .hero-title{
    font-size:1.7rem !important;
  }

  .members-search-shell{
    flex-wrap:wrap;
  }

  .members-search-shell .form-control,
  .members-search-shell .btn{
    width:100% !important;
  }

  .pos-items-grid{
    grid-template-columns:1fr !important;
  }
}
