/*
 * Modern Dashboard Styles
 * Action-First Interaction Flow Design
 * A clean, modern interface inspired by contemporary design patterns
 */

/* ===== CSS Variables ===== */
:root {
  --primary-color: #0891b2;
  --primary-hover: #0e7490;
  --secondary-color: #f59e0b;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --info-color: #3b82f6;
  --warning-color: #f59e0b;
  --purple-color: #8b5cf6;
  
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-hover: #f3f4f6;
  
  --border-color: #e5e7eb;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --transition-base: all 0.2s ease-in-out;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Global Overrides for Modern Look ===== */
body.modern-dashboard {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll on body */
}

/* Mobile-specific overflow prevention */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }

  * {
    box-sizing: border-box;
  }

  #wrapper {
    overflow-x: hidden;
    width: 100%;
  }

  #page-wrapper {
    overflow-x: hidden;
    width: 100%;
  }
}

/* ===== Fix Footer Positioning ===== */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

#wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
}

#page-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.wrapper.wrapper-content {
  flex: 1 0 auto;
  padding-bottom: 60px;
}

.footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 20px 30px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
  position: relative;
  width: 100%;
}

/* ===== Navigation Menu Modern Colors ===== */
.navbar-static-side {
  background: #ffffff !important;
  border-right: 1px solid #e5e7eb !important;
}

.navbar-static-side .nav > li > a {
  color: #6b7280 !important;
  padding: 12px 25px;
  transition: all 0.2s ease-in-out;
  border-left: 3px solid transparent;
}

.navbar-static-side .nav > li.active > a,
.navbar-static-side .nav > li > a:hover {
  background: #f9fafb !important;
  color: #0891b2 !important;
  border-left-color: #0891b2 !important;
}

.navbar-static-side .nav > li > a i {
  color: #6b7280;
  transition: all 0.2s ease-in-out;
}

.navbar-static-side .nav > li.active > a i,
.navbar-static-side .nav > li > a:hover i {
  color: #0891b2 !important;
}

.navbar-static-side .nav-second-level > li > a {
  padding: 10px 25px 10px 52px;
  color: #6b7280 !important;
}

.navbar-static-side .nav-second-level > li > a:hover {
  background: #f3f4f6 !important;
  color: #0891b2 !important;
}

.navbar-static-side .nav-second-level > li.active > a {
  background: #f3f4f6 !important;
  color: #0891b2 !important;
  font-weight: 600;
  border-left: 3px solid #0891b2 !important;
}

/* The metisMenu plugin toggles .collapse/.in to show/hide nested menus.
   When a submenu's parent is .active (because the user is on one of its
   pages) we force the .collapse to be visible so the active item is
   reachable on page load even before metisMenu finishes initialising. */
.navbar-static-side .nav > li.active > .nav-second-level.collapse,
.navbar-static-side .nav > li.active > .nav-second-level.in {
  display: block !important;
  height: auto !important;
}

/* When a TOP-LEVEL menu item is active but its <a> is just a "#" expander
   (Reports / Settings), highlight it the same way as a real active link
   so the user can see which group is current. */
.navbar-static-side .nav > li.active > a[href="#"] {
  background: #f9fafb !important;
  color: #0891b2 !important;
  border-left-color: #0891b2 !important;
}
.navbar-static-side .nav > li.active > a[href="#"] i,
.navbar-static-side .nav > li.active > a[href="#"] .fa {
  color: #0891b2 !important;
}

/* ===== Compact Page Header (User Profile Style) ===== */
.modern-page-header {
  background: white;
  padding: 16px 24px;
  margin-bottom: 24px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.header-info {
  display: flex;
  flex-direction: column;
}

.modern-page-title {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  line-height: 1.2;
}

.modern-page-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin: 2px 0 0 0;
}

/* ===== Modern Search Card ===== */
.modern-search-card {
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 24px;
}

.modern-search-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== Modern Form Styles ===== */
.modern-form-inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  align-items: end;
}

.modern-form-group {
  display: flex;
  flex-direction: column;
}

.modern-form-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.modern-form-input {
  padding: 10px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
  background: #f9fafb;
}

.modern-form-input:focus {
  outline: none;
  border-color: #0891b2;
  background: white;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

/* ===== Native <select> dropdowns ===== */
/* Strip native chrome and paint our own caret so the text doesn't get clipped
   by the browser's built-in arrow and the height stays consistent with inputs. */
select.modern-form-input,
.modern-modal-form select.form-control,
.modern-modal-form select.modern-form-input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3e%3cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
  padding-right: 40px;
  min-height: 42px;
  line-height: 1.4;
  cursor: pointer;
}

select.modern-form-input::-ms-expand,
.modern-modal-form select.form-control::-ms-expand,
.modern-modal-form select.modern-form-input::-ms-expand {
  display: none;
}

select.modern-form-input option,
.modern-modal-form select.form-control option,
.modern-modal-form select.modern-form-input option {
  padding: 8px 10px;
  background: #ffffff;
  color: #111827;
}

/* ===== Chosen.js dropdown ===== */
/* Chosen replaces the native <select> with a wrapper div; style that wrapper
   so it matches modern-form-input. */
.modern-modal-form .chosen-container {
  width: 100% !important;
  font-size: 14px;
}

.modern-modal-form .chosen-container-single .chosen-single {
  padding: 6px 14px;
  min-height: 42px;
  line-height: 28px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  color: #111827;
  box-shadow: none;
  transition: all 0.2s ease;
}

.modern-modal-form .chosen-container-single .chosen-single:hover {
  border-color: #cbd5e1;
}

.modern-modal-form .chosen-container-active.chosen-with-drop .chosen-single,
.modern-modal-form .chosen-container-active .chosen-single {
  border-color: #0891b2;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

.modern-modal-form .chosen-container-single .chosen-single div b {
  background-position: 0 10px;
}

.modern-modal-form .chosen-container-active.chosen-with-drop .chosen-single div b {
  background-position: -18px 10px;
}

.modern-modal-form .chosen-container .chosen-drop {
  border: 2px solid #0891b2;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 1100;
}

.modern-modal-form .chosen-container .chosen-results {
  padding: 6px;
  margin: 0;
  max-height: 240px;
}

.modern-modal-form .chosen-container .chosen-results li {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: #374151;
}

.modern-modal-form .chosen-container .chosen-results li.highlighted {
  background: #0891b2;
  color: #ffffff;
}

.modern-modal-form .chosen-container-single .chosen-search input[type="text"] {
  padding: 6px 10px;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  font-size: 13px;
}

/* Make sure dropdowns inside a Bootstrap modal aren't clipped */
.modal .modal-body {
  overflow: visible;
}

.modal-open .modern-modal-form .chosen-container .chosen-drop {
  z-index: 1060;
}

/* For native selects inside modals, expand z-index/positioning for the
   browser-rendered option panel — browsers handle this themselves, but keep
   the wrapper from getting an overflow clip. */
.modal .modern-modal-form {
  overflow: visible;
}

/* ===== Modern Checkbox ===== */
.modern-checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
}

.modern-checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.modern-checkbox-group label {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
  cursor: pointer;
}

/* ===== Modern Buttons ===== */
.modern-btn-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.modern-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.modern-btn-primary {
  background: #0891b2;
  color: white;
}

.modern-btn-primary:hover {
  background: #0e7490;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
  color: white;
  text-decoration: none;
}

.modern-btn-secondary {
  background: #f3f4f6;
  color: #6b7280;
}

.modern-btn-secondary:hover {
  background: #e5e7eb;
  color: #374151;
  text-decoration: none;
}

.modern-btn-success {
  background: #10b981;
  color: white;
}

.modern-btn-success:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  color: white;
  text-decoration: none;
}

.modern-btn-danger {
  background: #ef4444;
  color: white;
}

.modern-btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  color: white;
  text-decoration: none;
}

.modern-btn-warning {
  background: #f59e0b;
  color: white;
}

.modern-btn-warning:hover {
  background: #d97706;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  color: white;
  text-decoration: none;
}

/* ===== Modern Card Styles ===== */
.modern-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.modern-card-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modern-card-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.modern-card-body {
  padding: 0;
}

/* ===== Modern Table Styles ===== */
.modern-table {
  width: 100%;
  border-collapse: collapse;
}

.modern-table thead {
  background: #f9fafb;
}

.modern-table th {
  padding: 12px 20px;
  font-weight: 600;
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  text-align: left;
  border-bottom: 2px solid #e5e7eb;
}

.modern-table td {
  padding: 16px 20px;
  font-size: 14px;
  color: #1f2937;
  border-bottom: 1px solid #f3f4f6;
}

.modern-table tbody tr {
  transition: all 0.2s ease;
}

.modern-table tbody tr:hover {
  background: #f9fafb;
}

.modern-table tbody tr.alert-danger {
  background: #fee2e2;
}

.modern-table tbody tr.alert-danger:hover {
  background: #fecaca;
}

/* ===== Modern Badges ===== */
.modern-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.modern-badge-primary {
  background: #dbeafe;
  color: #1e40af;
}

.modern-badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.modern-badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.modern-badge-success {
  background: #d1fae5;
  color: #065f46;
}

/* ===== Modern Action Buttons ===== */
.modern-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid #e5e7eb;
  background: white;
  color: #6b7280;
  margin-right: 6px;
}

.modern-action-btn:hover {
  background: #f9fafb;
  color: #374151;
  text-decoration: none;
  border-color: #d1d5db;
}

.modern-action-btn.edit {
  color: #0891b2;
  border-color: #0891b2;
}

.modern-action-btn.edit:hover {
  background: #ecfeff;
}

.modern-action-btn.delete {
  color: #ef4444;
  border-color: #ef4444;
}

.modern-action-btn.delete:hover {
  background: #fee2e2;
}

.modern-action-btn.pass-code {
  color: #10b981;
  border-color: #10b981;
}

.modern-action-btn.pass-code:hover {
  background: #d1fae5;
}

.modern-action-btn.disable {
  opacity: 0.5;
  cursor: not-allowed;
}

.modern-action-btn.disable:hover {
  background: white;
  border-color: #e5e7eb;
}

/* ===== Guest Date Info ===== */
.guest-date-info {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

.guest-date-info.pink {
  color: #ef4444;
  font-weight: 600;
}

/* ===== DataTables Modern Styling ===== */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  padding: 15px 24px;
}

.dataTables_wrapper .dataTables_paginate {
  padding: 15px 24px;
}

.dataTables_wrapper .dataTables_info {
  padding: 15px 24px;
  color: #6b7280;
  font-size: 13px;
}

.dataTables_wrapper .dataTables_filter input {
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  margin-left: 8px;
}

.dataTables_wrapper .dataTables_filter input:focus {
  outline: none;
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

.dt-buttons {
  display: flex;
  gap: 8px;
}

.dt-buttons .btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid #e5e7eb;
  background: white;
  color: #6b7280;
  transition: all 0.2s ease;
}

.dt-buttons .btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #374151;
}

/* ===== Top Flow Bar ===== */
.action-flow-bar {
  background: var(--bg-primary);
  padding: 20px 30px;
  margin: -20px -20px 30px -20px;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.action-flow-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.action-flow-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.action-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 140px;
  flex: 1;
  position: relative;
}

.action-step-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  font-size: 20px;
  transition: var(--transition-base);
}

.action-step.active .action-step-icon {
  background: var(--primary-color);
  color: white;
}

.action-step-number {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 5px;
}

.action-step-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.action-step-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.action-step-arrow {
  position: absolute;
  right: -25px;
  top: 20px;
  color: var(--border-color);
  font-size: 20px;
}

.action-step:last-child .action-step-arrow {
  display: none;
}

/* ===== Header Greeting ===== */
.dashboard-greeting {
  margin-bottom: 30px;
}

.greeting-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.greeting-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.greeting-title .wave-emoji {
  display: inline-block;
  animation: wave 2.5s infinite;
  transform-origin: 70% 70%;
}

@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}

.greeting-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* ===== User Profile Header ===== */
.user-profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.user-role {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

/* ===== Action Prompt Section ===== */
.action-prompt {
  margin-bottom: 25px;
}

.action-prompt-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 15px;
}

/* ===== Action Cards Grid ===== */
.action-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.action-card {
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 20px;
  transition: var(--transition-smooth);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.action-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary-color);
  transform: scaleX(0);
  transition: var(--transition-smooth);
}

.action-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.action-card:hover::before {
  transform: scaleX(1);
}

.action-card.cyan {
  border-color: #06b6d4;
}
.action-card.cyan:hover::before {
  background: #06b6d4;
}

.action-card.orange {
  border-color: #f59e0b;
}
.action-card.orange:hover::before {
  background: #f59e0b;
}

.action-card.purple {
  border-color: #8b5cf6;
}
.action-card.purple:hover::before {
  background: #8b5cf6;
}

.action-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.action-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 5px 0;
}

.action-card-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

.action-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.action-card-icon.cyan {
  background: #e0f2fe;
  color: #0891b2;
}

.action-card-icon.orange {
  background: #fef3c7;
  color: #f59e0b;
}

.action-card-icon.purple {
  background: #ede9fe;
  color: #8b5cf6;
}

/* ===== Section Headers ===== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.section-link {
  font-size: 13px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-base);
}

.section-link:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

/* ===== Content Grid Layout ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

.modern-card:hover {
  box-shadow: var(--shadow-xl);
}

.modern-card-footer {
  padding: 15px 20px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

/* ===== List Items ===== */
.request-list,
.payment-list,
.update-list,
.stat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.request-item,
.payment-item,
.update-item {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: var(--transition-base);
  cursor: pointer;
}

.request-item:last-child,
.payment-item:last-child,
.update-item:last-child {
  border-bottom: none;
}

.request-item:hover,
.payment-item:hover,
.update-item:hover {
  background: var(--bg-hover);
}

.item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.item-icon.blue {
  background: #dbeafe;
  color: #3b82f6;
}

.item-icon.orange {
  background: #fed7aa;
  color: #f59e0b;
}

.item-icon.green {
  background: #d1fae5;
  color: #10b981;
}

.item-icon.purple {
  background: #e9d5ff;
  color: #8b5cf6;
}

.item-icon.red {
  background: #fee2e2;
  color: #ef4444;
}

.item-content {
  flex: 1;
}

.item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 3px 0;
}

.item-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

.item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.item-date {
  font-size: 11px;
  color: var(--text-light);
}

.item-amount {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ===== Status Badges ===== */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-badge.in-progress {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge.scheduled {
  background: #fed7aa;
  color: #92400e;
}

.status-badge.completed {
  background: #d1fae5;
  color: #065f46;
}

.status-badge.paid {
  background: #d1fae5;
  color: #065f46;
}

/* ===== Upcoming Events / Calendar ===== */
.upcoming-item {
  display: flex;
  gap: 15px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-base);
}

.upcoming-item:last-child {
  border-bottom: none;
}

.upcoming-item:hover {
  background: var(--bg-hover);
}

.upcoming-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  padding: 8px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius-sm);
  text-align: center;
}

.upcoming-date-icon {
  font-size: 20px;
  margin-bottom: 3px;
}

.upcoming-date-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.upcoming-content {
  flex: 1;
}

.upcoming-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 3px 0;
}

.upcoming-time {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

/* ===== Account Overview ===== */
.account-overview {
  background: var(--bg-primary);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
  padding: 25px;
}

.balance-display {
  margin-bottom: 20px;
}

.balance-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.balance-amount {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.balance-actions {
  margin-bottom: 25px;
}

.btn-pay-now {
  width: 100%;
  padding: 12px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-base);
}

.btn-pay-now:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.account-details {
  list-style: none;
  padding: 0;
  margin: 0;
}

.account-detail-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.account-detail-item:last-child {
  border-bottom: none;
}

.account-detail-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.account-detail-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ===== Promo Card ===== */
.promo-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: var(--border-radius-md);
  padding: 25px;
  position: relative;
  overflow: hidden;
}

.promo-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.promo-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.promo-description {
  font-size: 13px;
  margin-bottom: 15px;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.promo-icon {
  font-size: 48px;
  position: absolute;
  right: 20px;
  bottom: 20px;
  opacity: 0.3;
}

.btn-promo {
  background: white;
  color: #667eea;
  padding: 8px 20px;
  border: none;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-base);
  position: relative;
  z-index: 1;
}

.btn-promo:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ===== Quick Access Bar ===== */
.quick-access-bar {
  background: var(--bg-primary);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
  padding: 20px;
  margin-top: 30px;
}

.quick-access-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.quick-access-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.quick-access-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius-sm);
  transition: var(--transition-base);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.quick-access-item:hover {
  background: var(--bg-hover);
  transform: translateX(3px);
}

.quick-access-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-secondary);
}

.quick-access-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

/* ===== Sidebar Overrides ===== */
body.modern-dashboard .navbar-static-side {
  background: var(--bg-primary);
  border-right: 1px solid var(--border-color);
}

body.modern-dashboard .nav > li > a {
  color: var(--text-secondary);
  padding: 12px 25px;
  transition: var(--transition-base);
  border-left: 3px solid transparent;
}

body.modern-dashboard .nav > li.active > a,
body.modern-dashboard .nav > li > a:hover {
  background: var(--bg-hover);
  color: var(--primary-color);
  border-left-color: var(--primary-color);
}

body.modern-dashboard .nav-header {
  background: var(--primary-color);
  padding: 25px 20px;
}

/* ===== Top Navbar Overrides ===== */
body.modern-dashboard .navbar-static-top {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .action-flow-steps {
    flex-wrap: wrap;
  }
  
  .action-step {
    min-width: 120px;
  }
  
  .action-cards-grid {
    grid-template-columns: 1fr;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .quick-access-items {
    grid-template-columns: 1fr;
  }
  
  .greeting-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .modern-form-inline {
    grid-template-columns: 1fr;
  }

  .modern-page-header {
    padding: 16px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .header-left {
    width: 100%;
  }

  .modern-search-card {
    padding: 20px;
  }

  .modern-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .modern-btn-group {
    flex-wrap: wrap;
    width: 100%;
  }

  .modern-btn {
    flex: 1;
    justify-content: center;
    min-width: 100px;
  }

  /* Mobile Table Fixes */
  .wrapper.wrapper-content {
    padding: 10px 5px;
    overflow-x: hidden; /* Prevent horizontal scroll */
    margin-left: -15px;
    margin-right: -15px;
  }

  .modern-page-header {
    margin-left: 0;
    margin-right: 0;
  }

  .modern-search-card {
    margin-left: 0;
    margin-right: 0;
    padding: 15px;
  }

  .modern-card {
    margin-left: 0;
    margin-right: 0;
  }

  /* Fix form group overflow */
  .modern-form-inline {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .modern-form-group {
    min-width: 0; /* Prevent flex items from overflowing */
    margin-left: 0;
    margin-right: 0;
  }

  .modern-form-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .modern-btn-group {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .modern-table {
    font-size: 13px;
  }

  .modern-table th,
  .modern-table td {
    padding: 10px 8px;
  }

  .modern-action-btn {
    padding: 4px 8px;
    font-size: 12px;
    margin-right: 4px;
    margin-bottom: 4px;
  }

  .modern-action-btn i {
    font-size: 12px;
  }

  /* Stack action buttons on mobile */
  .modern-table td[style*="white-space:nowrap;"]:last-child {
    white-space: normal !important;
  }

  /* Make DataTables responsive */
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter,
  .dataTables_wrapper .dataTables_info,
  .dataTables_wrapper .dataTables_paginate {
    padding: 10px 15px;
  }

  .dataTables_wrapper .dataTables_filter input {
    width: 100%;
    max-width: 200px;
  }

  /* Hide "Show entries" dropdown on mobile */
  .dataTables_wrapper .dataTables_length {
    display: none !important;
  }

  /* Hide "Showing X to Y of Z entries" text on mobile */
  .dataTables_wrapper .dataTables_info {
    display: none !important;
  }

  /* Hide export buttons on mobile */
  .dt-buttons,
  .html5buttons {
    display: none !important;
  }

  .dt-buttons {
    flex-wrap: wrap;
  }

  .dt-buttons .btn {
    font-size: 12px;
    padding: 6px 12px;
    margin-bottom: 5px;
  }

  /* Footer mobile fix */
  .footer {
    padding: 15px 20px;
    font-size: 12px;
    margin-left: -15px;
    margin-right: -15px;
    border-radius: 0;
  }

  .footer .pull-right {
    float: none !important;
    text-align: left;
    margin-bottom: 10px;
  }

  /* Center pagination on mobile */
  .dataTables_wrapper .dataTables_paginate {
    text-align: center !important;
    float: none !important;
  }

  .dataTables_wrapper .dataTables_paginate .pagination {
    justify-content: center;
    margin: 10px 0;
  }

  /* Make filter full width on mobile */
  .dataTables_wrapper .dataTables_filter {
    text-align: center !important;
    float: none !important;
  }

  .dataTables_wrapper .dataTables_filter label {
    display: block;
    width: 100%;
  }

  .dataTables_wrapper .dataTables_filter input {
    margin-left: 0 !important;
    margin-top: 5px;
  }

  /* Navigation mobile */
  .navbar-static-side {
    background: #ffffff !important;
  }
}

@media (max-width: 480px) {
  .action-step-arrow {
    display: none;
  }
  
  .action-flow-steps {
    flex-direction: column;
  }
  
  .action-step {
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    gap: 15px;
  }
  
  .action-step-icon {
    margin-bottom: 0;
  }

  /* Extra small screens - prevent any overflow */
  .wrapper.wrapper-content {
    padding: 5px;
    margin: 0;
    overflow-x: hidden;
  }

  .modern-page-header {
    padding: 12px 10px;
    margin: 0 0 15px 0;
  }

  .modern-search-card {
    padding: 12px 10px;
    margin: 0 0 15px 0;
  }

  .modern-card {
    margin: 0 0 15px 0;
  }

  .modern-form-inline {
    gap: 10px;
  }

  .modern-form-group {
    width: 100%;
    padding: 0;
    margin: 0;
  }

  .modern-form-label {
    font-size: 12px;
  }

  .modern-form-input {
    font-size: 14px;
    padding: 8px 10px;
  }

  .modern-btn {
    font-size: 13px;
    padding: 8px 12px;
    width: 100%;
  }

  .modern-btn-group {
    flex-direction: column;
    gap: 8px;
  }

  .modern-checkbox-group {
    width: 100%;
    justify-content: flex-start;
  }

  .modern-table {
    font-size: 12px;
  }

  .modern-table th,
  .modern-table td {
    padding: 8px 5px;
  }

  .modern-action-btn {
    display: block;
    width: 100%;
    margin-bottom: 5px;
    text-align: center;
  }

  .modern-badge {
    font-size: 11px;
    padding: 3px 8px;
  }

  /* Ensure cards don't overflow */
  .modern-card-header,
  .modern-card-body {
    padding: 12px 10px;
  }

  .modern-card-title {
    font-size: 16px;
  }
}

/* ===== Utility Classes ===== */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-15 {
  margin-bottom: 15px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mb-30 {
  margin-bottom: 30px;
}

.mt-20 {
  margin-top: 20px;
}

.mt-30 {
  margin-top: 30px;
}

.hidden {
  display: none;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.4s ease-out;
}

.fade-in-delay-1 {
  animation: fadeIn 0.4s ease-out 0.1s both;
}

.fade-in-delay-2 {
  animation: fadeIn 0.4s ease-out 0.2s both;
}

.fade-in-delay-3 {
  animation: fadeIn 0.4s ease-out 0.3s both;
}

/* ===== Top Flow Bar ===== */
.action-flow-bar {
  background: var(--bg-primary);
  padding: 20px 30px;
  margin: -20px -20px 30px -20px;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.action-flow-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.action-flow-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.action-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 140px;
  flex: 1;
  position: relative;
}

.action-step-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  font-size: 20px;
  transition: var(--transition-base);
}

.action-step.active .action-step-icon {
  background: var(--primary-color);
  color: white;
}

.action-step-number {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 5px;
}

.action-step-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.action-step-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.action-step-arrow {
  position: absolute;
  right: -25px;
  top: 20px;
  color: var(--border-color);
  font-size: 20px;
}

.action-step:last-child .action-step-arrow {
  display: none;
}

/* ===== Header Greeting ===== */
.dashboard-greeting {
  margin-bottom: 30px;
}

.greeting-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.greeting-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.greeting-title .wave-emoji {
  display: inline-block;
  animation: wave 2.5s infinite;
  transform-origin: 70% 70%;
}

@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}

.greeting-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* ===== User Profile Header ===== */
.user-profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.user-role {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

/* ===== Action Prompt Section ===== */
.action-prompt {
  margin-bottom: 25px;
}

.action-prompt-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 15px;
}

/* ===== Action Cards Grid ===== */
.action-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.action-card {
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 20px;
  transition: var(--transition-smooth);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.action-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary-color);
  transform: scaleX(0);
  transition: var(--transition-smooth);
}

.action-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.action-card:hover::before {
  transform: scaleX(1);
}

.action-card.cyan {
  border-color: #06b6d4;
}
.action-card.cyan:hover::before {
  background: #06b6d4;
}

.action-card.orange {
  border-color: #f59e0b;
}
.action-card.orange:hover::before {
  background: #f59e0b;
}

.action-card.purple {
  border-color: #8b5cf6;
}
.action-card.purple:hover::before {
  background: #8b5cf6;
}

.action-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.action-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 5px 0;
}

.action-card-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

.action-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.action-card-icon.cyan {
  background: #e0f2fe;
  color: #0891b2;
}

.action-card-icon.orange {
  background: #fef3c7;
  color: #f59e0b;
}

.action-card-icon.purple {
  background: #ede9fe;
  color: #8b5cf6;
}

/* ===== Section Headers ===== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.section-link {
  font-size: 13px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-base);
}

.section-link:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

/* ===== Content Grid Layout ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

/* ===== Modern Card Styles ===== */
.modern-card {
  background: var(--bg-primary);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
  padding: 0;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.modern-card:hover {
  box-shadow: var(--shadow-xl);
}

.modern-card-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modern-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.modern-card-body {
  padding: 20px;
}

.modern-card-footer {
  padding: 15px 20px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

/* ===== List Items ===== */
.request-list,
.payment-list,
.update-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.request-item,
.payment-item,
.update-item {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: var(--transition-base);
  cursor: pointer;
}

.request-item:last-child,
.payment-item:last-child,
.update-item:last-child {
  border-bottom: none;
}

.request-item:hover,
.payment-item:hover,
.update-item:hover {
  background: var(--bg-hover);
}

.item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.item-icon.blue {
  background: #dbeafe;
  color: #3b82f6;
}

.item-icon.orange {
  background: #fed7aa;
  color: #f59e0b;
}

.item-icon.green {
  background: #d1fae5;
  color: #10b981;
}

.item-icon.purple {
  background: #e9d5ff;
  color: #8b5cf6;
}

.item-icon.red {
  background: #fee2e2;
  color: #ef4444;
}

.item-content {
  flex: 1;
}

.item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 3px 0;
}

.item-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

.item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.item-date {
  font-size: 11px;
  color: var(--text-light);
}

.item-amount {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ===== Status Badges ===== */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-badge.in-progress {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge.scheduled {
  background: #fed7aa;
  color: #92400e;
}

.status-badge.completed {
  background: #d1fae5;
  color: #065f46;
}

.status-badge.paid {
  background: #d1fae5;
  color: #065f46;
}

/* ===== Upcoming Events / Calendar ===== */
.upcoming-item {
  display: flex;
  gap: 15px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-base);
}

.upcoming-item:last-child {
  border-bottom: none;
}

.upcoming-item:hover {
  background: var(--bg-hover);
}

.upcoming-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  padding: 8px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius-sm);
  text-align: center;
}

.upcoming-date-icon {
  font-size: 20px;
  margin-bottom: 3px;
}

.upcoming-date-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.upcoming-content {
  flex: 1;
}

.upcoming-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 3px 0;
}

.upcoming-time {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

/* ===== Account Overview ===== */
.account-overview {
  background: var(--bg-primary);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
  padding: 25px;
}

.balance-display {
  margin-bottom: 20px;
}

.balance-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.balance-amount {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.balance-actions {
  margin-bottom: 25px;
}

.btn-pay-now {
  width: 100%;
  padding: 12px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-base);
}

.btn-pay-now:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.account-details {
  list-style: none;
  padding: 0;
  margin: 0;
}

.account-detail-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.account-detail-item:last-child {
  border-bottom: none;
}

.account-detail-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.account-detail-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ===== Promo Card ===== */
.promo-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: var(--border-radius-md);
  padding: 25px;
  position: relative;
  overflow: hidden;
}

.promo-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.promo-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.promo-description {
  font-size: 13px;
  margin-bottom: 15px;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.promo-icon {
  font-size: 48px;
  position: absolute;
  right: 20px;
  bottom: 20px;
  opacity: 0.3;
}

.btn-promo {
  background: white;
  color: #667eea;
  padding: 8px 20px;
  border: none;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-base);
  position: relative;
  z-index: 1;
}

.btn-promo:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ===== Quick Access Bar ===== */
.quick-access-bar {
  background: var(--bg-primary);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
  padding: 20px;
  margin-top: 30px;
}

.quick-access-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.quick-access-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.quick-access-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius-sm);
  transition: var(--transition-base);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.quick-access-item:hover {
  background: var(--bg-hover);
  transform: translateX(3px);
}

.quick-access-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-secondary);
}

.quick-access-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

/* ===== Sidebar Overrides ===== */
body.modern-dashboard .navbar-static-side {
  background: var(--bg-primary);
  border-right: 1px solid var(--border-color);
}

body.modern-dashboard .nav > li > a {
  color: var(--text-secondary);
  padding: 12px 25px;
  transition: var(--transition-base);
  border-left: 3px solid transparent;
}

body.modern-dashboard .nav > li.active > a,
body.modern-dashboard .nav > li > a:hover {
  background: var(--bg-hover);
  color: var(--primary-color);
  border-left-color: var(--primary-color);
}

body.modern-dashboard .nav-header {
  background: var(--primary-color);
  padding: 25px 20px;
}

/* ===== Top Navbar Overrides ===== */
body.modern-dashboard .navbar-static-top {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .action-flow-steps {
    flex-wrap: wrap;
  }
  
  .action-step {
    min-width: 120px;
  }
  
  .action-cards-grid {
    grid-template-columns: 1fr;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .quick-access-items {
    grid-template-columns: 1fr;
  }
  
  .greeting-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .action-step-arrow {
    display: none;
  }
  
  .action-flow-steps {
    flex-direction: column;
  }
  
  .action-step {
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    gap: 15px;
  }
  
  .action-step-icon {
    margin-bottom: 0;
  }
}

/* ===== Utility Classes ===== */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-15 {
  margin-bottom: 15px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mb-30 {
  margin-bottom: 30px;
}

.mt-20 {
  margin-top: 20px;
}

.mt-30 {
  margin-top: 30px;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.4s ease-out;
}

.fade-in-delay-1 {
  animation: fadeIn 0.4s ease-out 0.1s both;
}

.fade-in-delay-2 {
  animation: fadeIn 0.4s ease-out 0.2s both;
}

.fade-in-delay-3 {
  animation: fadeIn 0.4s ease-out 0.3s both;
}


/* ===== Mobile Top Navbar Styles ===== */
.modern-topnav {
  position: relative;
}

/* Mobile Logo - Centered */
.navbar-brand-mobile {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: none;
  z-index: 10;
  pointer-events: auto;
}

.navbar-brand-mobile img {
  height: 28px;
  width: auto;
  max-width: 100px;
}

/* Mobile logout button styling */
.mobile-logout-form {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  z-index: 20;
  display: inline-block;
}

.mobile-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

.mobile-logout-btn:hover {
  color: #0891b2;
  text-decoration: none;
}

.mobile-logout-btn i {
  font-size: 18px;
}

/* Container to group the utility buttons on the same row */
.mobile-utility-container {
    display: flex;
    align-items: center; /* Vertically aligns both items perfectly */
    justify-content: flex-end; /* Pushes both buttons to the right side (change to center or flex-start if needed) */
    gap: 4px; /* Consistent spacing between the help and logout button */
    padding: 4px;
}

/* Your clean, optimized CSS below */
.mobile-logout-btn, .mobile-help-btn {
    display: inline-flex; /* Keeps button layout compact */
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

    .mobile-logout-btn:hover, .mobile-help-btn:hover {
        color: #0891b2;
        text-decoration: none;
    }

    .mobile-logout-btn i, .mobile-help-btn i {
        font-size: 18px;
    }


/* Mobile-specific navbar styles */
@media (max-width: 991px) {
  .navbar-brand-mobile {
    display: block;
  }

  /* Fix navbar structure */
  .modern-topnav.navbar-static-top {
    min-height: 50px;
    padding-right: 0;
  }

  .modern-topnav .navbar-header {
    width: 100%;
    position: relative;
    min-height: 50px;
    float: none;
  }

  /* Only show navbar links on md screens and above */
  @media (min-width: 768px) {
    .modern-topnav .navbar-top-links {
      position: absolute;
      right: 0;
      top: 0;
      z-index: 20;
      margin: 0;
      padding: 0;
      display: flex !important;
      align-items: center;
      flex-wrap: nowrap;
      background: transparent;
    }
  }

  /* Remove text from mobile navbar links */
  .modern-topnav .navbar-top-links.visible-md-block {
    display: flex !important;
    align-items: center;
    height: 50px;
  }

  .modern-topnav .navbar-top-links.visible-md-block > li {
    display: inline-block;
    float: none;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .modern-topnav .navbar-top-links.visible-md-block > li > a {
    padding: 15px 8px;
    display: flex;
    align-items: center;
    height: 50px;
  }

  .modern-topnav .navbar-top-links.visible-md-block > li > a i {
    font-size: 18px;
    color: #6b7280;
    margin: 0;
  }

  /* Hover effect for icons */
  .modern-topnav .navbar-top-links.visible-md-block > li > a:hover i {
    color: #0891b2;
  }

  /* Ensure hamburger menu is on the left */
  .modern-topnav .navbar-minimalize {
    float: left;
    margin: 8px 5px;
    position: relative;
    z-index: 20;
  }

  /* Dropdown menu styling */
  .modern-topnav .dropdown-menu {
    right: 0;
    left: auto;
    display: none;
  }

  .modern-topnav .dropdown.open > .dropdown-menu {
    display: block;
  }

  /* Hide the row class padding on mobile */
  .row.border-bottom {
    margin-left: 0;
    margin-right: 0;
  }

  /* Make header full width on mobile */
  @media (max-width: 767px) {
    .row.border-bottom {
      margin-left: -15px;
      margin-right: -15px;
    }

    .modern-topnav.navbar-static-top {
      margin-left: 0;
      margin-right: 0;
      border-radius: 0;
    }

    .modern-topnav .navbar-header {
      padding-left: 0;
      padding-right: 0;
      margin-left: 0;
      margin-right: 0;
    }

    /* Adjust hamburger menu position */
    .modern-topnav .navbar-minimalize {
      margin-left: 10px;
    }

    /* Adjust mobile logout button */
    .mobile-logout-form {
      right: 15px;
    }
  }

  /* Adjust logo size to prevent overlap on small screens */
  @media (max-width: 480px) {
    .navbar-brand-mobile img {
      height: 24px;
      max-width: 80px;
    }

    .modern-topnav .navbar-top-links.visible-md-block > li > a {
      padding: 15px 6px;
    }

    .modern-topnav .navbar-top-links.visible-md-block > li > a i {
      font-size: 16px;
    }

    .modern-topnav .navbar-minimalize {
      margin: 8px 3px;
    }
  }

  /* Extra small screens */
  @media (max-width: 360px) {
    .navbar-brand-mobile img {
      height: 22px;
      max-width: 65px;
    }

    .modern-topnav .navbar-top-links.visible-md-block > li > a {
      padding: 15px 5px;
    }

    .modern-topnav .navbar-top-links.visible-md-block > li > a i {
      font-size: 15px;
    }

    .modern-topnav .navbar-minimalize {
      margin: 8px 2px;
    }
  }
}

/* Desktop - hide mobile logo */
@media (min-width: 992px) {
  .navbar-brand-mobile {
    display: none !important;
  }
}


/* Forces the navbar-header to stay horizontal on desktop instead of breaking lines */
.modern-header-flex {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
}

    .modern-header-flex .navbar-top-links {
        float: none !important;
    }

        .modern-header-flex .navbar-top-links li {
            display: inline-block !important;
            float: none !important;
        }
/* Forces the navbar-header to stay horizontal on desktop instead of breaking lines */