@font-face {
  font-family: 'SolaimanLipi';
  src: url('../fonts/SolaimanLipi_29-05-06.ttf') format('truetype');
  font-weight: normal;
}
@font-face {
  font-family: 'SolaimanLipi';
  src: url('../fonts/SolaimanLipi_Bold_10-03-12.ttf') format('truetype');
  font-weight: bold;
}

:root {
  --primary: #0f5132;
  --primary-light: #146c43;
  --accent: #b8860b;
  --bg: #f7f7f5;
  --card-bg: #ffffff;
  --border: #e2e2df;
  --text: #222222;
  --text-muted: #6b6b68;
  --success: #1e7e34;
  --danger: #b02a37;
  --pending: #b8860b;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  font-family: 'SolaimanLipi', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  line-height: 1.6;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* ---- Top bar ---- */
.topbar {
  background: var(--primary);
  color: #fff;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar h1 {
  font-size: 18px;
  margin: 0;
  font-weight: 600;
}

.topbar a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  opacity: 0.9;
}

.topbar a:hover { opacity: 1; text-decoration: underline; }

/* ---- Card ---- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.card h2 {
  margin-top: 0;
  font-size: 20px;
  color: var(--primary);
  border-bottom: 2px solid var(--border);
  padding-bottom: 10px;
}

/* ---- Form ---- */
.form-group { margin-bottom: 16px; }

label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 14px;
}

input[type=text], input[type=email], input[type=tel], input[type=password],
input[type=date], input[type=file], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}

textarea { min-height: 90px; resize: vertical; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(20, 108, 67, 0.12);
}

.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 220px; }

.help-text { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.error-text { font-size: 13px; color: var(--danger); margin-top: 4px; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #8c222b; }

.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ---- Badges ---- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-pending { background: #fdf1d6; color: var(--pending); }
.badge-approved { background: #dff3e3; color: var(--success); }
.badge-rejected { background: #fbe0e2; color: var(--danger); }

/* ---- Table ---- */
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
th { background: #f0f0ee; font-weight: 600; color: var(--text-muted); }

/* ---- Alerts ---- */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #dff3e3; color: var(--success); }
.alert-error { background: #fbe0e2; color: var(--danger); }

/* ---- Admit card ---- */
.admit-card {
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 500px;
  margin: 0 auto;
  background: #fffef9;
}
.admit-card .header { text-align: center; margin-bottom: 16px; }
.admit-card .header h2 { border: none; margin: 0; }
.admit-card .photo-box {
  width: 100px; height: 120px;
  border: 1px solid var(--border);
  float: right;
  margin-left: 12px;
  object-fit: cover;
}
.admit-card dl { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 0; }
.admit-card dt { color: var(--text-muted); font-size: 13px; }
.admit-card dd { margin: 0; font-weight: 500; }
.admit-card .reg-no { font-size: 20px; font-weight: 700; color: var(--accent); text-align: center; margin: 16px 0; }

/* ---- Career page ---- */
.career-banner {
  background: #3fa66a;
  color: #fff;
  text-align: center;
  padding: 20px;
  border-radius: 6px;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
}

.career-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.career-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #4fb579;
  color: #fff;
  padding: 10px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}
.career-tab-btn:hover { background: #3fa66a; }
.career-tab-btn.active { background: #2f8a56; }

.job-table {
  width: 100%;
  border-collapse: collapse;
}
.job-table th {
  text-align: left;
  padding: 12px 16px;
  background: #f7f7f5;
  border-bottom: 2px solid var(--border);
  font-weight: 600;
}
.job-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.job-table a {
  color: #3fa66a;
  font-weight: 500;
  text-decoration: none;
}
.job-table a:hover { text-decoration: underline; }

/* ---- Seat overview (exam centers) ---- */
.seat-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.seat-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.seat-card .seat-name { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.seat-card .seat-count { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.seat-bar-track {
  width: 100%;
  height: 10px;
  background: #eee;
  border-radius: 6px;
  overflow: hidden;
}
.seat-bar-fill {
  height: 100%;
  border-radius: 6px;
  background: var(--primary-light);
}
.seat-bar-fill.seat-warn { background: var(--pending); }
.seat-bar-fill.seat-full { background: var(--danger); }

/* ---- Sidebar nav (admin) ---- */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #14231b; color: #fff; padding: 20px 0; flex-shrink: 0; }
.sidebar a {
  display: block; padding: 10px 24px; color: #d7e3da; text-decoration: none; font-size: 14px;
}
.sidebar a:hover, .sidebar a.active { background: rgba(255,255,255,0.08); color: #fff; }

.sidebar .sidebar-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}
.sidebar .sidebar-chevron { font-size: 11px; opacity: 0.7; }
.sidebar .sidebar-subgroup a {
  padding-left: 40px;
  font-size: 13px;
}
.main-content { flex: 1; padding: 24px; }

@media (max-width: 700px) {
  .admin-layout { flex-direction: column; }
  .sidebar { width: 100%; display: flex; overflow-x: auto; padding: 0; }
  .sidebar a { padding: 12px 16px; white-space: nowrap; }
}
