/* ═══════════════════════════════════════════════════════════════════════════════
   CICLO BROCAS — INDUSTRIAL INVENTORY & TOOLING LIFECYCLE WEB APP
   Optimized for iPhone 17 Pro Max • Responsive • Dark & Light Themes
   Matching exact approved layout from media_1789350816321.png
   ═══════════════════════════════════════════════════════════════════════════════ */

:root {
  /* Sleek Industrial Slate-Gray Palette with Sophisticated Maroon Details */
  --bg-primary: #121417;
  --bg-secondary: #0A0C0E;
  --card-bg: #1A1D23;
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover: #22262E;
  
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  /* Striking Blood Red Accents (Visceral & Bold Industrial Luxury) */
  --wine-primary: #B91C1C;
  --wine-secondary: #EF4444;
  --wine-muted: #450A0A;
  --wine-text: #FEE2E2;
  --wine-border: rgba(239, 68, 68, 0.52);
  --wine-badge: rgba(220, 38, 38, 0.25);
  --wine-glow: rgba(239, 68, 68, 0.45);
  --wine-pill: #991B1B;

  --wine-gradient-1: #DC2626;
  --wine-gradient-2: #7F1D1D;
  --wine-gradient-hover-1: #EF4444;
  --wine-gradient-hover-2: #991B1B;

  --maroon-accent: #EF4444;
  --maroon-dark: #450A0A;
  --maroon-light: #FEE2E2;

  --emerald-success: #10B981;
  --emerald-bg: rgba(16, 185, 129, 0.12);
  --amber-warning: #F59E0B;
  --amber-bg: rgba(245, 158, 11, 0.12);
  --blue-info: #38BDF8;

  --nav-bg: rgba(18, 20, 23, 0.95);
  --nav-border: rgba(255, 255, 255, 0.08);

  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   THEME 1: DARK BLOOD RED (Obsidian Slate + Striking Blood Red / Crimson)
   ═══════════════════════════════════════════════════════════════════════════════ */
[data-theme="dark"],
[data-theme="blood"] {
  --wine-primary: #B91C1C;
  --wine-secondary: #EF4444;
  --wine-muted: #450A0A;
  --wine-text: #FEE2E2;
  --wine-border: rgba(239, 68, 68, 0.52);
  --wine-badge: rgba(220, 38, 38, 0.25);
  --wine-glow: rgba(239, 68, 68, 0.45);
  --wine-pill: #991B1B;

  --wine-gradient-1: #DC2626;
  --wine-gradient-2: #7F1D1D;
  --wine-gradient-hover-1: #EF4444;
  --wine-gradient-hover-2: #991B1B;

  --maroon-accent: #EF4444;
  --maroon-dark: #450A0A;
  --maroon-light: #FEE2E2;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   THEME 2: DARK BEIGE (Obsidian Onyx + Warm Sand & Linen Beige)
   ═══════════════════════════════════════════════════════════════════════════════ */
[data-theme="beige"],
[data-theme="gold"] {
  --bg-primary: #141311;
  --bg-secondary: #0C0B0A;
  --card-bg: #1C1A18;
  --card-border: rgba(218, 203, 185, 0.18);
  --card-hover: #272420;

  --text-primary: #FAF7F2;
  --text-secondary: #D4C8B8;
  --text-muted: #948777;

  /* Elegant Warm Sand & Linen Beige Accents */
  --wine-primary: #C4B097;
  --wine-secondary: #E8DCB8;
  --wine-muted: #2A251F;
  --wine-text: #FAF7F2;
  --wine-border: rgba(214, 197, 175, 0.5);
  --wine-badge: rgba(214, 197, 175, 0.22);
  --wine-glow: rgba(214, 197, 175, 0.38);
  --wine-pill: #8C7860;

  --wine-gradient-1: #D4C5B0;
  --wine-gradient-2: #7D6A56;
  --wine-gradient-hover-1: #E6DAC8;
  --wine-gradient-hover-2: #8F7A64;

  --maroon-accent: #D4C5B0;
  --maroon-dark: #2A251F;
  --maroon-light: #FAF7F2;

  --nav-bg: rgba(20, 19, 17, 0.95);
  --nav-border: rgba(212, 197, 176, 0.18);
}

[data-theme="beige"] .filter-chip.active,
[data-theme="gold"] .filter-chip.active {
  background: #C4B097 !important;
  color: #141311 !important;
  border-color: #E8DCB8 !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 10px rgba(214, 197, 175, 0.4) !important;
}

[data-theme="beige"] .nav-scanner-btn,
[data-theme="gold"] .nav-scanner-btn {
  background: radial-gradient(circle at center, #D4C5B0 0%, #7D6A56 100%) !important;
  box-shadow: 0 4px 18px rgba(214, 197, 175, 0.4) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   THEME 3: DARK SILVER (Deep Titanium + Brushed Chrome & Silver)
   ═══════════════════════════════════════════════════════════════════════════════ */
[data-theme="silver"] {
  --bg-primary: #0F1216;
  --bg-secondary: #080A0D;
  --card-bg: #161B22;
  --card-border: rgba(203, 213, 225, 0.15);
  --card-hover: #1F2630;

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  /* Sleek Silver/Chrome Accents (Replacing Maroon) */
  --wine-primary: #334155;
  --wine-secondary: #94A3B8;
  --wine-muted: #1E293B;
  --wine-text: #F1F5F9;
  --wine-border: rgba(203, 213, 225, 0.42);
  --wine-badge: rgba(148, 163, 184, 0.18);
  --wine-glow: rgba(148, 163, 184, 0.3);
  --wine-pill: #334155;

  --wine-gradient-1: #64748B;
  --wine-gradient-2: #334155;
  --wine-gradient-hover-1: #94A3B8;
  --wine-gradient-hover-2: #475569;

  --maroon-accent: #94A3B8;
  --maroon-dark: #1E293B;
  --maroon-light: #F1F5F9;

  --nav-bg: rgba(15, 18, 22, 0.95);
  --nav-border: rgba(203, 213, 225, 0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.25s ease, color 0.25s ease;
}

#app-shell {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--bg-primary);
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(90px + env(safe-area-inset-bottom));
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
  overflow-x: hidden;
  box-sizing: border-box;
}

img, svg {
  max-width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PASSWORDLESS PROFILE SELECTOR GATE (IPHONE 17 PRO MAX LUXURY SCREEN)
   ═══════════════════════════════════════════════════════════════════════════════ */
#authGateModal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: radial-gradient(circle at 50% 20%, rgba(82, 136, 193, 0.35) 0%, rgba(7, 13, 24, 0.98) 75%);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-box {
  width: 100%;
  max-width: 440px;
  background: rgba(18, 29, 47, 0.88);
  border: 1.5px solid rgba(147, 197, 253, 0.35);
  border-radius: 28px;
  padding: 38px 24px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(82, 136, 193, 0.28);
  animation: authFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.auth-ambient-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(147, 197, 253, 0.4) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

@keyframes authFadeIn {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-logo-img-wrap {
  width: 96px;
  height: 96px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(147, 197, 253, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(82, 136, 193, 0.35);
  position: relative;
  z-index: 2;
}

.auth-logo-img {
  max-height: 64px;
  max-width: 64px;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 4px 14px rgba(255, 255, 255, 0.4));
}

.auth-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.4px;
  position: relative;
  z-index: 2;
}
.auth-title span { color: var(--wine-text); }

.auth-badge-restrito {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: var(--wine-text);
  background: var(--wine-badge);
  border: 1px solid var(--wine-border);
  padding: 5px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.auth-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.45;
}

/* User Selection Cards (Friction-Free Profile Tap) */
.user-select-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-bottom: 10px;
}

.user-select-card {
  width: 100%;
  background: #181B22;
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--wine-secondary);
  border-radius: 20px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  text-align: left;
}

.user-select-card:hover {
  background: #20242E;
  border-color: var(--wine-border);
  border-left-color: var(--wine-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.user-select-card:active {
  transform: scale(0.97);
}

.user-select-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wine-primary), #2D333F);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #FFF;
  flex-shrink: 0;
  border: 2px solid var(--wine-secondary);
  box-shadow: 0 4px 12px var(--wine-glow);
  overflow: hidden;
}

.user-select-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-select-info {
  flex: 1;
  min-width: 0;
}

.user-select-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  margin-bottom: 2px;
}

.user-select-role {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.user-select-arrow {
  font-size: 20px;
  color: var(--wine-text);
  font-weight: 700;
  margin-right: 4px;
  transition: transform 0.2s;
}

.user-select-card:hover .user-select-arrow {
  transform: translateX(4px);
}

/* Step containers */
.auth-step {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-selected-user-card {
  width: 100%;
  background: #181B22;
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--wine-secondary);
  border-radius: 20px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  text-align: left;
}

.auth-change-user-btn {
  background: none;
  border: none;
  color: var(--wine-text);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.15s;
  text-decoration: underline;
  white-space: nowrap;
}
.auth-change-user-btn:hover {
  background: var(--wine-badge);
}

.auth-input-container {
  width: 100%;
  position: relative;
  margin-bottom: 14px;
}

.auth-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  pointer-events: none;
  opacity: 0.7;
}

.auth-input {
  width: 100%;
  background: #15181E;
  border: 1.5px solid var(--card-border);
  border-radius: 16px;
  padding: 16px 48px 16px 48px;
  color: #FFF;
  font-size: 1.05rem;
  font-weight: 600;
  outline: none;
  transition: all 0.2s;
  letter-spacing: 1px;
}

.auth-input:focus {
  border-color: var(--wine-secondary);
  box-shadow: 0 0 0 3px var(--wine-glow);
  background: #181B22;
}

.auth-toggle-pwd {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-remember-row {
  width: 100%;
  margin-top: 10px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.auth-remember-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.auth-remember-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #06B6D4;
  cursor: pointer;
}

.auth-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--wine-gradient-1) 0%, var(--wine-gradient-2) 100%);
  border: 1px solid var(--wine-border);
  border-radius: 16px;
  padding: 16px;
  color: #FFF;
  font-size: 1.02rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--wine-gradient-hover-1) 0%, var(--wine-gradient-hover-2) 100%);
  box-shadow: 0 6px 22px var(--wine-glow);
}

.auth-btn:active {
  transform: scale(0.98);
}

.auth-error-msg {
  width: 100%;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 12px;
  padding: 10px 14px;
  color: #EF4444;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 12px;
  display: none;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.auth-footer-text {
  font-size: 0.74rem;
  color: var(--text-secondary);
  margin-top: 26px;
  font-weight: 600;
}

.powered-by-mhub {
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  margin-top: 6px;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.85;
}

.app-global-footer {
  text-align: center;
  padding: 24px 16px 12px;
  margin-top: auto;
}

.app-global-footer .footer-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.2px;
}

.app-global-footer .footer-powered {
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  margin-top: 5px;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.85;
}

.auth-quick-chips {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
}

.auth-chip-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(147, 197, 253, 0.25);
  border-radius: var(--radius-full);
  padding: 9px 10px;
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-chip-btn:hover {
  background: var(--wine-badge);
  border-color: var(--wine-secondary);
  color: #FFF;
}

.chip-code {
  background: rgba(78, 18, 30, 0.4);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.7rem;
  color: #E2E8F0;
  font-weight: 700;
}

.shake {
  animation: shakeAnim 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shakeAnim {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(3px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-5px, 0, 0); }
  40%, 60% { transform: translate3d(5px, 0, 0); }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   TOP APP BAR
   ═══════════════════════════════════════════════════════════════════════════════ */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: calc(14px + env(safe-area-inset-top)) 20px 14px;
  display: flex;
  align-items: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--card-border);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.brand-logo-img {
  height: 52px;
  width: auto;
  max-width: 60px;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 2px 10px rgba(255, 255, 255, 0.25));
  transition: filter 0.2s;
  flex-shrink: 0;
}

[data-theme="light"] .brand-logo-img {
  filter: invert(1);
}

.brand-text-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.brand-title {
  font-size: 1.38rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #FFF;
  white-space: nowrap;
  line-height: 1.15;
}

.brand-title span {
  color: var(--wine-text);
  font-weight: 800;
  margin-left: 4px;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-top: 2px;
  text-transform: uppercase;
}

.sync-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--emerald-success);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.view-section {
  display: none;
  flex-direction: column;
  padding: 16px 18px;
  animation: fadeIn 0.2s ease-out;
}
.view-section.active { display: flex; }

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

/* ═══════════════════════════════════════════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════════════════════════════════════════ */
.dashboard-kpi-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 18px;
}

.kpi-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius-md); padding: 14px; display: flex;
  flex-direction: column; box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.kpi-card .kpi-label { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; margin-bottom: 6px; }
.kpi-card .kpi-value { font-size: 1.55rem; font-weight: 800; color: var(--text-primary); line-height: 1.1; }
.kpi-card .kpi-sub { font-size: 0.72rem; color: var(--text-secondary); margin-top: 4px; }

.section-heading {
  font-size: 0.95rem; font-weight: 700; letter-spacing: -0.2px; margin-bottom: 12px;
  display: flex; justify-content: space-between; align-items: center;
}

.quick-actions-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px;
}
.quick-btn {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius-md); padding: 14px 8px; display: flex;
  flex-direction: column; align-items: center; text-align: center; gap: 8px;
  cursor: pointer; transition: transform 0.15s, border-color 0.15s;
}
.quick-btn:active { transform: scale(0.96); }
.quick-btn-icon {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: #1E293B; border: 1px solid #334155;
  color: #E2E8F0; display: flex; align-items: center;
  justify-content: center; font-size: 18px;
}
.quick-btn-label { font-size: 0.74rem; font-weight: 600; color: var(--text-secondary); }

/* ═══════════════════════════════════════════════════════════════════════════════
   SEARCH & FILTERS
   ═══════════════════════════════════════════════════════════════════════════════ */
.search-container { position: relative; margin-bottom: 12px; }
.search-input {
  width: 100%; padding: 12px 42px 12px 38px; background: var(--card-bg);
  border: 1px solid var(--card-border); border-radius: var(--radius-full);
  color: var(--text-primary); font-size: 0.88rem; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input:focus { border-color: var(--wine-secondary); box-shadow: 0 0 0 3px var(--wine-glow); }
.search-icon-left { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.search-barcode-btn {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: var(--wine-badge); border: 1px solid var(--wine-border);
  color: var(--wine-secondary); border-radius: 50%; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}

.filter-chips-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 14px; scrollbar-width: none; }
.filter-chips-row::-webkit-scrollbar { display: none; }
.filter-chip {
  padding: 6px 14px; border-radius: var(--radius-full); font-size: 0.78rem;
  font-weight: 600; white-space: nowrap; background: var(--card-bg);
  border: 1px solid var(--card-border); color: var(--text-secondary);
  cursor: pointer; transition: all 0.2s;
}
.filter-chip.active { background: var(--wine-primary); border-color: var(--wine-secondary); color: #FFF; box-shadow: 0 2px 8px var(--wine-glow); }

/* ═══════════════════════════════════════════════════════════════════════════════
   CATALOG HERO LAYOUT (EXACT REPLICA OF media_1789350816321.png)
   ═══════════════════════════════════════════════════════════════════════════════ */
.catalog-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.catalog-title-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.back-arrow-btn {
  font-size: 18px;
  color: var(--text-primary);
  background: none;
  border: none;
  cursor: pointer;
}

.catalog-header-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-more-btn {
  font-size: 20px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
}

/* Big Hero Card from Screenshot */
.hero-drill-card {
  width: 100%;
  background: #181B22;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
}

.hero-image-container {
  width: 100%;
  height: 220px;
  max-height: 240px;
  border-radius: 16px;
  background: radial-gradient(circle at center, #232731 0%, #101216 100%);
  border: 1px solid var(--card-border);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.hero-image-container img,
.hero-image-container svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.8));
  transition: transform 0.3s ease;
  display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PRODUCT CARD & LIST STYLES (STRICT MOBILE CONTAINMENT)
   ═══════════════════════════════════════════════════════════════════════════════ */
.product-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.product-card {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  box-sizing: border-box;
}

.product-card:hover {
  border-color: var(--wine-secondary);
  background: #20242E;
  transform: translateY(-1px);
}

.product-thumb-large {
  width: 68px !important;
  height: 68px !important;
  min-width: 68px;
  max-width: 68px;
  border-radius: 12px;
  background: #14171D;
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-sizing: border-box;
}

.product-thumb-large img,
.product-thumb-large svg {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  display: block;
}

.product-info-col {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.product-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.product-spec-line {
  font-size: 0.74rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-badge-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-location-text {
  font-size: 0.90rem;
  font-weight: 700;
  color: #F8FAFC;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  letter-spacing: -0.2px;
}

.card-date-text {
  font-size: 0.68rem;
  font-weight: 500;
  color: #94A3B8;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge-disponivel {
  background: var(--emerald-bg);
  color: var(--emerald-success);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-vendida {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.badge-wear {
  background: var(--amber-bg);
  color: var(--amber-warning);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* Dates and Location */
.hero-meta-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 16px;
}

.hero-date-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.hero-location-text {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

/* Two Wine Action Buttons from Screenshot */
.hero-actions-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.hero-tag-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--wine-badge);
  border: 1px solid var(--wine-border);
  color: var(--wine-text);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  z-index: 2;
}

.btn-pill-wine {
  flex: 1;
  padding: 12px 14px;
  border-radius: var(--radius-full);
  background: var(--wine-badge);
  border: 1px solid var(--wine-border);
  color: var(--wine-text);
  font-weight: 700;
  font-size: 0.82rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.btn-pill-wine:hover {
  background: var(--wine-badge);
  border-color: var(--wine-text);
  color: #FFF;
}

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

/* 2x2 Specification Grid from Screenshot */
.spec-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.spec-cell-2x2 {
  background: #181B22;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spec-cell-label-2x2 {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.spec-cell-val-2x2 {
  font-size: 1.12rem;
  font-weight: 800;
  color: #F1F5F9;
}

/* Catalog item switcher bar */
.catalog-item-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding: 8px 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   BOTTOM NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════════ */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 680px; height: calc(64px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: var(--nav-bg);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--nav-border); display: flex;
  align-items: center; justify-content: space-around; z-index: 100;
}

.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text-muted); font-size: 0.68rem; font-weight: 600;
  cursor: pointer; background: none; border: none; flex: 1; transition: color 0.15s;
}
.nav-item svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; }
.nav-item.active { color: var(--wine-text); }

.nav-scanner-btn-wrapper { position: relative; top: -16px; flex: 1; display: flex; justify-content: center; }
.nav-scanner-btn {
  width: 58px; height: 58px; border-radius: 50%;
  background: radial-gradient(circle at center, var(--wine-gradient-1) 0%, var(--wine-gradient-2) 100%);
  border: 4px solid var(--bg-primary); color: #FFF; display: flex;
  align-items: center; justify-content: center; box-shadow: 0 4px 18px var(--wine-glow);
  cursor: pointer; transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav-scanner-btn:active { transform: scale(0.92); }
.nav-scanner-btn svg { width: 26px; height: 26px; stroke: #FFF; stroke-width: 2; fill: none; }

/* ═══════════════════════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  z-index: 200; display: none; align-items: flex-end; justify-content: center;
}
.modal-overlay.active { display: flex; }

.modal-sheet {
  width: 100%; max-width: 480px; max-height: 90vh;
  background: var(--bg-primary); border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg); border: 1px solid var(--card-border);
  border-bottom: none; overflow-y: auto;
  padding: 16px 20px calc(24px + env(safe-area-inset-bottom));
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.modal-drag-pill { width: 40px; height: 4px; background: var(--text-muted); border-radius: var(--radius-full); margin: 0 auto 16px; opacity: 0.5; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-close-btn {
  background: var(--card-bg); border: 1px solid var(--card-border);
  color: var(--text-secondary); border-radius: 50%; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}

.detail-spec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 8px; }
.detail-spec-grid-fiscal { grid-template-columns: 1.38fr 1fr; }
.spec-cell { background: rgba(255, 255, 255, 0.02); border: 1px solid var(--card-border); border-radius: var(--radius-sm); padding: 10px 11px; min-width: 0; }
.spec-cell-label { 
  font-size: 0.63rem; 
  color: var(--text-muted); 
  text-transform: uppercase; 
  letter-spacing: 0.3px; 
  margin-bottom: 4px; 
  font-weight: 600; 
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis; 
}
.spec-cell-value { font-size: 0.86rem; font-weight: 700; color: var(--text-primary); word-break: break-word; }
.spec-cell-value-nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.spec-cell-highlight {
  background: var(--wine-badge);
  border-color: var(--wine-border);
}

.modal-sheet-expanded {
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.detail-modelo-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--wine-badge);
  border: 1px solid var(--wine-border);
  color: #FFF;
  letter-spacing: 0.5px;
}

.badge-conferido {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34D399 !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  font-weight: 800;
}

.detail-tab-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
}

.detail-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.detail-tab-btn.active {
  background: linear-gradient(135deg, var(--wine-secondary), var(--wine-muted));
  border: 1px solid var(--wine-border);
  color: #FFF;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.detail-tab-body {
  flex: 1;
  overflow-y: auto;
  padding-right: 2px;
  margin-bottom: 16px;
}

.detail-tab-pane {
  display: none;
  animation: fadeInPane 0.2s ease;
}

.detail-tab-pane.active {
  display: block;
}

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

.detail-section-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.detail-section-header {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #94A3B8;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.saida-empty-banner {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--card-border);
  border-radius: 14px;
  padding: 32px 16px;
  text-align: center;
  margin-bottom: 14px;
}

.detail-photos-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-photo-thumb-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: #0B0E14;
  cursor: pointer;
}

.detail-photo-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.detail-photo-thumb-wrap:hover img {
  transform: scale(1.06);
}

.detail-action-buttons { display: flex; gap: 10px; }
.btn-primary {
  flex: 1;
  background: linear-gradient(135deg, var(--wine-gradient-1), var(--wine-gradient-2));
  border: 1px solid var(--wine-border);
  color: #FFF;
  font-weight: 700;
  font-size: 0.86rem;
  padding: 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  transition: all 0.2s ease;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--wine-gradient-hover-1), var(--wine-gradient-hover-2));
}
.btn-secondary {
  background: var(--card-bg); border: 1px solid var(--card-border);
  color: var(--text-primary); font-weight: 700; font-size: 0.86rem;
  padding: 14px; border-radius: var(--radius-sm); cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PROFILE / USER SETTINGS & AVATAR UPLOAD
   ═══════════════════════════════════════════════════════════════════════════════ */
.profile-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius-md); padding: 18px; display: flex;
  align-items: center; gap: 16px; margin-bottom: 20px;
}

.profile-avatar-wrap {
  position: relative;
  cursor: pointer;
}

.profile-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--wine-primary), #2D333F);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; color: #FFF;
  overflow: hidden;
  border: 2px solid var(--wine-secondary);
  box-shadow: 0 4px 14px var(--wine-glow);
  transition: transform 0.2s;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-upload-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--wine-secondary);
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border: 2px solid var(--bg-primary);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.profile-avatar-wrap:hover .profile-avatar {
  transform: scale(1.04);
}

.settings-group-title { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }
.settings-box { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius-md); padding: 14px; margin-bottom: 20px; }

.theme-switch-segment {
  display: flex; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--card-border);
  border-radius: var(--radius-full); padding: 4px; gap: 4px;
}
.theme-opt-btn {
  flex: 1; padding: 9px 6px; border-radius: var(--radius-full); border: 1px solid transparent;
  background: transparent; color: var(--text-secondary); font-size: 0.78rem;
  font-weight: 600; display: flex; align-items: center; justify-content: center;
  gap: 6px; cursor: pointer; transition: all 0.2s ease; white-space: nowrap;
}
.theme-opt-btn:hover {
  color: var(--text-primary);
}
.theme-opt-btn.active {
  background: var(--card-hover); color: var(--wine-text);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); border-color: var(--wine-border);
}
.theme-color-dot {
  width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0;
}
.theme-color-dot.blood,
.theme-color-dot.maroon {
  background: linear-gradient(135deg, #EF4444, #991B1B);
  box-shadow: 0 0 7px rgba(239, 68, 68, 0.7);
}
.theme-color-dot.beige,
.theme-color-dot.gold {
  background: linear-gradient(135deg, #FAF7F2, #C8B89E);
  box-shadow: 0 0 7px rgba(212, 197, 176, 0.7);
}
.theme-color-dot.silver {
  background: linear-gradient(135deg, #FFFFFF, #94A3B8);
  box-shadow: 0 0 7px rgba(203, 213, 225, 0.7);
}

.setting-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--card-border); }
.setting-toggle-row:last-child { border-bottom: none; }
.toggle-switch {
  width: 44px; height: 24px; background: var(--card-border);
  border-radius: var(--radius-full); position: relative; cursor: pointer; transition: background 0.2s;
}
.toggle-switch.active { background: var(--wine-secondary); }
.toggle-thumb {
  width: 18px; height: 18px; background: #FFF; border-radius: 50%;
  position: absolute; top: 3px; left: 3px; transition: transform 0.2s;
}
.toggle-switch.active .toggle-thumb { transform: translateX(20px); }

.btn-logout {
  width: 100%;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #F87171;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.2s;
}
.btn-logout:hover {
  background: rgba(239, 68, 68, 0.22);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   SCANNER CAMERA BOX
   ═══════════════════════════════════════════════════════════════════════════════ */
#scanner-camera-box {
  width: 100%; height: 260px; background: #000; border-radius: var(--radius-md);
  overflow: hidden; position: relative; margin-bottom: 16px; display: flex;
  align-items: center; justify-content: center;
}
.scanner-reticle {
  width: 200px; height: 140px; border: 2px dashed var(--wine-secondary);
  border-radius: var(--radius-sm); position: relative;
}
.scanner-laser {
  position: absolute; width: 100%; height: 2px;
  background: var(--wine-secondary); box-shadow: 0 0 10px var(--wine-secondary);
  animation: laser-scan 2s infinite ease-in-out;
}
@keyframes laser-scan { 0%, 100% { top: 10%; } 50% { top: 90%; } }

/* ═══════════════════════════════════════════════════════════════════════════════
   IN-APP PHOTO LIGHTBOX & TOUCH SLIDER
   ═══════════════════════════════════════════════════════════════════════════════ */
.photo-lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 350;
  background: rgba(10, 12, 14, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  animation: fadeInLightbox 0.22s ease-out;
  touch-action: pan-y;
}

@keyframes fadeInLightbox {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.lightbox-top-bar {
  padding: calc(14px + env(safe-area-inset-top)) 20px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(10, 12, 14, 0.85) 0%, transparent 100%);
  z-index: 10;
}

.lightbox-title-wrap {
  flex: 1;
  min-width: 0;
  padding-right: 12px;
}

.lightbox-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #FFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lightbox-subtitle {
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 2px;
}

.lightbox-close-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #FFF;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}

.lightbox-close-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.lightbox-slide-track {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  transition: transform 0.28s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.lightbox-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.lightbox-slide img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(26, 29, 35, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFF;
  font-size: 1.8rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}

.lightbox-nav-btn.prev { left: 12px; padding-right: 2px; }
.lightbox-nav-btn.next { right: 12px; padding-left: 2px; }

.lightbox-nav-btn:active {
  transform: translateY(-50%) scale(0.92);
  background: rgba(78, 18, 30, 0.7);
}

.lightbox-bottom-bar {
  padding: 12px 20px calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: linear-gradient(0deg, rgba(10, 12, 14, 0.92) 0%, transparent 100%);
  z-index: 10;
}

.lightbox-counter-badge {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 14px;
  border-radius: 9999px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #FFF;
  letter-spacing: 0.3px;
}

.lightbox-dots-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.lightbox-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: all 0.2s;
}

.lightbox-dot.active {
  width: 22px;
  border-radius: 4px;
  background: #FFF;
}

.lightbox-photo-label {
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-weight: 600;
}
