@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+TC:wght@300;400;500;700&display=swap');

:root {
  /* Color Palette - Premium Slate & Violet Corporate Theme */
  --primary: #6366f1;         /* Indigo */
  --primary-hover: #4f46e5;
  --primary-light: #e0e7ff;
  --secondary: #0ea5e9;       /* Sky Blue */
  --accent: #f59e0b;          /* Amber */
  --success: #10b981;         /* Emerald */
  --danger: #ef4444;          /* Rose */
  --neutral-50: #f8fafc;
  --neutral-100: #f1f5f9;
  --neutral-200: #e2e8f0;
  --neutral-300: #cbd5e1;
  --neutral-400: #94a3b8;
  --neutral-500: #64748b;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-800: #1e293b;
  --neutral-900: #0f172a;
  
  /* Status Colors */
  --status-draft: #64748b;
  --status-draft-bg: #f1f5f9;
  --status-reviewing: #b45309;
  --status-reviewing-bg: #fef3c7;
  --status-approved: #1d4ed8;
  --status-approved-bg: #dbeafe;
  --status-disbursing: #701a75;
  --status-disbursing-bg: #fdf4ff;
  --status-closed: #047857;
  --status-closed-bg: #d1fae5;

  /* Typography & Layout */
  --font-sans: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --transition-all: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: #f6f8fb;
  color: var(--neutral-800);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--neutral-100);
}
::-webkit-scrollbar-thumb {
  background: var(--neutral-300);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--neutral-400);
}

/* Container */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navigation Bar */
.main-header {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Logo and Slogan */
.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.35);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--neutral-900);
  letter-spacing: -0.5px;
}

.logo-slogan {
  font-size: 11px;
  color: var(--neutral-500);
  font-weight: 500;
}

/* Navigation & Toggles */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Role Toggle Switch */
.role-switch-container {
  background: var(--neutral-100);
  padding: 4px;
  border-radius: var(--radius-full);
  display: flex;
  position: relative;
  border: 1px solid var(--neutral-200);
}

.role-btn {
  border: none;
  background: none;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-500);
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: var(--transition-all);
  display: flex;
  align-items: center;
  gap: 8px;
}

.role-btn.active {
  background-color: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.role-btn:hover:not(.active) {
  color: var(--neutral-800);
}

/* Contact Window Button */
.contact-btn {
  background: transparent;
  border: 1px solid var(--neutral-300);
  color: var(--neutral-600);
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-all);
}

.contact-btn:hover {
  background-color: var(--neutral-100);
  color: var(--neutral-900);
  border-color: var(--neutral-400);
}

/* App Main Layout */
.app-main {
  flex: 1;
  padding: 24px 0 40px;
}

.portal-view {
  display: none;
  animation: fadeIn 0.4s ease;
}

.portal-view.active {
  display: block;
}

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

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.5); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(99, 102, 241, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

/* Glass Card Base */
.glass-card {
  background-color: white;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
  transition: var(--transition-all);
}

.glass-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(203, 213, 225, 0.8);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--neutral-800);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-left: 4px solid var(--primary);
  padding-left: 12px;
}

/* 1. EMPLOYEE PORTAL GRID LAYOUT */
.employee-grid {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 24px;
  align-items: start;
}

/* Left Sidebar - Progress Query */
.sidebar-query {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.search-box-wrapper {
  position: relative;
  width: 100%;
}

.sidebar-search-input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  font-size: 14px;
  outline: none;
  background-color: var(--neutral-50);
  transition: var(--transition-all);
}

.sidebar-search-input:focus {
  background-color: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.search-icon-svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--neutral-400);
  pointer-events: none;
}

/* Status Filter Badges Menu */
.status-pill-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.status-pill-filter {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--neutral-200);
  background-color: white;
  color: var(--neutral-600);
  transition: var(--transition-all);
}

.status-pill-filter:hover {
  background-color: var(--neutral-50);
  color: var(--neutral-800);
}

.status-pill-filter.active {
  background-color: var(--neutral-800);
  border-color: var(--neutral-800);
  color: white;
}

/* Employee Case History List */
.case-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}

.case-item {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--neutral-200);
  background-color: white;
  cursor: pointer;
  transition: var(--transition-all);
  position: relative;
}

.case-item:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.case-item.active {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.case-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.case-item-category {
  font-weight: 600;
  font-size: 14px;
  color: var(--neutral-800);
}

.case-item-date {
  font-size: 11px;
  color: var(--neutral-400);
}

.case-item-desc {
  font-size: 12px;
  color: var(--neutral-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 8px;
}

.case-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.case-item-amount {
  font-weight: 700;
  font-size: 15px;
  color: var(--neutral-900);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-draft { background-color: var(--status-draft-bg); color: var(--status-draft); }
.badge-reviewing { background-color: var(--status-reviewing-bg); color: var(--status-reviewing); }
.badge-approved { background-color: var(--status-approved-bg); color: var(--status-approved); }
.badge-disbursing { background-color: var(--status-disbursing-bg); color: var(--status-disbursing); }
.badge-closed { background-color: var(--status-closed-bg); color: var(--status-closed); }

/* Main Content Area - Form */
.form-grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group-full {
  grid-column: span 2;
}

.form-control-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-control-wrapper label {
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-700);
}

.input-required::after {
  content: " *";
  color: var(--danger);
  font-weight: 700;
}

.input-text, .select-input, .textarea-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  color: var(--neutral-800);
  background-color: white;
  transition: var(--transition-all);
  outline: none;
}

.input-text:focus, .select-input:focus, .textarea-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Category Select + Other Container */
.category-input-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.category-select-wrapper {
  flex: 1;
}

.other-category-wrapper {
  flex: 1;
  display: none; /* Shown dynamically when "Other" is selected */
  animation: slideInDown 0.3s ease;
}

.other-category-wrapper.active {
  display: block;
}

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

/* File Upload Area */
.upload-container {
  border: 2px dashed var(--neutral-300);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  background-color: var(--neutral-50);
  transition: var(--transition-all);
  position: relative;
}

.upload-container:hover {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.upload-hidden-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-icon-box {
  color: var(--neutral-400);
  margin-bottom: 12px;
}

.upload-text {
  font-size: 14px;
  color: var(--neutral-600);
  margin-bottom: 4px;
}

.upload-hint {
  font-size: 12px;
  color: var(--neutral-400);
}

/* Upload Preview */
.upload-preview-container {
  display: none;
  align-items: center;
  gap: 16px;
  padding: 12px;
  margin-top: 16px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  background-color: var(--neutral-50);
}

.upload-preview-container.active {
  display: flex;
}

.preview-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--neutral-200);
}

.preview-info {
  flex: 1;
  min-width: 0;
}

.preview-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--neutral-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-size {
  font-size: 11px;
  color: var(--neutral-400);
}

.preview-remove-btn {
  background: transparent;
  border: none;
  color: var(--neutral-400);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-all);
}

.preview-remove-btn:hover {
  background-color: var(--neutral-200);
  color: var(--danger);
}

/* Button layouts */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-all);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  outline: none;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 12px -1px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
  background-color: var(--neutral-200);
  color: var(--neutral-700);
}

.btn-secondary:hover {
  background-color: var(--neutral-300);
  color: var(--neutral-900);
}

/* Detail Panel for Selected Case */
.detail-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.detail-panel.active {
  display: block;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--neutral-200);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.detail-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--neutral-900);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.detail-label {
  font-size: 12px;
  color: var(--neutral-400);
  margin-bottom: 4px;
  text-transform: uppercase;
  font-weight: 600;
}

.detail-value {
  font-size: 14px;
  color: var(--neutral-800);
  font-weight: 500;
}

.detail-value-highlight {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.detail-receipt-box {
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 12px;
  background-color: var(--neutral-50);
  margin-top: 16px;
}

.receipt-image-preview {
  max-width: 100%;
  max-height: 250px;
  border-radius: var(--radius-sm);
  display: block;
  margin: 10px auto 0;
  border: 1px solid var(--neutral-200);
}

/* 2. FINANCE PORTAL GRID LAYOUT */
.finance-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
}

/* To-Do List (Pending Cases) */
.todo-list-wrapper {
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.todo-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.todo-table th {
  padding: 12px;
  background-color: var(--neutral-100);
  color: var(--neutral-600);
  font-weight: 600;
  font-size: 13px;
  border-bottom: 1px solid var(--neutral-200);
}

.todo-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--neutral-100);
  font-size: 14px;
}

.todo-table tr:hover td {
  background-color: var(--neutral-50);
}

/* Right Panel: Budget Widget Card */
.budget-status-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.budget-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--neutral-100);
}

.budget-metric-label {
  font-size: 14px;
  color: var(--neutral-500);
  font-weight: 500;
}

.budget-metric-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--neutral-800);
}

.budget-metric-value.highlight {
  color: var(--primary);
  font-size: 24px;
}

/* Circular Dashboard Widget for Budget Ratio */
.budget-chart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 0;
  position: relative;
}

.radial-progress-svg {
  transform: rotate(-90deg);
  width: 150px;
  height: 150px;
}

.radial-progress-bg {
  fill: none;
  stroke: var(--neutral-200);
  stroke-width: 12px;
}

.radial-progress-fill {
  fill: none;
  stroke: url(#budgetGrad);
  stroke-width: 12px;
  stroke-linecap: round;
  stroke-dasharray: 440;
  stroke-dashoffset: 440;
  transition: stroke-dashoffset 0.8s ease-in-out;
}

.budget-chart-text-wrapper {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.budget-percentage-text {
  font-size: 24px;
  font-weight: 700;
  color: var(--neutral-900);
}

.budget-percentage-label {
  font-size: 11px;
  color: var(--neutral-400);
  font-weight: 500;
}

.budget-bar-legend {
  margin-top: 12px;
  text-align: center;
}

.budget-bar-legend-text {
  font-size: 13px;
  color: var(--neutral-500);
  font-weight: 500;
}

/* Finance Bottom Section: Search & Query Panel */
.query-filter-section {
  background-color: white;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.query-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 16px;
  align-items: flex-end;
}

.query-action-buttons {
  display: flex;
  gap: 8px;
}

/* Results Section Table */
.results-table-card {
  overflow: hidden;
}

.table-responsive-wrapper {
  overflow-x: auto;
  width: 100%;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.results-table th {
  padding: 16px 14px;
  background-color: var(--neutral-50);
  color: var(--neutral-600);
  font-weight: 600;
  font-size: 13px;
  border-bottom: 2px solid var(--neutral-200);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: var(--transition-all);
}

.results-table th:hover {
  background-color: var(--neutral-100);
  color: var(--neutral-900);
}

/* Sort Arrows styling */
.sort-indicator {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 6px;
  vertical-align: middle;
  opacity: 0.3;
  transition: var(--transition-all);
}

.results-table th:hover .sort-indicator {
  opacity: 0.7;
}

.results-table th.sorted-asc .sort-indicator-up {
  opacity: 1;
  color: var(--primary);
}

.results-table th.sorted-desc .sort-indicator-down {
  opacity: 1;
  color: var(--primary);
}

.results-table th.sorted-asc .sort-indicator, 
.results-table th.sorted-desc .sort-indicator {
  opacity: 1;
}

.results-table td {
  padding: 16px 14px;
  border-bottom: 1px solid var(--neutral-200);
  font-size: 14px;
  color: var(--neutral-700);
  vertical-align: middle;
}

.results-table tr:hover td {
  background-color: rgba(99, 102, 241, 0.02);
}

/* Finance Row Inputs & Actions */
.note-input-inline {
  width: 100%;
  min-width: 120px;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition-all);
}

.note-input-inline:focus {
  border-color: var(--primary);
  background-color: white;
}

.action-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-btn {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  border: none;
  transition: var(--transition-all);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.action-btn-approve {
  background-color: var(--primary-light);
  color: var(--primary);
}

.action-btn-approve:hover {
  background-color: var(--primary);
  color: white;
}

/* Bell Reminder Button */
.bell-btn {
  background-color: var(--neutral-100);
  color: var(--neutral-500);
  border-radius: var(--radius-full);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: var(--transition-all);
  position: relative;
}

.bell-btn:hover {
  background-color: var(--status-reviewing-bg);
  color: var(--status-reviewing);
  transform: rotate(15deg);
}

.bell-btn.active {
  animation: ring 0.6s ease;
}

@keyframes ring {
  0% { transform: rotate(0); }
  15% { transform: rotate(15deg); }
  30% { transform: rotate(-15deg); }
  45% { transform: rotate(10deg); }
  60% { transform: rotate(-10deg); }
  75% { transform: rotate(4deg); }
  90% { transform: rotate(-4deg); }
  100% { transform: rotate(0); }
}

/* Toast Alerts Component */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background: white;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 360px;
  pointer-events: auto;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
  overflow: hidden;
}

.toast-success { border-left-color: var(--success); }
.toast-warning { border-left-color: var(--accent); }
.toast-info { border-left-color: var(--secondary); }
.toast-danger { border-left-color: var(--danger); }

.toast-icon {
  margin-top: 2px;
  flex-shrink: 0;
}

.toast-body {
  flex-grow: 1;
}

.toast-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--neutral-800);
  margin-bottom: 2px;
}

.toast-message {
  font-size: 13px;
  color: var(--neutral-500);
}

.toast-close {
  background: transparent;
  border: none;
  color: var(--neutral-400);
  cursor: pointer;
  margin-left: auto;
  transition: var(--transition-all);
}

.toast-close:hover {
  color: var(--neutral-800);
}

/* Modals (Contact Window) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-all);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 500px;
  padding: 28px;
  transform: scale(0.95);
  transition: var(--transition-all);
  position: relative;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--neutral-400);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-full);
  display: flex;
  transition: var(--transition-all);
}

.modal-close-btn:hover {
  background-color: var(--neutral-100);
  color: var(--neutral-800);
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 20px;
  border-bottom: 1px solid var(--neutral-200);
  padding-bottom: 12px;
}

.contact-card-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--neutral-100);
  border-radius: var(--radius-md);
  background-color: var(--neutral-50);
}

.contact-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.contact-info {
  flex-grow: 1;
}

.contact-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--neutral-800);
}

.contact-role {
  font-size: 12px;
  color: var(--neutral-400);
}

.contact-details {
  font-size: 13px;
  color: var(--neutral-600);
  margin-top: 4px;
}

/* Footer Section */
.app-footer {
  background-color: white;
  border-top: 1px solid var(--neutral-200);
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  color: var(--neutral-400);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .employee-grid {
    grid-template-columns: 1fr;
  }
  .finance-grid {
    grid-template-columns: 1fr;
  }
  .query-filter-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .query-action-buttons {
    grid-column: span 2;
    justify-content: flex-end;
  }
}

@media (max-width: 640px) {
  .form-grid-layout {
    grid-template-columns: 1fr;
  }
  .form-group-full {
    grid-column: span 1;
  }
  .query-filter-grid {
    grid-template-columns: 1fr;
  }
  .query-action-buttons {
    grid-column: span 1;
  }
  .category-input-row {
    flex-direction: column;
  }
  .other-category-wrapper {
    width: 100%;
  }
}
