@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #0f4c81; /* UniFOA Blue */
  --primary-hover: #0c3d67;
  --secondary: #118c7e; /* UniFOA Teal */
  --secondary-hover: #0e7367;
  --danger: #b42318;
  --danger-hover: #911c13;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 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);
  --radius: 12px;
  --radius-lg: 20px;
}

* { box-sizing: border-box; }

body { 
  margin: 0; 
  background: var(--bg); 
  color: var(--text); 
  font-family: 'Inter', sans-serif; 
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-hover); }

/* Topbar */
.topbar { 
  background: var(--card); 
  border-bottom: 1px solid var(--border); 
  padding: 12px 32px; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  position: sticky; 
  top: 0; 
  z-index: 50; 
  box-shadow: var(--shadow-sm);
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-brand img {
  height: 40px;
  width: auto;
}
.topbar-brand-text {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
  border-left: 2px solid var(--border);
  padding-left: 12px;
  line-height: 1.2;
}
.topbar nav { display: flex; align-items: center; gap: 24px; }
.topbar nav a { 
  font-weight: 500; 
  color: var(--text);
  font-size: 0.95rem;
}
.topbar nav a:hover { color: var(--primary); }
.topbar nav .nav-btn {
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s;
}
.topbar nav .nav-btn:hover {
  background: var(--primary-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.container { width: min(1600px, 96%); margin: 40px auto; }

/* Hero */
.hero { 
  background: linear-gradient(135deg, var(--primary), var(--secondary)); 
  color: white; 
  border-radius: var(--radius-lg); 
  padding: 40px 32px; 
  margin-bottom: 24px; 
  box-shadow: var(--shadow-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.1), transparent);
}
.hero h1 { margin: 0 0 12px; font-size: 32px; font-weight: 800; letter-spacing: -0.02em; position: relative; }
.hero p { font-size: 16px; max-width: 640px; margin: 0 auto 24px; opacity: 0.9; position: relative; }
.hero-link {
  color: white;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 1.05rem;
  border-bottom: 2px solid rgba(255,255,255,0.3);
  padding-bottom: 4px;
  transition: all 0.3s ease;
}
.hero-link:hover {
  border-bottom-color: white;
  gap: 12px;
  opacity: 1;
}


/* Cards */
.card { 
  background: var(--card); 
  border: 1px solid var(--border); 
  border-radius: var(--radius-lg); 
  padding: 32px; 
  margin: 24px 0; 
  box-shadow: var(--shadow); 
}
.card h2 { margin-top: 0; color: var(--primary); font-size: 1.5rem; letter-spacing: -0.01em; }
.narrow { max-width: 480px; margin: 40px auto; }
.narrow h1 { color: var(--primary); font-size: 1.75rem; text-align: center; margin-bottom: 24px; }

/* Grids */
.grid { display: grid; gap: 24px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 24px 0; }
.metrics div { 
  background: var(--card); 
  border: 1px solid var(--border); 
  border-radius: var(--radius); 
  padding: 24px; 
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.metrics div:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.metrics strong { display: block; font-size: 36px; font-weight: 800; color: var(--primary); line-height: 1; margin-bottom: 8px; }
.metrics span { color: var(--muted); font-size: 0.95rem; font-weight: 500; }

/* Forms */
label { display: block; margin-top: 16px; font-weight: 600; font-size: 0.9rem; color: #374151; }
input, select, textarea { 
  width: 100%; 
  padding: 12px 16px; 
  margin-top: 8px; 
  border: 1px solid #d1d5db; 
  border-radius: 10px; 
  background: #f9fafb; 
  font-size: 1rem; 
  font-family: inherit;
  transition: all 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.1);
}
textarea { resize: vertical; min-height: 100px; }
.check { display: flex; gap: 12px; align-items: center; font-weight: 500; margin-top: 16px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 0; accent-color: var(--primary); cursor: pointer; }

/* Buttons */
.btn { 
  display: inline-flex; 
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px; 
  background: var(--primary); 
  color: white; 
  border: none; 
  border-radius: 10px; 
  padding: 12px 24px; 
  font-weight: 600; 
  font-size: 1rem;
  cursor: pointer; 
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(15, 76, 129, 0.2);
}
.btn:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 6px rgba(15, 76, 129, 0.25); color: white; }
.btn.secondary { background: var(--secondary); box-shadow: 0 2px 4px rgba(17, 140, 126, 0.2); }
.btn.secondary:hover { background: var(--secondary-hover); box-shadow: 0 4px 6px rgba(17, 140, 126, 0.25); }
.btn.outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); box-shadow: none; }
.btn.outline:hover { background: rgba(15, 76, 129, 0.05); }
.btn.small { padding: 8px 16px; font-size: 0.875rem; margin-top: 8px; }
.btn-block { width: 100%; display: flex; }

/* Alerts */
.alert { padding: 16px; border-radius: var(--radius); margin-bottom: 24px; font-weight: 500; display: flex; align-items: center; gap: 12px; }
.alert.success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert.error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* Lists & Tables */
.list-item { 
  padding: 20px; 
  border: 1px solid var(--border); 
  border-radius: var(--radius);
  margin-bottom: 16px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.list-item:hover { border-color: #d1d5db; box-shadow: var(--shadow-sm); }
.status { 
  background: #f0f4f8; 
  border: 1px solid #d1dce8; 
  padding: 16px 20px; 
  border-radius: var(--radius); 
  margin-bottom: 24px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
}
table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 16px; }
th, td { text-align: left; padding: 14px 16px; font-size: 0.95rem; border-bottom: 1px solid var(--border); }
th { background: #f8fafc; font-weight: 600; color: #475569; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }

/* Footer */
.footer { 
  text-align: center; 
  color: var(--muted); 
  padding: 40px 20px; 
  font-size: 0.9rem;
  margin-top: 40px;
  border-top: 1px solid var(--border);
}

@media (max-width: 820px) { 
  .grid.two { grid-template-columns: 1fr; } 
  .topbar { flex-direction: column; gap: 16px; padding: 16px; } 
  .topbar nav { flex-wrap: wrap; justify-content: center; }
  .hero { padding: 40px 20px; }
  .hero h1 { font-size: 32px; }
}
