/* =========================================================
   WEBOZIA BILLING — Design System
   Dark navy + muted gold, ledger-precise financial UI
   FULLY RESPONSIVE
   ========================================================= */

:root{
  --wb-ink:#12141a;
  --wb-ink-soft:#3a3f4b;
  --wb-muted:#6b7280;
  --wb-border:#e7e8ec;
  --wb-bg:#f4f5f7;
  --wb-card:#ffffff;

  --wb-navy-950:#0a0c11;
  --wb-navy-900:#0e1117;
  --wb-navy-850:#151923;
  --wb-navy-800:#1b202c;
  --wb-navy-border:#242938;

  --wb-gold:#c9a24b;
  --wb-gold-bright:#e8c874;
  --wb-gold-deep:#a5802f;
  --wb-gold-050:#fbf5e6;

  --wb-success:#1f9d63;
  --wb-success-bg:#e7f7ef;
  --wb-danger:#d6455a;
  --wb-danger-bg:#fcecef;
  --wb-warning:#c9852f;
  --wb-warning-bg:#fbf1e3;
  --wb-info:#3665d6;
  --wb-info-bg:#eaf0fd;

  --wb-radius:12px;
  --wb-radius-sm:8px;
  --wb-shadow: 0 1px 2px rgba(15,17,22,.04), 0 8px 24px -12px rgba(15,17,22,.10);
  --wb-shadow-lg: 0 20px 48px -16px rgba(10,12,17,.28);

  --wb-sidebar-w: 264px;
}

*{ box-sizing:border-box; }

html, body{
  background: var(--wb-bg) !important;
  color: var(--wb-ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4,h5,h6, .brand-text, .navbar-brand{
  font-family: 'Sora', 'Inter', sans-serif;
  letter-spacing: -0.01em;
  color: var(--wb-ink);
}

.table, .card, .form-control, .form-select, .btn, .badge{
  font-variant-numeric: tabular-nums;
}

a{ color: var(--wb-gold-deep); text-decoration:none; }
a:hover{ color: var(--wb-gold); }

::selection{ background: #0d6efd; color:#fff; }

::focus-visible{
    outline:none;
    box-shadow:0 0 0 4px rgba(201,162,75,.25);
}

/* =========================================================
   APP SHELL
   ========================================================= */
.app-wrapper{ min-height:100vh; }

.app-main{
  margin-left: var(--wb-sidebar-w);
  padding-top: 62px;
  min-height:100vh;
  transition: margin-left .2s ease;
}

.app-content{ padding: 28px 32px 60px; }

@media (max-width: 991.98px){
  .app-main{ margin-left:0; }
}

/* =========================================================
   TOPBAR
   ========================================================= */
.app-header{
  position: fixed;
  top:0; right:0; left: var(--wb-sidebar-w);
  height:62px;
  background: var(--wb-card);
  border-bottom:1px solid var(--wb-border);
  z-index: 1030;
  padding: 0 20px;
  transition: left .2s ease;
}
@media (max-width: 991.98px){ .app-header{ left:0; } }

.app-header .sidebar-toggle{
  border:none; background:transparent; color: var(--wb-ink);
  width:36px; height:36px; border-radius: var(--wb-radius-sm);
  display:flex; align-items:center; justify-content:center;
}
.app-header .sidebar-toggle:hover{ background: var(--wb-bg); }

.app-header .nav-link{
  color: var(--wb-ink-soft);
  width:38px; height:38px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
}
.app-header .nav-link:hover{ background: var(--wb-bg); color:var(--wb-ink); }

.app-header .notification-dot{ position:relative; }
.app-header .notification-dot::after{
  content:''; position:absolute; top:8px; right:8px;
  width:7px; height:7px; border-radius:50%;
  background: var(--wb-gold); border:1.5px solid var(--wb-card);
}

/* Collapsible navbar search */
.navbar-search{
  width:0; overflow:hidden; margin-left:auto; margin-right:10px;
  transition: width .2s ease;
}
.navbar-search.navbar-search-open{ width: 280px; }
.navbar-search-input{
  width:100%; border:1px solid var(--wb-border); border-radius: var(--wb-radius-sm);
  padding:.4rem .75rem; font-size:.875rem; background: var(--wb-bg);
}
.navbar-search-input:focus{ outline:none; border-color: var(--wb-gold); background:#fff; }

.app-header .dropdown-menu{
  border:1px solid var(--wb-border); border-radius: var(--wb-radius);
  box-shadow: var(--wb-shadow-lg); padding:8px;
}
.app-header .dropdown-item{ border-radius: var(--wb-radius-sm); padding:8px 10px; font-size:.9rem; }
.app-header .dropdown-item:hover{ background: var(--wb-bg); }

/* =========================================================
   SIDEBAR
   ========================================================= */
.app-sidebar{
  position: fixed;
  top:0; left:0; bottom:0;
  width: var(--wb-sidebar-w);
  background: linear-gradient(180deg, var(--wb-navy-950), var(--wb-navy-900) 60%);
  border-right: 1px solid var(--wb-navy-border);
  z-index: 1040;
  display:flex; flex-direction:column;
  transition: transform .2s ease, width .2s ease;
}

@media (max-width: 991.98px){
  .app-sidebar{ transform: translateX(-100%); }
  .app-sidebar.sidebar-open{ transform: translateX(0); }
}

/* Desktop collapse — icon-only rail, toggled via the sidebar-toggle button */
:root{ --wb-sidebar-w-collapsed: 76px; }

@media (min-width: 992px){
  body.sidebar-collapsed .app-sidebar{ width: var(--wb-sidebar-w-collapsed); }
  body.sidebar-collapsed .app-main{ margin-left: var(--wb-sidebar-w-collapsed); }
  body.sidebar-collapsed .app-header{ left: var(--wb-sidebar-w-collapsed); }
  body.sidebar-collapsed .app-footer{ margin-left: var(--wb-sidebar-w-collapsed); }

  body.sidebar-collapsed .sidebar-brand{ justify-content:center; padding:20px 10px; }
  body.sidebar-collapsed .sidebar-brand .brand-text-wrap{ display:none; }

  body.sidebar-collapsed .sidebar-menu .nav-link{ justify-content:center; padding:12px 0; }
  body.sidebar-collapsed .sidebar-menu .nav-link p{ display:none; }
  body.sidebar-collapsed .sidebar-menu .nav-link .nav-icon{ font-size:1.05rem; }

  body.sidebar-collapsed .sidebar-footer{ display:none; }

  /* Show a small tooltip with the page name on hover, since labels are hidden */
  body.sidebar-collapsed .sidebar-menu .nav-link{ position:relative; }
  body.sidebar-collapsed .sidebar-menu .nav-link:hover::after{
    content: attr(data-label);
    position:absolute; left: calc(100% + 10px); top:50%; transform: translateY(-50%);
    background: var(--wb-navy-850); color:#f4f0e4; padding:6px 10px; border-radius:6px;
    font-size:.78rem; white-space:nowrap; box-shadow: var(--wb-shadow-lg); z-index:1050;
  }
}

.sidebar-brand{
  padding: 20px 22px;
  border-bottom: 1px solid var(--wb-navy-border);
  display:flex; align-items:center; gap:10px;
}
.sidebar-brand .brand-mark{
  width:34px; height:34px; border-radius:9px;
  background: none;
  display:flex; align-items:center; justify-content:center;
  color:#1a1305; font-weight:700; font-family:'Sora',sans-serif; font-size:.95rem;
  flex:none; overflow:hidden; padding:5px;
}
.sidebar-brand .brand-mark img{ width:100%; height:100%; object-fit:contain; display:block; }
.sidebar-brand .brand-text{
  color:#f4f0e4 !important; font-weight:600; font-size:1.02rem; line-height:1.1;
}
.sidebar-brand .brand-sub{
  display:block; color:#7b8091; font-size:.68rem; letter-spacing:.08em; text-transform:uppercase; margin-top:2px;
}

.sidebar-wrapper{ flex:1; overflow-y:auto; padding: 14px 12px 20px; }
.sidebar-wrapper::-webkit-scrollbar{ width:10px; height:10px; }
.sidebar-wrapper::-webkit-scrollbar-thumb{ background: var(--wb-navy-border); border-radius:4px; }

.sidebar-menu{ list-style:none; padding:0; margin:0; }
.sidebar-menu .nav-item{ margin-bottom:2px; }

.sidebar-menu .nav-link{
  display:flex; align-items:center; gap:12px;
  padding: 10px 14px;
  border-radius: var(--wb-radius-sm);
  color:#a6acbd;
  font-size:.885rem; font-weight:500;
  border-left: 2px solid transparent;
  position:relative;
}
.sidebar-menu .nav-link .nav-icon{
  width:18px; text-align:center; font-size:.92rem; color:#767c8e;
}
.sidebar-menu .nav-link p{ margin:0; display:inline; }
.sidebar-menu .nav-link:hover{
  background: var(--wb-navy-800); color:#f1f0ea;
}
.sidebar-menu .nav-link:hover .nav-icon{ color: var(--wb-gold-bright); }

.sidebar-menu .nav-item.active .nav-link {
    background: #414141;
    color: #f7f3e6;
}
.sidebar-menu .nav-item.active .nav-link .nav-icon{ color: var(--wb-gold); }

.sidebar-footer{
  padding: 14px 20px 18px; border-top:1px solid var(--wb-navy-border);
  color:#5c6070; font-size:.72rem;
}

/* =========================================================
   CARDS
   ========================================================= */
.card{
  transition:.25s ease;
  background: var(--wb-card);
  border:1px solid var(--wb-border);
  border-radius: var(--wb-radius);
  box-shadow: var(--wb-shadow);
}
.card:hover{
    transform:translateY(-3px);
    box-shadow:0 20px 50px rgba(0,0,0,.08);
}
.card-header{
  background: var(--wb-card) !important;
  border-bottom:1px solid var(--wb-border);
  font-family:'Sora',sans-serif;
  font-weight:600;
  border-top-left-radius: var(--wb-radius) !important;
  border-top-right-radius: var(--wb-radius) !important;
}
.card-footer{ border-top:1px solid var(--wb-border); background: var(--wb-card) !important; }

.dashboard-stat-card{ border-radius: var(--wb-radius) !important; }
.stat-icon{ border-radius: 10px !important; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn{ border-radius: var(--wb-radius-sm); font-weight:600; font-size:.875rem; padding:.5rem 1rem; }

.btn-primary{
  background: linear-gradient(135deg, var(--wb-gold-bright), var(--wb-gold-deep));
  border:none; color:#211603;
}
.btn-primary:hover, .btn-primary:focus{
  background: linear-gradient(135deg, var(--wb-gold), var(--wb-gold-deep));
  color:#1a1204;
}

.btn-dark{ background: var(--wb-navy-900); border-color:var(--wb-navy-900); }
.btn-dark:hover{ background: var(--wb-navy-850); border-color:var(--wb-navy-850); }

.btn-success{ background: var(--wb-success); border-color: var(--wb-success); }
.btn-danger{ background: var(--wb-danger); border-color: var(--wb-danger); }
.btn-warning{ background: var(--wb-warning); border-color: var(--wb-warning); color:#fff; }
.btn-info{ background: var(--wb-info); border-color: var(--wb-info); color:#fff; }

.btn-outline-primary{ color: var(--wb-gold-deep); border-color: var(--wb-gold); }
.btn-outline-primary:hover{ background: var(--wb-gold); border-color: var(--wb-gold); color:#211603; }

.btn-secondary{ background:#eef0f3; border-color:#eef0f3; color: var(--wb-ink-soft); }
.btn-secondary:hover{ background:#e2e4e9; border-color:#e2e4e9; color:var(--wb-ink); }

/* =========================================================
   TABLES
   ========================================================= */
.table{ color: var(--wb-ink); }
.table thead.table-light th, .table > :not(caption) > * > th{
  background: #fafafa;
  color: var(--wb-muted);
  font-size:.72rem;
  text-transform:uppercase;
  letter-spacing:.05em;
  font-weight:700;
  border-bottom: 1px solid var(--wb-border);
}
.table-bordered, .table-bordered td, .table-bordered th{ border-color: var(--wb-border); }
.table-hover tbody tr:hover{ background: var(--wb-gold-050); }
.table td{ vertical-align:middle; font-size:.885rem; }

/* =========================================================
   BADGES
   ========================================================= */
.badge{ font-weight:600; font-size:.72rem; padding:.4em .65em; border-radius:6px; }
.bg-success{ background: var(--wb-success-bg) !important; color: var(--wb-success) !important; }
.bg-danger{ background: var(--wb-danger-bg) !important; color: var(--wb-danger) !important; }
.bg-warning{ background: var(--wb-warning-bg) !important; color: var(--wb-warning) !important; }
.bg-info{ background: var(--wb-info-bg) !important; color: var(--wb-info) !important; }
.bg-primary{ background: var(--wb-gold-050) !important; color: var(--wb-gold-deep) !important; }

/* =========================================================
   FORMS
   ========================================================= */
.form-label{ font-size:.8rem; font-weight:600; color: var(--wb-ink-soft); margin-bottom:6px; }
.form-control, .form-select{
  border:1px solid var(--wb-border); border-radius: var(--wb-radius-sm);
  padding:.55rem .8rem; font-size:.9rem;
}
.form-control:focus, .form-select:focus{
  border-color: var(--wb-gold);
  box-shadow: 0 0 0 3px rgba(201,162,75,.18);
}

/* =========================================================
   ALERTS
   ========================================================= */
.alert{ border:1px solid transparent; border-radius: var(--wb-radius-sm); font-size:.9rem; }
.alert-success{ background: var(--wb-success-bg); color: var(--wb-success); border-color:#cdeedd; }
.alert-danger{ background: var(--wb-danger-bg); color: var(--wb-danger); border-color:#f6d3da; }
.alert-warning{ background: var(--wb-warning-bg); color: var(--wb-warning); border-color:#f1decb; }
.alert-info{ background: var(--wb-info-bg); color: var(--wb-info); border-color:#d7e2fa; }

/* =========================================================
   FOOTER
   ========================================================= */
.app-footer{
  margin-left: var(--wb-sidebar-w);
  padding: 14px 32px;
  color: var(--wb-muted);
  font-size:.8rem;
  border-top:1px solid var(--wb-border);
}
@media (max-width: 991.98px){ .app-footer{ margin-left:0; } }

/* =========================================================
   LOGIN / AUTH PAGES
   ========================================================= */
.auth-shell{ min-height:100vh; display:flex; }
.auth-brand-panel{
  flex:1; max-width:46%;
  background: radial-gradient(circle at 20% 20%, #1b202c 0%, var(--wb-navy-950) 60%);
  color:#f1efe6;
  display:flex; flex-direction:column; justify-content:space-between;
  padding: 56px;
  position:relative; overflow:hidden;
}
.auth-brand-panel::before{
  content:''; position:absolute; width:520px; height:520px; border-radius:50%;
  background: radial-gradient(circle, rgba(201,162,75,.16), transparent 70%);
  top:-140px; right:-160px;
}
.auth-brand-panel::after{
  content:''; position:absolute; width:420px; height:420px; border-radius:50%;
  background: radial-gradient(circle, rgba(201,162,75,.10), transparent 70%);
  bottom:-160px; left:-120px;
}

/* Logo lockup: icon + wordmark, top of the dark panel */
.auth-logo-row{ display:flex; align-items:center; gap:12px; position:relative; z-index:1; }
.auth-logo-row img{ width:42px; height:42px; object-fit:contain; display:block; }
.auth-logo-text{ line-height:1.1; }
.auth-logo-text .wordmark{ display:block; font-family:'Sora',sans-serif; font-weight:700; font-size:1.15rem; color:#f6f2e6; letter-spacing:.02em; }
.auth-logo-text .subword{ display:block; font-size:.68rem; font-weight:600; color: var(--wb-gold); letter-spacing:.18em; margin-top:2px; }

.auth-brand-mark{
  width:46px; height:46px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden; padding:7px;
}
.auth-brand-mark img{ width:100%; height:100%; object-fit:contain; display:block; }

.auth-brand-panel h1{ color:#f6f2e6; font-size:2.15rem; line-height:1.2; margin-top:36px; max-width:420px; position:relative; z-index:1; }
.auth-brand-panel h1 .accent{ color: var(--wb-gold); }
.auth-brand-panel > p.auth-lede{ color:#9aa0b3; max-width:380px; margin-top:14px; position:relative; z-index:1; }

/* 2x2 feature card grid */
.auth-feature-grid{
  display:grid; grid-template-columns:1fr 1fr; gap:14px;
  margin-top:30px; position:relative; z-index:1;
}
.auth-feature-card{
  border:1px solid rgba(255,255,255,.08); border-radius:12px;
  background: rgba(255,255,255,.02);
  padding:16px 14px;
}
.auth-feature-card i{ color: var(--wb-gold); font-size:1.15rem; margin-bottom:10px; display:block; }
.auth-feature-card span{ display:block; color:#e5e3da; font-size:.85rem; font-weight:600; line-height:1.3; }

.auth-quote{ border-left:2px solid var(--wb-gold); padding-left:16px; color:#c7cad6; font-size:.92rem; }

/* Bottom security note */
.auth-security-note{ display:flex; align-items:center; gap:14px; position:relative; z-index:1; }
.auth-security-note .shield{
  width:44px; height:44px; border-radius:12px; background: var(--wb-navy-850);
  border:1px solid rgba(255,255,255,.08);
  display:flex; align-items:center; justify-content:center; flex:none;
  color: var(--wb-gold); font-size:1.05rem;
}
.auth-security-note .title{ color: var(--wb-gold); font-weight:700; font-size:.92rem; }
.auth-security-note .sub{ color:#8b90a0; font-size:.8rem; margin-top:1px; }

.auth-form-panel{
  flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
  background:
    radial-gradient(circle, rgba(201,162,75,.10) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--wb-bg);
  padding: 32px; position:relative;
}

/* Card with a floating circular logo badge on top */
.auth-card{
  width:100%; max-width:420px; background:#fff; border-radius:20px;
  box-shadow: var(--wb-shadow-lg); border:1px solid var(--wb-border);
  padding: 56px 40px 36px; position:relative; text-align:center;
}
.auth-card-badge{
  position:absolute; top:-38px; left:50%; transform:translateX(-50%);
  width:76px; height:76px; border-radius:50%;
  background:#fff; box-shadow: 0 0 0 10px rgba(201,162,75,.10), var(--wb-shadow);
  display:flex; align-items:center; justify-content:center;
}
.auth-card-badge img{ width:40px; height:40px; object-fit:contain; }
.auth-card h3{ margin-top:6px; }
.auth-card .auth-subtitle{ color: var(--wb-muted); font-size:.9rem; margin-top:2px; }

.auth-form-card{ width:100%; max-width:420px; }
.auth-form-card .form-control{ background:#fff; }

/* Icon-embedded inputs */
.auth-input-group{ position:relative; text-align:left; }
.auth-input-group i.field-icon{
  position:absolute; left:14px; top:50%; transform:translateY(-50%);
  color: var(--wb-muted); font-size:.9rem; pointer-events:none;
}
.auth-input-group input{ padding-left:40px; }
.auth-input-group .toggle-password{
  position:absolute; right:14px; top:50%; transform:translateY(-50%);
  color: var(--wb-muted); background:none; border:none; font-size:.9rem; cursor:pointer;
}

.auth-footer-note{
  text-align:center; margin-top:22px; color: var(--wb-muted); font-size:.8rem;
}
.auth-footer-note a{ color: var(--wb-gold-deep); font-weight:600; }

@media (max-width: 900px){
  .auth-brand-panel{ display:none; }
  .auth-form-panel{ max-width:100%; }
}

/* =========================================================
   MISC
   ========================================================= */
.text-primary{ color: var(--wb-gold-deep) !important; }
.progress-custom .progress-bar{ background: var(--wb-gold); }

/* =========================================================
   CONFIRM MODAL (replaces browser confirm())
   ========================================================= */
.wb-confirm-content{ border:none; border-radius: var(--wb-radius); overflow:hidden; }
.wb-confirm-icon{
  width:64px; height:64px; border-radius:50%; margin:0 auto;
  display:flex; align-items:center; justify-content:center;
  background: var(--wb-danger-bg); color: var(--wb-danger); font-size:1.6rem;
}
.wb-confirm-icon.is-info{ background: var(--wb-info-bg); color: var(--wb-info); }
.wb-confirm-icon.is-warning{ background: var(--wb-warning-bg); color: var(--wb-warning); }
#wbConfirmTitle{ font-family:'Sora',sans-serif; font-weight:700; }
#wbConfirmProceed.btn-info{ background: var(--wb-info); border-color: var(--wb-info); color:#fff; }
#wbConfirmProceed.btn-warning{ background: var(--wb-warning); border-color: var(--wb-warning); color:#fff; }
.activity-dot{ box-shadow: 0 0 0 2px var(--wb-gold) !important; }

@media print{
  .app-sidebar, .app-header, .app-footer{ display:none !important; }
  .app-main{ margin-left:0 !important; padding-top:0 !important; }
}

/* =========================================================
   🔥 RESPONSIVE MOBILE ADDITIONS 🔥
   ========================================================= */

/* --- Mobile Table Enhancements --- */
@media (max-width: 768px) {
  .table-responsive-mobile {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .table-responsive-mobile table {
    min-width: 600px;
  }
  
  /* Make cards full-width on mobile */
  .card {
    margin-bottom: 16px;
  }
  
  /* Stack stat cards on mobile */
  .dashboard-stats-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  
  /* Better spacing for mobile content */
  .app-content {
    padding: 16px 12px 40px;
  }
  
  /* Mobile-friendly buttons */
  .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    min-height: 40px;
  }
  
  /* Mobile form improvements */
  .form-control, .form-select {
    font-size: 16px; /* Prevent iOS zoom */
    padding: 0.5rem 0.7rem;
  }
  
  /* Stack mobile action buttons */
  .mobile-stack .btn {
    width: 100%;
    margin-bottom: 8px;
  }
  
  /* Better mobile dropdowns */
  .app-header .dropdown-menu {
    position: fixed;
    top: 60px !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-width: 100% !important;
    transform: none !important;
    border-radius: var(--wb-radius);
    box-shadow: var(--wb-shadow-lg);
  }
}

/* --- Small Mobile Phones --- */
@media (max-width: 480px) {
  .app-content {
    padding: 12px 8px 30px;
  }
  
  .app-header {
    padding: 0 10px;
  }
  
  /* Hide some less important header items on very small screens */
  .app-header .header-actions .nav-link:not(.notification-dot):not(.profile-toggle) {
    display: none;
  }
  
  /* Make cards stack properly */
  .card-body {
    padding: 16px;
  }
  
  .card-header {
    padding: 12px 16px;
  }
  
  /* Auth page mobile */
  .auth-card {
    padding: 40px 20px 28px;
    margin: 0 10px;
  }
  
  .auth-card-badge {
    width: 60px;
    height: 60px;
    top: -30px;
  }
  
  .auth-card-badge img {
    width: 30px;
    height: 30px;
  }
  
  .auth-form-panel {
    padding: 16px;
  }
  
  .auth-footer-note {
    font-size: 0.7rem;
  }
  
  /* Mobile responsive sidebar toggle icon */
  .sidebar-toggle .toggle-icon {
    font-size: 1.2rem;
  }
}

/* --- Mobile Sidebar Overlay --- */
@media (max-width: 991.98px) {
  .sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 12, 17, 0.6);
    z-index: 1039;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }
  
  .sidebar-backdrop.active {
    display: block;
  }
  
  .app-sidebar.sidebar-open + .sidebar-backdrop {
    display: block;
  }
}

/* --- Fix for overlapping elements --- */
@media (max-width: 768px) {
  /* Ensure sidebar doesn't overlap content when closed */
  .app-sidebar {
    width: 280px;
  }
  
  /* Better z-index management */
  .app-header {
    z-index: 1030;
  }
  
  .app-sidebar {
    z-index: 1040;
  }
  
  .sidebar-backdrop {
    z-index: 1039;
  }
  
  /* Mobile search bar */
  .navbar-search.navbar-search-open {
    width: 160px;
  }
  
  .navbar-search-input {
    font-size: 14px;
    padding: 0.3rem 0.6rem;
  }
}

/* --- Toast/Notification Styling (Custom Popups) --- */
.custom-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--wb-card);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius);
  box-shadow: var(--wb-shadow-lg);
  padding: 16px 24px;
  z-index: 9999;
  max-width: 90%;
  width: 420px;
  display: flex;
  align-items: center;
  gap: 14px;
  animation: slideUp 0.3s ease;
}

.custom-toast .toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.custom-toast .toast-icon.success {
  background: var(--wb-success-bg);
  color: var(--wb-success);
}

.custom-toast .toast-icon.error {
  background: var(--wb-danger-bg);
  color: var(--wb-danger);
}

.custom-toast .toast-icon.warning {
  background: var(--wb-warning-bg);
  color: var(--wb-warning);
}

.custom-toast .toast-icon.info {
  background: var(--wb-info-bg);
  color: var(--wb-info);
}

.custom-toast .toast-content {
  flex: 1;
}

.custom-toast .toast-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--wb-ink);
}

.custom-toast .toast-message {
  font-size: 0.82rem;
  color: var(--wb-muted);
  margin-top: 2px;
}

.custom-toast .toast-close {
  background: none;
  border: none;
  color: var(--wb-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: 4px;
  flex-shrink: 0;
}

.custom-toast .toast-close:hover {
  background: var(--wb-bg);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Toast mobile adjustments */
@media (max-width: 576px) {
  .custom-toast {
    bottom: 16px;
    padding: 14px 16px;
    width: 92%;
    border-radius: var(--wb-radius-sm);
  }
  
  .custom-toast .toast-title {
    font-size: 0.82rem;
  }
  
  .custom-toast .toast-message {
    font-size: 0.75rem;
  }
  
  .custom-toast .toast-icon {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
  }
}

/* --- Modal Overlay (Action Confirmation Popup) --- */
.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 12, 17, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}

.custom-modal {
  background: var(--wb-card);
  border-radius: var(--wb-radius);
  box-shadow: var(--wb-shadow-lg);
  max-width: 440px;
  width: 100%;
  padding: 32px 28px 24px;
  text-align: center;
  border: 1px solid var(--wb-border);
  animation: scaleIn 0.25s ease;
}

.custom-modal .modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.custom-modal .modal-icon.warning {
  background: var(--wb-warning-bg);
  color: var(--wb-warning);
}

.custom-modal .modal-icon.danger {
  background: var(--wb-danger-bg);
  color: var(--wb-danger);
}

.custom-modal .modal-icon.success {
  background: var(--wb-success-bg);
  color: var(--wb-success);
}

.custom-modal .modal-icon.info {
  background: var(--wb-info-bg);
  color: var(--wb-info);
}

.custom-modal h4 {
  font-family: 'Sora', 'Inter', sans-serif;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--wb-ink);
}

.custom-modal p {
  color: var(--wb-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
  line-height: 1.5;
}

.custom-modal .modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.custom-modal .modal-actions .btn {
  min-width: 100px;
  padding: 0.5rem 1.2rem;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Modal mobile adjustments */
@media (max-width: 576px) {
  .custom-modal {
    padding: 24px 20px 20px;
    margin: 10px;
  }
  
  .custom-modal .modal-icon {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
  
  .custom-modal h4 {
    font-size: 1rem;
  }
  
  .custom-modal p {
    font-size: 0.82rem;
  }
  
  .custom-modal .modal-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .custom-modal .modal-actions .btn {
    width: 100%;
    min-width: unset;
  }
}

/* --- Mobile-optimized Grid --- */
@media (max-width: 768px) {
  .row {
    margin-left: -6px;
    margin-right: -6px;
  }
  
  .row > * {
    padding-left: 6px;
    padding-right: 6px;
  }
  
  /* Better mobile spacing for form groups */
  .form-group, .mb-3 {
    margin-bottom: 12px;
  }
}

/* --- Touch-friendly targets --- */
@media (pointer: coarse) {
  .btn, .nav-link, .dropdown-item, .sidebar-menu .nav-link {
    min-height: 44px;
    min-width: 44px;
  }
  
  .form-control, .form-select {
    min-height: 44px;
  }
}

/* =========================================================
   END RESPONSIVE ADDITIONS
   ========================================================= */