/* Dental Clinic Special Lab Center & Dentist Revenue Styles - HIGH DENSITY COMPACT LAYOUT */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Sarabun:wght@300;400;500;600;700&display=swap');

:root {
  /* Color Tokens */
  --canvas-bg: #f4f7fb;
  --surface-bg: #ffffff;
  --surface-inset: #f8fafc;
  --line-color: #e8edf3;
  --line-strong: #dbe3ec;
  
  --text-heading: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-faint: #94a3b8;
  
  --primary: #1367c8;
  --primary-hover: #0f52a0;
  --primary-light: #eff6ff;
  --primary-text: #0f52a0;
  
  --accent: #1367c8;
  --accent-hover: #0f52a0;
  --accent-light: #eff6ff;
  --accent-text: #0f52a0;
  
  /* Semantic / Acuity States */
  --critical-bg: #fef2f2;
  --critical-text: #b91c1c;
  --critical-dot: #e5484d;
  
  --watch-bg: #fffbeb;
  --watch-text: #b45309;
  --watch-dot: #f59e0b;
  
  --stable-bg: #f0fdf4;
  --stable-text: #15803d;
  --stable-dot: #22c55e;
  
  --info-bg: #e0f2fe;
  --info-text: #0369a1;
  --info-dot: #0ea5e9;
  
  /* Layout Sizing */
  --sidebar-width: 14rem;
  --topbar-height: 70px;
}

[x-cloak] {
  display: none !important;
}

/* Reset & Global */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', 'Sarabun', sans-serif !important;
  background-color: var(--canvas-bg);
  color: var(--text-body);
  font-size: 0.875rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1 {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text-heading);
}

h2 {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text-heading);
}

h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-heading);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 100ms ease;
}

a:hover {
  color: var(--primary-hover);
}

/* Layout App Shell */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background-color: var(--primary);
  border-right: none;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 200;
  transition: transform 150ms ease;
}

.sidebar-brand {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-icon {
  width: 1.5rem;
  height: 1.5rem;
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-right: 0.5rem;
  font-size: 1rem;
}

.brand-name {
  font-weight: 700;
  font-size: 0.875rem;
  color: #ffffff;
}

.sidebar-nav {
  padding: 0.75rem 0.5rem;
  flex-grow: 1;
  overflow-y: auto;
}

.sidebar-section-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  padding: 0.8rem 1rem 0.4rem;
  letter-spacing: 0.05em;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.65rem 1rem;
  color: rgba(255, 255, 255, 0.8);
  border-radius: 0.5rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  cursor: pointer;
  transition: all 100ms ease-out;
  font-size: 0.875rem;
  white-space: nowrap;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.nav-link.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-left: 3px solid #ffffff;
  padding-left: calc(1rem - 3px);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.nav-link svg {
  margin-right: 0.75rem;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--line-color);
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.main-content {
  margin-left: var(--sidebar-width);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  min-width: 0;
}

.topbar {
  height: var(--topbar-height);
  background-color: var(--surface-bg);
  border-bottom: 1px solid var(--line-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-badge {
  background-color: var(--surface-inset);
  border: 1px solid var(--line-color);
  padding: 0.25rem 0.5rem;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
}

.user-role {
  font-size: 0.6875rem;
  padding: 0.0625rem 0.25rem;
  background-color: var(--primary-light);
  color: var(--primary-text);
  border-radius: 0.1875rem;
  font-weight: 600;
}

.topbar-badge-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}
.topbar-badge-count {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: var(--critical-dot);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  border-radius: 50%;
  width: 0.75rem;
  height: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.topbar-clock {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background-color: var(--surface-inset);
  padding: 0.25rem 0.5rem;
  border-radius: 100px;
  border: 1px solid var(--line-color);
}
.topbar-avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background-color: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8125rem;
}
.topbar-logout-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--critical-dot);
  padding: 0.25rem;
  transition: opacity 100ms ease;
  display: flex;
  align-items: center;
}
.topbar-logout-btn:hover {
  opacity: 0.8;
}

.page-container {
  padding: 0.75rem; /* High density minimal padding */
  flex-grow: 1;
  max-width: 100%;
  width: 100%;
  margin: 0;
}

/* Auth / Login Page style */
.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: var(--canvas-bg);
  padding: 1rem;
}

.auth-card {
  width: 100%;
  max-width: 360px;
  background-color: var(--surface-bg);
  border: 1px solid var(--line-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 10px 25px -5px rgba(15,23,42,.08);
}

.auth-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.auth-logo {
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 auto 0.5rem;
}

/* Cards & Layout Units */
.card {
  background-color: var(--surface-bg);
  border: 1px solid var(--line-color);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
  margin-bottom: 0.75rem;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.08) !important;
}

.card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Stat Grid Division */
.stat-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background-color: var(--line-color);
  border: 1px solid var(--line-color);
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.stat-cell {
  background-color: var(--surface-bg);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
}

.stat-cell.critical { background-color: var(--critical-bg); }
.stat-cell.watch { background-color: var(--watch-bg); }
.stat-cell.stable { background-color: var(--stable-bg); }
.stat-cell.info { background-color: var(--info-bg); }

.stat-label {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.stat-cell.critical .stat-label { color: var(--critical-text); }
.stat-cell.watch .stat-label { color: var(--watch-text); }
.stat-cell.stable .stat-label { color: var(--stable-text); }
.stat-cell.info .stat-label { color: var(--info-text); }

.stat-number {
  font-size: 1.5rem; /* Compact stat number */
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-heading);
  line-height: 1.2;
}

.stat-cell.critical .stat-number { color: var(--critical-text); }
.stat-cell.watch .stat-number { color: var(--watch-text); }
.stat-cell.stable .stat-number { color: var(--stable-text); }
.stat-cell.info .stat-number { color: var(--info-text); }

/* Forms Controls */
.form-group {
  margin-bottom: 0.75rem;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.form-control {
  width: 100%;
  padding: 0.625rem 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  background-color: var(--surface-bg);
  border: 2px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text-body);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

textarea.form-control {
  height: auto;
  min-height: 60px; /* Shorter textareas */
}

.form-control[readonly],
.form-control:disabled,
.form-control[disabled] {
  background-color: #f1f5f9 !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
  border-color: #cbd5e1 !important;
  opacity: 0.9;
}

/* Auto-append red asterisk for required fields that are editable */
.form-group:has(.form-control[required]:not([readonly]):not(:disabled)) .form-label::after {
  content: " *";
  color: var(--critical-dot);
  font-weight: bold;
}

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

/* Buttons style */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  user-select: none;
  gap: 0.375rem;
}

.btn:active {
  transform: scale(0.97);
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-light);
}

.btn-primary {
  background-color: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.15);
}

.btn-primary:hover {
  background-color: var(--primary-hover) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.25);
}

.btn-accent {
  background-color: var(--accent) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.15);
}

.btn-accent:hover {
  background-color: var(--accent-hover) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.25);
}

.btn-danger {
  background-color: var(--critical-bg) !important;
  border-color: rgba(185, 28, 28, 0.15) !important;
  color: var(--critical-text) !important;
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.15);
}

.btn-danger:hover {
  background-color: var(--critical-text) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(185, 28, 28, 0.25);
}

.btn-ghost {
  background-color: var(--surface-bg) !important;
  border-color: var(--line-color) !important;
  color: var(--text-body) !important;
}

.btn-ghost:hover {
  background-color: var(--surface-inset) !important;
  border-color: var(--line-strong) !important;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 8px;
}

.btn-xs {
  padding: 0.15rem 0.4rem;
  font-size: 0.6875rem;
  border-radius: 6px;
  font-weight: 600;
}

/* Tables and Data Presentation (Denser Padding) */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 0.5rem;
}

.table-responsive::-webkit-scrollbar {
  height: 6px;
}
.table-responsive::-webkit-scrollbar-track {
  background: transparent;
}
.table-responsive::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 3px;
}
.table-responsive::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

.table th {
  background-color: var(--surface-inset);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 14px 20px;
  border-bottom: 2px solid var(--line-strong);
  text-transform: uppercase;
  white-space: nowrap;
}

.table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-color);
  color: var(--text-body);
  vertical-align: middle;
  font-size: 0.875rem;
  white-space: nowrap;
}

.table tr:hover td {
  background-color: var(--surface-inset);
}

/* Compact Table Variant */
.table-compact th {
  padding: 10px 12px;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.table-compact td {
  padding: 10px 12px;
  font-size: 0.8125rem;
  white-space: normal;
  line-height: 1.35;
}

.badge-hn {
  background-color: var(--surface-inset);
  border: 1px solid var(--line-color);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.72rem;
  color: var(--text-body);
}

/* Status Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 100px;
  font-size: 0.6875rem;
  font-weight: 600;
  gap: 0.25rem;
  white-space: nowrap;
}

.status-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
}

.status-pill.critical {
  background-color: var(--critical-bg);
  color: var(--critical-text);
}
.status-pill.critical .status-dot { background-color: var(--critical-dot); }

.status-pill.watch {
  background-color: var(--watch-bg);
  color: var(--watch-text);
}
.status-pill.watch .status-dot { background-color: var(--watch-dot); }

.status-pill.stable {
  background-color: var(--stable-bg);
  color: var(--stable-text);
}
.status-pill.stable .status-dot { background-color: var(--stable-dot); }

.status-pill.info {
  background-color: var(--info-bg);
  color: var(--info-text);
}
.status-pill.info .status-dot { background-color: var(--info-dot); }

/* Rating stars */
.rating-stars {
  display: flex;
  gap: 0.125rem;
}

.star-icon {
  width: 0.875rem;
  height: 0.875rem;
  fill: #e2e8f0;
}

.star-icon.filled {
  fill: #f59e0b;
}

/* Filter area layout */
.filter-bar {
  background-color: var(--surface-bg);
  border: 1px solid var(--line-color);
  border-radius: 0.5rem;
  padding: 0.5rem;
  margin-bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
}

.filter-item {
  flex: 1 1 180px;
}

/* Tab systems */
.tab-container {
  margin-bottom: 0.75rem;
}

.tab-nav {
  display: flex;
  border-bottom: 1px solid var(--line-color);
  gap: 1rem;
}

.tab-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.375rem 0.25rem; /* Reduced tab padding */
  cursor: pointer;
  position: relative;
  transition: color 100ms ease;
}

.tab-btn:hover {
  color: var(--text-body);
}

.tab-btn.active {
  color: var(--primary);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary);
}

/* Modals layout (Tight spacing) */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: modalFadeIn 0.18s ease-out;
}

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

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

.modal-content {
  background-color: var(--surface-bg);
  border: 1px solid var(--line-color);
  border-radius: 1rem;
  width: 100%;
  max-width: 600px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  animation: modalPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line-color);
}

.modal-header h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0;
  letter-spacing: -0.01em;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.625rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line-color);
}

/* Custom Premium Confirm Modal Dialog */
.confirm-modal-backdrop {
  z-index: 1200 !important;
  background-color: rgba(15, 23, 42, 0.6) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
}

.confirm-modal-content {
  max-width: 460px !important;
  padding: 2rem 1.75rem 1.5rem 1.75rem !important;
  text-align: center !important;
  border-radius: 1.25rem !important;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.9) inset !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  position: relative !important;
  z-index: 1210 !important;
  opacity: 1 !important;
}

.confirm-icon-wrapper {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
}

.confirm-icon-primary {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: var(--primary);
  border: 1px solid #bfdbfe;
}

.confirm-icon-danger {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #dc2626;
  border: 1px solid #fecaca;
}

.confirm-icon-warning {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #d97706;
  border: 1px solid #fde68a;
}

.confirm-modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.confirm-modal-message {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.confirm-modal-badge {
  font-size: 1.45rem !important;
  font-weight: 800 !important;
  color: var(--primary) !important;
  background: #eff6ff !important;
  padding: 0.5rem 1.25rem !important;
  border-radius: 0.75rem !important;
  display: inline-block !important;
  border: 1px solid #bfdbfe !important;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.1);
  letter-spacing: 0.02em;
}

.confirm-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.confirm-modal-actions button {
  flex: 1;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 0.625rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

/* Grid patient list and cards */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
}

/* Utilities */
.text-right { text-align: right; }
.text-center { text-align: center; }
.bold { font-weight: 700; }
.flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.25rem; }
.mt-2 { margin-top: 0.25rem; }
.mt-4 { margin-top: 0.5rem; }
.mb-4 { margin-bottom: 0.5rem; }

/* Custom Report Column Checklist */
.column-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.25rem; /* Tight column gaps */
  background: var(--surface-inset);
  padding: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--line-color);
  margin-bottom: 0.5rem;
}

.column-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
}

/* Interactive Satisfaction Selector */
.rating-select {
  display: flex;
  gap: 0.375rem;
  font-size: 1.25rem;
}
.rating-select span {
  cursor: pointer;
  color: #cbd5e1;
  transition: color 100ms ease;
}
.rating-select span.selected {
  color: #f59e0b;
}

/* Sidebar toggle and backdrop styles */
.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.4);
  z-index: 150;
}

/* Responsive queries */
@media(max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .sidebar-toggle {
    display: inline-flex !important;
  }
}

@media(max-width: 576px) {
  .stat-panel {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .modal-content {
    width: 95vw;
    padding: 0.75rem;
  }
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-item {
    width: 100%;
  }
}

/* Mock Dashboard Stat Cards */
.dash-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.dash-stat-card {
  background-color: var(--surface-bg);
  border: 1px solid var(--line-color);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.dash-stat-info {
  display: flex;
  flex-direction: column;
}
.dash-stat-title {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.dash-stat-value {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.2;
}
.dash-stat-trend {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--stable-text);
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.125rem;
}
.dash-stat-icon-wrapper {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Flex Middle Row layout */
.dash-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.dash-col-65 {
  width: 65%;
  flex-shrink: 0;
}
.dash-col-35 {
  width: 35%;
  flex-shrink: 0;
}
@media(max-width: 992px) {
  .dash-row {
    flex-direction: column;
  }
  .dash-col-65, .dash-col-35 {
    width: 100%;
  }
}

/* Custom CSS visual charts */
.chart-bar-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  height: 180px;
  padding: 0.5rem 0.25rem;
  border-bottom: 2px solid var(--line-color);
  margin-top: 1rem;
}
.chart-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  height: 100%;
  justify-content: flex-end;
}
.chart-bar-value {
  width: 1rem;
  background-color: var(--primary);
  border-top-left-radius: 0.25rem;
  border-top-right-radius: 0.25rem;
  transition: height 300ms ease;
  min-height: 4px;
}
.chart-bar-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
}

/* Premium Custom Toast Notification System */
#custom-toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 80vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.5rem;
  pointer-events: auto; /* Enable scroll capture and scrollbar interaction */
  width: max-content;
  max-width: 440px;
}

/* Elegant thin scrollbar for toast container */
#custom-toast-container::-webkit-scrollbar {
  width: 6px;
}
#custom-toast-container::-webkit-scrollbar-track {
  background: transparent;
}
#custom-toast-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}
#custom-toast-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

.custom-toast {
  pointer-events: auto; /* Catch hover/click scroll */
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 0.85rem 1.25rem;
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  font-family: inherit;
  font-weight: 500;
  min-width: 320px;
  max-width: 420px;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  opacity: 0;
  border-left: 4px solid #64748b; /* Default accent */
}

.custom-toast.success {
  border-left: 4px solid #10b981; /* Green accent */
}

.custom-toast.error {
  border-left: 4px solid #ef4444; /* Red accent */
}

.custom-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.custom-toast-icon {
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Notification Dropdown Positioning and Dimensions */
.notification-dropdown {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  width: 340px; /* Slightly wider to accommodate scrollbar space */
  max-height: 220px; /* Restrict height to show scrollbar when there are multiple notifications */
  overflow-y: auto;
  z-index: 1000;
  padding: 0.75rem;
  border: 1px solid var(--line-strong);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  background: var(--surface-bg) !important; /* Fixed transparency by using defined white surface background */
}

/* Custom Scrollbar for Notification Dropdown */
.notification-dropdown::-webkit-scrollbar {
  width: 5px;
}
.notification-dropdown::-webkit-scrollbar-track {
  background: transparent;
}
.notification-dropdown::-webkit-scrollbar-thumb {
  background: var(--line-color);
  border-radius: 99px;
}
.notification-dropdown::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.tech-job-card:hover {
  border-color: var(--primary) !important;
  background-color: var(--surface-inset) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04) !important;
}
