/* ===========================
   MODERN HEADER & CONTROLS (OPTIMIZED)
   File: css/karyawan/header.css
=========================== */

/* Header Controls */
.employee-page .header-controls {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
  margin-bottom: var(--spacing-xl);
  position: relative;
}

/* Gradient Background Effect */
.employee-page .header-controls::before {
  content: "";
  position: absolute;
  top: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(0, 102, 204, 0.15) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
  animation: float 6s ease-in-out infinite;
}

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

.employee-page .left-section {
  flex: 0 0 auto;
  z-index: 1;
}

/* Page Title with Gradient - REDUCED SIZE */
.employee-page .header-section {
  margin-bottom: var(--spacing-md);
}

.employee-page .page-title {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.employee-page .title-main {
  font-size: 32px; /* Reduced from 52px */
  font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--color-primary) 0%, #0056b3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.employee-page .title-sub {
  font-size: 20px; /* Reduced from 32px */
  font-weight: 600;
  color: var(--color-text-light);
  margin-left: 2px;
}

.employee-page .page-description {
  font-size: 13px; /* Reduced from 16px */
  color: var(--color-text-light);
  margin: var(--spacing-xs) 0 0 2px;
  font-weight: 500;
}

/* Modern Quick Stats - COMPACT VERSION */
.employee-page .quick-stats {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  margin-top: var(--spacing-md);
}

.employee-page .stat-card {
  position: relative;
  padding: var(--spacing-md) var(--spacing-lg); /* Reduced padding */
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.8) 100%
  );
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06); /* Reduced shadow */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 160px; /* Reduced from 200px */
  overflow: hidden;
}

.employee-page .stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px; /* Reduced from 4px */
  background: linear-gradient(90deg, var(--color-primary) 0%, #00d4ff 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.employee-page .stat-card:hover {
  transform: translateY(-4px); /* Reduced from -8px */
  box-shadow: 0 8px 24px rgba(0, 102, 204, 0.15); /* Reduced shadow */
  border-color: rgba(0, 102, 204, 0.3);
}

.employee-page .stat-card:hover::before {
  transform: scaleX(1);
}

.employee-page .stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.employee-page .stat-icon {
  font-size: 32px; /* Reduced from 48px */
  width: auto;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.12));
}

.employee-page .stat-icon svg {
  width: 32px; /* Reduced from 48px */
  height: 32px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.employee-page .stat-card:hover .stat-icon {
  transform: scale(1.15) translateY(-2px); /* Reduced scale */
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.2));
}

.employee-page .stat-card:hover .stat-icon svg {
  transform: rotate(5deg);
}

.employee-page .stat-badge {
  font-size: 10px; /* Reduced from 11px */
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 10px;
  background: rgba(0, 102, 204, 0.1);
  color: var(--color-primary);
  border-radius: 20px;
  letter-spacing: 0.5px;
}

/* Stat Card Variants */
.employee-page .stat-primary .stat-icon svg {
  fill: #0066cc;
}

.employee-page .stat-success .stat-icon svg {
  fill: #10b981;
}

.employee-page .stat-success .stat-badge {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.employee-page .stat-warning .stat-icon svg {
  fill: #f59e0b;
}

.employee-page .stat-warning .stat-badge {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.employee-page .stat-content {
  margin-bottom: var(--spacing-xs);
}

.employee-page .stat-number {
  font-size: 28px; /* Reduced from 36px */
  font-weight: 800;
  color: var(--color-primary);
  margin: 0 0 2px 0;
  line-height: 1;
  letter-spacing: -0.5px;
}

.employee-page .stat-label {
  font-size: 12px; /* Reduced from 14px */
  color: var(--color-text-light);
  margin: 0;
  font-weight: 600;
}

.employee-page .stat-footer {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding-top: var(--spacing-xs);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.employee-page .stat-trend,
.employee-page .stat-info {
  font-size: 11px; /* Reduced from 12px */
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--color-text-light);
}

.employee-page .stat-trend i {
  color: #10b981;
}

/* Control Buttons - COMPACT */
.employee-page .control-buttons {
  display: flex;
  gap: var(--spacing-sm);
  flex-direction: column;
  align-items: flex-end;
  z-index: 1;
}

.employee-page .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  padding: 12px 24px; /* Reduced from 16px 32px */
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px; /* Reduced from 16px */
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
}

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

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

.employee-page .btn > * {
  position: relative;
  z-index: 1;
}

.employee-page .btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, #0056b3 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(0, 102, 204, 0.25);
}

.employee-page .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 102, 204, 0.35);
}

.employee-page .btn-primary:active {
  transform: translateY(-1px);
}

.employee-page .btn-secondary {
  background: white;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.1);
}

.employee-page .btn-secondary:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 102, 204, 0.25);
}

.employee-page .btn-icon {
  font-size: 16px; /* Reduced from 18px */
}

/* Modern View Toggle - COMPACT */
.employee-page .view-toggle {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 5px;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.employee-page .toggle-btn {
  padding: 10px 20px; /* Reduced from 12px 24px */
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px; /* Reduced from 14px */
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.employee-page .toggle-btn.active {
  background: linear-gradient(135deg, var(--color-primary) 0%, #0056b3 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.25);
}

.employee-page .toggle-btn:hover:not(.active) {
  background: rgba(0, 102, 204, 0.1);
  color: var(--color-primary);
  transform: scale(1.05);
}

/* Filter Section - COMPACT */
.employee-page .filter-section {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-lg);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.85) 100%
  );
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.employee-page .search-box {
  flex: 1;
  min-width: 240px;
  position: relative;
}

.employee-page .search-box::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  pointer-events: none;
  opacity: 0.6;
  z-index: 1;
}

.employee-page .search-input {
  width: 100%;
  padding: 11px 16px 11px 42px; /* Reduced padding */
  border: 2px solid rgba(0, 102, 204, 0.2);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  background: white;
}

.employee-page .search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
  transform: translateY(-1px);
}

.employee-page .filter-group {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.employee-page .filter-label {
  font-weight: 700;
  color: var(--color-text);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.employee-page .filter-buttons {
  display: flex;
  gap: var(--spacing-xs);
}

.employee-page .filter-btn {
  padding: 8px 16px; /* Reduced from 10px 20px */
  border: 2px solid rgba(0, 102, 204, 0.2);
  background: white;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--color-text-light);
}

.employee-page .filter-btn.active {
  background: linear-gradient(135deg, var(--color-primary) 0%, #0056b3 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.25);
  transform: scale(1.05);
}

.employee-page .filter-btn:hover:not(.active) {
  background: rgba(0, 102, 204, 0.1);
  color: var(--color-primary);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.employee-page .role-select {
  padding: 8px 16px;
  border: 2px solid rgba(0, 102, 204, 0.2);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  background: white;
  color: var(--color-text);
  transition: all 0.3s ease;
}

.employee-page .role-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* View Content Toggle */
.employee-page .view-content {
  display: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.employee-page .view-content.active {
  display: block;
  opacity: 1;
  visibility: visible;
  animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .employee-page .header-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .employee-page .control-buttons {
    align-items: stretch;
  }

  .employee-page .btn {
    width: 100%;
  }

  .employee-page .view-toggle {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .employee-page .title-main {
    font-size: 24px;
  }

  .employee-page .title-sub {
    font-size: 16px;
  }

  .employee-page .quick-stats {
    flex-direction: column;
  }

  .employee-page .stat-card {
    width: 100%;
  }

  .employee-page .filter-section {
    flex-direction: column;
    align-items: stretch;
  }
}
