/* ==========================================================================
   VIEWS.CSS - All View-Specific Styles
   SOA Concierge Warm Design System
   ========================================================================== */


/* ==========================================================================
   LOGIN VIEW
   ========================================================================== */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1D1D1B 0%, #3a3a38 40%, #1D1D1B 100%);
  padding: var(--space-4);
  position: relative;
  overflow: hidden;
}

/* Subtle warm glow behind card */
.login-page::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(146, 116, 58, 0.10) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
  z-index: 1;
}

.login-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-12) var(--space-10);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-xl);
  animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.login-logo {
  text-align: center;
  margin-bottom: var(--space-6);
}

.login-logo-icon {
  font-size: 2.5rem;
  color: var(--color-accent);
  display: block;
  margin-bottom: var(--space-3);
}

.login-logo-text {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-text);
  display: block;
  letter-spacing: -0.02em;
}

.login-logo-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.login-form .btn-primary {
  width: 100%;
  padding: 12px;
  font-size: var(--text-md);
  margin-top: var(--space-2);
}

.login-error {
  background: var(--color-danger-light);
  color: var(--color-danger-dark);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  text-align: center;
  border: 1px solid rgba(220, 38, 38, 0.12);
  animation: fadeIn 0.3s ease;
}

.login-footer {
  text-align: center;
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-light);
}

.login-footer a {
  color: var(--color-accent);
  cursor: pointer;
  font-weight: 500;
}

.login-footer a:hover {
  color: var(--color-accent-dark);
}


/* ==========================================================================
   EVENTS VIEW (Event Selection)
   ========================================================================== */

.events-page {
  min-height: 100vh;
  background: var(--color-bg);
}

.events-topbar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

.topbar-left,
.events-topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.topbar-right,
.events-topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.events-content,
.events-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
}

.events-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-5);
}

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

.event-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  cursor: pointer;
  transition:
    box-shadow var(--transition),
    transform var(--transition),
    border-color var(--transition);
  border-top: 3px solid var(--color-accent);
  position: relative;
  box-shadow: var(--card-shadow);
}

.event-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
  border-color: var(--color-accent-200);
}

.event-card:active {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.event-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-3);
  gap: var(--space-2);
}

.event-card-name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: var(--tracking-tight);
}

.event-card-body {
  margin-bottom: var(--space-4);
}

.event-card-footer {
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-light);
}

.event-info-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-light);
  margin-bottom: var(--space-2);
}

.event-info-row:last-child {
  margin-bottom: 0;
}

.event-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}

.stat {
  text-align: center;
}

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

.stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-top: 2px;
}


/* ==========================================================================
   DASHBOARD VIEW
   ========================================================================== */

.dashboard-view {
  animation: fadeIn 0.4s ease;
}

/* Countdown Banner - Dark bg, white text */
.countdown-banner,
.countdown {
  background: var(--color-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
  color: var(--primary-foreground);
  text-align: center;
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.countdown-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(146, 116, 58, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.countdown-title {
  font-size: var(--text-base);
  opacity: 0.85;
  margin-bottom: var(--space-4);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  position: relative;
}

.countdown-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  position: relative;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-value {
  font-family: var(--font-serif);
  font-size: var(--text-5xl);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.countdown-label {
  font-size: var(--text-sm);
  opacity: 0.7;
  margin-top: var(--space-2);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  font-weight: 500;
}

@media (max-width: 640px) {
  .countdown-grid {
    gap: var(--space-4);
  }
  .countdown-value {
    font-size: var(--text-3xl);
  }
  .countdown-banner {
    padding: var(--space-6) var(--space-4);
  }
}

/* Dashboard Sections */
.dashboard-sections {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-6);
  margin-top: var(--space-6);
}

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

/* Activity List */
.activity-list {
  list-style: none;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border-light);
  font-size: var(--text-sm);
}

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

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  margin-top: 6px;
  flex-shrink: 0;
}

.activity-dot.success { background: var(--color-success); }
.activity-dot.warning { background: var(--color-warning); }
.activity-dot.danger { background: var(--color-danger); }

.activity-content {
  flex: 1;
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
}

.activity-time {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

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

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-3);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: all var(--transition);
  text-align: center;
  box-shadow: var(--card-shadow);
}

.quick-action-btn:hover {
  background: var(--muted);
  border-color: var(--color-accent-200);
  color: var(--color-accent);
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-1px);
}

.quick-action-btn .icon {
  font-size: 1.5rem;
}


/* ==========================================================================
   TASKS / KANBAN VIEW
   ========================================================================== */

.tasks-view {
  animation: fadeIn 0.4s ease;
}

/* Kanban Board */
.kanban,
.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  min-height: 400px;
}

@media (max-width: 960px) {
  .kanban,
  .kanban-board {
    grid-template-columns: 1fr;
    min-height: auto;
  }
}

.kanban-column {
  background: var(--muted);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  min-height: 200px;
  border: 1px solid var(--color-border-light);
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-border);
}

.kanban-column-title {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-text-light);
}

.kanban-column-count {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 2px 10px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
}

/* Column header accent colors */
.kanban-column.pending .kanban-column-header {
  border-color: var(--color-warning);
}
.kanban-column.pending .kanban-column-title {
  color: var(--color-warning-dark);
}

.kanban-column.in-progress .kanban-column-header,
.kanban-column.in_progress .kanban-column-header {
  border-color: var(--color-info);
}
.kanban-column.in-progress .kanban-column-title,
.kanban-column.in_progress .kanban-column-title {
  color: var(--color-info-dark);
}

.kanban-column.completed .kanban-column-header {
  border-color: var(--color-success);
}
.kanban-column.completed .kanban-column-title {
  color: var(--color-success-dark);
}

/* Kanban Cards */
.kanban-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.kanban-card,
.task-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4);
  cursor: pointer;
  transition:
    box-shadow var(--transition),
    transform var(--transition-fast),
    border-color var(--transition);
  box-shadow: var(--card-shadow);
}

.kanban-card:hover,
.task-card:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: var(--color-accent-200);
}

.kanban-card:active,
.task-card:active {
  transform: scale(0.99);
}

.kanban-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.kanban-card-title,
.task-card-title {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  line-height: var(--leading-snug);
}

.kanban-card-meta,
.task-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  gap: var(--space-2);
  flex-wrap: wrap;
}

.kanban-card-actions,
.task-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border-light);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.kanban-empty {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-style: italic;
}

/* Task move buttons */
.task-move-btns {
  display: flex;
  gap: var(--space-1);
}

.task-move-btn {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xs);
  padding: 2px 8px;
  cursor: pointer;
  font-size: var(--text-xs);
  color: var(--color-text-light);
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.task-move-btn:hover {
  background: var(--accent-subtle);
  border-color: var(--color-accent);
  color: var(--color-accent);
}


/* ==========================================================================
   SPONSORS VIEW
   ========================================================================== */

.sponsors-view {
  animation: fadeIn 0.4s ease;
}

.sponsors-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.sponsor-tier-section,
.tier-section {
  margin-bottom: var(--space-6);
}

.tier-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid;
}

.tier-header.main_partner {
  border-color: var(--color-tier-main);
}
.tier-header.main_partner .tier-name {
  color: var(--color-tier-main);
}

.tier-header.leading_sponsor {
  border-color: var(--color-tier-leading);
}
.tier-header.leading_sponsor .tier-name {
  color: var(--color-tier-leading);
}

.tier-header.partner {
  border-color: var(--color-tier-partner);
}
.tier-header.partner .tier-name {
  color: var(--color-tier-partner);
}

.tier-header.cosponsor {
  border-color: var(--color-tier-cosponsor);
}
.tier-header.cosponsor .tier-name {
  color: var(--color-tier-cosponsor);
}

.tier-header.collaborator {
  border-color: var(--color-tier-collaborator);
}
.tier-header.collaborator .tier-name {
  color: var(--color-tier-collaborator);
}

.tier-name {
  font-size: var(--text-md);
  font-weight: 600;
}

.tier-count {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 400;
}

.sponsor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: var(--space-2);
  transition: all var(--transition);
  gap: var(--space-4);
  box-shadow: var(--card-shadow);
}

.sponsor-row:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: var(--color-accent-200);
}

.sponsor-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sponsor-name {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
}

.sponsor-contact {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sponsor-details {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-shrink: 0;
}

.sponsor-amount {
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-accent);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .sponsor-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .sponsor-details {
    width: 100%;
    justify-content: space-between;
  }
}


/* ==========================================================================
   SPEAKERS VIEW
   ========================================================================== */

.speakers-view {
  animation: fadeIn 0.4s ease;
}

.speakers-view .table td {
  vertical-align: middle;
}

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


/* ==========================================================================
   ATTENDEES VIEW
   ========================================================================== */

.attendees-view {
  animation: fadeIn 0.4s ease;
}

.attendees-view .table td {
  vertical-align: middle;
}


/* ==========================================================================
   BUDGET VIEW
   ========================================================================== */

.budget-view {
  animation: fadeIn 0.4s ease;
}

.budget-progress {
  margin-bottom: var(--space-6);
}

.budget-progress .progress-bar {
  height: 10px;
  border-radius: var(--radius-full);
}

.budget-progress .progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

.budget-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-light);
}

.budget-bar {
  height: 8px;
  background: var(--muted);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: var(--space-2);
}

.budget-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}


/* ==========================================================================
   AGENDA / TIMELINE VIEW
   ========================================================================== */

.agenda-view {
  animation: fadeIn 0.4s ease;
}

.agenda-timeline {
  margin-top: var(--space-4);
}

.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(
    to bottom,
    var(--color-border),
    var(--color-accent-200),
    var(--color-border)
  );
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-4);
  padding: var(--space-5);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  box-shadow: var(--card-shadow);
}

.timeline-item:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: var(--color-accent-200);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -36px;
  top: 22px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 3px solid var(--color-bg);
  box-shadow: 0 0 0 2px var(--color-accent-200);
}

.timeline-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-2);
  gap: var(--space-3);
}

.timeline-time {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent);
}

.time-start {
  font-weight: 600;
}

.time-separator {
  color: var(--color-text-muted);
  font-weight: 400;
}

.time-end {
  font-weight: 500;
  color: var(--color-text-light);
}

.timeline-content {
  flex: 1;
}

.timeline-title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.timeline-desc {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  line-height: var(--leading-relaxed);
  margin-top: var(--space-2);
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.timeline-speakers {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.timeline-actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-shrink: 0;
  margin-left: var(--space-3);
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

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

@media (max-width: 640px) {
  .timeline {
    padding-left: 28px;
  }
  .timeline::before {
    left: 6px;
  }
  .timeline-item::before {
    left: -26px;
    width: 10px;
    height: 10px;
  }
  .timeline-item {
    padding: var(--space-4);
  }
}


/* ==========================================================================
   TEAMS VIEW
   ========================================================================== */

.teams-view {
  animation: fadeIn 0.4s ease;
}

.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-5);
}

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

.team-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--card-shadow);
  transition: all var(--transition);
}

.team-card:hover {
  box-shadow: var(--card-shadow-hover);
}

.team-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.team-card-body {
  /* Content area */
}

.team-color {
  width: 12px;
  height: 40px;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
}

.team-name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: var(--tracking-tight);
}

.team-members {
  margin-top: var(--space-1);
}

.team-member-count {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.member-list {
  list-style: none;
  margin-top: var(--space-3);
}

.member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border-light);
  gap: var(--space-3);
}

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

.member-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.member-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-subtle);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 600;
  flex-shrink: 0;
}

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

.member-role {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.team-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-light);
}


/* ==========================================================================
   SETTINGS VIEW
   ========================================================================== */

.settings-page {
  animation: fadeIn 0.4s ease;
  padding: var(--space-6) var(--space-8);
  max-width: 1100px;
  margin: 0 auto;
}

.settings-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.topbar-divider {
  color: var(--color-border);
  margin: 0 var(--space-1);
}
.topbar-section {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 500;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.settings-content {
  max-width: none;
}

.settings-content .card {
  margin-bottom: var(--space-5);
}

.settings-section {
  margin-bottom: var(--space-8);
}

.settings-section-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border-light);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border-light);
  gap: var(--space-4);
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-row-label {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
}

.settings-row-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: 2px;
}


/* ==========================================================================
   DOCUMENTS VIEW
   ========================================================================== */

.documents-view {
  animation: fadeIn 0.4s ease;
}

.documents-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.document-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--card-shadow);
}

.document-card:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: var(--color-accent-200);
}

.doc-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--accent-subtle);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

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

.doc-name {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
  margin-bottom: 2px;
}

.doc-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  flex-wrap: wrap;
}

.doc-footer {
  margin-top: var(--space-1);
}

.doc-actions {
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .document-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .doc-actions {
    width: 100%;
    display: flex;
    justify-content: flex-end;
  }
}


/* ==========================================================================
   CHAT IA VIEW
   ========================================================================== */

/* Override main-content when chat is active — remove padding, fill height */
.main-content:has(.chat-view),
.main-content.main-content--chat {
  padding: 0 !important;
  max-width: none !important;
  display: flex !important;
  flex-direction: column !important;
  height: calc(100vh - var(--header-height)) !important;
  overflow: hidden !important;
}

/* Chat — Claude-style centered layout */
.chat-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  padding: 0 var(--space-6);
}
.chat-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: var(--space-2) 0;
  flex-shrink: 0;
}

.chat-help {
  background: var(--muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  animation: fadeIn 0.3s ease;
  flex-shrink: 0;
  max-height: 400px;
  overflow-y: auto;
}
.chat-help h3 { margin: 0 0 var(--space-3); font-size: var(--text-lg); }
.chat-help h4 { margin: var(--space-3) 0 var(--space-1); font-size: var(--text-base); color: var(--color-accent); }
.help-example {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  padding: var(--space-1) var(--space-3);
  background: var(--color-bg-card);
  border-radius: var(--radius-sm);
  margin: var(--space-1) 0;
  border-left: 2px solid var(--color-accent-200);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Empty state: welcome + input centered vertically like Claude */
.chat-view.chat-empty .chat-messages {
  justify-content: flex-end;
  overflow: hidden;
}
.chat-view.chat-empty .chat-input-bar {
  border-top: none;
  padding-bottom: 20vh;
}

.chat-welcome {
  text-align: center;
  padding: 0 var(--space-4) var(--space-6);
  color: var(--color-text-light);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.chat-welcome h3 {
  color: var(--color-text);
  margin-bottom: var(--space-2);
  font-size: var(--text-xl, 1.25rem);
}
.chat-welcome p { max-width: 400px; line-height: var(--leading-relaxed); }
.chat-welcome-examples {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  margin-top: var(--space-6);
}
.chat-suggestion {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
  color: var(--color-text-secondary);
}
.chat-suggestion:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--accent-subtle);
}

/* Messages — user right-aligned bubble, assistant left-aligned clean text */
.chat-msg { display: flex; width: 100%; }
.chat-msg-user { justify-content: flex-end; }
.chat-msg-assistant { justify-content: flex-start; }

.chat-bubble {
  max-width: 85%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  line-height: var(--leading-relaxed);
}
.chat-bubble-user {
  background: var(--color-primary);
  color: var(--primary-foreground);
  border-bottom-right-radius: var(--radius-xs);
}
.chat-bubble-assistant {
  background: transparent;
  border: none;
  padding: var(--space-2) 0;
  max-width: 100%;
}
.chat-bubble-content {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-bubble-time {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
  opacity: 0.5;
}
.chat-bubble-user .chat-bubble-time { color: rgba(255,255,255,0.6); }

/* Preview card */
.chat-preview-card {
  min-width: 300px;
  max-width: 500px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.preview-header { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); }
.preview-badge { font-size: var(--text-xs); font-weight: 600; padding: 2px 8px; border-radius: var(--radius-full); }
.preview-badge.badge-success { background: var(--color-success-light); color: var(--color-success-dark); }
.preview-badge.badge-info { background: var(--color-info-light); color: var(--color-info-dark); }
.preview-confidence { font-size: var(--text-xs); color: var(--color-text-muted); }
.preview-message { font-size: var(--text-sm); color: var(--color-text-light); margin-bottom: var(--space-3); }
.preview-fields { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-3); }
.preview-field label { display: block; font-size: var(--text-xs); font-weight: 600; color: var(--color-text-muted); margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.05em; }
.preview-field .form-input-sm { font-size: var(--text-sm); padding: var(--space-2); }
.preview-actions { display: flex; gap: var(--space-2); }
.btn-success { background: var(--color-success); color: white; border: none; }
.btn-success:hover { background: var(--color-success-dark); }

/* Export card */
.chat-export-card {
  min-width: 300px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.export-text {
  background: var(--muted);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: var(--space-2);
  font-family: var(--font-sans);
  line-height: var(--leading-relaxed);
}

/* Typing indicator */
.chat-typing { display: flex; gap: 4px; padding: var(--space-2) 0; }
.chat-typing span { width: 8px; height: 8px; border-radius: 50%; background: var(--color-text-muted); animation: typingDot 1.4s infinite ease-in-out; }
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }

/* Input bar — centered, Claude-style */
.chat-input-bar {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
  align-items: flex-end;
}
.chat-attach-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-card);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}
.chat-attach-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }
.chat-attach-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.chat-input-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-card);
  transition: border-color var(--transition);
  overflow: hidden;
}
.chat-input-wrapper:focus-within { border-color: var(--color-accent); }
.chat-file-chip {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--accent-subtle);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}
.chat-file-chip-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-accent);
  font-weight: 500;
}
.chat-file-chip-remove {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 1.2em;
  line-height: 1;
  padding: 0 2px;
}
.chat-file-chip-remove:hover { color: var(--color-danger); }
.chat-input {
  flex: 1;
  border: none;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  outline: none;
  background: transparent;
}
.chat-send-btn {
  background: var(--color-primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  height: 40px;
}
.chat-send-btn:hover:not(:disabled) { background: var(--color-accent); }
.chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 640px) {
  .chat-view { padding: 0 var(--space-3); }
  .chat-bubble { max-width: 90%; }
  .chat-preview-card { min-width: auto; }
  .chat-input-bar { padding: var(--space-2) 0; }
}

/* ===== Dinner View ===== */
.dinner-config-bar {
  display: flex;
  gap: var(--space-6);
  padding: var(--space-3) var(--space-5);
  background: var(--muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-light);
  flex-wrap: wrap;
}
