/*
 * CRM Application Styling System
 * Fully custom, modern premium look with custom components and micro-animations.
 */

:root {
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --bg-main: #f4f6f9;
  --bg-sidebar: #222d32;
  --bg-sidebar-hover: #1e282c;
  --text-sidebar: #b8c7ce;
  --primary-blue: #00c0ef;
  --primary-green: #00a65a;
  --primary-orange: #f39c12;
  --primary-red: #dd4b39;
  
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --border-color: #eef2f5;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: #333333;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: #3c8dbc;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #245b7a;
}

/* ==========================================
   AUTHENTICATED LAYOUT STRUCTURE
   ========================================== */

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 0 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-container {
  display: flex;
  align-items: center;
}

.app-logo {
  display: block;
  height: 44px;
  width: auto;
}

.menu-toggle {
  background: none;
  border: none;
  font-size: 18px;
  color: #666;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
}

.menu-toggle:hover {
  background-color: #f0f2f5;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* notification styles moved to bottom of file */

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #f8fafc;
  padding: 6px 12px;
  border-radius: 30px;
  border: 1px solid #e2e8f0;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 12px;
  color: #475569;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.logout-button {
  font-size: 18px;
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.2s;
}

.logout-button:hover {
  color: var(--primary-red);
}

.app-body {
  display: flex;
  margin-top: 60px;
  min-height: calc(100vh - 60px);
}

/* ==========================================
   SIDEBAR STYLING
   ========================================== */

.sidebar {
  width: 230px;
  background-color: var(--bg-sidebar);
  color: var(--text-sidebar);
  position: fixed;
  top: 60px;
  bottom: 0;
  left: 0;
  z-index: 999;
  overflow-y: auto;
  transition: width 0.3s ease;
}

.sidebar-menu {
  padding: 15px 0;
}

.menu-label {
  padding: 10px 20px 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #4b646f;
  letter-spacing: 0.5px;
}

.menu-item {
  display: block;
}

.menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  color: var(--text-sidebar);
  font-size: 13px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}

.menu-link i:first-child {
  margin-right: 10px;
  width: 16px;
  text-align: center;
}

.menu-link:hover, .menu-item.active .menu-link {
  background-color: var(--bg-sidebar-hover);
  color: #ffffff;
  border-left-color: var(--primary-blue);
}

.submenu {
  background-color: #2c3b41;
  padding: 5px 0;
}

.submenu-link {
  display: block;
  padding: 8px 20px 8px 45px;
  font-size: 12px;
  color: #8aa4af;
  transition: all 0.15s;
}

.submenu-link:hover, .submenu-item.active .submenu-link {
  color: #ffffff;
}

/* ==========================================
   MAIN CONTENT AREA
   ========================================== */

.main-content {
  margin-left: 230px;
  padding: 30px;
  width: calc(100% - 230px);
  background-color: var(--bg-main);
  min-height: 100%;
}

.page-header {
  margin-bottom: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
}

.header-actions {
  display: flex;
  gap: 10px;
}

/* ==========================================
   KPI CARDS ROW
   ========================================== */

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.kpi-card {
  display: flex;
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--hover-shadow);
}

.kpi-icon-box {
  width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #ffffff;
}

.kpi-icon-box.blue { background-color: var(--primary-blue); }
.kpi-icon-box.green { background-color: var(--primary-green); }
.kpi-icon-box.orange { background-color: var(--primary-orange); }
.kpi-icon-box.red { background-color: var(--primary-red); }

.kpi-info {
  padding: 15px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.kpi-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #7f8c8d;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
}

/* ==========================================
   STOCK STATUS SECTION
   ========================================== */

.panel-card {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  margin-bottom: 30px;
  border: 1px solid var(--border-color);
}

.panel-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-title {
  font-size: 16px;
  font-weight: 700;
  color: #34495e;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-body {
  padding: 24px;
}

.stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.stock-status-card {
  border-radius: 6px;
  color: #ffffff;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stock-status-card.blue { background-color: var(--primary-blue); }
.stock-status-card.orange { background-color: var(--primary-orange); }
.stock-status-card.red { background-color: var(--primary-red); }
.stock-status-card.green { background-color: var(--primary-green); }
.stock-status-card.purple { background-color: #7c3aed; }

.stock-info {
  z-index: 2;
}

.stock-num {
  font-size: 32px;
  font-weight: 800;
}

.stock-label {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.9;
}

.stock-subtext {
  font-size: 10px;
  opacity: 0.8;
  margin-top: 5px;
  line-height: 1.2;
}

.stock-status-card i.background-icon {
  position: absolute;
  right: -10px;
  bottom: -15px;
  font-size: 70px;
  color: rgba(255, 255, 255, 0.15);
  z-index: 1;
}

/* ==========================================
   CHARTS & DETAILED STATS
   ========================================== */

.dashboard-details-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

@media (max-width: 1024px) {
  .dashboard-details-row {
    grid-template-columns: 1fr;
  }
}

.progress-stats-column {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.progress-card {
  background-color: #ffffff;
  border-radius: 6px;
  padding: 15px;
  border-left: 4px solid var(--primary-blue);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.progress-card.blue { border-left-color: var(--primary-blue); }
.progress-card.green { border-left-color: var(--primary-green); }
.progress-card.red { border-left-color: var(--primary-red); }
.progress-card.orange { border-left-color: var(--primary-orange); }

.progress-card-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: #7f8c8d;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.progress-card-value {
  font-size: 18px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 8px;
}

.progress-bar-container {
  height: 6px;
  background-color: #f0f2f5;
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
}

.progress-bar-fill.blue { background-color: var(--primary-blue); }
.progress-bar-fill.green { background-color: var(--primary-green); }
.progress-bar-fill.red { background-color: var(--primary-red); }
.progress-bar-fill.orange { background-color: var(--primary-orange); }

/* ==========================================
   AGENT LEADERBOARD TABLE
   ========================================== */

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table thead th {
  background-color: #f8f9fa;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #7f8c8d;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.leaderboard-table tbody td {
  padding: 14px 16px;
  font-size: 13px;
  color: #2c3e50;
  border-bottom: 1px solid #f0f2f5;
  vertical-align: middle;
}

.leaderboard-table tbody tr:last-child td {
  border-bottom: none;
}

.leaderboard-table tbody tr:hover {
  background-color: #f8f9fa;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  background-color: #e9ecef;
  color: #6c757d;
}

.rank-badge.gold {
  background: linear-gradient(135deg, #f5af19, #f12711);
  color: white;
}

.rank-badge.silver {
  background: linear-gradient(135deg, #bdc3c7, #95a5a6);
  color: white;
}

.rank-badge.bronze {
  background: linear-gradient(135deg, #e67e22, #d35400);
  color: white;
}

.agent-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.agent-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-blue), #6366f1);
  color: white;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.agent-name {
  font-size: 13px;
  font-weight: 600;
  color: #2c3e50;
}

.agent-role {
  font-size: 11px;
  color: #95a5a6;
}

.revenue-cell {
  font-weight: 700;
  color: var(--primary-green) !important;
  font-size: 13px;
}

/* ==========================================
   INLINE ADD BUTTON + MODAL
   ========================================== */

.input-with-action {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.input-with-action .form-control {
  flex: 1;
}

.btn-add-inline {
  width: 40px;
  height: 40px;
  border: 2px dashed var(--primary-blue);
  border-radius: 6px;
  background: transparent;
  color: var(--primary-blue);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-add-inline:hover {
  background-color: var(--primary-blue);
  color: #ffffff;
  border-style: solid;
}

.inline-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.inline-modal {
  background: #ffffff;
  border-radius: 12px;
  width: 500px;
  max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.25s ease;
  overflow: hidden;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.inline-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
}

.inline-modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #95a5a6;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.inline-modal-close:hover {
  color: #e74c3c;
}

.inline-modal-body {
  padding: 24px;
}

.inline-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: #f8f9fa;
}

/* ==========================================
   COLOR TAGS INPUT
   ========================================== */

.color-tags-container {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px;
  background: #f8f9fa;
}

.color-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  min-height: 10px;
}

.color-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-blue);
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  animation: fadeIn 0.2s ease;
}

.color-tag-remove {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.color-tag-remove:hover {
  color: #fff;
}

.color-input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

/* ==========================================
   BUTTONS AND CONTROLS
   ========================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background-color: #3c8dbc;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #2d6b8f;
  color: #ffffff;
}

.btn-success {
  background-color: var(--primary-green);
  color: #ffffff;
}

.btn-success:hover {
  background-color: #008d4c;
  color: #ffffff;
}

.btn-danger {
  background-color: var(--primary-red);
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #d73925;
  color: #ffffff;
}

.btn-secondary {
  background-color: #e2e8f0;
  color: #475569;
}

.btn-secondary:hover {
  background-color: #cbd5e1;
  color: #1e293b;
}

/* ==========================================
   TABLE DESIGN SYSTEM
   ========================================== */

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
  background-color: #ffffff;
}

.custom-table th {
  background-color: #f8fafc;
  color: #475569;
  font-weight: 700;
  padding: 14px 20px;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.custom-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  color: #334155;
  vertical-align: middle;
}

.custom-table tbody tr:hover {
  background-color: #f8fafc;
}

/* BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge.success { background-color: #e6f4ea; color: #137333; }
.badge.warning { background-color: #fef7e0; color: #b06000; }
.badge.danger { background-color: #fce8e6; color: #c5221f; }
.badge.info { background-color: #e8f0fe; color: #1a73e8; }
.badge.secondary { background-color: #f1f3f4; color: #5f6368; }

/* ==========================================
   FORM AND INPUT CONTROLS
   ========================================== */

.form-group {
  margin-bottom: 20px;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #34495e;
  margin-bottom: 0;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid #d2d6de;
  background-color: #ffffff;
  color: #333333;
  outline: none;
  font-family: var(--font-family);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  border-color: #3c8dbc;
  box-shadow: 0 0 0 3px rgba(60, 141, 188, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 30px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.field-add-button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px dashed #38bdf8;
  background: #f0f9ff;
  color: #0284c7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.field-add-button:hover {
  background: #e0f2fe;
  color: #0369a1;
  transform: translateY(-1px);
}

.select-add-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.select-add-modal[hidden] {
  display: none;
}

.select-add-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.select-add-modal__dialog {
  position: relative;
  width: min(100%, 480px);
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  transform: translateY(0);
  animation: modalPopIn 0.18s ease-out;
}

.select-add-modal__header,
.select-add-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
}

.select-add-modal__header {
  border-bottom: 1px solid #e2e8f0;
}

.select-add-modal__footer {
  border-top: 1px solid #e2e8f0;
  justify-content: flex-end;
}

.select-add-modal__body {
  padding: 18px;
}

.select-add-modal__title {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}

.select-add-modal__label {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.select-add-modal__close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: #f8fafc;
  color: #475569;
  font-size: 20px;
  cursor: pointer;
}

.select-add-modal__close:hover {
  background: #e2e8f0;
}

@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================
   LOGIN CARD PAGE
   ========================================== */

.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #1e282c 0%, #2b3a42 100%);
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  padding: 40px;
}

.login-logo {
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 30px;
}

.login-logo span.logo-s { color: #00c0ef; }
.login-logo span.logo-crm { color: #f39c12; font-weight: 300; }

.login-title {
  font-size: 18px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 20px;
  text-align: center;
}

.altcha-login {
  margin: 6px 0 18px;
}

.altcha-login altcha-widget {
  display: block;
  width: 100%;
}

/* ==========================================
   AUDIT LOGS LIST STYLING
   ========================================== */
.log-row-user {
  font-weight: 600;
  color: #2c3e50;
}

.log-row-action {
  font-family: monospace;
  background-color: #f1f3f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.log-row-ip {
  color: #7f8c8d;
  font-size: 11px;
}

.log-row-time {
  color: #95a5a6;
  font-size: 11px;
}

/* ==========================================
   ALERTS AND NOTICES
   ========================================== */

.alert-box {
  padding: 12px 20px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-box.notice {
  background-color: #e6f4ea;
  color: #137333;
  border: 1px solid #c2e7cd;
}

.alert-box.alert {
  background-color: #fce8e6;
  color: #c5221f;
  border: 1px solid #fad2cf;
}

.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-color: rgba(15, 23, 42, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.confirm-modal-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.confirm-modal {
  width: min(440px, 100%);
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  padding: 24px;
  transform: translateY(8px) scale(0.98);
  transition: transform 0.15s ease;
  outline: none;
}

.confirm-modal-overlay.is-visible .confirm-modal {
  transform: translateY(0) scale(1);
}

.confirm-modal-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: #c5221f;
  background-color: #fce8e6;
  border: 1px solid #fad2cf;
  font-size: 18px;
}

.confirm-modal-content h2 {
  margin: 0 0 8px;
  color: #1f2937;
  font-size: 18px;
  font-weight: 700;
}

.confirm-modal-content p {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-line;
}

.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

@media (max-width: 520px) {
  .confirm-modal {
    padding: 20px;
  }

  .confirm-modal-actions {
    flex-direction: column-reverse;
  }

  .confirm-modal-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================
   NOTIFICATION DROPDOWN
   ========================================== */

.notification-wrapper {
  position: relative;
}

.notification-bell {
  position: relative;
  font-size: 18px;
  color: #777;
  cursor: pointer;
  transition: color 0.2s;
  padding: 6px;
}

.notification-bell:hover {
  color: var(--primary-orange);
}

.notification-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--primary-red);
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  border-radius: 10px;
  padding: 1px 5px;
  min-width: 16px;
  text-align: center;
  line-height: 14px;
}

.notification-dropdown {
  display: none;
  position: absolute;
  top: 45px;
  right: -60px;
  width: 380px;
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15), 0 2px 10px rgba(0,0,0,0.08);
  border: 1px solid #e2e8f0;
  z-index: 2000;
  overflow: hidden;
  animation: dropdownFadeIn 0.2s ease;
}

.notification-wrapper.open .notification-dropdown {
  display: block;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.notif-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  background-color: #f8fafc;
  font-size: 14px;
  color: #2c3e50;
}

.notif-mark-all-btn {
  background: none;
  border: none;
  color: var(--primary-blue);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.notif-mark-all-btn:hover {
  text-decoration: underline;
}

.notif-dropdown-body {
  max-height: 340px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  color: #334155;
  transition: background-color 0.15s;
}

.notif-item:hover {
  background-color: #f8fafc;
  color: #334155;
}

.notif-item.unread {
  background-color: #eff6ff;
  border-left: 3px solid var(--primary-blue);
}

.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #e8f0fe;
  color: #1a73e8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-message {
  font-size: 12.5px;
  line-height: 1.4;
  color: #334155;
  margin-bottom: 4px;
}

.notif-time {
  font-size: 11px;
  color: #94a3b8;
}

.notif-empty {
  text-align: center;
  padding: 35px 20px;
  color: #94a3b8;
}

.notif-empty i {
  font-size: 32px;
  margin-bottom: 10px;
  display: block;
}

.notif-empty p {
  font-size: 13px;
}

.notif-dropdown-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  background-color: #f8fafc;
}

.notif-dropdown-footer a {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-blue);
  text-decoration: none;
}

.notif-dropdown-footer a:hover {
  text-decoration: underline;
}

/* ==========================================
   SIDEBAR OVERLAY
   ========================================== */

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 998;
}

.sidebar-overlay.active {
  display: block;
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 55px;
    left: 0;
    height: calc(100vh - 55px);
    width: 0;
    overflow: hidden;
    z-index: 999;
    transition: width 0.25s ease;
  }
  .sidebar.sidebar-open {
    width: 250px;
    overflow-y: auto;
  }
  .main-content { margin-left: 0; width: 100%; }
  .notification-dropdown { width: 300px; right: -20px; }
  .page-header { flex-direction: column; gap: 10px; align-items: flex-start; }
}

@media (min-width: 769px) {
  .sidebar {
    transition: width 0.25s ease, padding 0.25s ease;
  }
  .sidebar.sidebar-open {
    width: 0;
    padding: 0;
    overflow: hidden;
  }
  .sidebar.sidebar-open ~ .main-content {
    margin-left: 0;
  }
  .sidebar-overlay.active {
    display: none;
  }
}

/* ==========================================
   DATATABLES CUSTOM STYLING (PREMIUM LOOK)
   ========================================== */
.dataTables_wrapper {
  margin-top: 15px;
  font-size: 13px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.dataTables_top_controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}

.dt-buttons {
  margin-bottom: 0 !important;
  display: inline-flex !important;
  gap: 8px !important;
}

button.dt-button, .dt-button {
  background: #ffffff !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 8px 16px !important;
  font-family: var(--font-family) !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05) !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

button.dt-button:hover, .dt-button:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: var(--primary-blue) !important;
  transform: translateY(-1px);
}

.dataTables_filter {
  margin-bottom: 0 !important;
  float: none !important;
  display: flex;
  align-items: center;
}

.dataTables_filter label {
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
}

.dataTables_filter input {
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 8px 14px !important;
  outline: none !important;
  margin-left: 10px !important;
  font-family: var(--font-family) !important;
  width: 240px !important;
  font-size: 13px !important;
  transition: all 0.15s ease-in-out !important;
  background-color: #ffffff !important;
  box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.dataTables_filter input:focus {
  border-color: var(--primary-blue) !important;
  box-shadow: 0 0 0 3px rgba(0, 192, 239, 0.15), inset 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.dataTables_bottom_controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
}

.dataTables_info {
  margin-top: 0 !important;
  float: none !important;
  color: #64748b !important;
  font-weight: 500 !important;
  font-size: 13px !important;
}

.dataTables_paginate {
  margin-top: 0 !important;
  float: none !important;
}

.dataTables_paginate .paginate_button {
  padding: 6px 14px !important;
  margin: 0 3px !important;
  border-radius: 8px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #334155 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  font-weight: 600 !important;
}

.dataTables_paginate .paginate_button.current, .dataTables_paginate .paginate_button.current:hover {
  background: var(--primary-blue) !important;
  border-color: var(--primary-blue) !important;
  color: #ffffff !important;
}

.dataTables_paginate .paginate_button:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #1e293b !important;
}

.dataTables_paginate .paginate_button.disabled, .dataTables_paginate .paginate_button.disabled:hover {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}

/* Ensure clean table alignment with dataTables wrapper */
table.dataTable {
  border-collapse: collapse !important;
  margin-top: 10px !important;
  width: 100% !important;
}

table.dataTable thead th {
  border-bottom: 2px solid #eef2f5 !important;
}

/* ==========================================
   DYNAMIC DROPDOWN FILTER CONTROLS Styling
   ========================================== */
.table-filters-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  background-color: #f8fafc;
  padding: 16px 20px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  margin-bottom: 20px;
}

.table-filter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.table-filter-item label {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table-filter-item select.filter-select {
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  background-color: #ffffff !important;
  color: #334155 !important;
  outline: none !important;
  font-family: var(--font-family) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
  transition: all 0.15s ease-in-out !important;
  height: 38px !important;
  width: 100% !important;
}

.table-filter-item select.filter-select:focus {
  border-color: var(--primary-blue) !important;
  box-shadow: 0 0 0 3px rgba(0, 192, 239, 0.15) !important;
}

/* Dashboard recent reservations card cleanup */
.dashboard-reservations-card .panel-body {
  padding: 0 !important;
}

.dashboard-reservations-card .dataTables_wrapper {
  margin-top: 0 !important;
}

.dashboard-reservations-card .dataTables_top_controls {
  padding: 16px 20px 0;
  margin-bottom: 12px;
}

.dashboard-reservations-card .table-filters-container {
  margin: 0 20px 16px;
  padding: 12px 16px;
  background: #f8fafc;
  border-color: #dbe4ee;
  border-radius: 10px;
}

.dashboard-reservations-card .dataTables_bottom_controls {
  padding: 14px 20px 18px;
  margin-top: 0;
  border-top: 1px solid #eef2f5;
}

.dashboard-reservations-card table.dataTable {
  margin-top: 0 !important;
}

.dashboard-reservations-card .dataTables_filter input {
  width: 220px !important;
}

.dashboard-reservations-card .dt-buttons {
  gap: 6px !important;
}
