/* NFS Healthcare RCM Portal — Main Stylesheet */
:root {
  --color-primary:       #2563EB;
  --color-primary-light: #EFF6FF;
  --color-primary-dark:  #1D4ED8;
  --color-success:       #16A34A;
  --color-warning:       #D97706;
  --color-danger:        #DC2626;
  --color-bg:            #F8FAFC;
  --color-surface:       #FFFFFF;
  --color-border:        #E2E8F0;
  --color-text:          #1E293B;
  --color-text-muted:    #64748B;
  --color-sidebar-bg:    #FFFFFF;
  --color-sidebar-text:  #64748B;
  --color-sidebar-hover: transparent;
  --color-sidebar-active: #EFF6FF;
  --color-sidebar-accent: #2563EB;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.06);
  --shadow-md:   0 4px 12px rgba(0,0,0,.08);
  --shadow-lg:   0 8px 24px rgba(0,0,0,.10);
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --sidebar-w:   240px;
  --sidebar-collapsed-w: 64px;
  --navbar-h:    64px;
  --transition:  .22s ease;
}
*,*::before,*::after{box-sizing:border-box}
body{font-family:'Inter',system-ui,sans-serif;background:var(--color-bg);color:var(--color-text);margin:0;overflow-x:hidden}
a{text-decoration:none;color:inherit}
::-webkit-scrollbar{width:6px;height:6px}
::-webkit-scrollbar-thumb{background:#CBD5E1;border-radius:99px}

/* NAVBAR */
.top-navbar{position:fixed;top:0;left:0;right:0;height:var(--navbar-h);background:var(--color-surface);border-bottom:1px solid var(--color-border);display:flex;align-items:center;padding:0 20px;z-index:1030;box-shadow:var(--shadow-sm);gap:12px}
.navbar-brand-custom{display:flex;align-items:center;gap:10px;min-width:calc(var(--sidebar-w) - 20px);font-size:1.1rem;font-weight:700;color:var(--color-primary)}
.brand-icon{width:36px;height:36px;background:var(--color-primary);border-radius:var(--radius-sm);display:flex;align-items:center;justify-content:center;color:#fff;font-size:1.1rem}
.brand-text span{display:block;font-size:.68rem;font-weight:500;color:var(--color-text-muted);letter-spacing:.04em;text-transform:uppercase}
.sidebar-toggle-btn{background:none;border:1px solid var(--color-border);border-radius:var(--radius-sm);width:36px;height:36px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--color-text-muted);transition:all var(--transition);flex-shrink:0}
.sidebar-toggle-btn:hover{background:var(--color-primary-light);color:var(--color-primary);border-color:var(--color-primary)}
.navbar-breadcrumb{flex:1;display:flex;align-items:center}
.navbar-breadcrumb .breadcrumb{margin:0;font-size:.85rem}
.navbar-breadcrumb .breadcrumb-item a{color:var(--color-primary)}
.navbar-breadcrumb .breadcrumb-item.active{color:var(--color-text-muted)}
.navbar-actions{display:flex;align-items:center;gap:8px}
.icon-btn{position:relative;width:38px;height:38px;border-radius:var(--radius-md);background:var(--color-bg);border:1px solid var(--color-border);display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--color-text-muted);font-size:1.05rem;transition:all var(--transition)}
.icon-btn:hover{background:var(--color-primary-light);color:var(--color-primary);border-color:var(--color-primary)}
.icon-btn .badge-count{position:absolute;top:-4px;right:-4px;min-width:18px;height:18px;background:var(--color-danger);border-radius:10px;border:2px solid var(--color-surface);color:#fff;font-size:0.65rem;font-weight:bold;display:flex;align-items:center;justify-content:center;padding:0 4px}
.user-dropdown-btn{display:flex;align-items:center;gap:9px;background:var(--color-bg);border:1px solid var(--color-border);border-radius:var(--radius-md);padding:5px 12px 5px 6px;cursor:pointer;transition:all var(--transition);color:var(--color-text)}
.user-dropdown-btn:hover{background:var(--color-primary-light);border-color:var(--color-primary)}
.user-avatar{width:30px;height:30px;border-radius:50%;background:linear-gradient(135deg,var(--color-primary),#7C3AED);display:flex;align-items:center;justify-content:center;color:#fff;font-size:.75rem;font-weight:700}
.user-name{font-size:.85rem;font-weight:600;line-height:1}
.user-role{font-size:.7rem;color:var(--color-text-muted)}

/* SIDEBAR */
.sidebar{
  position:fixed;top:var(--navbar-h);left:0;bottom:0;
  width:var(--sidebar-w);
  background: var(--color-sidebar-bg);
  border-right: 1px solid var(--color-border);
  display:flex;flex-direction:column;z-index:1020;
  transition: width var(--transition);
  overflow:hidden;
}
.sidebar-nav{flex:1;padding:16px 0;overflow-y:auto;overflow-x:hidden}
.sidebar-nav::-webkit-scrollbar{width:4px}
.sidebar-nav::-webkit-scrollbar-thumb{background:rgba(0,0,0,0.1);border-radius:99px}

.nav-section-label{
  font-size:.65rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
  color:var(--color-text-muted);padding:10px 24px 6px;
  white-space:nowrap;overflow:hidden;
  transition:opacity var(--transition);
  opacity: 0.8;
}

/* Sidebar link */
.sidebar-link{
  display:flex;align-items:center;gap:12px;
  padding:10px 16px;
  margin: 4px 12px;
  color:var(--color-sidebar-text);
  font-size:0.925rem;font-weight:500;
  transition:all var(--transition);
  position:relative;cursor:pointer;white-space:nowrap;
  border-radius:8px;
  text-decoration:none;
  min-height: 40px;
}
.sidebar-link:hover{
  background:var(--color-sidebar-hover);
  color:var(--color-sidebar-accent);
}
.sidebar-link.active{
  background:var(--color-sidebar-active);
  color:var(--color-sidebar-accent);
  font-weight: 600;
}
.sidebar-link.active::before{
  content:'';position:absolute;left:0;top:8px;bottom:8px;width:3px;
  background:var(--color-sidebar-accent);
  border-radius:0 3px 3px 0;
}
.sidebar-link .nav-icon{
  font-size:1.15rem;width:24px;text-align:center;flex-shrink:0;
  color:var(--color-sidebar-text);
  transition: color var(--transition);
}
.sidebar-link:hover .nav-icon,
.sidebar-link.active .nav-icon{color:var(--color-sidebar-accent)}
.sidebar-link .nav-label{
  transition: opacity var(--transition), width var(--transition);
  overflow:hidden;white-space:nowrap;
}
.sidebar-link .badge{margin-left:auto;font-size:.65rem;padding:2px 7px;flex-shrink:0}

/* Sidebar footer */
.sidebar-footer{
  padding:16px 20px;
  border-top:1px solid var(--color-border);
  font-size:.72rem;color:var(--color-text-muted);
  white-space:nowrap;overflow:hidden;
  transition:opacity var(--transition);
}
.sidebar-footer strong{color:var(--color-text)}

/* ── COLLAPSED STATE (Desktop) ── */
.sidebar.collapsed{
  width: var(--sidebar-collapsed-w);
}
.sidebar.collapsed .nav-label,
.sidebar.collapsed .sidebar-footer,
.sidebar.collapsed .nav-section-label {
  opacity:0;
  pointer-events:none;
  width:0;
}
.sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding: 10px;
  gap: 0;
}
.sidebar.collapsed .sidebar-link .nav-icon {
  width: auto;
  margin: 0;
  font-size: 1.2rem;
}
/* Tooltips are now handled dynamically via Bootstrap JS in main.js to bypass overflow:hidden */

/* Collapsed active bar stays visible */
.sidebar.collapsed .sidebar-link.active::before {
  top: 8px; bottom: 8px;
}

/* MAIN CONTENT */
.main-content{
  margin-left:var(--sidebar-w);
  margin-top:var(--navbar-h);
  padding:28px;
  min-height:calc(100vh - var(--navbar-h));
  transition:margin-left var(--transition);
}
.main-content.expanded{margin-left:var(--sidebar-collapsed-w)}
.page-header{margin-bottom:24px}
.page-header h1{font-size:1.5rem;font-weight:700;margin:0 0 4px;color:var(--color-text)}
.page-header p{font-size:.875rem;color:var(--color-text-muted);margin:0}

/* STAT CARDS */
.stat-card{background:var(--color-surface);border-radius:var(--radius-lg);padding:22px 24px;border:1px solid var(--color-border);box-shadow:var(--shadow-sm);display:flex;align-items:flex-start;gap:16px;transition:box-shadow var(--transition),transform var(--transition);height:100%}
.stat-card:hover{box-shadow:var(--shadow-md);transform:translateY(-2px)}
.stat-card-icon{width:48px;height:48px;border-radius:var(--radius-md);display:flex;align-items:center;justify-content:center;font-size:1.3rem;flex-shrink:0}
.stat-card-body .label{font-size:.78rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--color-text-muted);margin-bottom:4px}
.stat-card-body .value{font-size:1.85rem;font-weight:800;line-height:1;color:var(--color-text)}
.stat-card-body .change{font-size:.78rem;margin-top:6px;display:flex;align-items:center;gap:3px}
.change.up{color:var(--color-success)}
.change.down{color:var(--color-danger)}
.icon-blue{background:#EFF6FF;color:var(--color-primary)}
.icon-green{background:#F0FDF4;color:var(--color-success)}
.icon-amber{background:#FFFBEB;color:var(--color-warning)}
.icon-purple{background:#F5F3FF;color:#7C3AED}

/* CARD SECTION */
.card-section{background:var(--color-surface);border-radius:var(--radius-lg);border:1px solid var(--color-border);box-shadow:var(--shadow-sm);overflow:hidden}
.card-section-header{padding:16px 20px;border-bottom:1px solid var(--color-border);display:flex;align-items:center;justify-content:space-between;gap:12px}
.card-section-header h5{font-size:.95rem;font-weight:700;margin:0}
.card-section-body{padding:20px}
.card-section-table .table{margin:0;font-size:.855rem}
.card-section-table .table thead th{background:var(--color-bg);font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--color-text-muted);border-bottom:1px solid var(--color-border);padding:10px 16px}
.card-section-table .table tbody td{padding:11px 16px;vertical-align:middle;border-color:var(--color-border)}
.card-section-table .table tbody tr:hover{background:var(--color-bg)}

/* STATUS BADGES */
.status-badge{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border-radius:99px;font-size:.73rem;font-weight:600}
.status-badge::before{content:'';width:6px;height:6px;border-radius:50%;display:inline-block}
.status-badge.completed{background:#F0FDF4;color:#15803D}
.status-badge.completed::before{background:#16A34A}
.status-badge.pending{background:#FFFBEB;color:#B45309}
.status-badge.pending::before{background:#D97706}
.status-badge.running{background:#EFF6FF;color:#1D4ED8}
.status-badge.running::before{background:#2563EB;animation:pulse-dot 1.4s infinite}
.status-badge.failed{background:#FFF1F2;color:#BE123C}
.status-badge.failed::before{background:#E11D48}
@keyframes pulse-dot{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(.7)}}

/* PROGRESS */
.progress{border-radius:99px;height:7px;background:var(--color-border)}
.progress-bar{border-radius:99px}
.job-item{margin-bottom:18px}
.job-item:last-child{margin-bottom:0}
.job-header{display:flex;justify-content:space-between;margin-bottom:6px}
.job-name{font-size:.84rem;font-weight:600}
.job-pct{font-size:.78rem;color:var(--color-text-muted)}

/* SKELETON */
.skeleton{background:linear-gradient(90deg,#F1F5F9 25%,#E2E8F0 50%,#F1F5F9 75%);background-size:200% 100%;animation:skeleton-shimmer 1.5s infinite;border-radius:var(--radius-sm)}
@keyframes skeleton-shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}
.skeleton-line{height:14px;border-radius:4px;margin-bottom:8px}
.skeleton-block{height:80px;border-radius:var(--radius-md);margin-bottom:12px}

/* UPLOAD ZONE */
.upload-zone{border:2px dashed var(--color-border);border-radius:var(--radius-lg);background:var(--color-bg);padding:56px 24px;text-align:center;cursor:pointer;transition:all var(--transition)}
.upload-zone.dragover,.upload-zone:hover{border-color:var(--color-primary);background:var(--color-primary-light)}
.upload-zone .upload-icon{width:60px;height:60px;background:var(--color-primary-light);border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:1.6rem;color:var(--color-primary);margin:0 auto 16px;transition:transform var(--transition)}
.upload-zone:hover .upload-icon{transform:scale(1.12)}

/* BILLING */
.plan-card{background:linear-gradient(135deg,#1D4ED8 0%,#7C3AED 100%);color:#fff;border-radius:var(--radius-lg);padding:28px;position:relative;overflow:hidden}
.plan-card::before{content:'';position:absolute;top:-40px;right:-40px;width:140px;height:140px;background:rgba(255,255,255,.08);border-radius:50%}
.plan-badge{display:inline-flex;align-items:center;gap:6px;background:rgba(255,255,255,.2);padding:4px 12px;border-radius:99px;font-size:.72rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;margin-bottom:14px}
.plan-price{font-size:2.4rem;font-weight:800;line-height:1}
.plan-period{font-size:.85rem;opacity:.75}
.plan-name{font-size:1.05rem;font-weight:600;margin-top:6px}
.billing-summary-card{background:#FFFBEB;border:1px solid #FDE68A;border-radius:var(--radius-lg);padding:20px}
.billing-summary-card .label{font-size:.78rem;font-weight:600;color:var(--color-warning);text-transform:uppercase;letter-spacing:.05em}
.billing-summary-card .total{font-size:1.6rem;font-weight:800;color:var(--color-text)}

/* NOTIFICATION DROPDOWN */
.notif-dropdown{width:340px;padding:0;border-radius:var(--radius-lg)!important;border:1px solid var(--color-border)!important;box-shadow:var(--shadow-lg)!important;overflow:hidden}
.notif-dropdown-header{background:var(--color-bg);padding:14px 18px;border-bottom:1px solid var(--color-border);display:flex;justify-content:space-between;align-items:center;font-size:.85rem;font-weight:700}
.notif-item{display:flex;align-items:flex-start;gap:12px;padding:13px 18px;border-bottom:1px solid var(--color-border);transition:background var(--transition);cursor:pointer}
.notif-item:last-child{border-bottom:none}
.notif-item:hover{background:var(--color-bg)}
.notif-item.unread{background:#EFF6FF}
.notif-item.unread .notif-text .title{font-weight:700}
.notif-item.unread .notif-text .title::after{content:'';display:inline-block;width:6px;height:6px;background:var(--color-primary);border-radius:50%;margin-left:6px;vertical-align:middle;margin-bottom:2px}
.notif-icon{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:.9rem;flex-shrink:0}
.notif-icon.success{background:#F0FDF4;color:var(--color-success)}
.notif-icon.danger{background:#FFF1F2;color:var(--color-danger)}
.notif-icon.info{background:#EFF6FF;color:var(--color-primary)}
.notif-icon.warning{background:#FFFBEB;color:var(--color-warning)}
.notif-text .title{font-size:.83rem;font-weight:600}
.notif-item .notif-text .time{font-size:.7rem;color:var(--color-text-light);margin-top:4px}
.notif-scroll-container::-webkit-scrollbar { width: 6px; }
.notif-scroll-container::-webkit-scrollbar-track { background: transparent; }
.notif-scroll-container::-webkit-scrollbar-thumb { background-color: var(--color-border); border-radius: 10px; }
.notif-scroll-container::-webkit-scrollbar-thumb:hover { background-color: #adb5bd; }
.notif-text .desc{font-size:.78rem;color:var(--color-text-muted);margin-top:2px}

/* TOAST */
.toast-container-custom{position:fixed;bottom:24px;right:24px;z-index:9999;display:flex;flex-direction:column;gap:10px}
.toast-custom{background:var(--color-surface);border-radius:var(--radius-md);box-shadow:var(--shadow-lg);padding:14px 18px;display:flex;align-items:center;gap:12px;min-width:300px;border-left:4px solid var(--color-primary);animation:slide-in-toast .3s ease;font-size:.855rem}
.toast-custom.success{border-color:var(--color-success)}
.toast-custom.error{border-color:var(--color-danger)}
.toast-custom.warning{border-color:var(--color-warning)}
.toast-custom .toast-icon{font-size:1.1rem}
.toast-custom .toast-msg{flex:1;font-weight:500}
.toast-custom .toast-close{cursor:pointer;color:var(--color-text-muted)}
@keyframes slide-in-toast{from{transform:translateX(110%);opacity:0}to{transform:translateX(0);opacity:1}}

/* UTILITY */
.btn-primary-custom{background:var(--color-primary);border-color:var(--color-primary);color:#fff;font-weight:600;border-radius:var(--radius-sm);transition:all var(--transition)}
.btn-primary-custom:hover{background:var(--color-primary-dark);border-color:var(--color-primary-dark);color:#fff;box-shadow:0 4px 12px rgba(37,99,235,.35);transform:translateY(-1px)}
.btn:disabled, .btn[disabled] { cursor: not-allowed !important; pointer-events: auto !important; opacity: 0.65; transform: none !important; box-shadow: none !important; }
.section-title{font-size:.82rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--color-text-muted);margin-bottom:16px}



/* ── Users Page (users.html) ── */
.user-avatar-sm { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.role-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px; font-size: .72rem; font-weight: 600; }
.role-admin { background: #EFF6FF; color: var(--color-primary); }
.role-manager { background: #F5F3FF; color: #7C3AED; }
.role-viewer { background: #F0FDF4; color: var(--color-success); }
.input-pw-wrap { position: relative; }
.input-pw-wrap .pw-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); cursor: pointer; color: var(--color-text-muted); background: none; border: none; padding: 0; }
.user-stat { text-align: center; padding: 14px 18px; }
.user-stat .val { font-size: 1.5rem; font-weight: 800; }
.user-stat .lbl { font-size: .72rem; color: var(--color-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
/* ==========================================================================
   COMPONENT SPECIFIC STYLES (Moved from HTML files)
   ========================================================================== */

/* ── File Info Card (charge-view.html) ── */
.file-info-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.file-info-header { background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%); padding: 18px 24px; display: flex; align-items: center; gap: 14px; }
.file-info-header .file-icon { width: 48px; height: 48px; background: rgba(255,255,255,0.15); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: #fff; flex-shrink: 0; }
.file-info-header .file-name { font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: 3px; }
.file-info-header .file-sub { font-size: .78rem; color: rgba(255,255,255,0.75); }
.file-info-header .file-status { margin-left: auto; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); backdrop-filter: blur(6px); color: #fff; padding: 5px 14px; border-radius: 99px; font-size: .75rem; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.file-info-header .file-status .dot { width: 8px; height: 8px; background: #4ADE80; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 2px rgba(74,222,128,0.35); }
.file-info-tiles { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--color-border); }
.fi-tile { padding: 16px 20px; border-right: 1px solid var(--color-border); display: flex; align-items: center; gap: 12px; }
.fi-tile:last-child { border-right: none; }
.fi-tile .fi-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.fi-tile .fi-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-muted); margin-bottom: 2px; }
.fi-tile .fi-value { font-size: .9rem; font-weight: 700; color: var(--color-text); }

/* ── Profile Header (user-profile.html) ── */
.profile-avatar-lg { width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; color: #fff; margin-bottom: 15px; box-shadow: var(--shadow-sm); }
.profile-header { background: linear-gradient(135deg, var(--color-primary), #7C3AED); color: white; padding: 30px; border-radius: var(--radius-lg); margin-bottom: 24px; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 24px; }
.profile-header .info h2 { margin: 0 0 5px; font-weight: 800; font-size: 1.5rem; }
.profile-header .info p { margin: 0; opacity: 0.9; font-size: 0.9rem; }
.form-section-title { font-size: 0.85rem; font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 15px; border-bottom: 1px solid var(--color-border); padding-bottom: 8px; }

/* ── Table Checkbox Col (charge-view.html) ── */
.table th:first-child, .table td:first-child { width: 40px; }
.table tbody tr.selected-row { background: #EFF6FF !important; }

/* ── Action Bar ── */
.action-bar { background: var(--color-surface); border: 1px solid var(--color-border); padding: 14px 20px; border-radius: var(--radius-lg); margin-bottom: 20px; box-shadow: var(--shadow-sm); }

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */


@media(max-width:991.98px){
  .sidebar{transform:translateX(calc(-1 * var(--sidebar-w))); width: var(--sidebar-w) !important;}
  .sidebar.mobile-open{transform:translateX(0)}
  .main-content{margin-left:0 !important}
  /* Restore label visibility on mobile full sidebar */
  .sidebar .nav-label { opacity: 1 !important; width: auto !important; pointer-events: auto !important; }
  .sidebar .nav-section-label { opacity: 1 !important; }
  .sidebar .sidebar-footer { opacity: 1 !important; }
  .sidebar .sidebar-link { justify-content: flex-start !important; padding: 10px 20px !important; gap: 14px !important; }
  .sidebar .sidebar-link .nav-icon { width: 24px !important; font-size: 1.1rem !important; }
  .sidebar.collapsed .sidebar-link::after { display: none !important; }
  .navbar-brand-custom{min-width:auto}
  
  /* Charge View 2 cols */
  .file-info-tiles { grid-template-columns: repeat(2, 1fr); }
  .fi-tile:nth-child(2) { border-right: none; }
  .fi-tile { border-bottom: 1px solid var(--color-border); }
  .fi-tile:nth-last-child(-n+2) { border-bottom: none; }
}

@media(max-width:767.98px){
  .main-content{padding:16px}
  .stat-card-body .value{font-size:1.45rem}
  .top-navbar{padding:0 14px}
  .notif-dropdown{width:calc(100vw - 32px)}

  .navbar-brand-custom .brand-text span { display: none; }
  .profile-header { flex-direction: column; text-align: center; gap: 16px; padding: 20px; }
  
  /* Users mini stats grid adjustment */
  .divide-x .col-6:nth-child(odd) { border-right: 1px solid var(--color-border); }
  .divide-x .col-6:nth-child(even) { border-start: none !important; }
  .divide-x .col-6:nth-child(1), .divide-x .col-6:nth-child(2) { border-bottom: 1px solid var(--color-border); }
  .divide-x .border-start { border-left: none !important; }

  /* Navbar extreme aggressive hiding */
  .user-dropdown-btn > div:not(.user-avatar) { display: none !important; }
  .navbar-breadcrumb { display: none !important; }

  /* Toasts */
  .toast-container-custom { bottom: 16px; right: 16px; left: 16px; }
  .toast-custom { min-width: 0; width: 100%; }
  
  /* File info card strictly stacked */
  .file-info-header { flex-direction: column; text-align: center; gap: 10px; }
  .file-info-header .file-status { margin-left: 0; }
  .file-info-tiles { grid-template-columns: 1fr; }
  .fi-tile { border-right: none !important; border-bottom: 1px solid var(--color-border); justify-content: center; text-align: center; flex-direction: column; gap: 4px; }
  .fi-tile:last-child { border-bottom: none; }
  
  /* Subscription plan card */
  .plan-card { padding: 20px; }
  .plan-card::before { display: none; } 
  .plan-price { font-size: 2rem; }

  /* Action bars full width & strict stacking */
  .action-bar { padding: 12px; height: auto; }
  .action-bar .d-flex { flex-direction: column !important; align-items: stretch !important; width: 100%; gap: 12px !important; }
  .action-bar input[type="search"] { width: 100% !important; max-width: none; }
  .action-bar button, .action-bar select { width: 100% !important; max-width: none; }
  
  /* Page headers full width buttons */
  .page-header { flex-direction: column; align-items: stretch !important; gap: 16px; }
  .page-header > div:first-child { text-align: center; margin-bottom: 8px; }
  .page-header .d-flex { flex-direction: column !important; align-items: stretch !important; width: 100%; }
  .page-header button, .page-header a { width: 100%; justify-content: center; }

  /* Card Section Headers */
  .card-section-header { flex-direction: column; align-items: stretch; gap: 12px; text-align: center; }
  .card-section-header .d-flex { flex-direction: column !important; align-items: stretch !important; width: 100%; gap: 10px !important; }
  .card-section-header input, .card-section-header select, .card-section-header button { width: 100% !important; max-width: none; }

  /* Ensure tables and cards never cause body to overflow */
  .card-section { max-width: 100vw; }
  .table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media(max-width:575.98px){
  /* Further tweaks for very small devices if needed, but 768px handles stacking now. */
  .users-stat-grid .col-6 { width: 100%; }
  .divide-x .col-6 { border-right: none !important; border-bottom: 1px solid var(--color-border); }
  .divide-x .col-6:last-child { border-bottom: none; }
}


/* Targets all placeholders in the form */
::placeholder {
    color: #999;
    font-size: 13px; /* Adjust this pixel value as needed */
    opacity: 1;      /* Optional: keeps the text from looking too faded */
}

/* For older browser compatibility (optional but good practice) */
::-webkit-input-placeholder { font-size: 13px; }
:-ms-input-placeholder { font-size: 13px; }

/* ── Keep Bootstrap's red "!" icon but prevent text shift ──
   Bootstrap's .is-invalid increases padding-right to make room for the
   icon — causing text to visibly jump. We lock padding-right to the
   normal value and pin the icon to the right edge via background-position,
   so the icon appears without moving any content. */
.form-control.is-invalid,
.form-select.is-invalid,
input.is-invalid,
select.is-invalid,
textarea.is-invalid {
    padding-right: 16px !important;          /* same as normal — no shift  */
    background-position: right 12px center !important;
    background-size: 16px 16px !important;
}



/* ── PAGE LOADER ── */
#page-loader-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: linear-gradient(135deg, #0F2460 0%, #1E3A8A 45%, #2563EB 100%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
#page-loader-overlay.hiding {
    opacity: 0;
    visibility: hidden;
}

/* Loader robot icon */
.loader-robot-icon {
    width: 72px; height: 72px;
    background: rgba(255,255,255,0.12);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: #fff;
    animation: loaderBob 1.2s ease-in-out infinite;
}
@keyframes loaderBob {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

/* Loader spinner ring */
.loader-ring {
    width: 48px; height: 48px;
    border: 4px solid rgba(255,255,255,0.15);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spinRing 0.9s linear infinite;
}
@keyframes spinRing {
    to { transform: rotate(360deg); }
}

.loader-text {
    color: rgba(255,255,255,0.85);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    animation: loaderPulseText 1.4s ease-in-out infinite;
}
@keyframes loaderPulseText {
    0%,100% { opacity: 0.6; }
    50%      { opacity: 1; }
}

/* Helper class to stop the body from scrolling while loading */
.no-scroll { overflow: hidden; }

/* ── MICRO INTERACTION ENHANCEMENTS ── */
/* Smooth card hover lift */
.card-section { transition: box-shadow var(--transition); }
.card-section:hover { box-shadow: var(--shadow-md); }

/* Brand icon pulse on sidebar */
.brand-icon { animation: none; transition: all var(--transition); }
.brand-icon:hover { transform: scale(1.08); }

/* Notification badge pulse */
.badge-count { animation: badgePulse 2s ease-in-out infinite; }
@keyframes badgePulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.4); }
    50%      { box-shadow: 0 0 0 4px rgba(220,38,38,0); }
}