/* Variables CSS */
:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #a5b4fc;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --info-color: #06b6d4;
  --dark-color: #1e293b;
  --light-color: #f8fafc;
  --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;

  --sidebar-width: 280px;
  --sidebar-collapsed-width: 80px;
  --header-height: 80px;

  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --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 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset y base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.6;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Login Screen */
.login-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.login-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #6366f1 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

.login-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.login-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 400px;
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.login-header .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.login-header .logo i {
  font-size: 2rem;
  color: #6366f1;
}

.login-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
}

.login-header p {
  color: #6b7280;
  font-size: 0.85rem;
  margin: 0;
  font-weight: 500;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: #374151;
  font-size: 0.85rem;
}

.input-group {
  position: relative;
}

.input-group i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 0.9rem;
  z-index: 2;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 0.75rem 0.75rem 0.75rem 2.5rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  background: #ffffff;
  color: #1f2937;
}

.input-group input::placeholder {
  color: #9ca3af;
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-group input:focus + i,
.input-group select:focus + i {
  color: #6366f1;
}

.login-btn {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.login-btn:active {
  transform: translateY(0);
}

.login-demo {
  margin-top: 1.5rem;
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.login-demo h6 {
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.demo-users {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.demo-user {
  padding: 0.5rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: #374151;
}

.demo-user:hover {
  background: #6366f1;
  color: #ffffff;
  border-color: #6366f1;
  transform: translateY(-1px);
}

.demo-user i {
  font-size: 1rem;
}

/* Responsive adjustments for login */
@media (max-width: 480px) {
  .login-card {
    padding: 1.5rem 1rem;
    margin: 1rem;
  }

  .login-header h1 {
    font-size: 1.25rem;
  }

  .login-header .logo i {
    font-size: 1.75rem;
  }

  .demo-users {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .demo-user {
    flex-direction: row;
    justify-content: center;
  }
}

@media (max-height: 600px) {
  .login-card {
    padding: 1rem;
  }

  .login-header {
    margin-bottom: 1rem;
  }

  .login-demo {
    margin-top: 1rem;
    padding-top: 1rem;
  }

  .login-header .logo {
    margin-bottom: 0.5rem;
  }
}

/* Main App */
.main-app {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1000;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-header .logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-header .logo i {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.sidebar-header .logo span {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gray-900);
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.sidebar-toggle:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}

.sidebar-menu {
  flex: 1;
  padding: 1.5rem 0;
  overflow-y: auto;
}

.menu-section {
  margin-bottom: 2rem;
}

.menu-section h6 {
  padding: 0 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  margin-bottom: 0.75rem;
}

.menu-section ul {
  list-style: none;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--gray-700);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.menu-item:hover {
  background: var(--gray-50);
  color: var(--primary-color);
}

.menu-item.active {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--white);
}

.menu-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--white);
}

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

.menu-item span:not(.badge) {
  font-weight: 500;
}

.menu-item .badge {
  margin-left: auto;
  background: var(--primary-color);
  color: var(--white);
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  border-radius: 50px;
  font-weight: 600;
}

.menu-item .badge.pending {
  background: var(--warning-color);
}

.sidebar-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-900);
}

.user-role {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.logout-btn {
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.logout-btn:hover {
  background: var(--danger-color);
  color: var(--white);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content-header {
  background: var(--white);
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

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

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

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-icon {
  width: 44px;
  height: 44px;
  background: var(--gray-100);
  border: none;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.btn-icon:hover {
  background: var(--gray-200);
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--danger-color);
  border-radius: 50%;
}

.user-menu-btn {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.user-menu-btn:hover {
  background: var(--gray-100);
}

.user-avatar-small {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.8rem;
}

/* Page Content */
.page-content {
  flex: 1;
  padding: 2rem;
}

.page {
  display: none;
}

.page.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

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

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

.stat-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

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

.stat-card.success::before {
  background: linear-gradient(135deg, var(--success-color), #059669);
}

.stat-card.warning::before {
  background: linear-gradient(135deg, var(--warning-color), #d97706);
}

.stat-card.info::before {
  background: linear-gradient(135deg, var(--info-color), #0891b2);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.stat-card.success .stat-icon {
  background: linear-gradient(135deg, var(--success-color), #059669);
}

.stat-card.warning .stat-icon {
  background: linear-gradient(135deg, var(--warning-color), #d97706);
}

.stat-card.info .stat-icon {
  background: linear-gradient(135deg, var(--info-color), #0891b2);
}

.stat-content {
  flex: 1;
}

.stat-content h3 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin: 0;
  line-height: 1;
}

.stat-content p {
  color: var(--gray-600);
  margin: 0.25rem 0 0.5rem 0;
  font-weight: 500;
}

.stat-change {
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.stat-change.positive {
  color: var(--success-color);
}

.stat-change.negative {
  color: var(--danger-color);
}

.stat-change.neutral {
  color: var(--gray-500);
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
}

.dashboard-card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.dashboard-card.full-width {
  grid-column: 1 / -1;
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h5 {
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
}

.card-content {
  padding: 1.5rem;
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.recent-item:hover {
  background: var(--gray-100);
}

.recent-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 600;
}

.recent-info {
  flex: 1;
}

.recent-info h6 {
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
  font-size: 0.9rem;
}

.recent-info p {
  color: var(--gray-600);
  margin: 0;
  font-size: 0.8rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gray-500);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h6 {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--gray-700);
}

.empty-state p {
  margin-bottom: 1.5rem;
}

/* Page Actions */
.page-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 300px;
}

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

.search-box input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  transition: var(--transition);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filter-group {
  display: flex;
  gap: 0.75rem;
}

.filter-group select {
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  background: var(--white);
  transition: var(--transition);
}

.filter-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Buttons */
.btn-primary,
.btn-success,
.btn-info,
.btn-warning,
.btn-danger,
.btn-outline,
.btn-sm {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--white);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-info {
  background: linear-gradient(135deg, var(--info-color), #0891b2);
  color: var(--white);
}

.btn-info:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: var(--white);
  color: var(--gray-700);
  border: 2px solid var(--gray-200);
}

.btn-outline:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  background: var(--primary-color);
  color: var(--white);
}

.btn-sm:hover {
  background: var(--primary-dark);
}

/* Data Tables */
.data-table-container {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

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

.data-table thead {
  background: var(--gray-50);
}

.data-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-900);
}

.data-table tbody tr:hover {
  background: var(--gray-50);
}

.data-table .empty-row td {
  padding: 3rem;
  text-align: center;
}

/* Employee Avatar */
.employee-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
}

.employee-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.employee-details h6 {
  font-weight: 600;
  margin: 0;
  color: var(--gray-900);
}

.employee-details p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--gray-600);
}

/* Status Badges */
.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge.active {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.status-badge.inactive {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.status-badge.pending {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.status-badge.approved {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.status-badge.rejected {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.8rem;
}

.action-btn.view {
  background: rgba(6, 182, 212, 0.1);
  color: var(--info-color);
}

.action-btn.view:hover {
  background: var(--info-color);
  color: var(--white);
}

.action-btn.edit {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.action-btn.edit:hover {
  background: var(--warning-color);
  color: var(--white);
}

.action-btn.delete {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.action-btn.delete:hover {
  background: var(--danger-color);
  color: var(--white);
}

.action-btn.approve {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

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

/* Nómina Summary */
.nomina-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.summary-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  text-align: center;
}

.summary-card h6 {
  color: var(--gray-600);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.summary-card h3 {
  color: var(--gray-900);
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
}

/* Vacaciones Stats */
.vacaciones-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

.stat-item {
  text-align: center;
  flex: 1;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--gray-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Reports Grid */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.report-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  text-align: center;
}

.report-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.report-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: var(--white);
}

.report-content h5 {
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.report-content p {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

/* Analytics Grid */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
}

.analytics-card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.analytics-card.full-width {
  grid-column: 1 / -1;
}

.analytics-card h5 {
  padding: 1.5rem;
  margin: 0;
  font-weight: 600;
  color: var(--gray-900);
  border-bottom: 1px solid var(--gray-200);
}

.chart-placeholder {
  padding: 3rem;
  text-align: center;
  color: var(--gray-500);
}

.chart-placeholder i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Configuration */
.config-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.config-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

.config-card h5 {
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 1.5rem;
}

.config-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.config-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.config-item label {
  font-weight: 600;
  color: var(--gray-700);
  font-size: 0.9rem;
}

.config-item input,
.config-item select {
  padding: 0.75rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  transition: var(--transition);
}

.config-item input:focus,
.config-item select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.config-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

/* Profile */
.profile-container {
  max-width: 800px;
  margin: 0 auto;
}

.profile-header {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--white);
}

.profile-info h3 {
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.profile-info p {
  color: var(--gray-600);
  margin-bottom: 0.5rem;
}

.profile-status {
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.profile-content {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  margin-bottom: 2rem;
}

.profile-section {
  padding: 2rem;
  border-bottom: 1px solid var(--gray-200);
}

.profile-section:last-child {
  border-bottom: none;
}

.profile-section h5 {
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 1.5rem;
}

.profile-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.field-group input {
  padding: 0.75rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  transition: var(--transition);
}

.field-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 2rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h5 {
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-section h6 {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.75rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  transition: var(--transition);
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.input-with-prefix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-prefix span {
  position: absolute;
  left: 0.75rem;
  color: var(--gray-500);
  font-weight: 600;
  z-index: 2;
}

.input-with-prefix input {
  padding-left: 3rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 300px;
  animation: toastSlideIn 0.3s ease-out;
}

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

.toast.success {
  border-left: 4px solid var(--success-color);
}

.toast.error {
  border-left: 4px solid var(--danger-color);
}

.toast.warning {
  border-left: 4px solid var(--warning-color);
}

.toast.info {
  border-left: 4px solid var(--info-color);
}

.toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.8rem;
}

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

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

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

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

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.toast-message {
  color: var(--gray-600);
  font-size: 0.9rem;
}

.toast-close {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.toast-close:hover {
  background: var(--gray-100);
  color: var(--gray-600);
}

/* Footer */
.app-footer {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 1.5rem 2rem;
  margin-top: auto;
  margin-left: var(--sidebar-width);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-left p {
  color: var(--gray-600);
  margin: 0;
  font-weight: 600;
}

.team-credits {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

.footer-right {
  color: var(--gray-500);
  font-size: 0.9rem;
}

/* Estilos para gráficos de Analytics */
.simple-chart {
  padding: 1rem;
  text-align: center;
}

.chart-title {
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.chart-bars {
  display: flex;
  align-items: end;
  justify-content: space-around;
  height: 200px;
  gap: 0.5rem;
}

.chart-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.chart-bar {
  width: 30px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: 4px 4px 0 0;
  min-height: 20px;
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

.chart-bar:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  transform: scaleY(1.05);
}

.chart-label {
  font-size: 0.8rem;
  color: var(--gray-600);
  font-weight: 500;
}

.chart-value {
  font-size: 0.7rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

.pie-chart {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 300px;
  margin: 0 auto;
}

.pie-segment {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--gray-50);
  border-radius: var(--border-radius-sm);
  border-left: 4px solid var(--primary-color);
}

.pie-segment:nth-child(2) {
  border-left-color: var(--success-color);
}

.pie-segment:nth-child(3) {
  border-left-color: var(--warning-color);
}

.pie-segment:nth-child(4) {
  border-left-color: var(--info-color);
}

.pie-label {
  font-weight: 500;
  color: var(--gray-700);
}

.pie-value {
  font-weight: 600;
  color: var(--gray-900);
}

.chart-stats {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 1rem;
}

.stat-item-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--border-radius);
  flex: 1;
  min-width: 120px;
}

.stat-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-circle.pendientes {
  background: var(--warning-color);
}

.stat-circle.aprobadas {
  background: var(--success-color);
}

.stat-circle.rechazadas {
  background: var(--danger-color);
}

.stat-label-chart {
  font-size: 0.8rem;
  color: var(--gray-600);
  font-weight: 500;
}

.stat-number-chart {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .sidebar {
    width: var(--sidebar-collapsed-width);
  }

  .sidebar .menu-item span:not(.badge) {
    display: none;
  }

  .sidebar .menu-section h6 {
    display: none;
  }

  .sidebar-header .logo span {
    display: none;
  }

  .user-details {
    display: none;
  }

  .main-content {
    margin-left: var(--sidebar-collapsed-width);
  }

  .app-footer {
    margin-left: var(--sidebar-collapsed-width);
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width);
  }

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

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

  .page-content {
    padding: 1rem;
  }

  .content-header {
    padding: 1rem;
  }

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

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .page-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    min-width: auto;
  }

  .filter-group {
    flex-wrap: wrap;
  }

  .modal {
    padding: 1rem;
  }

  .modal-content {
    max-height: 95vh;
  }

  .modal-body {
    padding: 1rem;
  }

  .toast-container {
    top: 1rem;
    right: 1rem;
    left: 1rem;
  }

  .toast {
    min-width: auto;
  }

  .app-footer {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .content-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .header-right {
    width: 100%;
    justify-content: flex-end;
  }

  .nomina-summary {
    grid-template-columns: 1fr 1fr;
  }

  .vacaciones-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .reports-grid {
    grid-template-columns: 1fr;
  }

  .config-sections {
    grid-template-columns: 1fr;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .profile-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .chart-bars {
    height: 150px;
  }

  .chart-bar {
    width: 20px;
  }

  .chart-stats {
    flex-direction: column;
  }

  .stat-item-chart {
    min-width: auto;
  }
}

/* Print Styles */
@media print {
  .sidebar,
  .content-header,
  .page-actions,
  .action-buttons,
  .app-footer {
    display: none !important;
  }

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

  .page-content {
    padding: 0;
  }

  .data-table-container {
    box-shadow: none;
    border: 1px solid var(--gray-300);
  }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
  :root {
    --white: #1f2937;
    --gray-50: #111827;
    --gray-100: #1f2937;
    --gray-200: #374151;
    --gray-300: #4b5563;
    --gray-900: #f9fafb;
    --gray-800: #f3f4f6;
    --gray-700: #e5e7eb;
    --gray-600: #d1d5db;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --shadow: 0 0 0 1px var(--gray-900);
    --shadow-md: 0 0 0 2px var(--gray-900);
    --shadow-lg: 0 0 0 3px var(--gray-900);
  }
}
