/* ============================================
   CSS VARIABLES & THEME SYSTEM
   ============================================ */
:root {
  /* Light Theme */
  --bg-primary: #FBF8F5;
  --bg-secondary: #FFFFFF;
  --bg-chat: #F5F0EB;
  --bg-user-bubble: #6B5E7B;
  --bg-ai-bubble: #FFFFFF;
  --bg-input: #FFFFFF;
  --bg-header: rgba(251, 248, 245, 0.92);
  --bg-panel: #FFFFFF;
  --bg-overlay: rgba(107, 94, 123, 0.18);
  --bg-chip: #F0EBF5;
  --bg-chip-hover: #E5DFF0;
  --bg-empty-icon: #F0EBF5;

  --text-primary: #2D2438;
  --text-secondary: #6B5E7B;
  --text-tertiary: #9A8FAA;
  --text-on-user: #FFFFFF;
  --text-on-ai: #2D2438;
  --text-placeholder: #B8ADCC;
  --text-link: #7B6B8F;

  --border-light: #EDE7F2;
  --border-input: #DDD5E8;
  --border-input-focus: #9A8FAA;

  --accent: #8B7BA0;
  --accent-hover: #7B6B90;
  --accent-soft: #F0EBF5;
  --danger: #C47070;
  --danger-soft: #FDF0F0;
  --success: #6BA08B;
  --warning: #C4A060;
  --warning-soft: #FFF8ED;

  --shadow-sm: 0 1px 3px rgba(45, 36, 56, 0.06);
  --shadow-md: 0 4px 12px rgba(45, 36, 56, 0.08);
  --shadow-lg: 0 8px 30px rgba(45, 36, 56, 0.12);
  --shadow-bubble: 0 1px 4px rgba(45, 36, 56, 0.05);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --font-main: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.85rem;
  --font-size-base: 0.95rem;
  --font-size-md: 1.05rem;
  --font-size-lg: 1.2rem;
  --font-size-xl: 1.5rem;

  --header-height: 72px;
  --input-height: 68px;
  --panel-width: 400px;
  --max-chat-width: 720px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-primary: #1A1520;
  --bg-secondary: #231E2A;
  --bg-chat: #1E1926;
  --bg-user-bubble: #6B5E7B;
  --bg-ai-bubble: #2A2434;
  --bg-input: #2A2434;
  --bg-header: rgba(26, 21, 32, 0.94);
  --bg-panel: #231E2A;
  --bg-overlay: rgba(0, 0, 0, 0.45);
  --bg-chip: #2F2840;
  --bg-chip-hover: #3D3550;
  --bg-empty-icon: #2A2434;

  --text-primary: #EDE7F2;
  --text-secondary: #B8ADCC;
  --text-tertiary: #7E7294;
  --text-on-user: #FFFFFF;
  --text-on-ai: #EDE7F2;
  --text-placeholder: #5E5275;
  --text-link: #B8ADCC;

  --border-light: #332D40;
  --border-input: #3D3550;
  --border-input-focus: #8B7BA0;

  --accent: #9A8FAA;
  --accent-hover: #ADA0BE;
  --accent-soft: #2F2840;
  --danger: #D48080;
  --danger-soft: #3A2020;
  --success: #7BB8A0;
  --warning: #D4B070;
  --warning-soft: #3A3020;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-bubble: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  font-size: var(--font-size-base);
  color: var(--text-primary);
  background: var(--bg-primary);
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  outline: none;
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: var(--text-primary);
  outline: none;
  border: none;
  background: none;
}

/* ============================================
   APP LAYOUT
   ============================================ */
#app {
  display: flex;
  flex-direction: column;
  height: 100%;
  height: 100dvh;
  max-width: 100%;
  position: relative;
  overflow: hidden;
}

/* ============================================
   HEADER
   ============================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: var(--header-height);
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition), border-color var(--transition);
  padding-top: env(safe-area-inset-top, 0);
}

.header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.header-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.header-title-row {
  display: flex;
  align-items: center;
  gap: 0;
}

.beta-badge {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  border-radius: 5px;
  padding: 2px 7px;
  margin-inline-start: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 1px 4px rgba(124,58,237,0.35);
  vertical-align: middle;
}

.header-subtitle {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.header-btn:hover {
  background: var(--accent-soft);
  color: var(--text-primary);
}

.header-btn:active {
  transform: scale(0.93);
}

.header-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================
   CHAT AREA
   ============================================ */
.chat-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 16px;
  background: var(--bg-chat);
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  transition: background var(--transition);
}

.chat-inner {
  max-width: var(--max-chat-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100%;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  padding: 40px 24px;
  gap: 20px;
  min-height: 50vh;
}

.empty-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-xl);
  background: var(--bg-empty-icon);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.empty-icon svg {
  width: 36px;
  height: 36px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.empty-desc {
  font-size: var(--font-size-sm);
  color: var(--text-tertiary);
  max-width: 320px;
  line-height: 1.65;
}

.empty-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 400px;
  margin-top: 8px;
}

.suggestion-chip {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.suggestion-chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.suggestion-chip:active {
  transform: scale(0.97);
}

/* Message Bubbles */
.message {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  animation: msgIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

[dir="ltr"] .message-user {
  align-self: flex-end;
}

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

[dir="ltr"] .message-ai {
  align-self: flex-start;
}

.bubble {
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  line-height: 1.7;
  font-size: var(--font-size-base);
  box-shadow: var(--shadow-bubble);
  word-break: break-word;
  white-space: pre-wrap;
}

.bubble-user {
  background: var(--bg-user-bubble);
  color: var(--text-on-user);
  border-bottom-right-radius: var(--radius-sm);
}

[dir="ltr"] .bubble-user {
  border-bottom-right-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-sm);
}

.bubble-ai {
  background: var(--bg-ai-bubble);
  color: var(--text-on-ai);
  border-bottom-left-radius: var(--radius-sm);
}

[dir="ltr"] .bubble-ai {
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-sm);
}

.message-time {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
  margin-top: 4px;
  padding: 0 4px;
}

.message-user .message-time {
  text-align: left;
}

[dir="ltr"] .message-user .message-time {
  text-align: right;
}

.message-ai .message-time {
  text-align: right;
}

[dir="ltr"] .message-ai .message-time {
  text-align: left;
}

/* Clarifying Questions */
.clarify-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.clarify-label {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

.clarify-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.clarify-chip {
  padding: 10px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-chip);
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  border: 1.5px solid var(--border-light);
  transition: all var(--transition);
  cursor: pointer;
  font-weight: 500;
}

.clarify-chip:hover {
  background: var(--bg-chip-hover);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.clarify-chip:active {
  transform: scale(0.96);
}

.clarify-chip.selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.clarify-chip-other {
  border-style: dashed;
}

.clarify-question-label {
  margin-top: 8px;
  font-weight: 600;
}

.clarify-free-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.clarify-free-input {
  flex: 1;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-input);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  transition: border-color var(--transition);
}

.clarify-free-input:focus {
  border-color: var(--accent);
}

.clarify-free-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  cursor: pointer;
}
.clarify-free-send svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
[dir="rtl"] .clarify-free-send svg {
  transform: scaleX(-1);
}

.clarify-free-send:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 16px 20px;
  background: var(--bg-ai-bubble);
  border-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-sm);
  box-shadow: var(--shadow-bubble);
  align-self: flex-end;
  max-width: 80px;
  animation: msgIn 0.3s ease both;
}

[dir="ltr"] .typing-indicator {
  align-self: flex-start;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-sm);
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-tertiary);
  animation: typingPulse 1.4s infinite both;
}

.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingPulse {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.85); }
  30% { opacity: 1; transform: scale(1.1); }
}

/* Error Message */
.error-bubble {
  background: var(--danger-soft);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  line-height: 1.6;
  align-self: center;
  max-width: 90%;
  text-align: center;
}

/* Warning/Urgent Bubble */
.bubble-ai .urgent-note {
  background: var(--warning-soft);
  border: 1px solid var(--warning);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 10px;
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

/* ============================================
   INPUT AREA
   ============================================ */
.input-area {
  padding: 12px 16px 4px;
  padding-bottom: max(4px, env(safe-area-inset-bottom, 4px));
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  transition: background var(--transition), border-color var(--transition);
}

.input-container {
  max-width: var(--max-chat-width);
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-lg);
  padding: 6px 6px 6px 14px;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

[dir="ltr"] .input-container {
  padding: 6px 14px 6px 6px;
}

.input-container:focus-within {
  border-color: var(--border-input-focus);
  box-shadow: var(--shadow-md), 0 0 0 3px var(--accent-soft);
}

.input-field {
  flex: 1;
  resize: none;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: var(--font-size-base);
  line-height: 1.5;
  max-height: 120px;
  min-height: 24px;
  padding: 8px 0;
  overflow-y: auto;
}

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

.send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #fff;
  transition: all var(--transition);
  flex-shrink: 0;
}

.send-btn:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: scale(1.04);
}

.send-btn:active:not(:disabled) {
  transform: scale(0.95);
}

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

.send-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[dir="rtl"] .send-btn svg {
  transform: scaleX(-1);
}

/* Upload & Mic icon buttons */
.input-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  transition: all var(--transition);
  flex-shrink: 0;
  border: none;
  cursor: pointer;
  padding: 0;
}
.input-icon-btn:hover {
  color: var(--accent);
  background: var(--accent-soft);
}
.mic-btn.recording {
  color: #e74c3c;
  animation: micPulse 1.2s ease-in-out infinite;
}
@keyframes micPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.12); }
}

/* Attachment preview strip */
.attach-preview {
  max-width: var(--max-chat-width);
  margin: 0 auto 6px;
  padding: 0 4px;
}
.attach-preview-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-md);
  padding: 6px 8px;
  position: relative;
}
.attach-preview-img {
  max-height: 64px;
  max-width: 120px;
  border-radius: 6px;
  object-fit: cover;
}
.attach-preview-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  padding: 0;
}
[dir="rtl"] .attach-preview-remove {
  right: auto;
  left: -6px;
}

/* ============================================
   FEEDBACK PANEL
   ============================================ */
.feedback-panel {
  margin-top: 8px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 320px;
}

.feedback-title {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
}

.feedback-stars {
  display: flex;
  gap: 4px;
}

.feedback-star {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 22px;
  color: var(--border-light);
  padding: 0;
  line-height: 1;
  transition: color 0.15s, transform 0.1s;
}

.feedback-star.active,
.feedback-star.hover {
  color: #f59e0b;
}

.feedback-star:active {
  transform: scale(0.9);
}

.feedback-comment-wrap {
  flex-direction: column;
  gap: 6px;
}

.feedback-comment {
  width: 100%;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: var(--font-size-xs);
  background: var(--bg-primary);
  color: var(--text-primary);
  resize: none;
  font-family: inherit;
  box-sizing: border-box;
}

.feedback-comment:focus {
  outline: none;
  border-color: var(--accent);
}

.feedback-submit {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 5px 16px;
  font-size: var(--font-size-xs);
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}

.feedback-submit:hover { opacity: 0.85; }

.feedback-thanks {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  padding: 4px 0;
}

.attach-preview-doc {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-size: 13px;
  color: var(--text-secondary);
}
.attach-preview-doc-icon { font-size: 20px; }
.attach-preview-doc-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Image in chat bubbles */
.bubble-img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  margin-bottom: 6px;
  object-fit: cover;
  display: block;
}

/* Quick Bar — language & theme on main page */
.quick-bar {
  max-width: var(--max-chat-width);
  margin: 4px auto 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.quick-lang {
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  color: var(--text-tertiary);
  font-size: 11px;
  padding: 3px 8px;
  cursor: pointer;
  transition: all var(--transition);
  appearance: none;
  -webkit-appearance: none;
  text-align: center;
}
.quick-lang:hover, .quick-lang:focus {
  border-color: var(--accent);
  color: var(--accent);
}

.quick-theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  color: var(--text-tertiary);
  transition: all var(--transition);
  cursor: pointer;
}
.quick-theme-btn:hover {
  color: var(--accent);
  background: var(--accent-soft);
}
.quick-theme-btn svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Show sun in dark, moon in light */
[data-theme="dark"] .quick-theme-btn .icon-sun { display: block; }
[data-theme="dark"] .quick-theme-btn .icon-moon { display: none; }
[data-theme="light"] .quick-theme-btn .icon-sun { display: none; }
[data-theme="light"] .quick-theme-btn .icon-moon { display: block; }
/* Auto: default to moon (light usually default) */
.quick-theme-btn .icon-sun { display: none; }
.quick-theme-btn .icon-moon { display: block; }

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 5px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* ============================================
   RESPONSIVE / MOBILE
   ============================================ */
@media (max-width: 600px) {
  :root {
    --header-height: 62px;
    --panel-width: 100%;
  }

  .header {
    padding: 0 14px;
  }

  .header-title {
    font-size: var(--font-size-md);
  }

  .chat-area {
    padding: 14px 10px;
  }

  .message {
    max-width: 90%;
  }

  .bubble {
    padding: 12px 15px;
    font-size: var(--font-size-sm);
  }

  .input-area {
    padding: 8px 10px 2px;
  }

  .input-container {
    padding: 4px 4px 4px 12px;
  }

  [dir="ltr"] .input-container {
    padding: 4px 12px 4px 4px;
  }

  .send-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

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

  .empty-title {
    font-size: var(--font-size-lg);
  }
}

@media (min-width: 900px) {
  .chat-area {
    padding: 28px 32px;
  }
  .message {
    max-width: 70%;
  }
}

/* Keyboard open on mobile */
@media (max-height: 450px) {
  .header {
    height: 50px;
  }
  .empty-state {
    min-height: 30vh;
    padding: 16px;
  }
  .empty-icon {
    width: 48px;
    height: 48px;
  }
  .empty-title {
    font-size: var(--font-size-md);
  }
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
}

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