/*
  EDIT IN VSCODE:
  - /data/codes.json -> add/modify admin and user codes
  - /data/users.json -> update user visa status and lastUpdated
  - /data/announcements.json -> add public announcements
  - Run site from a local static server (Live Server recommended)
*/

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

:root {
  --navy: #0b3d91;
  --navy-dark: #082a5e;
  --navy-light: #1a4d99;
  --crimson: #b22234;
  --crimson-dark: #8b1a28;
  --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: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--white);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.header {
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-section img {
  width: 50px;
  height: 50px;
}

.logo-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
}

.logo-text p {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  text-decoration: none;
  color: var(--gray-700);
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: var(--navy);
}

.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  padding: 6rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-emblem {
  width: 120px;
  height: 120px;
  margin: 0 auto 2rem;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: var(--crimson);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--crimson-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(178, 34, 52, 0.3);
}

.btn-secondary {
  background: var(--white);
  color: var(--navy);
}

.btn-secondary:hover {
  background: var(--gray-100);
  transform: translateY(-2px);
}

.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 3rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  transform: translateY(-5px);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--white);
  font-size: 1.5rem;
}

.card h3 {
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 1rem;
}

.card p {
  color: var(--gray-600);
  line-height: 1.8;
}

.footer {
  background: var(--gray-900);
  color: var(--white);
  padding: 3rem 0;
  text-align: center;
}

.footer p {
  opacity: 0.8;
}

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  padding: 2rem;
}

.login-card {
  background: var(--white);
  border-radius: 16px;
  padding: 3rem;
  max-width: 450px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.login-header img {
  width: 80px;
  height: 80px;
  margin-bottom: 1rem;
}

.login-header h2 {
  font-size: 1.75rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.login-header p {
  color: var(--gray-600);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--gray-700);
}

.form-input {
  width: 100%;
  padding: 0.875rem;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--navy);
}

.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.alert-error {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid var(--danger);
}

.alert-success {
  background: #f0fdf4;
  color: var(--success);
  border: 1px solid var(--success);
}

.dashboard {
  display: flex;
  min-height: 100vh;
  background: var(--gray-50);
}

.sidebar {
  width: 260px;
  background: var(--white);
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
  padding: 2rem 0;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 0 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.sidebar-header img {
  width: 60px;
  height: 60px;
  margin-bottom: 1rem;
}

.sidebar-header h3 {
  color: var(--navy);
  font-size: 1.125rem;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-menu li {
  margin-bottom: 0.5rem;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  color: var(--gray-700);
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
  background: var(--navy);
  color: var(--white);
}

.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 2rem;
}

.dashboard-header {
  background: var(--white);
  padding: 1.5rem 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.dashboard-header h1 {
  font-size: 1.75rem;
  color: var(--navy);
}

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

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

.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: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--navy);
}

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

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

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
}

.table-container {
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.table-header h2 {
  font-size: 1.25rem;
  color: var(--navy);
}

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

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

.table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--gray-700);
  border-bottom: 2px solid var(--gray-200);
}

.table td {
  padding: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.table tbody tr {
  transition: background 0.2s ease;
}

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

.badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
}

.badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.badge-approved {
  background: #d1fae5;
  color: #065f46;
}

.badge-denied {
  background: #fee2e2;
  color: #991b1b;
}

.badge-processing {
  background: #dbeafe;
  color: #1e40af;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  margin: 2rem 0;
  position: relative;
}

.progress-steps::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gray-200);
  z-index: 0;
}

.progress-line {
  position: absolute;
  top: 20px;
  left: 0;
  height: 4px;
  background: var(--success);
  transition: width 1s ease-out;
  z-index: 1;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 2;
  flex: 1;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--gray-600);
  transition: all 0.3s ease;
}

.step-circle.active {
  background: var(--success);
  color: var(--white);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.step-circle.completed {
  background: var(--success);
  color: var(--white);
}

.step-label {
  font-size: 0.875rem;
  color: var(--gray-600);
  text-align: center;
}

.document-checklist {
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.checklist-item:last-child {
  border-bottom: none;
}

.checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid var(--gray-300);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.checkbox.checked {
  background: var(--success);
  border-color: var(--success);
  color: var(--white);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  z-index: 1001;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--navy);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.sidebar-overlay.active {
  display: block;
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
    z-index: 1000;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: 1rem;
  }

  .dashboard-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

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

  .user-info {
    width: 100%;
    justify-content: space-between;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .nav-menu {
    flex-direction: column;
    gap: 1rem;
  }

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

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

  .table-container {
    overflow-x: auto;
  }

  .table {
    min-width: 600px;
  }

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

  .status-info {
    flex-direction: column;
    gap: 1rem;
  }

  .progress-steps {
    flex-direction: column;
    align-items: flex-start;
  }

  .progress-steps::before {
    display: none;
  }

  .progress-step {
    flex-direction: row;
    width: 100%;
    padding: 0.75rem 0;
    border-left: 3px solid var(--gray-200);
    padding-left: 1rem;
  }

  .progress-step.completed,
  .progress-step.active {
    border-left-color: var(--success);
  }
}
