/* ============================================
   CROSSFIRE - Professional Dark Theme
   Matching NEXpT Design Language
   ============================================ */

:root {
  /* Core Colors */
  --bg-base: #0D0F14;
  --bg-elevated: #141620;
  --bg-card: #1A1D28;
  --bg-hover: rgba(255, 255, 255, 0.03);

  /* Text Colors */
  --text-primary: #FAFAFA;
  --text-secondary: #B0B7C3;
  --text-muted: #6B7280;

  /* Accent Colors */
  --accent-blue: #3A7BFF;
  --accent-purple: #7A5BFF;
  --accent-cyan: #00C9BA;
  --accent-green: #00D67A;
  --accent-red: #FF4D4F;
  --accent-yellow: #FFB020;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #3A7BFF 0%, #7A5BFF 100%);
  --gradient-cyan: linear-gradient(135deg, #00C9BA 0%, #3A7BFF 100%);
  --gradient-glow: linear-gradient(135deg, rgba(58, 123, 255, 0.15) 0%, rgba(122, 91, 255, 0.15) 100%);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-default: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(58, 123, 255, 0.3);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(58, 123, 255, 0.15);
  --shadow-glow-strong: 0 0 60px rgba(58, 123, 255, 0.25);

  /* Spacing */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 24px;

  /* Animation */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Base Reset & Typography
   ============================================ */

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "rlig" 1, "calt" 1;
}

/* ============================================
   Ambient Background
   ============================================ */

.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
  animation: pulse 8s ease-in-out infinite;
}

.orb-1 {
  top: 10%;
  left: 20%;
  width: 400px;
  height: 400px;
  background: rgba(58, 123, 255, 0.08);
  animation-delay: 0s;
}

.orb-2 {
  bottom: 20%;
  right: 15%;
  width: 350px;
  height: 350px;
  background: rgba(122, 91, 255, 0.08);
  animation-delay: 2s;
}

.orb-3 {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  background: rgba(0, 201, 186, 0.05);
  animation-delay: 4s;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.1); }
}

/* ============================================
   App Layout
   ============================================ */

#app {
  display: flex;
  height: 100vh;
  height: 100svh;
  position: relative;
  z-index: 1;
}

/* ============================================
   Sidebar Navigation
   ============================================ */

.sidebar {
  width: 240px;
  background: rgba(20, 22, 32, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-subtle);
  flex-shrink: 0;
  z-index: 10;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px 16px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  margin-bottom: 32px;
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-accent {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navigation Sections */
.nav-section {
  margin-bottom: 24px;
}

.nav-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0 12px;
  margin-bottom: 8px;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  text-align: left;
  width: 100%;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.nav-btn.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 16px rgba(58, 123, 255, 0.3);
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Nav Footer */
.nav-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

/* Login Button */
.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.login-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.login-btn .btn-icon {
  width: 18px;
  height: 18px;
}

/* User Section */
.user-section {
  margin-top: 12px;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-default);
}

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

.user-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--accent-green);
}

.user-status::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent-green);
  border-radius: 50%;
}

.logout-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: rgba(255, 77, 79, 0.1);
  color: var(--accent-red);
}

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

/* ============================================
   Main Content Area
   ============================================ */

.main-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.view {
  display: none;
  height: 100%;
  overflow: hidden;
}

.view.active {
  display: flex;
  flex-direction: column;
}

.view-container {
  flex: 1;
  overflow-y: auto;
  padding: 40px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* ============================================
   View Header
   ============================================ */

.view-header {
  text-align: center;
  margin-bottom: 48px;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(13, 15, 20, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-default);
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

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

.view-header h1 {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.view-header p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============================================
   Setup Cards
   ============================================ */

.setup-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 24px;
  transition: all 0.3s var(--ease-out);
}

.setup-card:hover {
  border-color: var(--border-default);
  box-shadow: var(--shadow-md);
}

.card-header {
  margin-bottom: 20px;
}

.card-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.card-header p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ============================================
   Buttons
   ============================================ */

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-lg);
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  box-shadow: 0 4px 20px rgba(58, 123, 255, 0.3);
  text-decoration: none;
}

.primary-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(58, 123, 255, 0.4);
}

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

.primary-btn svg {
  width: 20px;
  height: 20px;
}

.primary-btn.small {
  padding: 10px 20px;
  font-size: 14px;
}

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

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
}

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

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.back-btn.danger:hover {
  background: rgba(255, 77, 79, 0.1);
  border-color: rgba(255, 77, 79, 0.3);
  color: var(--accent-red);
}

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

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.action-btn.active {
  background: linear-gradient(135deg, rgba(58, 123, 255, 0.15), rgba(122, 91, 255, 0.15));
  border-color: var(--primary-accent);
  color: var(--primary-accent);
}

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

.control-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.control-btn.danger:hover {
  background: rgba(255, 77, 79, 0.1);
  border-color: rgba(255, 77, 79, 0.3);
  color: var(--accent-red);
}

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

/* ============================================
   Tab Buttons
   ============================================ */

.document-tabs,
.saved-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 16px rgba(58, 123, 255, 0.3);
}

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

.tab-content {
  display: none;
}

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

/* ============================================
   Text Input
   ============================================ */

.text-input {
  width: 100%;
  padding: 16px;
  background: var(--bg-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  transition: all 0.2s var(--ease-out);
}

.text-input::placeholder {
  color: var(--text-muted);
}

.text-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(58, 123, 255, 0.1);
}

.select-input {
  padding: 12px 16px;
  background: var(--bg-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 44px;
}

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

/* ============================================
   File Drop Zone
   ============================================ */

.file-drop-zone {
  position: relative;
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.file-drop-zone:hover {
  border-color: var(--accent-blue);
  background: rgba(58, 123, 255, 0.03);
}

.file-drop-zone.drag-over {
  border-color: var(--accent-blue);
  background: rgba(58, 123, 255, 0.08);
}

.drop-content {
  pointer-events: none;
}

.drop-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(58, 123, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--accent-blue);
}

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

.drop-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

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

.file-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  background: rgba(58, 123, 255, 0.1);
  border-radius: var(--radius-md);
}

.file-preview svg {
  width: 24px;
  height: 24px;
  color: var(--accent-blue);
}

.file-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.remove-file {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.remove-file:hover {
  background: rgba(255, 77, 79, 0.2);
  color: var(--accent-red);
}

.remove-file svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   Selection Counter
   ============================================ */

.selection-counter {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 8px 16px;
  background: rgba(58, 123, 255, 0.1);
  border-radius: 100px;
  margin-bottom: 20px;
}

.count-current {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-blue);
}

.count-divider {
  font-size: 16px;
  color: var(--text-muted);
}

.count-max {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
}

.count-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 8px;
}

/* ============================================
   Modal
   ============================================ */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  width: min(480px, 90vw);
  max-height: 85vh;
  overflow: auto;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.3s var(--ease-out);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

.modal-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.modal-close svg {
  width: 20px;
  height: 20px;
}

.modal-body {
  padding: 28px;
}

/* Export Options */
.export-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-default);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--gradient-primary);
  border-color: transparent;
}

.checkbox-custom::after {
  content: '';
  width: 6px;
  height: 10px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0;
  transition: all 0.2s;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  opacity: 1;
}

.export-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.export-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.export-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
}

.export-btn.primary {
  background: var(--gradient-primary);
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(58, 123, 255, 0.25);
}

.export-btn.primary:hover {
  box-shadow: 0 6px 20px rgba(58, 123, 255, 0.35);
}

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

.share-result {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.share-result input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  font-family: monospace;
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.copy-btn:hover {
  box-shadow: 0 4px 16px rgba(58, 123, 255, 0.3);
}

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

/* ============================================
   Scrollbar
   ============================================ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ============================================
   Shared View
   ============================================ */

.shared-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.shared-header {
  text-align: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.shared-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
}

.shared-participants {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.shared-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 0;
}

.shared-footer {
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

/* ============================================
   Login Prompt
   ============================================ */

.login-prompt {
  text-align: center;
  padding: 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  margin-top: 24px;
}

.prompt-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(58, 123, 255, 0.1);
  border-radius: var(--radius-lg);
  color: var(--accent-blue);
}

.prompt-icon svg {
  width: 32px;
  height: 32px;
}

.login-prompt h4 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.login-prompt p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.login-prompt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-lg);
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  box-shadow: 0 4px 20px rgba(58, 123, 255, 0.3);
}

.login-prompt-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(58, 123, 255, 0.4);
}

.login-prompt-btn svg {
  width: 20px;
  height: 20px;
}

/* ============================================
   Saved Content
   ============================================ */

.saved-content {
  margin-top: 24px;
}

.saved-list {
  display: grid;
  gap: 16px;
}

.saved-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.saved-item:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.saved-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(58, 123, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--accent-blue);
}

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

.saved-info {
  flex: 1;
}

.saved-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.saved-meta {
  font-size: 13px;
  color: var(--text-muted);
}

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

/* ============================================
   Typing Indicator
   ============================================ */

.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
}

.typing-indicator .dot {
  width: 6px;
  height: 6px;
  background: var(--accent-blue);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.typing-indicator .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

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

@media (max-width: 1024px) {
  .view-container {
    padding: 32px 24px;
  }

  .view-header h1 {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    border-right: none;
    border-top: 1px solid var(--border-subtle);
    z-index: 100;
  }

  .sidebar-inner {
    flex-direction: row;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .logo,
  .nav-label,
  .nav-footer {
    display: none;
  }

  .nav-section {
    margin-bottom: 0;
    flex: 1;
  }

  .nav-links {
    flex-direction: row;
    justify-content: center;
    gap: 4px;
  }

  .nav-btn {
    flex-direction: column;
    gap: 4px;
    padding: 10px 16px;
    font-size: 11px;
  }

  .nav-btn span:not(.nav-icon) {
    display: block;
  }

  .nav-icon {
    width: 22px;
    height: 22px;
  }

  .main-content {
    padding-bottom: 80px;
  }

  .view-container {
    padding: 24px 16px;
  }

  .view-header {
    margin-bottom: 32px;
  }

  .view-header h1 {
    font-size: 28px;
  }

  .view-header p {
    font-size: 15px;
  }

  .setup-card {
    padding: 20px;
  }

  .ambient-bg {
    display: none;
  }
}

@media (max-width: 480px) {
  .view-header h1 {
    font-size: 24px;
  }

  .header-badge {
    font-size: 12px;
    padding: 6px 12px;
  }

  .document-tabs,
  .saved-tabs {
    flex-direction: column;
  }

  .tab-btn {
    justify-content: center;
  }

  .primary-btn {
    width: 100%;
    padding: 14px 24px;
  }
}

/* ============================================
   Toast Notifications
   ============================================ */

.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 12px 24px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s var(--ease-out);
  pointer-events: none;
}

.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
