:root {
  /* Color Palette */
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  
  --accent-teal: #0d9488;
  --accent-emerald: #10b981;
  --accent-orange: #f97316;
  --accent-rose: #f43f5e;
  --accent-purple: #8b5cf6;

  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.25);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #f3f4f6;
  color: var(--slate-800);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

/* Top Global Navigation Bar */
header {
  background: var(--slate-900);
  color: var(--white);
  height: 64px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.5px;
}

.logo-badge {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary-600), var(--accent-teal));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.5);
}

.logo-badge svg {
  width: 18px;
  height: 18px;
  fill: var(--white);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-item a {
  color: var(--slate-400);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.nav-item.active a {
  color: var(--white);
  background: var(--primary-600);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.preset-pill {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.78rem;
  color: var(--slate-200);
  display: flex;
  align-items: center;
  gap: 6px;
}

.preset-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.btn-share {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-share:hover {
  background: rgba(255,255,255,0.22);
}

/* Sub Banner / Info Bar */
.top-sub-bar {
  background: var(--white);
  border-bottom: 1px solid var(--slate-200);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.preset-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.preset-title-group h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  gap: 8px;
}

.preset-tag {
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid var(--primary-100);
}

.quick-preset-btns {
  display: flex;
  gap: 8px;
}

.chip-btn {
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  color: var(--slate-700);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.chip-btn:hover, .chip-btn.active {
  background: var(--slate-800);
  color: var(--white);
  border-color: var(--slate-800);
}

/* Main Container Layout */
.app-container {
  display: flex;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
  gap: 24px;
  flex: 1;
}

/* Left Sidebar Filter Panel */
.filter-sidebar {
  width: 360px;
  flex-shrink: 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  height: fit-content;
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
}

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

.sidebar-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-reset {
  background: none;
  border: none;
  color: var(--slate-500);
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.btn-reset:hover {
  color: var(--primary-600);
}

.sidebar-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.filter-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--slate-800);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-val-highlight {
  color: var(--primary-600);
  font-weight: 800;
  font-size: 1rem;
}

.range-slider-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--primary-600);
  height: 6px;
  background: var(--slate-200);
  border-radius: 3px;
  cursor: pointer;
}

.quick-add-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.quick-add-btn {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 6px 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-700);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

.quick-add-btn:hover {
  background: var(--primary-50);
  color: var(--primary-700);
  border-color: var(--primary-100);
}

/* Option Tabs & Buttons */
.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--slate-100);
  padding: 3px;
  border-radius: var(--radius-md);
  gap: 2px;
}

.segmented-control button {
  background: transparent;
  border: none;
  padding: 8px 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate-600);
  border-radius: calc(var(--radius-md) - 2px);
  cursor: pointer;
  transition: all 0.2s;
}

.segmented-control button.active {
  background: var(--white);
  color: var(--slate-900);
  box-shadow: var(--shadow-sm);
}

.select-dropdown {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  background: var(--white);
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--slate-800);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.select-dropdown:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px var(--primary-100);
}

/* Location Checkbox Grid */
.location-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.loc-pill {
  padding: 5px 12px;
  border-radius: 16px;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--slate-700);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
}

.loc-pill.selected {
  background: var(--slate-900);
  color: var(--white);
  border-color: var(--slate-900);
}

.sidebar-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid var(--slate-200);
  background: var(--slate-50);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

.btn-submit-search {
  width: 100%;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: var(--white);
  border: none;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit-search:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

/* Main Display Content Area */
.content-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

/* Financial Calculation Dashboard Banner */
.dashboard-calc-card {
  background: linear-gradient(135deg, var(--slate-900) 0%, #1e1b4b 100%);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.calc-card-glow {
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.35) 0%, rgba(0,0,0,0) 70%);
  pointer-events: none;
}

.dashboard-calc-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.calc-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding-right: 20px;
}

.calc-item:last-child {
  border-right: none;
  padding-right: 0;
}

.calc-label {
  font-size: 0.82rem;
  color: var(--slate-400);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.calc-primary-val {
  font-family: 'Outfit', 'Noto Sans KR', sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  color: #60a5fa;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.calc-sub-val {
  font-size: 0.82rem;
  color: var(--slate-300);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Content Header Controls */
.content-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
}

.results-count-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--slate-900);
}

.results-count-text span {
  color: var(--primary-600);
}

.sort-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sort-options {
  display: flex;
  gap: 12px;
  list-style: none;
}

.sort-btn {
  background: none;
  border: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--slate-500);
  cursor: pointer;
  padding: 4px 0;
  position: relative;
}

.sort-btn.active {
  color: var(--primary-600);
  font-weight: 700;
}

.sort-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-600);
  border-radius: 1px;
}

.view-toggle {
  display: flex;
  background: var(--slate-100);
  padding: 3px;
  border-radius: var(--radius-sm);
  gap: 2px;
}

.view-btn {
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--slate-500);
  display: flex;
  align-items: center;
}

.view-btn.active {
  background: var(--white);
  color: var(--slate-900);
  box-shadow: var(--shadow-sm);
}

/* Apartment Grid Cards */
.apartment-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.apt-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
}

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

.apt-header-img {
  height: 140px;
  background: linear-gradient(135deg, #1e293b, #334155);
  position: relative;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.apt-header-bg-art {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.15;
  background-image: radial-gradient(#ffffff 1px, transparent 1px);
  background-size: 16px 16px;
}

.apt-badge-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.score-badge {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: #facc15;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid rgba(250, 204, 21, 0.3);
  display: flex;
  align-items: center;
  gap: 4px;
}

.match-status-badge {
  background: var(--accent-emerald);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.match-status-badge.warning {
  background: var(--accent-orange);
}

.apt-img-footer {
  position: relative;
  z-index: 2;
  color: var(--white);
}

.apt-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.apt-location {
  font-size: 0.78rem;
  color: var(--slate-300);
}

.apt-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.apt-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px dashed var(--slate-200);
  padding-bottom: 12px;
}

.price-label {
  font-size: 0.8rem;
  color: var(--slate-500);
  font-weight: 500;
}

.price-value {
  font-family: 'Outfit', 'Noto Sans KR', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--slate-900);
}

.apt-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--slate-50);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-100);
}

.metric-box {
  display: flex;
  flex-direction: column;
}

.metric-title {
  font-size: 0.72rem;
  color: var(--slate-500);
}

.metric-data {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--slate-800);
}

.apt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip {
  background: var(--slate-100);
  color: var(--slate-600);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
}

.tag-chip.highlight {
  background: var(--primary-50);
  color: var(--primary-700);
}

.apt-card-footer {
  padding: 12px 20px;
  background: var(--slate-50);
  border-top: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-card-detail {
  background: var(--white);
  border: 1px solid var(--slate-300);
  color: var(--slate-800);
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: all 0.2s;
}

.btn-card-detail:hover {
  background: var(--slate-900);
  color: var(--white);
  border-color: var(--slate-900);
}

/* Modal Styling */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: var(--white);
  border-radius: var(--radius-xl);
  max-width: 850px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-backdrop.active .modal-container {
  transform: translateY(0);
}

.modal-header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--slate-900);
  color: var(--white);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
}

.modal-title-group h3 {
  font-size: 1.25rem;
  font-weight: 800;
}

.modal-title-group p {
  font-size: 0.82rem;
  color: var(--slate-400);
}

.btn-close-modal {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--white);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.modal-section-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.sim-table th, .sim-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--slate-200);
  text-align: left;
}

.sim-table th {
  background: var(--slate-50);
  color: var(--slate-600);
  font-weight: 600;
}

.sim-table td.val-bold {
  font-weight: 800;
  color: var(--primary-600);
}

/* SVG Price Chart Box */
.chart-box {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--slate-900);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive Breakdown */
@media (max-width: 1100px) {
  .dashboard-calc-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .calc-item {
    border-right: none;
  }
}

@media (max-width: 860px) {
  .app-container {
    flex-direction: column;
    padding: 16px;
    gap: 16px;
  }
  .filter-sidebar {
    width: 100%;
    position: static;
    max-height: none;
  }
  .apartment-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Devices Optimization (Smartphones & Tablets) */
@media (max-width: 768px) {
  /* Header & Navigation */
  header {
    height: auto;
    min-height: 56px;
    padding: 10px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    position: relative;
  }

  .nav-left {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .brand-logo {
    font-size: 1.15rem;
  }

  .logo-badge {
    width: 28px;
    height: 28px;
  }

  .logo-badge svg {
    width: 16px;
    height: 16px;
  }

  .nav-menu {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    gap: 4px;
  }

  .nav-item a {
    font-size: 0.78rem;
    padding: 8px 10px;
    min-height: 38px;
    border-radius: var(--radius-sm);
  }

  .nav-right {
    width: 100%;
    justify-content: space-between;
  }

  .preset-pill {
    font-size: 0.72rem;
    padding: 4px 10px;
  }

  .btn-share {
    font-size: 0.78rem;
    padding: 8px 12px;
    min-height: 38px;
  }

  /* Preset Banner */
  .top-sub-bar {
    padding: 10px 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .preset-title-group h2 {
    font-size: 0.95rem;
    flex-wrap: wrap;
  }

  .quick-preset-btns {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    gap: 6px;
  }

  .chip-btn {
    font-size: 0.75rem;
    padding: 8px 12px;
    min-height: 38px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
  }

  /* Sidebar & Filter Buttons */
  .sidebar-header {
    padding: 14px 16px;
  }

  .sidebar-header h3 {
    font-size: 1rem;
  }

  .btn-reset {
    font-size: 0.8rem;
    padding: 6px 10px;
    min-height: 36px;
  }

  .sidebar-body {
    padding: 16px;
    gap: 18px;
  }

  .filter-label {
    font-size: 0.82rem;
  }

  .filter-val-highlight {
    font-size: 0.92rem;
  }

  .quick-add-group {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .quick-add-btn {
    font-size: 0.78rem;
    padding: 10px 6px;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .segmented-control button {
    font-size: 0.78rem;
    padding: 10px 0;
    min-height: 42px;
  }

  .select-dropdown {
    font-size: 0.85rem;
    padding: 10px 12px;
    min-height: 44px;
  }

  .location-pills {
    gap: 6px;
  }

  .loc-pill {
    font-size: 0.78rem;
    padding: 8px 12px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar-footer {
    padding: 14px 16px;
  }

  .btn-submit-search {
    font-size: 0.9rem;
    padding: 12px;
    min-height: 46px;
  }

  /* Financial Dashboard Banner */
  .dashboard-calc-card {
    padding: 18px 16px;
    border-radius: var(--radius-lg);
  }

  .dashboard-calc-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .calc-item {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-right: 0;
    padding-bottom: 10px;
  }

  .calc-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .calc-label {
    font-size: 0.78rem;
  }

  .calc-primary-val {
    font-size: 1.45rem;
  }

  .calc-sub-val {
    font-size: 0.75rem;
  }

  /* Content Header Controls */
  .content-controls-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }

  .results-count-text {
    font-size: 0.88rem;
  }

  .sort-group {
    width: 100%;
    justify-content: space-between;
  }

  .sort-options {
    gap: 8px;
  }

  .sort-btn {
    font-size: 0.78rem;
    padding: 8px 4px;
    min-height: 38px;
  }

  /* Apartment Card Buttons & Text */
  .apt-header-img {
    height: 120px;
    padding: 12px;
  }

  .apt-name {
    font-size: 1.05rem;
  }

  .apt-location {
    font-size: 0.75rem;
  }

  .apt-body {
    padding: 14px;
    gap: 12px;
  }

  .price-label {
    font-size: 0.75rem;
  }

  .price-value {
    font-size: 1.2rem;
  }

  .apt-metrics-grid {
    padding: 8px 10px;
    gap: 6px;
  }

  .metric-title {
    font-size: 0.7rem;
  }

  .metric-data {
    font-size: 0.78rem;
  }

  .apt-card-footer {
    padding: 10px 14px;
  }

  .btn-card-detail {
    font-size: 0.85rem;
    padding: 10px 14px;
    min-height: 44px;
  }

  /* Modal on Mobile */
  .modal-container {
    width: 95%;
    max-height: 92vh;
    border-radius: var(--radius-lg);
  }

  .modal-header {
    padding: 16px;
  }

  .modal-title-group h3 {
    font-size: 1.05rem;
  }

  .modal-title-group p {
    font-size: 0.78rem;
  }

  .btn-close-modal {
    width: 36px;
    height: 36px;
  }

  .modal-body {
    padding: 16px;
    gap: 16px;
  }

  .modal-section-title {
    font-size: 0.9rem;
  }

  .sim-table th, .sim-table td {
    padding: 8px 6px;
    font-size: 0.78rem;
  }

  /* Toast Notification */
  .toast {
    bottom: 16px;
    left: 16px;
    right: 16px;
    width: auto;
    font-size: 0.8rem;
    padding: 12px 16px;
    justify-content: center;
    text-align: center;
  }
}

/* Extra Small Phones (<480px) */
@media (max-width: 480px) {
  .app-container {
    padding: 10px;
  }

  .calc-primary-val {
    font-size: 1.3rem;
  }

  .quick-add-group {
    grid-template-columns: repeat(2, 1fr);
  }

  .quick-add-btn {
    font-size: 0.75rem;
    min-height: 44px;
  }

  .segmented-control button {
    font-size: 0.75rem;
    min-height: 44px;
  }

  .loc-pill {
    font-size: 0.75rem;
    padding: 8px 10px;
    min-height: 40px;
  }

  .btn-submit-search {
    font-size: 0.88rem;
    min-height: 48px;
  }

  .btn-card-detail {
    font-size: 0.85rem;
    min-height: 46px;
  }

  .sim-table {
    font-size: 0.75rem;
  }

  .sim-table th, .sim-table td {
    padding: 8px 4px;
  }
}
