/* =====================================================================
   YAD — TEAL GLASS THEME (shared across Home / Profile / Admin)
   ===================================================================== */

:root {
  --bg-0: #04080a;
  --bg-grad:
    radial-gradient(95% 75% at 88% 3%, rgba(64,176,196,0.42), transparent 55%),
    radial-gradient(75% 55% at 50% 112%, rgba(30,120,140,0.22), transparent 60%),
    linear-gradient(155deg, #0a262c 0%, #061417 46%, #04080a 100%);

  --glass:           rgba(255,255,255,0.055);
  --glass-2:         rgba(255,255,255,0.09);
  --glass-border:    rgba(255,255,255,0.12);
  --glass-border-2:  rgba(255,255,255,0.20);

  --primary:      #36c2d6;     /* cyan */
  --primary-2:    #5fd9e6;
  --primary-grad: linear-gradient(135deg, #34b6cc, #5fd9e6);
  --primary-glow: rgba(54,194,214,0.30);

  --text:        #eef6f7;
  --text-muted:  rgba(216,236,240,0.62);
  --text-faint:  rgba(216,236,240,0.40);

  --success: #2fd9a5;
  --danger:  #ff6b81;

  --font-heading: 'Heebo', sans-serif;
  --font-body:    'Assistant', sans-serif;

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-full: 9999px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; outline: none; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-0);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html {
  overflow-x: hidden;
  max-width: 100%;
  background: var(--bg-0);        /* root paints the theme base — kills any uncovered edge strip */
  scrollbar-width: none;          /* Firefox: hide scrollbar */
  -ms-overflow-style: none;       /* legacy Edge/IE */
}
body { scrollbar-width: none; }

/* Hide scrollbars (WebKit/Blink) — content still scrolls via wheel / touch / keys */
html::-webkit-scrollbar,
body::-webkit-scrollbar { width: 0; height: 0; display: none; }
::-webkit-scrollbar { width: 0; height: 0; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: transparent; }

/* ---- helpers ---- */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: clamp(16px, 4vw, 32px); padding-right: clamp(16px, 4vw, 32px); }
.font-heading { font-family: var(--font-heading); }
.font-body { font-family: var(--font-body); }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.logo-text {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--text);
  font-size: 1.4rem;
}

.fade-in { animation: fadeIn 0.7s cubic-bezier(0.22,0.61,0.36,1) forwards; opacity: 0; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes glowPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(47,217,165,.5);} 50% { box-shadow: 0 0 0 5px rgba(47,217,165,0);} }

/* =====================================================================
   CROSS-PAGE VIEW TRANSITIONS
   ===================================================================== */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vtOut 0.32s ease both; }
::view-transition-new(root) { animation: vtIn 0.42s cubic-bezier(0.22,0.61,0.36,1) both; }
@keyframes vtOut { to { opacity: 0; transform: translateY(-10px) scale(0.995); } }
@keyframes vtIn  { from { opacity: 0; transform: translateY(14px) scale(0.992); } }

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-heading); font-weight: 600; font-size: 0.9rem;
  padding: 11px 20px; border-radius: var(--radius-full); border: none;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn-primary {
  background: var(--primary-grad); color: #042027;
  box-shadow: 0 8px 22px var(--primary-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px var(--primary-glow); }
.btn-glass {
  background: var(--glass); color: var(--text);
  border: 1px solid var(--glass-border); backdrop-filter: blur(10px);
}
.btn-glass:hover { background: var(--glass-2); border-color: var(--glass-border-2); transform: translateY(-1px); }

/* =====================================================================
   FORM CONTROLS
   ===================================================================== */
input:not([type="checkbox"]):not([type="radio"]), textarea, select {
  width: 100%; background: rgba(255,255,255,0.05); color: var(--text) !important;
  border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
  padding: 12px 15px; font-family: var(--font-body); font-size: 0.95rem;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:focus, textarea:focus, select:focus {
  border-color: var(--primary); background: rgba(255,255,255,0.07);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
input[type="checkbox"] { width: auto; accent-color: var(--primary); cursor: pointer; }
select option { background: #0b2127; color: var(--text); }

/* =====================================================================
   HEADER — FROSTED GLASS PILL NAV
   ===================================================================== */
header {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  width: min(94%, 1180px); z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: var(--radius-full);
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 12px 36px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.22);
  view-transition-name: site-header;
}
.nav-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px; border-radius: var(--radius-full);
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.10);
}
.nav-ico {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 42px; height: 42px; border-radius: var(--radius-full);
  color: rgba(255,255,255,0.6); text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.nav-ico i { font-size: 1rem; }
.nav-ico:hover { color: #fff; background: rgba(255,255,255,0.06); }
.nav-ico.active {
  background: rgba(5,14,18,0.55); color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
  padding: 0 22px; width: auto;
}
.nav-ico.cta { color: var(--primary-2); }
.nav-ico.cta:hover { color: #042027; background: var(--primary-grad); }
#mobile-menu-btn {
  background: none; border: none; color: var(--text); font-size: 1.15rem; cursor: pointer;
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease;
}
#mobile-menu-btn:hover { background: rgba(255,255,255,0.06); }
#contact-btn {
  height: 42px; padding: 0 18px; font-size: 0.85rem;
}
#contact-btn i { font-size: 1.05rem; }
.header-side { display: flex; align-items: center; gap: 8px; }

@media (max-width: 768px) {
  header { top: 10px; padding: 8px 10px; }
  .nav-ico.active { padding: 0 16px; }
  .nav-label { display: none; }
}
@media (max-width: 460px) {
  .nav-pill .nav-ico:not(.active):not(.cta) { display: none; }
}

/* =====================================================================
   HERO (home)
   ===================================================================== */
.hero { padding: 150px 0 26px; text-align: center; position: relative; }
.hero-inner { max-width: 720px; margin: 0 auto; }
.hero-eyebrow {
  font-family: var(--font-body); font-weight: 600; font-size: 0.72rem;
  letter-spacing: 0.34em; text-transform: uppercase; color: var(--primary-2);
}
.hero-title {
  font-family: var(--font-heading); font-weight: 800;
  font-size: clamp(2.6rem, 8vw, 5.2rem); line-height: 0.96;
  letter-spacing: -0.02em; color: #f3fbfc; margin: 16px 0 0;
}
.hero-sub {
  font-size: 1.02rem; line-height: 1.7; color: var(--text-muted);
  max-width: 540px; margin: 18px auto 0;
}
.hero-cta-row { display: flex; gap: 12px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.hero-stats {
  display: inline-flex; gap: 0; margin-top: 38px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius-md); backdrop-filter: blur(12px); overflow: hidden;
}
.hero-stat { padding: 16px 28px; text-align: center; }
.hero-stat + .hero-stat { border-right: 1px solid var(--glass-border); }
.hero-stat-num { font-family: var(--font-heading); font-weight: 800; font-size: 1.7rem; color: #fff; line-height: 1; }
.hero-stat-lbl { font-size: 0.72rem; letter-spacing: 0.06em; color: var(--text-muted); margin-top: 6px; }
@media (max-width: 768px) { .hero { padding: 118px 0 20px; } .hero-stat { padding: 14px 18px; } }

/* =====================================================================
   DASHBOARD GALLERY HEADER
   ===================================================================== */
.dash-header { margin-bottom: 26px; }
.dash-titlebar { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px 36px; flex-wrap: wrap; margin-bottom: 20px; }
.dash-title-block { flex: 0 1 auto; }
.dash-eyebrow { font-family: var(--font-body); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--primary-2); font-weight: 600; margin-bottom: 8px; }
.dash-title { font-size: 3rem; font-weight: 700; letter-spacing: -0.03em; line-height: 0.92; margin: 0; color: var(--text); }
.dash-kpis { display: flex; gap: 10px; flex-wrap: wrap; }
.kpi-tile {
  border-radius: 16px; padding: 12px 18px; min-width: 116px; flex: 1 1 116px;
  background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px); display: flex; flex-direction: column; gap: 4px; justify-content: center;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.kpi-tile:hover { border-color: var(--glass-border-2); transform: translateY(-2px); }
.kpi-tile.kpi-online { background: linear-gradient(150deg, rgba(47,217,165,0.14), rgba(255,255,255,0.03)); border-color: rgba(47,217,165,0.28); }
.kpi-label { font-size: 0.78rem; color: var(--text-muted); }
.kpi-num { font-family: var(--font-heading); font-weight: 700; font-size: 1.7rem; line-height: 1; color: var(--text); }
.dash-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--glass-border); }
.dash-search {
  display: flex; align-items: center; gap: 10px; min-width: 240px; flex: 0 1 320px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
  border-radius: var(--radius-full); padding: 11px 18px; color: var(--text-muted);
}
.dash-search i { font-size: 0.85rem; }
.dash-search input { background: transparent !important; border: none !important; padding: 0 !important; box-shadow: none !important; font-size: 0.9rem; min-width: 0; }
.dash-filters { display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px; align-items: center; flex: 1 1 auto; min-width: 0; }
@media (max-width: 768px) { .dash-title { font-size: 2.2rem; } .kpi-num { font-size: 1.4rem; } }

/* =====================================================================
   FILTERS (sliding indicator pills)
   ===================================================================== */
.filter-wrapper { position: relative; display: inline-flex; gap: 4px; padding: 5px; border-radius: var(--radius-full); background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); }
.filter-wrapper.vertical { flex-direction: column; width: 100%; align-items: stretch; border-radius: var(--radius-md); }
.filter-indicator { position: absolute; background: var(--primary-grad); border-radius: var(--radius-full); transition: all 0.35s cubic-bezier(0.22,0.61,0.36,1); z-index: 0; box-shadow: 0 4px 14px var(--primary-glow); }
.filter-btn { position: relative; z-index: 1; border: none; background: transparent; color: var(--text-muted); font-family: var(--font-body); font-weight: 600; font-size: 0.84rem; padding: 8px 16px; border-radius: var(--radius-full); cursor: pointer; white-space: nowrap; transition: color 0.25s ease; }
.filter-wrapper.vertical .filter-btn { text-align: right; }
.filter-btn:hover { color: var(--text); }
.filter-btn.active { color: #042027; }

/* =====================================================================
   GALLERY CARDS
   ===================================================================== */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); grid-auto-flow: dense; gap: 1rem; padding-bottom: 4rem; }
@media (min-width: 768px) { .cards-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.25rem; } }
.model-card {
  position: relative; border-radius: var(--radius-md); overflow: hidden; cursor: pointer;
  aspect-ratio: 3/4; background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(6px); box-shadow: 0 8px 22px rgba(0,0,0,0.3);
  transition: transform 0.35s cubic-bezier(0.22,0.61,0.36,1), box-shadow 0.35s ease, border-color 0.35s ease;
  will-change: transform; transform: translateZ(0); backface-visibility: hidden;
}
.model-card:hover { transform: translate3d(0,-6px,0) scale(1.02); box-shadow: 0 16px 32px rgba(54,194,214,0.22); border-color: rgba(95,217,230,0.35); }
.model-card img { width: 100%; height: 100%; object-fit: cover; }
.model-card.spotlight { grid-column: span 2; grid-row: span 2; }
@media (max-width: 560px) { .model-card.spotlight { grid-row: span 1; } }
.spotlight-badge {
  position: absolute; top: 14px; right: 14px; z-index: 12; padding: 6px 13px; border-radius: var(--radius-full);
  background: rgba(5,14,18,0.55); border: 1px solid rgba(255,255,255,0.14);
  font-family: var(--font-body); font-weight: 600; font-size: 0.68rem; letter-spacing: 0.12em; color: #cdeef3;
  backdrop-filter: blur(6px);
}
.card-glass-overlay {
  position: absolute; inset: auto 10px 10px 10px;
  background: linear-gradient(to top, rgba(4,12,16,0.95) 0%, rgba(6,18,22,0.55) 70%, rgba(6,18,22,0.2) 100%);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; padding: 10px 12px;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.model-card:hover .card-glass-overlay { border-color: rgba(255,255,255,0.2); }
.status-indicator { position: absolute; top: 12px; right: 12px; width: 9px; height: 9px; border-radius: 50%; z-index: 10; }
.status-indicator.online { background: var(--success); box-shadow: 0 0 10px var(--success); }
.status-indicator.offline { background: var(--danger); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot.online { background: var(--success); box-shadow: 0 0 8px var(--success); }
.dot.offline { background: var(--danger); }

#empty-state { display: flex; }
#empty-state.hidden { display: none; }

/* =====================================================================
   PROFILE CARD
   ===================================================================== */
.profile-container { padding-top: 116px; padding-bottom: 60px; }
.profile-card {
  width: 100%; max-width: 430px; padding: 14px; position: relative;
  background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px); border-radius: var(--radius-lg);
  box-shadow: 0 28px 70px rgba(2,12,14,0.55);
}
.profile-photo { position: relative; width: 100%; aspect-ratio: 4/5; border-radius: 22px; overflow: hidden; background: #06141a; }
.profile-photo img, .profile-photo video { width: 100%; height: 100%; object-fit: cover; }
.profile-overlay-btn {
  position: absolute; top: 14px; z-index: 30; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(8,20,24,0.5); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.16);
  color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.9rem;
  transition: background 0.2s ease, transform 0.2s ease;
}
.profile-overlay-btn:hover { background: rgba(8,20,24,0.75); transform: scale(1.06); }
.profile-back { right: 14px; } .profile-share { left: 14px; }
.profile-status-pill {
  position: absolute; bottom: 14px; left: 14px; z-index: 20; display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: var(--radius-full); background: rgba(5,14,18,0.55); backdrop-filter: blur(8px);
  color: #fff; font-size: 0.74rem; font-weight: 600;
}
.profile-body { padding: 20px 12px 8px; }
.profile-namerow { display: flex; align-items: center; gap: 9px; }
.profile-name { font-family: var(--font-heading); font-size: 1.7rem; font-weight: 700; color: var(--text); margin: 0; letter-spacing: -0.01em; line-height: 1.1; }
.profile-verified { color: var(--primary-2); font-size: 1.2rem; display: inline-flex; line-height: 1; }
.profile-bio { color: var(--text-muted); font-size: 0.95rem; line-height: 1.55; margin-top: 9px; }
.profile-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.profile-stats { display: flex; align-items: center; gap: 20px; }
.profile-stat { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-weight: 600; font-size: 0.95rem; }
.profile-stat i { color: var(--text-muted); font-size: 0.88rem; }
.profile-cta {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: var(--radius-full);
  background: var(--primary-grad); color: #042027; text-decoration: none; font-family: var(--font-heading);
  font-weight: 600; font-size: 0.9rem; box-shadow: 0 6px 18px var(--primary-glow);
  transition: transform 0.2s ease, box-shadow 0.2s ease; white-space: nowrap;
}
.profile-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 26px var(--primary-glow); }
.profile-extra { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--glass-border); }
.profile-extra-title { font-family: var(--font-heading); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; margin-bottom: 10px; }
.profile-about { color: var(--text-muted); font-size: 0.92rem; line-height: 1.65; }
.profile-actions { display: flex; gap: 10px; margin-top: 18px; }
.profile-actions .btn { flex: 1; font-size: 0.82rem; padding: 11px 14px; }
.profile-reviews { display: flex; flex-direction: column; gap: 10px; max-height: 240px; overflow-y: auto; }
.profile-review { background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); border-radius: 14px; padding: 12px 14px; }
.profile-review-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.profile-review-user { font-weight: 700; color: var(--text); font-size: 0.88rem; }
.profile-review-stars { color: #f5b94b; font-size: 0.8rem; letter-spacing: 1px; }
.profile-review-text { color: var(--text-muted); font-size: 0.85rem; font-style: italic; line-height: 1.5; }
@media (max-width: 480px) { .profile-name { font-size: 1.5rem; } .profile-meta { flex-wrap: wrap; } }

/* =====================================================================
   SIDEBAR
   ===================================================================== */
#sidebar {
  position: fixed; top: 0; right: 0; width: 340px; max-width: 88vw; height: 100%; overflow-y: auto;
  background: rgba(7,20,24,0.96); backdrop-filter: blur(20px);
  border-left: 1px solid var(--glass-border); z-index: 200; padding: 28px 26px;
  display: flex; flex-direction: column; gap: 6px;
  transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
  border-top-left-radius: 28px; border-bottom-left-radius: 28px; box-shadow: -20px 0 50px rgba(2,12,14,0.5);
}
#sidebar.open { transform: translateX(0); }
.sidebar-head { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 20px; margin-bottom: 6px; border-bottom: 1px solid var(--glass-border); }
.sidebar-tag { font-family: var(--font-body); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); margin-top: 5px; }
.sidebar-close { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s ease, transform 0.3s ease; flex-shrink: 0; }
.sidebar-close:hover { background: var(--glass-2); transform: rotate(90deg); }
.sidebar-home { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 14px 16px; margin: 4px 0 6px; border-radius: 14px; border: none; cursor: pointer; background: var(--primary-grad); color: #042027; font-family: var(--font-heading); font-weight: 600; font-size: 0.95rem; box-shadow: 0 6px 18px var(--primary-glow); transition: transform 0.2s ease; }
.sidebar-home:hover { transform: translateY(-2px); }
.sidebar-home-l { display: inline-flex; align-items: center; gap: 10px; }
.sidebar-section { padding: 12px 0 4px; }
.sidebar-label { font-family: var(--font-heading); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; margin-bottom: 12px; }
.sidebar-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--glass-border); display: flex; flex-direction: column; gap: 12px; }
.sidebar-cta { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 18px; border-radius: var(--radius-full); background: rgba(54,194,214,0.1); border: 1px solid rgba(54,194,214,0.28); color: var(--primary-2); text-decoration: none; font-family: var(--font-heading); font-weight: 600; font-size: 0.9rem; transition: background 0.2s ease; }
.sidebar-cta:hover { background: rgba(54,194,214,0.18); }
.sidebar-fine { text-align: center; font-size: 0.72rem; color: var(--text-muted); }

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer { border-top: 1px solid var(--glass-border); background: linear-gradient(to bottom, rgba(255,255,255,0.015), rgba(4,12,16,0.4)); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--text-muted); font-size: 0.82rem; }
.footer-fine { color: var(--text-faint); font-size: 0.76rem; }

/* =====================================================================
   MODALS
   ===================================================================== */
.modal-overlay { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(3,11,13,0.62); backdrop-filter: blur(8px); opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-overlay.hidden { display: none; }
.modal-content { background: rgba(11,28,33,0.92); backdrop-filter: blur(24px); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 28px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; transform: scale(0.94); transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1); box-shadow: 0 30px 70px rgba(0,0,0,0.55); }
.modal-overlay.open .modal-content { transform: scale(1); }

/* star selector */
#star-selector i { color: #2a4248; transition: color 0.15s ease; }

/* =====================================================================
   TOAST + SHARE
   ===================================================================== */
.toast { position: fixed; bottom: 30px; right: 30px; background: rgba(47,217,165,0.1); border: 1px solid var(--success); color: var(--success); padding: 16px 24px; border-radius: var(--radius-full); backdrop-filter: blur(12px); transform: translateY(120px); transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1); z-index: 2000; font-weight: 600; display: flex; align-items: center; gap: 12px; }
.toast.show { transform: translateY(0); }
.share-copied { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(0.9); background: rgba(11,28,33,0.95); border: 1px solid var(--glass-border); padding: 24px 32px; border-radius: 20px; text-align: center; color: var(--text); z-index: 3000; opacity: 0; pointer-events: none; transition: all 0.3s ease; backdrop-filter: blur(12px); }
.share-copied.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }

/* =====================================================================
   ADMIN
   ===================================================================== */
#admin-view { background: linear-gradient(160deg, #0a2128 0%, #061216 70%); min-height: 100vh; color: var(--text); }
.admin-layout { display: flex; min-height: 100vh; padding-top: 0; }
.admin-sidebar { display: none; width: 240px; flex-shrink: 0; flex-direction: column; padding: 32px 20px; border-right: 1px solid var(--glass-border); background: rgba(255,255,255,0.02); }
@media (min-width: 768px) { .admin-sidebar { display: flex; } }
.admin-layout > main.container { flex: 1; padding: 32px 24px; width: auto; margin: 0; max-width: none; }
.stat-card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius-md); padding: 22px; backdrop-filter: blur(10px); }
.glass-panel { background: var(--glass); border: 1px solid var(--glass-border); backdrop-filter: blur(12px); }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--glass-border); font-size: 0.88rem; }
.admin-table th { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); font-weight: 700; }
.admin-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.bulk-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; margin-bottom: 16px; border-radius: 16px; background: var(--glass); border: 1px solid var(--glass-border); }
.bulk-count { font-weight: 700; color: var(--primary); font-size: 0.9rem; }
.bulk-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bulk-btn { padding: 6px 14px; border-radius: var(--radius-full); border: 1px solid var(--glass-border); background: rgba(255,255,255,0.04); color: var(--text); font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: background 0.2s ease; }
.bulk-btn:hover { background: var(--glass-2); }
.bulk-btn.success { color: var(--success); border-color: rgba(47,217,165,0.4); }
.bulk-btn.danger { color: var(--danger); border-color: rgba(255,107,129,0.4); }
.admin-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.admin-brand .logo-text { font-size: 1.5rem; }
.admin-navbtn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border-radius: 12px; border: none; background: transparent; color: var(--text-muted); font-family: var(--font-heading); font-weight: 600; font-size: 0.9rem; cursor: pointer; text-align: left; transition: background 0.2s ease, color 0.2s ease; }
.admin-navbtn:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.admin-navbtn.active { background: rgba(54,194,214,0.12); color: var(--primary); }

/* =====================================================================
   MOBILE OPTIMIZATION (phones / small tablets)
   Layered after the base rules so these win at narrow widths.
   ===================================================================== */

/* Prevent iOS from auto-zooming when focusing inputs (needs >=16px) */
@media (max-width: 768px) {
  input:not([type="checkbox"]):not([type="radio"]), textarea, select,
  .dash-search input, #admin-search { font-size: 16px !important; }
}

/* ---- HEADER / GLASS NAV ---- */
@media (max-width: 768px) {
  header { width: 94%; padding: 8px 10px; gap: 8px; }
  .logo-text { font-size: 1.2rem; }
  .nav-ico.active { padding: 0 14px; }
  #contact-btn { width: 44px; height: 44px; padding: 0; border-radius: 50%; }
  #mobile-menu-btn { width: 44px; height: 44px; }
}
@media (max-width: 480px) {
  header { padding: 7px 8px; gap: 6px; }
  .nav-pill { padding: 4px; gap: 4px; }
  /* On phones the hamburger + contact button cover navigation, so the
     glass pill collapses to a single current-page indicator. */
  .nav-pill .nav-ico.cta { display: none; }
  .nav-pill .nav-ico:not(.active) { display: none; }
  .nav-ico { width: 40px; height: 40px; }
  .nav-ico.active { padding: 0 14px; }
}
@media (max-width: 360px) {
  .header-side .logo-text { display: none; }
}

/* ---- HERO ---- */
@media (max-width: 768px) {
  .hero { padding: 104px 0 18px; }
  .hero-sub { font-size: 0.95rem; }
  .hero-stats { width: 100%; max-width: 100%; justify-content: center; }
}
@media (max-width: 480px) {
  .hero { padding: 96px 0 14px; }
  .hero-cta-row { gap: 10px; }
  .hero-cta-row .btn { flex: 1 1 auto; justify-content: center; }
  .hero-stat { padding: 12px 16px; }
  .hero-stat-num { font-size: 1.4rem; }
  .hero-stat-lbl { font-size: 0.66rem; }
}

/* ---- GALLERY DASHBOARD HEADER ---- */
@media (max-width: 600px) {
  .dash-titlebar { gap: 16px; margin-bottom: 16px; }
  .dash-title-block { flex: 1 1 100%; }
  .dash-title { font-size: 2.1rem; }
  .dash-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
  .kpi-tile { min-width: 0; flex: none; padding: 10px 10px; align-items: center; text-align: center; }
  .kpi-num { font-size: 1.3rem; }
  .kpi-label { font-size: 0.64rem; }
  .dash-controls { gap: 10px; padding-top: 14px; }
  .dash-search { flex: 1 1 100%; }
  .dash-filters { width: 100%; }
}

/* ---- GALLERY GRID ---- */
@media (max-width: 600px) {
  .cards-grid { gap: 0.7rem; }
}
@media (max-width: 400px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .card-glass-overlay { inset: auto 7px 7px 7px; padding: 8px 10px; }
}

/* ---- PROFILE ---- */
@media (max-width: 768px) {
  .profile-container { padding-top: 92px; padding-bottom: 44px; }
}
@media (max-width: 420px) {
  .profile-meta { flex-direction: column; align-items: stretch; gap: 14px; }
  .profile-meta .profile-cta { justify-content: center; }
}

/* ---- MODALS ---- */
@media (max-width: 480px) {
  .modal-overlay { padding: 14px; align-items: flex-end; }
  .modal-content { padding: 20px; border-radius: 22px; max-height: 92vh; }
}

/* ---- ADMIN ---- */
@media (max-width: 768px) {
  .admin-layout > main.container { padding: 18px 14px; }
  #mobile-admin-tabs::-webkit-scrollbar { display: none; }
}

/* ---- TOAST / SHARE on phones ---- */
@media (max-width: 480px) {
  .toast { bottom: 18px; right: 14px; left: 14px; justify-content: center; }
}

/* ---- FILTER PILL ROWS: contain + horizontal-scroll on phones ----
   With several regions/tiers the pill row is far wider than the screen;
   without this it runs off-edge (esp. RTL → off the left) and gets clipped. */
@media (max-width: 700px) {
  .dash-filters { flex-direction: column; align-items: stretch; width: 100%; gap: 8px; }
  .dash-filters > div { width: 100%; max-width: 100%; min-width: 0; }
  .filter-wrapper.horizontal {
    display: flex; max-width: 100%; overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; justify-content: flex-start;
  }
  .filter-wrapper.horizontal::-webkit-scrollbar { display: none; }
  .filter-wrapper.horizontal .filter-btn { flex: 0 0 auto; }
}

/* ---- long-content safety (real data: long names, URLs, bios) ---- */
img, video { max-width: 100%; }
.profile-bio, .profile-about, .profile-name, .hero-sub, .hero-title,
.dash-title, .profile-review-text, .kpi-label { overflow-wrap: anywhere; }
.header-side, .profile-stats, .footer-bottom, .dash-controls { min-width: 0; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .model-card:hover { transform: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}
