/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1a3a5c;
  --primary-light: #2c5f8a;
  --accent: #e8a838;
  --accent-hover: #d4952e;
  --success: #27ae60;
  --danger: #e74c3c;
  --warning: #f39c12;
  --bg: #f5f7fa;
  --card-bg: #ffffff;
  --text: #2c3e50;
  --text-light: #7f8c8d;
  --border: #dce1e8;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}

/* ===== Dark Mode ===== */
[data-theme="dark"] {
  --primary: #1a2d42;
  --primary-light: #4a9eff;
  --accent: #f0b040;
  --accent-hover: #e0a030;
  --success: #2ecc71;
  --danger: #e74c3c;
  --warning: #f1c40f;
  --bg: #0f1419;
  --card-bg: #1a2332;
  --text: #e1e8ed;
  --text-light: #8899a6;
  --border: #2a3a4a;
  --shadow: 0 2px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.6);
}

[data-theme="dark"] .navbar { background: #0d1117; box-shadow: 0 2px 8px rgba(0,0,0,0.4); }
[data-theme="dark"] .navbar nav a:hover,
[data-theme="dark"] .navbar nav a.active { background: rgba(255,255,255,0.1); }
[data-theme="dark"] .hero { background: linear-gradient(135deg, #0d1117 0%, #1a2d42 100%); }
[data-theme="dark"] .stat-card { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .form-control { background: #0f1419; color: var(--text); border-color: var(--border); }
[data-theme="dark"] .form-control:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(74,158,255,0.15); }
[data-theme="dark"] select.form-control { background: #0f1419; color: var(--text); }
[data-theme="dark"] table th { background: #0f1419; }
[data-theme="dark"] table tr:hover { background: #162230; }
[data-theme="dark"] .thread-item:hover { background: #162230; }
[data-theme="dark"] .modal { background: #1a2332; }
[data-theme="dark"] .modal-overlay { background: rgba(0,0,0,0.7); }
[data-theme="dark"] .footer { border-top-color: var(--border); }
[data-theme="dark"] .loading-overlay { background: rgba(15,20,25,0.85); }

/* Dark alerts */
[data-theme="dark"] .alert-success { background: #1a3a2a; color: #6ddb9c; border-color: #2a5a3a; }
[data-theme="dark"] .alert-danger { background: #3a1a1a; color: #f09090; border-color: #5a2a2a; }
[data-theme="dark"] .alert-warning { background: #3a3010; color: #f0d060; border-color: #5a4a1a; }
[data-theme="dark"] .alert-info { background: #1a2a3a; color: #70b8d0; border-color: #2a4a5a; }

/* Dark badges */
[data-theme="dark"] .badge-pending { background: #3a3010; color: #f0d060; }
[data-theme="dark"] .badge-verified { background: #1a3a2a; color: #6ddb9c; }
[data-theme="dark"] .badge-rejected { background: #3a1a1a; color: #f09090; }
[data-theme="dark"] .badge-combined { background: #1a3a2a; color: #6ddb9c; }
[data-theme="dark"] .badge-faculty { background: #2a1a3a; color: #c090f0; }
[data-theme="dark"] .badge-batch { background: #3a2a1a; color: #f0b060; }
[data-theme="dark"] .badge-upcoming { background: #1a2a3a; color: #70b8d0; }
[data-theme="dark"] .badge-ongoing { background: #1a3a2a; color: #6ddb9c; }
[data-theme="dark"] .badge-completed { background: #2a2a2a; color: #a0a0a0; }
[data-theme="dark"] .badge-cancelled { background: #3a1a1a; color: #f09090; }
[data-theme="dark"] .badge-job-type { background: #1a2a3a; color: #70b8d0; }
[data-theme="dark"] .badge-job-remote { background: #1a3a2a; color: #6ddb9c; }
[data-theme="dark"] .badge-job-onsite { background: #2a2a2a; color: #a0a0a0; }
[data-theme="dark"] .badge-job-hybrid { background: #2a1a3a; color: #c090f0; }
[data-theme="dark"] .badge-job-open { background: #1a3a2a; color: #6ddb9c; }
[data-theme="dark"] .badge-job-closed { background: #3a1a1a; color: #f09090; }

/* Dark ranks */
[data-theme="dark"] .rank-1 { background: #2a2a2a; color: #a0a0a0; }
[data-theme="dark"] .rank-2 { background: #1a2a3a; color: #70b8d0; }
[data-theme="dark"] .rank-3 { background: #1a3a2a; color: #6ddb9c; }
[data-theme="dark"] .rank-4 { background: #2a1a3a; color: #c090f0; }
[data-theme="dark"] .rank-5 { background: #3a2a1a; color: #f0b060; }
[data-theme="dark"] .rank-6 { background: #3a1a1a; color: #f09090; }

/* Dark forum / post */
[data-theme="dark"] .category-card { background: var(--card-bg); }
[data-theme="dark"] .post-header { background: #0f1419; }
[data-theme="dark"] .post-action-btn:hover { background: #0f1419; }
[data-theme="dark"] .like-btn { border-color: var(--border); color: var(--text-light); }
[data-theme="dark"] .like-btn.liked { border-color: #e74c3c; color: #e74c3c; background: #3a1a1a; }

/* Dark checkin */
[data-theme="dark"] .checkin-result.success { background: #1a3a2a; color: #6ddb9c; border-color: #2a5a3a; }
[data-theme="dark"] .checkin-result.duplicate { background: #3a3010; color: #f0d060; border-color: #5a4a1a; }
[data-theme="dark"] .checkin-result.error { background: #3a1a1a; color: #f09090; border-color: #5a2a2a; }

/* Dark Quill */
[data-theme="dark"] .ql-toolbar { background: #0f1419; border-color: var(--border); }
[data-theme="dark"] .ql-container { border-color: var(--border); }
[data-theme="dark"] .ql-editor { color: var(--text); }
[data-theme="dark"] .ql-toolbar .ql-stroke { stroke: var(--text-light); }
[data-theme="dark"] .ql-toolbar .ql-fill { fill: var(--text-light); }
[data-theme="dark"] .ql-toolbar .ql-picker-label { color: var(--text-light); }
[data-theme="dark"] .ql-toolbar button:hover .ql-stroke { stroke: var(--text); }
[data-theme="dark"] .ql-toolbar button:hover .ql-fill { fill: var(--text); }
[data-theme="dark"] .ql-snow .ql-picker-options { background: #1a2332; border-color: var(--border); }

/* Dark misc */
[data-theme="dark"] .event-info-item,
[data-theme="dark"] .job-info-item { background: #0f1419; }
[data-theme="dark"] .toggle-password { color: var(--text-light); }
[data-theme="dark"] .password-rules li { color: var(--text-light); }
[data-theme="dark"] .password-rules li.pass { color: var(--success); }
[data-theme="dark"] .btn-outline { border-color: var(--border); color: var(--text); }
[data-theme="dark"] .btn-outline:hover { background: var(--border); color: var(--text); }
[data-theme="dark"] .academic-warning-box { background: #3a3010; color: #f0d060; border-color: #5a4a1a; }

/* ===== Theme & Language Toggle ===== */
.navbar-controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.5rem;
}

.theme-toggle, .lang-toggle {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.85);
  border-radius: var(--radius);
  padding: 0.3rem 0.55rem;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
  font-weight: 600;
  white-space: nowrap;
}

.theme-toggle:hover, .lang-toggle:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Navbar ===== */
.navbar {
  background: var(--primary);
  color: #fff;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.navbar .logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.navbar .logo:hover { text-decoration: none; }

.navbar .logo img {
  height: 40px;
  width: auto;
}

.navbar .logo span { color: var(--accent); }

.navbar nav { display: flex; gap: 0.25rem; align-items: center; }

.navbar nav a {
  color: rgba(255,255,255,0.85);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.navbar nav a:hover,
.navbar nav a.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
  text-decoration: none;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Navbar dropdowns */
.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}
.nav-dropdown-toggle {
  color: rgba(255,255,255,0.85);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  cursor: pointer;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.nav-dropdown-toggle .caret {
  font-size: 0.6rem;
  transition: transform 0.2s;
}
.nav-dropdown.open .caret {
  transform: rotate(180deg);
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  min-width: 180px;
  z-index: 110;
  overflow: hidden;
  border: 1px solid var(--border);
}
.nav-dropdown-menu.right {
  left: auto;
  right: 0;
}
.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  color: var(--text) !important;
  font-size: 0.9rem;
  transition: background 0.15s;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover {
  background: var(--bg);
  text-decoration: none !important;
}
.nav-dropdown-menu a.active {
  background: var(--bg);
  font-weight: 600;
}
.nav-dropdown-menu .dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.25rem 0;
}
/* Avatar button in navbar */
.nav-avatar-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  border: 2px solid rgba(255,255,255,0.4);
  overflow: hidden;
  padding: 0;
}
.nav-avatar-btn .nav-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  text-align: center;
  padding: 4rem 2rem;
}

.hero h1 { font-size: 2.5rem; margin-bottom: 0.75rem; }
.hero p { font-size: 1.15rem; opacity: 0.9; max-width: 600px; margin: 0 auto 2rem; }

/* ===== Stats ===== */
.stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.stat-card {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  padding: 1.25rem 2rem;
  text-align: center;
  min-width: 150px;
}

.stat-card .number { font-size: 2rem; font-weight: 700; }
.stat-card .label { font-size: 0.85rem; opacity: 0.85; margin-top: 0.25rem; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #219a52; }

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

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

.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.85rem; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Container ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 2rem; }

/* ===== Cards ===== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.card-header h2 { font-size: 1.25rem; }

/* ===== Forms ===== */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: var(--text);
}

.form-group label .required { color: var(--danger); }

.form-control {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
  background: #fff;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(44,95,138,0.12);
}

select.form-control { appearance: auto; }

/* ===== Google Sign-In Button ===== */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-google:hover {
  background: var(--bg);
  border-color: var(--text-light);
}

[data-theme="dark"] .btn-google {
  background: #1a2332;
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] .btn-google:hover {
  background: #0f1419;
}

.password-wrapper {
  position: relative;
}

.password-wrapper .form-control {
  padding-right: 2.75rem;
}

.toggle-password {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.25rem;
  color: var(--text-light);
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.toggle-password:hover { opacity: 1; }
.toggle-password.active { opacity: 1; color: var(--primary); }

/* ===== Password Strength ===== */
.password-strength {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.strength-bars {
  display: flex;
  gap: 4px;
  flex: 1;
}

.strength-bar {
  height: 5px;
  flex: 1;
  border-radius: 3px;
  background: var(--border);
  transition: background 0.3s;
}

.strength-bar.weak { background: var(--danger); }
.strength-bar.fair { background: var(--warning); }
.strength-bar.good { background: #3498db; }
.strength-bar.strong { background: var(--success); }

.strength-text {
  font-size: 0.8rem;
  font-weight: 600;
  min-width: 55px;
  text-align: right;
}

.strength-text.weak { color: var(--danger); }
.strength-text.fair { color: var(--warning); }
.strength-text.good { color: #3498db; }
.strength-text.strong { color: var(--success); }

.password-rules {
  list-style: none;
  margin-top: 0.5rem;
  padding: 0;
  font-size: 0.8rem;
  color: var(--text-light);
}

.password-rules li {
  padding: 0.15rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.password-rules li::before {
  content: '\2715';
  position: absolute;
  left: 0;
  color: var(--text-light);
  font-size: 0.75rem;
}

.password-rules li.pass {
  color: var(--success);
}

.password-rules li.pass::before {
  content: '\2713';
  color: var(--success);
}

.password-match {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.password-match.match { color: var(--success); }
.password-match.no-match { color: var(--danger); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ===== Alerts ===== */
.alert {
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  display: none;
}

.alert.show { display: block; }

.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ===== Badge ===== */
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-pending { background: #fff3cd; color: #856404; }
.badge-verified { background: #d4edda; color: #155724; }
.badge-rejected { background: #f8d7da; color: #721c24; }

/* ===== Table ===== */
.table-wrapper { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

table th, table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

table th {
  background: var(--bg);
  font-weight: 600;
  color: var(--text);
  position: sticky;
  top: 0;
}

table tr:hover { background: #f8f9fb; }

/* ===== Alumni Directory Grid ===== */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.alumni-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.alumni-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.alumni-card .alumni-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.alumni-card .alumni-code {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

.alumni-card .alumni-info {
  font-size: 0.85rem;
  color: var(--text-light);
}

.alumni-card .alumni-info span { display: block; margin-bottom: 0.15rem; }

/* ===== Search / Filter Bar ===== */
.search-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.search-bar .form-control { flex: 1; min-width: 200px; }
.search-bar select.form-control { flex: 0 0 180px; }

/* ===== Profile Section ===== */
.profile-header {
  text-align: center;
  padding: 2rem 1rem;
}

.profile-header .avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.profile-header h2 { margin-bottom: 0.25rem; }

.profile-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 2rem;
}

.profile-details .detail-item label {
  font-size: 0.8rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-details .detail-item p {
  font-size: 0.95rem;
  font-weight: 500;
}

/* ===== Admin Tabs ===== */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
  gap: 0.25rem;
}

.tab {
  padding: 0.65rem 1.25rem;
  cursor: pointer;
  border: none;
  background: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.tab-count {
  background: var(--danger);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 50px;
  margin-left: 0.35rem;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== Modal ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.show { display: flex; }

.modal {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 1.5rem;
}

.modal h3 { margin-bottom: 1rem; }

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

/* ===== Loading Spinner ===== */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.8);
  z-index: 300;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
}

.loading-overlay.show { display: flex; }
.loading-overlay .spinner { width: 40px; height: 40px; }

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
}

.empty-state .icon { font-size: 3rem; margin-bottom: 0.75rem; }
.empty-state p { font-size: 0.95rem; }

/* ===== Forum ===== */
.forum-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.category-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border-left: 4px solid var(--primary);
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.category-card h3 {
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.category-card p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.category-card .category-meta {
  font-size: 0.8rem;
  color: var(--text-light);
}

.thread-list {
  list-style: none;
}

.thread-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

.thread-item:hover { background: #f8f9fb; margin: 0 -1rem; padding: 1rem; border-radius: var(--radius); }

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

.thread-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.thread-content { flex: 1; min-width: 0; }

.thread-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.thread-title a {
  color: var(--text);
}

.thread-title a:hover {
  color: var(--primary-light);
  text-decoration: none;
}

.thread-excerpt {
  font-size: 0.85rem;
  color: var(--text-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-meta {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.35rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.thread-stats {
  text-align: center;
  min-width: 60px;
  flex-shrink: 0;
}

.thread-stats .count {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.thread-stats .label {
  font-size: 0.7rem;
  color: var(--text-light);
  text-transform: uppercase;
}

.badge-pinned {
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 50px;
}

.badge-locked {
  background: var(--text-light);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 50px;
}

.badge-category {
  background: #e8edf2;
  color: var(--primary);
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 50px;
  font-weight: 600;
}

/* Forum Thread Detail */
.thread-detail-header {
  margin-bottom: 1.5rem;
}

.thread-detail-header h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.thread-detail-header .thread-meta {
  margin-bottom: 0.75rem;
}

.post-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  overflow: hidden;
}

.post-card.original-post {
  border-left: 4px solid var(--primary);
}

.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.post-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.post-author .avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.post-author .author-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.post-author .post-date {
  font-size: 0.8rem;
  color: var(--text-light);
}

.post-body {
  padding: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.post-actions {
  padding: 0.5rem 1.25rem 0.75rem;
  display: flex;
  gap: 0.5rem;
}

.post-action-btn {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s;
}

.post-action-btn:hover { background: var(--bg); color: var(--text); }
.post-action-btn.danger:hover { color: var(--danger); }

/* Reply Box */
.reply-box {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.reply-box h3 { margin-bottom: 0.75rem; font-size: 1rem; }

.reply-box textarea {
  min-height: 100px;
  resize: vertical;
}

/* ===== Alumni ID Card ===== */
.id-card {
  background: linear-gradient(135deg, #1a3a5c 0%, #2c5f8a 60%, #1a3a5c 100%);
  border-radius: 12px;
  padding: 0;
  max-width: 480px;
  margin: 0 auto 0;
  box-shadow: 0 8px 30px rgba(26, 58, 92, 0.3);
  overflow: hidden;
  color: #fff;
  position: relative;
}

.id-card-watermark {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transform: rotate(-25deg);
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.id-card-watermark span {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255,255,255,0.06);
  letter-spacing: 3px;
  text-transform: uppercase;
  white-space: nowrap;
}

.id-card-header,
.id-card-body,
.id-card-footer {
  position: relative;
  z-index: 2;
}

.id-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: rgba(0,0,0,0.15);
  border-bottom: 2px solid var(--accent);
}

.id-card-logo {
  width: 45px;
  height: 45px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  padding: 4px;
}

.id-card-org {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

.id-card-subtitle {
  font-size: 0.7rem;
  opacity: 0.8;
  letter-spacing: 0.3px;
}

.id-card-body {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
}

.id-card-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 3px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
  color: #fff;
}

.id-card-info {
  flex: 1;
  min-width: 0;
}

.id-card-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  line-height: 1.2;
}

.id-card-detail {
  font-size: 0.8rem;
  opacity: 0.9;
  margin-bottom: 0.15rem;
  display: flex;
  gap: 0.35rem;
}

.id-card-detail span:first-child {
  opacity: 0.7;
  min-width: 75px;
}

.id-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: rgba(0,0,0,0.2);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.id-card-qr {
  flex-shrink: 0;
  background: #fff;
  border-radius: 6px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.id-card-qr img, .id-card-qr canvas {
  display: block;
}

.id-card-code {
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
}

.id-card-admin-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.id-card-admin-badge.super {
  background: var(--accent);
  color: #fff;
}

.id-card-admin-badge.batch {
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}

.id-card-verify-note {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.6;
}

/* ===== Events ===== */
.events-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.event-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0;
  display: flex;
  flex-direction: row;
  transition: transform 0.2s, box-shadow 0.2s;
  border-left: 4px solid var(--primary);
  overflow: hidden;
}
.event-card-img {
  width: 160px;
  min-height: 120px;
  flex-shrink: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.event-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.event-card-img .img-placeholder {
  font-size: 2.5rem;
  color: var(--text-light);
  opacity: 0.3;
}
.event-card-content {
  flex: 1;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
@media (max-width: 768px) {
  .events-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .event-card { flex-direction: column; }
  .event-card-img { width: 100%; min-height: 140px; max-height: 180px; }
}
/* Detail page cover */
.event-cover-banner {
  width: 100%;
  max-height: 300px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
}
.event-cover-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.event-card.type-faculty { border-left-color: #8e44ad; }
.event-card.type-batch { border-left-color: #e67e22; }
.event-card.type-combined { border-left-color: var(--success); }

.event-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.event-card-title a { color: var(--text); }
.event-card-title a:hover { color: var(--primary-light); text-decoration: none; }

.event-card-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
  flex: 1;
}

.event-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.event-card-badges {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.badge-combined { background: #d4edda; color: #155724; }
.badge-faculty { background: #e8daef; color: #6c3483; }
.badge-batch { background: #fdebd0; color: #af601a; }
.badge-upcoming { background: #d1ecf1; color: #0c5460; }
.badge-ongoing { background: #d4edda; color: #155724; }
.badge-completed { background: #e2e3e5; color: #383d41; }
.badge-cancelled { background: #f8d7da; color: #721c24; }

.event-attendees {
  font-size: 0.8rem;
  color: var(--text-light);
}

.event-attendees strong { color: var(--text); }

/* Event Detail */
.event-detail-header {
  margin-bottom: 1.5rem;
}

.event-detail-header h1 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.event-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.event-info-item {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}

.event-info-item label {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 0.15rem;
}

.event-info-item p {
  font-size: 0.95rem;
  font-weight: 600;
}

/* Home page event preview */
.home-events {
  margin-top: 2rem;
}

.home-events h3 {
  margin-bottom: 1rem;
}

.home-event-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.home-event-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  border-left: 4px solid var(--accent);
  cursor: pointer;
  transition: transform 0.2s;
}

.home-event-card:hover {
  transform: translateY(-2px);
}

.home-event-card h4 {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  color: var(--primary);
}

.home-event-card p {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.15rem;
}

@media (max-width: 768px) {
  .events-grid { grid-template-columns: 1fr; }
  .event-info-grid { grid-template-columns: 1fr; }
  .home-event-list { grid-template-columns: 1fr; }
}

/* ===== Announcement Bar ===== */
.announcement-bar {
  background: linear-gradient(90deg, var(--accent), #f0c040);
  color: #1a1a1a;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.4;
  box-shadow: var(--shadow);
}

.announcement-bar .announce-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.announcement-bar .announce-text {
  flex: 1;
  font-weight: 400;
}

.announcement-bar .announce-text p { margin: 0; }
.announcement-bar .announce-text strong, .announcement-bar .announce-text b { font-weight: 700; }
.announcement-bar .announce-text em, .announcement-bar .announce-text i { font-style: italic; }
.announcement-bar .announce-text u { text-decoration: underline; }
.announcement-bar .announce-text a { color: inherit; font-weight: 600; text-decoration: underline; }

.announcement-bar .announce-close {
  background: none;
  border: none;
  color: rgba(0,0,0,0.4);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.2rem;
  line-height: 1;
  flex-shrink: 0;
}

.announcement-bar .announce-close:hover { color: rgba(0,0,0,0.7); }

[data-theme="dark"] .announcement-bar {
  background: linear-gradient(90deg, #b8860b, #d4a017);
  color: #1a1a1a;
}

/* ===== Member Home Layout ===== */
.member-welcome-card {
  padding: 0 !important;
  overflow: visible;
}

.welcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.member-welcome-card {
  background: linear-gradient(135deg, #1a3a5c 0%, #2c5f8a 50%, #1a3a5c 100%) !important;
}

[data-theme="dark"] .member-welcome-card {
  background: linear-gradient(135deg, #0d1117 0%, #1a2d42 50%, #0d1117 100%) !important;
}

.welcome-left {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  color: #fff;
}

.welcome-left h2 { color: #fff; }
.welcome-left .btn-primary { background: var(--accent); color: #fff; }
.welcome-left .btn-primary:hover { background: var(--accent-hover); }
.welcome-left .btn-outline { border-color: rgba(255,255,255,0.4); color: #fff; }
.welcome-left .btn-outline:hover { background: rgba(255,255,255,0.15); }

.welcome-right {
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-right .id-card {
  max-width: 100%;
  margin: 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  font-size: 0.85rem;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 12px;
}

.welcome-right .id-card-name { font-size: 1rem; }
.welcome-right .id-card-detail { font-size: 0.7rem; }
.welcome-right .id-card-code { font-size: 0.9rem; }
.welcome-right .id-card-avatar { width: 55px; height: 55px; font-size: 1.2rem; }
.welcome-right .id-card-logo { width: 35px; height: 35px; }
.welcome-right .id-card-org { font-size: 0.85rem; }
.welcome-right .id-card-subtitle { font-size: 0.6rem; }

.welcome-verified {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.welcome-quick-stats {
  display: flex;
  gap: 1rem;
}

.mini-stat { text-align: center; }
.mini-stat-num { font-size: 1.25rem; font-weight: 700; color: var(--primary-light); }
.mini-stat-label { font-size: 0.7rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; }

.home-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.home-bottom-card { margin-bottom: 0 !important; }

.profile-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.summary-item {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
  text-align: center;
}

.summary-item .sum-num { font-size: 1.1rem; font-weight: 700; color: var(--primary-light); }
.summary-item .sum-label { font-size: 0.7rem; color: var(--text-light); }

.summary-role {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.home-poll-inner h4 { font-size: 1rem; margin-bottom: 0.25rem; }
.home-poll-inner .poll-desc { font-size: 0.85rem; color: var(--text-light); margin-bottom: 0.5rem; }
.home-poll-inner .poll-dates { font-size: 0.8rem; color: var(--text-light); margin-bottom: 0.75rem; }

@media (max-width: 768px) {
  .welcome-grid { grid-template-columns: 1fr; }
  .welcome-left { padding: 1.25rem; }
  .welcome-right { padding: 1rem; min-height: auto; }
  .welcome-right .id-card { font-size: 0.8rem; }
  .welcome-right .id-card-body { padding: 0.75rem 1rem; gap: 0.75rem; }
  .welcome-right .id-card-header { padding: 0.65rem 1rem; }
  .welcome-right .id-card-footer { padding: 0.5rem 1rem; }
  .welcome-right .id-card-avatar { width: 45px; height: 45px; font-size: 1rem; }
  .welcome-right .id-card-name { font-size: 0.9rem; }
  .welcome-right .id-card-code { font-size: 0.8rem; }
  .home-bottom-grid { grid-template-columns: 1fr; }
}

/* ===== Polls / Voting ===== */
.home-hero-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  margin-top: 1.5rem;
  align-items: start;
}

@media (max-width: 768px) {
  .home-hero-grid { grid-template-columns: 1fr; }
}

.active-poll-card {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: left;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
}

.active-poll-card h4 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.active-poll-card .poll-desc {
  font-size: 0.8rem;
  opacity: 0.85;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.active-poll-card .poll-dates {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-bottom: 0.75rem;
}

.active-poll-card .poll-user-status {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius);
}

.poll-user-status.not-voted { background: rgba(231,76,60,0.2); color: #ff9090; }
.poll-user-status.voted { background: rgba(39,174,96,0.2); color: #6ddb9c; }

.active-poll-card .btn { width: 100%; justify-content: center; }

/* Poll detail page */
.poll-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--primary-light);
}

.poll-card.closed { border-left-color: var(--text-light); opacity: 0.85; }

.poll-card h3 { font-size: 1.1rem; margin-bottom: 0.25rem; }

.poll-card .poll-meta {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

/* Voting options */
.vote-options { margin: 1rem 0; }

.vote-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.vote-option:hover { border-color: var(--primary-light); background: var(--bg); }
.vote-option.selected { border-color: var(--primary-light); background: rgba(44,95,138,0.08); }

.vote-option input[type="radio"],
.vote-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-light);
  cursor: pointer;
}

.vote-option label {
  flex: 1;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
}

/* Results bars */
.result-bar-wrapper {
  margin-bottom: 0.75rem;
}

.result-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.result-bar-label .count { font-weight: 700; color: var(--primary-light); }

.result-bar {
  height: 24px;
  background: var(--bg);
  border-radius: 12px;
  overflow: hidden;
}

.result-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 12px;
  transition: width 0.5s ease;
  min-width: 2px;
}

/* ===== Vote Selection Page ===== */
.vote-warning-bar {
  background: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
  border-radius: var(--radius);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

[data-theme="dark"] .vote-warning-bar {
  background: #3a3010;
  color: #f0d060;
  border-color: #5a4a1a;
}

.vote-warning-bar .warn-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 0.1rem; }

.candidate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.candidate-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 2px solid transparent;
}

.candidate-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.candidate-card.selected {
  border-color: var(--primary-light);
  background: rgba(44,95,138,0.05);
}

[data-theme="dark"] .candidate-card.selected {
  background: rgba(74,158,255,0.08);
}

.candidate-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.candidate-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.candidate-category {
  font-size: 0.8rem;
  color: var(--primary-light);
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.candidate-subcategory {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.candidate-actions {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.candidate-actions .btn { flex: 1; justify-content: center; }

/* Confirm vote modal */
.confirm-vote-candidate {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
}

.confirm-vote-candidate .candidate-avatar {
  width: 48px;
  height: 48px;
  font-size: 1.1rem;
  margin-bottom: 0;
}

/* Candidate detail page */
.candidate-detail-header {
  text-align: center;
  padding: 2rem 1rem;
}

.candidate-detail-header .candidate-avatar {
  width: 80px;
  height: 80px;
  font-size: 2rem;
  margin: 0 auto 1rem;
}

@media (max-width: 480px) {
  .candidate-grid { grid-template-columns: 1fr; }
}

/* ===== Alumni Directory ===== */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.alumni-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}
.alumni-card:hover {
  box-shadow: var(--shadow);
}
.alumni-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.15rem;
}
.alumni-code {
  font-size: 0.8rem;
  font-family: monospace;
  color: var(--primary-light);
  margin-bottom: 0.5rem;
}
.alumni-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ===== Donation form — commitment + amount selection ===== */
.commitment-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.commitment-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.75rem 0.5rem;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text);
  font-family: inherit;
}
.commitment-btn:hover {
  border-color: var(--primary-light);
  background: var(--bg);
}
.commitment-btn.active {
  border-color: var(--primary);
  background: rgba(30, 58, 95, 0.08);
  color: var(--primary);
}
.commitment-btn .commitment-icon {
  font-size: 1.35rem;
  line-height: 1;
}
.commitment-btn .commitment-label {
  font-size: 0.85rem;
  font-weight: 600;
}

.amount-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
.amount-btn {
  padding: 0.75rem 0.5rem;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}
.amount-btn:hover {
  border-color: var(--primary-light);
  background: var(--bg);
}
.amount-btn.active {
  border-color: var(--accent);
  background: rgba(240, 180, 41, 0.12);
  color: var(--primary);
}
.amount-btn[data-amount="other"] {
  grid-column: span 2;
  font-weight: 500;
  color: var(--text-light);
}
.amount-btn[data-amount="other"].active {
  color: var(--primary);
}
@media (max-width: 480px) {
  .commitment-options { grid-template-columns: 1fr; }
  .amount-options { grid-template-columns: 1fr; }
  .amount-btn[data-amount="other"] { grid-column: span 1; }
}

/* ===== Donations ===== */
.donation-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 900px) {
  .donation-summary { grid-template-columns: 1fr 1fr; }
}

.donation-group {
  padding: 0.85rem 1rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-bg);
}
.donation-group-confirmed {
  background: linear-gradient(180deg, rgba(39,174,96,0.06) 0%, var(--card-bg) 70%);
  border-color: rgba(39,174,96,0.25);
}
.donation-group-pending {
  background: linear-gradient(180deg, rgba(243,156,18,0.07) 0%, var(--card-bg) 70%);
  border-color: rgba(243,156,18,0.28);
}
[data-theme="dark"] .donation-group-confirmed {
  background: linear-gradient(180deg, rgba(46,204,113,0.10) 0%, var(--card-bg) 70%);
  border-color: rgba(46,204,113,0.28);
}
[data-theme="dark"] .donation-group-pending {
  background: linear-gradient(180deg, rgba(241,196,15,0.10) 0%, var(--card-bg) 70%);
  border-color: rgba(241,196,15,0.30);
}

.donation-group-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-light);
  margin-bottom: 0.6rem;
}
.donation-group-title .dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.donation-group-confirmed .donation-group-title { color: var(--success); }
.donation-group-confirmed .donation-group-title .dot { background: var(--success); }
.donation-group-pending .donation-group-title { color: var(--warning); }
.donation-group-pending .donation-group-title .dot { background: var(--warning); }

.donation-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
}

.donation-stat {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  text-align: center;
  border: 1px solid var(--border);
}
.donation-stat.is-confirmed {
  border-color: rgba(39,174,96,0.22);
}
.donation-stat.is-pending {
  border-color: rgba(243,156,18,0.25);
}

.donation-stat .amount {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--success);
}
.donation-stat.is-pending .amount { color: var(--warning); }

.donation-stat .label {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 0.15rem;
}

.donation-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-left: 4px solid var(--success);
}

.donation-card.pending { border-left-color: var(--warning); }
.donation-card.rejected { border-left-color: var(--danger); }

.donation-card .donation-amount {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--success);
  min-width: 120px;
}

.donation-card.pending .donation-amount { color: var(--warning); }
.donation-card.rejected .donation-amount { color: var(--danger); }

.donation-card .donation-info { flex: 1; min-width: 0; }

.donation-card .donation-info .donation-purpose {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.donation-card .donation-info .donation-meta {
  font-size: 0.8rem;
  color: var(--text-light);
}

.donation-card .donation-status-badge { flex-shrink: 0; }

/* ===== Messaging / Chat ===== */
.chat-container {
  display: flex;
  height: calc(100vh - 64px - 3rem);
  max-height: 700px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chat-sidebar {
  width: 320px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.chat-sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.chat-sidebar-header h3 { font-size: 1.1rem; margin: 0; }

.chat-search {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
}

.chat-search input {
  width: 100%;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.85rem;
  background: var(--bg);
  color: var(--text);
}

.chat-search input:focus { outline: none; border-color: var(--primary-light); }

.conv-list {
  flex: 1;
  overflow-y: auto;
}

.conv-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border);
}

.conv-item:hover { background: var(--bg); }
.conv-item.active { background: var(--bg); border-left: 3px solid var(--primary-light); }

.conv-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.conv-avatar.group { background: var(--accent); }
.conv-avatar.system { background: linear-gradient(135deg, #667eea, #764ba2); }

.conv-info { flex: 1; min-width: 0; }

.conv-name {
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.conv-name .conv-time {
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--text-light);
}

.conv-preview {
  font-size: 0.8rem;
  color: var(--text-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conv-unread {
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Chat main area */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-header {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-header h3 { font-size: 1rem; margin: 0; }
.chat-header .chat-back {
  display: none;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text);
  padding: 0.25rem;
}

.chat-header .chat-subtitle {
  font-size: 0.75rem;
  color: var(--text-light);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chat-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.9rem;
  text-align: center;
  padding: 2rem;
}

.msg-bubble {
  max-width: 75%;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
  word-wrap: break-word;
  position: relative;
}

.msg-bubble .msg-sender {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: 0.15rem;
}

.msg-bubble .msg-time {
  font-size: 0.65rem;
  color: var(--text-light);
  margin-top: 0.2rem;
  text-align: right;
}

.msg-bubble.sent {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.msg-bubble.sent .msg-time { color: rgba(255,255,255,0.6); }

.msg-bubble.received {
  align-self: flex-start;
  background: var(--bg);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

[data-theme="dark"] .msg-bubble.received { background: #0f1419; }

.msg-date-divider {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-light);
  padding: 0.5rem 0;
}

/* Chat input */
.chat-input {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.chat-input textarea {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-family: inherit;
  resize: none;
  max-height: 100px;
  line-height: 1.4;
  background: var(--bg);
  color: var(--text);
}

.chat-input textarea:focus { outline: none; border-color: var(--primary-light); }

.chat-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.chat-send-btn:hover { background: var(--primary-light); }

/* New chat modal - member selection */
.member-search-results {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 0.5rem;
}

.member-search-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 0.85rem;
}

.member-search-item:hover { background: var(--bg); }

.selected-members {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.selected-member-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.8rem;
}

.selected-member-tag .remove-member {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
  line-height: 1;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .chat-container { height: calc(100vh - 64px); max-height: none; border-radius: 0; }
  .chat-sidebar { width: 100%; }
  .chat-main { display: none; }
  .chat-container.chat-open .chat-sidebar { display: none; }
  .chat-container.chat-open .chat-main { display: flex; }
  .chat-header .chat-back { display: block; }
}

/* ===== UI Modal (custom alert/confirm) ===== */
.ui-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.ui-modal {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  animation: ui-modal-in 0.15s ease-out;
}
@keyframes ui-modal-in {
  from { transform: translateY(-8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.ui-modal-title {
  margin: 0 0 0.75rem 0;
  font-size: 1.1rem;
  color: var(--text);
}
.ui-modal-body {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  white-space: pre-wrap;
}
.ui-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* ===== Alumni avatar (photo or initials) ===== */
.alumni-avatar {
  display: inline-block;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  background: var(--bg);
}
.alumni-avatar-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ===== Global search bar ===== */
.nav-search {
  position: relative;
  margin: 0 0.5rem;
}
.nav-search input {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  width: 180px;
  transition: width 0.2s, background 0.2s;
}
.nav-search input::placeholder { color: rgba(255,255,255,0.7); }
.nav-search input:focus {
  outline: none;
  background: rgba(255,255,255,0.25);
  width: 240px;
}
.nav-search-results {
  position: absolute;
  top: 100%; left: 0; right: 0;
  margin-top: 4px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  max-height: 400px;
  overflow-y: auto;
  z-index: 120;
  display: none;
}
.nav-search-results.open { display: block; }
.nav-search-result {
  display: block;
  padding: 0.6rem 0.85rem;
  color: var(--text);
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none !important;
}
.nav-search-result:hover { background: var(--bg); }
.nav-search-result-kind {
  display: inline-block;
  font-size: 0.65rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 0.5rem;
}
@media (max-width: 900px) {
  .nav-search { display: none; }
}

/* ===== Profile photo upload preview ===== */
.photo-upload-wrap {
  position: relative;
  display: inline-block;
}
.photo-upload-wrap .photo-upload-btn {
  position: absolute;
  bottom: 0; right: 0;
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--card-bg);
  border-radius: 50%;
  width: 32px; height: 32px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
}
.photo-upload-wrap input[type="file"] { display: none; }

/* ===== Activity feed ===== */
.activity-feed .activity-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.activity-feed .activity-icon {
  width: 36px; height: 36px;
  background: var(--bg);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}
.activity-feed .activity-text { flex: 1; font-size: 0.9rem; }
.activity-feed .activity-time { font-size: 0.75rem; color: var(--text-light); margin-top: 2px; }
.activity-feed .activity-item a { color: var(--primary-light); }

/* ===== Chat Widget (Floating) ===== */
.chat-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.chat-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}
.chat-fab.widget-open {
  background: var(--text-light);
}
.chat-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #fff;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--card-bg);
  padding: 0 4px;
}

/* Navbar message badge */
.nav-msg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--danger);
  color: #fff;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 0.6rem;
  font-weight: 700;
  margin-left: 4px;
  padding: 0 3px;
  vertical-align: middle;
}

/* Chat Widget Popup */
.chat-widget-popup {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 380px;
  height: 520px;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  z-index: 141;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.chat-widget-popup.open {
  display: flex;
}
.chat-widget-header {
  padding: 0.75rem 1rem;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
}
.chat-widget-header h3 {
  margin: 0;
  font-size: 0.95rem;
  flex: 1;
}
.chat-widget-header button {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0.85;
}
.chat-widget-header button:hover {
  opacity: 1;
  background: rgba(255,255,255,0.15);
}
.chat-widget-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.chat-widget-body .conv-item {
  padding: 0.6rem 0.75rem;
}
.chat-widget-body .conv-avatar {
  width: 36px;
  height: 36px;
  font-size: 0.75rem;
}
.chat-widget-body .conv-name {
  font-size: 0.85rem;
}
.chat-widget-body .conv-preview {
  font-size: 0.75rem;
}
.chat-widget-body .msg-bubble {
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
}
.chat-widget-body .msg-sender {
  font-size: 0.65rem;
}
.chat-widget-body .msg-time {
  font-size: 0.6rem;
}
.chat-widget-body .msg-date-divider {
  font-size: 0.65rem;
}
.chat-widget-input {
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.4rem;
  align-items: flex-end;
  flex-shrink: 0;
}
.chat-widget-input textarea {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  min-height: 32px;
  max-height: 80px;
  resize: none;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
}
.chat-widget-input textarea:focus {
  outline: none;
  border-color: var(--primary-light);
}
.chat-widget-input .chat-send-btn {
  width: 32px;
  height: 32px;
  font-size: 0.9rem;
}
.chat-widget-footer-link {
  display: block;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.8rem;
  color: var(--primary-light);
  text-decoration: none;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-widget-footer-link:hover {
  background: var(--bg);
}
.chat-widget-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-light);
  font-size: 0.85rem;
  padding: 2rem;
  text-align: center;
}
.chat-widget-empty .icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Hide widget on mobile */
@media (max-width: 768px) {
  .chat-fab, .chat-widget-popup { display: none !important; }
}

/* Dark mode widget */
[data-theme="dark"] .chat-fab-badge {
  border-color: var(--card-bg);
}

/* ===== Job Portal ===== */
.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.job-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
  border-left: 4px solid var(--primary);
  cursor: pointer;
}

.job-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.job-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.job-card-company {
  font-size: 0.95rem;
  color: var(--primary-light);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.job-card-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.75rem;
  flex: 1;
}

.job-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.job-card-badges { display: flex; gap: 0.35rem; flex-wrap: wrap; }

.badge-job-type { background: #d1ecf1; color: #0c5460; }
.badge-job-remote { background: #d4edda; color: #155724; }
.badge-job-onsite { background: #e2e3e5; color: #383d41; }
.badge-job-hybrid { background: #e8daef; color: #6c3483; }
.badge-job-open { background: #d4edda; color: #155724; }
.badge-job-closed { background: #f8d7da; color: #721c24; }

.job-salary {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--success);
}

/* Job Detail */
.job-detail-header h1 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.job-detail-company { font-size: 1.1rem; color: var(--primary-light); font-weight: 600; margin-bottom: 1rem; }

.job-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.job-info-item {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}

.job-info-item label {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 0.15rem;
}

.job-info-item p { font-size: 0.95rem; font-weight: 600; }

/* Job category management */
.category-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  background: var(--bg);
  border-radius: 50px;
  font-size: 0.8rem;
  border: 1px solid var(--border);
}

.category-tag .remove-cat {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
  line-height: 1;
}

@media (max-width: 768px) {
  .jobs-grid { grid-template-columns: 1fr; }
  .job-info-grid { grid-template-columns: 1fr; }
}

/* ===== Forum Ranks ===== */
.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.55rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.rank-1 { background: #e2e3e5; color: #495057; } /* Newcomer */
.rank-2 { background: #d1ecf1; color: #0c5460; } /* Active */
.rank-3 { background: #d4edda; color: #155724; } /* Contributor */
.rank-4 { background: #e8daef; color: #6c3483; } /* Senior */
.rank-5 { background: #fdebd0; color: #af601a; } /* Veteran */
.rank-6 { background: #f8d7da; color: #721c24; } /* Elite */
.rank-7 { background: linear-gradient(135deg, #f9e547, #f0c27f); color: #7d6608; box-shadow: 0 1px 4px rgba(249,229,71,0.4); } /* Legend */

.like-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0.2rem 0.6rem;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--text-light);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.like-btn:hover { border-color: #e74c3c; color: #e74c3c; }
.like-btn.liked { border-color: #e74c3c; color: #e74c3c; background: #fdf0f0; }

.rank-id-card {
  font-size: 0.6rem;
  padding: 0.1rem 0.4rem;
  border-radius: 50px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* ===== Check-In Booth ===== */
.checkin-scanner-wrapper {
  max-width: 400px;
  margin: 0 auto 1.5rem;
}

#checkin-reader {
  border-radius: var(--radius);
  overflow: hidden;
}

#checkin-reader video {
  border-radius: var(--radius);
}

.checkin-result {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  animation: checkinSlideIn 0.3s ease;
}

@keyframes checkinSlideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.checkin-result.success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.checkin-result.duplicate {
  background: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
}

.checkin-result.error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.checkin-result .result-icon {
  font-size: 1.5rem;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.checkin-result .result-name {
  font-weight: 700;
  font-size: 1.1rem;
}

.checkin-result .result-detail {
  font-size: 0.85rem;
  margin-top: 0.25rem;
  opacity: 0.85;
}

/* Fullscreen QR viewer (alumni card QR tap to enlarge) */
.qr-fullscreen-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: qr-fullscreen-fadein 0.2s ease-out;
}
@keyframes qr-fullscreen-fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}
.qr-fullscreen-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.qr-fullscreen-close:hover {
  background: rgba(255, 255, 255, 0.3);
}
.qr-fullscreen-inner {
  text-align: center;
  max-width: 92vmin;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.qr-fullscreen-name {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: -0.25rem;
}
.qr-fullscreen-code {
  color: #f0b429;
  font-family: monospace;
  font-size: 0.95rem;
  letter-spacing: 1px;
}
.qr-fullscreen-image {
  background: #fff;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.qr-fullscreen-image img {
  display: block;
  width: min(80vmin, 520px);
  height: auto;
  max-height: 80vmin;
}
.qr-fullscreen-hint {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Make the clickable QR on alumni card show subtle interactivity */
.id-card-qr[role="button"] {
  transition: transform 0.15s;
  border-radius: 4px;
}
.id-card-qr[role="button"]:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 3px rgba(240, 180, 41, 0.5);
}
.id-card-qr[role="button"]:focus {
  outline: 2px solid #f0b429;
  outline-offset: 2px;
}

/* Check-in mode toggle buttons */
.checkin-mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 1rem 0.75rem;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  transition: all 0.15s;
  text-align: center;
}
.checkin-mode-btn:hover {
  border-color: var(--primary-light);
  background: var(--bg);
}
.checkin-mode-btn.active {
  border-color: var(--primary);
  background: rgba(30, 58, 95, 0.08);
  color: var(--primary);
}

/* Check-in guest badge */
.checkin-type-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.checkin-type-badge.alumni {
  background: rgba(30, 58, 95, 0.12);
  color: var(--primary);
}
.checkin-type-badge.guest {
  background: rgba(240, 180, 41, 0.2);
  color: #b47d0c;
}

.checkin-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.checkin-stat {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.5rem;
  text-align: center;
  flex: 1;
  min-width: 100px;
}

.checkin-stat .number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
}

.checkin-stat .label {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ===== Quill Editor Overrides ===== */
.ql-container {
  font-family: inherit;
  font-size: 0.95rem;
  border-radius: 0 0 var(--radius) var(--radius);
  border-color: var(--border);
  min-height: 120px;
}

.ql-toolbar {
  border-radius: var(--radius) var(--radius) 0 0;
  border-color: var(--border);
  background: var(--bg);
}

.ql-editor {
  min-height: 100px;
  line-height: 1.6;
}

.ql-editor.ql-blank::before {
  font-style: normal;
  color: var(--text-light);
}

.ql-editor img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 0.5rem 0;
}

/* Post body rich content */
.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 0.5rem 0;
}

.post-body ul, .post-body ol {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}

.post-body li { margin-bottom: 0.25rem; }

.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 0.5rem 0;
  color: var(--text-light);
}

.post-body pre {
  background: var(--bg);
  padding: 0.75rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.85rem;
}

.post-body a {
  color: var(--primary-light);
  text-decoration: underline;
}

.post-body h1, .post-body h2, .post-body h3 {
  margin: 0.75rem 0 0.35rem;
}

.post-body p { margin: 0.25rem 0; }

/* Modal with Quill needs more space */
.modal .ql-container { min-height: 150px; }

/* Forum breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.breadcrumb a { color: var(--primary-light); }
.breadcrumb .separator { color: var(--border); }

/* ===== Mobile Bottom Navigation ===== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  z-index: 150;
  padding: 0.4rem 0;
  padding-bottom: calc(0.4rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -2px 12px rgba(0,0,0,0.1);
}

[data-theme="dark"] .mobile-bottom-nav {
  background: #0d1117;
  border-top-color: #2a3a4a;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.4);
}

.bottom-nav-items {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  position: relative;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.65rem;
  padding: 6px 8px;
  border-radius: 8px;
  transition: all 0.15s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  min-width: 60px;
  height: 56px;              /* identical height for every slot */
  line-height: 1;
  gap: 3px;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
  color: var(--primary-light);
  text-decoration: none;
}

.bottom-nav-icon {
  font-size: 1.25rem;
  line-height: 1;
  margin: 0;
  height: 22px;               /* fixed icon row height */
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottom-nav-label {
  font-weight: 600;
  letter-spacing: 0.2px;
  line-height: 1.1;
  height: 14px;               /* fixed label row height */
  display: flex;
  align-items: center;
}

/* Center circle FAB button */
.bottom-nav-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  border: 3px solid var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  margin-top: -20px;
  box-shadow: 0 4px 15px rgba(26,58,92,0.3);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  z-index: 2;
}

[data-theme="dark"] .bottom-nav-fab {
  border-color: #0d1117;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.bottom-nav-fab:hover,
.bottom-nav-fab.open {
  transform: scale(1.05);
}

.bottom-nav-fab.open {
  transform: rotate(45deg) scale(1.05);
}

/* FAB popup menu */
.fab-menu {
  display: none;
  position: fixed;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 160;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 0.75rem;
  min-width: 200px;
  animation: fabMenuIn 0.2s ease;
}

.fab-menu.show { display: block; }

@keyframes fabMenuIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

[data-theme="dark"] .fab-menu {
  background: #1a2332;
}

.fab-menu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.15s;
}

.fab-menu-item:hover {
  background: var(--bg);
  text-decoration: none;
}

.fab-menu-item .fab-menu-icon {
  font-size: 1.2rem;
  width: 1.5rem;
  text-align: center;
}

.fab-menu-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 155;
  background: rgba(0,0,0,0.2);
}

.fab-menu-overlay.show { display: block; }


/* ===== Responsive ===== */
@media (max-width: 768px) {
  /* Show bottom nav, hide hamburger menu */
  .mobile-bottom-nav { display: block !important; }
  .hamburger { display: none !important; }
  .navbar nav { display: none !important; } /* Hide top nav links on mobile — use bottom nav instead */
  .navbar { padding: 0 1rem; }

  /* Add padding for bottom nav */
  body { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }

  /* Readability: larger base font */
  body { font-size: 17px; }

  /* Larger form controls for touch */
  .form-control {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    min-height: 44px;
  }

  /* Larger buttons for touch targets */
  .btn {
    min-height: 44px;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
  }

  .btn-sm {
    min-height: 38px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  /* Larger badges on mobile */
  .badge { font-size: 0.8rem; padding: 0.25rem 0.7rem; }

  /* Better table readability */
  table { font-size: 0.85rem; }
  table th, table td { padding: 0.65rem 0.75rem; }

  /* Hero */
  .hero h1 { font-size: 1.75rem; }
  .hero p { font-size: 1rem; }
  .hero { padding: 2rem 1rem; }

  .stats { gap: 0.75rem; }
  .stat-card { min-width: 100px; padding: 0.85rem 0.5rem; }
  .stat-card .number { font-size: 1.5rem; }
  .stat-card .label { font-size: 0.8rem; }

  .form-row { grid-template-columns: 1fr; }
  .profile-details { grid-template-columns: 1fr; }
  .container { padding: 1rem; }
  .search-bar { flex-direction: column; }
  .search-bar select.form-control { flex: 1; }
  .search-bar .form-control { min-width: unset; }
  .directory-grid { grid-template-columns: 1fr; }
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tab { padding: 0.65rem 1rem; font-size: 0.85rem; white-space: nowrap; }

  /* Cards spacing */
  .card { padding: 1.25rem; margin-bottom: 1rem; }
  .card-header h2 { font-size: 1.1rem; }

  /* Modal */
  .modal { width: 95%; padding: 1.25rem; max-height: 85vh; }

  /* Chat adjustments */
  .chat-container { height: calc(100vh - 64px - 80px); }

  /* Alumni card */
  .id-card { max-width: 100%; }

  /* Donation payment info grid - stack on mobile */
  #payment-info [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.3rem; }
  .hero p { font-size: 0.9rem; }
  .stat-card .number { font-size: 1.3rem; }
  .modal { width: 98%; padding: 1rem; }

  /* Even larger touch targets */
  .form-control { padding: 0.85rem 1rem; }
  .btn { font-size: 1rem; }
}

/* ============================================================
   CHECK-IN FULLSCREEN OVERLAY (scanner + guest QR)
   ============================================================ */
.checkin-fs-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: #0b1a2e;
  color: #fff;
  display: flex; flex-direction: column;
  overflow: auto;
}
.checkin-fs-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(135deg, #1e3a5f 0%, #122740 100%);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.checkin-fs-brand { display: flex; align-items: center; gap: 0.85rem; }
.checkin-fs-brand img { width: 44px; height: 44px; object-fit: contain; }
.checkin-fs-brand-title {
  font-size: 0.95rem; font-weight: 700; letter-spacing: 0.3px;
  color: #fff;
}
.checkin-fs-brand-title span { color: #f4c430; }
.checkin-fs-event-title {
  font-size: 1.1rem; font-weight: 700; color: #fff; margin-top: 2px;
  max-width: 70vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.checkin-fs-event-meta { font-size: 0.78rem; color: #b8c8de; margin-top: 1px; }
.checkin-fs-close {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  color: #fff; font-size: 1.2rem; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.checkin-fs-close:hover { background: rgba(255,255,255,0.2); }

/* Scanner body */
.checkin-fs-scan-body {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; padding: 1rem;
  gap: 1rem; max-width: 720px; margin: 0 auto; width: 100%;
}
.checkin-fs-scan-wrap {
  width: 100%; max-width: 480px;
  background: #000; border-radius: 12px; overflow: hidden;
  border: 2px solid rgba(255,255,255,0.15);
}
#checkin-fs-reader { width: 100%; min-height: 300px; }
#checkin-fs-reader video { width: 100% !important; height: auto !important; display: block; }
.checkin-fs-hint {
  text-align: center; font-size: 0.85rem; color: #b8c8de;
  padding: 0.75rem;
}
.checkin-fs-manual {
  width: 100%; max-width: 480px;
  background: rgba(255,255,255,0.05); border-radius: 8px; padding: 0.85rem;
}
.checkin-fs-result {
  display: none; width: 100%; max-width: 480px;
  padding: 1rem 1.25rem; border-radius: 10px;
  align-items: center; gap: 0.85rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.checkin-fs-result.show { display: flex; }
.checkin-fs-result.success { background: #1f7a3d; color: #fff; border: 2px solid #34d06c; }
.checkin-fs-result.duplicate { background: #b88a00; color: #fff; border: 2px solid #ffc94a; }
.checkin-fs-result.error { background: #a02030; color: #fff; border: 2px solid #ff5070; }
.checkin-fs-result .result-icon { font-size: 2.2rem; line-height: 1; }
.checkin-fs-result .result-name { font-size: 1.1rem; font-weight: 700; }
.checkin-fs-result .result-detail { font-size: 0.85rem; opacity: 0.95; margin-top: 2px; }
.checkin-fs-stats {
  display: flex; gap: 1.5rem; color: #b8c8de; font-size: 0.9rem;
}
.checkin-fs-stats strong { color: #f4c430; font-size: 1.4rem; }

/* Guest QR body */
.checkin-fs-guest-body {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 1rem 1.5rem 2rem; gap: 0.75rem;
  text-align: center;
}
.checkin-fs-guest-title { font-size: 1.8rem; font-weight: 700; color: #fff; }
.checkin-fs-guest-sub { font-size: 1rem; color: #b8c8de; margin-bottom: 1rem; }
.checkin-fs-guest-qr {
  background: #fff; padding: 1.25rem; border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.checkin-fs-guest-qr img {
  display: block;
  width: min(70vh, 80vw); height: auto; max-width: 560px;
}
.checkin-fs-guest-url {
  margin-top: 1rem; font-family: monospace; font-size: 0.8rem;
  color: #b8c8de; word-break: break-all; max-width: 90vw;
}

@media (max-width: 600px) {
  .checkin-fs-header { padding: 0.6rem 0.85rem; }
  .checkin-fs-brand img { width: 36px; height: 36px; }
  .checkin-fs-brand-title { font-size: 0.85rem; }
  .checkin-fs-event-title { font-size: 0.95rem; max-width: 60vw; }
  .checkin-fs-close { width: 38px; height: 38px; }
  .checkin-fs-guest-title { font-size: 1.3rem; }
  .checkin-fs-guest-sub { font-size: 0.9rem; }
}

/* ============================================================
   EMAIL VERIFICATION REMINDER BANNER
   ============================================================ */
.email-verify-banner {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.65rem 1.25rem;
  background: linear-gradient(90deg, #fff3cd 0%, #ffeaa0 100%);
  color: #5a4500;
  border-bottom: 1px solid #f0c94a;
  font-size: 0.9rem;
  flex-wrap: wrap;
  position: sticky; top: 0; z-index: 90;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.email-verify-banner .evb-icon { font-size: 1.1rem; }
.email-verify-banner .evb-text { flex: 1; min-width: 200px; line-height: 1.4; }
.email-verify-banner .evb-email {
  font-family: monospace; background: rgba(255,255,255,0.55);
  padding: 1px 6px; border-radius: 4px; margin: 0 3px;
}
.email-verify-banner .evb-resend {
  flex-shrink: 0;
  background: #fff; border-color: #c5a300; color: #5a4500;
}
.email-verify-banner .evb-resend:hover:not(:disabled) {
  background: #5a4500; color: #fff; border-color: #5a4500;
}
.email-verify-banner .evb-resend:disabled { opacity: 0.7; cursor: default; }

@media (max-width: 600px) {
  .email-verify-banner {
    padding: 0.6rem 0.85rem; font-size: 0.8rem;
    position: static;
  }
  .email-verify-banner .evb-text { min-width: 0; width: 100%; }
  .email-verify-banner .evb-resend { margin-left: auto; }
}

/* Dark theme */
html[data-theme="dark"] .email-verify-banner {
  background: linear-gradient(90deg, #3a2e0b 0%, #4a3a10 100%);
  color: #ffe08a;
  border-bottom-color: #8a6a00;
}
html[data-theme="dark"] .email-verify-banner .evb-email { background: rgba(0,0,0,0.3); color: #fff4c4; }
html[data-theme="dark"] .email-verify-banner .evb-resend {
  background: transparent; color: #ffe08a; border-color: #ffe08a;
}
html[data-theme="dark"] .email-verify-banner .evb-resend:hover:not(:disabled) {
  background: #ffe08a; color: #2a2100;
}

/* ============================================================
   PROFILE AVATAR — click-to-change hint + camera overlay
   ============================================================ */
.avatar-clickable { position: relative; transition: transform 0.15s, box-shadow 0.15s; }
.avatar-clickable:hover { transform: scale(1.03); box-shadow: 0 6px 18px rgba(0,0,0,0.18); }
.avatar-clickable:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.avatar-hint {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-light, #6c7a89);
  margin: 0.4rem 0 0.6rem;
  font-style: italic;
}

/* Directory card avatar */
.alumni-card-avatar {
  display: flex; justify-content: center;
  margin-bottom: 0.6rem;
}
.alumni-card-avatar img.alumni-avatar,
.alumni-card-avatar .alumni-avatar-initials {
  width: 72px !important; height: 72px !important;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #1e3a5f 0%, #2b5a8f 100%);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.5rem;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
html[data-theme="dark"] .alumni-card-avatar img.alumni-avatar,
html[data-theme="dark"] .alumni-card-avatar .alumni-avatar-initials {
  border-color: #1a2638;
}

/* ============================================================
   PHOTO CROPPER (1:1)
   ============================================================ */
.photo-crop-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(10, 20, 35, 0.85);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.photo-crop-modal {
  background: var(--card-bg, #fff);
  border-radius: 12px;
  width: 100%; max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  color: var(--text, #111);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.photo-crop-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.photo-crop-header h3 { margin: 0; font-size: 1rem; }
.photo-crop-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: transparent; border: 1px solid var(--border, #e5e7eb);
  cursor: pointer; font-size: 0.9rem; color: inherit;
}
.photo-crop-close:hover { background: var(--bg, #f5f5f5); }
.photo-crop-stage {
  padding: 1rem;
  background: #0b1a2e;
}
.photo-crop-canvas-wrap {
  position: relative;
  width: 100%; aspect-ratio: 1 / 1;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  cursor: grab;
}
.photo-crop-canvas-wrap:active { cursor: grabbing; }
.photo-crop-img {
  position: absolute;
  top: 50%; left: 50%;
  max-width: none; max-height: none;
  pointer-events: auto;
  -webkit-user-drag: none;
}
.photo-crop-mask {
  position: absolute; inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.9);
  border-radius: 50%;
  outline: 9999px solid rgba(0,0,0,0.45);
  outline-offset: -9999px;
}
.photo-crop-controls {
  padding: 0.85rem 1.1rem 0.5rem;
}
.photo-crop-zoom-label {
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.85rem; color: var(--text-light, #6c7a89);
}
.photo-crop-zoom { flex: 1; }
.photo-crop-hint {
  margin-top: 0.4rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-light, #6c7a89);
}
.photo-crop-actions {
  display: flex; justify-content: flex-end; gap: 0.5rem;
  padding: 0.85rem 1.1rem 1.1rem;
  border-top: 1px solid var(--border, #e5e7eb);
  background: var(--bg, #f7f8fa);
}
html[data-theme="dark"] .photo-crop-modal { background: #1a2638; color: #e0e7ef; }
html[data-theme="dark"] .photo-crop-header,
html[data-theme="dark"] .photo-crop-actions { border-color: #2a3a52; }
html[data-theme="dark"] .photo-crop-actions { background: #0f1e33; }

/* ============================================================
   MASTER ADMIN BADGES
   ============================================================ */
.badge-master {
  background: linear-gradient(135deg, #4b2a86 0%, #6b3fb8 100%);
  color: #fff;
  border: 1px solid #3a1d6b;
  font-weight: 700;
  letter-spacing: 0.3px;
}
[data-theme="dark"] .badge-master {
  background: linear-gradient(135deg, #5a3a9e 0%, #7d50d0 100%);
  color: #fff;
  border-color: #6b3fb8;
}
.id-card-admin-badge.master {
  background: linear-gradient(135deg, #4b2a86 0%, #d4af37 100%);
  color: #fff;
  border: 1px solid #3a1d6b;
  font-weight: 800;
  box-shadow: 0 1px 4px rgba(75,42,134,0.35);
}

/* ============================================================
   ACTION DROPDOWN (verified tab row menu)
   ============================================================ */
.action-dropdown { position: relative; display: inline-block; }
.action-dropdown-toggle { font-size: 0.78rem; padding: 0.35rem 0.7rem; }
.action-dropdown .action-menu {
  position: absolute;
  top: 100%; right: 0;
  margin-top: 4px;
  min-width: 200px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  padding: 4px;
  z-index: 200;      /* above navbar (z-100) and table rows */
  display: none;
}
.action-dropdown.open .action-menu { display: block; }
.action-menu-item {
  display: block;
  width: 100%;
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  color: var(--text, #222);
  border-radius: 4px;
}
.action-menu-item:hover { background: var(--bg, #f4f6f8); }
.action-menu-item.danger { color: #b3261e; }
.action-menu-item.danger:hover { background: #fdecea; }
.action-menu-divider {
  height: 1px; background: var(--border, #e5e7eb); margin: 4px 0;
}
[data-theme="dark"] .action-dropdown .action-menu { background: #1a2638; border-color: #2a3a52; color: #e0e7ef; }
[data-theme="dark"] .action-menu-item { color: #e0e7ef; }
[data-theme="dark"] .action-menu-item:hover { background: #25324a; }
[data-theme="dark"] .action-menu-item.danger { color: #ff8a80; }
[data-theme="dark"] .action-menu-item.danger:hover { background: rgba(255,138,128,0.12); }

/* Optional field tag in registration forms */
.optional-tag {
  color: var(--text-light, #6c7a89);
  font-weight: 400;
  font-size: 0.8em;
  font-style: italic;
}

/* LinkedIn chip on directory card */
.alumni-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  background: #0a66c2;
  text-decoration: none;
  border: 1px solid #0a5aad;
  width: fit-content;
}
.alumni-linkedin:hover { background: #084a8f; color: #fff; }
.alumni-linkedin svg { flex-shrink: 0; }

/* Sortable column headers (verified tab) */
#panel-verified th.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
}
#panel-verified th.sortable:hover { background: rgba(255,255,255,0.08); }
#panel-verified th.sortable .sort-arrow {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.75em;
  color: var(--accent, #f4c430);
  min-width: 10px;
}
#panel-verified th.sortable.sorted { background: rgba(244,196,48,0.08); }

/* Batch position badge */
.badge-position {
  background: #ede3ff;
  color: #4b2a86;
  border: 1px solid #c9b4ee;
  font-weight: 600;
}
[data-theme="dark"] .badge-position {
  background: rgba(123,80,200,0.18);
  color: #d0b8ff;
  border-color: rgba(123,80,200,0.45);
}

/* ============================================================
   ADMIN DASHBOARD — unified filters + compact verified table
   ============================================================ */
.admin-filters-card {
  margin-bottom: 1.25rem;
}
.admin-filters-grid {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(2, minmax(140px, 1fr)) repeat(2, minmax(160px, 1fr)) auto;
  gap: 0.5rem;
  align-items: center;
}
@media (max-width: 900px) {
  .admin-filters-grid { grid-template-columns: 1fr 1fr; }
  .admin-filters-grid > input[type="text"] { grid-column: span 2; }
  .admin-filters-grid > button { grid-column: span 2; }
}

/* Verified tab compact table */
.verified-compact-table {
  table-layout: fixed;
  width: 100%;
  font-size: 0.82rem;
}
.verified-compact-table th,
.verified-compact-table td {
  padding: 0.45rem 0.55rem;
  vertical-align: middle;
  overflow: hidden;
}
/* Action cell must NOT clip — dropdown menu needs to overflow out of it */
.verified-compact-table .col-actions { overflow: visible; }

.verified-compact-table .col-check    { width: 32px; }
.verified-compact-table .col-code     { width: 110px; }
.verified-compact-table .col-member   { width: auto; min-width: 160px; }
.verified-compact-table .col-academic { width: auto; min-width: 160px; }
.verified-compact-table .col-admin    { width: 110px; text-align: center; }
.verified-compact-table .col-position { width: 115px; text-align: center; }
.verified-compact-table .col-verified { width: 92px; white-space: nowrap; font-size: 0.76rem; color: var(--text-light); }
.verified-compact-table .col-actions  { width: 110px; text-align: right; }

.verified-compact-table .cell-primary {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.verified-compact-table .cell-secondary {
  font-size: 0.72rem;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.verified-compact-table .badge {
  white-space: nowrap;
}

/* ============================================================
   COMMITMENT ACHIEVEMENT DASHBOARD
   ============================================================ */
.achievement-dashboard { margin-bottom: 1.5rem; }
.achievement-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.85rem;
}
.achievement-header h2 { margin: 0; }
.achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}
.achievement-card {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}
.achievement-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.achievement-title {
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
}
.achievement-pct {
  font-weight: 800;
  color: var(--primary);
  font-size: 1.05rem;
  white-space: nowrap;
}
.achievement-bar {
  position: relative;
  height: 14px;
  background: rgba(0,0,0,0.07);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.achievement-bar .bar-combined,
.achievement-bar .bar-confirmed {
  position: absolute; inset: 0 auto 0 0;
  height: 100%;
  transition: width 0.4s ease;
  border-radius: 999px;
}
.achievement-bar .bar-combined {
  background: rgba(243, 156, 18, 0.55); /* amber = confirmed+pending ghost */
}
.achievement-bar .bar-confirmed {
  background: var(--success); /* solid green = confirmed */
}
.achievement-nums {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
}
.achievement-nums .dot {
  display: inline-block;
  width: 9px; height: 9px; border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.achievement-nums .num-confirmed .dot { background: var(--success); }
.achievement-nums .num-pending .dot { background: var(--warning); }
.achievement-nums small { color: var(--text-light); font-size: 0.72rem; margin-left: 2px; }
.achievement-target {
  font-size: 0.78rem;
  color: var(--text-light);
}

[data-theme="dark"] .achievement-bar { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .achievement-card { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.08); }

/* Payment info modal — collapse grid on narrow screens */
@media (max-width: 560px) {
  .payment-info-grid { grid-template-columns: 1fr !important; }
}

/* ============================================================
   COMMITMENT GOAL CARDS — graphical redesign (donut + compact)
   ============================================================ */
.achievement-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)) !important;
}
.goal-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  transition: transform 0.15s, box-shadow 0.15s;
}
.goal-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.08); }
.goal-card.reached {
  background: linear-gradient(135deg, rgba(39,174,96,0.10) 0%, var(--bg) 70%);
  border-color: rgba(39,174,96,0.40);
}

/* Donut */
.goal-donut {
  position: relative;
  width: 96px; height: 96px;
  flex-shrink: 0;
}
.goal-svg {
  width: 100%; height: 100%;
  transform: rotate(-90deg);
}
.goal-svg circle {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dasharray 0.6s ease;
}
.goal-track    { stroke: rgba(0,0,0,0.06); }
.goal-pending  { stroke: var(--warning); opacity: 0.55; }
.goal-confirmed{ stroke: var(--success); }
.goal-pct-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  pointer-events: none;
}
.goal-pct-big {
  font-size: 1.45rem; font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.goal-pct-big span { font-size: 0.7rem; font-weight: 700; color: var(--text-light); margin-left: 1px; }
.goal-badge {
  margin-top: 2px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: var(--success);
  background: rgba(39,174,96,0.15);
  padding: 1px 6px;
  border-radius: 999px;
}

/* Body */
.goal-body {
  flex: 1;
  min-width: 0;
}
.goal-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.goal-target-line {
  font-size: 0.82rem;
  margin-top: 2px;
  color: var(--text-light);
  white-space: nowrap;
}
.goal-collected { font-weight: 800; color: var(--text); }
.goal-sep { margin: 0 4px; opacity: 0.6; }
.goal-target { font-weight: 600; }

.goal-legend {
  display: flex; gap: 0.45rem; flex-wrap: wrap;
  margin-top: 0.5rem;
}
.legend-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.04);
  font-weight: 600;
  color: var(--text);
}
.legend-chip .dot {
  width: 7px; height: 7px; border-radius: 50%;
}
.legend-chip.confirmed .dot { background: var(--success); }
.legend-chip.pending .dot { background: var(--warning); }

[data-theme="dark"] .goal-card { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .goal-card.reached {
  background: linear-gradient(135deg, rgba(46,204,113,0.15) 0%, rgba(255,255,255,0.03) 70%);
  border-color: rgba(46,204,113,0.45);
}
[data-theme="dark"] .goal-track { stroke: rgba(255,255,255,0.08); }
[data-theme="dark"] .legend-chip { background: rgba(255,255,255,0.06); }

/* ============================================================
   COMMITMENT GOAL CARDS — two columns + clearer legend + collapse
   ============================================================ */
/* Override earlier auto-fit — exactly 2 cards per row on desktop */
.achievement-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 1rem !important;
}
@media (max-width: 600px) {
  .achievement-grid { grid-template-columns: 1fr !important; }
}

/* Legend chip label text visible next to dot */
.legend-chip .lbl {
  font-weight: 700;
  color: var(--text);
  margin-right: 2px;
}
.legend-chip.confirmed .lbl { color: var(--success); }
.legend-chip.pending   .lbl { color: var(--warning); }

/* Collapse / expand toggle (pill button with label + arrow) */
.goal-toggle {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.goal-toggle:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.goal-toggle .goal-toggle-label { line-height: 1; }
.goal-toggle .goal-toggle-arrow {
  display: inline-block;
  transition: transform 0.25s ease;
  font-size: 0.8rem;
  line-height: 1;
}
.goal-toggle[aria-expanded="false"] .goal-toggle-arrow {
  transform: rotate(-90deg);
}

/* Summary (collapsed state) */
.achievement-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0.9rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  flex-wrap: wrap;
}
.achievement-summary .summary-text {
  font-size: 0.88rem;
  color: var(--text);
  flex: 1;
  min-width: 200px;
}
.achievement-summary .summary-text strong { color: var(--primary); }
.achievement-summary .summary-bar {
  position: relative;
  height: 10px;
  min-width: 180px;
  flex: 1;
  background: rgba(0,0,0,0.06);
  border-radius: 999px;
  overflow: hidden;
}
.achievement-summary .bar-combined,
.achievement-summary .bar-confirmed {
  position: absolute; inset: 0 auto 0 0;
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}
.achievement-summary .bar-combined { background: rgba(243,156,18,0.55); }
.achievement-summary .bar-confirmed { background: var(--success); }

[data-theme="dark"] .achievement-summary { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .achievement-summary .summary-bar { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .goal-toggle { background: var(--card-bg); border-color: rgba(255,255,255,0.12); }

/* Community popup — positioned above the Community button (right side) */
.fab-menu.community-menu {
  left: auto;
  right: 8px;
  transform: translateY(20px) scale(0.95);
  transform-origin: bottom right;
  min-width: 200px;
}
.fab-menu.community-menu.show {
  transform: translateY(0) scale(1);
}
/* Button bottom-nav items should render identically to anchor ones
   (UA adds subtle baseline/inline differences that .bottom-nav-item's
   flex-column layout already neutralizes). Just ensure no stray defaults. */
.mobile-bottom-nav button.bottom-nav-item {
  appearance: none;
  -webkit-appearance: none;
  outline-offset: 2px;
}

/* ============================================================
   PWA INSTALL FLOATING BUTTON
   ============================================================ */
.pwa-install-btn {
  position: fixed;
  right: 24px;
  /* Chat FAB is at bottom:24px, 56px tall → sits up to bottom:80px.
     Stack Install above it with a comfortable gap. */
  bottom: 92px;
  z-index: 120;
  padding: 0.55rem 0.95rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.82rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.2s;
}
.pwa-install-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(0,0,0,0.3);
}
.pwa-install-btn:disabled { opacity: 0.6; cursor: default; }
.pwa-install-btn span { display: inline; }

@media (max-width: 600px) {
  /* Above the mobile bottom nav (~72px tall) and above chat FAB (bottom:80px on mobile) */
  .pwa-install-btn { bottom: 150px; right: 12px; padding: 0.5rem 0.85rem; font-size: 0.78rem; }
  .pwa-install-btn span { display: inline; }
}

/* Profile popup — positioned above the Profile button (far right) */
.fab-menu.profile-menu {
  left: auto;
  right: 8px;
  transform: translateY(20px) scale(0.95);
  transform-origin: bottom right;
  min-width: 220px;
}
.fab-menu.profile-menu.show {
  transform: translateY(0) scale(1);
}

/* Scroll-to-top floating button — stacks above Install App */
.scroll-top-btn {
  position: fixed;
  right: 24px;
  bottom: 154px;     /* above Install (bottom:92) + its ~46px height + gap */
  z-index: 115;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card-bg);
  color: var(--primary);
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.scroll-top-btn.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.scroll-top-btn:hover { background: var(--primary); color: #fff; }

/* Mobile: stack above Install btn which itself stacks above the mobile bottom nav */
@media (max-width: 600px) {
  .scroll-top-btn { bottom: 208px; right: 12px; width: 40px; height: 40px; font-size: 1rem; }
}

/* ============================================================
   ALUMNI CARD — mobile fix: stack QR below info instead of beside
   ============================================================ */
@media (max-width: 600px) {
  .id-card .id-card-body {
    display: grid;
    grid-template-columns: 70px 1fr;
    grid-template-areas:
      "avatar info"
      "qr     qr";
    row-gap: 0.85rem;
    column-gap: 1rem;
    padding: 1rem 1.1rem;
    align-items: start;
  }
  .id-card .id-card-body .id-card-avatar { grid-area: avatar; }
  .id-card .id-card-body .id-card-info   { grid-area: info; }
  .id-card .id-card-body .id-card-qr {
    grid-area: qr;
    justify-self: center;
    padding: 6px;
  }
  .id-card .id-card-body .id-card-qr img,
  .id-card .id-card-body .id-card-qr canvas {
    width: 100px !important; height: 100px !important;
  }
  .id-card-detail { flex-wrap: wrap; }
  .id-card-detail span:first-child { min-width: 65px; }
}

/* ============================================================
   ADMIN — verified table mobile fix
   Unfix the table-layout on small screens so all columns stay
   visible and the wrapper scrolls horizontally instead.
   ============================================================ */
@media (max-width: 800px) {
  .verified-compact-table {
    table-layout: auto !important;
    min-width: 880px;           /* keeps columns readable */
  }
  .verified-compact-table .col-member,
  .verified-compact-table .col-academic {
    min-width: 180px;
  }
  .verified-compact-table .cell-primary,
  .verified-compact-table .cell-secondary {
    white-space: normal;        /* let long names wrap instead of hiding */
  }
  .verified-compact-table .col-actions {
    position: sticky;
    right: 0;
    background: var(--card-bg);
    box-shadow: -4px 0 6px -3px rgba(0,0,0,0.08);
  }
}

/* Scroll hint for users who aren't sure the table scrolls */
@media (max-width: 800px) {
  #panel-verified .table-wrapper::after {
    content: '← swipe to see more →';
    display: block;
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-light);
    padding: 0.3rem 0;
    font-style: italic;
  }
}

/* ============================================================
   COMMITMENT GOALS — mobile overflow fix
   ============================================================ */
@media (max-width: 600px) {
  /* Parent card: tighter padding so the grid has more room */
  .card.achievement-dashboard {
    padding: 0.85rem 0.85rem 1rem !important;
    overflow: hidden;
  }

  /* Header stacks cleanly; the toggle button hugs the right */
  .achievement-header {
    gap: 0.35rem;
  }
  .achievement-header h2 { font-size: 0.95rem; }

  /* Goal card: smaller donut + reflow text so nothing overflows */
  .goal-card {
    gap: 0.65rem;
    padding: 0.7rem 0.75rem;
  }
  .goal-donut {
    width: 74px;
    height: 74px;
  }
  .goal-pct-big { font-size: 1.15rem; }
  .goal-pct-big span { font-size: 0.62rem; }

  .goal-body { overflow: hidden; }
  .goal-name {
    font-size: 0.88rem;
    white-space: normal;        /* allow wrap on long purpose names */
    word-break: break-word;
  }
  .goal-target-line {
    font-size: 0.78rem;
    white-space: normal;         /* was nowrap — was causing overflow */
    word-break: break-word;
  }
  .goal-legend { gap: 0.3rem; }
  .legend-chip {
    font-size: 0.68rem;
    padding: 2px 6px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Collapsed summary — keep on one or two lines without overflow */
  .achievement-summary {
    padding: 0.55rem 0.75rem;
    gap: 0.6rem;
  }
  .achievement-summary .summary-text {
    font-size: 0.82rem;
    min-width: 0;
    flex: 1 1 100%;
    word-break: break-word;
  }
  .achievement-summary .summary-bar {
    min-width: 0;
    flex: 1 1 100%;
    height: 8px;
  }

  /* Toggle button slightly tighter on mobile */
  .goal-toggle { padding: 4px 10px; font-size: 0.72rem; }
}

@media (max-width: 380px) {
  .goal-card {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }
  .goal-body { flex: 1 1 100%; min-width: 0; }
  .goal-legend { justify-content: center; }
}

/* Admins tab — keep role/position badges on a single line (match Verified tab style) */
#panel-admins table td .badge,
#panel-admins table th {
  white-space: nowrap;
}
#panel-admins table td {
  white-space: nowrap;
}
/* Give role + position columns enough width */
#panel-admins table thead th:nth-child(4),
#panel-admins table tbody td:nth-child(4) { min-width: 130px; }   /* Admin Role */
#panel-admins table thead th:nth-child(5),
#panel-admins table tbody td:nth-child(5) { min-width: 115px; }   /* Position */
