/* =============================================
   URTIM Akademi - Pages
   Trainings, Internship, Profile
   ============================================= */

/* ---- Common Page Header ---- */
.page-header {
  background: var(--gradient-primary);
  padding: calc(var(--navbar-height) + var(--space-3xl)) 0 var(--space-3xl);
  position: relative;
  overflow: hidden;
  text-align: center;
  color: var(--text-inverse);
}

.page-header--compact {
  padding: calc(var(--navbar-height) + var(--space-xl)) 0 var(--space-xl);
}

.page-header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.page-header .floating-shapes .floating-shape {
  background: rgba(255, 255, 255, 0.1);
}

.page-header .badge {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-inverse);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-header h1 {
  color: var(--text-inverse);
  margin-bottom: var(--space-md);
}

.page-header p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* =============================================
   TRAININGS PAGE
   ============================================= */
.trainings-section {
  padding-bottom: var(--space-4xl);
}

/* ---- Filter Bar (z-index stacking) ---- */
.filter-bar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

.filter-bar-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.filter-bar-right {
  font-size: 0.88rem;
  color: var(--text-light);
  font-weight: 600;
}

/* Dropdowns */
.filter-dropdown {
  position: relative;
}

.filter-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.filter-dropdown-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-arrow {
  font-size: 0.65rem;
  transition: transform 0.2s;
}

.filter-dropdown.open .filter-arrow {
  transform: rotate(180deg);
}

.filter-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: var(--space-sm);
  z-index: 50;
  display: none;
  animation: fadeIn 0.15s ease;
}

/* Mega-menu variant for category dropdown */
.filter-dropdown-menu--mega {
  min-width: 380px;
  max-width: 460px;
  max-height: 420px;
  overflow-y: auto;
  padding: var(--space-md);
}

.filter-group {
  margin-bottom: var(--space-md);
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 6px 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border-light);
}

.filter-group-header i {
  font-size: 0.85rem;
}

.filter-group-items {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.filter-group-items .filter-option {
  flex: 0 0 100%;
  font-size: 0.82rem;
  padding: 5px 10px 5px 28px;
}

.filter-dropdown.open .filter-dropdown-menu {
  display: block;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s;
}

.filter-option:hover {
  background: var(--primary-50);
}

.filter-option input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

/* Search */
.filter-search {
  position: relative;
}

.filter-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 0.85rem;
}

.filter-search-input {
  padding: 8px 14px 8px 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  width: 200px;
  background: var(--bg);
  font-family: inherit;
  transition: var(--transition);
}

.filter-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-50);
}

/* ---- Filter Chips ---- */
.filter-chips {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.filter-chips-list {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--primary-lighter);
  color: var(--primary-dark);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-chip:hover {
  background: var(--primary);
  color: white;
}

.filter-chip i {
  font-size: 0.65rem;
}

.filter-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: none;
  border: 1px solid var(--danger-light);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--danger);
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

.filter-clear-btn:hover {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

/* ---- Video Cards ---- */
.recommended-grid,
.video-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  position: relative;
  z-index: 1;
}

.recommended-grid {
  margin-bottom: 0;
}

.video-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-lighter);
}

.video-card-thumb {
  position: relative;
  padding-top: 56.25%;
  background: var(--bg-dark);
  overflow: hidden;
}

.video-card-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.video-card:hover .video-card-thumb img {
  transform: scale(1.05);
}

.video-card-dur {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.78);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.video-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.video-badge--exam {
  background: var(--accent);
  color: white;
}

.video-badge--noexam {
  background: rgba(0, 0, 0, 0.55);
  color: white;
}

.video-card-body {
  padding: var(--space-md) var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.video-card-cat {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

.video-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.video-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.video-tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  background: var(--primary-50);
  color: var(--primary-dark);
  border-radius: 100px;
  white-space: nowrap;
}

.video-card-footer {
  padding: 0 var(--space-lg) var(--space-lg);
  display: flex;
  gap: var(--space-sm);
}

.video-exam-btn {
  flex: 1;
  justify-content: center;
}

.video-exam-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.video-watch-btn {
  flex: 1;
  justify-content: center;
}

/* Save button on card */
.video-card-save {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
  z-index: 2;
}
.video-card-save:hover {
  background: var(--primary);
}

/* Progress bar on card */
.video-card-progress {
  height: 4px;
  background: var(--border);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  overflow: hidden;
}
.video-card-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.3s;
}

/* ── Watched (completed) card state ── */
.video-card.is-watched {
  background: #f0faf0;
  border-color: #c8e6c9;
}
.video-card.is-watched:hover {
  border-color: #a5d6a7;
  box-shadow: 0 8px 24px rgba(0, 200, 83, 0.12);
}

/* ── Video Detail Modal ── */
.video-detail-player {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  overflow: hidden;
}
.video-detail-player iframe,
.video-detail-player video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.video-detail-player img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-detail-player-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 3rem;
}
.video-detail-body {
  padding: var(--space-xl);
}
.video-detail-body h2 {
  margin-bottom: var(--space-sm);
}
.video-detail-meta {
  display: flex;
  gap: var(--space-lg);
  color: var(--text-light);
  font-size: 0.85rem;
  margin-bottom: var(--space-md);
}
.video-detail-meta i {
  margin-right: 4px;
}
.video-detail-exam {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: var(--primary-50);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.video-detail-exam small {
  color: var(--text-light);
}
.video-detail-exam--passed {
  background: var(--success-bg, #e8f5e9);
  color: var(--success, #2e7d32);
  flex-direction: row;
  align-items: center;
  gap: var(--space-md);
  font-weight: 600;
}
.video-detail-exam--locked {
  background: var(--bg-secondary);
  color: var(--text-light);
  flex-direction: row;
  align-items: center;
  gap: var(--space-md);
}

/* Mark Complete (for link/iframe videos) */
.video-mark-complete-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--warning-bg, #fff8e1);
  border: 1px solid var(--warning, #f9a825);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.video-mark-complete-bar .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Exam Flow ── */
.exam-container {
  padding: var(--space-xl);
}
.exam-header {
  margin-bottom: var(--space-xl);
}
.exam-header h2 {
  margin-bottom: var(--space-sm);
}
.exam-meta {
  display: flex;
  gap: var(--space-lg);
  color: var(--text-light);
  font-size: 0.85rem;
}
.exam-question {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}
.exam-question h4 {
  margin-bottom: var(--space-md);
}
.exam-question-img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}
.exam-option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.exam-option:hover {
  border-color: var(--primary);
  background: var(--primary-50);
}
.exam-option input[type="radio"] {
  accent-color: var(--primary);
}

/* Exam Result */
.exam-result {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
}
.exam-result-icon {
  font-size: 4rem;
  margin-bottom: var(--space-lg);
}
.exam-result--passed .exam-result-icon {
  color: var(--success, #2e7d32);
}
.exam-result--failed .exam-result-icon {
  color: var(--danger, #d32f2f);
}
.exam-result-score {
  font-size: 3rem;
  font-weight: 800;
  margin: var(--space-md) 0;
  color: var(--primary);
}
.exam-result p {
  color: var(--text-light);
  margin-bottom: var(--space-xl);
}

/* Empty state */
.video-empty {
  text-align: center;
  padding: var(--space-3xl);
  color: var(--text-light);
}

.video-empty i {
  font-size: 3rem;
  margin-bottom: var(--space-lg);
  opacity: 0.3;
}

.video-empty h3 {
  margin-bottom: var(--space-sm);
  color: var(--text);
}

/* Guest banner */
.guest-banner {
  background: linear-gradient(
    135deg,
    var(--primary-50),
    var(--primary-lighter)
  );
  border-bottom: 2px solid var(--primary-light);
  padding: var(--space-md) 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--primary-dark);
}
.guest-banner i {
  margin-right: var(--space-xs);
}
.guest-banner a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
}

/* =============================================
   INTERNSHIP PAGE
   ============================================= */
.internship-content {
  padding: var(--space-4xl) 0;
}

.internship-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-3xl);
  align-items: start;
}

/* Form Card */
.internship-form-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.internship-form-header {
  padding: var(--space-xl);
  background: var(--primary-50);
  border-bottom: 1px solid var(--border-light);
}

.internship-form-header h2 {
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.internship-form-header h2 i {
  color: var(--primary);
}

.internship-form-body {
  padding: var(--space-xl);
}

/* Form Section Headers */
.form-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--primary-lighter);
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-section-title i {
  font-size: 0.9rem;
}

/* Form Row */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* ---- Form Section Card (card-like grouped layout) ---- */
.form-section-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
  overflow: hidden;
  transition: var(--transition);
}

.form-section-card:hover {
  border-color: var(--primary-lighter);
  box-shadow: var(--shadow-sm);
}

.form-section-card--flat {
  background: transparent;
  border: none;
  box-shadow: none;
}

.form-section-card--flat:hover {
  border-color: transparent;
  box-shadow: none;
}

.form-section-card .form-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-xl);
  background: var(--bg);
  border-bottom: 1px solid var(--border-light);
}

.form-section-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--gradient-primary);
  color: var(--text-inverse);
  font-size: 1rem;
  flex-shrink: 0;
}

.form-section-card .form-section-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.form-section-card .form-section-header p {
  font-size: 0.8rem;
  color: var(--text-light);
  margin: 2px 0 0;
}

.form-section-body {
  padding: var(--space-xl);
}

.form-section-body .form-group:last-child {
  margin-bottom: 0;
}

/* Required asterisk */
.required {
  color: var(--danger);
  font-weight: 700;
}

/* KVKK Link */
.kvkk-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.kvkk-link:hover {
  color: var(--primary-dark);
}

/* Submit button */
.internship-submit-btn {
  width: 100%;
  margin-top: var(--space-md);
}

/* File Upload */
.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.file-upload-area:hover {
  border-color: var(--primary);
  background: var(--primary-50);
}

.file-upload-area.dragover {
  border-color: var(--primary);
  background: var(--primary-lighter);
}

.file-upload-content i {
  font-size: 2.5rem;
  color: var(--primary-light);
  margin-bottom: var(--space-md);
}

.file-upload-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

.file-upload-hint {
  color: var(--text-light);
  font-size: 0.8rem;
  margin-top: 4px;
}

.file-upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-upload-preview {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--primary-50);
  border-radius: var(--radius-sm);
  margin-top: var(--space-md);
}

.file-upload-preview i {
  color: var(--primary);
  font-size: 1.2rem;
}

.file-upload-name {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.file-upload-remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--danger-light);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.file-upload-remove:hover {
  background: var(--danger);
  color: white;
}

/* Sidebar */
.internship-sidebar {
  position: sticky;
  top: calc(var(--navbar-height) + var(--space-lg));
}

.sidebar-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.sidebar-card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--primary-lighter);
  color: var(--primary);
  font-size: 1.2rem;
}

.sidebar-card h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
}

.sidebar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.sidebar-list li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.9rem;
  color: var(--text);
  padding: var(--space-xs) 0;
}

.sidebar-list li i {
  color: var(--success);
  font-size: 0.8rem;
  flex-shrink: 0;
}

.sidebar-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.sidebar-step {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.sidebar-step-num {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: var(--text-inverse);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.sidebar-step-text {
  font-size: 0.9rem;
  color: var(--text);
}

.sidebar-card-cta {
  background: var(--gradient-primary);
  color: var(--text-inverse);
  text-align: center;
  border: none;
}

.sidebar-card-cta i {
  font-size: 2rem;
  margin-bottom: var(--space-md);
  opacity: 0.9;
}

.sidebar-card-cta h3 {
  color: var(--text-inverse);
}

.sidebar-card-cta p {
  font-size: 0.9rem;
  opacity: 0.85;
  margin-bottom: var(--space-lg);
}

/* Success Message */
.internship-success {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
}

.success-animation {
  width: 100px;
  height: 100px;
  margin: 0 auto var(--space-xl);
  background: var(--success-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--success);
  animation: bounceIn 0.6s var(--ease);
}

.internship-success h2 {
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
  color: var(--success);
}

.internship-success p {
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto var(--space-xl);
  line-height: 1.7;
}

/* =============================================
   PROFILE PAGE
   ============================================= */
.profile-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

/* Sidebar */
.profile-sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.profile-sidebar-avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-md);
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  box-shadow: var(--shadow-primary);
}

.profile-sidebar-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.profile-sidebar-role {
  font-size: 0.78rem;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px var(--space-md);
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  width: 100%;
}

.profile-nav-item i {
  width: 20px;
  text-align: center;
  font-size: 0.85rem;
}

.profile-nav-item:hover {
  background: var(--primary-50);
  color: var(--primary);
}

.profile-nav-item.active {
  background: var(--primary-lighter);
  color: var(--primary);
  font-weight: 600;
}

/* Tabs */
.profile-tab {
  display: none;
}

.profile-tab.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

/* Stat Cards */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.profile-stat-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.profile-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.profile-stat-body {
  display: flex;
  flex-direction: column;
}

.profile-stat-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.profile-stat-label {
  font-size: 0.78rem;
  color: var(--text-light);
  font-weight: 500;
  margin-top: 2px;
}

/* Section Card */
.profile-section-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-xl);
}

.profile-section-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.profile-section-card h3 i {
  color: var(--primary);
}

.profile-section-empty {
  text-align: center;
  color: var(--text-light);
  padding: var(--space-2xl);
  font-size: 0.95rem;
}

/* Profile Form */
.profile-form .form-group {
  margin-bottom: var(--space-lg);
}

.profile-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.profile-form-avatar-row {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.profile-form-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* Profile Form Controls */
.profile-form .form-control,
.profile-form .form-input {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
  line-height: 1.5;
}

.profile-form .form-control:hover,
.profile-form .form-input:hover {
  border-color: var(--primary-lighter, #80ccee);
  background: var(--surface);
}

.profile-form .form-control:focus,
.profile-form .form-input:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(0, 152, 218, 0.12);
}

.profile-form .form-control::placeholder,
.profile-form .form-input::placeholder {
  color: var(--text-light);
  font-weight: 400;
}

.profile-form .form-control[readonly],
.profile-form .form-input[readonly] {
  background: var(--bg-alt);
  cursor: not-allowed;
  opacity: 0.65;
  border-style: dashed;
}

.profile-form select.form-control,
.profile-form select.form-input {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%237B8794' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 20px;
  cursor: pointer;
}

.profile-form .form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.profile-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

/* Profile List Items */
.profile-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.profile-list-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius);
  transition: var(--transition);
}
.profile-list-item:hover {
  background: var(--bg-alt);
}
.profile-list-item--unread {
  background: var(--primary-50);
  font-weight: 600;
}
.profile-list-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--primary-lighter);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.profile-list-body {
  flex: 1;
  min-width: 0;
}
.profile-list-body strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 2px;
}
.profile-list-body small {
  color: var(--text-light);
  font-size: 0.78rem;
}
.profile-list-date {
  font-size: 0.78rem;
  color: var(--text-light);
  white-space: nowrap;
}

/* Profile Progress Bar */
.profile-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  margin: 4px 0;
  overflow: hidden;
}
.profile-progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* Profile Certificate Grid */
.profile-cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-lg);
}
.profile-cert-card {
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.profile-cert-icon {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}
.profile-cert-card h4 {
  font-size: 0.95rem;
  margin-bottom: var(--space-sm);
  word-break: break-word;
}
.profile-cert-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}
.profile-cert-qr {
  margin: var(--space-md) 0;
  display: flex;
  justify-content: center;
}
.profile-cert-qr img {
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}
.profile-cert-code {
  display: block;
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: var(--space-md);
  word-break: break-all;
}
.profile-cert-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
  justify-content: center;
}
.profile-cert-actions .btn-linkedin {
  background: #0a66c2;
  color: #fff;
  border-color: #0a66c2;
}
.profile-cert-actions .btn-linkedin:hover {
  background: #004182;
  border-color: #004182;
}
/* =============================================
   ADMIN PAGE
   ============================================= */

/* Admin Topbar — removed, navbar used instead */
.admin-topbar {
  display: none;
}

.admin-topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.admin-topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.admin-topbar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.admin-topbar-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-50);
}

.admin-topbar-btn--danger:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(255, 61, 0, 0.05);
}

.admin-topbar-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.admin-topbar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
}
.admin-topbar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex: 1;
}
.admin-topbar-title i {
  color: var(--primary);
  font-size: 0.9rem;
}
.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.admin-topbar-link {
  font-size: 0.78rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}
.admin-topbar-link:hover {
  text-decoration: underline;
}
.admin-topbar-lang {
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}
.admin-topbar-lang:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.admin-topbar-user {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.admin-topbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  overflow: hidden;
}
.admin-topbar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.admin-topbar-logout {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1rem;
  cursor: pointer;
  padding: 6px;
  transition: var(--transition);
}
.admin-topbar-logout:hover {
  color: var(--danger);
}

.admin-wrapper {
  display: flex;
  min-height: 100vh;
  padding-top: var(--navbar-height);
}

.admin-sidebar {
  width: 260px;
  background: var(--surface);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: var(--navbar-height);
  bottom: 0;
  left: 0;
  z-index: 10;
  overflow-y: auto;
}

.admin-sidebar-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xl) var(--space-lg);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  border-bottom: 1px solid var(--border-light);
}

.admin-sidebar-header i {
  font-size: 1.2rem;
}

.admin-sidebar-close {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
}
.admin-sidebar-close:hover {
  color: var(--danger);
}

.admin-mobile-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 11;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: white;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}
.admin-mobile-toggle:hover {
  transform: scale(1.1);
}

.admin-nav {
  flex: 1;
  padding: var(--space-md) var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px var(--space-md);
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  width: 100%;
}

.admin-nav-item i {
  width: 20px;
  text-align: center;
  font-size: 0.85rem;
}

.admin-nav-item:hover {
  background: var(--primary-50);
  color: var(--primary);
}

.admin-nav-item.active {
  background: var(--primary-lighter);
  color: var(--primary);
  font-weight: 600;
}

.admin-sidebar-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border-light);
}

.admin-back-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
  transition: var(--transition);
}

.admin-back-link:hover {
  color: var(--primary);
}

.admin-main {
  flex: 1;
  margin-left: 260px;
  padding: var(--space-2xl);
  background: var(--bg);
  min-height: calc(100vh - var(--navbar-height));
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

.admin-page-header {
  margin-bottom: var(--space-xl);
}

.admin-page-header h1 {
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.admin-page-header h1 i {
  color: var(--primary);
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.admin-stat-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.admin-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.admin-stat-body {
  display: flex;
  flex-direction: column;
}

.admin-stat-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.admin-stat-label {
  font-size: 0.78rem;
  color: var(--text-light);
  font-weight: 500;
  margin-top: 4px;
}

.admin-placeholder-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-3xl);
  text-align: center;
  color: var(--text-light);
}

.admin-placeholder-card i {
  font-size: 3rem;
  opacity: 0.2;
  margin-bottom: var(--space-lg);
}

.admin-placeholder-card p {
  font-size: 0.95rem;
}

/* ---- Admin Page Description ---- */
.admin-page-desc {
  font-size: 0.88rem;
  color: var(--text-light);
  margin-top: 4px;
  font-weight: 400;
}

/* ---- Admin Stats 6-col ---- */
.admin-stats-grid--6 {
  grid-template-columns: repeat(6, 1fr);
}

/* ---- Admin Grid Layouts ---- */
.admin-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

/* ---- Admin Cards ---- */
.admin-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg);
}

.admin-card-header h3 {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: 0;
}

.admin-card-header h3 i {
  color: var(--primary);
  font-size: 0.9rem;
}

.admin-card-body {
  padding: var(--space-lg) var(--space-xl);
}

/* ---- Admin Toolbar ---- */
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.admin-toolbar-left,
.admin-toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* ---- Admin Search ---- */
.admin-search {
  position: relative;
  min-width: 220px;
}

.admin-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 0.8rem;
}

.admin-search input {
  padding: 8px 14px 8px 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  width: 100%;
  background: var(--bg);
  font-family: inherit;
  transition: var(--transition);
}

.admin-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-50);
}

/* ---- Admin Select ---- */
.admin-select {
  padding: 8px 30px 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-family: inherit;
  background: var(--bg);
  cursor: pointer;
  transition: var(--transition);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666' width='18' height='18'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
}

.admin-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-50);
}

.admin-select--sm {
  padding: 4px 24px 4px 8px;
  font-size: 0.78rem;
}

/* ---- Admin Table ---- */
.admin-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table thead {
  background: var(--bg);
  border-bottom: 2px solid var(--border-light);
}

.admin-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.admin-table tbody tr {
  transition: background 0.15s;
}

.admin-table tbody tr:hover {
  background: var(--primary-50);
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table--compact th,
.admin-table--compact td {
  padding: 8px 12px;
  font-size: 0.82rem;
}

.admin-row--inactive {
  opacity: 0.55;
}

.admin-empty {
  text-align: center;
  padding: var(--space-2xl) !important;
  color: var(--text-light);
  font-style: italic;
}

.admin-empty i {
  margin-right: 8px;
  opacity: 0.4;
}

/* ---- Admin Badges ---- */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.admin-badge--success {
  background: var(--success-light);
  color: var(--success);
}

.admin-badge--warning {
  background: #fff3e6;
  color: #d97706;
}

.admin-badge--danger {
  background: var(--danger-light);
  color: var(--danger);
}

.admin-badge--info {
  background: var(--primary-lighter);
  color: var(--primary);
}

.admin-badge--default {
  background: var(--bg-alt, #f3f4f6);
  color: var(--text-light);
}

/* ---- Admin Password Cell ---- */
.admin-password-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-password-dots {
  font-family: monospace;
  font-size: 1rem;
  letter-spacing: 2px;
  color: var(--text-light);
}

.admin-password-text {
  font-family: monospace;
  font-size: 0.82rem;
  background: var(--bg);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  color: var(--text);
}

.admin-password-toggle {
  width: 28px;
  height: 28px;
  border: none;
  background: var(--primary-50);
  color: var(--primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.admin-password-toggle:hover {
  background: var(--primary);
  color: white;
}

/* ---- Admin Actions ---- */
.admin-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.admin-action-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-light);
  background: var(--surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  transition: var(--transition);
  color: var(--text-secondary);
}

.admin-action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-50);
}

.admin-action-btn--edit:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-50);
}

.admin-action-btn--view:hover {
  border-color: #059669;
  color: #059669;
  background: #ecfdf5;
}

.admin-action-btn--delete:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-light);
}

/* ---- Admin Pagination ---- */
.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: var(--space-lg);
}

.admin-pagination-btn {
  min-width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.admin-pagination-btn:hover,
.admin-pagination-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ---- Admin Tabs ---- */
.admin-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: var(--space-lg);
  background: var(--bg-alt, #f3f4f6);
  border-radius: var(--radius-lg);
  padding: 4px;
}

.admin-tab {
  flex: 1;
  padding: 10px 20px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.admin-tab:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.6);
}

.admin-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

/* ---- Admin Tag Selector ---- */
.admin-tag-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: var(--space-sm);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg);
  min-height: 44px;
}

.admin-tag-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  transition: var(--transition);
  user-select: none;
}

.admin-tag-check input {
  display: none;
}

.admin-tag-check:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.admin-tag-check.selected {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ---- Admin Tag Grid & Pills ---- */
.admin-tag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

.admin-tag-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  transition: var(--transition);
}

.admin-tag-card:hover {
  border-color: var(--primary-lighter);
  box-shadow: var(--shadow-sm);
}

.admin-tag-card-body {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.admin-tag-name {
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-tag-name i {
  color: var(--primary);
  font-size: 0.8rem;
}

.admin-tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.admin-tag-pill {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 600;
  background: var(--primary-50);
  color: var(--primary-dark);
  white-space: nowrap;
}

.admin-text-muted {
  color: var(--text-light);
  font-size: 0.82rem;
}

/* ---- Admin Form ---- */
.admin-form .form-group {
  margin-bottom: var(--space-md);
}

.admin-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.admin-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-sm);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-light);
  margin-top: var(--space-lg);
}

.admin-form--inline {
  display: flex;
  align-items: flex-end;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.admin-form--inline .form-group {
  margin-bottom: 0;
  flex: 1;
  min-width: 150px;
}

.admin-toggle-label {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500 !important;
}

.admin-toggle-label input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 4px;
}

.form-textarea {
  resize: vertical;
  min-height: 60px;
}

/* ---- Admin Divider ---- */
.admin-divider {
  height: 1px;
  background: var(--border-light);
  margin: var(--space-xl) 0;
}

/* ---- Admin Modal ---- */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.admin-modal-overlay.active {
  display: flex;
}

.admin-modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  animation: fadeInUp 0.25s ease;
}

.admin-modal--lg {
  max-width: 720px;
}

.admin-modal--sm {
  max-width: 440px;
}

.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.admin-modal-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: 0;
}

.admin-modal-header h2 i {
  color: var(--primary);
}

.admin-modal-header--danger h2 i {
  color: var(--danger);
}

.admin-modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-alt, #f3f4f6);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.9rem;
  transition: var(--transition);
}

.admin-modal-close:hover {
  background: var(--danger-light);
  color: var(--danger);
}

.admin-modal-body {
  padding: var(--space-xl);
}

/* ---- Admin Detail Grid ---- */
.admin-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.admin-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-detail-item label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-light);
}

.admin-detail-item span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.admin-detail-section {
  margin-bottom: var(--space-lg);
}

.admin-detail-section > label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-light);
  margin-bottom: var(--space-sm);
}

.admin-detail-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  background: var(--bg);
  padding: var(--space-md);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}

.admin-status-update {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* ---- Question Builder ---- */
.admin-question-builder {
  margin-top: var(--space-md);
}

.admin-question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.admin-question-header h3 {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: 0;
}

.admin-question-header h3 i {
  color: var(--primary);
}

.admin-question-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
  overflow: hidden;
  transition: var(--transition);
}

.admin-question-card:hover {
  border-color: var(--primary-lighter);
  box-shadow: var(--shadow-sm);
}

.admin-question-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg);
  border-bottom: 1px solid var(--border-light);
}

.admin-question-num {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--primary);
}

.admin-question-card-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.admin-question-card-body {
  padding: var(--space-lg);
}

.admin-options-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.admin-options-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.admin-option-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.admin-option-row input[type="radio"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.admin-option-key {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-lighter);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.admin-option-row .form-input {
  flex: 1;
}

/* ---- Admin Sidebar Toggle (Mobile) ---- */
.admin-sidebar-toggle {
  display: none;
  position: fixed;
  top: calc(var(--navbar-height) + 12px);
  left: 12px;
  z-index: 20;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text);
  box-shadow: var(--shadow-md);
}

/* ---- Success outline button ---- */
.btn-success-outline {
  border-color: #059669;
  color: #059669;
}

.btn-success-outline:hover {
  background: #059669;
  color: white;
  border-color: #059669;
}

/* ---- Danger button ---- */
.btn-danger {
  background: var(--danger);
  color: white;
  border: 1px solid var(--danger);
}

.btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.35s var(--ease);
  box-shadow: var(--shadow-xl);
  font-family: inherit;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast--success {
  background: var(--success);
  color: white;
}

.toast--error {
  background: var(--danger);
  color: white;
}

.toast--info {
  background: var(--primary);
  color: white;
}

/* ---- FadeInUp Keyframe ---- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
