/**
 * BSW Admin Dashboard Styles
 * Extends bsw.css with admin-specific components
 */

/* =============================================================================
   Admin Layout
   ============================================================================= */

.admin-header {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  height: auto !important;
}

/* Two-row admin header: logo+actions on top, nav below */
.admin-header .header-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  height: auto !important;
  padding: 0.75rem 0;
  row-gap: 0;
}

.admin-header .header-left {
  flex: 1;
  min-width: 0;
  order: 0;
}

.admin-header .header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  order: 1;
  flex-shrink: 0;
}

.admin-header .header-actions .btn-outline {
  color: var(--gray-700);
  border-color: var(--gray-300);
}

.admin-header .header-actions .btn-outline:hover {
  background: var(--gray-50);
}

.admin-header .header-actions .btn-primary {
  background: var(--bsw-primary);
  border-color: var(--bsw-primary);
}

.admin-nav {
  flex: 0 0 100%;
  order: 2;
  gap: 0.25rem;
  padding: 0.5rem 0 0;
  border-top: 1px solid var(--gray-200);
  margin-top: 0.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.admin-nav::-webkit-scrollbar {
  display: none;
}

.admin-nav .nav-link {
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius);
  transition: background 0.2s;
  white-space: nowrap;
  font-size: 0.8125rem;
  color: var(--gray-600);
  border-bottom: none;
}

.admin-nav .nav-link:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.admin-nav .nav-link.active {
  background: var(--bsw-primary);
  color: white;
  font-weight: 600;
}

.admin-nav .conference-select {
  color: var(--gray-700);
  background: var(--gray-50);
  border: 1px solid var(--gray-300);
}

.admin-nav .conference-select:hover {
  background: var(--gray-100);
}

.admin-nav .conference-select:focus {
  border-color: var(--bsw-primary);
  box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.15);
}

.admin-main {
  padding: 2rem 0;
  min-height: calc(100vh - 80px);
  background: var(--bg-subtle);
}

/* =============================================================================
   Auth Banner
   ============================================================================= */

.auth-banner {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 4rem 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.auth-banner h2 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.auth-banner p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* =============================================================================
   Tabs
   ============================================================================= */

.admin-tab {
  display: none;
}

.admin-tab.active {
  display: block;
}

.tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.tab-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tab-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* =============================================================================
   Dashboard Stats
   ============================================================================= */

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.dashboard-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

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

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.stat-icon.sessions-icon {
  background: rgba(43, 138, 143, 0.1);
  color: var(--bsw-primary);
}

.stat-icon.venues-icon {
  background: rgba(245, 130, 32, 0.1);
  color: var(--bsw-accent);
}

.stat-icon.registrations-icon {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
}

.stat-icon.attendance-icon {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* =============================================================================
   Charts
   ============================================================================= */

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

.chart-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.chart-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.chart-container {
  min-height: 200px;
}

/* Simple bar chart */
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bar-chart-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bar-chart-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  width: 80px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-chart-bar-container {
  flex: 1;
  height: 24px;
  background: var(--bg-subtle);
  border-radius: var(--radius);
  overflow: hidden;
}

.bar-chart-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--bsw-primary), var(--bsw-accent));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.5rem;
  min-width: 30px;
  transition: width 0.3s ease;
}

.bar-chart-value {
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}

/* Registration by day chart */
.day-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  height: 180px;
  padding-top: 20px;
}

.day-chart-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.day-chart-value {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.day-chart-fill {
  width: 100%;
  background: linear-gradient(to top, var(--bsw-primary), var(--bsw-primary-light));
  border-radius: var(--radius) var(--radius) 0 0;
  min-height: 4px;
  transition: height 0.3s ease;
}

.day-chart-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  padding-top: 0.5rem;
  text-align: center;
}

/* =============================================================================
   Tables
   ============================================================================= */

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

.table-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.table-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

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

.admin-table th {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table td {
  font-size: 0.875rem;
  color: var(--text-primary);
}

.admin-table tbody tr:hover {
  background: var(--bg-subtle);
}

.admin-table .session-title {
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-table .capacity-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 500;
}

.admin-table .capacity-badge.full {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.users-table {
  margin-top: 1rem;
}

/* =============================================================================
   Filters
   ============================================================================= */

.sessions-filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.filter-select {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  font-size: 0.875rem;
  color: var(--text-primary);
  cursor: pointer;
}

.filter-select:focus {
  outline: none;
  border-color: var(--bsw-primary);
  box-shadow: 0 0 0 3px rgba(43, 138, 143, 0.1);
}

/* =============================================================================
   Sessions List (Admin)
   ============================================================================= */

.sessions-list-admin {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.session-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.session-row:hover {
  box-shadow: var(--shadow-md);
}

.session-row-time {
  flex-shrink: 0;
  width: 100px;
  text-align: center;
}

.session-row-time .date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.session-row-time .time {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

.session-row-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-row-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.session-row-stats {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.session-row-stat {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.session-row-stat svg {
  width: 16px;
  height: 16px;
}

.session-row-status {
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 500;
}

.session-row-status.scheduled {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.session-row-status.draft {
  background: rgba(234, 179, 8, 0.1);
  color: #ca8a04;
}

.session-row-status.cancelled {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.session-row-actions {
  display: flex;
  gap: 0.5rem;
}

.session-row-actions .btn-icon {
  padding: 0.5rem;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.session-row-actions .btn-icon:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.session-row-actions .btn-icon.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border-color: #dc2626;
}

/* =============================================================================
   Venues Grid
   ============================================================================= */

.venues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.venue-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

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

.venue-card-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.venue-card-address {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.venue-card-actions {
  display: flex;
  gap: 0.5rem;
}

.venue-card-actions .btn-icon {
  padding: 0.375rem;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.venue-card-actions .btn-icon:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.venue-card-rooms {
  padding: 1rem 1.25rem;
}

.venue-card-rooms h4 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.room-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.room-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: var(--bg-subtle);
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.room-item-name {
  color: var(--text-primary);
}

.room-item-capacity {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.venue-card-add-room {
  padding: 0 1.25rem 1.25rem;
}

.btn-add-room {
  width: 100%;
  padding: 0.5rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add-room:hover {
  border-color: var(--bsw-primary);
  color: var(--bsw-primary);
  background: rgba(43, 138, 143, 0.05);
}

/* =============================================================================
   Modals (Admin Specific)
   ============================================================================= */

.modal-large {
  max-width: 700px;
}

.modal-small {
  max-width: 400px;
}

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

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-form {
  padding: 1.5rem;
}

.form-row {
  margin-bottom: 1rem;
}

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

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text-primary);
  background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--bsw-primary);
  box-shadow: 0 0 0 3px rgba(43, 138, 143, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* Topic multi-select picker */
.topic-picker {
  position: relative;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  padding: 6px 8px;
  background: white;
  min-height: 42px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  cursor: text;
}

.topic-picker:focus-within {
  border-color: var(--bsw-primary);
  box-shadow: 0 0 0 3px rgba(43, 138, 143, 0.1);
}

.topic-tags-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.topic-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(43, 138, 143, 0.1);
  color: var(--bsw-primary);
  border: 1px solid rgba(43, 138, 143, 0.3);
  border-radius: 100px;
  padding: 3px 8px 3px 10px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.topic-tag-remove {
  background: none;
  border: none;
  color: var(--bsw-primary);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  opacity: 0.6;
}

.topic-tag-remove:hover {
  opacity: 1;
}

.topic-search-input {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 4px !important;
  font-size: 13px;
  flex: 1;
  min-width: 100px;
  background: transparent;
}

.topic-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  margin-top: 4px;
}

.topic-dropdown.open {
  display: block;
}

.topic-option {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--gray-700);
}

.topic-option:hover {
  background: rgba(43, 138, 143, 0.08);
}

.topic-option.selected {
  color: var(--bsw-primary);
  font-weight: 500;
  background: rgba(43, 138, 143, 0.05);
}

.checkbox-group {
  flex-direction: row;
  align-items: center;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.form-static-text {
  padding: 0.625rem 0;
  font-size: 0.875rem;
  color: var(--text-primary);
  margin: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}

/* =============================================================================
   Facilitators Input
   ============================================================================= */

.facilitators-input {
  position: relative;
}

.facilitator-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.facilitator-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem 0.25rem 0.75rem;
  background: var(--revel-teal-light, rgba(42, 157, 143, 0.1));
  color: var(--revel-teal, #2A9D8F);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
}

.facilitator-tag-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: currentColor;
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s, background 0.2s;
}

.facilitator-tag-remove:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.1);
}

.facilitators-input input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.facilitators-input input:focus {
  outline: none;
  border-color: var(--revel-teal, #2A9D8F);
  box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.1);
}

.facilitator-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
}

.facilitator-suggestion {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  cursor: pointer;
  transition: background 0.2s;
}

.facilitator-suggestion:hover {
  background: var(--bg-subtle);
}

.facilitator-suggestion-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.facilitator-suggestion-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

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

.facilitator-suggestion-name {
  font-weight: 500;
  color: var(--text-primary);
}

.facilitator-suggestion-email {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.facilitator-suggestion-empty {
  padding: 1rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* =============================================================================
   Check-in Tab
   ============================================================================= */

.checkin-select {
  min-width: 300px;
}

.checkin-overview {
  /* Default view when no session selected */
}

.checkin-day-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.checkin-day-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  min-width: 80px;
}

.checkin-day-tab:hover {
  border-color: var(--revel-teal, #2A9D8F);
}

.checkin-day-tab.active {
  background: var(--revel-teal, #2A9D8F);
  border-color: var(--revel-teal, #2A9D8F);
  color: white;
}

.checkin-day-tab .day-name {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.checkin-day-tab .day-date {
  font-size: 0.875rem;
  font-weight: 500;
}

.checkin-sessions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.checkin-session-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.checkin-session-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--revel-teal, #2A9D8F);
}

.checkin-session-card-time {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--revel-teal, #2A9D8F);
  margin-bottom: 0.5rem;
}

.checkin-session-card-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.checkin-session-card-venue {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.checkin-session-card-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
}

.checkin-session-card-stat {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-secondary);
}

.checkin-session-card-stat svg {
  width: 14px;
  height: 14px;
}

.checkin-session-card-stat.checked-in {
  color: #22c55e;
}

/* Check-in session view */
.checkin-session {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.checkin-session-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--revel-teal, #2A9D8F) 0%, var(--revel-teal-dark, #21867A) 100%);
  color: white;
}

.checkin-session-info h2 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.checkin-session-info p {
  opacity: 0.9;
  font-size: 0.875rem;
}

.checkin-stats {
  display: flex;
  gap: 1.5rem;
}

.checkin-stat {
  text-align: center;
}

.checkin-stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

.checkin-stat-label {
  font-size: 0.75rem;
  opacity: 0.9;
}

.checkin-controls {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.checkin-filter-pills {
  display: flex;
  gap: 0.5rem;
}

.checkin-list {
  max-height: 500px;
  overflow-y: auto;
}

.checkin-attendee {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.checkin-attendee:hover {
  background: var(--bg-subtle);
}

.checkin-attendee:last-child {
  border-bottom: none;
}

.checkin-attendee-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.checkin-attendee-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

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

.checkin-attendee-name {
  font-weight: 500;
  color: var(--text-primary);
}

.checkin-attendee-email {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.checkin-attendee-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkin-attendee-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.checkin-attendee-badge.registered {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
}

.checkin-attendee-badge.attended {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.checkin-attendee-badge.waitlisted {
  background: rgba(234, 179, 8, 0.1);
  color: #ca8a04;
}

.checkin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: white;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.checkin-btn:hover {
  border-color: #22c55e;
  color: #22c55e;
}

.checkin-btn.checked {
  background: #22c55e;
  border-color: #22c55e;
  color: white;
}

.checkin-btn svg {
  width: 18px;
  height: 18px;
}

.checkin-empty {
  padding: 3rem;
  text-align: center;
  color: var(--text-secondary);
}

/* =============================================================================
   Attendees Tab (Import Data)
   ============================================================================= */

.import-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-icon.import-total-icon {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
}

.stat-icon.import-imported-icon {
  background: rgba(245, 130, 32, 0.1);
  color: var(--bsw-accent);
}

.stat-icon.import-claimed-icon {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.stat-icon.import-pending-icon {
  background: rgba(234, 179, 8, 0.1);
  color: #ca8a04;
}

/* Progress Card */
.import-progress-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.import-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.import-progress-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.import-progress-percent {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--bsw-primary);
}

.import-progress-bar {
  height: 12px;
  background: var(--bg-subtle);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.import-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--bsw-primary), #22c55e);
  border-radius: 6px;
  transition: width 0.5s ease;
}

.import-progress-meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.import-progress-meta strong {
  color: var(--text-primary);
}

/* Attendees Filters */
.attendees-filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.attendees-filters .search-box {
  flex: 1;
  min-width: 250px;
}

/* Attendees List Card */
.attendees-list-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.attendees-table {
  margin: 0;
}

.attendees-table th {
  background: var(--bg-subtle);
  position: sticky;
  top: 0;
  z-index: 1;
}

.attendees-table .empty-cell {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

/* Attendee User Cell */
.attendee-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.attendee-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.attendee-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.attendee-info {
  min-width: 0;
}

.attendee-name {
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attendee-email {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Company Cell */
.attendee-company {
  display: flex;
  flex-direction: column;
}

.company-name {
  font-weight: 500;
  color: var(--text-primary);
}

.company-position {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Source Badge */
.source-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.source-badge.source-imported {
  background: rgba(245, 130, 32, 0.1);
  color: var(--bsw-accent);
}

.source-badge.source-claimed {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.source-badge.source-direct {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
}

/* Registration Count */
.registration-count {
  font-weight: 600;
  color: var(--text-primary);
}

/* Claimed Date */
.claimed-date {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Profile Indicators */
.profile-indicators {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.profile-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  transition: all 0.2s;
}

.profile-indicator.linkedin {
  color: #0077b5;
  background: rgba(0, 119, 181, 0.1);
}

.profile-indicator.linkedin:hover {
  background: rgba(0, 119, 181, 0.2);
}

.profile-indicator.incomplete {
  color: #ca8a04;
  background: rgba(234, 179, 8, 0.1);
}

/* Text Muted */
.text-muted {
  color: var(--text-muted);
}

/* Pagination */
.attendees-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border-top: 1px solid var(--border);
}

.pagination-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--bsw-primary);
  color: var(--bsw-primary);
}

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

.pagination-info {
  padding: 0 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* =============================================================================
   Responsive
   ============================================================================= */

@media (max-width: 1024px) {
  .charts-row,
  .tables-row {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .admin-nav {
    display: none !important;
  }

  .admin-nav.mobile-open {
    display: flex !important;
  }

  .header-actions {
    display: none;
  }

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

  .form-row.two-col,
  .form-row.three-col {
    grid-template-columns: 1fr;
  }

  .tab-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .tab-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .sessions-filters {
    flex-wrap: wrap;
  }

  .session-row {
    flex-wrap: wrap;
  }

  .session-row-stats {
    width: 100%;
    justify-content: flex-start;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
  }
}

/* === MOBILE OPTIMIZATIONS === */

/* Mobile hamburger menu toggle */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--gray-600);
  cursor: pointer;
  border-radius: var(--radius);
  transition: background-color 0.2s;
}

.mobile-menu-toggle:hover {
  background-color: var(--gray-100);
}

@media (max-width: 768px) {
  /* Show hamburger button */
  .mobile-menu-toggle {
    display: flex;
  }

  /* Mobile nav drawer */
  .admin-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-top: 1px solid var(--gray-200);
    z-index: 200;
  }

  .admin-nav.mobile-open {
    display: flex;
  }

  .admin-nav .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 0.875rem 1rem;
    min-height: 44px;
    border-radius: var(--radius);
    color: var(--gray-700);
    text-decoration: none;
    display: block;
  }

  .admin-nav .conference-select {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .admin-nav .mobile-view-schedule {
    display: block;
    width: 100%;
    padding: 0.875rem 1rem;
    min-height: 44px;
    border-radius: var(--radius);
    color: var(--gray-700);
    text-decoration: none;
    border-top: 1px solid var(--gray-200);
    margin-top: 0.5rem;
  }
}

/* Stats grid: single column on small phones */
@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
}

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

/* Venues grid: full width on mobile */
@media (max-width: 640px) {
  .venues-grid {
    grid-template-columns: 1fr;
  }
}

/* Admin table: horizontal scroll container */
@media (max-width: 768px) {
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
  }

  .admin-table {
    min-width: 600px;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.5rem 0.625rem;
    font-size: 0.8125rem;
  }

  .admin-table .session-title {
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Session rows: stack on small phones */
@media (max-width: 480px) {
  .session-row {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .session-row .session-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* Form inputs: prevent iOS zoom */
@media (max-width: 768px) {
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px;
  }
}

/* Modal adjustments for mobile */
@media (max-width: 480px) {
  .modal-content {
    width: 96%;
    max-height: 90vh;
    overflow-y: auto;
    margin: 1rem auto;
  }

  .modal-body {
    padding: 1rem;
  }

  .modal-header {
    padding: 1rem;
  }

  .modal-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .modal-actions .btn {
    width: 100%;
  }
}

/* Facilitator suggestions: bottom sheet on small screens */
@media (max-width: 480px) {
  .facilitator-suggestions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 50vh;
    border-radius: var(--radius) var(--radius) 0 0;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  }
}

/* Check-in view: stack header on mobile */
@media (max-width: 480px) {
  .checkin-session-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .checkin-stats {
    width: 100%;
    justify-content: space-around;
  }

  .checkin-actions {
    width: 100%;
  }

  .checkin-search {
    width: 100%;
  }
}

/* Increase touch targets */
@media (max-width: 768px) {
  .btn,
  .action-btn,
  .nav-tab {
    min-height: 44px;
  }

  .icon-btn {
    width: 44px;
    height: 44px;
  }
}

/* iOS momentum scroll for lists */
.checkin-list,
.sessions-list,
.users-list {
  -webkit-overflow-scrolling: touch;
}

/* === ROLE BADGE === */
.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 8px;
  background: var(--color-surface-raised, #f0f0f0);
  color: var(--color-text-secondary, #666);
}

.role-badge[data-role="admin"],
.role-badge[data-role="organizer"] {
  background: rgba(43, 138, 143, 0.15);
  color: #2B8A8F;
}

.role-badge[data-role="facilitator"] {
  background: rgba(245, 130, 32, 0.15);
  color: #c46b15;
}
