/* Modern Employee Management System CSS - FIXED VERSION */
/* Fixes: Placeholder persistence issue and table column misalignment */

/* Color Palette: Orange Primary, White & Gray Accents */
:root {
  /* Color Variables */
  --primary-orange: #ea580c;
  --primary-orange-dark: #c2410c;
  --primary-orange-light: #fb923c;
  --primary-orange-lighter: #fdba74;
  --primary-orange-bg: #fed7aa;
  --primary-orange-darker: #9a3412;
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-200: #fed7aa;
  --orange-300: #fdba74;
  --orange-400: #fb923c;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --orange-700: #c2410c;
  --accent-white: #ffffff;
  --accent-light-gray: #f8f9fa;
  --accent-medium-gray: #6b7280;
  --accent-dark-gray: #374151;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --success: #10b981;
  --warning: #f97316;
  --error: #ef4444;
  --info: #3b82f6;
  --border-color: #e5e7eb;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --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);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
}

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

*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
  color: var(--gray-900);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

html {
  scroll-behavior: smooth;
}

/* Login Page Styles - Enhanced */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--primary-orange-light) 0%, var(--primary-orange) 50%, var(--primary-orange-dark) 100%);
  position: relative;
  overflow: hidden;
}

.login-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(234, 88, 12, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  animation: floating 20s ease-in-out infinite;
}

@keyframes floating {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-10px) rotate(1deg); }
  66% { transform: translateY(5px) rotate(-1deg); }
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 3rem;
  border-radius: var(--radius-xl);
  box-shadow: 
    0 25px 50px rgba(234, 88, 12, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  width: 100%;
  max-width: 450px;
  position: relative;
  z-index: 1;
  animation: slideUp 0.6s ease-out;
}

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

.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-header h1 {
  color: var(--gray-900);
  margin-bottom: 0.5rem;
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-header p {
  color: var(--gray-600);
  font-size: 1.1rem;
}

/* FIXED Form Styles - Removes placeholder persistence issue */
.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

/* FIXED: Changed from floating to static label positioning */
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--gray-700);
  font-weight: 600;
  font-size: 0.9rem;
  position: static; /* FIXED: Changed from absolute */
  transform: none; /* FIXED: Removed transform */
  pointer-events: auto; /* FIXED: Allow pointer events */
  background: transparent;
  padding: 0;
  z-index: auto;
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: all var(--transition-normal);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
  color: var(--gray-900);
}

/* FIXED: Proper placeholder behavior */
.form-control::placeholder {
  color: var(--gray-400);
  opacity: 1;
  transition: opacity 0.3s ease;
}

.form-control:focus::placeholder {
  opacity: 0.5;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-orange);
  background: rgba(255, 255, 255, 1);
  box-shadow: 
    0 0 0 4px rgba(234, 88, 12, 0.1),
    0 4px 12px rgba(234, 88, 12, 0.15);
  transform: translateY(-1px);
}

/* REMOVED: All floating label behavior */
/* .form-control:focus + label,
.form-control:not(:placeholder-shown) + label */

.form-control:hover {
  border-color: var(--gray-300);
}

/* FIXED: Enhanced form control states - Remove any conflicting select styles */
.form-control:valid {
  border-color: var(--success);
}

.form-control.error {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.form-control.success {
  border-color: var(--success);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* FIXED: Ensure select elements don't inherit input background */
select.form-control.error {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
}

select.form-control.success {
  border-color: var(--success);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
}

/* Enhanced Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  font-size: 0.95rem;
  line-height: 1.4;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-dark));
  color: var(--white);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-orange-light), var(--primary-orange));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, var(--gray-200), var(--gray-300));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #059669);
  color: var(--white);
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning), #ea580c);
  color: var(--white);
}

.btn-error {
  background: linear-gradient(135deg, var(--error), #dc2626);
  color: var(--white);
}

/* Dashboard Layout */
.dashboard {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  background: linear-gradient(180deg, var(--orange-200) 0%, var(--orange-400) 100%);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(251, 146, 60, 0.4);
  box-shadow: 2px 0 12px rgba(251, 146, 60, 0.25);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: all var(--transition-normal);
}


.sidebar-header {
  padding: 2rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
}

.sidebar-header h2 {
  color: var(--gray-800);
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.sidebar-nav {
  padding: 1rem 0;
}

.nav-item {
  margin: 0.25rem 1rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  color: var(--gray-700);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  font-weight: 500;
  position: relative;
  overflow: hidden;
  margin: 0.25rem 0;
}

.nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: var(--orange-600);
  transform: scaleY(0);
  transition: transform var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.3);
  color: var(--orange-600);
  transform: translateX(4px);
  backdrop-filter: blur(10px);
  font-weight: 600;
}

.nav-link:hover::before,
.nav-link.active::before {
  transform: scaleY(1);
}

.nav-link i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.main-content {
  flex: 1;
  margin-left: 280px;
  background: transparent;
  min-height: 100vh;
  transition: margin-left var(--transition-normal);
}

.main-content.sidebar-collapsed {
  margin-left: 0;
}

.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.6);
  padding: 1.5rem 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sidebar-toggle-btn {
  background: none;
  border: 2px solid var(--primary-orange);
  color: var(--primary-orange);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.sidebar-toggle-btn:hover {
  background: var(--primary-orange);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: none;
  width: 100%;
}

.header-title h1 {
  color: var(--gray-900);
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
}

.header-title p {
  color: var(--gray-600);
  margin: 0;
  font-size: 0.95rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
  margin-left: auto;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: rgba(249, 250, 251, 0.8);
  border-radius: var(--radius-md);
  border: 1px solid rgba(229, 231, 235, 0.6);
}

.user-info i {
  color: var(--primary-orange);
  font-size: 1.1rem;
}

.user-info span {
  color: var(--gray-700);
  font-weight: 500;
}

.header-search {
  position: relative;
}

.header-search input {
  width: 300px;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.8);
  transition: all var(--transition-normal);
}

.header-search input:focus {
  outline: none;
  border-color: var(--primary-orange);
  width: 350px;
  box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.1);
}

.header-search i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
}

.user-menu {
  position: relative;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition-normal);
}

.user-avatar:hover {
  transform: scale(1.1);
}

.content {
  padding: 2rem;
  animation: pageEnter 0.5s ease-out;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(229, 231, 235, 0.6);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-light));
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.06),
    0 4px 8px rgba(0, 0, 0, 0.04);
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.stat-info h3 {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 0.25rem 0;
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-info p {
  margin: 0;
  color: var(--gray-600);
  font-weight: 500;
  font-size: 1.1rem;
}

.stat-icon {
  font-size: 3rem;
  color: var(--primary-orange);
  opacity: 0.8;
  transition: all var(--transition-normal);
  animation: float 3s ease-in-out infinite;
}

.stat-card:hover .stat-icon {
  transform: scale(1.1);
  color: var(--accent-white);
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}

/* Enhanced Card Styles */
.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(229, 231, 235, 0.6);
  border-radius: var(--radius-xl);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.02);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 1.5rem;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transition: left 0.5s;
}

.card:hover::before {
  left: 100%;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.06),
    0 4px 8px rgba(0, 0, 0, 0.04);
}

.card-header {
  padding: 1.5rem 2rem;
  background: rgba(249, 250, 251, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.6);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h3 {
  margin: 0;
  color: var(--gray-900);
  font-size: 1.25rem;
  font-weight: 700;
}

.card-body {
  padding: 2rem;
}

/* FIXED Table Styles - Addresses column alignment issues */
.table-container {
  overflow-x: auto;
  margin-top: 1rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin: 0; /* FIXED: Remove any margins */
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  table-layout: auto; /* FIXED: Allow flexible column sizing */
}

/* FIXED: Proper table header alignment */
.table thead {
  background: rgba(249, 250, 251, 0.95);
  backdrop-filter: blur(20px);
}

.table th {
  padding: 1rem 0.75rem;
  text-align: left;
  border-bottom: 2px solid rgba(229, 231, 235, 0.8);
  font-weight: 700;
  color: var(--gray-900);
  font-size: 0.875rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  position: relative;
  vertical-align: middle;
  white-space: nowrap; /* FIXED: Prevent header text wrapping */
}

/* FIXED: Proper table data alignment */
.table td {
  padding: 1rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(229, 231, 235, 0.6);
  transition: all var(--transition-fast);
  vertical-align: middle;
  color: var(--gray-700);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* FIXED: Ensure proper column alignment */
.table th:first-child,
.table td:first-child {
  padding-left: 1.5rem;
}

.table th:last-child,
.table td:last-child {
  padding-right: 1.5rem;
}

.table tbody tr {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  background: rgba(255, 255, 255, 0.8);
}

.table tbody tr:nth-child(even) {
  background: rgba(249, 250, 251, 0.8);
}

.table tbody tr:hover {
  background: rgba(234, 88, 12, 0.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.15);
  z-index: 10;
}

/* FIXED: Action buttons in tables */
.table .btn {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  margin: 0 0.25rem;
}

.table .btn-sm {
  padding: 0.375rem 0.625rem;
  font-size: 0.75rem;
}

/* FIXED: Action column alignment */
.table .actions-column {
  text-align: center;
  white-space: nowrap;
  width: 1%;
}

/* FIXED: Checkbox alignment */
.table input[type="checkbox"] {
  margin: 0;
  vertical-align: middle;
}

/* FIXED: Status badge alignment */
.table .status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* FIXED: Prevent text overflow in table cells */
.table td {
  word-wrap: break-word;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* FIXED: Full content display on hover */
.table td:hover {
  overflow: visible;
  white-space: normal;
  position: relative;
  z-index: 10;
}

/* FIXED: Enhanced Form Select - Single Arrow Only */
select.form-control {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.25em 1.25em;
  padding-right: 3rem;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

/* FIXED: Remove any duplicate background images on focus */
select.form-control:focus {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%234f46e5' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.25em 1.25em;
}

/* FIXED: Ensure no browser default arrows */
select.form-control::-ms-expand {
  display: none;
}

/* FIXED: Remove any duplicate arrow styling from general form-control */
.form-control[type="select"],
.form-control.select {
  background-image: none;
}

/* FIXED: Specific select styling to override any conflicts */
select.form-control,
.form-control select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
  background-position: right 0.75rem center !important;
  background-repeat: no-repeat !important;
  background-size: 1.25em 1.25em !important;
  padding-right: 3rem !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}

/* FIXED: Remove option styling issues */
select.form-control option {
  padding: 0.5rem;
  background: var(--white);
  color: var(--gray-900);
  border: none;
  appearance: none;
}

/* Alert Styles */
.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  border: 1px solid transparent;
  position: relative;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.2);
  color: #065f46;
}

.alert-success::before {
  background: var(--success);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.2);
  color: #78350f;
}

.alert-warning::before {
  background: var(--warning);
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
  color: #1e3a8a;
}

.alert-info::before {
  background: var(--info);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: #7f1d1d;
}

.alert-error::before {
  background: var(--error);
}

/* Badge Styles */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-success {
  background: var(--success);
  color: var(--white);
}

.badge-warning {
  background: var(--warning);
  color: var(--white);
}

.badge-error {
  background: var(--error);
  color: var(--white);
}

.badge-info {
  background: var(--info);
  color: var(--white);
}

.badge-secondary {
  background: var(--gray-500);
  color: var(--white);
}

/* Enhanced Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(25px);
  border-radius: var(--radius-xl);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  animation: modalSlide 0.3s ease-out;
  position: relative;
}

/* Location Modal Specific Styles */
#locationModal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

#locationModal .modal-content {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(25px);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(229, 231, 235, 0.6);
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
  animation: modalSlide 0.3s ease-out;
  position: static;
  margin: 0;
  left: auto;
  top: auto;
  transform: none;
}

#locationModal .modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(229, 231, 235, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(249, 250, 251, 0.8);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

#locationModal .modal-header h3 {
  margin: 0;
  color: var(--gray-900);
  font-size: 1.25rem;
  font-weight: 700;
}

#locationModal .close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all var(--transition-normal);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#locationModal .close:hover {
  background: rgba(229, 231, 235, 0.3);
  color: var(--gray-600);
}

#locationModal .modal-body {
  padding: 1.5rem 2rem 2rem;
}

#modalInfo {
  margin-bottom: 1rem;
  padding: 1rem;
  background: rgba(248, 249, 250, 0.8);
  border-radius: var(--radius-md);
  border: 1px solid rgba(229, 231, 235, 0.6);
}

#modalInfo strong {
  color: var(--gray-900);
  font-size: 1.1rem;
}

#modalInfo span {
  color: var(--gray-700);
  font-size: 0.95rem;
}

#map {
  height: 400px;
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid rgba(229, 231, 235, 0.6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Custom Leaflet marker styles */
.custom-marker {
  background: transparent;
  border: none;
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
  margin: 1rem;
  font-family: inherit;
  color: var(--gray-900);
}

.leaflet-popup-tip {
  background: rgba(255, 255, 255, 0.95);
}

.modal-header {
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid rgba(229, 231, 235, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: var(--gray-900);
  font-size: 1.5rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all var(--transition-normal);
}

.modal-close:hover {
  background: rgba(229, 231, 235, 0.3);
  color: var(--gray-600);
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
  padding: 1rem 2rem 2rem;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  border-top: 1px solid rgba(229, 231, 235, 0.3);
}

@keyframes modalSlide {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--gray-200);
  border-top: 4px solid var(--primary-orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Form Loading States */
.form-loading .form-control {
  pointer-events: none;
  opacity: 0.6;
  background: var(--gray-100);
}

.form-loading .btn {
  pointer-events: none;
  opacity: 0.6;
  position: relative;
}

.form-loading .btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid var(--white);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Toast Notifications */
.toast {
  position: fixed;
  top: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  animation: slideInRight 0.3s ease;
  max-width: 300px;
  word-wrap: break-word;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toast-success {
  background: var(--success);
  color: var(--white);
}

.toast-error {
  background: var(--error);
  color: var(--white);
}

.toast-warning {
  background: var(--warning);
  color: var(--white);
}

.toast-info {
  background: var(--info);
  color: var(--white);
}

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

@keyframes slideOutRight {
  0% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(100%); }
}

/* Bulk Actions Bar */
.bulk-actions {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-xl);
  padding: 1rem 2rem;
  box-shadow: 0 8px 32px rgba(234, 88, 12, 0.2);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 1000;
  animation: slideUpFromBottom 0.3s ease;
}

@keyframes slideUpFromBottom {
  0% { opacity: 0; transform: translateX(-50%) translateY(100%); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Table Empty State */
.table-empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--gray-500);
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  margin-top: 1rem;
}

.table-empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
  color: var(--gray-400);
}

.table-empty-state h3 {
  margin: 0 0 0.5rem 0;
  color: var(--gray-600);
  font-size: 1.25rem;
}

.table-empty-state p {
  margin: 0;
  color: var(--gray-500);
}

/* Search and Filter Styles */
.search-container {
  position: relative;
  margin-bottom: 1.5rem;
}

.search-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
  transition: all var(--transition-normal);
  font-size: 1rem;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.1);
}

.search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 1.1rem;
}

/* Filter Controls */
.filter-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-700);
  white-space: nowrap;
}

.filter-group select {
  min-width: 150px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .content {
    padding: 1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .header {
    padding: 1rem;
  }

  .header-search input {
    width: 200px;
  }

  .header-search input:focus {
    width: 250px;
  }

  .card-header,
  .card-body {
    padding: 1rem;
  }

  .filter-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group select {
    min-width: auto;
  }
}

@media (max-width: 640px) {
  .login-card {
    padding: 2rem;
    margin: 1rem;
  }

  .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
  }

  .table {
    font-size: 0.875rem;
  }

  .table th,
  .table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.8rem;
  }

  .header-title h1 {
    font-size: 1.5rem;
  }

  .sidebar {
    width: 100%;
  }

  .modal {
    width: 95%;
    margin: 1rem;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1rem;
  }

  .bulk-actions {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    transform: none;
    flex-direction: column;
    gap: 0.5rem;
  }

  .toast {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-light));
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--primary-orange-dark), var(--primary-orange-darker));
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.grid { display: grid; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.h-full { height: 100%; }

/* Animation Classes */
.hover-lift {
  transition: transform var(--transition-normal);
}

.hover-lift:hover {
  transform: translateY(-2px);
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

.page-enter {
  animation: pageEnter 0.5s ease-out;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Row Selection Styles */
.table tbody tr.selected {
  background: rgba(234, 88, 12, 0.1) !important;
  border-left: 4px solid var(--primary-orange);
}

/* Highlight Text */
mark {
  background: rgba(245, 158, 11, 0.3);
  color: inherit;
  padding: 0.1em 0.2em;
  border-radius: 0.2em;
}

/* Error Message Styles */
.error-message {
  color: var(--error);
  font-size: 0.8rem;
  margin-top: 0.25rem;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  0% { opacity: 0; height: 0; }
  100% { opacity: 1; height: auto; }
}

/* Success Animation */
@keyframes successBounce {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50% { transform: translateY(-50%) scale(1.2); }
}

/* Focus Ring Animation */
@keyframes focusRing {
  0% { opacity: 0; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.02); }
  100% { opacity: 0; transform: scale(1); }
}

/* Shake Animation for Errors */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Row Click Animation */
@keyframes rowClick {
  0% { transform: scale(1); }
  50% { transform: scale(0.98); }
  100% { transform: scale(1); }
}

/* Fade In Up Animation for Table Rows */
@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Glass Effect Utility */
.glass-effect {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

/* Focus States for Accessibility */
.btn:focus-visible,
.form-control:focus-visible {
  outline: 2px solid var(--primary-orange);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .sidebar,
  .header-actions,
  .bulk-actions,
  .toast,
  .modal-overlay {
    display: none !important;
  }

  .main-content {
    margin-left: 0 !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid var(--gray-300) !important;
    break-inside: avoid;
  }

  .table {
    border-collapse: collapse !important;
  }

  .table th,
  .table td {
    border: 1px solid #000 !important;
    padding: 0.5rem !important;
  }

  .btn,
  .form-control {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}
