/* ========================================
   Protocolo de Reconexión — App Styles
   Design System: Dark Premium + Gold Accent
   Mobile-first: base 320px
   Aesthetic: Linear / Notion / Raycast
   ======================================== */

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0A1628;
  --bg-deep: #060B18;
  --surface: #152238;
  --surface-hover: #1a2d4a;
  --text: #F5F0EB;
  --text-secondary: #8B9BB4;
  --text-muted: #5A6A82;
  --accent: #D4A849;
  --accent-light: #E8C36A;
  --accent-glow: rgba(212, 168, 73, 0.15);
  --green: #2ECC71;
  --red: #C23B3B;
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-light: rgba(255, 255, 255, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --sidebar-width: 260px;
  --header-height: 56px;
  --transition: 0.2s ease;
  --transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-light);
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  outline: none;
}

input {
  font-family: inherit;
  outline: none;
  border: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(139, 155, 180, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 155, 180, 0.3);
}

/* ========================================
   USER AVATAR — Generic silhouette
   ======================================== */

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E2D4A, #152238);
  border: 1.5px solid rgba(139, 155, 180, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ========================================
   LOGIN PAGE
   ======================================== */

body[data-page="login"] {
  background: linear-gradient(160deg, #060B18 0%, #0A1628 50%, #0D1B30 100%);
}

.login-wrapper {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  overflow: hidden;
}

.login-wrapper::before {
  content: '';
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(212, 168, 73, 0.06) 0%, transparent 65%);
  pointer-events: none;
}

.login-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 168, 73, 0.1), transparent);
  pointer-events: none;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  position: relative;
  z-index: 1;
  border: 1px solid var(--border-light);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

.login-mockup {
  width: 100%;
  max-width: 280px;
  border-radius: 16px;
  object-fit: cover;
  margin: 0 auto 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Legacy: hide old avatar if present */
.login-avatar {
  display: none;
}

.login-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 0;
  font-weight: 400;
}

.login-divider {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 168, 73, 0.3), transparent);
  margin: 20px auto;
}

.login-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-align: left;
  width: 100%;
}

.login-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.login-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-deep);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.login-input::placeholder {
  color: var(--text-muted);
  font-size: 14px;
  letter-spacing: 2px;
}

.login-input:focus {
  border-color: rgba(212, 168, 73, 0.4);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.login-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--bg-deep);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.8px;
  border-radius: 12px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(212, 168, 73, 0.3);
}

.login-btn:active {
  transform: translateY(0);
}

.login-error {
  color: var(--red);
  font-size: 0.82rem;
  min-height: 20px;
  opacity: 0;
  transition: opacity var(--transition);
}

.login-error.visible {
  opacity: 1;
}

.login-trust {
  margin-top: 16px;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.login-support {
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.login-support a {
  color: var(--text-secondary);
  font-size: 12px;
  transition: color var(--transition);
}

.login-support a:hover {
  color: var(--accent);
}

/* Login fade-in + scale animation */
.fade-in-scale {
  animation: fadeInScale 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ========================================
   DASHBOARD LAYOUT
   ======================================== */

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ========================================
   HEADER
   ======================================== */

.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* Hide old img-based avatar */
.header-avatar {
  display: none;
}

.header-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-right {
  display: none;
}

.header-page-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.header-avatar-desktop {
  display: flex;
}

/* ========================================
   HAMBURGER
   ======================================== */

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  z-index: 201;
  -webkit-tap-highlight-color: transparent;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: transform var(--transition-slow), opacity var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   SIDEBAR
   ======================================== */

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 199;
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-deep);
  border-right: 1px solid var(--border-subtle);
  overflow-y: auto;
  z-index: 200;
  transform: translateX(-100%);
  transition: transform var(--transition-slow);
  padding: 8px 0 24px;
  -webkit-overflow-scrolling: touch;
}

.sidebar.open {
  transform: translateX(0);
}

/* Sidebar brand (desktop only) */
.sidebar-brand {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 24px;
}

.sidebar-brand-icon {
  color: var(--accent);
  display: flex;
  align-items: center;
}

.sidebar-brand-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.2px;
}

/* Section labels */
.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 16px 20px 6px;
  list-style: none;
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  margin: 0 8px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
  min-height: 40px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-nav li a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-nav li a.active {
  color: var(--accent);
  background: var(--accent-glow);
}

.sidebar-nav li a.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.sidebar-nav .nav-icon {
  width: 18px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  opacity: 0.7;
}

.sidebar-nav li a.active .nav-icon {
  opacity: 1;
  color: var(--accent);
}

.sidebar-nav .nav-icon svg {
  stroke: currentColor;
}

.nav-check {
  margin-left: auto;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  transition: opacity var(--transition);
  flex-shrink: 0;
}

.nav-check.completed {
  opacity: 1;
}

.sidebar-separator {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 20px;
}

.sidebar-nav li a.logout {
  color: var(--text-muted);
}

.sidebar-nav li a.logout:hover {
  color: var(--red);
  background: rgba(194, 59, 59, 0.06);
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.main-content {
  flex: 1;
  margin-top: var(--header-height);
  padding: 20px 16px 40px;
  max-width: 100%;
  min-height: calc(100vh - var(--header-height));
  width: 100%;
}

.main-content > * {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* ========================================
   DASHBOARD CARDS & BLOCKS
   ======================================== */

.section-block {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.block-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.block-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* Welcome */
.welcome-block {
  background: linear-gradient(135deg, var(--surface), rgba(212, 168, 73, 0.04));
  border: 1px solid rgba(212, 168, 73, 0.08);
}

.welcome-text {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}

.welcome-sub {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ========================================
   DIAGNÓSTICO — Gauge Zona Genérica
   ======================================== */

.result-card {
  text-align: center;
}

.gauge-zone-container {
  margin: 0 auto 20px;
  max-width: 320px;
}

.gauge-zone-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.gauge-zone-bar {
  position: relative;
  height: 12px;
  border-radius: 6px;
  overflow: visible;
}

.gauge-zone-gradient {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #C23B3B 0%, #E8A83E 35%, #D4A849 50%, #7BC77B 75%, #2ECC71 100%);
  opacity: 0.75;
}

.gauge-zone-marker {
  position: absolute;
  top: 50%;
  left: 55%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background: var(--accent);
  border: 3px solid var(--surface);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(212, 168, 73, 0.5);
  animation: markerPulse 2s ease-in-out infinite;
}

@keyframes markerPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(212, 168, 73, 0.5); }
  50% { box-shadow: 0 0 20px rgba(212, 168, 73, 0.8); }
}

.gauge-zone-status {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
}

.gauge-zone-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Legacy gauge */
.gauge-container {
  display: none;
}

/* Stats grid */
.result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.stat-item {
  background: var(--bg);
  border-radius: var(--radius-xs);
  padding: 14px 10px;
  text-align: center;
  border: 1px solid var(--border-subtle);
  transition: border-color var(--transition), transform var(--transition);
}

.stat-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.stat-value.accent {
  color: var(--accent);
}

.stat-value.green {
  color: var(--green);
}

/* Badges */
.badge-gold {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--bg-deep);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.badge-green {
  display: inline-block;
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.badge-urgent {
  display: inline-block;
  background: linear-gradient(135deg, #C23B3B, #e74c3c);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  animation: urgentPulse 2s ease-in-out infinite;
}

@keyframes urgentPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(194, 59, 59, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(194, 59, 59, 0); }
}

/* ========================================
   COUNTDOWN / TIMER BLOCK
   ======================================== */

.timer-block .day-label {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.timer-block .day-sublabel {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.countdown-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 24px;
}

.countdown-digit {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--bg-deep);
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  min-width: 52px;
  text-align: center;
  border: 1px solid rgba(212, 168, 73, 0.08);
  font-variant-numeric: tabular-nums;
}

.countdown-sep {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* ========================================
   CHECKLIST
   ======================================== */

.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background var(--transition);
  font-size: 13px;
  color: var(--text-secondary);
  user-select: none;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
  border: 1px solid var(--border-subtle);
}

.checklist li:hover {
  background: var(--surface-hover);
}

.checklist li:active {
  background: var(--surface-hover);
}

.checklist li.checked {
  color: var(--text);
}

.checklist li.checked .checklist-text {
  text-decoration: line-through;
  opacity: 0.5;
}

.checklist li.checked .check-box {
  background: var(--accent);
  border-color: var(--accent);
}

.checklist li.checked .check-box::after {
  opacity: 1;
}

.check-box {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 1.5px solid var(--text-muted);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  position: relative;
}

.check-box::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--bg-deep);
  border-bottom: 2px solid var(--bg-deep);
  transform: rotate(-45deg);
  opacity: 0;
  transition: opacity var(--transition);
  position: absolute;
  top: 4px;
}

/* Progress bar */
.progress-bar-wrapper {
  margin-top: 4px;
}

.progress-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.progress-bar {
  height: 6px;
  background: var(--bg-deep);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 3px;
  transition: width 0.6s ease;
  width: 0%;
}

/* ========================================
   QUICK ACCESS GRID
   ======================================== */

.quick-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.quick-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px 18px;
  transition: all var(--transition);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.quick-card:hover {
  border-color: rgba(212, 168, 73, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.quick-card:active {
  transform: translateY(0);
}

.quick-card-icon {
  font-size: 1.5rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.quick-card-icon svg {
  opacity: 0.85;
}

.quick-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.quick-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ========================================
   AUDIO PLAYER
   ======================================== */

.audio-block {
  text-align: center;
}

.audio-intro {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.audio-player {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-deep);
  border-radius: var(--radius);
  padding: 12px 14px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.audio-play-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), box-shadow var(--transition);
  flex-shrink: 0;
}

.audio-play-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(212, 168, 73, 0.3);
}

.audio-play-btn:active {
  transform: scale(0.95);
}

.audio-play-btn svg {
  width: 16px;
  height: 16px;
  fill: var(--bg-deep);
  margin-left: 2px;
}

.audio-play-btn.playing svg {
  margin-left: 0;
}

.audio-info {
  flex: 1;
  text-align: left;
  min-width: 0;
}

.audio-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-progress {
  width: 100%;
  height: 4px;
  background: rgba(139, 155, 180, 0.15);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.audio-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}

.audio-time {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  color: var(--text-muted);
  min-width: 36px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* ========================================
   RESPONSIVE — DESKTOP (768px+)
   ======================================== */

@media (min-width: 768px) {
  .hamburger {
    display: none;
  }

  .sidebar {
    transform: translateX(0);
    top: 0;
    padding-top: 0;
    background: var(--bg-deep);
  }

  .sidebar-brand {
    display: flex;
  }

  .sidebar-overlay {
    display: none !important;
  }

  /* Header: no logo on desktop (it's in sidebar), show page title + avatar */
  .app-header {
    left: var(--sidebar-width);
    background: rgba(10, 22, 40, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .header-left {
    display: none;
  }

  .header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    justify-content: space-between;
  }

  .main-content {
    margin-left: var(--sidebar-width);
    padding: 32px 40px 48px;
    max-width: calc(100% - var(--sidebar-width));
  }

  .main-content > * {
    max-width: 800px;
  }

  .result-stats {
    grid-template-columns: repeat(4, 1fr);
  }

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

  .login-card {
    padding: 48px 40px;
  }

  .section-block {
    padding: 28px;
  }

  .welcome-text {
    font-size: 22px;
  }

  .block-title {
    font-size: 22px;
  }

  .countdown-digit {
    font-size: 2rem;
    padding: 10px 16px;
    min-width: 60px;
  }

  .countdown-sep {
    font-size: 1.75rem;
  }

  /* Desktop card hover effects */
  .stat-item:hover {
    border-color: var(--border-light);
    transform: translateY(-1px);
  }

  .quick-card {
    padding: 24px 20px;
  }
}

@media (min-width: 1024px) {
  .main-content {
    padding: 32px 48px 56px;
  }
}

/* ========================================
   MOBILE REFINEMENTS (small screens)
   ======================================== */

@media (max-width: 767px) {
  /* Mobile: avatar left, brand center, hamburger right */
  .app-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0;
  }

  .header-left {
    justify-self: start;
  }

  .header-left .header-brand {
    display: none;
  }

  .header-left .user-avatar {
    width: 28px;
    height: 28px;
  }

  /* Show brand in center on mobile */
  .app-header::after {
    content: 'Método Camila Herrera';
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    justify-self: center;
    white-space: nowrap;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
  }

  .hamburger {
    justify-self: end;
  }

  .welcome-text {
    font-size: 16px;
  }

  .block-title {
    font-size: 18px;
  }

  .quick-card {
    padding: 16px;
  }

  .quick-card-title {
    font-size: 13px;
  }

  .quick-card-desc {
    font-size: 12px;
  }

  .section-block {
    padding: 16px;
  }
}

/* Very small screens */
@media (max-width: 359px) {
  .login-card {
    padding: 24px 16px;
  }

  .countdown-digit {
    font-size: 1.35rem;
    padding: 6px 8px;
    min-width: 40px;
  }

  .countdown-sep {
    font-size: 1.2rem;
  }

  .stat-item {
    padding: 10px 6px;
  }

  .stat-label {
    font-size: 9px;
  }

  .badge-gold,
  .badge-green,
  .badge-urgent {
    font-size: 10px;
    padding: 3px 8px;
  }

  .audio-player {
    gap: 8px;
    padding: 10px;
  }
}

/* ========================================
   UTILITIES
   ======================================== */

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
