/* ===== AI Travel Assistant - Modern Redesign ===== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Primary Teal Palette */
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-200: #99f6e4;
  --teal-300: #5eead4;
  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --teal-800: #115e59;
  --teal-900: #134e4a;

  /* Accent Colors */
  --coral: #f97316;
  --coral-light: #fed7aa;
  --amber: #f59e0b;
  --violet: #8b5cf6;
  --rose: #f43f5e;

  /* Neutrals */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Semantic Colors */
  --bg: var(--slate-50);
  --bg-white: #ffffff;
  --text: var(--slate-800);
  --text-secondary: var(--slate-600);
  --text-muted: var(--slate-400);
  --border: var(--slate-200);
  --accent: var(--teal-600);
  --accent-bg: var(--teal-50);

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(15, 23, 42, 0.2);
  --shadow-glow: 0 0 20px rgba(20, 184, 166, 0.15);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  /* Layout */
  --sidebar-w: 260px;
  --header-h: 64px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

input, textarea, select {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
}

img {
  max-width: 100%;
  display: block;
}

ul, ol {
  list-style: none;
}

code {
  font-family: 'JetBrains Mono', monospace;
}

/* --- Utilities --- */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

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

.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }

.text-center { text-align: center; }
.text-primary { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-white { color: white; }

.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

/* ===========================
   APP SHELL & LAYOUT
   =========================== */

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--slate-900) 0%, var(--slate-800) 100%);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
  overflow: hidden;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(20, 184, 166, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.sidebar-brand .brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.sidebar-brand h1 {
  font-size: 18px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.02em;
}

.sidebar-brand .brand-sub {
  font-size: 12px;
  color: var(--slate-400);
  font-weight: 400;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.nav-section-label {
  padding: 8px 12px 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--slate-300);
  transition: all var(--transition);
  cursor: pointer;
  margin-bottom: 4px;
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--teal-500);
  border-radius: 0 2px 2px 0;
  transition: height var(--transition);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.15) 0%, rgba(20, 184, 166, 0.05) 100%);
  color: var(--teal-400);
  font-weight: 600;
}

.nav-item.active::before {
  height: 24px;
}

.nav-item .nav-icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  filter: grayscale(0);
  transition: transform var(--transition);
}

.nav-item:hover .nav-icon {
  transform: scale(1.1);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
}

.lang-switch-desktop {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
  backdrop-filter: blur(8px);
}

.lang-switch-mobile {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
  margin-right: 8px;
}

.lang-switch-desktop button {
  flex: 1;
  padding: 8px 0;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition);
  color: var(--slate-400);
}

.lang-switch-mobile button {
  display: none;
}

.lang-switch-mobile button.active {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  background: var(--teal-600);
  color: white;
}

.lang-switch-mobile button:not(.active) {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  color: var(--slate-400);
}

.lang-switch-desktop button.active {
  background: var(--teal-600);
  color: white;
  box-shadow: var(--shadow-sm);
}

/* --- Main Content --- */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.content-header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

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

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

.content-body {
  padding: 32px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* --- Page Transitions --- */
.page {
  animation: pageIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ===========================
   CARDS & COMPONENTS
   =========================== */

.card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-body {
  padding: 24px;
}

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

.card-header h3 {
  font-size: 16px;
  font-weight: 700;
}

/* Glass Card Effect */
.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ===========================
   SEARCH BAR
   =========================== */

.search-bar {
  position: relative;
  max-width: 640px;
}

.search-bar input {
  width: 100%;
  height: 52px;
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 0 52px 0 20px;
  font-size: 15px;
  transition: all var(--transition);
  box-shadow: var(--shadow-xs);
}

.search-bar input:focus {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.1), var(--shadow-md);
  background: white;
}

.search-bar .search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--text-muted);
  transition: color var(--transition);
}

.search-bar input:focus + .search-icon {
  color: var(--teal-600);
}

/* ===========================
   QUICK ACTIONS
   =========================== */

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.action-card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.action-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal-500), var(--teal-600));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.action-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--teal-100);
  transform: translateY(-4px);
}

.action-card:hover::before {
  transform: scaleX(1);
}

.action-card .action-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.action-card:hover .action-icon {
  transform: scale(1.1) rotate(-5deg);
}

.action-icon.teal { background: linear-gradient(135deg, var(--teal-100), var(--teal-50)); }
.action-icon.coral { background: linear-gradient(135deg, #fee2e2, #fef2f2); }
.action-icon.amber { background: linear-gradient(135deg, #fef3c7, #fffbeb); }
.action-icon.violet { background: linear-gradient(135deg, #ede9fe, #f5f3ff); }

.action-card .action-text .action-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--text);
}

.action-card .action-text .action-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===========================
   CITY CARDS
   =========================== */

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.see-all {
  font-size: 14px;
  color: var(--teal-600);
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--teal-50);
  transition: all var(--transition);
}

.see-all:hover {
  background: var(--teal-100);
  transform: translateX(4px);
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.city-card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.city-card:hover {
  box-shadow: var(--shadow-2xl);
  transform: translateY(-8px) scale(1.02);
  border-color: var(--teal-200);
}

.city-card .city-cover {
  height: 180px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.city-card .city-cover::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(transparent, rgba(15, 23, 42, 0.6));
}

.city-card .city-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--teal-700);
  z-index: 1;
  box-shadow: var(--shadow-sm);
}

.city-card .city-name {
  position: absolute;
  bottom: 16px;
  left: 20px;
  color: white;
  font-size: 24px;
  font-weight: 800;
  z-index: 1;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.city-card .city-info {
  padding: 20px;
}

.city-card .city-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.city-card .city-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.city-card .city-tag {
  font-size: 11px;
  background: var(--slate-100);
  color: var(--slate-600);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

/* ===========================
   SUGGESTIONS
   =========================== */

.suggestions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.suggestion-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.suggestion-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(8px);
  border-color: var(--teal-100);
}

.suggestion-card .sug-icon {
  font-size: 32px;
  transition: transform var(--transition);
}

.suggestion-card:hover .sug-icon {
  transform: scale(1.2) rotate(10deg);
}

.suggestion-card .sug-text {
  font-size: 15px;
  font-weight: 600;
}

/* ===========================
   CHAT PAGE
   =========================== */

.chat-layout {
  display: flex;
  height: calc(100vh - var(--header-h));
  margin: -32px;
}

.chat-sidebar {
  width: 300px;
  background: var(--bg-white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

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

.chat-sidebar-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.new-chat-btn {
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
  color: white;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(20, 184, 166, 0.3);
}

.new-chat-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.4);
}

.chat-history {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.chat-history::-webkit-scrollbar {
  width: 4px;
}

.chat-history::-webkit-scrollbar-thumb {
  background: var(--slate-200);
  border-radius: 2px;
}

.chat-history-item {
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.chat-history-item:hover {
  background: var(--slate-100);
  color: var(--text);
}

.chat-history-item.active {
  background: linear-gradient(135deg, var(--teal-50), var(--slate-50));
  color: var(--teal-700);
  font-weight: 600;
}

.chat-history-item .ch-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.chat-msg {
  display: flex;
  gap: 14px;
  max-width: 80%;
  animation: msgIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.chat-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-msg.assistant {
  align-self: flex-start;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-sm);
}

.chat-msg.user .chat-avatar {
  background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
}

.chat-msg.assistant .chat-avatar {
  background: linear-gradient(135deg, var(--slate-700), var(--slate-800));
}

.chat-bubble {
  padding: 16px 20px;
  border-radius: var(--radius-xl);
  font-size: 15px;
  line-height: 1.7;
  word-break: break-word;
}

.chat-msg.user .chat-bubble {
  background: linear-gradient(135deg, var(--teal-600), var(--teal-700));
  color: white;
  border-bottom-right-radius: 6px;
  box-shadow: var(--shadow-md);
}

.chat-msg.assistant .chat-bubble {
  background: var(--bg-white);
  border-bottom-left-radius: 6px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

/* Chat Input Bar */
.chat-input-bar {
  padding: 20px 32px 24px;
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: flex-end;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
}

.chat-input-bar textarea {
  flex: 1;
  min-height: 52px;
  max-height: 160px;
  padding: 14px 20px;
  background: var(--slate-50);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  resize: none;
  font-size: 15px;
  line-height: 1.5;
  transition: all var(--transition);
}

.chat-input-bar textarea:focus {
  border-color: var(--teal-500);
  background: white;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.1);
}

.chat-input-bar .send-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  transition: all var(--transition);
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.chat-input-bar .send-btn:hover {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
}

/* Suggestion Chips */
.suggestion-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 0;
}

.suggestion-chip {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  background: var(--bg-white);
  border: 2px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.suggestion-chip:hover {
  background: var(--teal-50);
  border-color: var(--teal-300);
  color: var(--teal-700);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 6px;
  padding: 8px 0;
}

.typing-indicator span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal-400);
  animation: typing 1.4s infinite ease-in-out;
}

.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(-8px);
    opacity: 1;
  }
}

/* ===========================
   TRANSLATE PAGE
   =========================== */

.translate-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  height: calc(100vh - var(--header-h) - 64px);
}

.translate-panel {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.translate-panel .lang-bar {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--slate-50);
}

.translate-panel .lang-bar select {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.translate-panel .lang-bar select:focus {
  border-color: var(--teal-500);
}

.swap-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--teal-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.swap-btn:hover {
  background: var(--teal-500);
  color: white;
  transform: rotate(180deg);
}

.translate-panel .panel-body {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.translate-panel textarea {
  width: 100%;
  flex: 1;
  min-height: 200px;
  font-size: 20px;
  line-height: 1.7;
  resize: none;
  font-family: 'Outfit', sans-serif;
}

.translate-panel textarea::placeholder {
  color: var(--text-muted);
}

.result-text {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
  color: var(--text);
}

.pinyin-text {
  font-size: 16px;
  color: var(--teal-600);
  margin-bottom: 20px;
  font-weight: 500;
}

.translate-actions {
  display: flex;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-top: auto;
  flex-wrap: wrap;
}

.translate-actions button {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--slate-100);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.translate-actions button:hover {
  background: var(--teal-100);
  color: var(--teal-700);
  transform: translateY(-2px);
}

.translate-btn {
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
  color: white;
  border-radius: var(--radius-xl);
  font-size: 16px;
  font-weight: 700;
  margin-top: 16px;
  transition: all var(--transition);
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.translate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
}

/* Full Screen Translation */
.fullscreen-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-800));
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  animation: fadeIn 0.3s ease;
}

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

.fullscreen-overlay .fs-text {
  font-size: 56px;
  font-weight: 800;
  text-align: center;
  line-height: 1.3;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, white, var(--teal-200));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.fullscreen-overlay .fs-pinyin {
  font-size: 26px;
  color: var(--teal-400);
  margin-bottom: 40px;
  font-weight: 400;
}

.fullscreen-overlay .fs-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.fullscreen-overlay .fs-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* ===========================
   CITY DETAIL PAGE
   =========================== */

.city-hero {
  height: 300px;
  background-size: cover;
  background-position: center;
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 28px;
}

.city-tabs-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.city-tabs-bar::-webkit-scrollbar {
  display: none;
}

.city-tab-btn {
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-white);
  border: 2px solid var(--border);
  white-space: nowrap;
  transition: all var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
}

.city-tab-btn:hover {
  border-color: var(--teal-300);
  color: var(--teal-700);
  transform: translateY(-2px);
}

.city-tab-btn.active {
  background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
  color: white;
  border-color: var(--teal-500);
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.city-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 150px;
  background: linear-gradient(transparent, rgba(15, 23, 42, 0.7));
}

.city-hero-content {
  position: absolute;
  bottom: 32px;
  left: 40px;
  right: 40px;
  z-index: 1;
  color: white;
}

.city-hero-content h1 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}

.city-hero-content p {
  font-size: 18px;
  opacity: 0.9;
}

.city-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 28px;
}

.city-tab {
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
}

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

.city-tab.active {
  color: var(--teal-600);
  border-bottom-color: var(--teal-500);
}

.city-detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
}

.info-card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.info-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.place-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.place-card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  display: flex;
  gap: 16px;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.place-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--teal-100);
}

.place-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--teal-100), var(--teal-50));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.place-info {
  flex: 1;
}

.place-info h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.place-info .place-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.place-info .place-meta {
  font-size: 12px;
  color: var(--teal-600);
  font-weight: 600;
}

/* ===========================
   PHRASES PAGE
   =========================== */

.phrases-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
}

.phrase-cats-sidebar {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 12px;
  height: fit-content;
  position: sticky;
  top: calc(var(--header-h) + 32px);
}

.phrase-cat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 4px;
}

.phrase-cat-item:hover {
  background: var(--slate-100);
  color: var(--text);
}

.phrase-cat-item.active {
  background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
  color: white;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.phrase-cat-item .cat-icon {
  font-size: 20px;
}

.phrase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.phrase-card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.phrase-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--teal-200);
  transform: translateY(-4px);
}

.phrase-card .phrase-en {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.phrase-card .phrase-zh {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.phrase-card .phrase-pinyin {
  font-size: 15px;
  color: var(--teal-600);
  font-weight: 500;
  font-style: italic;
}

.phrase-card .phrase-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.phrase-card .phrase-actions button {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  background: var(--slate-100);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}

.phrase-card .phrase-actions button:hover {
  background: var(--teal-100);
  color: var(--teal-700);
  transform: scale(1.05);
}

/* ===========================
   PROFILE PAGE
   =========================== */

.profile-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
}

.profile-sidebar {
  text-align: center;
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 32px 24px;
  height: fit-content;
  position: sticky;
  top: calc(var(--header-h) + 32px);
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 800;
  color: white;
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.3);
}

.profile-sidebar h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 4px;
}

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

.profile-card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.profile-item {
  display: flex;
  align-items: center;
  padding: 18px 24px;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}

.profile-item:last-child {
  border-bottom: none;
}

.profile-item:hover {
  background: var(--slate-50);
}

.profile-item .item-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--teal-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.profile-item .item-info {
  flex: 1;
}

.profile-item .item-info h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}

.profile-item .item-info p {
  font-size: 13px;
  color: var(--text-muted);
}

.profile-item .item-arrow {
  color: var(--text-muted);
  font-size: 16px;
}

.usage-bar {
  height: 8px;
  background: var(--slate-100);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 10px;
}

.usage-bar .usage-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal-500), var(--teal-600));
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===========================
   ADMIN PAGE
   =========================== */

.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
}

.admin-sidebar {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 12px;
  height: fit-content;
  position: sticky;
  top: calc(var(--header-h) + 32px);
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 4px;
}

.admin-nav-item:hover {
  background: var(--slate-100);
  color: var(--text);
}

.admin-nav-item.active {
  background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
  color: white;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.admin-main {
  min-width: 0;
}

/* Admin Table */
.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.admin-table th {
  padding: 16px 20px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--slate-50);
  border-bottom: 2px solid var(--border);
}

.admin-table td {
  padding: 16px 20px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: var(--slate-50);
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.status-badge.enabled {
  background: linear-gradient(135deg, #dcfce7, #f0fdf4);
  color: #16a34a;
}

.status-badge.disabled {
  background: linear-gradient(135deg, #fef3c7, #fffbeb);
  color: #d97706;
}

/* Admin Form */
.admin-form {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 32px;
  border: 1px solid var(--border);
}

.admin-form h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--slate-50);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 15px;
  transition: all var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--teal-500);
  background: white;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.1);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ===========================
   BUTTONS
   =========================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 700;
  transition: all var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
  color: white;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
}

.btn-secondary {
  background: var(--slate-100);
  color: var(--text-secondary);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  background: var(--slate-200);
  border-color: var(--slate-300);
}

.btn-danger {
  background: linear-gradient(135deg, #fee2e2, #fef2f2);
  color: #dc2626;
  border: 2px solid #fecaca;
}

.btn-danger:hover {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-group {
  display: flex;
  gap: 10px;
}

/* ===========================
   TOGGLE SWITCH
   =========================== */

.toggle {
  position: relative;
  width: 48px;
  height: 26px;
  cursor: pointer;
}

.toggle input {
  display: none;
}

.toggle .slider {
  position: absolute;
  inset: 0;
  background: var(--slate-300);
  border-radius: 26px;
  transition: all var(--transition);
}

.toggle .slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle input:checked + .slider {
  background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
}

.toggle input:checked + .slider::before {
  transform: translateX(22px);
}

/* ===========================
   TOAST
   =========================== */

.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
  color: white;
  padding: 14px 28px;
  border-radius: var(--radius-xl);
  font-size: 14px;
  font-weight: 600;
  z-index: 300;
  animation: toastIn 0.4s cubic-bezier(0.4, 0, 0.2, 1), toastOut 0.3s ease 1.7s forwards;
  box-shadow: var(--shadow-2xl);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(32px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateX(32px);
  }
}

/* ===========================
   EMPTY STATE
   =========================== */

.empty-state {
  text-align: center;
  padding: 80px 32px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 72px;
  margin-bottom: 24px;
  opacity: 0.6;
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 15px;
  max-width: 360px;
  margin: 0 auto;
}

/* ===========================
   LOADING SCREEN
   =========================== */

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-800));
  transition: opacity 0.5s, visibility 0.5s;
}

.loading-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-logo {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  color: white;
  animation: pulse 1.5s ease infinite, float 3s ease-in-out infinite;
  box-shadow: 0 12px 32px rgba(20, 184, 166, 0.4);
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 12px 32px rgba(20, 184, 166, 0.4);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 16px 40px rgba(20, 184, 166, 0.5);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.loading-text {
  margin-top: 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--slate-400);
  letter-spacing: 0.02em;
}

/* ===========================
   MOBILE RESPONSIVE (<960px)
   =========================== */

@media (max-width: 959px) {
  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    width: 100%;
    height: auto;
    flex-direction: row;
    border-right: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .sidebar-brand,
  .sidebar-footer,
  .nav-section-label {
    display: none;
  }

  .sidebar-nav {
    display: flex;
    padding: 8px;
    width: 100%;
    justify-content: space-around;
    overflow-x: auto;
  }

  .lang-switch-desktop {
    display: none;
  }

  .lang-switch-mobile {
    display: flex;
  }

  .nav-item {
    flex-direction: column;
    padding: 10px 8px;
    font-size: 10px;
    gap: 4px;
    min-width: 64px;
  }

  .nav-item[data-mobile="false"] {
    display: none;
  }

  .nav-item .nav-icon {
    font-size: 24px;
  }

  .nav-item::before {
    display: none;
  }

  .main-content {
    margin-left: 0;
    padding-bottom: 88px;
  }

  .content-body {
    padding: 24px 20px;
  }

  .quick-actions {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .action-card {
    flex-direction: column;
    padding: 20px;
    text-align: center;
    align-items: center;
  }

  .city-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .suggestions-grid {
    grid-template-columns: 1fr;
  }

  .translate-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .city-detail-grid {
    grid-template-columns: 1fr;
  }

  .place-grid {
    grid-template-columns: 1fr;
  }

  .phrases-layout {
    grid-template-columns: 1fr;
  }

  .phrase-cats-sidebar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px;
    border-radius: var(--radius-lg);
    position: static;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .phrase-cats-sidebar::-webkit-scrollbar {
    display: none;
  }

  .phrase-cat-item {
    white-space: nowrap;
    flex-shrink: 0;
    margin-bottom: 0;
  }

  .phrase-grid {
    grid-template-columns: 1fr;
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-sidebar {
    position: static;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px;
    position: static;
    border-radius: var(--radius-lg);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .admin-sidebar::-webkit-scrollbar {
    display: none;
  }

  .admin-nav-item {
    white-space: nowrap;
    flex-shrink: 0;
    margin-bottom: 0;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .chat-sidebar {
    display: none;
  }

  .chat-messages {
    padding: 20px;
  }

  .chat-input-bar {
    padding: 16px 20px;
  }

  .content-header {
    padding: 0 20px;
  }

  .chat-msg {
    max-width: 90%;
  }
}

/* ===========================
   SMALL MOBILE (<640px)
   =========================== */

@media (max-width: 639px) {
  .quick-actions {
    grid-template-columns: 1fr;
  }

  .action-card {
    flex-direction: row;
    text-align: left;
  }

  .admin-table {
    font-size: 12px;
  }

  .admin-table th,
  .admin-table td {
    padding: 12px 10px;
  }

  .city-hero-content h1 {
    font-size: 32px;
  }

  .section-header h2 {
    font-size: 18px;
  }

  .fullscreen-overlay .fs-text {
    font-size: 40px;
  }
}

/* ===========================
   AUTH PAGE
   =========================== */

.auth-container {
  max-width: 440px;
  margin: 0 auto;
}

.auth-card {
  background: var(--bg-white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
  overflow: hidden;
  border: 1px solid var(--border);
}

.auth-header {
  text-align: center;
  padding: 40px 32px 32px;
  background: linear-gradient(135deg, var(--slate-50), white);
  border-bottom: 1px solid var(--border);
}

.auth-header .auth-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: white;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.3);
}

.auth-header h2 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

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

.auth-body {
  padding: 32px;
}

.social-login {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.social-btn {
  flex: 1;
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  background: var(--bg-white);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.social-btn:hover {
  border-color: var(--teal-300);
  background: var(--teal-50);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-switch button {
  color: var(--teal-600);
  font-weight: 700;
  margin-left: 4px;
}

.auth-switch button:hover {
  text-decoration: underline;
}
