:root {
  --navy: #07090f;
  --navy-light: #0e1220;
  --surface: #141928;
  --slate: #1c2540;
  --stone: #6b7a99;
  --cream: #dde3f5;
  --gold: #f59e0b;
  --gold-light: #fbbf24;
  --accent: #4f8ef7;
  --accent-light: #7eb3ff;
  --accent-dim: rgba(79, 142, 247, 0.12);
  --accent-glow: rgba(79, 142, 247, 0.25);
  --green: #10b981;
  --red: #ef4444;
  --radius-pill: 50px;
  --radius-card: 20px;
  --radius-input: 50px;
  --support-gradient: linear-gradient(
    135deg,
    var(--navy-light) 0%,
    var(--slate) 100%
  );
  --support-card-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Space Grotesk", Inter, sans-serif;
  background: var(--navy);
  background-image:
    radial-gradient(
      ellipse 70% 50% at 15% 90%,
      rgba(79, 142, 247, 0.1) 0%,
      transparent 65%
    ),
    radial-gradient(
      ellipse 50% 60% at 85% 5%,
      rgba(79, 142, 247, 0.07) 0%,
      transparent 60%
    );
  background-attachment: fixed;
  color: var(--cream);
  min-height: 100vh;
}

/* Buttons (shared across app) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: all 0.18s ease;
  cursor: pointer;
  border: none;
  color: var(--cream);
  background: var(--surface);
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(79, 142, 247, 0.3);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79, 142, 247, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--cream);
  border: 1.5px solid var(--slate);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

/* Layout */
.app {
  display: flex;
  height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 272px;
  background: var(--navy-light);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--slate);
}

.logo {
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.sidebar-nav {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
}

.sidebar-section {
  margin-bottom: 24px;
}

.sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--stone);
}

.saved-chat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--cream);
  font-size: 14px;
  margin-bottom: 4px;
  transition: all 0.15s ease;
}

.saved-chat-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.saved-chat-item.active {
  background: rgba(217, 119, 6, 0.15);
  color: var(--gold);
}

.saved-chat-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-chat-delete {
  opacity: 0;
  background: none;
  border: none;
  color: var(--red);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  transition: opacity 0.15s ease;
}

.saved-chat-item:hover .saved-chat-delete {
  opacity: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  color: var(--stone);
  transition: all 0.18s ease;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 500;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--cream);
}

.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent-light);
  box-shadow: inset 0 0 0 1px rgba(79, 142, 247, 0.2);
}

.sidebar-divider {
  height: 1px;
  background: rgba(71, 85, 105, 0.3);
  margin: 12px 16px;
}

.nav-icon {
  font-size: 18px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--slate);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: all 0.2s;
}

.user-info:hover {
  background: rgba(217, 119, 6, 0.15);
  transform: translateY(-1px);
}

.logout-btn {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1.5px solid var(--slate);
  border-radius: var(--radius-pill);
  color: var(--stone);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--red);
  color: #fca5a5;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.user-details {
  flex: 1;
}

.user-name {
  font-size: 14px;
  font-weight: 500;
}

.user-plan {
  font-size: 12px;
  color: var(--stone);
}

/* Main Content */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Chat View */
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.chat-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--slate);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-title {
  font-size: 18px;
  font-weight: 600;
}

.chat-actions {
  display: flex;
  gap: 8px;
}

.chat-action-btn {
  background: var(--surface);
  border: 1px solid var(--slate);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  color: var(--stone);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-action-btn:hover {
  background: var(--slate);
  border-color: var(--accent);
  color: var(--accent-light);
}

.chat-action-btn.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--red);
  color: #fca5a5;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  max-height: calc(100vh - 200px);
}

.message {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
  max-width: 100%;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.message.user .message-avatar {
  background: var(--surface);
  border: 1px solid var(--slate);
}

.message.assistant .message-avatar {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 12px rgba(79, 142, 247, 0.3);
}

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

.message.user .message-content {
  background: var(--surface);
  padding: 14px 18px;
  border-radius: 18px 18px 6px 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.message.assistant .message-content {
  background: var(--accent-dim);
  padding: 14px 18px;
  border-radius: 6px 18px 18px 18px;
  border: 1px solid rgba(79, 142, 247, 0.15);
}

.message-role {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--stone);
  display: flex;
  align-items: center;
  gap: 8px;
}

.message.assistant .message-role {
  color: var(--accent-light);
}

.message-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.speech-speed-control {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.05);
}

.speech-speed-slider {
  accent-color: var(--gold);
  cursor: pointer;
}

.message-action-btn {
  background: transparent;
  border: 1px solid var(--slate);
  color: var(--stone);
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  transition: all 0.15s ease;
}

.message-action-btn:hover {
  background: var(--slate);
  color: var(--gold);
  border-color: var(--gold);
}

.message-action-btn svg {
  width: 14px;
  height: 14px;
}

.message-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--cream);
}

.message.user .message-text {
  white-space: pre-wrap;
}

.message.assistant .message-text {
  color: #f1f5f9;
}

.message-text a {
  color: var(--gold-light);
  text-decoration: underline;
  transition: all 0.15s ease;
}

.message-text a:hover {
  color: var(--gold);
  text-decoration: none;
}

.message-text p {
  margin-bottom: 12px;
}

.message-text p:last-child {
  margin-bottom: 0;
}

.message-text h1, .message-text h2, .message-text h3,
.message-text h4, .message-text h5, .message-text h6 {
  color: var(--gold-light);
  margin-top: 20px;
  margin-bottom: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}

.message-text h1 { font-size: 1.4em; }
.message-text h2 { font-size: 1.25em; }
.message-text h3 { font-size: 1.1em; }
.message-text h4 { font-size: 1em; }

.message-text h1:first-child, .message-text h2:first-child,
.message-text h3:first-child, .message-text h4:first-child {
  margin-top: 0;
}

.message-text ul, .message-text ol {
  margin: 8px 0;
  padding-left: 24px;
}

.message-text li {
  margin-bottom: 6px;
}

.message-text li > ul, .message-text li > ol {
  margin-top: 4px;
  margin-bottom: 4px;
}

.message-text blockquote {
  border-left: 3px solid var(--gold);
  margin: 12px 0;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 6px 6px 0;
  color: var(--stone);
}

.message-text code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.message-text pre code {
  background: none;
  padding: 0;
  border-radius: 0;
}

.message-text hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 16px 0;
}

.message-text table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0;
}

.message-text th, .message-text td {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  text-align: left;
}

.message-text th {
  background: rgba(255, 255, 255, 0.05);
  color: var(--gold-light);
  font-weight: 600;
}

/* Chat Input */
.chat-input-container {
  padding: 20px 24px;
  border-top: 1px solid var(--slate);
}

.chat-input-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--navy-light);
  border: 1.5px solid var(--slate);
  border-radius: 36px;
  padding: 10px 16px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.chat-input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px var(--accent-dim),
    0 4px 20px rgba(79, 142, 247, 0.1);
}

.chat-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 15px;
  font-family: inherit;
  resize: none;
  max-height: 150px;
  line-height: 1.5;
}

.chat-input::placeholder {
  color: var(--stone);
}

.chat-input:focus {
  outline: none;
}

.send-btn {
  background: var(--accent);
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 22px;
  color: #fff;
  font-weight: 600;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 2px 12px rgba(79, 142, 247, 0.35);
  white-space: nowrap;
  flex-shrink: 0;
}

.send-btn:hover {
  background: var(--accent-light);
  box-shadow: 0 4px 20px rgba(79, 142, 247, 0.5);
  transform: translateY(-1px);
}

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

.btn-loading {
  position: relative;
  opacity: 0.7;
  pointer-events: none;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  top: 50%;
  left: 50%;
  margin-left: -7px;
  margin-top: -7px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Files View */
.files-container {
  padding: 24px;
  display: none;
}

.files-container.active {
  display: block;
}

.files-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.files-title {
  font-family: "Playfair Display", serif;
  font-size: 24px;
}

.upload-btn {
  background: var(--accent);
  border: none;
  border-radius: var(--radius-pill);
  padding: 11px 22px;
  color: #fff;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 12px rgba(79, 142, 247, 0.3);
  transition: all 0.18s ease;
}

.upload-btn:hover {
  background: var(--accent-light);
  box-shadow: 0 4px 20px rgba(79, 142, 247, 0.45);
  transform: translateY(-1px);
}

/* Enhanced File Organization */
.files-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-filter-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-input-wrapper {
  position: relative;
}

.search-input {
  background: var(--navy-light);
  border: 1.5px solid var(--slate);
  border-radius: var(--radius-pill);
  padding: 9px 16px 9px 38px;
  color: var(--cream);
  font-size: 14px;
  font-family: inherit;
  width: 240px;
  transition: all 0.2s ease;
}

.search-input::placeholder {
  color: var(--stone);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--stone);
  font-size: 14px;
}

.category-filter {
  background: var(--navy-light);
  border: 1.5px solid var(--slate);
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  color: var(--cream);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

.category-filter:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.files-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 16px;
  background: var(--navy-light);
  border-radius: 8px;
  margin-bottom: 16px;
  border: 1px solid var(--slate);
}

.stats-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stats-label {
  font-size: 12px;
  color: var(--stone);
  font-weight: 500;
}

.stats-value {
  font-size: 14px;
  color: var(--cream);
  font-weight: 600;
}

.category-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tab-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1.5px solid var(--slate);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-width: fit-content;
  font-family: inherit;
}

.tab-item:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent-light);
}

.tab-item.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(79, 142, 247, 0.3);
}

.tab-icon {
  font-size: 14px;
}

.tab-label {
  font-size: 13px;
  font-weight: 500;
}

.tab-count {
  background: rgba(255, 255, 255, 0.2);
  color: var(--cream);
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  min-width: 18px;
  text-align: center;
}

.tab-item.active .tab-count {
  background: rgba(15, 23, 42, 0.3);
  color: var(--navy);
}

.suggested-categories {
  margin-top: 16px;
}

.suggested-categories h4 {
  font-size: 14px;
  color: var(--stone);
  margin-bottom: 8px;
}

.category-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.suggestion-tag {
  background: var(--navy-light);
  border: 1px solid var(--slate);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--cream);
}

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

#filesGrid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.file-category {
  margin-bottom: 32px;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--slate);
}

.category-icon {
  font-size: 24px;
}

.category-title {
  font-family: "Playfair Display", serif;
  font-size: 20px;
  margin: 0;
  color: var(--gold);
}

.category-count {
  font-size: 14px;
  color: var(--stone);
  margin-left: auto;
}

.category-files {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.file-card {
  background: var(--surface);
  border: 1.5px solid var(--slate);
  border-radius: var(--radius-card);
  padding: 20px;
  position: relative;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.file-card:hover {
  border-color: rgba(79, 142, 247, 0.3);
  box-shadow: 0 4px 20px rgba(79, 142, 247, 0.08);
}

.file-delete-x {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(220, 38, 38, 0.2);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fca5a5;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.file-delete-x:hover {
  background: rgba(220, 38, 38, 0.4);
  color: #f87171;
}

.file-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.file-name {
  font-weight: 500;
  margin-bottom: 4px;
  overflow-wrap: break-word;
}

.file-meta {
  font-size: 13px;
  color: var(--stone);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.file-date {
  opacity: 0.8;
}

.ocr-warning {
  background: rgba(234, 179, 8, 0.2);
  color: #fbbf24;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: help;
}

.file-type {
  background: rgba(217, 119, 6, 0.15);
  color: var(--gold);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  text-transform: uppercase;
}

.file-actions {
  margin-top: 16px;
  display: flex;
  gap: 8px;
}

.file-action-btn {
  background: var(--slate);
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--cream);
  font-size: 13px;
  cursor: pointer;
}

.file-action-btn.delete {
  background: rgba(220, 38, 38, 0.2);
  color: #fca5a5;
}

/* Upload Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

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

.modal {
  background: var(--navy-light);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.modal-title {
  font-family: "Playfair Display", serif;
  font-size: 22px;
  margin-bottom: 20px;
}

.drop-zone {
  border: 2px dashed var(--slate);
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--gold);
  background: rgba(217, 119, 6, 0.05);
}

.drop-zone-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.drop-zone-text {
  color: var(--stone);
  margin-bottom: 8px;
}

.drop-zone-hint {
  font-size: 13px;
  color: var(--slate);
}

.file-type-select {
  margin-top: 20px;
}

.file-type-select label {
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--stone);
}

.file-type-select select {
  width: 100%;
  background: var(--navy);
  border: 1px solid var(--slate);
  border-radius: 8px;
  padding: 12px;
  color: var(--cream);
  font-size: 14px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.modal-btn {
  flex: 1;
  padding: 14px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all 0.18s ease;
}

.modal-btn.secondary {
  background: var(--surface);
  color: var(--stone);
  border: 1.5px solid var(--slate);
}

.modal-btn.secondary:hover {
  border-color: var(--accent);
  color: var(--cream);
}

.modal-btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(79, 142, 247, 0.3);
}

.modal-btn.primary:hover {
  background: var(--accent-light);
  box-shadow: 0 6px 20px rgba(79, 142, 247, 0.45);
}

/* Subscription Modal */
.subscription-description {
  color: var(--stone);
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.5;
}

.pricing-plans {
  margin-bottom: 20px;
}

.pricing-plan {
  border: 1px solid var(--slate);
  border-radius: 12px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s ease;
}

.pricing-plan:hover {
  border-color: var(--gold);
  background: rgba(217, 119, 6, 0.05);
}

.plan-header {
  text-align: center;
  margin-bottom: 16px;
}

.plan-header h4 {
  color: var(--cream);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.plan-price .price {
  font-size: 32px;
  font-weight: 700;
  color: var(--gold);
}

.plan-price .period {
  color: var(--stone);
  font-size: 16px;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 16px 0 20px 0;
}

.plan-features li {
  color: var(--stone);
  padding: 6px 0;
  display: flex;
  align-items: center;
}

.plan-features li:before {
  content: "✓";
  color: var(--gold);
  font-weight: bold;
  margin-right: 12px;
}

.plan-btn {
  width: 100%;
  padding: 13px 24px;
  border: none;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
}

.plan-btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(79, 142, 247, 0.3);
}

.plan-btn.primary:hover {
  background: var(--accent-light);
  box-shadow: 0 6px 20px rgba(79, 142, 247, 0.45);
  transform: translateY(-2px);
}

/* Auth View */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-card {
  background: var(--navy-light);
  border-radius: 16px;
  padding: 40px;
  max-width: 420px;
  width: 100%;
}

.auth-logo {
  font-family: "Playfair Display", serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
  margin-bottom: 8px;
}

.auth-subtitle {
  text-align: center;
  color: var(--stone);
  margin-bottom: 32px;
}

.settings-section-card {
  background: var(--surface);
  border: 1.5px solid var(--slate);
  border-radius: var(--radius-card);
  padding: 24px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-section-card:hover {
  border-color: rgba(79, 142, 247, 0.4);
  background: var(--accent-dim);
}

.settings-section-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.settings-section-content {
  flex: 1;
}

.settings-section-title {
  font-family: "Playfair Display", serif;
  font-size: 18px;
  margin: 0 0 6px 0;
  color: var(--cream);
}

.settings-section-description {
  font-size: 14px;
  color: var(--stone);
  margin: 0;
}

.settings-section-arrow {
  font-size: 24px;
  color: var(--gold);
  flex-shrink: 0;
}

.back-btn {
  background: var(--slate);
  border: 1px solid var(--slate);
  border-radius: 8px;
  padding: 10px 16px;
  color: var(--cream);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.back-btn:hover {
  background: var(--navy-light);
  border-color: var(--gold);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  background: var(--navy-light);
  border: 1.5px solid var(--slate);
  border-radius: var(--radius-pill);
  padding: 13px 20px;
  color: var(--cream);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s ease;
}

textarea.form-input {
  border-radius: 18px;
  resize: vertical;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

select.form-input {
  font-size: 18px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

select.form-input option {
  font-size: 20px;
  padding: 16px;
  background: var(--navy);
  color: var(--cream);
  line-height: 1.8;
  min-height: 48px;
}

@supports (-webkit-touch-callout: none) {
  select.form-input option {
    font-size: 22px;
    padding: 20px;
  }
}

.auth-btn {
  width: 100%;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-pill);
  padding: 16px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 4px 16px rgba(79, 142, 247, 0.35);
  transition: all 0.18s ease;
}

.auth-btn:hover {
  background: var(--accent-light);
  box-shadow: 0 6px 24px rgba(79, 142, 247, 0.5);
  transform: translateY(-1px);
}

.auth-switch {
  text-align: center;
  margin-top: 24px;
  color: var(--stone);
}

.auth-switch a {
  color: var(--gold);
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.auth-forgot {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
}

.auth-forgot a {
  color: var(--gold);
  text-decoration: none;
}

.auth-forgot a:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

.auth-error {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: #fca5a5;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}

.auth-error.show {
  display: block;
}

/* Loading State */
.loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--stone);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--slate);
  border-top-color: var(--accent-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Empty State */
.empty-state {
  text-align: center;
  padding: 24px 16px;
  color: var(--stone);
}

.welcome-message {
  text-align: left;
  margin-bottom: 24px;
}

.welcome-message .message {
  animation: welcome-fade-in 0.4s ease-out;
}

#emptyChat .preset-questions {
  opacity: 0;
}

.welcome-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 14px;
  background: var(--navy-light);
  border: 1px solid var(--slate);
  border-radius: var(--radius-pill);
  color: var(--cream);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.welcome-play-btn:hover {
  background: var(--surface);
  border-color: var(--accent);
}

.welcome-play-btn.playing {
  background: var(--surface);
  border-color: var(--gold);
  color: var(--gold);
}

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

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.preset-questions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 32px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.preset-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: var(--navy-light);
  border: 1.5px solid var(--slate);
  border-radius: var(--radius-pill);
  color: var(--cream);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
}

.preset-btn:hover {
  background: var(--surface);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(79, 142, 247, 0.15);
}

.preset-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.suggestion-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--surface);
  border: 1.5px solid var(--slate);
  border-radius: var(--radius-pill);
  color: var(--stone);
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.suggestion-chip:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 2px 12px rgba(79, 142, 247, 0.2);
}

.preset-text {
  font-weight: 500;
}

.empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 8px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
}

.toast {
  background: var(--surface);
  border: 1.5px solid var(--slate);
  border-radius: 18px;
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: slide-in 0.3s ease;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.08);
}

.toast.success {
  border-color: rgba(5, 150, 105, 0.5);
  background: rgba(5, 150, 105, 0.1);
}

.toast.info {
  border-color: rgba(79, 142, 247, 0.4);
  background: rgba(79, 142, 247, 0.08);
}

.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
  color: var(--cream);
}

@keyframes slide-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Offline Banner */
.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #f59e0b;
  color: #78350f;
  padding: 12px 20px;
  text-align: center;
  font-weight: 600;
  z-index: 9999;
  animation: slide-down 0.3s ease;
  display: none;
}

.offline-banner.show {
  display: block;
}

@keyframes slide-down {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

.loading-overlay.active {
  display: flex;
}

.loading-spinner {
  background: var(--surface);
  border: 1.5px solid var(--slate);
  border-radius: 24px;
  padding: 40px 56px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.loading-spinner .spinner {
  width: 48px;
  height: 48px;
  border-width: 4px;
  margin: 0 auto 16px;
}

.loading-spinner-text {
  color: var(--cream);
  font-size: 16px;
}

/* Progress Bar */
.upload-progress {
  margin-top: 16px;
  display: none;
}

.upload-progress.show {
  display: block;
}

.upload-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--stone);
  margin-bottom: 8px;
}

.upload-progress-track {
  height: 6px;
  background: var(--slate);
  border-radius: 3px;
  overflow: hidden;
}

.upload-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  width: 0%;
  transition: width 0.2s ease;
  border-radius: 3px;
}

/* Skeleton Loading */
.skeleton-file-card {
  background: var(--navy-light);
  border: 1px solid var(--slate);
  border-radius: 12px;
  padding: 20px;
  animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-icon {
  width: 32px;
  height: 32px;
  background: var(--slate);
  border-radius: 4px;
  margin-bottom: 12px;
}

.skeleton-text {
  height: 16px;
  background: var(--slate);
  border-radius: 4px;
  margin-bottom: 8px;
}

.skeleton-text.short {
  width: 60%;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Message Status Icons */
.message-status {
  display: inline-block;
  margin-left: 6px;
  font-size: 12px;
}

.message-status.pending {
  color: var(--stone);
}

.message-status.failed {
  color: var(--red);
  cursor: pointer;
}

/* Chat Attachments */
.attachment-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1.5px solid var(--slate);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 13px;
  color: var(--cream);
  position: relative;
}

.attachment-chip.has-ocr {
  border-color: var(--accent);
}

.attachment-chip-ocr-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 50px;
  text-transform: uppercase;
}

.attachment-chip-remove {
  background: none;
  border: none;
  color: var(--stone);
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  line-height: 1;
  margin-left: 4px;
}

.attachment-chip-remove:hover {
  color: var(--red);
}

.ocr-preview-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.ocr-preview-modal.active {
  display: flex;
}

.ocr-preview-content {
  background: var(--navy-light);
  border-radius: 16px;
  padding: 24px;
  max-width: 800px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}

.ocr-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--slate);
}

.ocr-preview-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--cream);
}

.ocr-confidence {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--stone);
  background: rgba(217, 119, 6, 0.15);
  padding: 4px 10px;
  border-radius: 6px;
}

.ocr-confidence.high {
  color: var(--green);
  background: rgba(5, 150, 105, 0.15);
}

.ocr-text-preview {
  background: var(--navy);
  border: 1px solid var(--slate);
  border-radius: 8px;
  padding: 16px;
  font-family: "Courier New", monospace;
  font-size: 13px;
  line-height: 1.6;
  color: var(--cream);
  white-space: pre-wrap;
  overflow-wrap: break-word;
  max-height: 400px;
  overflow-y: auto;
}

.ocr-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.ocr-action-btn {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.ocr-action-btn.primary {
  background: var(--gold);
  color: var(--navy);
}

.ocr-action-btn.secondary {
  background: var(--slate);
  color: var(--cream);
}

/* File Size Warning */
.file-size-warning {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(217, 119, 6, 0.15);
  border: 1px solid rgba(217, 119, 6, 0.3);
  border-radius: 6px;
  font-size: 13px;
  color: var(--gold);
  display: none;
}

.file-size-warning.show {
  display: block;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 101;
  background: var(--surface);
  border: 1.5px solid var(--slate);
  color: var(--accent-light);
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.mobile-menu-btn:hover {
  background: rgba(31, 41, 55, 0.95);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

.sidebar-overlay.active {
  display: block;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .mobile-menu-btn {
    display: block;
  }

  .files-header {
    padding-left: 56px;
  }

  .files-title {
    font-size: 20px;
  }

  .sidebar {
    display: none;
  }

  .app.sidebar-open .sidebar {
    display: flex;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    bottom: 0;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.5);
  }

  .main {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .chat-container {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .chat-header {
    padding: 12px 12px 12px 56px;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
  }

  .chat-title {
    font-size: 15px;
    flex-shrink: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .chat-actions {
    gap: 4px;
    flex-shrink: 0;
  }

  .chat-action-btn {
    padding: 8px;
    font-size: 16px;
    min-width: 36px;
  }

  .chat-action-btn span:last-child {
    display: none;
  }

  .chat-messages {
    padding: 12px 8px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .message {
    padding: 8px 0;
    gap: 8px;
    max-width: 100%;
    box-sizing: border-box;
  }

  .message-avatar {
    width: 28px;
    height: 28px;
    font-size: 12px;
    flex-shrink: 0;
  }

  .message-content {
    font-size: 14px;
    line-height: 1.6;
    max-width: calc(100vw - 60px);
    overflow-wrap: break-word;
  }

  .message-content p {
    overflow-wrap: break-word;
  }

  .message.user .message-content,
  .message.assistant .message-content {
    padding: 10px 12px;
  }

  .chat-input-container {
    padding: 8px;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
  }

  .chat-input {
    font-size: 16px;
    padding: 10px 12px;
  }

  .send-btn {
    padding: 10px 14px;
    font-size: 14px;
    flex-shrink: 0;
  }

  .empty-state {
    padding: 20px 16px;
  }

  .preset-questions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
  }

  .preset-btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .preset-icon {
    font-size: 18px;
  }

  .chat-citation {
    padding: 8px 10px;
    font-size: 11px;
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .citation-title {
    font-size: 12px;
  }

  .code-block-wrapper {
    margin: 12px 0;
    max-width: 100%;
    overflow-x: auto;
  }

  .code-block pre {
    font-size: 11px;
    padding: 10px;
    max-width: 100%;
    overflow-x: auto;
  }

  .code-block pre code {
    white-space: pre;
  }

  .files-container,
  .settings-container,
  #assessmentContent {
    padding: 12px 8px;
    max-width: 100vw;
    box-sizing: border-box;
  }

  .settings-section-card {
    margin-left: 0;
    margin-right: 0;
  }
}

.code-block-wrapper {
  margin: 16px 0;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(71, 85, 105, 0.3);
  overflow: hidden;
}

.code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(30, 41, 59, 0.8);
  border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

.code-block-language {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.code-block-download-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-dim);
  border: 1px solid rgba(79, 142, 247, 0.25);
  color: var(--accent-light);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.code-block-download-btn:hover {
  background: rgba(79, 142, 247, 0.2);
  border-color: var(--accent);
}

.code-block-download-btn svg {
  flex-shrink: 0;
}

.code-block {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  background: transparent;
}

.code-block code {
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  line-height: 1.6;
  color: #e2e8f0;
  white-space: pre;
}

/* ============================================
       Support Page Styles
       ============================================ */

.support-content {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px;
}

.support-hero {
  text-align: center;
  margin-bottom: 32px;
  padding: 32px 24px;
  background: var(--support-gradient);
  border-radius: 16px;
  border: 1px solid rgba(217, 119, 6, 0.1);
}

.support-hero-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.support-hero-title {
  font-family: "Playfair Display", serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 12px;
}

.support-hero-subtitle {
  font-size: 16px;
  color: var(--stone);
  line-height: 1.5;
  max-width: 400px;
  margin: 0 auto;
}

.support-action-card {
  background: var(--navy-light);
  border: 1px solid var(--slate);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--support-card-shadow);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.support-action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.4);
}

.support-action-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.support-action-icon {
  font-size: 32px;
  line-height: 1;
  margin-top: 4px;
}

.support-action-content {
  flex: 1;
}

.support-action-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 4px;
}

.support-action-description {
  font-size: 14px;
  color: var(--stone);
  line-height: 1.4;
}

.support-chat-btn {
  width: 100%;
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--accent-light) 100%
  );
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(79, 142, 247, 0.35);
}

.support-chat-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(79, 142, 247, 0.5);
  background: linear-gradient(
    135deg,
    var(--accent-light) 0%,
    var(--accent) 100%
  );
}

.support-chat-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(79, 142, 247, 0.3);
}

.support-btn-arrow {
  font-size: 18px;
  transition: transform 0.2s ease;
}

.support-chat-btn:hover .support-btn-arrow {
  transform: translateX(2px);
}

.support-features {
  display: grid;
  gap: 16px;
  margin-bottom: 32px;
}

.support-feature {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(71, 85, 105, 0.3);
  border-radius: 8px;
  transition: background 0.2s ease;
}

.support-feature:hover {
  background: rgba(30, 41, 59, 0.7);
}

.support-feature-icon {
  font-size: 24px;
  line-height: 1;
}

.support-feature-content {
  flex: 1;
}

.support-feature-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 2px;
}

.support-feature-subtitle {
  font-size: 12px;
  color: var(--stone);
}

.support-issues {
  background: rgba(30, 41, 59, 0.3);
  border: 1px solid rgba(71, 85, 105, 0.3);
  border-radius: 12px;
  padding: 24px;
}

.support-issues-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 16px;
}

.support-issues-list {
  display: grid;
  gap: 8px;
}

.support-issue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.support-issue-icon {
  font-size: 16px;
  line-height: 1;
}

.support-issue-text {
  font-size: 14px;
  color: var(--cream);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .support-content {
    padding: 16px;
  }

  .support-hero {
    padding: 24px 16px;
    margin-bottom: 24px;
  }

  .support-hero-title {
    font-size: 24px;
  }

  .support-hero-subtitle {
    font-size: 14px;
  }

  .support-action-card {
    padding: 20px;
    margin-bottom: 24px;
  }

  .support-action-header {
    gap: 12px;
    margin-bottom: 16px;
  }

  .support-action-icon {
    font-size: 28px;
  }

  .support-action-title {
    font-size: 18px;
  }

  .support-chat-btn {
    padding: 14px 20px;
    font-size: 15px;
  }

  .support-features {
    gap: 12px;
    margin-bottom: 24px;
  }

  .support-feature {
    padding: 12px;
    gap: 12px;
  }

  .support-feature-icon {
    font-size: 20px;
  }

  .support-issues {
    padding: 20px;
  }

  .support-issues-title {
    font-size: 15px;
  }

  .support-issue-text {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .support-content {
    padding: 12px;
  }

  .support-hero {
    padding: 20px 12px;
  }

  .support-hero-icon {
    font-size: 40px;
  }

  .support-hero-title {
    font-size: 22px;
  }

  .support-action-card {
    padding: 16px;
  }

  .support-action-header {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  .support-chat-btn {
    padding: 12px 16px;
  }

  .support-issues {
    padding: 16px;
  }
}

/* ============================================
       Timeline View Styles
       ============================================ */

.timeline-content {
  padding: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.timeline-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}

.timeline-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.timeline-select {
  background: var(--navy-light);
  border: 1px solid var(--slate);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--cream);
  font-size: 14px;
  min-width: 120px;
  cursor: pointer;
}

.timeline-select:focus {
  outline: none;
  border-color: var(--gold);
}

.timeline-actions {
  display: flex;
  gap: 8px;
}

.timeline-export-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(217, 119, 6, 0.1);
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.timeline-export-btn:hover {
  background: rgba(217, 119, 6, 0.2);
}

.timeline-container {
  position: relative;
}

.timeline-month-divider {
  display: flex;
  align-items: center;
  margin: 32px 0 24px 0;
  position: relative;
}

.timeline-month-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--slate);
  top: 50%;
}

.timeline-month-text {
  background: var(--navy);
  color: var(--gold);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--slate);
  position: relative;
  z-index: 1;
  margin: 0 auto;
}

.timeline-event {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  position: relative;
}

.timeline-event-date {
  min-width: 60px;
  text-align: center;
  flex-shrink: 0;
}

.timeline-event-day {
  font-size: 24px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.timeline-event-weekday {
  font-size: 12px;
  color: var(--stone);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.timeline-event-line {
  width: 3px;
  background: var(--slate);
  border-radius: 2px;
  flex-shrink: 0;
  position: relative;
}

.timeline-event-line::before {
  content: "";
  position: absolute;
  top: 8px;
  left: -4px;
  width: 11px;
  height: 11px;
  background: var(--gold);
  border-radius: 50%;
  border: 2px solid var(--navy);
}

.timeline-event-content {
  flex: 1;
  background: var(--navy-light);
  border: 1px solid var(--slate);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
}

.timeline-event-content:hover {
  border-color: rgba(217, 119, 6, 0.3);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.3);
}

.timeline-event-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.timeline-event-icon {
  font-size: 20px;
  line-height: 1;
  margin-top: 2px;
}

.timeline-event-title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: var(--cream);
  margin: 0;
  line-height: 1.3;
}

.timeline-event-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.timeline-event-content:hover .timeline-event-actions {
  opacity: 1;
}

.timeline-action-btn {
  background: none;
  border: none;
  color: var(--stone);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.15s ease;
}

.timeline-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--cream);
}

.timeline-event-body {
  margin-bottom: 12px;
}

.timeline-event-description {
  color: var(--stone);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.timeline-event-file {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(217, 119, 6, 0.1);
  border: 1px solid rgba(217, 119, 6, 0.2);
  border-radius: 6px;
  font-size: 13px;
}

.timeline-file-icon {
  color: var(--gold);
}

.timeline-file-name {
  color: var(--gold);
  font-weight: 500;
}

.timeline-event-time {
  font-size: 12px;
  color: var(--stone);
  text-align: right;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .timeline-content {
    padding: 16px;
  }

  .timeline-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .timeline-filters {
    justify-content: center;
  }

  .timeline-select {
    min-width: auto;
    flex: 1;
  }

  .timeline-actions {
    justify-content: center;
  }

  .timeline-event {
    gap: 12px;
  }

  .timeline-event-date {
    min-width: 50px;
  }

  .timeline-event-day {
    font-size: 20px;
  }

  .timeline-event-content {
    padding: 12px;
  }

  .timeline-event-header {
    flex-wrap: wrap;
  }

  .timeline-event-title {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .timeline-content {
    padding: 12px;
  }

  .timeline-event {
    gap: 8px;
    margin-bottom: 16px;
  }

  .timeline-event-date {
    min-width: 40px;
  }

  .timeline-event-day {
    font-size: 18px;
  }

  .timeline-event-weekday {
    font-size: 10px;
  }

  .timeline-event-content {
    padding: 12px;
  }

  .timeline-event-header {
    gap: 8px;
    margin-bottom: 8px;
  }

  .timeline-event-icon {
    font-size: 18px;
  }

  .timeline-event-title {
    font-size: 14px;
  }

  .timeline-event-description {
    font-size: 13px;
  }

  .timeline-filters {
    flex-direction: column;
  }

  .timeline-export-btn {
    width: 100%;
    justify-content: center;
  }

  .timeline-month-text {
    font-size: 13px;
    padding: 6px 12px;
  }
}
