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

:root {
  --bg: #0d0d14;
  --bg2: #11111b;
  --surface: #16161f;
  --surface2: #1c1c2a;
  --primary: #8b5cf6;
  --primary-dim: rgba(139,92,246,0.1);
  --primary-glow: rgba(139,92,246,0.3);
  --energy: #f59e0b;
  --energy-dim: rgba(245,158,11,0.12);
  --text: #f1f1f6;
  --text2: #a8a8b8;
  --text3: #6b6b7a;
  --border: #252533;
  --border2: #1e1e2e;
  --error: #ef4444;
  --danger: #ef4444;
  --success: #22c55e;
  --radius: 12px;
  --radius-sm: 9px;
  --radius-lg: 18px;
  --transition: 0.2s ease;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ===== SPLASH ===== */
.splash {
  position: fixed; inset: 0; z-index: 9999;
  background: radial-gradient(ellipse at center, #14141f, #0a0a12);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  opacity: 1; transition: opacity 0.5s, visibility 0.5s; visibility: visible;
}
.splash.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-logo { position: relative; width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; }
.splash-logo-icon { font-size: 40px; color: var(--primary); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1.06) rotate(4deg); } }
.splash-orbit { position: absolute; width: 144px; height: 144px; animation: orbit 3s linear infinite; }
@keyframes orbit { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.splash-comet {
  position: absolute; top: -3px; left: 50%; margin-left: -3px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--primary);
  box-shadow: 0 0 6px 2px var(--primary), 0 0 14px 6px rgba(139,92,246,0.3), -12px 0 20px 6px rgba(139,92,246,0.08);
}
.splash-title { font-size: 26px; font-weight: 800; background: linear-gradient(135deg, var(--primary), #a78bfa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.splash-subtitle { font-size: 12px; color: var(--text3); letter-spacing: 1px; text-transform: uppercase; }
.splash-loader { margin-top: 20px; width: 100px; height: 2px; background: var(--border); border-radius: 1px; overflow: hidden; }
.splash-loader-bar { height: 100%; background: linear-gradient(90deg, var(--primary), #a78bfa); animation: load 1.8s ease forwards; }
@keyframes load { 0% { width: 0%; } 100% { width: 100%; } }

#app { max-width: 600px; margin: 0 auto; min-height: 100vh; padding-bottom: 80px; }

/* ===== HEADER ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,13,20,0.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; }
.header-btn {
  background: none; border: none; color: var(--text2); cursor: pointer;
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background var(--transition);
}
.header-btn:hover { background: var(--surface); color: var(--text); }
.logo { display: flex; align-items: center; gap: 6px; }
.logo-icon { font-size: 22px; color: var(--primary); transform: rotate(10deg); }
.logo-text { font-size: 18px; font-weight: 700; background: linear-gradient(135deg, var(--primary), #a78bfa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: -0.3px; }
.header-actions { display: flex; gap: 2px; }

.filters { display: flex; gap: 6px; padding: 0 14px 10px; }
.filter-select {
  flex: 1; padding: 8px 28px 8px 10px; font-size: 12.5px; font-weight: 500;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text2);
  appearance: none; cursor: pointer; outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%236b6b7a' d='M5 7L1 2h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
  transition: border-color var(--transition);
}
.filter-select:focus { border-color: var(--primary); }
.filter-select option { background: var(--surface); color: var(--text); }

/* ===== FEED ===== */
.feed { padding: 6px 10px; }
.feed-loader { display: flex; justify-content: center; padding: 50px 0; }
.loader-spinner { width: 28px; height: 28px; border: 2.5px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loader-dots { display: flex; gap: 5px; justify-content: center; margin-bottom: 6px; }
.loader-dots span { width: 5px; height: 5px; border-radius: 50%; background: var(--primary); animation: dotAnim 1.2s ease infinite; }
.loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.loader-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotAnim { 0%,80%,100% { opacity: 0.3; } 40% { opacity: 1; } }

/* ===== FAB ===== */
.fab {
  position: fixed; bottom: 20px; right: 20px; z-index: 50;
  width: 52px; height: 52px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, var(--primary), #7c3aed); color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px var(--primary-glow); transition: transform var(--transition), box-shadow var(--transition);
}
.fab:active { transform: scale(0.92); }

/* ===== CARD ===== */
.card {
  background: var(--surface); border-radius: var(--radius); margin-bottom: 10px;
  overflow: hidden; border: 1px solid var(--border); transition: border-color var(--transition);
  cursor: pointer;
}
.card.card-top { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.card-image-wrap { position: relative; background: var(--bg2); }
.card-image { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.card-no-image { width: 100%; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--surface2), var(--surface)); color: var(--text3); font-size: 36px; }
.card-top-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: linear-gradient(135deg, var(--primary), #7c3aed); color: #fff;
  font-size: 10px; font-weight: 700; padding: 4px 10px; border-radius: 16px;
  box-shadow: 0 2px 8px var(--primary-glow); display: flex; align-items: center; gap: 3px;
}
.card-body { padding: 12px 14px; }
.card-image-count { position: absolute; bottom: 6px; right: 6px; background: rgba(0,0,0,0.7); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; z-index: 2; }
.card-energy {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 700; color: var(--energy);
  background: var(--energy-dim); padding: 2px 8px; border-radius: 12px; margin-bottom: 6px;
}
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; line-height: 1.3; }
.card-desc {
  font-size: 13px; color: var(--text2); line-height: 1.4; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.card-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.card-tag { font-size: 11px; padding: 2px 8px; border-radius: 12px; background: var(--surface2); color: var(--text2); font-weight: 500; }
.card-tag.city { background: rgba(59,130,246,0.12); color: #60a5fa; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border2); }
.card-phone {
  font-size: 12px; font-weight: 600; color: var(--primary);
  padding: 5px 12px; border: 1px solid var(--primary); border-radius: 16px;
  text-decoration: none; display: inline-flex; align-items: center; gap: 4px; transition: all var(--transition);
}
.card-phone:hover { background: var(--primary); color: #fff; }
.card-top-btn {
  border: none; color: var(--energy); font-size: 11px; font-weight: 600; cursor: pointer;
  padding: 5px 10px; border-radius: 16px; background: var(--energy-dim);
  transition: background var(--transition); display: flex; align-items: center; gap: 3px;
}
.card-date { font-size: 11px; color: var(--text3); white-space: nowrap; }

.feed-status { text-align: center; padding: 12px; color: var(--text3); font-size: 12px; }
.feed-empty { display: flex; flex-direction: column; align-items: center; padding: 60px 20px; text-align: center; }
.feed-empty-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.4; }
.feed-empty-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.feed-empty-desc { font-size: 13px; color: var(--text2); }

/* ===== SIDEBAR ===== */
.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 200;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.sidebar-overlay.active { opacity: 1; pointer-events: all; }
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 280px; max-width: 80vw;
  background: var(--surface); z-index: 201; display: flex; flex-direction: column;
  transform: translateX(-100%); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  border-right: 1px solid var(--border);
}
.sidebar.active { transform: translateX(0); }
.sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.sidebar-body { padding: 16px; flex: 1; overflow-y: auto; }
.sidebar-brand { text-align: center; margin-bottom: 16px; }
.brand-icon { width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, var(--primary), #7c3aed); display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff; margin: 0 auto 10px; box-shadow: 0 4px 16px var(--primary-glow); }
.brand-desc { font-size: 12.5px; color: var(--text2); line-height: 1.5; }

.sidebar-profile { background: var(--bg); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 14px; border: 1px solid var(--border); cursor: pointer; transition: border-color var(--transition); }
.sidebar-profile:hover { border-color: var(--primary); }
.profile-placeholder, .profile-info { display: flex; align-items: center; gap: 10px; }
.profile-avatar-placeholder { width: 36px; height: 36px; border-radius: 50%; background: var(--surface2); display: flex; align-items: center; justify-content: center; color: var(--text3); flex-shrink: 0; }
.profile-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--primary); }
.profile-name { font-size: 13px; font-weight: 600; }
.profile-hint { font-size: 11px; color: var(--text3); margin-top: 1px; }
.profile-logout {
  display: block; width: 100%; margin-top: 8px; padding: 7px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--error);
  cursor: pointer; transition: all var(--transition); font-family: inherit;
}
.profile-logout:hover { border-color: var(--error); background: rgba(239,68,68,0.08); }

.sidebar-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat-card { text-align: center; padding: 12px 6px; background: var(--bg); border-radius: 8px; border: 1px solid var(--border); }
.stat-value { display: block; font-size: 20px; font-weight: 700; color: var(--primary); line-height: 1.2; }
.stat-label { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.3px; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 300;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  position: fixed; bottom: 0; left: 0; right: 0; max-height: 88vh;
  background: var(--surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  z-index: 301; transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.32,0.72,0,1);
  overflow-y: auto; -webkit-overflow-scrolling: touch; border-top: 1px solid var(--border);
}
.modal.active { transform: translateY(0); }
.modal-handle { width: 32px; height: 4px; border-radius: 2px; background: var(--border); margin: 6px auto 0; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px 12px; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.modal-header h2 { font-size: 16px; font-weight: 600; }
.modal-close-btn {
  background: var(--bg); border: none; color: var(--text2); cursor: pointer;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background var(--transition);
}
.modal-close-btn:hover { background: var(--surface2); }
.modal-body { padding: 2px 16px 20px; }

/* ===== AUTH ===== */
.auth-section { text-align: center; }
.auth-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.auth-desc { font-size: 13px; color: var(--text2); margin-bottom: 20px; }
.auth-providers { display: flex; flex-direction: column; gap: 14px; }



/* ===== FORMS ===== */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 11px; font-weight: 600; color: var(--text3); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-input {
  width: 100%; padding: 11px 13px; font-size: 14px; font-family: inherit;
  border: 1.5px solid var(--border); border-radius: 8px; outline: none;
  transition: all var(--transition); background: var(--bg); color: var(--text);
}
.form-input::placeholder { color: var(--text3); }
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-dim); }
.form-textarea { min-height: 90px; resize: vertical; }
.form-row { display: flex; gap: 10px; }
.form-row .form-group { flex: 1; }
.form-input option { background: var(--surface); color: var(--text); }

.btn-primary {
  width: 100%; padding: 12px 16px; font-size: 14px; font-weight: 600; font-family: inherit;
  background: linear-gradient(135deg, var(--primary), #7c3aed); color: #fff;
  border: none; border-radius: 8px; cursor: pointer; transition: all var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-small { width: auto; padding: 11px 18px; font-size: 13px; white-space: nowrap; }

.btn-telegram {
  width: 100%; padding: 12px 16px; font-size: 14px; font-weight: 600; font-family: inherit;
  background: #2AABEE; color: #fff;
  border: none; border-radius: 8px; cursor: pointer; transition: all var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-telegram:hover { background: #229ED9; }
.btn-telegram:active { transform: scale(0.98); }

.btn-yandex {
  width: 100%; padding: 12px 16px; font-size: 14px; font-weight: 600; font-family: inherit;
  background: #FC3F1D; color: #fff;
  border: none; border-radius: 8px; cursor: pointer; transition: all var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-yandex:hover { background: #E33616; }
.btn-yandex:active { transform: scale(0.98); }

/* ===== CITY AUTOCOMPLETE ===== */
.city-autocomplete { position: relative; }
.city-dropdown { position: absolute; top: 100%; left: 0; right: 0; z-index: 10; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; margin-top: 4px; max-height: 200px; overflow-y: auto; }
.city-option { padding: 10px 13px; cursor: pointer; font-size: 14px; color: var(--text); transition: background 0.15s; }
.city-option:hover { background: var(--surface2); }
.city-option.city-add { color: var(--primary); font-weight: 500; border-top: 1px solid var(--border); }
.city-option.city-hh { color: var(--text2); }
.city-option.city-hh small { font-size: 11px; color: var(--text3); }

/* ===== IMAGE UPLOAD ===== */
.image-upload { position: relative; border-radius: 8px; overflow: hidden; border: 1.5px dashed var(--border); cursor: pointer; transition: border-color var(--transition); }
.image-upload:hover { border-color: var(--primary); }
.upload-placeholder { display: flex; flex-direction: column; align-items: center; padding: 22px; gap: 6px; color: var(--text3); }
.upload-placeholder svg { opacity: 0.4; }
.image-previews { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px; }
.image-preview-item { position: relative; width: 80px; height: 80px; border-radius: 8px; overflow: hidden; border: 1.5px solid var(--border); flex-shrink: 0; }
.image-preview-item .image-preview { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-preview-item .image-remove { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,0.6); color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 10px; }

/* ===== ENERGY ===== */
.energy-hero { text-align: center; padding: 8px 0 16px; }
.energy-hero-icon { font-size: 36px; margin-bottom: 8px; }
.energy-hero h3 { font-size: 17px; font-weight: 700; margin-bottom: 3px; }
.energy-hero p { font-size: 13px; color: var(--text2); }
.energy-display { margin-bottom: 14px; }
.energy-bar { height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; margin-bottom: 6px; border: 1px solid var(--border); }
.energy-bar-fill { height: 100%; background: linear-gradient(90deg, var(--energy), #f97316); border-radius: 3px; transition: width 0.4s; }
.energy-stats { display: flex; justify-content: space-between; font-size: 12px; color: var(--text2); }
.energy-amount { font-weight: 700; color: var(--energy); font-size: 14px; }
.energy-price-tag { text-align: center; font-size: 12px; font-weight: 600; color: var(--energy); background: var(--energy-dim); padding: 6px 12px; border-radius: 8px; margin-bottom: 14px; }
.energy-quick { display: grid; grid-template-columns: repeat(5,1fr); gap: 6px; margin-bottom: 2px; }
.energy-btn {
  padding: 8px 4px; border: 1.5px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text2); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all var(--transition); font-family: inherit; line-height: 1.2;
}
.energy-btn small { display: block; font-weight: 400; font-size: 10px; color: var(--text3); margin-top: 1px; }
.energy-btn:hover, .energy-btn.active { border-color: var(--energy); background: var(--energy-dim); color: var(--energy); }
.energy-btn.active small { color: var(--energy); }
.energy-custom { display: flex; gap: 8px; align-items: center; }
.energy-custom .form-input { flex: 1; }
.energy-total { display: flex; flex-direction: column; align-items: center; white-space: nowrap; background: var(--bg); padding: 6px 14px; border-radius: 8px; border: 1px solid var(--border); }
.total-label { font-size: 9px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.3px; }
.total-value { font-size: 16px; font-weight: 700; color: var(--primary); }
.btn-energy { background: linear-gradient(135deg, var(--energy), #f97316); }

/* ===== CAROUSEL ===== */
.carousel { position: relative; border-radius: 8px; overflow: hidden; margin-bottom: 14px; background: var(--bg2); }
.carousel-track { display: flex; transition: none; }
.carousel-slide { display: none; width: 100%; flex-shrink: 0; }
.carousel-slide.active { display: block; }
.carousel-image { width: 100%; max-height: 300px; object-fit: cover; display: block; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; background: rgba(0,0,0,0.5); color: #fff; border: none; cursor: pointer; font-size: 20px; display: flex; align-items: center; justify-content: center; z-index: 2; transition: background 0.2s; }
.carousel-btn:hover { background: rgba(0,0,0,0.8); }
.carousel-prev { left: 8px; }
.carousel-next { right: 8px; }
.carousel-dots { display: flex; justify-content: center; gap: 6px; padding: 8px; position: absolute; bottom: 0; left: 0; right: 0; }
.carousel-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; transition: background 0.2s; }
.carousel-dot.active { background: #fff; }
.carousel-expand { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,0.5); color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; z-index: 2; }
.carousel-expand:hover { background: rgba(0,0,0,0.8); }

/* Fullscreen carousel */
.carousel-fullscreen { position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.carousel-fs-close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.15); color: #fff; border: none; cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center; z-index: 2; }
.carousel-fs-track { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.carousel-fs-slide { display: none; width: 100%; height: 100%; align-items: center; justify-content: center; }
.carousel-fs-slide.active { display: flex; }
.carousel-fs-slide img { max-width: 100%; max-height: 100%; object-fit: contain; }
.carousel-fs-prev { left: 16px; }
.carousel-fs-next { right: 16px; }

/* ===== DETAIL ===== */
.detail-top-badge { display: inline-flex; align-items: center; gap: 3px; background: linear-gradient(135deg, var(--primary), #7c3aed); color: #fff; font-size: 10px; font-weight: 700; padding: 4px 12px; border-radius: 16px; margin-bottom: 8px; box-shadow: 0 2px 8px var(--primary-glow); }
.detail-energy { font-size: 12px; color: var(--energy); font-weight: 600; margin-bottom: 10px; padding: 6px 10px; background: var(--energy-dim); border-radius: 8px; display: flex; align-items: center; gap: 5px; }
.detail-section { margin-bottom: 14px; }
.detail-label { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; font-weight: 600; }
.detail-text { font-size: 14px; line-height: 1.5; color: var(--text); }
.detail-phone-wrap { margin: 14px 0; }
.detail-phone { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 16px; background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; text-decoration: none; border-radius: 8px; font-size: 15px; font-weight: 600; }
.detail-top-btn { width: 100%; padding: 10px; border: 1.5px solid var(--energy); border-radius: 8px; background: var(--energy-dim); color: var(--energy); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; display: flex; align-items: center; justify-content: center; gap: 5px; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 76px; left: 50%; z-index: 500;
  transform: translateX(-50%) translateY(60px);
  background: var(--surface2); color: var(--text);
  padding: 10px 20px; border-radius: 8px; font-size: 13px; font-weight: 500;
  opacity: 0; transition: all 0.3s; max-width: 88vw; text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3); border: 1px solid var(--border); pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--success); color: var(--success); }
.toast.error { border-color: var(--error); color: var(--error); }

/* ===== DETAIL MODAL ===== */
.detail-actions { display: flex; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.detail-top-btn, .detail-delete-btn {
  flex: 1; padding: 12px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; border: none; transition: opacity 0.15s;
}
.detail-top-btn { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.detail-top-btn:active { opacity: 0.8; }
.detail-delete-btn { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.detail-delete-btn:active { background: var(--danger); color: #fff; }

/* ===== MY LISTINGS MODAL ===== */
.my-listings-list { display: flex; flex-direction: column; gap: 8px; }
.my-listing-card {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface2); border-radius: 10px; padding: 12px 14px; gap: 10px;
}
.my-listing-body { flex: 1; min-width: 0; }
.my-listing-title { font-size: 14px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-listing-meta { font-size: 12px; color: var(--text3); margin-top: 2px; }
.my-listing-actions { display: flex; gap: 6px; flex-shrink: 0; }
.my-listing-btn {
  width: 32px; height: 32px; border-radius: 8px; border: none;
  background: var(--surface); cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text2); transition: background 0.15s;
}
.my-listing-btn:active { background: var(--border); }
.my-listing-btn.delete:active { background: var(--danger); color: #fff; }
.my-listings-empty { text-align: center; padding: 32px 16px; color: var(--text3); }
.my-listings-empty p { margin-bottom: 16px; }

/* ===== SIDEBAR NAV ===== */
.sidebar-nav { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.sidebar-nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px;
  background: none; border: none; border-radius: 8px; color: var(--text2); font-size: 14px;
  cursor: pointer; text-align: left; transition: background 0.15s;
}
.sidebar-nav-item:active { background: var(--surface2); color: var(--text); }

/* ===== DESKTOP ===== */
@media (min-width: 768px) {
  .modal {
    bottom: auto; top: 50%; left: 50%; right: auto;
    transform: translate(-50%,-50%) scale(0.92);
    max-width: 480px; width: 92%; border-radius: var(--radius-lg);
    max-height: 85vh; opacity: 0; border: 1px solid var(--border);
    transition: opacity 0.25s, transform 0.25s;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  }
  .modal.active { transform: translate(-50%,-50%) scale(1); opacity: 1; }
  .modal-handle { display: none; }
  .fab { bottom: 28px; right: 28px; }
}
