:root {
  --bg-color: #050a15;
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.1);
  --accent-cyan: #00f2ff;
  --accent-blue: #007aff;
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.6);
  --glass-blur: 20px;
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: 100px; /* Space for tab bar */
}

/* Premium Mesh Background */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: 
    radial-gradient(circle at 0% 0%, rgba(0, 122, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(0, 242, 255, 0.1) 0%, transparent 50%),
    linear-gradient(180deg, #050a15 0%, #0a1128 100%);
}

/* Header */
/* Master Header v1.9.2 - Elite Vision */
.master-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 20px;
  background: rgba(10, 14, 21, 0.85);
  backdrop-filter: blur(50px) saturate(200%);
  backdrop-filter: blur(50px) saturate(200%);
  -webkit-backdrop-filter: blur(50px) saturate(200%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 20px;
  padding-top: max(12px, var(--safe-top));
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.branding-logo {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
  background: linear-gradient(180deg, #ffffff 0%, #a1a1a1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  cursor: pointer;
  transition: opacity 0.3s;
}

.branding-logo:active {
  opacity: 0.7;
}

.header-stats {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 2px;
  animation: statsFadeIn 0.8s ease-out;
  white-space: nowrap;
}

.header-stats span {
  color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(0, 242, 255, 0.3);
}

@keyframes statsFadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Central Search Orbital */
.header-center {
  display: flex;
  justify-content: center;
}

.search-orbital {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 400px;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.search-orbital:focus-within {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(0, 242, 255, 0.3);
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.1);
  transform: translateY(-1px);
}

.search-orbital input {
  background: none;
  border: none;
  color: white;
  font-size: 14px;
  font-weight: 500;
  width: 100%;
  outline: none;
}

/* Action Trinity - Floating Orbs */
.action-trinity {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.orb-btn {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.orb-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.orb-btn:active {
  transform: scale(0.9);
}

.orb-btn svg {
  opacity: 0.8;
  transition: opacity 0.3s;
}

.orb-btn:hover svg {
  opacity: 1;
  stroke: var(--accent-cyan);
}

/* Main Layout */
.app-main {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.view-section {
  display: none;
}

.view-section.active {
  display: block;
}

/* Grid & Cards - Professional Estate Style */
.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 25px;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--card-border);
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-cyan);
}

/* Card Layout Refined */
.card-content-wrapper {
  position: relative;
  background: var(--card-bg);
  width: 100%;
  height: 100%;
  z-index: 2;
}

/* Card Info Layout with Sidebar */
.card-info-row {
  display: flex;
  padding: 30px 15px 20px 20px;
  gap: 10px;
  align-items: flex-start;
}

.card-info {
  flex: 1;
}

.card-sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding-top: 5px;
}

.btn-side {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.btn-side:active {
  transform: scale(0.8);
}

.btn-side:hover {
  filter: drop-shadow(0 0 5px rgba(255,255,255,0.2));
}

.card-img-container {
  width: 100%;
  aspect-ratio: 16/10;
  position: relative;
  background: #1a1a1a;
}

.card-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-glass-price {
  position: absolute;
  bottom: -18px;
  left: 20px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 10px 20px;
  border-radius: 18px;
  color: white;
  font-weight: 800;
  font-size: 17px;
  z-index: 20;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  letter-spacing: -0.5px;
}

.card-info {
  padding: 20px;
  flex-grow: 1;
}

/* Elite Card v2.0 - Edge-to-Edge Vision */
.card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(0, 242, 255, 0.4);
  box-shadow: 0 20px 50px rgba(0, 242, 255, 0.15), 0 0 20px rgba(0, 242, 255, 0.1);
}

.card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
}

.card-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111;
}

.card-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.card:hover .card-main-img {
  transform: scale(1.1);
}

/* Floating Glass Tags v2.0 */
.card-glass-tag {
  position: absolute;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  z-index: 5;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  transition: all 0.3s ease;
}

.card:hover .card-glass-tag {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.6);
}

.tag-price-elite.pulse-elite {
  border-color: rgba(0, 242, 255, 0.5);
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.15);
}

.tag-price-elite { bottom: 15px; left: 15px; color: var(--accent-cyan); font-size: 16px; font-weight: 800; border-color: rgba(0, 242, 255, 0.3); background: rgba(10, 14, 21, 0.6); }
.tag-date { top: 15px; right: 15px; font-weight: 600; font-size: 11px; opacity: 0.9; }

/* Position Helpers */
.top-left { top: 15px; left: 15px; right: auto; bottom: auto; }
.top-right { top: 15px; right: 15px; left: auto; bottom: auto; }
.bottom-left { bottom: 15px; left: 15px; top: auto; right: auto; }

.card-floating-badge {
  position: absolute;
  background: var(--accent-cyan);
  color: #000;
  padding: 6px 15px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  z-index: 6;
  pointer-events: none;
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.4);
  text-transform: uppercase;
}

.badge-reserved {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  background: rgba(255, 159, 10, 0.85); /* iOS Amber */
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: #fff;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 2px;
  z-index: 10;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 40px rgba(0,0,0,0.6), 0 0 20px rgba(255, 159, 10, 0.4);
  pointer-events: none;
  text-transform: uppercase;
}

/* Elite Card Info Area */
.card-elite-info {
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}

.info-content { 
  flex: 1 1 0%; /* Force flex shrinking */
  min-width: 0; /* Critical for flex overflow */
  max-width: calc(100% - 142px); /* Prevent pushing action column off */
  padding-top: 2px;
  overflow: hidden;
}

.elite-title {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
  line-height: 1.25;
  white-space: nowrap; /* Single line, no wrap */
  overflow: hidden;
  text-overflow: ellipsis; /* Show "..." for long titles */
  max-width: 100%;
}

.elite-location {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.elite-actions-column {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
  width: 130px;
}

.elite-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn-elite-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  cursor: pointer;
}

.btn-elite-action:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.btn-elite-action:active {
  transform: scale(0.95);
}

.btn-elite-action.active {
  color: #ff3b30;
  background: rgba(255, 59, 48, 0.1);
  border-color: rgba(255, 59, 48, 0.2);
}

/* Card Branding Borders */
.card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 3px solid rgba(255, 255, 255, 0.08); /* Ultra-Bold */
}

.card.stat-interessant { border-color: rgba(255, 159, 10, 0.6); box-shadow: 0 0 20px rgba(255, 159, 10, 0.15); }
.card.stat-angefragt { border-color: rgba(0, 122, 255, 0.6); box-shadow: 0 0 20px rgba(0, 122, 255, 0.15); }
.card.stat-besichtigt { border-color: rgba(52, 199, 89, 0.6); box-shadow: 0 0 20px rgba(52, 199, 89, 0.15); }
.card.stat-uninteressant { border-color: rgba(255, 59, 48, 0.4); opacity: 0.6; }

/* Status Dropdown - iOS 26 Stylos */
.status-select-container {
  width: 100%;
}

.status-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: white;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  appearance: none;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.status-select:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background-color: rgba(255, 255, 255, 0.1);
}

/* Status Variants */
.status-select.stat-neu { border-left: 4px solid #8e8e93; }
.status-select.stat-angefragt { border-left: 4px solid #007aff; color: #007aff; border-color: rgba(0, 122, 255, 0.3); }
.status-select.stat-besichtigt { border-left: 4px solid #34c759; color: #34c759; border-color: rgba(52, 199, 89, 0.3); }
.status-select.stat-interessant { border-left: 4px solid #ff9f0a; color: #ff9f0a; border-color: rgba(255, 159, 10, 0.3); }
.status-select.stat-uninteressant { border-left: 4px solid #ff3b30; color: rgba(255, 59, 48, 0.5); filter: grayscale(100%); }

.status-select option {
  background: #1c1c1e;
  color: white;
}

/* Bottom Tab Bar */
.tab-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 500px;
  height: 70px;
  background: rgba(21, 26, 34, 0.8);
  backdrop-filter: blur(40px) saturate(180%);
  border-radius: 25px;
  border: 1px solid var(--card-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  padding: 0 8px;
}

.tab-glider {
  position: absolute;
  height: 54px;
  width: calc(33.33% - 12px); /* Default for 3 tabs */
  left: 8px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  z-index: -1;
  transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  pointer-events: none;
}

.tab-item {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
  min-width: 0;
}

.tab-item.active {
  color: var(--accent-cyan);
}

.tab-item span {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  width: 100%;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Modal Styling */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(15px);
  display: none;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s;
}

.modal.open {
  display: flex;
  opacity: 1;
}

.modal-header {
  position: sticky;
  top: 0;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.modal-content {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  overflow-y: auto;
}

/* Activity Log */
.log-container {
  padding: 10px 0;
}

.log-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 15px;
  border-radius: 15px;
  margin-bottom: 10px;
}

.log-user { color: var(--accent-cyan); font-weight: 700; margin-bottom: 5px; }
.log-date { font-size: 11px; color: var(--text-muted); }

/* Skeleton Loader */
.skeleton {
  background: linear-gradient(90deg, var(--card-bg) 25%, rgba(255,255,255,0.1) 50%, var(--card-bg) 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s infinite;
  border-radius: 12px;
}

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

.skeleton-text { height: 14px; margin-bottom: 8px; width: 80%; }
.skeleton-title { height: 20px; margin-bottom: 15px; width: 90%; }
.skeleton-img { width: 100%; aspect-ratio: 16/10; border-radius: 28px 28px 0 0; position: relative; }

.skeleton-price-tag {
  position: absolute;
  bottom: 15px;
  left: 15px;
  width: 100px;
  height: 35px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Status Badges */
.status-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--accent-blue);
  color: white;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  z-index: 5;
  box-shadow: 0 4px 15px rgba(0, 122, 255, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}

/* Price Trends */
.price-trend {
  font-size: 14px;
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
}
.trend-up { color: #ff3b30; }
.trend-down { color: #34c759; }

/* Avatar Initials */
.avatar-circle {
  width: 36px;
  height: 36px;
  background: var(--accent-blue);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  margin-right: 12px;
  flex-shrink: 0;
}

/* Log Item Refinement */
.log-item {
  display: flex;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 15px;
  border-radius: 18px;
  margin-bottom: 12px;
}

.log-content {
  flex-grow: 1;
}

/* Finance Widget Refinement */
.finance-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 25px;
}

.finance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 15px;
  color: var(--text-main);
}

.finance-row input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 14px;
  color: white;
  width: 90px;
  text-align: right;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
}

.finance-row input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.08);
}

input[type="checkbox"] {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

/* Chat / Notes Styles v1.8 */
.note-bubble {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 18px;
  border-radius: 22px;
  margin-bottom: 15px;
  position: relative;
  transition: transform 0.2s;
}

.note-bubble:active {
  transform: scale(0.98);
}

.note-meta {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-cyan);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  letter-spacing: 1px;
}

.note-content {
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
}

.note-input-container {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.note-input-field {
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 14px 18px;
  color: white;
  font-size: 15px;
}

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

.btn-send-note {
  background: var(--accent-blue);
  color: white;
  border: none;
  padding: 0 20px;
  border-radius: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-send-note:active {
  opacity: 0.7;
}

/* Modal Hero */
.detail-img-full {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-bottom: 1px solid var(--card-border);
}

/* ------------------------------------------------------------------------- */
/* PROPERTY DETAIL PAGE v1.8 (iOS 26 Style)                                  */
/* ------------------------------------------------------------------------- */

.property-page {
  background: var(--bg-dark);
  min-height: 100vh;
  padding-bottom: 150px; /* Space for sticky footer */
  max-width: 800px;
  margin: 0 auto;
}

/* Edge-to-Edge Hero */
.detail-hero-section {
  width: 100%;
  aspect-ratio: 16/10; 
  position: relative;
  background: #1a1a1a;
  z-index: 70; /* Higher than content to allow overlap */
}

@media (min-width: 801px) {
  .detail-hero-section {
    border-radius: 0 0 30px 30px;
    overflow: hidden;
  }
}

.detail-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Floating Actions Over Hero */
.floating-nav {
  position: absolute;
  top: env(safe-area-inset-top, 20px);
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  z-index: 100;
}

.btn-glass-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.btn-glass-circle:active {
  transform: scale(0.85);
  background: rgba(255, 255, 255, 0.2);
}

/* Price Overlap Badge (Detail) */
.detail-price-overlap {
  position: absolute;
  bottom: -22px;
  left: 25px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(35px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 12px 24px;
  border-radius: 20px;
  color: white;
  font-weight: 800;
  font-size: 22px;
  z-index: 1000; /* Always on top */
  box-shadow: 0 15px 45px rgba(0,0,0,0.6);
  letter-spacing: -0.5px;
}

/* Content Body Refinement */
.detail-content-body {
  padding: 45px 25px 30px;
}

.detail-main-header {
  margin-bottom: 35px;
}

.detail-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 500;
}

.detail-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.8px;
  color: white;
  margin-bottom: 25px;
}

/* Specs Grid v1.8 */
.detail-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 40px;
}

.detail-spec-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  padding: 24px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-spec-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.detail-spec-value {
  font-size: 24px;
  font-weight: 700;
  color: white;
}

/* Sticky Action Footer */
.sticky-action-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 25px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 10px));
  background: rgba(21, 26, 34, 0.85);
  backdrop-filter: blur(40px) saturate(180%);
  border-top: 1px solid var(--card-border);
  display: flex;
  gap: 15px;
  z-index: 1000;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.4);
}

.btn-cta-primary {
  flex: 2;
  background: linear-gradient(135deg, var(--accent-blue), #00d2ff);
  color: white;
  height: 62px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  border: none;
  box-shadow: 0 8px 30px rgba(0, 122, 255, 0.5), 0 0 20px rgba(0, 210, 255, 0.3);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-cta-primary:active {
  transform: scale(0.96);
}

/* Segmented Control iOS 26 Style */
.segmented-control {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  display: flex;
  position: relative;
  width: 140px;
  height: 36px;
  padding: 2px;
}

.seg-item {
  flex: 1;
  text-align: center;
  line-height: 32px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  z-index: 2;
  transition: color 0.3s;
}

.seg-item.active {
  color: white;
}

.seg-glider {
  position: absolute;
  height: 32px;
  width: 68px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  z-index: 1;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.btn-cta-secondary {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  color: white;
  height: 62px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 17px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 600px) {
  .detail-hero-section { aspect-ratio: 1/1; }
  .detail-title { font-size: 28px; }
}

/* Toast Notification v1.8.6 */
.toast-overlay {
  position: fixed;
  top: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(-120px);
  z-index: 9999;
  pointer-events: none;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-overlay.active {
  transform: translateX(-50%) translateY(0);
}

.toast-content {
  background: rgba(21, 26, 34, 0.85);
  backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 14px 24px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 15px 45px rgba(0,0,0,0.5);
}

.toast-content span {
  color: white;
  font-weight: 700;
  font-size: 15px;
}

/* Log View Master v1.9.3 - Elite Terminal */
.log-container {
  background: rgba(5, 7, 12, 0.85);
  backdrop-filter: blur(50px) saturate(200%);
  -webkit-backdrop-filter: blur(50px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 24px;
  font-family: var(--font-mono);
  height: calc(100vh - 220px);
  min-height: 450px;
  max-height: 750px;
  overflow-y: auto;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.6);
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* Elite Scrollbar Styling */
.log-container::-webkit-scrollbar {
  width: 5px;
}

.log-container::-webkit-scrollbar-track {
  background: transparent;
}

.log-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: background 0.3s;
}

.log-container::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 242, 255, 0.3);
}

.log-entry {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 13.5px;
  color: rgba(255,255,255,0.8);
  animation: logSlideIn 0.35s cubic-bezier(0.19, 1, 0.22, 1);
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.log-entry:hover {
  background: rgba(255, 255, 255, 0.03);
  transform: translateX(5px);
}

.log-entry.system { color: var(--accent-cyan); font-weight: 700; border-left: 3px solid var(--accent-cyan); }
.log-entry.error { color: #ff453a; border-left: 3px solid #ff453a; }
.log-entry.success { color: #32d74b; border-left: 3px solid #32d74b; }

@keyframes logSlideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 800px) {
  .master-header {
    grid-template-columns: 1fr auto;
    gap: 15px;
    padding: 10px 15px;
    padding-top: max(10px, var(--safe-top));
  }
  .header-left {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
  }
  .header-right {
    grid-column: 2;
    align-items: center;
  }
  .header-center {
    grid-column: 1 / span 2;
    order: 3;
    padding-top: 10px;
  }
  .search-orbital {
    max-width: 100%;
    height: 44px;
  }
  .branding-logo {
    font-size: 16px;
    line-height: 1.1;
  }
  .header-stats {
    font-size: 8px;
    letter-spacing: 1px;
    white-space: normal;
    opacity: 0.5;
  }
}

@media (max-width: 400px) {
  .action-trinity {
    gap: 8px;
  }
  .orb-btn {
    width: 36px;
    height: 36px;
  }
}

/* Sort-Master Components v1.9.4 */
.orb-btn-small {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: auto;
}

.orb-btn-small:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.orb-btn-small.active {
  background: var(--accent-cyan-glass);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.glass-dropdown {
  position: absolute;
  top: calc(100% + 15px);
  right: 0;
  width: 280px;
  background: rgba(15, 18, 25, 0.92);
  backdrop-filter: blur(50px) saturate(200%);
  -webkit-backdrop-filter: blur(50px) saturate(200%);
  border: 1px solid rgba(0, 242, 255, 0.25);
  border-radius: 20px;
  padding: 8px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9);
  display: none;
  flex-direction: column;
  z-index: 10001;
  animation: dropdownFade 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.glass-dropdown.show {
  display: flex;
}

.sort-option {
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.sort-option:last-child {
  border-bottom: none;
}

.sort-option:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transform: translateX(8px);
}

.sort-option.active {
  background: var(--accent-cyan-glass);
  color: var(--accent-cyan);
  box-shadow: 0 4px 15px rgba(0, 242, 255, 0.15);
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-15px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Notes Button & Badge ─── */
.btn-notes {
  position: relative;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.2s, background 0.2s;
}
.btn-notes:hover {
  color: var(--accent-cyan);
  background: rgba(0, 242, 255, 0.1);
}
.btn-notes.has-notes {
  color: var(--accent-cyan);
}
.note-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-cyan);
  color: #000;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
  pointer-events: none;
}

/* ─── Notes Modal ─── */
.notes-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
  animation: fadeIn 0.15s ease;
}
.notes-modal-box {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(8, 18, 40, 0.97);
  backdrop-filter: blur(30px);
  border-top: 1px solid rgba(0, 242, 255, 0.2);
  border-radius: 20px 20px 0 0;
  padding: 0;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.notes-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-weight: 700;
  font-size: 16px;
  color: var(--accent-cyan);
  flex-shrink: 0;
}
.notes-modal-header button {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notes-modal-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.notes-empty, .notes-loading {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  padding: 24px;
}
.note-item {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 10px 14px;
  animation: fadeIn 0.2s ease;
}
.note-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.note-author {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-cyan);
}
.note-time {
  font-size: 11px;
  color: var(--text-muted);
  flex: 1;
}
.note-delete {
  background: none;
  border: none;
  color: rgba(255,100,100,0.5);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.note-delete:hover {
  color: #ff4444;
  background: rgba(255,68,68,0.1);
}
.note-content {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.notes-modal-input {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.notes-modal-input textarea {
  flex: 1;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(0,242,255,0.2);
  border-radius: 12px;
  color: #fff;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  outline: none;
  transition: border-color 0.2s;
}
.notes-modal-input textarea:focus {
  border-color: var(--accent-cyan);
}
.notes-modal-input button {
  background: var(--accent-cyan);
  color: #000;
  border: none;
  border-radius: 12px;
  padding: 0 18px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.notes-modal-input button:hover { opacity: 0.85; }

/* ─── Profile Page ─── */
.profile-page {
  padding: 0 16px 40px;
  max-width: 600px;
  margin: 0 auto;
}
.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 0 24px;
  gap: 12px;
}
.profile-avatar-wrap {
  position: relative;
  display: inline-block;
}
.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: #007AFF;
  box-shadow: 0 8px 32px rgba(0,122,255,0.4);
  transition: transform 0.2s, box-shadow 0.3s;
  cursor: pointer;
  line-height: 1;
}
.profile-avatar:hover { transform: scale(1.05); }
.profile-avatar-edit-btn {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(20,30,60,0.95);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}
.profile-avatar-edit-btn:hover { background: rgba(0,122,255,0.3); }
.profile-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.profile-logout-btn {
  background: rgba(255,59,48,0.12);
  color: #FF3B30;
  border: 1px solid rgba(255,59,48,0.25);
  border-radius: 12px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.profile-logout-btn:hover { background: rgba(255,59,48,0.22); }

/* Avatar Picker Hybrid v3.0 */
.avatar-picker-panel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.2s ease;
}
.avatar-picker-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.avatar-tab {
  flex: 1;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border-radius: 10px;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.avatar-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.avatar-picker-content {
  padding: 20px;
}
.avatar-options-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.avatar-option {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  padding: 4px;
  transition: all 0.2s;
}
.avatar-option:hover { background: rgba(255, 255, 255, 0.1); }
.avatar-option.selected {
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 255, 0.1);
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
}
.avatar-option svg { width: 100%; height: 100%; }

.avatar-color-section {
  display: none; /* Shown conditionally by JS */
  animation: fadeIn 0.3s;
}
.avatar-picker-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.color-option {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: transform 0.2s;
}
.color-option.selected {
  transform: scale(1.15);
  border-color: #fff;
  box-shadow: 0 0 10px rgba(255,255,255,0.3);
}
.avatar-picker-footer { padding: 0 20px 20px; }
.avatar-save-btn {
  width: 100%;
  background: var(--accent-cyan);
  color: #000;
  border: none;
  border-radius: 16px;
  padding: 14px;
  font-weight: 700;
  cursor: pointer;
}
.avatar-save-btn:hover { opacity: 0.9; }

.profile-avatar {
  background: var(--accent-blue);
  box-shadow: 0 8px 32px rgba(0, 122, 255, 0.4);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}
.profile-avatar .hybrid-avatar-instance {
  width: 100%;
  height: 100%;
  aspect-ratio: 1/1 !important;
}
.hybrid-avatar-instance {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 50%;
  aspect-ratio: 1/1 !important;
  flex-shrink: 0;
}
.avatar-emoji-base {
  user-select: none;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  line-height: 1;
  display: flex !important;
  align-items: center;
  justify-content: center;
}
.profile-avatar svg, .hybrid-avatar-instance svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

.nudge-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: rgba(255, 255, 255, 0.05);
  padding: 16px;
  border-radius: 20px;
}
.nudge-dpad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.nudge-row {
  display: flex;
  gap: 8px;
}
.scale-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nudge-btn {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.nudge-btn:hover { background: rgba(255, 255, 255, 0.15); transform: scale(1.05); }
.nudge-btn:active { background: var(--accent-cyan); color: #000; transform: scale(0.95); }


/* Animation for the nudge control appearance */
#avatar-nudge-control { animation: slideUp 0.3s ease; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Ensure the color section is clean */
.avatar-color-section { margin-top: 16px; }
.profile-section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-left: 2px;
}
.my-notes-feed { display: flex; flex-direction: column; gap: 12px; }
.my-note-card {
  display: flex;
  gap: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.my-note-card:hover { background: rgba(255,255,255,0.09); transform: translateY(-1px); }
.my-note-prop-img {
  width: 80px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  background-color: rgba(255,255,255,0.05);
}
.my-note-body {
  flex: 1;
  padding: 12px 14px 12px 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.my-note-prop-title {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.my-note-prop-loc {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.my-note-content-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 4px;
}
.my-note-avatar, .mini-avatar-hybrid {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
}
.my-note-bubble {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.4;
  background: rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 6px 10px;
  flex: 1;
  word-break: break-word;
}
.my-note-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Mini avatar in notes modal */
.mini-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  line-height: 1;
}

.card-fade-out {
  animation: cardFadeOut 0.3s ease forwards;
  pointer-events: none;
}
@keyframes cardFadeOut {
  from { opacity: 1; transform: scale(1); max-height: 800px; margin-bottom: 24px; filter: blur(0); }
  to { opacity: 0; transform: scale(0.9); max-height: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; margin-top: 0; filter: blur(10px); }
}

/* Archive Controls & Reset Button */
.archive-header-controls {
  padding: 16px 20px;
  display: flex;
  justify-content: flex-end;
  background: rgba(13, 25, 48, 0.4);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 12px;
}

.btn-elite-reset {
  background: linear-gradient(135deg, rgba(255, 45, 85, 0.1), rgba(255, 69, 58, 0.2));
  border: 1px solid rgba(255, 69, 58, 0.3);
  color: #ff453a;
  padding: 10px 18px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(255, 69, 58, 0.1);
}

.btn-elite-reset:hover {
  background: rgba(255, 69, 58, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 69, 58, 0.2);
  border-color: rgba(255, 69, 58, 0.5);
}

.btn-elite-reset:active {
  transform: translateY(0) scale(0.95);
}

.btn-elite-reset svg {
  transition: transform 0.6s ease;
}

.btn-elite-reset:hover svg {
  transform: rotate(-180deg);
}

/* Header Orb Glow */
.orb-btn.active {
  background: rgba(0, 122, 255, 0.2) !important;
  border-color: rgba(0, 122, 255, 0.6) !important;
  color: #007aff !important;
  box-shadow: 0 0 20px rgba(0, 122, 255, 0.4), inset 0 0 10px rgba(0, 122, 255, 0.2) !important;
  animation: orbPulse 2s infinite ease-in-out;
}

@keyframes orbPulse {
  0% { box-shadow: 0 0 15px rgba(0, 122, 255, 0.4); }
  50% { box-shadow: 0 0 30px rgba(0, 122, 255, 0.7); }
  100% { box-shadow: 0 0 15px rgba(0, 122, 255, 0.4); }
}
