@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary-color: #4b5563; /* Gray-600 */
  --primary-hover: #374151; /* Gray-700 */
  --secondary-color: #9ca3af; /* Gray-400 */
  --bg-color: #f3f4f6; /* Gray-100 */
  --surface-color: #ffffff; /* White */
  --text-main: #1f2937; /* Gray-800 */
  --text-muted: #6b7280; /* Gray-500 */
  --success: #6b7280; /* Gray-500 */
  --danger: #4b5563; /* Gray-600 */
  --border-color: #e5e7eb; /* Gray-200 */
  --glass-bg: #ffffff;
  --glass-border: #e5e7eb;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1rem;
  background: var(--bg-color);
}

.auth-box {
  width: 100%;
  max-width: 420px;
  padding: 2.5rem 2rem;
  text-align: center;
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-box h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-box p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: #f9fafb;
  color: var(--text-main);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.875rem;
  border-radius: 999px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 15px rgba(75, 85, 99, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
}

.auth-switch {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.auth-switch a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.app-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--surface-color);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  border-radius: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
}

.main-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(107, 114, 128, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
  border: 2px solid #e0e7ff;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-info h3 {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.stat-info p {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

.icon-blue {
  background: rgba(107, 114, 128, 0.1);
  color: #4b5563;
}

.icon-green {
  background: rgba(156, 163, 175, 0.1);
  color: #6b7280;
}

.icon-red {
  background: rgba(75, 85, 99, 0.1);
  color: #4b5563;
}

.chart-container {
  padding: 1.5rem;
  margin-bottom: 2rem;
  height: 300px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  width: 100%;
  max-width: 500px;
  padding: 2rem;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.task-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  margin-bottom: 0.5rem;
}

.task-details h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.task-details span {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: block;
}

.task-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge.pending {
  background: rgba(156, 163, 175, 0.1);
  color: #6b7280;
}

.badge.completed {
  background: rgba(75, 85, 99, 0.1);
  color: #4b5563;
}

.badge.approved {
  background: rgba(107, 114, 128, 0.1);
  color: #374151;
}

.badge.rejected {
  background: rgba(55, 65, 81, 0.1);
  color: #1f2937;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  width: auto;
}

.photo-preview img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  margin-top: 1rem;
  object-fit: cover;
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    padding: 0;
    border: none;
    height: auto;
  }

  .sidebar-brand {
    display: none;
  }

  .nav-links {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    padding-bottom: env(safe-area-inset-bottom, 0.5rem);
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    gap: 0;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
    border-radius: 20px 20px 0 0;
  }

  .nav-item span {
    display: block;
    font-size: 0.70rem;
    margin-top: 0.25rem;
  }

  .nav-item {
    padding: 0.5rem;
    flex-direction: column;
    gap: 0;
    font-size: 0.75rem;
    border-radius: 8px;
    background: transparent !important;
  }

  .nav-item i {
    font-size: 1.25rem;
  }

  .nav-item:hover,
  .nav-item.active {
    color: var(--primary-color);
  }

  .main-content {
    padding: 1.25rem;
    padding-bottom: 90px;
  }

  .task-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .task-actions {
    width: 100%;
    justify-content: flex-end;
  }
}