/* =============================================
   MAASPORT V2 — Design System
   Premium vanilla CSS · Mobile-first
   ============================================= */

/* ---------- 1. Custom Properties ---------- */
:root {
  --primary: #4f46e5;
  --primary-light: #eef2ff;
  --primary-dark: #4338ca;
  --primary-hover: #4338ca;
  --success: #16a34a;
  --success-light: #f0fdf4;
  --warning: #ea580c;
  --warning-light: #fff7ed;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --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;
  --white: #ffffff;
  --black: #000000;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: all 0.2s ease;
  --transition-fast: all 0.15s ease;
  --transition-slow: all 0.3s ease;
}

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

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--white);
  color: var(--slate-800);
  font-size: 16px;
  line-height: 1.5;
}

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

a {
  color: var(--primary);
  text-decoration: none;
}

button {
  font-family: var(--font);
  cursor: pointer;
  border: none;
  background: transparent;
  font-size: inherit;
  color: inherit;
}

input,
select,
textarea {
  font-family: var(--font);
  font-size: inherit;
}

ul,
ol {
  list-style: none;
}

/* ---------- 3. Typography ---------- */
h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.3;
}

h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--slate-800);
  line-height: 1.4;
}

h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--slate-800);
}

p {
  color: var(--slate-600);
  font-size: 0.875rem;
  line-height: 1.6;
}

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black { font-weight: 900; }

.text-primary { color: var(--primary); }
.text-slate-400 { color: var(--slate-400); }
.text-slate-500 { color: var(--slate-500); }
.text-slate-600 { color: var(--slate-600); }
.text-slate-700 { color: var(--slate-700); }
.text-slate-800 { color: var(--slate-800); }
.text-slate-900 { color: var(--slate-900); }
.text-white { color: var(--white); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.uppercase { text-transform: uppercase; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }

.label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--slate-400);
  letter-spacing: 0.05em;
  margin-left: 4px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- 4. Layout Helpers ---------- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: start; }
.items-end { align-items: end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.relative { position: relative; }
.absolute { position: absolute; }
.hidden { display: none !important; }
.block { display: block; }
.inline-flex { display: inline-flex; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.overflow-x-auto { overflow-x: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.self-start { align-self: flex-start; }
.self-center { align-self: center; }

/* Spacing */
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.p-8 { padding: 32px; }
.px-2 { padding-left: 8px; padding-right: 8px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.ml-2 { margin-left: 8px; }
.ml-4 { margin-left: 16px; }
.mr-1 { margin-right: 4px; }
.mr-2 { margin-right: 8px; }
.mr-3 { margin-right: 12px; }
.pb-20 { padding-bottom: 80px; }
.pb-24 { padding-bottom: 96px; }
.pt-12 { padding-top: 48px; }

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 0.875rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  gap: 8px;
  white-space: nowrap;
  user-select: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active {
  transform: scale(0.97);
  background: var(--primary-dark);
}

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

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

.btn-secondary:active {
  transform: scale(0.97);
}

.btn-success {
  background: var(--success);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-success:hover {
  background: #15803d;
}

.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
}

.btn-danger:hover {
  background: #fecaca;
}

.btn-danger-solid {
  background: var(--danger);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--slate-600);
  padding: 10px 16px;
}

.btn-ghost:hover {
  background: var(--slate-50);
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-icon:hover {
  background: var(--slate-50);
}

.btn-icon:active {
  transform: scale(0.92);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.75rem;
  border-radius: var(--radius-md);
}

.btn-lg {
  padding: 18px 32px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

.btn:disabled,
.btn-primary:disabled,
.btn-success:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-outline-primary {
  background: var(--primary-light);
  color: var(--primary);
  border: none;
}

.btn-outline-primary:hover {
  background: #ddd6fe;
}

.btn-dashed {
  width: 100%;
  padding: 12px;
  border: 2px dashed #c7d2fe;
  color: var(--primary);
  font-weight: 700;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  background: transparent;
}

.btn-dashed:hover {
  background: var(--primary-light);
}

/* ---------- 6. Forms ---------- */
.input {
  width: 100%;
  padding: 14px 16px;
  background: var(--slate-50);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  outline: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-800);
  transition: var(--transition);
}

.input:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.input::placeholder {
  color: var(--slate-400);
}

.input-code {
  text-align: center;
  font-size: 1.875rem;
  letter-spacing: 0.5em;
  padding: 16px;
}

.input-icon-wrapper {
  position: relative;
  width: 100%;
}

.input-icon-wrapper .input {
  padding-right: 48px;
}

.input-icon-wrapper .input-icon-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate-400);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.select {
  width: 100%;
  padding: 14px 16px;
  background: var(--slate-50);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  outline: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-800);
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.select:focus {
  border-color: var(--primary);
  background-color: var(--white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%234f46e5' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
}

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

.textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  outline: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-800);
  resize: none;
  transition: var(--transition);
  line-height: 1.6;
}

.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--slate-50);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-100);
}

.checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-label {
  font-size: 0.75rem;
  color: var(--slate-600);
  cursor: pointer;
  line-height: 1.5;
}

.checkbox-label-link {
  color: var(--primary);
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  padding: 0;
}

.checkbox-label-link:hover {
  text-decoration: underline;
}

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

.form-row {
  display: flex;
  gap: 12px;
}

.form-hint {
  font-size: 10px;
  color: var(--slate-500);
  font-style: italic;
  margin-top: 4px;
  padding-left: 8px;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--slate-100);
  border-radius: var(--radius-full);
  padding: 10px 16px;
  gap: 10px;
}

.search-bar i {
  color: var(--slate-400);
  font-size: 0.875rem;
}

.search-bar input {
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--slate-800);
}

.search-bar input::placeholder {
  color: var(--slate-400);
}

/* Range Slider */
input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

/* Date/Time Inputs */
.input-date {
  width: 100%;
  font-size: 0.75rem;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: var(--slate-100);
  border: none;
  outline: none;
  font-weight: 500;
  color: var(--slate-600);
}

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

/* Suggestion Dropdowns */
.suggestions-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 8px;
  z-index: 60;
  max-height: 220px;
  overflow-y: auto;
}

.suggestions-dropdown.show {
  display: block;
}

.suggestion-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--slate-700);
  transition: var(--transition-fast);
}

.suggestion-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* ---------- 7. Cards ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--slate-100);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-hover {
  transition: var(--transition);
}

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

.card-body {
  padding: 16px;
}

.card-padded {
  padding: 24px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--slate-200);
}

.info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-row .info-label {
  color: var(--slate-500);
  font-size: 0.875rem;
}

.info-row .info-value {
  font-weight: 700;
  color: var(--slate-800);
  font-size: 0.875rem;
}

.settings-card {
  background: var(--slate-50);
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-100);
}

.settings-card .label {
  margin-left: 0;
  margin-bottom: 4px;
}

.settings-card select {
  width: 100%;
  background: transparent;
  font-weight: 700;
  color: var(--slate-800);
  border: none;
  outline: none;
  margin-top: 4px;
  cursor: pointer;
  font-size: 0.875rem;
}

.settings-card p {
  font-weight: 700;
  color: var(--slate-800);
  font-size: 0.875rem;
}

/* ---------- 8. App Shell ---------- */
#app-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10;
  background: var(--white);
}

#app-container.hidden {
  display: none !important;
}

#main-content {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--white);
  width: 100%;
}

/* ---------- 9. Bottom Navigation ---------- */
#bottom-nav {
  height: 65px;
  background: var(--white);
  border-top: 1px solid var(--slate-100);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 50;
  width: 100%;
  flex-shrink: 0;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--slate-400);
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  transition: var(--transition-fast);
  font-family: var(--font);
}

.nav-item:active {
  transform: scale(0.92);
}

.nav-item.active {
  color: var(--primary);
}

.nav-item i {
  font-size: 22px;
  margin-bottom: 2px;
}

.nav-item span {
  font-size: 10px;
  font-weight: 600;
}

.nav-badge {
  position: absolute;
  top: 4px;
  right: 20%;
  background-color: #ef4444;
  color: var(--white);
  border-radius: var(--radius-full);
  border: 2px solid var(--white);
  display: none;
  font-size: 9px;
  font-weight: 800;
  padding: 0 5px;
  height: 18px;
  min-width: 18px;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.nav-badge.show {
  display: flex;
}

/* ---------- 10. Tab Views ---------- */
.tab-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--white);
  -webkit-overflow-scrolling: touch;
}

.tab-view.hidden {
  display: none !important;
}

.tab-header {
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 20;
  padding: 48px 24px 16px;
  border-bottom: 1px solid var(--slate-100);
  box-shadow: var(--shadow-sm);
}

.tab-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Sub-tabs (inside profile, etc.) */
.sub-tabs {
  display: flex;
  gap: 24px;
  padding: 0 24px;
}

.sub-tab-btn {
  padding-bottom: 12px;
  border-bottom: 2px solid transparent;
  color: var(--slate-400);
  font-weight: 700;
  font-size: 0.875rem;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

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

/* ---------- 11. Auth Overlay ---------- */
#auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--white);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
}

#auth-overlay.hidden {
  display: none !important;
}

/* Landing Page */
.landing-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: var(--slate-50);
  padding: 16px;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
}

@media (min-width: 768px) {
  .landing-page {
    flex-direction: column;
    justify-content: center;
    padding: 32px;
    overflow: hidden;
  }
}

.landing-page::before,
.landing-page::after {
  content: '';
  position: absolute;
  width: 384px;
  height: 384px;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.2;
  pointer-events: none;
}

.landing-page::before {
  top: -10%;
  left: -10%;
  background: #818cf8;
}

.landing-page::after {
  bottom: -10%;
  right: -10%;
  background: #fb7185;
}

.landing-grid {
  max-width: 1024px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
  z-index: 10;
}

@media (min-width: 768px) {
  .landing-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.landing-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: center;
  margin-top: 128px;
}

@media (min-width: 768px) {
  .landing-left {
    text-align: left;
    padding-right: 32px;
    margin-top: 0;
  }
}

.landing-title {
  font-size: 3rem;
  font-weight: 900;
  color: var(--slate-900);
  letter-spacing: -0.025em;
}

.landing-title .accent {
  color: var(--primary);
}

.landing-tagline {
  font-size: 1.125rem;
  color: var(--slate-600);
  font-weight: 500;
}

.how-it-works {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-100);
  text-align: left;
}

.how-it-works h3 {
  margin-bottom: 16px;
}

.step-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.step-item + .step-item {
  margin-top: 16px;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.875rem;
}

.step-text {
  font-size: 0.875rem;
  color: var(--slate-600);
  padding-top: 4px;
  line-height: 1.5;
}

.landing-right {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  border: 1px solid var(--slate-100);
  text-align: center;
}

.landing-logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
  margin: 0 auto 16px;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
}

.landing-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.landing-footer {
  margin-top: 32px;
  padding: 16px;
  text-align: center;
  z-index: 10;
}

.landing-footer p {
  font-size: 0.6875rem;
  color: var(--slate-400);
  line-height: 1.5;
}

/* Auth Forms (Login, Signup, Forgot) */
.auth-view {
  flex: 1;
  display: none;
  flex-direction: column;
  padding: 32px;
  background: var(--white);
  overflow-y: auto;
}

.auth-view.active {
  display: flex;
}

.auth-back-btn {
  align-self: flex-start;
  padding: 8px;
  margin-bottom: 16px;
  color: var(--slate-400);
  font-size: 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
}

.auth-heading {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 32px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form.hidden {
  display: none !important;
}

.auth-link {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary);
  align-self: center;
  margin-top: 24px;
  background: none;
  border: none;
  cursor: pointer;
}

.auth-link:hover {
  text-decoration: underline;
}

/* Student Type Selector */
.type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.type-card {
  padding: 24px 16px;
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-xl);
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--white);
}

.type-card i {
  font-size: 2rem;
  color: var(--slate-400);
  margin-bottom: 12px;
  transition: var(--transition);
}

.type-card p {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--slate-600);
}

.type-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.type-card.selected i {
  color: var(--primary);
}

.type-card.selected p {
  color: var(--primary);
}

.type-card:hover {
  border-color: var(--primary);
}

/* ---------- 12. Modals ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 500;
  display: none;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-overlay.show {
  display: flex;
}

@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
  }
}

.modal-content {
  background: var(--white);
  width: 100%;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 24px;
  box-shadow: var(--shadow-2xl);
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

@media (min-width: 640px) {
  .modal-content {
    max-width: 420px;
    border-radius: var(--radius-xl);
  }
}

.modal-content-lg {
  max-width: 640px;
}

.modal-content-full {
  position: fixed;
  inset: 0;
  border-radius: 0;
  max-width: none;
  max-height: none;
  z-index: 500;
  display: none;
  flex-direction: column;
  background: var(--white);
  overflow-y: auto;
}

.modal-content-full.show {
  display: flex;
}

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

.modal-close {
  color: var(--slate-400);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.125rem;
  padding: 4px;
  border-radius: var(--radius-full);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: var(--slate-100);
  color: var(--slate-600);
}

.modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
}

.modal-icon-danger {
  background: var(--danger-light);
  color: var(--danger);
}

.modal-icon-success {
  background: var(--success-light);
  color: var(--success);
}

/* High-z modals */
.modal-overlay-high {
  z-index: 2000;
}

.modal-overlay-legal {
  z-index: 5000;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
}

.legal-modal-content {
  background: var(--white);
  width: 100%;
  max-width: 640px;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}

.legal-modal-header {
  padding: 16px;
  border-bottom: 1px solid var(--slate-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--slate-50);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

.legal-modal-body {
  padding: 24px;
  overflow-y: auto;
  font-size: 0.875rem;
  color: var(--slate-600);
}

.legal-modal-body p + p {
  margin-top: 16px;
}

/* ---------- 13. Chat ---------- */
.chat-list {
  flex: 1;
}

.chat-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  cursor: pointer;
  transition: var(--transition-fast);
  border-bottom: 1px solid var(--slate-50);
  position: relative;
}

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

.chat-list-item:active {
  background: var(--slate-100);
}

.chat-item-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  background-size: cover;
  background-position: center;
}

.chat-item-body {
  flex: 1;
  min-width: 0;
}

.chat-item-name {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--slate-900);
  line-height: 1.3;
}

.chat-item-preview {
  font-size: 0.8125rem;
  color: var(--slate-500);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.chat-item-time {
  font-size: 0.6875rem;
  color: var(--slate-400);
  font-weight: 500;
}

.chat-unread-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
}

/* Chat Room */
.chat-room {
  position: absolute;
  inset: 0;
  z-index: 200;
  background: var(--white);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  transform: translateX(100%);
}

.chat-room.open {
  transform: translateX(0);
}

.chat-room-header {
  padding: 16px;
  border-bottom: 1px solid var(--slate-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--white);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  z-index: 10;
}

.chat-room-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-room-back {
  color: var(--slate-500);
  margin-right: 4px;
  font-size: 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
}

.chat-room-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
}

.chat-room-info h2 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.2;
}

.chat-room-info p {
  font-size: 10px;
  color: var(--slate-500);
  font-weight: 700;
  text-transform: uppercase;
}

.chat-agreement-banner {
  background: var(--success);
  color: var(--white);
  padding: 8px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  z-index: 10;
  display: none;
}

.chat-agreement-banner.show {
  display: block;
}

.room-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--slate-50);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Message Bubbles */
.message-bubble {
  max-width: 80%;
  padding: 10px 16px;
  border-radius: 18px;
  font-size: 0.875rem;
  line-height: 1.5;
  word-break: break-word;
  position: relative;
}

.message-theirs {
  align-self: flex-start;
  background: var(--white);
  color: var(--slate-800);
  border: 1px solid var(--slate-100);
  border-bottom-left-radius: 4px;
}

.message-mine {
  align-self: flex-end;
  background: var(--primary);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.message-sender {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}

.message-time {
  font-size: 0.625rem;
  opacity: 0.7;
  margin-top: 4px;
  text-align: right;
}

.message-system {
  align-self: center;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  text-align: center;
  max-width: 90%;
}

/* Chat Input Bar */
.chat-input-bar {
  padding: 16px;
  background: var(--white);
  border-top: 1px solid var(--slate-100);
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

.chat-input-bar input {
  flex: 1;
  background: var(--slate-100);
  border-radius: var(--radius-full);
  padding: 12px 20px;
  border: none;
  outline: none;
  font-size: 0.875rem;
}

.chat-input-bar .chat-send-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
  transition: var(--transition);
}

.chat-input-bar .chat-send-btn:hover {
  background: var(--primary-dark);
}

/* Chat Filter Pills */
.chat-filters {
  display: flex;
  gap: 8px;
  padding: 16px 16px 8px;
}

.chat-filter-btn {
  flex: 1;
  padding: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  cursor: pointer;
  border: none;
  text-align: center;
}

.chat-filter-btn.active {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.chat-filter-btn:not(.active) {
  background: var(--slate-100);
  color: var(--slate-500);
}

.chat-filter-btn:not(.active):hover {
  background: var(--slate-200);
}

/* ---------- 14. Listing Cards ---------- */
.listing-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--slate-100);
  transition: var(--transition);
}

.listing-card:hover {
  box-shadow: var(--shadow-lg);
}

.listing-card + .listing-card {
  margin-top: 16px;
}

.listing-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--slate-100);
}

.listing-card-body {
  padding: 16px;
}

.listing-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.listing-card-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--slate-900);
  margin-bottom: 4px;
}

.listing-card-subtitle {
  font-size: 0.8125rem;
  color: var(--slate-500);
}

.listing-price {
  font-weight: 800;
  color: var(--primary);
  font-size: 1.25rem;
}

.listing-price span {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--slate-500);
}

.listing-card-meta {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--slate-500);
}

.listing-card-meta i {
  margin-right: 4px;
  color: var(--slate-400);
}

.listing-card-dates {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--slate-100);
  font-size: 0.75rem;
  color: var(--slate-600);
}

.listing-card-dates i {
  color: var(--primary);
  margin-right: 4px;
}

.listing-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* Swap Result Card */
.swap-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 16px;
  border: 1px solid var(--slate-100);
  box-shadow: var(--shadow-sm);
}

.swap-card + .swap-card {
  margin-top: 12px;
}

.swap-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

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

.swap-card-name {
  font-weight: 700;
  color: var(--slate-900);
  font-size: 0.9375rem;
}

.swap-card-detail {
  font-size: 0.75rem;
  color: var(--slate-500);
}

/* ---------- 15. Photo Carousel ---------- */
.carousel {
  position: relative;
  overflow: hidden;
  background: var(--slate-100);
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-track img {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: start;
}

.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.carousel-dot.active {
  background: var(--white);
  width: 24px;
  border-radius: 4px;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition-fast);
  color: var(--slate-700);
}

.carousel-nav:hover {
  background: var(--white);
}

.carousel-nav-prev {
  left: 12px;
}

.carousel-nav-next {
  right: 12px;
}

/* ---------- 16. Map ---------- */
#map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

.map-float-logo {
  position: absolute;
  top: 48px;
  left: 16px;
  background: var(--white);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 40;
}

.map-float-logo img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.map-float-logo span {
  font-weight: 700;
  color: var(--slate-800);
  font-size: 0.875rem;
}

.map-location-btn {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: var(--white);
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  color: var(--primary);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.125rem;
}

.map-location-btn:hover {
  background: var(--primary-light);
}

.map-filter-pills {
  position: absolute;
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 40;
  background: var(--white);
  border-radius: var(--radius-full);
  padding: 4px;
  box-shadow: var(--shadow-lg);
}

.map-filter-pill {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  color: var(--slate-500);
  background: transparent;
}

.map-filter-pill.active {
  background: var(--primary);
  color: var(--white);
}

.swap-map-container {
  width: 100%;
  height: 45vh;
  background: var(--slate-100);
  border-bottom: 1px solid var(--slate-200);
  z-index: 10;
  flex-shrink: 0;
}

/* Custom Leaflet popup */
.map-popup {
  font-family: var(--font);
}

.map-popup h4 {
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 4px;
}

.map-popup p {
  font-size: 0.75rem;
  color: var(--slate-500);
}

/* ---------- 17. Toast ---------- */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 10000;
  font-size: 0.875rem;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-xl);
}

.toast.show {
  opacity: 1;
}

/* ---------- 18. Badges / Tags ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  height: 22px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary);
}

.badge-success {
  background: var(--success-light);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-light);
  color: var(--warning);
}

.badge-danger {
  background: var(--danger-light);
  color: var(--danger);
}

.badge-neutral {
  background: var(--slate-100);
  color: var(--slate-600);
}

.badge-count {
  background: #ef4444;
  color: var(--white);
  font-size: 10px;
  font-weight: 800;
  height: 18px;
  min-width: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--white);
  position: absolute;
  top: -2px;
  right: -2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--slate-100);
  color: var(--slate-600);
}

.tag-primary {
  background: var(--primary-light);
  color: var(--primary);
}

/* ---------- 19. Agreement Card ---------- */
.agreement-card {
  border-radius: var(--radius-xl);
  padding: 20px;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.agreement-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.agreement-pending {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
}

.agreement-accepted {
  background: linear-gradient(135deg, var(--success), #059669);
}

.agreement-cancelled {
  background: linear-gradient(135deg, var(--warning), #f59e0b);
}

.agreement-card-title {
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 8px;
}

.agreement-card-detail {
  font-size: 0.8125rem;
  opacity: 0.9;
  margin-bottom: 4px;
}

.agreement-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.agreement-card-actions button {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.8125rem;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

/* Statement of Agreement Form */
.agreement-form {
  max-width: 640px;
  margin: 0 auto;
}

.agreement-guidelines {
  background: rgba(79, 70, 229, 0.05);
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(79, 70, 229, 0.15);
  height: 128px;
  overflow-y: auto;
  font-size: 0.75rem;
  color: var(--slate-600);
}

.agreement-guidelines h4 {
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.agreement-guidelines p + p {
  margin-top: 8px;
}

/* ---------- 20. Loading / Skeleton ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--slate-100) 25%, var(--slate-200) 50%, var(--slate-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
  width: 80%;
}

.skeleton-text-short {
  width: 50%;
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.skeleton-card {
  height: 200px;
  border-radius: var(--radius-xl);
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner-primary {
  border-color: rgba(79, 70, 229, 0.2);
  border-top-color: var(--primary);
}

.spinner-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(2px);
}

/* ---------- 21. Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--slate-300);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--slate-400);
}

.hide-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ---------- 22. Avatar ---------- */
.avatar {
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
}

.avatar-md {
  width: 48px;
  height: 48px;
  font-size: 1rem;
}

.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 1.25rem;
}

.avatar-xl {
  width: 96px;
  height: 96px;
  font-size: 2rem;
  box-shadow: var(--shadow-lg);
}

.avatar-upload {
  cursor: pointer;
  position: relative;
}

.avatar-upload-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.avatar-upload:hover .avatar-upload-overlay {
  display: flex;
}

/* ---------- 23. Status Dots ---------- */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-active {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

.status-paused {
  background: #eab308;
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.2);
}

.status-offline {
  background: var(--slate-300);
}

/* ---------- 24. Empty States ---------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--slate-300);
  margin-bottom: 16px;
}

.empty-state h3 {
  color: var(--slate-700);
  font-size: 1rem;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--slate-400);
  font-size: 0.8125rem;
  max-width: 280px;
}

/* ---------- 25. Glassmorphism ---------- */
.glass {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
}

/* ---------- 26. Lightbox ---------- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  color: var(--white);
  font-size: 1.875rem;
  background: none;
  border: none;
  cursor: pointer;
}

.lightbox-img {
  max-width: 95%;
  max-height: 90%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-2xl);
  object-fit: contain;
}

/* ---------- 27. Cropper Modal ---------- */
.cropper-modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 1000;
  display: none;
  flex-direction: column;
  justify-content: space-between;
}

.cropper-modal-overlay.show {
  display: flex;
}

.cropper-toolbar {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  background: var(--black);
  color: var(--white);
}

.cropper-toolbar button {
  color: var(--white);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.cropper-toolbar .cropper-done {
  font-weight: 700;
  color: #818cf8;
}

.cropper-body {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.cropper-body img {
  max-width: 100%;
}

/* ---------- 28. Public Profile View ---------- */
.public-profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--white);
  display: none;
  flex-direction: column;
}

.public-profile-overlay.show {
  display: flex;
}

.public-profile-header {
  padding: 16px;
  border-bottom: 1px solid var(--slate-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--white);
  flex-shrink: 0;
}

.public-profile-body {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 80px;
}

.public-profile-hero {
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.public-profile-tabs {
  display: flex;
  gap: 24px;
  padding: 0 24px;
  border-bottom: 1px solid var(--slate-100);
  margin-bottom: 24px;
}

.public-profile-tab {
  padding-bottom: 12px;
  border-bottom: 2px solid transparent;
  color: var(--slate-400);
  font-weight: 700;
  font-size: 0.875rem;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
}

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

/* ---------- 29. Calendar ---------- */
.calendar-wrapper {
  width: 100%;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding: 0 4px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: inherit;
  cursor: pointer;
  background: var(--slate-50);
  color: var(--slate-700);
  transition: var(--transition-fast);
}

.calendar-day:hover {
  background: var(--slate-200);
}

.calendar-day.available {
  background-color: #ecfccb;
  color: #3f6212;
  font-weight: 700;
  border: 2px solid #84cc16;
}

.calendar-day.swap-allowed {
  background-color: #fef08a;
  color: #854d0e;
  font-weight: 700;
  border: 2px solid #eab308;
}

.calendar-day.range-start {
  background-color: var(--primary);
  color: var(--white);
  border: 1px solid var(--primary-dark);
}

/* ---------- 30. Sublet Tab ---------- */
.sublet-filter-bar {
  display: flex;
  gap: 8px;
  padding: 12px 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

.sublet-filter-bar::-webkit-scrollbar {
  display: none;
}

.sublet-filter-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--slate-200);
  background: var(--white);
  color: var(--slate-600);
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition-fast);
}

.sublet-filter-pill.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.sublet-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 0 24px 96px;
}

@media (min-width: 640px) {
  .sublet-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .sublet-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- 31. Search (Travel Tab) ---------- */
.search-form-container {
  padding: 48px 24px 16px;
  border-bottom: 1px solid var(--slate-100);
  box-shadow: var(--shadow-sm);
  background: var(--white);
  z-index: 20;
}

.search-minimized {
  display: none;
  padding: 48px 24px 16px;
  border-bottom: 1px solid var(--slate-100);
  box-shadow: var(--shadow-sm);
  background: var(--white);
  justify-content: space-between;
  align-items: center;
  z-index: 20;
}

.search-minimized.show {
  display: flex;
}

.date-mode-toggle {
  display: flex;
  gap: 4px;
  background: var(--slate-100);
  padding: 4px;
  border-radius: var(--radius-lg);
  margin-bottom: 8px;
}

.date-mode-btn {
  flex: 1;
  padding: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
}

.date-mode-btn.active {
  background: var(--white);
  color: var(--slate-800);
  box-shadow: var(--shadow-sm);
}

.date-mode-btn:not(.active) {
  background: transparent;
  color: var(--slate-500);
}

.anywhere-options {
  display: none;
  margin-top: 8px;
  padding: 0 4px;
}

.anywhere-options.show {
  display: block;
}

.range-display {
  font-size: 10px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

/* ---------- 32. Photo Upload ---------- */
.photo-upload-zone {
  border: 2px dashed var(--slate-300);
  border-radius: var(--radius-xl);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--slate-50);
}

.photo-upload-zone:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.photo-upload-zone i {
  font-size: 2rem;
  color: var(--slate-400);
  margin-bottom: 8px;
}

.photo-upload-zone p {
  font-size: 0.8125rem;
  color: var(--slate-500);
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.photo-preview-item {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview-item .photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

/* ---------- 33. Amenities ---------- */
.amenities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.amenity-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 0.8125rem;
  color: var(--slate-600);
}

.amenity-checkbox:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.amenity-checkbox input:checked + span {
  color: var(--primary);
  font-weight: 600;
}

/* ---------- 34. Star Rating ---------- */
.star-rating {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 1.875rem;
  color: var(--slate-300);
}

.star-rating i {
  cursor: pointer;
  transition: var(--transition-fast);
}

.star-rating i:hover {
  color: #facc15;
}

.star-rating i.active {
  color: #facc15;
}

/* ---------- 35. Dividers / Separators ---------- */
.divider {
  border: none;
  border-top: 1px solid var(--slate-100);
  margin: 16px 0;
}

.divider-thick {
  border-top-width: 2px;
}

.space-y-2 > * + * { margin-top: 8px; }
.space-y-3 > * + * { margin-top: 12px; }
.space-y-4 > * + * { margin-top: 16px; }
.space-y-6 > * + * { margin-top: 24px; }

/* ---------- 36. Guidelines Modal ---------- */
.guidelines-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .guidelines-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.guidelines-section {
  background: var(--slate-50);
  padding: 20px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--slate-100);
}

.guidelines-list {
  margin-top: 16px;
}

.guidelines-list li {
  display: flex;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--slate-600);
}

.guidelines-list li + li {
  margin-top: 12px;
}

.guidelines-list li .step-num {
  font-weight: 700;
  color: var(--primary);
}

.guidelines-ack {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--primary-light);
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid #c7d2fe;
  margin-bottom: 24px;
}

/* ---------- 37. Animations ---------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideRight {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

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

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

.animate-fadeIn { animation: fadeIn 0.3s ease; }
.animate-slideUp { animation: slideUp 0.3s ease; }
.animate-scaleIn { animation: scaleIn 0.2s ease; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }

/* ---------- 38. Responsive — Tablet (768px+) ---------- */
@media (min-width: 768px) {
  .swap-map-container {
    height: 55vh;
  }

  .modal-content {
    border-radius: var(--radius-xl);
  }

  .listing-card-body {
    padding: 20px;
  }
}

/* ---------- 39. Responsive — Desktop (1024px+) ---------- */
@media (min-width: 1024px) {
  #app-container {
    flex-direction: row;
  }

  #bottom-nav {
    width: 100px;
    height: 100%;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 24px;
    gap: 12px;
    border-top: none;
    border-right: 1px solid var(--slate-100);
    order: -1;
    padding-bottom: 0;
  }

  .nav-item {
    width: 84px;
    height: 76px;
    border-radius: var(--radius-xl);
  }

  .nav-item i {
    font-size: 26px;
    margin-bottom: 4px;
  }

  .nav-item span {
    font-size: 11px;
  }

  .nav-item.active {
    background: var(--primary-light);
  }

  #main-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    border-left: 1px solid var(--slate-100);
    border-right: 1px solid var(--slate-100);
  }

  .tab-header {
    padding-top: 24px;
  }

  .search-form-container {
    padding-top: 24px;
  }

  .search-minimized {
    padding-top: 24px;
  }



  .landing-left {
    margin-top: 0;
  }

  .pt-12 {
    padding-top: 24px;
  }
}

/* ---------- 40. Print ---------- */
@media print {
  #bottom-nav,
  .toast,
  .modal-overlay {
    display: none !important;
  }

  #main-content {
    overflow: visible;
  }
}

/* ── Airbnb-style price pins on maps ─────────────────────────── */
.price-pin-wrap { background: transparent !important; border: none !important; }
.price-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  background: var(--white);
  color: var(--slate-900, #0f172a);
  font-weight: 800;
  font-size: 0.78rem;
  line-height: 1;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.price-pin:hover {
  background: #111827;
  color: #fff;
  transform: translate(-50%, -50%) scale(1.06);
  z-index: 1000;
}
