/* LinkReader - Global Styles */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Brand colors */
  --color-accent: #4facfe;
  --color-accent-end: #00f2fe;
  --gradient-accent: linear-gradient(135deg, var(--color-accent), var(--color-accent-end));

  /* Header */
  --header-bg-start: #1a1a2e;
  --header-bg-end: #16213e;
  --gradient-header: linear-gradient(90deg, var(--header-bg-start), var(--header-bg-end));

  /* Light mode */
  --bg-primary: #f5f6fa;
  --bg-secondary: #ffffff;
  --bg-sidebar: #f8fafc;
  --text-primary: #1a1a2e;
  --text-secondary: #6b7280;
  --border-color: #e2e8f0;

  /* Chat */
  --bubble-ai-bg: #ffffff;
  --bubble-ai-border: #e2e8f0;
  --bubble-ai-text: var(--text-primary);

  /* Misc */
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --transition: 0.2s ease;
}

/* Dark mode */
body.dark,
body.dark-mode {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-sidebar: #141425;
  --text-primary: #e0e0e0;
  --text-secondary: #9ca3af;
  --border-color: #2a2a40;
  --bubble-ai-bg: #1a1a2e;
  --bubble-ai-border: #2a2a40;
  --bubble-ai-text: #e0e0e0;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
}

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-primary);
}

/* --- Header (56px) --- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  background: var(--gradient-header);
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --- Logo (34px icon) --- */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--gradient-accent);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #ffffff;
  flex-shrink: 0;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.logo-text span {
  color: var(--color-accent);
}

/* --- Header Status Items --- */
.header-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

.connection-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

.model-label {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.extraction-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(79, 172, 254, 0.15);
  color: var(--color-accent);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: background var(--transition);
}

.user-avatar:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* --- Main Layout (3 panels) --- */
.main-layout {
  display: flex;
  height: calc(100vh - 56px);
  overflow: hidden;
}

/* --- LEFT SIDEBAR (280px) --- */
.sidebar-left {
  width: 280px;
  min-width: 280px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.candidate-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-primary);
  padding: 2px 8px;
  border-radius: 10px;
}

.candidate-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

/* --- Candidate Card --- */
.candidate-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
  border: 1px solid transparent;
}

.candidate-card:hover {
  background: var(--bg-primary);
  border-color: var(--border-color);
}

.candidate-card.active {
  background: rgba(79, 172, 254, 0.08);
  border-color: var(--color-accent);
}

.candidate-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.candidate-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  flex-shrink: 0;
}

.candidate-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.candidate-headline {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.candidate-company {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Match % bar */
.match-bar-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.match-bar {
  flex: 1;
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}

.match-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #4facfe, #00f2fe);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.match-percent {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-accent);
  min-width: 32px;
  text-align: right;
}

/* Skill tag pills */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.skill-tag {
  background: rgba(79, 172, 254, 0.1);
  color: #4facfe;
  border-radius: 12px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

/* --- Empty State --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  gap: 12px;
  height: 100%;
}

.empty-state p {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.empty-sub {
  font-size: 12px !important;
  font-weight: 400 !important;
  color: var(--text-secondary);
  opacity: 0.7;
}

/* --- CENTER — Chat Area --- */
.chat-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-primary);
}

.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Welcome message */
.welcome-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  gap: 16px;
  flex: 1;
}

.welcome-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(79, 172, 254, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-message h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.welcome-message > p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 420px;
}

.welcome-hints {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.hint-chip {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.hint-chip:hover {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent);
}

/* --- Chat Messages --- */
.msg-user {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: #ffffff;
  border-radius: 16px 16px 4px 16px;
  max-width: 70%;
  margin-left: auto;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}

.msg-assistant {
  background: var(--bubble-ai-bg);
  color: var(--bubble-ai-text);
  border: 1px solid var(--bubble-ai-border);
  border-radius: 16px 16px 16px 4px;
  max-width: 80%;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word;
  box-shadow: var(--shadow);
}

.msg-assistant p {
  margin-bottom: 8px;
}

.msg-assistant p:last-child {
  margin-bottom: 0;
}

/* Typing indicator */
.msg-typing {
  display: flex;
  gap: 4px;
  padding: 14px 18px;
}

.msg-typing span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-secondary);
  animation: typing-bounce 1.4s ease-in-out infinite;
}

.msg-typing span:nth-child(2) { animation-delay: 0.2s; }
.msg-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* --- AI Response Inner Elements --- */

/* Comparison table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}

.comparison-table th {
  text-align: left;
  padding: 8px 12px;
  background: var(--bg-primary);
  border-bottom: 2px solid var(--border-color);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.comparison-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.comparison-table tr:nth-child(even) td {
  background: var(--bg-primary);
}

.comparison-table .score-bar {
  display: inline-block;
  height: 6px;
  border-radius: 3px;
  background: var(--gradient-accent);
  vertical-align: middle;
  margin-right: 6px;
}

/* Citation */
.citation {
  border-left: 3px solid #4facfe;
  padding-left: 12px;
  background: #f0f9ff;
  margin: 8px 0;
  padding: 10px 12px 10px 14px;
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  color: var(--text-primary);
}

body.dark .citation,
body.dark-mode .citation {
  background: rgba(79, 172, 254, 0.08);
}

/* Summary box */
.summary-box {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 8px;
  padding: 16px;
  margin: 12px 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
}

body.dark .summary-box,
body.dark-mode .summary-box {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(134, 239, 172, 0.3);
}

/* --- INPUT AREA --- */
.input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.btn-attach {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}

.btn-attach:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.chat-input {
  flex: 1;
  border-radius: 24px;
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-primary);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.chat-input::placeholder {
  color: var(--text-secondary);
}

.chat-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(79, 172, 254, 0.2);
}

.btn-send {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  flex-shrink: 0;
}

.btn-send:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

.btn-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* --- RIGHT PANEL (260px) --- */
.sidebar-right {
  width: 260px;
  min-width: 260px;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.panel-section {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.panel-section:last-child {
  border-bottom: none;
}

.panel-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

/* Export buttons */
.export-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-export {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.btn-export:hover {
  border-color: var(--color-accent);
  background: rgba(79, 172, 254, 0.05);
}

/* Template cards */
.template-cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.template-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
  border: 1px solid transparent;
}

.template-card:hover {
  background: var(--bg-primary);
  border-color: var(--border-color);
}

.template-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(79, 172, 254, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.template-info h5 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.template-info p {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* Recent queries */
.recent-queries {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.recent-query {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--transition);
  font-size: 12px;
  color: var(--text-secondary);
}

.recent-query:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.recent-query-icon {
  flex-shrink: 0;
  opacity: 0.5;
}

.recent-query-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Buttons (shared) --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity var(--transition);
}

.btn:hover { opacity: 0.85; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--gradient-accent);
  color: #ffffff;
}

.btn-ghost {
  background: transparent;
  color: inherit;
  padding: 6px;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
}

/* --- Scrollbar styling --- */
.chat-area::-webkit-scrollbar,
.candidate-list::-webkit-scrollbar,
.sidebar-right::-webkit-scrollbar {
  width: 6px;
}

.chat-area::-webkit-scrollbar-track,
.candidate-list::-webkit-scrollbar-track,
.sidebar-right::-webkit-scrollbar-track {
  background: transparent;
}

.chat-area::-webkit-scrollbar-thumb,
.candidate-list::-webkit-scrollbar-thumb,
.sidebar-right::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- Responsive (collapse sidebars on small screens) --- */
@media (max-width: 1024px) {
  .sidebar-right {
    display: none;
  }
}

@media (max-width: 768px) {
  .sidebar-left {
    display: none;
  }

  .chat-area {
    padding: 16px;
  }

  .input-area {
    padding: 10px 12px;
  }
}

/* --- AUTH MODAL --- */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.auth-modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-md);
}

.auth-modal-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 4px;
}

.auth-modal-logo .logo-icon {
  width: 40px;
  height: 40px;
  font-size: 15px;
}

.auth-modal-logo .logo-text {
  font-size: 24px;
  color: var(--text-primary);
}

.auth-modal-subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
}

.auth-tab:hover {
  color: var(--text-primary);
}

.auth-tab.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-primary);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(79, 172, 254, 0.2);
}

.form-group input::placeholder {
  color: var(--text-secondary);
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-accent);
}

.btn-full {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 4px;
}

.auth-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 16px;
}

/* --- FILE BADGE (attached document) --- */
.file-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  margin: 0 20px 4px;
  background: rgba(79, 172, 254, 0.1);
  color: var(--color-accent);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.file-badge-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}

.file-badge-close:hover {
  color: var(--text-primary);
}

/* --- CODE BLOCKS --- */
.code-block {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 8px 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg-assistant code {
  background: rgba(79, 172, 254, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
}

/* --- TEMPLATE LOADING STATE --- */
.template-card.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* --- BILLING PAGE --- */
.billing-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 24px;
  width: 100%;
}

.billing-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.billing-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.billing-plan-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-primary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  margin-bottom: 8px;
}

.billing-plan-badge.pro {
  background: var(--gradient-accent);
  color: #ffffff;
  border-color: transparent;
}

.billing-plan-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.billing-usage-stats {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.billing-usage-bar {
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.billing-usage-fill {
  height: 100%;
  background: var(--gradient-accent);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.billing-usage-remaining {
  font-size: 13px;
  color: var(--text-secondary);
}

.billing-renewal {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.billing-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.billing-plan-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--transition);
}

.billing-plan-card.current {
  border-color: var(--color-accent);
}

.billing-plan-header h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.billing-plan-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

.billing-plan-price span {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
}

.billing-plan-detail {
  font-size: 13px;
  color: var(--text-secondary);
}

.billing-plan-btn {
  margin-top: auto;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  width: 100%;
}

.billing-plan-btn.current {
  background: var(--bg-primary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.billing-auth-notice {
  padding: 32px 24px;
}

.billing-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  z-index: 2000;
  display: none;
}

.billing-toast.success {
  background: #22c55e;
  color: #ffffff;
}

.billing-toast.error {
  background: #ef4444;
  color: #ffffff;
}

.billing-toast.info {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

@media (max-width: 600px) {
  .billing-plans {
    grid-template-columns: 1fr;
  }
}

/* Header Navigation */
.header-nav {
  display: flex;
  gap: 4px;
  margin-right: 16px;
}

.nav-link {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover, rgba(255,255,255,0.05));
}

.nav-link.active {
  color: var(--color-accent);
  background: rgba(79, 172, 254, 0.1);
}

/* Report Promo Banner */
.report-promo-banner {
  margin: 16px 0;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.1) 0%, rgba(0, 242, 254, 0.05) 100%);
  border: 1px solid rgba(79, 172, 254, 0.3);
  border-radius: 12px;
  animation: bannerSlideIn 0.5s ease;
}

.report-promo-banner h4 {
  margin: 0 0 8px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-accent);
}

.report-promo-banner p {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.report-promo-banner .btn-report {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.report-promo-banner .btn-report:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
}

.report-promo-dismiss {
  float: right;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  opacity: 0.6;
}

.report-promo-dismiss:hover {
  opacity: 1;
}

@keyframes bannerSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- PRINT STYLES --- */
@media print {
  .header,
  .sidebar-left,
  .sidebar-right,
  .input-area,
  .auth-modal,
  .file-badge,
  .welcome-message,
  .toast {
    display: none !important;
  }

  .main-layout {
    height: auto;
    overflow: visible;
  }

  .chat-center {
    width: 100%;
  }

  .chat-area {
    overflow: visible;
    padding: 20px;
  }

  .msg-user {
    background: #e0e0e0 !important;
    color: #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .msg-assistant {
    border-color: #ccc !important;
    box-shadow: none !important;
  }
}
