/* ============================================
   ROTA BRASILIS — Portal Styles
   Extends the base design system (styles.css)
   ============================================ */

/* --- Portal Button in Header --- */
.btn-portal {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.4rem 1rem;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--gold);
  color: var(--gold);
  background: transparent;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn-portal:hover {
  background: var(--gold);
  color: var(--primary-blue);
}

.header.scrolled .btn-portal {
  border-color: var(--gold);
  color: var(--gold);
}

.header.scrolled .btn-portal:hover {
  background: var(--gold);
  color: var(--primary-blue);
}

.btn-portal svg {
  width: 16px;
  height: 16px;
}

/* --- Portal Layout --- */
.portal-page {
  min-height: 100vh;
  padding-top: 100px;
  background: var(--white);
}

.portal-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-xl);
}

.portal-header {
  margin-bottom: var(--space-2xl);
}

.portal-header h1 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-sm);
}

.portal-header p {
  font-size: var(--text-lg);
  color: var(--text-muted);
}

/* --- Portal Sidebar Layout --- */
.portal-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-2xl);
  min-height: calc(100vh - 200px);
}

.portal-sidebar {
  background: var(--pure-white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-gray);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.portal-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.portal-sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.portal-sidebar-link:hover {
  background: var(--warm-sand);
  color: var(--text-dark);
}

.portal-sidebar-link.active {
  background: var(--primary-blue);
  color: var(--pure-white);
}

.portal-sidebar-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.portal-sidebar-divider {
  height: 1px;
  background: var(--light-gray);
  margin: var(--space-sm) 0;
}

.portal-main {
  min-width: 0;
}

/* --- Auth Pages (Login / Register) --- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--warm-sand);
  padding: var(--space-xl);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--pure-white);
  border-radius: var(--radius-lg);
  padding: var(--space-3xl);
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.auth-logo .logo-text {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--primary-blue);
}

.auth-title {
  text-align: center;
  font-size: var(--text-2xl);
  margin-bottom: var(--space-xs);
}

.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-2xl);
}

.auth-form .form-group {
  margin-bottom: var(--space-lg);
}

.auth-footer {
  text-align: center;
  margin-top: var(--space-xl);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--accent-blue);
  font-weight: 600;
}

.auth-footer a:hover {
  color: var(--primary-blue);
}

.auth-forgot {
  display: block;
  text-align: right;
  font-size: var(--text-sm);
  color: var(--accent-blue);
  margin-bottom: var(--space-lg);
}

.auth-forgot:hover {
  color: var(--primary-blue);
}

/* --- Alert Messages --- */
.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  margin-bottom: var(--space-lg);
  display: none;
}

.alert.show {
  display: block;
}

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

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

.alert-info {
  background: #DBEAFE;
  color: var(--accent-blue);
  border: 1px solid #BFDBFE;
}

/* --- Stats Cards (Dashboard) --- */
.portal-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.portal-stat-card {
  background: var(--pure-white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-gray);
}

.portal-stat-card .stat-value {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: var(--space-xs);
}

.portal-stat-card .stat-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: normal;
}

/* --- Portal Cards --- */
.portal-card {
  background: var(--pure-white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-gray);
  margin-bottom: var(--space-lg);
}

.portal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.portal-card-header h3 {
  font-size: var(--text-lg);
  margin-bottom: 0;
}

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

.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.portal-table th {
  text-align: left;
  padding: var(--space-md) var(--space-lg);
  font-weight: 600;
  color: var(--text-muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--light-gray);
  font-family: var(--font-body);
}

.portal-table td {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--light-gray);
  color: var(--text-dark);
}

.portal-table tr:hover td {
  background: var(--warm-sand);
}

.portal-table tr:last-child td {
  border-bottom: none;
}

/* --- Status Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-active,
.badge-scheduled {
  background: #D1FAE5;
  color: #065F46;
}

.badge-completed {
  background: #DBEAFE;
  color: #1E40AF;
}

.badge-cancelled {
  background: #FEE2E2;
  color: #991B1B;
}

.badge-pending {
  background: #FEF3C7;
  color: #92400E;
}

.badge-in-progress,
.badge-in_progress {
  background: #EDE9FE;
  color: #5B21B6;
}

/* --- Process Pipeline / Stepper --- */
.pipeline {
  position: relative;
  padding: 0;
}

.pipeline-phase {
  position: relative;
  padding-left: var(--space-3xl);
  padding-bottom: var(--space-xl);
  border-left: 2px solid var(--light-gray);
  margin-left: 15px;
}

.pipeline-phase:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.pipeline-phase.completed {
  border-left-color: var(--success);
}

.pipeline-phase.in-progress {
  border-left-color: var(--gold);
}

.pipeline-dot {
  position: absolute;
  left: -10px;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: var(--light-gray);
  border: 3px solid var(--pure-white);
  box-shadow: var(--shadow-sm);
}

.pipeline-phase.completed .pipeline-dot {
  background: var(--success);
}

.pipeline-phase.in-progress .pipeline-dot {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(212, 168, 67, 0.2);
}

.pipeline-phase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
  cursor: pointer;
}

.pipeline-phase-name {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--primary-blue);
}

.pipeline-phase.completed .pipeline-phase-name {
  color: var(--success);
}

/* --- Checklist --- */
.checklist {
  margin-top: var(--space-md);
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.checklist-item:hover {
  background: var(--warm-sand);
}

.checklist-checkbox {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.checklist-label {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--text-dark);
}

.checklist-item.completed .checklist-label {
  text-decoration: line-through;
  color: var(--text-muted);
}

.checklist-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.checklist-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 10px;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--accent-blue);
  color: var(--pure-white);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.checklist-upload-btn:hover {
  background: var(--primary-blue);
}

.checklist-uploaded {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-xs);
  color: var(--success);
  font-weight: 600;
}

/* --- Tags (Nationalities) --- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--primary-blue);
  color: var(--gold);
  font-size: var(--text-sm);
  font-weight: 500;
}

.tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.2);
  color: var(--pure-white);
  font-size: 10px;
  cursor: pointer;
  transition: background var(--transition-fast);
  line-height: 1;
}

.tag-remove:hover {
  background: rgba(255, 255, 255, 0.4);
}

.tag-add {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.tag-add-input {
  padding: 4px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  width: 180px;
}

.tag-add-input:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.tag-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--gold);
  color: var(--primary-blue);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tag-add-btn:hover {
  background: var(--gold-light);
  transform: scale(1.1);
}

/* --- Modal --- */
.portal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 31, 59, 0.6);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.portal-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.portal-modal {
  background: var(--pure-white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px);
  transition: transform var(--transition-base);
}

.portal-modal-overlay.open .portal-modal {
  transform: translateY(0);
}

.portal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-xl) var(--space-xl) 0;
}

.portal-modal-header h3 {
  margin-bottom: 0;
}

.portal-modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 20px;
  transition: all var(--transition-fast);
}

.portal-modal-close:hover {
  background: var(--warm-sand);
  color: var(--text-dark);
}

.portal-modal-body {
  padding: var(--space-xl);
}

.portal-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-md);
  padding: 0 var(--space-xl) var(--space-xl);
}

/* --- Modal Tabs & Client Search --- */
.modal-tabs {
  display: flex;
  gap: 0;
  margin-bottom: var(--space-lg);
  border-bottom: 2px solid var(--light-gray);
}

.modal-tab {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  background: none;
  border: none;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition-base);
}

.modal-tab:hover {
  color: var(--primary-blue);
}

.modal-tab.active {
  color: var(--primary-blue);
  border-bottom-color: var(--accent-gold);
}

.client-search-results {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.client-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background var(--transition-base);
  border-bottom: 1px solid var(--light-gray);
}

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

.client-search-item:hover {
  background: var(--off-white);
}

.client-search-item.selected {
  background: #f0f4ff;
  font-weight: 600;
}

.invite-link-box {
  background: var(--off-white);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin: var(--space-md) 0;
}

.invite-link-box .form-input {
  font-size: var(--text-xs);
}

.checkbox-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* --- Calendar Picker --- */
.calendar-picker {
  background: var(--pure-white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-gray);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.calendar-header h4 {
  margin-bottom: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.calendar-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.calendar-nav-btn:hover {
  background: var(--warm-sand);
  color: var(--text-dark);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendar-day-label {
  text-align: center;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  padding: var(--space-sm);
  text-transform: uppercase;
}

.calendar-day {
  text-align: center;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--text-dark);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.calendar-day:hover {
  background: var(--warm-sand);
}

.calendar-day.today {
  font-weight: 700;
  color: var(--accent-blue);
}

.calendar-day.selected {
  background: var(--primary-blue);
  color: var(--pure-white);
}

.calendar-day.disabled {
  color: var(--border-color);
  cursor: default;
}

.calendar-day.disabled:hover {
  background: transparent;
}

.calendar-day.other-month {
  color: var(--border-color);
}

/* --- Time Slots --- */
.time-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.time-slot {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  text-align: center;
  color: var(--text-dark);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.time-slot:hover {
  border-color: var(--gold);
  background: rgba(212, 168, 67, 0.08);
}

.time-slot.selected {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--primary-blue);
  font-weight: 600;
}

/* --- Progress Bar --- */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--light-gray);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

/* --- Process Card --- */
.process-card {
  background: var(--pure-white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-gray);
  transition: all var(--transition-base);
  cursor: pointer;
}

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

.process-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.process-card-name {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--primary-blue);
}

.process-card-progress {
  margin-top: var(--space-md);
}

.process-card-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

/* --- Meeting Card --- */
.meeting-card {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--pure-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--light-gray);
  margin-bottom: var(--space-md);
}

.meeting-date-badge {
  text-align: center;
  min-width: 56px;
  padding: var(--space-sm) var(--space-md);
  background: var(--primary-blue);
  border-radius: var(--radius-md);
  color: var(--pure-white);
}

.meeting-date-badge .day {
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1;
}

.meeting-date-badge .month {
  font-size: var(--text-xs);
  text-transform: uppercase;
  opacity: 0.8;
}

.meeting-info {
  flex: 1;
}

.meeting-time {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.meeting-meta {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.meeting-actions {
  display: flex;
  gap: var(--space-sm);
}

/* --- Quiz (Guide Page) --- */
.quiz-container {
  max-width: 700px;
  margin: 0 auto;
}

.quiz-progress {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
}

.quiz-progress-step {
  flex: 1;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--light-gray);
  transition: background var(--transition-base);
}

.quiz-progress-step.active {
  background: var(--gold);
}

.quiz-progress-step.completed {
  background: var(--success);
}

.quiz-question-text {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: var(--primary-blue);
  margin-bottom: var(--space-2xl);
  text-align: center;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.quiz-option {
  padding: var(--space-lg);
  border: 2px solid var(--light-gray);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
}

.quiz-option:hover {
  border-color: var(--gold);
  background: rgba(212, 168, 67, 0.05);
}

.quiz-option.selected {
  border-color: var(--gold);
  background: rgba(212, 168, 67, 0.1);
}

.quiz-option-icon {
  font-size: 32px;
  margin-bottom: var(--space-sm);
}

.quiz-option-text {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--primary-blue);
}

.quiz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-2xl);
}

/* Quiz results */
.quiz-result-card {
  background: var(--pure-white);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-md);
  border: 2px solid var(--gold);
  margin-bottom: var(--space-xl);
}

.quiz-result-card.secondary {
  border-color: var(--light-gray);
}

.quiz-result-badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: var(--space-md);
}

.quiz-result-card h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
}

.quiz-result-card p {
  font-size: var(--text-sm);
  margin-bottom: var(--space-lg);
}

/* --- Upload Zone --- */
.upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--gold);
  background: rgba(212, 168, 67, 0.05);
}

.upload-zone-icon {
  font-size: 40px;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.upload-zone-text {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.upload-zone-text strong {
  color: var(--accent-blue);
}

/* --- Quick Actions --- */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--light-gray);
  transition: all var(--transition-base);
  text-align: center;
}

.quick-action:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.quick-action-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--warm-sand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-blue);
}

.quick-action-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary-blue);
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: var(--space-md);
  opacity: 0.4;
}

.empty-state p {
  font-size: var(--text-sm);
}

/* --- Search Bar --- */
.portal-search {
  position: relative;
  margin-bottom: var(--space-lg);
}

.portal-search-input {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  padding-left: 44px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  background: var(--pure-white);
}

.portal-search-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(46, 134, 171, 0.15);
}

.portal-search-icon {
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* --- Loading Spinner --- */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--light-gray);
  border-top-color: var(--gold);
  border-radius: var(--radius-full);
  animation: spin 0.6s linear infinite;
}

.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 3px;
}

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

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl);
}

/* ============================================
   RESPONSIVE — Portal
   ============================================ */

@media (max-width: 1024px) {
  .portal-layout {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    position: static;
    display: flex;
    overflow-x: auto;
    padding: var(--space-md);
  }

  .portal-sidebar-nav {
    flex-direction: row;
    gap: var(--space-xs);
    width: max-content;
  }

  .portal-sidebar-divider {
    display: none;
  }

  .portal-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .time-slots {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .portal-page {
    padding-top: 80px;
  }

  .portal-container {
    padding: var(--space-lg) var(--space-md);
  }

  .portal-header h1 {
    font-size: var(--text-3xl);
  }

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

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .quiz-options {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: var(--space-xl);
  }

  .meeting-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .time-slots {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .time-slots {
    grid-template-columns: 1fr;
  }

  .portal-modal {
    margin: var(--space-md);
  }
}
