/* V5 Layout */
.app-layout {
  height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 9999;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-screen .loading-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ============ FLOATING TOP BAR ============ */
.top-bar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.top-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-btn {
  width: 40px;
  height: 40px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.menu-btn:hover {
  background: var(--bg-elevated);
  color: var(--text);
}

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

.logo-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
}

.logo-icon {
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  width: 14px;
  height: 14px;
  color: var(--bg);
}

.logo-text {
  font-size: 14px;
  font-weight: 600;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.new-chat-btn-top {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  color: var(--accent);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.new-chat-btn-top:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent);
}

.new-chat-btn-top svg {
  width: 16px;
  height: 16px;
}



/* ============ MAIN CONTENT ============ */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  min-height: 0;
  overflow-y: auto;
}

/* ============ WELCOME STATE ============ */
.welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow-y: auto;
}

.welcome-icon {
  width: 72px;
  height: 72px;
  min-width: 72px;
  min-height: 72px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent) 0%, #059669 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  box-shadow: 0 24px 64px rgba(16, 185, 129, 0.2);
}

.welcome-icon svg {
  width: 36px;
  height: 36px;
  color: white;
}

.welcome-title {
  font-size: 36px;
  font-weight: 600;
  margin-bottom: 48px;
  letter-spacing: -1px;
}

/* ============ SUGGESTIONS ============ */
.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 600px;
  justify-content: center;
  margin-bottom: 48px;
}

.suggestion {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.suggestion:hover {
  background: var(--bg-elevated);
  border-color: var(--accent);
  color: var(--text);
}

.suggestion svg {
  width: 16px;
  height: 16px;
}

.suggestion.image svg { color: var(--agent-image); }
.suggestion.email svg { color: var(--agent-email); }
.suggestion.github svg { color: var(--agent-github); }
.suggestion.calendar svg { color: var(--agent-calendar); }
.suggestion.search svg { color: var(--agent-search); }

/* ============ INPUT AREA ============ */
.input-container {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

.input-area {
  padding: 16px 24px 24px;
  background: var(--bg);
  box-shadow: 0 -20px 40px 20px var(--bg);
}

.input-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all 0.2s;
}

.input-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow), 0 16px 48px rgba(0,0,0,0.5);
}

.input-row {
  display: flex;
  align-items: center;
  padding: 8px;
}

.input-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.input-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}

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

.input-field {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 15px;
  padding: 12px 8px;
  outline: none;
  font-family: var(--font);
  resize: none;
  min-height: 44px;
  max-height: 120px;
}

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

.input-btn.send {
  background: var(--accent);
  color: var(--bg);
}

.input-btn.send:hover {
  background: var(--accent-dim);
}

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

.input-btn.send.loading {
  opacity: 1;
}

.input-btn.send .spin {
  animation: spin 0.8s linear infinite;
}

.input-hint {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 16px 0 0;
  font-size: 11px;
  color: var(--text-muted);
}

.hint-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.kbd {
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
}

/* ============ MESSAGES ============ */
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 80px max(24px, calc(50% - 400px)) 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.message {
  max-width: 600px;
  animation: fadeIn 0.2s ease;
}

.message.user {
  align-self: flex-end;
}

.message.assistant {
  align-self: flex-start;
}

.message-bubble {
  padding: 14px 18px;
  border-radius: var(--radius-xl);
  line-height: 1.6;
  font-size: 14px;
}

.message.user .message-bubble {
  background: var(--accent);
  color: var(--bg);
  border-top-right-radius: 4px;
}

.message.assistant .message-bubble {
  background: var(--bg-elevated);
  border-top-left-radius: 4px;
}

/* Markdown styling */
.message-bubble strong { font-weight: 600; }
.message-bubble em { font-style: italic; }

.message-bubble ul {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
  list-style: disc;
}

.message-bubble li {
  margin: 0.25rem 0;
}

.message-bubble code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-card);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  color: var(--accent);
}

.message-bubble a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Message images */
.message-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.message-image {
  max-width: 200px;
  max-height: 200px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: opacity 0.15s;
}

.message-image:hover { opacity: 0.9; }

/* ============ TOOL BADGES ============ */
.tool-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  transition: all 0.15s;
  border-radius: var(--radius-sm);
  width: fit-content;
}

.tool-inline:hover {
  color: var(--text-secondary);
  background: var(--bg-elevated);
}

.tool-icon { width: 14px; height: 14px; border-radius: 3px; }
.tool-check { font-size: 11px; }
.tool-inline.success .tool-check { color: var(--accent); }
.tool-inline.failed .tool-check { color: var(--error); }
.tool-inline.pending .tool-check { animation: spin 1s linear infinite; }

/* Tool card in message */
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tool-card-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-glow);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-card-icon svg { width: 18px; height: 18px; color: var(--accent); }

.tool-card-info { flex: 1; }
.tool-card-name { font-size: 13px; font-weight: 500; margin-bottom: 2px; }
.tool-card-status { font-size: 11px; color: var(--accent); }

/* Tool Modal */
.tool-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.tool-modal-content {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 500px;
  max-height: 70vh;
  width: 90%;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.15s ease-out;
}

.tool-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
}

.tool-modal-header button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
}

.tool-modal-header button:hover { color: var(--text); }

.tool-modal-body {
  padding: 0;
  overflow-y: auto;
  max-height: 60vh;
}

.tool-modal-body pre {
  margin: 0;
  padding: 16px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-all;
}

/* ============ TYPING INDICATOR ============ */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

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

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

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* ============ AUTH LAYOUT ============ */
.auth-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(ellipse at top, rgba(16, 185, 129, 0.03) 0%, var(--bg) 50%);
}

.auth-box {
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.auth-logo {
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.25rem;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.auth-subtitle {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.auth-footer {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--accent);
  text-decoration: none;
}

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

/* ============ SPINNERS ============ */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ============ EMPTY STATE ============ */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ============ MOBILE ============ */
@media (max-width: 768px) {
  .top-bar {
    top: 12px;
    left: 12px;
    right: 12px;
  }
  
  .welcome {
    padding: 20px;
  }
  
  .welcome-title {
    font-size: 28px;
  }
  
  .suggestions {
    gap: 8px;
  }
  
  .suggestion {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  .input-area {
    padding: 12px 12px 16px;
  }
  
  .messages {
    padding: 80px 12px 16px;
  }
  
  
  .pods-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============ SETTINGS MODAL ============ */
.settings-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}

.settings-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.settings-modal {
  width: 80%;
  max-width: 1000px;
  max-height: 85vh;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  display: flex;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.2s;
}

.settings-modal-overlay.open .settings-modal {
  transform: scale(1);
}

/* Sidebar */
.settings-sidebar {
  width: 180px;
  background: var(--bg-elevated);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}

.settings-tab {
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
}

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

.settings-tab.active {
  background: var(--bg-card);
  color: var(--text);
}

/* Content */
.settings-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

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

.settings-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.settings-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.settings-close svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.settings-close:hover {
  background: var(--bg-hover);
}

.settings-close:hover svg {
  color: var(--text);
}

.settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  min-height: 280px;
}

.settings-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.settings-footer:empty {
  display: none;
}

/* Profile Section */
.profile-section {
  margin-bottom: 20px;
}

.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.profile-avatar-lg {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  flex-shrink: 0;
}

.profile-details {
  flex: 1;
  min-width: 0;
}

.profile-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 2px;
}

.profile-email {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
}

.badge svg {
  width: 12px;
  height: 12px;
}

.badge-plan {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent);
}

.badge-status {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.badge-status.cancelled {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

/* Info Section */
.info-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
}

.info-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.info-icon svg {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

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

.info-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.info-value {
  display: block;
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-value.mono {
  font-family: monospace;
  font-size: 11px;
}

/* Settings Groups */
.settings-group {
  display: flex;
  flex-direction: column;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.setting-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.setting-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.setting-icon svg {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

.setting-icon.yolo {
  background: rgba(245, 158, 11, 0.15);
}

.setting-icon.yolo svg {
  color: #f59e0b;
}

.setting-text {
  flex: 1;
  min-width: 0;
}

.setting-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.setting-desc {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.setting-divider {
  height: 1px;
  background: var(--border);
}

/* Column layout for keywords */
.setting-row.column {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.setting-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.keywords-count {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.keywords-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.keywords-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  max-height: 80px;
  overflow-y: auto;
}

.keyword-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
}

.keyword-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.15s;
}

.keyword-remove:hover {
  opacity: 1;
}

.keyword-remove svg {
  width: 10px;
  height: 10px;
  color: var(--text-muted);
}

.keyword-input-row {
  display: flex;
  gap: 8px;
}

.keyword-input {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 12px;
}

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

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

.btn-add-keyword {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-add-keyword:hover {
  background: var(--bg-card);
  color: var(--text);
}

.btn-add-keyword svg {
  width: 14px;
  height: 14px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--bg-elevated);
  border-radius: 22px;
  transition: 0.2s;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(18px);
  background: white;
}

/* Buttons */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-outline:hover {
  background: var(--bg-elevated);
  border-color: var(--border-light);
  color: var(--text);
}

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

.btn-danger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
  color: #ef4444;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
}

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

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-md);
  color: var(--bg);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-primary:hover {
  background: var(--accent-dim);
}

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

.btn-full {
  width: 100%;
}

/* Back Link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  margin-bottom: 16px;
  transition: color 0.15s;
}

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

.back-link svg {
  width: 16px;
  height: 16px;
}

/* Password Form */
.password-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input {
  padding: 10px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 13px;
  transition: all 0.15s;
}

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

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

/* Responsive */
@media (max-width: 640px) {
  .settings-modal {
    flex-direction: column;
    max-height: 90vh;
  }
  
  .settings-sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 8px;
    gap: 6px;
  }
  
  .settings-tab {
    padding: 8px 12px;
    white-space: nowrap;
  }
}
