/* Alpha Drive AI Quoter Design System */

:root {
  /* HSL Tailored Colors */
  --bg-main: #090a10;
  --bg-card: rgba(18, 20, 32, 0.65);
  --bg-card-hover: rgba(26, 29, 46, 0.8);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-active: rgba(99, 102, 241, 0.5);
  
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.3);
  --secondary: #a855f7;
  --secondary-glow: rgba(168, 85, 247, 0.3);
  
  --accent-cyan: #06b6d4;
  --accent-teal: #10b981;
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --text-inverse: #ffffff;
  
  --gradient-primary: linear-gradient(135deg, #6366f1, #a855f7);
  --gradient-secondary: linear-gradient(135deg, #06b6d4, #3b82f6);
  --gradient-card: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  --gradient-text: linear-gradient(135deg, #a855f7, #6366f1, #06b6d4);
  
  --font-primary: 'Outfit', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s ease;
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
}

/* Reset & Global */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Typography Utilities */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.hidden { display: none !important; }

/* Background Glow Orbs */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.45;
  pointer-events: none;
  mix-blend-mode: screen;
}
.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--primary);
  top: -10%;
  left: -10%;
  animation: float 25s infinite alternate ease-in-out;
}
.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--secondary);
  bottom: -15%;
  right: -10%;
  animation: float 30s infinite alternate-reverse ease-in-out;
}
.orb-3 {
  width: 300px;
  height: 300px;
  background: var(--accent-cyan);
  top: 40%;
  left: 60%;
  animation: float 20s infinite alternate ease-in-out;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 60px) scale(1.1); }
  100% { transform: translate(-20px, -40px) scale(0.9); }
}

/* Layout Wrapper */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 0 2rem 2rem 2rem;
  max-width: 1440px;
  margin: 0 auto;
}

/* Top Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  background: var(--gradient-primary);
  color: var(--text-inverse);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.brand-logo-img {
  max-height: 80px;
  width: auto;
  height: auto;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.brand-title {
  display: flex;
  flex-direction: column;
}

.brand-title span:first-child {
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Navigation tabs */
.header-nav {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 30px;
  border: 1px solid var(--border-color);
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 20px;
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.nav-tab:hover {
  color: var(--text-primary);
}

.nav-tab.active {
  background: var(--gradient-primary);
  color: var(--text-inverse);
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

/* Badges */
.badge-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.mock-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.real-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Profile Section */
.header-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-info {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.profile-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

.profile-avatar {
  background: var(--border-color);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid var(--border-color);
}

/* Cards & Container Glassmorphism */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

/* Dashboard Body View Panes */
.view-pane {
  display: none;
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Form Layout (Split Form & Summary) */
.form-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
}

.form-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Form Section Styling */
.form-section {
  padding: 2rem;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-num {
  background: var(--gradient-primary);
  color: var(--text-inverse);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 10px var(--primary-glow);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text-primary);
}

.section-description-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.question-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* Custom Interactive Radio/Checkbox Cards */
.radio-group, .checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.col-span-2 {
  grid-column: span 2;
}

.custom-radio-card, .custom-checkbox-card {
  position: relative;
  display: block;
  cursor: pointer;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  transition: all var(--transition-normal);
  user-select: none;
}

.custom-radio-card:hover, .custom-checkbox-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

/* Hide native inputs */
.custom-radio-card input[type="radio"],
.custom-checkbox-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Checked Card Styling */
.custom-radio-card input[type="radio"]:checked + .radio-card-content,
.custom-checkbox-card input[type="checkbox"]:checked + .checkbox-card-content {
  color: var(--text-primary);
}

.custom-radio-card:has(input[type="radio"]:checked),
.custom-checkbox-card:has(input[type="checkbox"]:checked) {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1), var(--shadow-glow);
}

/* Dynamic styling for recommended cards */
.custom-radio-card.recommended {
  overflow: hidden;
  border: 1px dashed rgba(168, 85, 247, 0.4);
}

.badge-recommended {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--gradient-primary);
  color: var(--text-inverse);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 12px;
  border-bottom-left-radius: 8px;
  letter-spacing: 0.5px;
}

/* Card Elements */
.radio-header, .checkbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.option-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

.option-price {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.option-price .period {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: normal;
}

.option-description {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
}

.addon-subtext {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  margin-top: 0.15rem;
}

/* Special styling for Live Assist */
.special-card {
  border-left: 3px solid var(--accent-cyan);
}

/* Radio Group Horizontal (for Integration) */
.radio-group-horizontal {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.radio-group-horizontal .custom-radio-card {
  padding: 1rem;
  text-align: center;
}

.radio-group-horizontal .radio-header {
  flex-direction: column;
  gap: 0.25rem;
}

/* RIGHT SIDEBAR: Quote Summary Pane */
.summary-wrapper {
  position: relative;
  height: 100%;
}

.sticky-pane {
  position: sticky;
  top: 2rem;
}

.summary-pane {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.summary-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

/* Input Styles */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon i {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.input-with-icon input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.input-with-icon input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

/* Receipt styles */
.receipt-divider {
  border-top: 1px dashed var(--border-color);
  height: 1px;
  width: 100%;
}

.receipt-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.receipt-section-header {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.receipt-items {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-right: 4px;
}

.receipt-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  animation: slideInItem 0.25s ease forwards;
}

@keyframes slideInItem {
  from { opacity: 0; transform: translateX(5px); }
  to { opacity: 1; transform: translateX(0); }
}

.receipt-item .item-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.receipt-item .item-price {
  font-weight: 500;
  color: var(--text-primary);
}

.empty-receipt {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1.5rem 0;
  font-style: italic;
}

/* Totals and Buttons */
.totals-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.total-row .total-amount {
  font-size: 1.4rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* Dynamic CSS conditional hide transition */
.conditional-hide {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.empty-packages-message {
  padding: 24px;
  background: rgba(99, 102, 241, 0.04);
  border: 1px dashed rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  margin: 10px 0;
}

/* Buttons */
.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: all var(--transition-fast);
}

.btn-full-width {
  width: 100%;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--text-inverse);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: var(--text-inverse);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-success:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

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

.btn-icon {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.btn-logout {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-logout:hover {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
}

.btn-microsoft {
  background: #2f2f2f;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  font-size: 0.95rem;
  padding: 14px 28px;
}

.btn-microsoft:hover {
  background: #3e3e3e;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-text-link {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 0.8rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.btn-text-link:hover {
  color: var(--text-primary);
}

.summary-footer-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
}

/* VIEW B: Saved Quotes History View Grid */
.history-container {
  padding: 2rem;
}

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

.search-bar {
  position: relative;
  width: 320px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.search-bar input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.06);
}

/* History Table Styles */
.table-container {
  overflow-x: auto;
}

.quotes-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.quotes-table th {
  padding: 1rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  letter-spacing: 0.5px;
}

.quotes-table td {
  padding: 1.25rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.quotes-table tbody tr {
  transition: background-color var(--transition-fast);
}

.quotes-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.quotes-table td.customer-cell {
  font-weight: 600;
  color: var(--text-primary);
}

.quotes-table td.price-cell {
  font-weight: 700;
  color: var(--accent-cyan);
}

.actions-header {
  text-align: right;
}

.actions-cell {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.btn-table-action {
  border: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-family: var(--font-primary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

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

.btn-load {
  color: var(--primary);
  border-color: rgba(99, 102, 241, 0.3);
}

.btn-load:hover {
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
}

.btn-delete {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-delete:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

.loading-state {
  text-align: center !important;
  padding: 3rem !important;
  color: var(--text-muted);
}

.empty-history-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rem 2rem;
  text-align: center;
}

.empty-icon {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.empty-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* AUTH GUARD VIEW */
.auth-guard {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 2rem;
}

.auth-logo span:first-child {
  font-size: 2rem;
  letter-spacing: -1px;
}

.auth-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.auth-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.auth-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

/* SYSTEM CONFIG SETTINGS MODAL */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  width: 100%;
  max-width: 600px;
  padding: 2rem;
  border-radius: var(--radius-lg);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--bg-card);
}

.modal.active .modal-content {
  transform: scale(1);
}

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

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.75rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.settings-nav {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  gap: 1rem;
}

.settings-tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 8px 12px;
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

.settings-tab:hover {
  color: var(--text-primary);
}

.settings-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.settings-pane {
  display: none;
  flex-direction: column;
  gap: 1rem;
  animation: tabFadeIn 0.3s ease;
}

.settings-pane.active {
  display: flex;
}

@keyframes tabFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.settings-desc-text {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.full-width {
  width: 100%;
}

.settings-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 0.85rem;
  transition: border-color var(--transition-fast);
}

.settings-input:focus {
  outline: none;
  border-color: var(--primary);
}

.settings-status-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 9999;
}

.toast {
  background: rgba(18, 20, 32, 0.95);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  color: var(--text-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 300px;
  max-width: 400px;
  backdrop-filter: blur(10px);
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
  overflow: hidden;
}

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

.toast.removing {
  animation: toastSlideOut 0.3s ease forwards;
}

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

.toast-icon {
  font-size: 1.15rem;
}

.toast-success .toast-icon { color: var(--accent-teal); }
.toast-error .toast-icon { color: #ef4444; }
.toast-info .toast-icon { color: var(--accent-cyan); }
.toast-warning .toast-icon { color: #fbbf24; }

.toast-message {
  font-size: 0.85rem;
  font-weight: 500;
  flex-grow: 1;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--primary);
  width: 100%;
  animation: toastProgress linear forwards;
}

@keyframes toastProgress {
  from { width: 100%; }
  to { width: 0%; }
}

.toast-success .toast-progress { background: var(--accent-teal); }
.toast-error .toast-progress { background: #ef4444; }
.toast-info .toast-progress { background: var(--accent-cyan); }
.toast-warning .toast-progress { background: #fbbf24; }

/* Saved Quotes - Folder/Accordion Layout */
.quotes-folder-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quote-folder {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.01);
}

.quote-folder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition-fast);
}

.quote-folder-header:hover {
  background: rgba(255, 255, 255, 0.03);
}

.quote-folder-header.expanded {
  background: rgba(99, 102, 241, 0.04);
  border-bottom: 1px solid var(--border-color);
}

.folder-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.folder-arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.folder-arrow.expanded {
  transform: rotate(90deg);
}

.folder-icon {
  color: var(--primary);
  font-size: 1.1rem;
}

.folder-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.folder-count {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.folder-you-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.quote-folder-body {
  display: none;
  padding: 0;
}

.quote-folder-body.expanded {
  display: block;
}

/* Sortable Column Headers */
.sortable-th {
  cursor: pointer;
  user-select: none;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.sortable-th:hover {
  color: var(--text-primary);
}

.sortable-th.active-sort {
  color: var(--primary);
}

.sort-icon {
  font-size: 0.65rem;
  margin-left: 4px;
  vertical-align: middle;
}

.sort-icon.inactive {
  opacity: 0.3;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .form-layout {
    grid-template-columns: 1fr;
  }
  .sticky-pane {
    position: static;
  }
  .app-container {
    padding: 0 1rem 1rem 1rem;
  }
}

@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
    text-align: center;
  }
  .header-brand {
    justify-content: center;
  }
  .header-profile {
    justify-content: center;
  }
  .grid-2col {
    grid-template-columns: 1fr;
  }
  .col-span-2 {
    grid-column: span 1;
  }
  .radio-group-horizontal {
    grid-template-columns: 1fr;
  }
  .history-header {
    flex-direction: column;
    align-items: stretch;
  }
  .search-bar {
    width: 100%;
  }
}
