/* ================================================================
   RDMS — Custom Application Styles
   Built on Bootstrap 5.3 | Plus Jakarta Sans Font
================================================================ */

/* ── GOOGLE FONTS ALREADY LOADED VIA HTML ─────────────────────── */

/* ================================================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
================================================================ */
:root {
  /* Brand Colors */
  --rdms-primary:       #3B5BDB;
  --rdms-primary-dark:  #2F4AC0;
  --rdms-primary-rgb:   59, 91, 219;
  --rdms-primary-light: #EEF2FF;
  --rdms-secondary:     #6741D9;
  --rdms-success:       #2F9E44;
  --rdms-warning:       #E67700;
  --rdms-danger:        #C92A2A;
  --rdms-info:          #1098AD;
  --rdms-teal:          #0CA678;

  /* Layout Dimensions */
  --sidebar-width:           265px;
  --sidebar-collapsed-width: 70px;
  --header-height:           64px;
  --footer-height:           48px;
  --content-padding:         24px;

  /* Sidebar */
  --sidebar-bg:         #1a1e36;
  --sidebar-border:     rgba(255,255,255,.06);
  --sidebar-text:       rgba(180,195,230,.7);
  --sidebar-text-hover: #c8d5f0;
  --sidebar-text-active:#ffffff;
  --sidebar-item-hover: rgba(59,91,219,.12);
  --sidebar-label-text: rgba(180,195,230,.4);
  --sidebar-sub-bg:     rgba(0,0,0,.15);

  /* Page Layout */
  --body-bg:        #EFF2FC;
  --card-bg:        #ffffff;
  --card-radius:    14px;
  --card-shadow:    0 2px 12px rgba(59,91,219,.07), 0 1px 3px rgba(0,0,0,.04);
  --card-shadow-hv: 0 8px 28px rgba(59,91,219,.13), 0 2px 8px rgba(0,0,0,.06);
  --card-border:    1px solid rgba(59,91,219,.08);

  /* Header */
  --header-bg:      #ffffff;
  --header-shadow:  0 1px 8px rgba(0,0,0,.06);
  --header-border:  1px solid rgba(0,0,0,.06);

  /* Text */
  --text-primary:   #1a1c2e;
  --text-secondary: #4a5568;
  --text-muted:     #9ca3af;

  /* Form / Input */
  --input-bg:       #f8fafc;
  --input-border:   #d1d9e0;
  --input-radius:   10px;
  --input-focus:    rgba(59,91,219,.2);

  /* Status Colors */
  --status-blue:    #3B5BDB;
  --status-yellow:  #E67700;
  --status-purple:  #6741D9;
  --status-green:   #2F9E44;
  --status-red:     #C92A2A;
  --status-teal:    #0CA678;

  /* Misc */
  --border-color:   #e2e8f0;
  --transition:     all .25s ease;
  --transition-fast:all .15s ease;
}

/* ── DARK MODE OVERRIDES ──────────────────────────────────────── */
[data-bs-theme="dark"] {
  --body-bg:        #0f1117;
  --card-bg:        #1a1d2e;
  --card-border:    1px solid rgba(255,255,255,.06);
  --card-shadow:    0 2px 12px rgba(0,0,0,.3);
  --header-bg:      #1a1d2e;
  --header-border:  1px solid rgba(255,255,255,.07);
  --header-shadow:  0 1px 8px rgba(0,0,0,.3);
  --text-primary:   #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --border-color:   #2d3348;
  --input-bg:       #252840;
  --input-border:   #3d4460;
  --sidebar-bg:     #111322;
}

/* ================================================================
   2. GLOBAL BASE STYLES
================================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--body-bg);
  overflow-x: hidden;
  transition: background .3s ease, color .3s ease;
}

a { color: var(--rdms-primary); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--rdms-primary-dark); }

img { max-width: 100%; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(59,91,219,.25); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(59,91,219,.5); }

/* ================================================================
   3. LAYOUT: SIDEBAR
================================================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100dvh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  transition: transform .3s cubic-bezier(.4,0,.2,1), width .3s ease;
  overflow: hidden;
  border-right: var(--sidebar-border) solid rgba(255,255,255,.04);
}

/* Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  height: var(--header-height);
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.brand-logo-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--rdms-primary), var(--rdms-secondary));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(59,91,219,.4);
}
.brand-text-wrap { min-width: 0; }
.brand-name {
  display: block; font-size: 16px; font-weight: 800;
  color: #fff; letter-spacing: .5px; line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-sub {
  display: block; font-size: 9.5px; color: var(--sidebar-label-text);
  letter-spacing: .4px; text-transform: uppercase; white-space: nowrap;
}
.sidebar-close-btn {
  background: none; border: none; color: var(--sidebar-text);
  font-size: 18px; cursor: pointer; padding: 4px; line-height: 1;
  transition: var(--transition-fast);
}
.sidebar-close-btn:hover { color: #fff; }

/* User Strip */
.sidebar-user-strip {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.su-avatar {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  flex-shrink: 0; overflow: hidden;
}
.su-avatar img { width: 100%; height: 100%; object-fit: cover; }
.su-info { flex: 1; min-width: 0; }
.su-name {
  font-size: 12.5px; font-weight: 600; color: var(--sidebar-text-hover);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.su-role { font-size: 10.5px; color: var(--sidebar-label-text); white-space: nowrap; }
.su-edit-btn {
  color: var(--sidebar-label-text); font-size: 13px;
  flex-shrink: 0; transition: var(--transition-fast);
}
.su-edit-btn:hover { color: var(--rdms-primary); }

/* Nav List */
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 0; }
.nav-list { list-style: none; padding: 0; margin: 0; }

.nav-label {
  font-size: 9.5px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--sidebar-label-text);
  padding: 14px 22px 5px; margin: 0;
}

.nav-item { position: relative; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px; margin: 2px 10px;
  border-radius: 10px;
  color: var(--sidebar-text);
  font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: var(--transition-fast);
  text-decoration: none; white-space: nowrap;
}
.nav-link:hover {
  background: var(--sidebar-item-hover);
  color: var(--sidebar-text-hover);
}
.nav-item.active > .nav-link {
  background: linear-gradient(90deg, rgba(59,91,219,.9), rgba(103,65,217,.7));
  color: #fff;
  box-shadow: 0 4px 12px rgba(59,91,219,.3);
}
.nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-text { flex: 1; }
.nav-badge {
  background: #ef233c; color: #fff; font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}
.nav-arrow {
  font-size: 11px; transition: transform .25s ease; color: var(--sidebar-label-text);
}
.nav-link[aria-expanded="true"] .nav-arrow { transform: rotate(90deg); }

/* Sub-nav */
.sub-nav { list-style: none; padding: 4px 0 6px 42px; margin: 0; }
.sub-link {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 8px; margin: 1px 10px 1px 0;
  font-size: 12.5px; font-weight: 500;
  color: var(--sidebar-text); text-decoration: none;
  transition: var(--transition-fast);
}
.sub-link i { font-size: 13px; opacity: .7; }
.sub-link:hover { background: var(--sidebar-item-hover); color: var(--sidebar-text-hover); }
.sub-link.active { color: #fff; font-weight: 600; }
.sub-badge {
  margin-left: auto; background: #ef233c; color: #fff; font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 20px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}
.sidebar.collapsed .sub-badge { display: none; }

/* Sidebar Footer */
.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 12px 18px; flex-shrink: 0;
}
.sidebar-logout-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  color: var(--sidebar-text); font-size: 13px; font-weight: 500;
  transition: var(--transition-fast);
}
.sidebar-logout-btn:hover { background: rgba(201,42,42,.15); color: #ef5350; }

/* Sidebar collapsed state */
.sidebar.collapsed { width: var(--sidebar-collapsed-width); }
.sidebar.collapsed .brand-text-wrap,
.sidebar.collapsed .brand-sub,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .nav-arrow,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .sidebar-user-strip,
.sidebar.collapsed .sidebar-footer span { display: none; }
.sidebar.collapsed .nav-link { justify-content: center; margin: 2px 6px; padding: 10px; }
.sidebar.collapsed .sub-nav { display: none; }
.sidebar.collapsed .brand-logo-wrap { justify-content: center; }
.sidebar.collapsed .sidebar-footer { padding: 12px; }
.sidebar.collapsed .sidebar-logout-btn { justify-content: center; }

/* Overlay for mobile */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 1039;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ================================================================
   4. LAYOUT: MAIN WRAPPER & HEADER
================================================================ */
.main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100dvh;
  display: flex; flex-direction: column;
  transition: margin-left .3s cubic-bezier(.4,0,.2,1);
}
.main-wrapper.expanded { margin-left: var(--sidebar-collapsed-width); }

/* Header */
.page-header {
  position: sticky; top: 0; z-index: 1030;
  background: var(--header-bg);
  border-bottom: var(--header-border);
  box-shadow: var(--header-shadow);
  height: var(--header-height);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 12px;
  transition: background .3s ease;
}
.header-left, .header-right { display: flex; align-items: center; gap: 8px; }

/* Header icon button */
.header-icon-btn {
  width: 38px; height: 38px; border-radius: 10px;
  border: none; background: transparent;
  color: var(--text-secondary); font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition-fast);
  position: relative;
}
.header-icon-btn:hover {
  background: var(--rdms-primary-light);
  color: var(--rdms-primary);
}

/* Breadcrumb */
.breadcrumb { font-size: 12.5px; }
.breadcrumb-item a { color: var(--rdms-primary); }
.breadcrumb-item.active { color: var(--text-muted); }

/* ── Global Search ─────────────────────────────── */
.header-search-wrap { position: relative; }
.search-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: 340px; background: var(--card-bg);
  border: var(--card-border); border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,.15);
  z-index: 1050; display: none; overflow: hidden;
}
.search-dropdown.open { display: block; animation: fadeDown .2s ease; }
.search-form { display: flex; border-bottom: var(--card-border); }
.search-input {
  flex: 1; border: none; background: transparent; padding: 12px 14px;
  font-size: 14px; color: var(--text-primary); outline: none;
}
.search-submit { background: none; border: none; padding: 12px 14px; color: var(--rdms-primary); cursor: pointer; }
.search-results { max-height: 260px; overflow-y: auto; padding: 8px; }

/* ── Notifications Panel ────────────────────────── */
.notif-badge {
  position: absolute; top: 4px; right: 4px;
  min-width: 17px; height: 17px; border-radius: 20px;
  background: #ef233c; color: #fff; font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px; border: 2px solid var(--header-bg);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(239,35,60,.5); }
  50%      { box-shadow: 0 0 0 6px rgba(239,35,60,0); }
}

.notif-panel {
  width: 360px; padding: 0 !important;
  border-radius: 16px !important;
  border: var(--card-border) !important;
  box-shadow: 0 10px 40px rgba(0,0,0,.15) !important;
  overflow: hidden;
}
.notif-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border-color);
}
.notif-panel-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.notif-panel-actions { display: flex; gap: 8px; }
.notif-action-btn {
  background: none; border: none; font-size: 11.5px; color: var(--rdms-primary);
  cursor: pointer; padding: 4px 6px; border-radius: 6px;
  transition: var(--transition-fast); white-space: nowrap;
}
.notif-action-btn:hover { background: var(--rdms-primary-light); }
.notif-list-wrap { max-height: 300px; overflow-y: auto; }
.notif-loading { display: flex; align-items: center; justify-content: center; padding: 24px; }

.notif-item {
  display: flex; gap: 10px; padding: 11px 14px;
  transition: var(--transition-fast); cursor: pointer;
  border-bottom: 1px solid rgba(0,0,0,.04);
  text-decoration: none; color: inherit;
}
.notif-item:hover { background: var(--rdms-primary-light); }
.notif-item.unread { background: rgba(59,91,219,.04); }
.notif-item-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title { font-size: 12.5px; font-weight: 600; color: var(--text-primary); line-height: 1.3; }
.notif-item-msg { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.notif-item-time { font-size: 10.5px; color: var(--text-muted); margin-top: 3px; white-space: nowrap; }
.notif-unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rdms-primary); flex-shrink: 0; margin-top: 5px; }
.notif-panel-footer { padding: 10px 14px; text-align: center; border-top: 1px solid var(--border-color); }
.notif-empty { padding: 28px; text-align: center; color: var(--text-muted); }

/* ── User Dropdown ──────────────────────────────── */
.user-menu-btn {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer;
  padding: 4px 8px 4px 4px; border-radius: 12px;
  transition: var(--transition-fast);
}
.user-menu-btn:hover { background: var(--rdms-primary-light); }
.user-menu-avatar {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff; overflow: hidden;
}
.user-menu-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-menu-name { font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.2; }
.user-menu-role { font-size: 10.5px; color: var(--text-muted); }
.user-menu-caret { font-size: 11px; color: var(--text-muted); }
.user-dd-menu { min-width: 240px; padding: 0; border-radius: 14px !important; overflow: hidden; border: var(--card-border) !important; box-shadow: 0 10px 30px rgba(0,0,0,.12) !important; }
.user-dd-header { display: flex; gap: 12px; align-items: center; padding: 16px; }
.user-dd-avatar { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; color: #fff; flex-shrink: 0; }
.user-dd-menu .dropdown-item { padding: 9px 16px; font-size: 13px; display: flex; align-items: center; }
.user-dd-menu .dropdown-item i { font-size: 15px; }
.user-dd-menu .dropdown-item:hover { background: var(--rdms-primary-light); color: var(--rdms-primary); }
.user-dd-menu .dropdown-item.text-danger:hover { background: rgba(201,42,42,.08); }

/* ================================================================
   5. CONTENT AREA
================================================================ */
.content-area {
  flex: 1; padding: var(--content-padding);
  overflow-x: hidden;
}

/* Flash alerts */
.alert-flash {
  border-radius: 12px; border: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  margin-bottom: 18px; font-size: 13.5px;
}

/* Page Header Bar */
.page-header-bar {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 20px; gap: 12px;
}
.page-title {
  font-size: 22px; font-weight: 800; margin: 0;
  color: var(--text-primary); letter-spacing: -.3px;
}
.page-subtitle { font-size: 12.5px; color: var(--text-muted); margin: 3px 0 0; }
.page-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── Content Cards ────────────────────────────── */
.content-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 20px;
  transition: box-shadow .25s ease;
}
.content-card:hover { box-shadow: var(--card-shadow-hv); }
.content-card-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 18px; gap: 10px;
}
.content-card-title {
  font-size: 15px; font-weight: 700; margin: 0;
  color: var(--text-primary);
}
.content-card-subtitle {
  font-size: 12px; color: var(--text-muted); margin: 2px 0 0;
}

/* ── Stat Cards ─────────────────────────────────── */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  border: var(--card-border);
  padding: 18px 16px;
  border-left: 4px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative; overflow: hidden;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-hv); }
.stat-card::after {
  content: ''; position: absolute; right: -14px; bottom: -14px;
  width: 70px; height: 70px; border-radius: 50%;
  background: currentColor; opacity: .05;
}
.stat-card-blue   { border-left-color: #3B5BDB; color: #3B5BDB; }
.stat-card-yellow { border-left-color: #E67700; color: #E67700; }
.stat-card-purple { border-left-color: #6741D9; color: #6741D9; }
.stat-card-green  { border-left-color: #2F9E44; color: #2F9E44; }
.stat-card-red    { border-left-color: #C92A2A; color: #C92A2A; }
.stat-card-teal   { border-left-color: #0CA678; color: #0CA678; }

.stat-icon-wrap {
  font-size: 20px; margin-bottom: 10px; opacity: .85;
}
.stat-value {
  font-size: 28px; font-weight: 800; line-height: 1;
  color: var(--text-primary); margin-bottom: 4px;
}
.stat-value small { font-size: 14px; font-weight: 600; color: var(--text-muted); }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-bottom: 8px; }
.stat-footer { font-size: 11.5px; color: var(--text-muted); }

/* ── Chart Container ─────────────────────────────── */
.chart-container { position: relative; }

/* Chart Legend */
.chart-legend { margin-top: 14px; }
.legend-item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; border-bottom: 1px solid var(--border-color);
  font-size: 12.5px;
}
.legend-item:last-child { border: none; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend-label { flex: 1; color: var(--text-secondary); }
.legend-value { color: var(--text-primary); }

/* ── SLA Monitor ─────────────────────────────────── */
.sla-list { display: flex; flex-direction: column; gap: 10px; }
.sla-item {
  padding: 10px 12px; background: var(--body-bg);
  border-radius: 10px; border: 1px solid var(--border-color);
  transition: var(--transition-fast);
}
.sla-item:hover { border-color: var(--rdms-primary); }
.sla-item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.sla-item-info { min-width: 0; }
.sla-rr-number { font-size: 12px; font-weight: 700; color: var(--rdms-primary); display: block; }
.sla-equipment { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.sla-item-right { flex-shrink: 0; }
.sla-progress { border-radius: 20px; background: var(--border-color); }
.sla-item-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 5px; }

/* ── Activity Timeline ───────────────────────────── */
.activity-timeline { display: flex; flex-direction: column; gap: 0; }
.activity-item {
  display: flex; gap: 10px; position: relative; padding-bottom: 14px;
}
.activity-item:last-child { padding-bottom: 0; }
.activity-item::before {
  content: ''; position: absolute;
  left: 14px; top: 28px; bottom: 0;
  width: 1px; background: var(--border-color);
}
.activity-item:last-child::before { display: none; }
.activity-dot {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #fff; margin-top: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.activity-body { flex: 1; min-width: 0; }
.activity-title { font-size: 12.5px; line-height: 1.4; color: var(--text-primary); }
.activity-meta { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-time { font-size: 10.5px; color: var(--text-muted); margin-top: 2px; }

/* ── Pending List ──────────────────────────────── */
.pending-list { display: flex; flex-direction: column; }
.pending-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 10px;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-fast);
}
.pending-item:hover { background: var(--rdms-primary-light); }
.pending-item:last-of-type { border: none; }
.pending-item-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.pending-item-info { flex: 1; min-width: 0; }
.pending-rr { font-size: 12.5px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pending-equipment { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ================================================================
   6. FOOTER
================================================================ */
.page-footer {
  background: var(--header-bg);
  border-top: 1px solid var(--border-color);
  height: var(--footer-height);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--content-padding); height: 100%;
  font-size: 12px; color: var(--text-muted);
}

/* ================================================================
   7. AUTH PAGES
================================================================ */
.auth-body { background: #0f1220; min-height: 100dvh; }

.auth-wrapper {
  min-height: 100dvh; display: flex;
  align-items: center; justify-content: center;
  position: relative; overflow: hidden; padding: 20px;
  background: linear-gradient(135deg, #0d1028 0%, #1a2060 50%, #0d1535 100%);
}

/* Animated background shapes */
.auth-bg-shapes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.bg-shape {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(59,91,219,.15) 0%, transparent 70%);
  animation: floatShape 18s ease-in-out infinite;
}
.bg-shape.s1 { width: 600px; height: 600px; top: -20%; left: -10%; animation-delay: 0s; }
.bg-shape.s2 { width: 400px; height: 400px; top: 60%; right: -5%; animation-delay: -6s; background: radial-gradient(circle, rgba(103,65,217,.12) 0%, transparent 70%); }
.bg-shape.s3 { width: 300px; height: 300px; top: 20%; right: 20%; animation-delay: -12s; }
.bg-shape.s4 { width: 200px; height: 200px; bottom: 10%; left: 30%; animation-delay: -3s; }
@keyframes floatShape {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(30px,-20px) scale(1.05); }
  66%      { transform: translate(-20px,15px) scale(.95); }
}

/* Auth Card (login) */
.auth-card {
  display: flex; width: 920px; max-width: 100%;
  border-radius: 24px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
  position: relative; z-index: 1;
  animation: authSlideUp .5s ease;
}
@keyframes authSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-left {
    flex: 1.1;
    display: flex; /* Required */
    flex-direction: column;
    justify-content: center; /* Vertical center */
    align-items: center; /* Horizontal center */

    background: linear-gradient(160deg, rgba(59,91,219,.35) 0%, rgba(103,65,217,.2) 100%);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255,255,255,.1);
    padding: 48px 40px;
}

.auth-left-content {
    max-width: 340px;
    width: 100%;
    text-align: center; /* Center all text */
}

.auth-brand-logo {
    margin-bottom: 20px;
}

.auth-logo-icon {
    width: 100px;
    height: 100px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.auth-logo-icon img {
    max-width: 100%;
    height: auto;
    display: block;
}
.auth-brand-title { font-size: 26px; font-weight: 800; color: #fff; margin: 0; }
.auth-brand-agency { font-size: 12.5px; color: rgba(255,255,255,.5); margin: 4px 0 16px; }
.auth-brand-desc { font-size: 13.5px; color: rgba(255,255,255,.7); line-height: 1.7; margin-bottom: 22px; }

.auth-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center; /* Center horizontally */
    align-items: center;
    margin: 0 auto;
}
.auth-feature-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.8);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 500;
}
.auth-feature-pill i { font-size: 12px; color: rgba(255,255,255,.6); }

/* Workflow steps */
.auth-workflow {
  display: flex; align-items: center; gap: 4px;
}
.workflow-step { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.workflow-step span { font-size: 10px; color: rgba(255,255,255,.5); white-space: nowrap; }
.ws-dot {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.ws-blue   { background: #3B5BDB; }
.ws-yellow { background: #E67700; }
.ws-purple { background: #6741D9; }
.ws-orange { background: #F77F00; }
.ws-green  { background: #2F9E44; }
.workflow-line { flex: 1; height: 2px; background: rgba(255,255,255,.15); border-radius: 2px; min-width: 16px; }

/* Auth Right (Form) */
.auth-right {
  flex: 1; background: #fff; padding: 48px 44px;
  display: flex; flex-direction: column; justify-content: center;
}
.auth-form-header {
    text-align: center;
}
.auth-form-wrap { max-width: 360px; margin: 0 auto; width: 100%; }
.auth-form-title { font-size: 24px; font-weight: 800; color: #1a1c2e; margin-bottom: 4px;}
.auth-form-subtitle { font-size: 13.5px; color: #718096; margin-bottom: 24px; }

/* Form labels */
.form-label-auth { font-size: 12.5px; font-weight: 600; color: #4a5568; margin-bottom: 6px; display: block; }

/* Input icon wrap */
.input-icon-wrap { position: relative; }
.input-icon-left {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: #9ca3af; font-size: 15px; pointer-events: none; z-index: 2;
}
.input-icon-right {
  position: absolute; right: 0; top: 0; height: 100%;
  background: none; border: none; padding: 0 12px;
  color: #9ca3af; cursor: pointer; font-size: 15px; transition: color .2s;
}
.input-icon-right:hover { color: var(--rdms-primary); }

/* Auth Input */
.auth-input {
  height: 46px; border-radius: var(--input-radius) !important;
  border: 1.5px solid #e2e8f0 !important;
  background: #f8fafc !important;
  padding: 0 40px 0 40px !important;
  font-size: 13.5px !important; color: #1a1c2e !important;
  transition: border .2s, box-shadow .2s !important;
}
.auth-input:focus {
  border-color: var(--rdms-primary) !important;
  box-shadow: 0 0 0 3px rgba(59,91,219,.12) !important;
  background: #fff !important; outline: none !important;
}

/* Auth primary button */
.btn-auth-primary {
  height: 46px; border-radius: 12px !important;
  background: linear-gradient(135deg, var(--rdms-primary), var(--rdms-secondary)) !important;
  border: none !important; color: #fff !important;
  font-size: 14px !important; font-weight: 600 !important;
  box-shadow: 0 4px 16px rgba(59,91,219,.35) !important;
  transition: transform .2s, box-shadow .2s !important;
}
.btn-auth-primary:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 24px rgba(59,91,219,.45) !important;
}
.btn-auth-primary:disabled { opacity: .7; transform: none !important; }

.auth-link { font-size: 12.5px; color: var(--rdms-primary); font-weight: 500; }
.auth-divider {
  display: flex; align-items: center; gap: 12px; color: #9ca3af; font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: #e2e8f0;
}
.auth-footer-text { font-size: 11.5px; color: #9ca3af; text-align: center; margin: 0; }

/* Mobile auth */
.mobile-auth-icon {
    width: 80px;
    height: 80px;
    border-radius: 14px;
    margin: 0 auto;
    background: linear-gradient(135deg,rgba(59, 91, 219, 0.3),rgba(103, 65, 217, 0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
}

/* Auth minimal (forgot / reset) */
.auth-minimal .auth-mini-card {
  background: #fff; border-radius: 20px; padding: 40px;
  width: 440px; max-width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  position: relative; z-index: 1;
  animation: authSlideUp .4s ease;
}
.auth-mini-icon {
  width: 60px; height: 60px; border-radius: 18px; margin: 0 auto;
  background: linear-gradient(135deg, var(--rdms-primary), var(--rdms-secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff;
  box-shadow: 0 8px 24px rgba(59,91,219,.4);
}

/* Password strength */
.strength-track { height: 4px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.strength-fill { height: 100%; border-radius: 4px; transition: width .3s, background .3s; width: 0; }
.strength-label { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; display: block; }

/* ================================================================
   8. STATUS BADGES
================================================================ */
.status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600; letter-spacing: .2px;
}
.priority-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 20px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
}
.priority-urgent { background: rgba(201,42,42,.12); color: #C92A2A; }
.priority-high   { background: rgba(230,119,0,.12);  color: #E67700; }
.priority-normal { background: rgba(59,91,219,.12);  color: #3B5BDB; }
.priority-low    { background: rgba(107,114,128,.12);color: #6b7280; }

/* ================================================================
   9. FORMS
================================================================ */
.form-control, .form-select {
  border-radius: var(--input-radius) !important;
  border: 1.5px solid var(--input-border) !important;
  background: var(--input-bg) !important;
  color: var(--text-primary) !important;
  font-size: 13.5px !important;
  transition: border .2s, box-shadow .2s !important;
}
.form-control:focus, .form-select:focus {
  border-color: var(--rdms-primary) !important;
  box-shadow: 0 0 0 3px rgba(59,91,219,.12) !important;
}
.form-label { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-text { font-size: 11.5px; color: var(--text-muted); }

/* Drag & drop upload area */
.upload-area {
  border: 2px dashed var(--border-color); border-radius: 14px;
  padding: 32px; text-align: center; cursor: pointer;
  transition: var(--transition);
  background: var(--body-bg);
}
.upload-area:hover, .upload-area.dragover {
  border-color: var(--rdms-primary);
  background: var(--rdms-primary-light);
}
.upload-area i { font-size: 36px; color: var(--text-muted); }
.upload-area.dragover i { color: var(--rdms-primary); }

/* ================================================================
   10. EMPTY STATES
================================================================ */
.empty-state-sm {
  text-align: center; padding: 28px 16px;
  color: var(--text-muted); font-size: 13px;
}
.empty-state {
  text-align: center; padding: 60px 20px;
}
.empty-state-icon { font-size: 52px; color: var(--text-muted); opacity: .5; }
.empty-state-title { font-size: 17px; font-weight: 700; color: var(--text-primary); margin-top: 14px; }
.empty-state-desc { font-size: 13.5px; color: var(--text-muted); margin-top: 6px; }

/* ================================================================
   11. TABLES (DataTables)
================================================================ */
.table { font-size: 13px; color: var(--text-primary); }
.table thead th {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--text-muted);
  background: var(--body-bg); border-bottom: 2px solid var(--border-color);
  padding: 10px 14px; white-space: nowrap;
}
.table tbody td { padding: 11px 14px; vertical-align: middle; border-color: var(--border-color); }
.table tbody tr:hover td { background: rgba(59,91,219,.03); }

/* ================================================================
   12. BUTTONS
================================================================ */
.btn { border-radius: 10px !important; font-size: 13px !important; font-weight: 600 !important; }
.btn-primary {
  background: linear-gradient(135deg, var(--rdms-primary), var(--rdms-secondary)) !important;
  border: none !important; box-shadow: 0 4px 14px rgba(59,91,219,.3) !important;
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(59,91,219,.4) !important; transform: translateY(-1px); }
.btn-sm { padding: 6px 14px !important; font-size: 12px !important; border-radius: 8px !important; }
.btn-xs { padding: 3px 10px !important; font-size: 11px !important; border-radius: 6px !important; }
.btn-icon { width: 36px; height: 36px; padding: 0 !important; display: inline-flex; align-items: center; justify-content: center; }

/* ================================================================
   13. MISC UTILITIES
================================================================ */
.separator { color: var(--border-color); }
.fs-sm { font-size: 12.5px !important; }
.fw-semibold { font-weight: 600 !important; }
.text-gradient {
  background: linear-gradient(135deg, var(--rdms-primary), var(--rdms-secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.card-header-actions { display: flex; align-items: center; gap: 8px; }

/* Bootstrap badge overrides */
.bg-success-subtle { background: rgba(47,158,68,.12) !important; }
.bg-danger-subtle  { background: rgba(201,42,42,.12) !important; }
.bg-warning-subtle { background: rgba(230,119,0,.12) !important; }
.bg-primary-subtle { background: rgba(59,91,219,.12) !important; }
.bg-info-subtle    { background: rgba(16,152,173,.12) !important; }
.text-success { color: #2F9E44 !important; }
.text-danger  { color: #C92A2A !important; }
.text-warning { color: #E67700 !important; }
.text-primary { color: var(--rdms-primary) !important; }
.text-info    { color: #1098AD !important; }
 

/* Animations */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}

/* ================================================================
   14. RESPONSIVE
================================================================ */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-width)));
    box-shadow: none;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .main-wrapper { margin-left: 0 !important; }

  .content-area { padding: 16px; }
  .page-header-bar { flex-direction: column; align-items: flex-start; }
  .auth-card { flex-direction: column; max-width: 440px; }
  .auth-left { padding: 28px; }
  .auth-right { padding: 28px; }
}

@media (max-width: 575.98px) {
  .stat-card { padding: 14px 12px; }
  .stat-value { font-size: 22px; }
  .page-header { padding: 0 14px; }
  .notif-panel { width: calc(100vw - 24px) !important; right: 0; }
}

/* Print styles */
@media print {
  .sidebar, .page-header, .page-footer, .page-header-actions { display: none !important; }
  .main-wrapper { margin-left: 0 !important; }
  .content-area { padding: 0; }
}
