/* ============================================================
   Tracker de Garantías — Material Design 3 Premium Dark Theme
   FULL UI/UX OVERHAUL: Visual redesign, animations, micro-interactions,
   mobile-first responsive, skeleton loading, glassmorphism,
   staggered animations, enhanced accessibility
   ============================================================ */

/* ============================================================
   0. COLOR SCHEME — Browser-native dark mode support
   ============================================================ */
@custom-media --breakpoint-sm (min-width: 640px);
@custom-media --breakpoint-md (min-width: 1024px);
@custom-media --breakpoint-lg (min-width: 1280px);

html {
  color-scheme: dark;
}


/* ============================================================
   1. PREMIUM M3 DARK THEME TOKENS (Custom Properties)
   ============================================================ */
:root {
  /* ---- Vibrant Tonal Palette (0-100 scale) ---- */
  /* Primary: lavender — #D0BCFF (M3 Dark) */
  --md-sys-color-primary: #D0BCFF;
  --md-sys-color-on-primary: #000000;
  --md-sys-color-primary-container: #4F378B;
  --md-sys-color-on-primary-container: #EADDFF;

  /* Secondary: muted purple — #CCC6DC (M3 Dark) */
  --md-sys-color-secondary: #CCC6DC;
  --md-sys-color-on-secondary: #1C1B1F;
  --md-sys-color-secondary-container: #4A4458;
  --md-sys-color-on-secondary-container: #E8DEF8;

  /* Tertiary: soft pink — #EFB8C8 (M3 Dark) */
  --md-sys-color-tertiary: #EFB8C8;
  --md-sys-color-on-tertiary: #1C1B1F;
  --md-sys-color-tertiary-container: #633B48;
  --md-sys-color-on-tertiary-container: #FFD8E4;

  /* Error: muted red — #F2B8B5 (M3 Dark) */
  --md-sys-color-error: #F2B8B5;
  --md-sys-color-on-error: #1C1B1F;
  --md-sys-color-error-container: #8C1D18;
  --md-sys-color-on-error-container: #F9DEDC;

  /* ---- SURFACE HIERARCHY (CRITICAL for premium M3 dark) ---- */
  /* Deepest: app background */
  --md-sys-color-background: #1C1B1F;
  --md-sys-color-on-background: #E6E1E5;

  /* Surface tonal layers (creates DEPTH) */
  --md-sys-color-surface: #1C1B1F;
  --md-sys-color-surface-dim: #1C1B1F;
  --md-sys-color-surface-container-low: #1C1B1F;
  --md-sys-color-surface-container: #211F26;
  --md-sys-color-surface-container-high: #2B2930;
  --md-sys-color-surface-container-highest: #36343B;
  --md-sys-color-surface-variant: #49454F;

  /* On-surface colors */
  --md-sys-color-on-surface: #E6E1E5;
  --md-sys-color-on-surface-variant: #CAC4D0;

  /* Inverse — used for FAB, select elements */
  --md-sys-color-inverse-surface: #E6E1E5;
  --md-sys-color-on-inverse-surface: #262626;

  /* Outline */
  --md-sys-color-outline: #938F99;
  --md-sys-color-outline-variant: #49454F;

  /* ---- Success tokens (derived from primary) ---- */
  --md-sys-color-success: var(--md-sys-color-primary);
  --md-sys-color-success-container: var(--md-sys-color-primary-container);
  --md-sys-color-on-success-container: var(--md-sys-color-on-primary-container);

  /* ---- Semantic aliases for JS inline style.color = var(--color-xxx) ---- */
  --color-danger: var(--md-sys-color-error);
  --color-warning: var(--md-sys-color-tertiary);
  --color-text: var(--md-sys-color-on-surface);

  /* ---- WHITE SHADOWS (not black — premium glow effect on dark) ---- */
  --md-sys-elevation-1: 0 1px 3px 1px rgba(255,255,255,0.03), 0 1px 2px rgba(255,255,255,0.05);
  --md-sys-elevation-2: 0 2px 6px 2px rgba(255,255,255,0.04), 0 1px 2px rgba(255,255,255,0.06);
  --md-sys-elevation-3: 0 4px 8px 3px rgba(255,255,255,0.05), 0 1px 2px rgba(255,255,255,0.08);
  --md-sys-elevation-4: 0 6px 10px 4px rgba(255,255,255,0.06), 0 2px 3px rgba(255,255,255,0.08);
  --md-sys-elevation-5: 0 8px 12px 6px rgba(255,255,255,0.07), 0 4px 4px rgba(255,255,255,0.1);
  --md-sys-elevation-6: 0 10px 14px 6px rgba(255,255,255,0.08), 0 6px 10px rgba(255,255,255,0.1);
  --md-sys-elevation-8: 0 14px 20px 6px rgba(255,255,255,0.1), 0 6px 12px rgba(255,255,255,0.12);

  /* ---- GLOW EFFECTS (ambient accent glow — primary color) ---- */
  --glow-1: 0 0 12px rgba(208, 188, 255, 0.08);
  --glow-2: 0 0 20px rgba(208, 188, 255, 0.12);
  --glow-3: 0 0 30px rgba(208, 188, 255, 0.15);
  --glow-4: 0 0 40px rgba(208, 188, 255, 0.2);
  --glow-5: 0 0 60px rgba(208, 188, 255, 0.25);

  /* Secondary glow — muted purple */
  --glow-secondary-1: 0 0 12px rgba(204, 198, 220, 0.1);
  --glow-secondary-2: 0 0 24px rgba(204, 198, 220, 0.15);

  /* Tertiary glow — soft pink */
  --glow-tertiary-1: 0 0 12px rgba(239, 184, 200, 0.1);
  --glow-tertiary-2: 0 0 24px rgba(239, 184, 200, 0.15);

  /* Error glow — muted red */
  --glow-error-1: 0 0 12px rgba(242, 184, 181, 0.1);
  --glow-error-2: 0 0 24px rgba(242, 184, 181, 0.15);

  /* ---- GLASSMORPHISM TOKENS (new for UI/UX overhaul) ---- */
  --glass-bg: rgba(28, 27, 31, 0.85);
  --glass-border: rgba(147, 143, 153, 0.12);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.36);

  /* ---- SKELETON LOADING TOKENS (new) ---- */
  --skeleton-base: var(--md-sys-color-surface-container-high);
  --skeleton-shine: rgba(255, 255, 255, 0.06);

  /* ---- SHAPE TOKENS (Premium M3 — LARGE CORNERS) ---- */
  --md-sys-shape-none: 0;
  --md-sys-shape-xs: 4px;
  --md-sys-shape-s: 8px;
  --md-sys-shape-m: 12px;
  --md-sys-shape-l: 16px;
  --md-sys-shape-xl: 28px;
  --md-sys-shape-xl2: 32px;
  --md-sys-shape-xxl: 48px;
  --md-sys-shape-full: 9999px;

  /* ---- TYPOGRAPHY (Roboto) ---- */
  --md-font-family: 'Roboto', system-ui, -apple-system, sans-serif;
  --md-icon-font: 'Material Symbols Rounded';

  /* Display Large */
  --md-display-lg-size: 2.5rem;
  --md-display-lg-weight: 400;
  --md-display-lg-line-height: 1.15;

  /* Headline Large */
  --md-headline-lg-size: 1.75rem;
  --md-headline-lg-weight: 400;
  --md-headline-lg-line-height: 1.25;

  /* Headline Medium */
  --md-headline-md-size: 1.5rem;
  --md-headline-md-weight: 400;
  --md-headline-md-line-height: 1.33;

  /* Title Large */
  --md-title-lg-size: 1.375rem;
  --md-title-lg-weight: 500;
  --md-title-lg-line-height: 1.29;

  /* Title Medium */
  --md-title-md-size: 1rem;
  --md-title-md-weight: 500;
  --md-title-md-line-height: 1.5;

  /* Title Small */
  --md-title-sm-size: 0.875rem;
  --md-title-sm-weight: 500;
  --md-title-sm-line-height: 1.43;

  /* Body Large */
  --md-body-lg-size: 1rem;
  --md-body-lg-line-height: 1.5;
  --md-body-lg-weight: 400;

  /* Body Medium */
  --md-body-md-size: 0.875rem;
  --md-body-md-line-height: 1.43;
  --md-body-md-weight: 400;

  /* Body Small */
  --md-body-sm-size: 0.75rem;
  --md-body-sm-line-height: 1.33;
  --md-body-sm-weight: 400;

  /* Label Large */
  --md-label-lg-size: 0.875rem;
  --md-label-lg-weight: 500;
  --md-label-lg-line-height: 1.43;

  /* Label Medium */
  --md-label-md-size: 0.75rem;
  --md-label-md-weight: 500;
  --md-label-md-line-height: 1.33;

  /* Label Small */
  --md-label-sm-size: 0.6875rem;
  --md-label-sm-weight: 500;
  --md-label-sm-line-height: 1.33;

  /* ---- EXPRESSIVE MOTION (Premium easing curves) ---- */
  /* Expressive ease-out — premium feel */
  --md-expressive-ease: cubic-bezier(0.34, 0.88, 0.34, 1);
  /* Standard motion */
  --md-motion-standard: 400ms var(--md-expressive-ease);
  /* Short motion */
  --md-motion-short: 200ms var(--md-expressive-ease);
  /* Very short motion */
  --md-motion-very-short: 150ms var(--md-expressive-ease);
  /* Emphasized motion */
  --md-motion-emphasized: 300ms var(--md-expressive-ease);
  /* Decelerate */
  --md-motion-decelerate: 300ms cubic-bezier(0, 0, 0.2, 1);
  /* Accelerate */
  --md-motion-accelerate: 300ms cubic-bezier(0.4, 0, 1, 1);
  /* Spatial motion tiers */
  --md-motion-fast-spatial: 350ms var(--md-expressive-ease);
  --md-motion-default-spatial: 500ms var(--md-expressive-ease);
  --md-motion-slow-spatial: 650ms var(--md-expressive-ease);
  /* Stagger delays for card lists */
  --stagger-1: 0ms;
  --stagger-2: 40ms;
  --stagger-3: 80ms;
  --stagger-4: 120ms;
  --stagger-5: 160ms;
  --stagger-6: 200ms;
  /* Legacy aliases */
  --transition-fast: var(--md-motion-very-short);
  --transition-base: var(--md-motion-standard);
  --transition-slow: var(--md-motion-slow-spatial);
  --transition-elevation: 280ms var(--md-expressive-ease);

  /* ---- STATE LAYERS (White-based overlays for dark theme) ---- */
  --state-hover-soft: rgba(255, 255, 255, 0.05);
  --state-hover-strong: rgba(255, 255, 255, 0.1);
  --state-pressed-soft: rgba(255, 255, 255, 0.08);
  --state-pressed-strong: rgba(255, 255, 255, 0.12);
  --state-selected: rgba(255, 255, 255, 0.08);
  --state-disabled: rgba(255, 255, 255, 0.05);
  /* Opacity values for legacy */
  --state-hover-opacity: 0.08;
  --state-focus-opacity: 0.12;
  --state-pressed-opacity: 0.12;
  --state-selected-opacity: 0.08;
  --state-disabled-opacity: 0.05;

  /* ---- SPACING ---- */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */

  /* ---- FIXED HEIGHTS ---- */
  --header-height: 64px;
  --nav-height: 80px;
  --nav-rail-width: 80px;

  /* ---- TOUCH TARGETS (mobile-first, min 44px) ---- */
  --touch-target: 44px;

  /* ---- SAFE AREA (notch devices) ---- */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  /* ---- M3 DENSITY ---- */
  --density-comfortable: 0;
  --density-compact: -1;
  --density-spacious: 1;
}


/* ============================================================
   2. RESET Y BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--space-4));
}

body {
  font-family: var(--md-font-family);
  font-size: var(--md-body-lg-size);
  line-height: var(--md-body-lg-line-height);
  font-weight: var(--md-body-lg-weight);
  color: var(--md-sys-color-on-background);
  background-color: var(--md-sys-color-background);
  min-height: 100vh;
  min-height: 100dvh; /* dynamic viewport height for mobile browsers */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  cursor: pointer;
  font-family: var(--md-font-family);
  font-size: inherit;
  border: none;
  background: none;
  /* Mobile-first: ensure touch targets are adequate */
  min-height: var(--touch-target);
  min-width: var(--touch-target);
}

input,
select,
textarea {
  font-family: var(--md-font-family);
  font-size: inherit;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---- Material Symbols Global ---- */
.material-symbols-rounded {
  font-family: var(--md-icon-font);
  font-weight: normal;
  font-style: normal;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  width: 1em;
  height: 1em;
}

/* Filled variant */
.material-symbols-rounded--filled {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Outlined variant (default) */
.material-symbols-rounded--outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}


/* ============================================================
   3. UTILIDADES DE ACCESIBILIDAD
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}


/* ============================================================
   4. M3 STATE LAYERS (Foundation for all interactive elements)
   ============================================================ */
.m3-state-layer {
  position: relative;
  overflow: hidden;
}

.m3-state-layer::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: currentColor;
  opacity: 0;
  border-radius: inherit;
  transition: opacity var(--md-motion-very-short);
  pointer-events: none;
  z-index: 1;
}

/* Hover state */
.m3-state-layer:hover::after {
  opacity: var(--state-hover-opacity);
}

/* Focus state */
.m3-state-layer:focus-visible::after {
  opacity: var(--state-focus-opacity);
}

/* Pressed state */
.m3-state-layer:active::after {
  opacity: var(--state-pressed-opacity);
}

/* Selected state */
.m3-state-layer[aria-pressed="true"]::after {
  opacity: var(--state-selected-opacity);
}

/* Disabled state */
.m3-state-layer[aria-disabled="true"]::after {
  opacity: var(--state-disabled-opacity);
}


/* ============================================================
   5. M3 RIPPLE EFFECTS (CSS-only with primary color)
   ============================================================ */
.m3-ripple {
  position: relative;
  overflow: hidden;
}

.m3-ripple::before {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(208, 188, 255, 0.3) 0%, rgba(208, 188, 255, 0.1) 40%, transparent 70%);
  width: 0;
  height: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.m3-ripple:active::before {
  animation: ripple-expand 500ms var(--md-expressive-ease) forwards;
}

@keyframes ripple-expand {
  0% {
    width: 0;
    height: 0;
    opacity: 1;
  }
  100% {
    width: 300px;
    height: 300px;
    opacity: 0;
  }
}


/* ============================================================
   6. M3 ICON BUTTON
   ============================================================ */
.m3-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--md-sys-shape-full);
  color: var(--md-sys-color-on-surface-variant);
  transition: color var(--md-motion-very-short), background-color var(--md-motion-very-short), box-shadow var(--md-motion-elevation);
  position: relative;
  overflow: hidden;
}

.m3-icon-btn .material-symbols-rounded {
  font-size: 1.25rem;
  color: inherit;
}

.m3-icon-btn:hover {
  background-color: var(--state-hover-soft);
  color: var(--md-sys-color-on-surface);
}

.m3-icon-btn:active {
  background-color: var(--state-pressed-soft);
}

.m3-icon-btn:focus-visible {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

/* Icon button — tonal variant */
.m3-icon-btn--tonal {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.m3-icon-btn--tonal:hover {
  background-color: var(--md-sys-color-secondary-container);
  box-shadow: var(--md-sys-elevation-1);
}

/* Icon button — filled variant */
.m3-icon-btn--filled {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

.m3-icon-btn--filled:hover {
  background-color: var(--md-sys-color-primary-container);
  box-shadow: var(--md-sys-elevation-1);
}


/* ============================================================
   7. BANNER DE ADVERTENCIA (LocalStorage) — M3 Error Container
   ============================================================ */
.storage-warning {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--md-sys-color-error-container);
  border-bottom: 1px solid var(--md-sys-color-error);
  padding: var(--space-3) var(--space-4);
  animation: slideDown var(--md-motion-standard);
  box-shadow: var(--glow-error-2);
}

.storage-warning__content {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.storage-warning__icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1.5;
  color: var(--md-sys-color-on-error-container);
}

.storage-warning__text {
  flex: 1;
  min-width: 0;
}

.storage-warning__text strong {
  display: block;
  color: var(--md-sys-color-on-error-container);
  font-size: var(--md-body-md-size);
  font-weight: 600;
}

.storage-warning__text p {
  font-size: var(--md-body-md-size);
  color: var(--md-sys-color-on-error-container);
  margin-top: var(--space-1);
  opacity: 0.8;
}

.storage-warning__close {
  flex-shrink: 0;
  color: var(--md-sys-color-on-error-container);
  padding: var(--space-1);
  line-height: 1;
  border-radius: var(--md-sys-shape-full);
  transition: background-color var(--md-motion-very-short);
}

.storage-warning__close:hover {
  background-color: rgba(249, 222, 220, 0.08);
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}


/* ============================================================
   8. CABECERA PRINCIPAL — M3 Top App Bar (GLASSMORPHISM)
   ============================================================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  height: var(--header-height);
  box-shadow: 0 1px 0 var(--glass-border);
  transition: box-shadow var(--md-motion-standard);
}

/* Scroll shadow effect */
.app-header.scrolled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 1px 0 var(--glass-border);
}

.app-header__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--space-4);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.app-header__title {
  font-size: var(--md-title-md-size);
  font-weight: var(--md-title-md-weight);
  color: var(--md-sys-color-on-surface);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.app-header__logo {
  font-size: 1.375rem;
  color: var(--md-sys-color-primary);
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  filter: drop-shadow(0 0 6px rgba(208, 188, 255, 0.3));
  transition: filter var(--md-motion-standard);
}

.app-header__title:hover .app-header__logo {
  filter: drop-shadow(0 0 10px rgba(208, 188, 255, 0.5));
}

.app-header__name {
  white-space: nowrap;
}

/* Menu toggle icon button */
.app-header__menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-2);
  border-radius: var(--md-sys-shape-full);
  transition: background-color var(--md-motion-very-short);
  width: var(--touch-target);
  height: var(--touch-target);
  justify-content: center;
  align-items: center;
  color: var(--md-sys-color-on-surface-variant);
}

.app-header__menu-toggle:hover {
  background-color: var(--state-hover-soft);
  color: var(--md-sys-color-on-surface);
}

.app-header__menu-toggle .material-symbols-rounded {
  font-size: 1.25rem;
  color: inherit;
}

.app-header__actions-btn {
  color: var(--md-sys-color-on-surface-variant);
}


/* ============================================================
   9. NAVEGACIÓN PRINCIPAL — M3 Navigation Bar (GLASSMORPHISM)
   ============================================================ */
.main-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--glass-border);
  box-shadow: 0 -1px 4px rgba(255,255,255,0.04);
  padding-bottom: var(--safe-bottom);
}

.main-nav__list {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 480px;
  margin: 0 auto;
  padding: var(--space-2) var(--space-4);
}

.main-nav__item {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
}

.main-nav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--md-sys-shape-xl);
  color: var(--md-sys-color-on-surface-variant);
  transition: color var(--md-motion-very-short), background-color var(--md-motion-very-short);
  min-width: 64px;
  font-family: var(--md-font-family);
  font-size: var(--md-label-md-size);
  font-weight: var(--md-label-md-weight);
  position: relative;
  width: 100%;
  justify-content: center;
}

.main-nav__link:hover {
  background-color: var(--state-hover-soft);
  color: var(--md-sys-color-on-surface);
}

/* Active state — M3 active indicator pill with glow */
.main-nav__link--active {
  color: var(--md-sys-color-on-secondary-container);
}

/* Active indicator pill — animated entrance */
.main-nav__link--active::before {
  content: '';
  position: absolute;
  inset: var(--space-1) 12px;
  background-color: var(--md-sys-color-secondary-container);
  border-radius: var(--md-sys-shape-xl);
  z-index: -1;
  transition: opacity var(--md-motion-very-short), transform var(--md-motion-standard);
  box-shadow: var(--glow-secondary-1);
  animation: pill-enter var(--md-motion-short) both;
}

@keyframes pill-enter {
  from {
    opacity: 0;
    transform: scaleX(0.5);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

/* Active icon — filled variant */
.main-nav__link--active .main-nav__icon {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.main-nav__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 32px;
}

.main-nav__icon {
  font-size: 1.25rem;
  line-height: 1;
  transition: font-variation-settings var(--md-motion-very-short), transform var(--md-motion-short);
}

/* Icon bounce on active */
.main-nav__link--active .main-nav__icon {
  animation: icon-bounce var(--md-motion-short) both;
}

@keyframes icon-bounce {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.main-nav__label {
  font-size: var(--md-label-md-size);
  font-weight: var(--md-label-md-weight);
  text-align: center;
}


/* ============================================================
   10. CONTENIDO PRINCIPAL
   ============================================================ */
.app-main {
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-4);
  padding-bottom: calc(var(--nav-height) + var(--space-8));
}


/* ============================================================
   11. PANTALLAS (Screens) — Premium Motion System
   ============================================================ */
.screen {
  display: none;
  animation: screen-enter var(--md-motion-default-spatial) both;
}

.screen--active {
  display: block;
}

@keyframes screen-enter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes screen-exit {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.99);
  }
}

/* Staggered child animations for lists */
.stagger-child {
  opacity: 0;
  transform: translateY(12px);
}

.stagger-child.animate-in {
  animation: stagger-fade-in var(--md-motion-standard) both;
}

@keyframes stagger-fade-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ============================================================
   12. M3 AVATARS (Icon Avatars for Categories)
   ============================================================ */
.m3-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--md-sys-shape-full);
  flex-shrink: 0;
  color: var(--md-sys-color-on-surface-variant);
  background-color: var(--md-sys-color-surface-container-highest);
}

/* Default size: 40x40 */
.m3-avatar {
  width: 40px;
  height: 40px;
}

.m3-avatar .material-symbols-rounded {
  font-size: 1.25rem;
}

/* Small: 24x24 */
.m3-avatar--sm {
  width: 24px;
  height: 24px;
}
.m3-avatar--sm .material-symbols-rounded {
  font-size: 1rem;
}

/* Large: 56x56 */
.m3-avatar--lg {
  width: 56px;
  height: 56px;
}
.m3-avatar--lg .material-symbols-rounded {
  font-size: 1.75rem;
}

/* Extra large: 80x80 */
.m3-avatar--xl {
  width: 80px;
  height: 80px;
}
.m3-avatar--xl .material-symbols-rounded {
  font-size: 2.5rem;
}

/* Tonal avatar — primary container with glow */
.m3-avatar--tonal {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  box-shadow: var(--glow-1);
}

/* Green avatar */
.m3-avatar--green {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  box-shadow: var(--glow-1);
}

/* Yellow avatar */
.m3-avatar--yellow {
  background-color: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
  box-shadow: var(--glow-tertiary-1);
}

/* Red avatar */
.m3-avatar--red {
  background-color: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
  box-shadow: var(--glow-error-1);
}


/* ============================================================
   13. M3 BADGES
   ============================================================ */
.m3-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--md-label-sm-size);
  font-weight: var(--md-label-sm-weight);
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.25rem;
  border-radius: var(--md-sys-shape-full);
  line-height: 1;
}

/* Dot badge */
.m3-badge--dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  padding: 0;
}

.m3-badge--green {
  background-color: var(--md-sys-color-primary);
  box-shadow: var(--glow-1);
}

.m3-badge--yellow {
  background-color: var(--md-sys-color-tertiary);
  box-shadow: var(--glow-tertiary-1);
}

.m3-badge--red {
  background-color: var(--md-sys-color-error);
  box-shadow: var(--glow-error-1);
}

/* Labeled badge */
.m3-badge--labeled {
  background-color: var(--md-sys-color-error);
  color: var(--md-sys-color-on-error);
}

/* Pulse animation for urgent badges */
.m3-badge--red.pulse {
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { box-shadow: var(--glow-error-1); }
  50% { box-shadow: var(--glow-error-2); }
}


/* ============================================================
   14. ZONA DE ALERTAS — M3 Alert Banner
   ============================================================ */
.alert-area {
  margin-bottom: var(--space-6);
}

.alert-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--md-sys-shape-s);
  margin-bottom: var(--space-2);
  animation: slideIn var(--md-motion-standard);
  transition: box-shadow var(--md-motion-elevation), background-color var(--md-motion-very-short), transform var(--md-motion-very-short);
}

.alert-banner:hover {
  box-shadow: var(--md-sys-elevation-1);
  transform: translateX(2px);
}

.alert-banner--info {
  background-color: var(--md-sys-color-primary-container);
  border-left-color: var(--md-sys-color-primary);
  box-shadow: var(--glow-1);
}

.alert-banner--warning {
  background-color: var(--md-sys-color-tertiary-container);
  border-left-color: var(--md-sys-color-tertiary);
  box-shadow: var(--glow-tertiary-1);
}

.alert-banner--danger {
  background-color: var(--md-sys-color-error-container);
  border-left-color: var(--md-sys-color-error);
  box-shadow: var(--glow-error-1);
}

.alert-banner__icon {
  font-size: 1.125rem;
  flex-shrink: 0;
  line-height: 1.5;
  color: inherit;
}

.alert-banner__content {
  flex: 1;
  min-width: 0;
}

.alert-banner__content strong {
  display: block;
  font-size: var(--md-body-md-size);
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
}

.alert-banner__content p {
  font-size: var(--md-body-md-size);
  margin-top: var(--space-1);
  color: var(--md-sys-color-on-surface-variant);
}

.alert-banner__close {
  flex-shrink: 0;
  font-size: 1.125rem;
  color: var(--md-sys-color-on-surface-variant);
  padding: var(--space-1);
  border-radius: var(--md-sys-shape-full);
  transition: color var(--md-motion-very-short), background-color var(--md-motion-very-short);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.alert-banner__close:hover {
  background-color: var(--state-hover-soft);
  color: var(--md-sys-color-on-surface);
}

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


/* ============================================================
   15. TARJETAS DE RESUMEN — M3 Card Variants
   Premium: 16px corners, gradient overlays, subtle borders, glow
   ============================================================ */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

/* ---- Base card styles ---- */
.summary-card {
  border-radius: var(--md-sys-shape-l);
  padding: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  transition: box-shadow var(--md-motion-elevation), transform var(--md-motion-very-short), background-color var(--md-motion-very-short);
  cursor: default;
  border: 1px solid var(--md-sys-color-outline-variant);
}

/* ---- Elevated Card variant (surface-container #333333) ---- */
.m3-card-elevated {
  background-color: var(--md-sys-color-surface-container);
  box-shadow: var(--md-sys-elevation-1);
}

.m3-card-elevated:hover {
  box-shadow: var(--md-sys-elevation-2), var(--glow-1);
  transform: translateY(-3px);
}

/* ---- Filled Card variant (surface-container-highest #4d4d4d) ---- */
.m3-card-filled {
  background-color: var(--md-sys-color-surface-container-highest);
  box-shadow: none;
}

.m3-card-filled:hover {
  box-shadow: var(--md-sys-elevation-1);
  transform: translateY(-2px);
}

/* ---- Outlined Card variant ---- */
.m3-card-outlined {
  background-color: transparent;
  border: 1px solid var(--md-sys-color-outline-variant);
  box-shadow: none;
}

.m3-card-outlined:hover {
  box-shadow: var(--md-sys-elevation-1);
  border-color: var(--md-sys-color-outline);
  transform: translateY(-2px);
}

/* Colored card variants with gradient overlays and glow */
.summary-card--green {
  background: linear-gradient(135deg, var(--md-sys-color-primary-container) 0%, rgba(208, 188, 255, 0.15) 100%);
  border-color: rgba(208, 188, 255, 0.2);
}
.summary-card--green .summary-card__value {
  color: var(--md-sys-color-on-primary-container);
}
.summary-card--green .summary-card__label {
  color: var(--md-sys-color-on-primary-container);
  opacity: 0.8;
}

.summary-card--yellow {
  background: linear-gradient(135deg, var(--md-sys-color-tertiary-container) 0%, rgba(239, 184, 200, 0.15) 100%);
  border-color: rgba(239, 184, 200, 0.2);
}
.summary-card--yellow .summary-card__value {
  color: var(--md-sys-color-on-tertiary-container);
}
.summary-card--yellow .summary-card__label {
  color: var(--md-sys-color-on-tertiary-container);
  opacity: 0.8;
}

.summary-card--red {
  background: linear-gradient(135deg, var(--md-sys-color-error-container) 0%, rgba(242, 184, 181, 0.15) 100%);
  border-color: rgba(242, 184, 181, 0.2);
}
.summary-card--red .summary-card__value {
  color: var(--md-sys-color-on-error-container);
}
.summary-card--red .summary-card__label {
  color: var(--md-sys-color-on-error-container);
  opacity: 0.8;
}

/* Card icon avatar */
.summary-card__icon-wrap {
  /* Inherits from .m3-avatar */
}

.summary-card__icon {
  /* Inherits from .material-symbols-rounded */
}

.summary-card__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.summary-card__value {
  font-size: var(--md-headline-md-size);
  font-weight: 700;
  line-height: 1.2;
  color: var(--md-sys-color-on-surface);
  font-variant-numeric: tabular-nums;
}

.summary-card__label {
  font-size: var(--md-label-md-size);
  color: var(--md-sys-color-on-surface-variant);
  font-weight: var(--md-label-md-weight);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}


/* ============================================================
   16. PRODUCTOS DEL DASHBOARD
   ============================================================ */
.dashboard-products {
  margin-top: var(--space-4);
}

.dashboard-products__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  gap: var(--space-3);
}

.dashboard-products__title {
  font-size: var(--md-title-lg-size);
  font-weight: var(--md-title-lg-weight);
  color: var(--md-sys-color-on-surface);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.dashboard-products__icon {
  color: var(--md-sys-color-primary);
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  filter: drop-shadow(0 0 6px rgba(208, 188, 255, 0.3));
}


/* ============================================================
   17. M3 LIST ITEMS — Product Cards
   Premium: surface-container #333333 with white shadow, subtle border
   ============================================================ */
.product-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Tarjeta de producto — Premium card (surface-container #333333) */
.product-card {
  background-color: var(--md-sys-color-surface-container);
  border-radius: var(--md-sys-shape-l);
  padding: var(--space-4);
  box-shadow: var(--md-sys-elevation-1);
  border: 1px solid var(--md-sys-color-outline-variant);
  cursor: pointer;
  transition: box-shadow var(--md-motion-elevation), transform var(--md-motion-very-short), background-color var(--md-motion-very-short), border-color var(--md-motion-very-short);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  display: block;
}

/* State layer overlay */
.product-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--md-sys-color-on-surface);
  opacity: 0;
  transition: opacity var(--md-motion-very-short);
  pointer-events: none;
  z-index: 1;
}

.product-card:hover {
  box-shadow: var(--md-sys-elevation-2), var(--glow-1);
  transform: translateY(-3px);
  border-color: rgba(208, 188, 255, 0.15);
}

.product-card:hover::after {
  opacity: var(--state-hover-opacity);
}

.product-card:active::after {
  opacity: var(--state-pressed-opacity);
}

.product-card:focus-visible {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

.product-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  position: relative;
  z-index: 2;
}

.product-card__title {
  font-size: var(--md-body-lg-size);
  font-weight: 600;
  line-height: 1.3;
  color: var(--md-sys-color-on-surface);
}

.product-card__badge {
  flex-shrink: 0;
  font-size: var(--md-label-md-size);
  font-weight: var(--md-label-md-weight);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--md-sys-shape-full);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  position: relative;
  z-index: 2;
}

/* M3 Chip-style badges */
.product-card__badge--active {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

.product-card__badge--expiring {
  background-color: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
}

.product-card__badge--expired {
  background-color: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
}

.product-card__badge--used {
  background-color: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface-variant);
}

.product-card__badge--expired-unused {
  background-color: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface-variant);
  opacity: 0.7;
}

.product-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  font-size: var(--md-body-md-size);
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: var(--space-3);
  position: relative;
  z-index: 2;
}

.product-card__meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.product-card__meta-item .material-symbols-rounded {
  font-size: 1rem;
}

.product-card__days {
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
}

/* M3 Linear Progress in card */
.product-card__progress {
  margin-top: var(--space-2);
  position: relative;
  z-index: 2;
}

.progress-bar {
  height: 4px;
  background-color: var(--md-sys-color-surface-container-highest);
  border-radius: var(--md-sys-shape-full);
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  border-radius: var(--md-sys-shape-full);
  transition: width var(--md-motion-standard);
}

.progress-bar__fill--green {
  background-color: var(--md-sys-color-primary);
  box-shadow: 0 0 8px rgba(208, 188, 255, 0.4);
}

.progress-bar__fill--yellow {
  background-color: var(--md-sys-color-tertiary);
  box-shadow: 0 0 8px rgba(239, 184, 200, 0.4);
}

.progress-bar__fill--red {
  background-color: var(--md-sys-color-error);
  box-shadow: 0 0 8px rgba(242, 184, 181, 0.4);
}

.progress-bar__fill--used {
  background-color: var(--md-sys-color-on-surface-variant);
  opacity: 0.4;
}

.progress-bar__fill--expired-unused {
  background-color: var(--md-sys-color-on-surface-variant);
  opacity: 0.4;
}


/* ============================================================
   18. ESTADO VACÍO (Empty State)
   ============================================================ */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-4);
  animation: screen-enter var(--md-motion-standard) both;
}

.empty-state__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.empty-state__icon {
  font-size: 3.5rem;
  color: var(--md-sys-color-on-surface-variant);
  opacity: 0.5;
  font-variation-settings: 'FILL' 1, 'wght' 300, 'GRAD' 0, 'opsz' 48;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.empty-state__title {
  font-size: var(--md-title-lg-size);
  font-weight: var(--md-title-lg-weight);
  margin-bottom: var(--space-2);
  color: var(--md-sys-color-on-surface);
}

.empty-state__text {
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: var(--space-6);
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
  font-size: var(--md-body-md-size);
}


/* ============================================================
   19. PÁGINA DE PRODUCTOS
   ============================================================ */
.products-page__title {
  font-size: var(--md-title-lg-size);
  font-weight: var(--md-title-lg-weight);
  margin-bottom: var(--space-4);
  color: var(--md-sys-color-on-surface);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.products-page__title .material-symbols-rounded {
  color: var(--md-sys-color-primary);
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  filter: drop-shadow(0 0 6px rgba(208, 188, 255, 0.3));
}


/* ============================================================
   20. BARRA DE BÚSQUEDA — Premium M3 Search Bar
   surface-container #333333, backdrop blur, subtle border, glow on focus
   ============================================================ */
.search-bar {
  margin-bottom: var(--space-4);
}

.search-bar__inner {
  display: flex;
  align-items: center;
  background-color: var(--md-sys-color-surface-container);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-xl);
  padding: 0 var(--space-3);
  transition: border-color var(--md-motion-very-short), box-shadow var(--md-motion-very-short), background-color var(--md-motion-very-short);
  height: 56px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.search-bar__inner:hover {
  background-color: var(--md-sys-color-surface-container-high);
  border-color: var(--md-sys-color-outline);
}

.search-bar__inner:focus-within {
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 1px var(--md-sys-color-primary), var(--glow-2);
  background-color: var(--md-sys-color-surface-container-high);
}

.search-bar__icon {
  color: var(--md-sys-color-on-surface-variant);
  flex-shrink: 0;
  font-size: 1.25rem;
  transition: color var(--md-motion-very-short), transform var(--md-motion-short);
}

.search-bar__inner:focus-within .search-bar__icon {
  color: var(--md-sys-color-primary);
  transform: scale(1.1);
}

.search-bar__input {
  flex: 1;
  border: none;
  background: none;
  padding: var(--space-3) var(--space-2);
  outline: none;
  font-size: var(--md-body-lg-size);
  color: var(--md-sys-color-on-surface);
  min-width: 0;
  font-family: var(--md-font-family);
}

.search-bar__input::placeholder {
  color: var(--md-sys-color-on-surface-variant);
  opacity: 0.7;
  transition: opacity var(--md-motion-very-short);
}

.search-bar__inner:focus-within .search-bar__input::placeholder {
  opacity: 0.4;
}

.search-bar__clear {
  flex-shrink: 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 1.125rem;
  padding: var(--space-1);
  border-radius: var(--md-sys-shape-full);
  transition: color var(--md-motion-very-short), background-color var(--md-motion-very-short), transform var(--md-motion-very-short);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-bar__clear:hover {
  background-color: var(--state-hover-soft);
  color: var(--md-sys-color-on-surface);
}

.search-bar__clear:active {
  transform: scale(0.9);
}


/* ============================================================
   21. M3 CHIPS — Filter Chips & Assist Chips
   ============================================================ */
.filter-group {
  margin-bottom: var(--space-4);
}

.filter-group__label {
  display: block;
  font-size: var(--md-label-lg-size);
  font-weight: var(--md-label-lg-weight);
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: var(--space-2);
}

.filter-group__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ---- M3 Filter Chip ---- */
.m3-chip--filter {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0 var(--space-3);
  height: 32px;
  font-size: var(--md-label-lg-size);
  font-weight: var(--md-label-lg-weight);
  font-family: var(--md-font-family);
  color: var(--md-sys-color-on-surface-variant);
  background-color: transparent;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-s);
  transition: all var(--md-motion-very-short);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.m3-chip--filter .material-symbols-rounded {
  font-size: 1rem;
}

.m3-chip--filter:hover {
  background-color: var(--state-hover-soft);
  border-color: var(--md-sys-color-on-surface-variant);
  color: var(--md-sys-color-on-surface);
}

/* Selected filter chip — filled with animated transition */
.filter-btn--active.m3-chip--filter {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  border-color: transparent;
  box-shadow: var(--glow-secondary-1);
  transition: all var(--md-motion-standard);
}

.filter-btn--active.m3-chip--filter:hover {
  box-shadow: var(--md-sys-elevation-1), var(--glow-secondary-1);
}

/* Colored filter chips */
.filter-btn--green {
  color: var(--md-sys-color-primary);
  border-color: var(--md-sys-color-primary);
}

.filter-btn--green:hover,
.filter-btn--green.filter-btn--active {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  border-color: transparent;
}

.filter-btn--yellow {
  color: var(--md-sys-color-tertiary);
  border-color: var(--md-sys-color-tertiary);
}

.filter-btn--yellow:hover,
.filter-btn--yellow.filter-btn--active {
  background-color: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
  border-color: transparent;
}

.filter-btn--red {
  color: var(--md-sys-color-error);
  border-color: var(--md-sys-color-error);
}

.filter-btn--red:hover,
.filter-btn--red.filter-btn--active {
  background-color: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
  border-color: transparent;
}

/* ---- M3 Assist Chip ---- */
.m3-chip--assist {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0 var(--space-3);
  height: 32px;
  font-size: var(--md-label-lg-size);
  font-weight: var(--md-label-lg-weight);
  font-family: var(--md-font-family);
  color: var(--md-sys-color-on-surface-variant);
  background-color: var(--md-sys-color-surface-container);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-s);
  transition: all var(--md-motion-very-short);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.m3-chip--assist .material-symbols-rounded {
  font-size: 1rem;
}

.m3-chip--assist:hover {
  background-color: var(--md-sys-color-surface-container-high);
  box-shadow: var(--md-sys-elevation-1);
  color: var(--md-sys-color-on-surface);
}

/* Selected assist chip */
.m3-chip--assist.filter-btn--active {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  border-color: transparent;
  box-shadow: var(--glow-secondary-1);
  transition: all var(--md-motion-standard);
}

.m3-chip--assist.filter-btn--active:hover {
  box-shadow: var(--md-sys-elevation-1), var(--glow-secondary-1);
}


/* ============================================================
   22. PÁGINA DE FORMULARIO
   ============================================================ */
.form-page {
  max-width: 640px;
  margin: 0 auto;
}

.form-page__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.form-page__title {
  font-size: var(--md-title-lg-size);
  font-weight: var(--md-title-lg-weight);
  color: var(--md-sys-color-on-surface);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.form-page__title .material-symbols-rounded {
  color: var(--md-sys-color-primary);
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  filter: drop-shadow(0 0 6px rgba(208, 188, 255, 0.3));
}


/* ============================================================
   23. FORMULARIO DE PRODUCTO — M3 Text Fields
   surface-container #333333 for filled variant
   ============================================================ */
.product-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-group--calculated {
  background-color: var(--md-sys-color-surface-container);
  border: 1px dashed var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-l);
  padding: var(--space-4);
  transition: border-color var(--md-motion-very-short), background-color var(--md-motion-very-short);
}

.form-group--calculated:hover {
  border-color: var(--md-sys-color-primary);
  background-color: var(--md-sys-color-surface-container-high);
}

/* ---- M3 Outlined Text Field ---- */
.m3-text-field--outlined {
  position: relative;
}

.m3-text-field__input-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}

/* Leading icon */
.m3-text-field__leading-icon {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.125rem;
  color: var(--md-sys-color-on-surface-variant);
  z-index: 2;
  pointer-events: none;
  transition: color var(--md-motion-very-short), transform var(--md-motion-short);
}

/* Leading icon on focus — subtle bounce */
.m3-text-field__input-wrap:has(.m3-text-field__leading-icon) .form-input:focus ~ .m3-text-field__leading-icon,
.m3-text-field__input-wrap:has(.m3-text-field__leading-icon) .form-select:focus ~ .m3-text-field__leading-icon,
.m3-text-field__input-wrap:has(.m3-text-field__leading-icon) .form-textarea:focus ~ .m3-text-field__leading-icon {
  color: var(--md-sys-color-primary);
  transform: translateY(-50%) scale(1.15);
}

/* Trailing icon */
.m3-text-field__trailing-icon {
  position: absolute;
  right: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.125rem;
  color: var(--md-sys-color-on-surface-variant);
  z-index: 2;
  pointer-events: none;
}

/* Floating label */
.m3-text-field__label {
  position: absolute;
  left: var(--space-12);
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--md-body-lg-size);
  color: var(--md-sys-color-on-surface-variant);
  pointer-events: none;
  transition: all var(--md-motion-very-short);
  z-index: 3;
  background-color: transparent;
  padding: 0 var(--space-1);
}

/* Input with leading icon — adjust label position */
.m3-text-field__input-wrap:has(.m3-text-field__leading-icon) .m3-text-field__label {
  left: var(--space-10);
}

/* Floating label — focused or filled state */
.m3-text-field__input:focus ~ .m3-text-field__label,
.m3-text-field__input:not(:placeholder-shown) ~ .m3-text-field__label,
.m3-text-field__input:not(:placeholder-shown):not(:focus) ~ .m3-text-field__label {
  top: 0;
  transform: translateY(-50%);
  font-size: var(--md-label-sm-size);
  color: var(--md-sys-color-primary);
  background-color: var(--md-sys-color-background);
}

/* Input with leading icon — focused label background */
.m3-text-field__input-wrap:has(.m3-text-field__leading-icon) .m3-text-field__input:focus ~ .m3-text-field__label,
.m3-text-field__input-wrap:has(.m3-text-field__leading-icon) .m3-text-field__input:not(:placeholder-shown) ~ .m3-text-field__label {
  background-color: var(--md-sys-color-background);
  border-radius: var(--md-sys-shape-xs);
}

/* Input styling */
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-6) var(--space-4) var(--space-2);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-s);
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font-size: var(--md-body-lg-size);
  font-family: var(--md-font-family);
  transition: border-color var(--md-motion-very-short), box-shadow var(--md-motion-very-short), background-color var(--md-motion-very-short);
  appearance: none;
  -webkit-appearance: none;
}

/* Input with leading icon */
.m3-text-field__input-wrap:has(.m3-text-field__leading-icon) .form-input,
.m3-text-field__input-wrap:has(.m3-text-field__leading-icon) .form-select,
.m3-text-field__input-wrap:has(.m3-text-field__leading-icon) .form-textarea {
  padding-left: var(--space-10);
}

/* Input with trailing icon */
.m3-text-field__input-wrap:has(.m3-text-field__trailing-icon) .form-input,
.m3-text-field__input-wrap:has(.m3-text-field__trailing-icon) .form-select,
.m3-text-field__input-wrap:has(.m3-text-field__trailing-icon) .form-textarea {
  padding-right: var(--space-10);
}

/* Input with both icons */
.m3-text-field__input-wrap:has(.m3-text-field__leading-icon):has(.m3-text-field__trailing-icon) .form-input,
.m3-text-field__input-wrap:has(.m3-text-field__leading-icon):has(.m3-text-field__trailing-icon) .form-select,
.m3-text-field__input-wrap:has(.m3-text-field__leading-icon):has(.m3-text-field__trailing-icon) .form-textarea {
  padding-left: var(--space-10);
}

/* Focus state — M3 outlined text field with glow */
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--md-sys-color-primary);
  border-width: 2px;
  padding: calc(var(--space-6) - 1px) calc(var(--space-4) - 1px) calc(var(--space-2) - 1px);
  box-shadow: 0 0 0 1px var(--md-sys-color-primary), var(--glow-1);
  background-color: var(--md-sys-color-surface-container-high);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: transparent;
}

/* ---- M3 Filled Text Field variant (surface-container #333333) ---- */
.m3-text-field--filled .m3-text-field__input-wrap {
  background-color: var(--md-sys-color-surface-container);
  border-radius: var(--md-sys-shape-xs) var(--md-sys-shape-xs) var(--md-sys-shape-s) var(--md-sys-shape-s);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  transition: background-color var(--md-motion-very-short), border-color var(--md-motion-very-short);
}

.m3-text-field--filled .m3-text-field__input-wrap:hover {
  background-color: var(--md-sys-color-surface-container-high);
}

.m3-text-field--filled .m3-text-field__input-wrap:focus-within {
  border-bottom-color: var(--md-sys-color-primary);
  border-bottom-width: 2px;
}

/* Filled text field — label sits above input */
.m3-text-field--filled .m3-text-field__label {
  top: calc(var(--space-1) * -1);
  left: var(--space-4);
  transform: none;
  font-size: var(--md-label-sm-size);
  color: var(--md-sys-color-on-surface-variant);
  background-color: var(--md-sys-color-surface-container);
  padding: 0 var(--space-1);
  pointer-events: none;
}

.m3-text-field--filled .m3-text-field__input-wrap:focus-within .m3-text-field__label {
  color: var(--md-sys-color-primary);
}

/* Filled text field — input padding adjusted */
.m3-text-field--filled .form-input,
.m3-text-field--filled .form-select,
.m3-text-field--filled .form-textarea {
  border: none;
  background: transparent;
  padding-top: var(--space-3);
  border-radius: 0;
}

.m3-text-field--filled .form-input:focus,
.m3-text-field--filled .form-select:focus,
.m3-text-field--filled .form-textarea:focus {
  border: none;
  box-shadow: none;
}

/* Filled text field — leading icon */
.m3-text-field--filled .m3-text-field__leading-icon {
  top: auto;
  transform: none;
}

/* Filled text field — readonly state */
.m3-text-field--filled .form-input--readonly {
  background: transparent;
  border: none;
}

/* Leading icon color on focus */
.m3-text-field__input-wrap .form-input:focus ~ .m3-text-field__leading-icon,
.m3-text-field__input-wrap .form-select:focus ~ .m3-text-field__leading-icon,
.m3-text-field__input-wrap .form-textarea:focus ~ .m3-text-field__leading-icon {
  color: var(--md-sys-color-primary);
}

/* Readonly input */
.form-input--readonly {
  background-color: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface-variant);
  cursor: default;
  border-color: var(--md-sys-color-surface-variant);
}

/* Number input */
.form-input--number {
  -moz-appearance: textfield;
}

.form-input--number::-webkit-outer-spin-button,
.form-input--number::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Select custom */
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23aeb1be' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 6l3.5 4 3.5-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-10);
}

/* Textarea */
.form-textarea {
  resize: vertical;
  min-height: 100px;
}

/* Help text */
.form-help {
  font-size: var(--md-body-sm-size);
  color: var(--md-sys-color-on-surface-variant);
  line-height: var(--md-body-sm-line-height);
}

/* Error message — animated slide-in */
.form-error {
  font-size: var(--md-body-sm-size);
  color: var(--md-sys-color-error);
  font-weight: 500;
  line-height: var(--md-body-sm-line-height);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  animation: error-slide-in var(--md-motion-short) both;
}

@keyframes error-slide-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Input error state */
.form-input--error,
.form-select--error,
.form-textarea--error {
  border-color: var(--md-sys-color-error);
  background-color: rgba(242, 184, 181, 0.04);
}

.form-input--error:focus,
.form-select--error:focus,
.form-textarea--error:focus {
  box-shadow: 0 0 0 1px var(--md-sys-color-error), var(--glow-error-1);
  border-color: var(--md-sys-color-error);
}

/* Form label (non-floating) */
.form-label {
  font-size: var(--md-label-lg-size);
  font-weight: var(--md-label-lg-weight);
  color: var(--md-sys-color-on-surface-variant);
}

.form-label__required {
  color: var(--md-sys-color-error);
  margin-left: 2px;
}


/* ============================================================
   24. UPLOAD DE ARCHIVOS — M3 File Upload
   ============================================================ */
.file-upload {
  position: relative;
}

.file-upload__input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.file-upload__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background-color: var(--md-sys-color-surface-container);
  border: 2px dashed var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-l);
  cursor: pointer;
  transition: border-color var(--md-motion-very-short), background-color var(--md-motion-very-short), transform var(--md-motion-very-short);
  font-size: var(--md-label-lg-size);
  font-weight: var(--md-label-lg-weight);
  color: var(--md-sys-color-on-surface-variant);
  font-family: var(--md-font-family);
}

.file-upload__label:hover,
.file-upload__label:focus-visible {
  border-color: var(--md-sys-color-primary);
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  box-shadow: var(--glow-1);
  transform: translateY(-1px);
}

.file-upload__label:active {
  transform: translateY(0);
}

.file-upload__label:focus-visible {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

.file-upload__icon {
  font-size: 1.125rem;
}

/* Photo preview grid */
.photo-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.photo-preview__item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--md-sys-shape-m);
  overflow: hidden;
  border: 1px solid var(--md-sys-color-surface-variant);
  transition: transform var(--md-motion-very-short), box-shadow var(--md-motion-elevation);
  animation: photo-enter var(--md-motion-short) both;
}

@keyframes photo-enter {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.photo-preview__item:hover {
  transform: scale(1.05);
  box-shadow: var(--md-sys-elevation-2);
}

.photo-preview__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview__remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 24px;
  height: 24px;
  border-radius: var(--md-sys-shape-full);
  background-color: rgba(0, 0, 0, 0.6);
  color: var(--md-sys-color-on-surface);
  font-size: var(--md-body-sm-size);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: background-color var(--md-motion-very-short), transform var(--md-motion-very-short);
}

.photo-preview__remove:hover {
  background-color: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}


/* ============================================================
   25. ACCIONES DEL FORMULARIO
   ============================================================ */
.form-actions {
  display: flex;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--md-sys-color-outline-variant);
}


/* ============================================================
   26. BOTONES — M3 Button Variants
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0 var(--space-6);
  height: 40px;
  font-size: var(--md-label-lg-size);
  font-weight: var(--md-label-lg-weight);
  font-family: var(--md-font-family);
  border-radius: var(--md-sys-shape-full);
  transition: all var(--md-motion-very-short);
  white-space: nowrap;
  line-height: 1;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
}

.btn .material-symbols-rounded {
  font-size: 1.125rem;
}

.btn:focus-visible {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

/* M3 Filled Button (Primary) */
.btn--primary {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  box-shadow: none;
}

.btn--primary:hover {
  box-shadow: var(--md-sys-elevation-1), var(--glow-2);
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn--primary:active {
  box-shadow: var(--md-sys-elevation-2);
  filter: brightness(0.95);
  transform: translateY(0);
}

/* M3 Text Button (Ghost) */
.btn--ghost {
  background-color: transparent;
  color: var(--md-sys-color-primary);
  padding: 0 var(--space-3);
}

.btn--ghost:hover {
  background-color: var(--state-hover-soft);
}

/* M3 Outlined Button */
.btn--outline {
  background-color: transparent;
  color: var(--md-sys-color-primary);
  border: 1px solid var(--md-sys-color-outline);
}

.btn--outline:hover {
  background-color: var(--state-hover-soft);
  border-color: var(--md-sys-color-primary);
}

/* M3 Filled Tone Button (Danger) */
.btn--danger {
  background-color: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
}

.btn--danger:hover {
  box-shadow: var(--md-sys-elevation-1), var(--glow-error-1);
  filter: brightness(1.06);
  transform: translateY(-1px);
}

/* Back button */
.btn--back {
  padding-left: var(--space-2);
}

.btn--back:hover {
  color: var(--md-sys-color-on-surface);
}

/* Small button */
.btn--sm {
  height: 32px;
  padding: 0 var(--space-4);
  font-size: var(--md-label-md-size);
}

.btn--sm .material-symbols-rounded {
  font-size: 1rem;
}

/* Full-width on mobile */
.btn--full-mobile {
  flex: 1;
}


/* ============================================================
   27. M3 FAB — Floating Action Button
   INVERSE SURFACE: #f5f5f5 bg with #262626 text, 48px corners, glow
   ============================================================ */
.m3-fab {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--space-6));
  right: var(--space-4);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Inverse surface: light on dark */
  background-color: var(--md-sys-color-inverse-surface);
  color: var(--md-sys-color-on-inverse-surface);
  border-radius: var(--md-sys-shape-xxl);
  box-shadow: var(--md-sys-elevation-3), var(--glow-2);
  transition: box-shadow var(--md-motion-elevation), transform var(--md-motion-very-short), background-color var(--md-motion-very-short);
  font-family: var(--md-font-family);
  cursor: pointer;
  border: none;
  outline: none;
  animation: fab-enter var(--md-motion-default-spatial) both;
}

@keyframes fab-enter {
  from {
    opacity: 0;
    transform: scale(0.5) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.m3-fab:hover {
  box-shadow: var(--md-sys-elevation-6), var(--glow-4);
  transform: scale(1.06);
}

.m3-fab:active {
  box-shadow: var(--md-sys-elevation-2);
  transform: scale(0.96);
}

.m3-fab:focus-visible {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

/* Extended FAB — 48px corners */
.m3-fab--extended {
  height: 56px;
  padding: 0 var(--space-4) 0 var(--space-3);
  gap: var(--space-2);
  border-radius: var(--md-sys-shape-xxl);
}

.m3-fab__icon {
  font-size: 1.25rem;
}

.m3-fab__label {
  font-size: var(--md-label-lg-size);
  font-weight: var(--md-label-lg-weight);
  letter-spacing: 0.05em;
}

/* Standard FAB (no label) */
.m3-fab--standard {
  width: 56px;
  height: 56px;
  border-radius: var(--md-sys-shape-xxl);
}

/* FAB pulse animation for attention */
.m3-fab.pulse {
  animation: fab-pulse 2s ease-in-out infinite, fab-enter var(--md-motion-default-spatial) both;
}

@keyframes fab-pulse {
  0%, 100% { box-shadow: var(--md-sys-elevation-3), var(--glow-2); }
  50% { box-shadow: var(--md-sys-elevation-5), var(--glow-4); }
}


/* ============================================================
   28. PÁGINA DE DETALLE
   ============================================================ */
.detail-page {
  max-width: 640px;
  margin: 0 auto;
}

.detail-page__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  gap: var(--space-3);
}

.detail-page__actions {
  display: flex;
  gap: var(--space-2);
}

/* Estado de garantía en detalle */
.detail-status {
  padding: var(--space-4);
  border-radius: var(--md-sys-shape-l);
  margin-bottom: var(--space-6);
  text-align: center;
  font-weight: 600;
  font-size: var(--md-title-md-size);
  animation: slideIn var(--md-motion-standard);
  border: 1px solid var(--md-sys-color-outline-variant);
}

.detail-status--active {
  background: linear-gradient(135deg, var(--md-sys-color-primary-container) 0%, rgba(208, 188, 255, 0.15) 100%);
  color: var(--md-sys-color-on-primary-container);
  border-color: rgba(208, 188, 255, 0.2);
  box-shadow: var(--glow-1);
}

.detail-status--expiring {
  background: linear-gradient(135deg, var(--md-sys-color-tertiary-container) 0%, rgba(239, 184, 200, 0.15) 100%);
  color: var(--md-sys-color-on-tertiary-container);
  border-color: rgba(239, 184, 200, 0.2);
  box-shadow: var(--glow-tertiary-1);
}

.detail-status--expired {
  background: linear-gradient(135deg, var(--md-sys-color-error-container) 0%, rgba(242, 184, 181, 0.15) 100%);
  color: var(--md-sys-color-on-error-container);
  border-color: rgba(242, 184, 181, 0.2);
  box-shadow: var(--glow-error-1);
}

.detail-status--used {
  background-color: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface-variant);
  border-color: var(--md-sys-color-surface-variant);
}

.detail-status--expired-unused {
  background-color: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface-variant);
  border-color: var(--md-sys-color-surface-variant);
  opacity: 0.7;
}

/* Información del producto — Premium M3 Elevated Card (surface-container #333333) */
.detail-info {
  background-color: var(--md-sys-color-surface-container);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-l);
  padding: var(--space-6);
  box-shadow: var(--md-sys-elevation-1);
  transition: box-shadow var(--md-motion-elevation);
}

.detail-info__header {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.detail-info__name {
  font-size: var(--md-headline-lg-size);
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--md-sys-color-on-surface);
}

.detail-info__category {
  display: inline-block;
  font-size: var(--md-label-lg-size);
  font-weight: var(--md-label-lg-weight);
  color: var(--md-sys-color-on-primary-container);
  background-color: var(--md-sys-color-primary-container);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--md-sys-shape-full);
  box-shadow: var(--glow-1);
}

/* Grid de detalles */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.detail-item__label {
  font-size: var(--md-label-md-size);
  font-weight: var(--md-label-md-weight);
  color: var(--md-sys-color-on-surface-variant);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.detail-item__icon {
  font-size: 1rem;
  color: var(--md-sys-color-primary);
}

.detail-item__value {
  font-size: var(--md-body-lg-size);
  color: var(--md-sys-color-on-surface);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* M3 Linear Progress */
.detail-progress {
  margin-bottom: var(--space-6);
}

.detail-progress__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.detail-progress__label {
  font-size: var(--md-label-lg-size);
  font-weight: var(--md-label-lg-weight);
  color: var(--md-sys-color-on-surface-variant);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.detail-progress__label .material-symbols-rounded {
  font-size: 1rem;
  color: var(--md-sys-color-primary);
}

.detail-progress__percentage {
  font-size: var(--md-label-lg-size);
  font-weight: var(--md-label-lg-weight);
  color: var(--md-sys-color-on-surface);
  font-variant-numeric: tabular-nums;
}

.detail-progress__bar {
  height: 4px;
  background-color: var(--md-sys-color-surface-container-highest);
  border-radius: var(--md-sys-shape-full);
  overflow: hidden;
}

.detail-progress__fill {
  height: 100%;
  border-radius: var(--md-sys-shape-full);
  transition: width var(--md-motion-standard);
  position: relative;
}

/* Progress fill shimmer effect */
.detail-progress__fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.detail-progress__fill--green {
  background-color: var(--md-sys-color-primary);
  box-shadow: 0 0 8px rgba(208, 188, 255, 0.4);
}

.detail-progress__fill--yellow {
  background-color: var(--md-sys-color-tertiary);
  box-shadow: 0 0 8px rgba(239, 184, 200, 0.4);
}

.detail-progress__fill--red {
  background-color: var(--md-sys-color-error);
  box-shadow: 0 0 8px rgba(242, 184, 181, 0.4);
}

.detail-progress__fill--used {
  background-color: var(--md-sys-color-on-surface-variant);
  opacity: 0.4;
}

.detail-progress__fill--expired-unused {
  background-color: var(--md-sys-color-on-surface-variant);
  opacity: 0.4;
}

/* Detail days counter — used by app.js for warranty days display */
.detail-days {
  font-size: var(--md-headline-md-size);
  font-weight: var(--md-headline-md-weight);
  line-height: var(--md-headline-md-line-height);
  color: var(--color-text);
  transition: color var(--md-motion-very-short);
}

.detail-days--danger {
  color: var(--color-danger);
}

.detail-days--warning {
  color: var(--color-warning);
}

.detail-days--active {
  color: var(--md-sys-color-primary);
}

/* Warranty state selector */
.detail-warranty-state {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.detail-warranty-state__title {
  font-size: var(--md-label-lg-size);
  font-weight: var(--md-label-lg-weight);
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.detail-warranty-state__title .material-symbols-rounded {
  font-size: 1rem;
  color: var(--md-sys-color-primary);
}

.form-select--warranty {
  width: 100%;
}

/* Product notes */
.detail-notes {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.detail-notes__title {
  font-size: var(--md-label-lg-size);
  font-weight: var(--md-label-lg-weight);
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.detail-notes__title .material-symbols-rounded {
  font-size: 1rem;
  color: var(--md-sys-color-primary);
}

.detail-notes__text {
  font-size: var(--md-body-lg-size);
  color: var(--md-sys-color-on-surface);
  line-height: 1.6;
  white-space: pre-wrap;
  background-color: var(--md-sys-color-surface-container-high);
  padding: var(--space-4);
  border-radius: var(--md-sys-shape-m);
  border: 1px solid var(--md-sys-color-outline-variant);
}

/* Photo gallery */
.detail-gallery {
  margin-bottom: var(--space-4);
}

.detail-gallery__title {
  font-size: var(--md-label-lg-size);
  font-weight: var(--md-label-lg-weight);
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.detail-gallery__title .material-symbols-rounded {
  font-size: 1rem;
  color: var(--md-sys-color-primary);
}

.detail-gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-3);
}

.detail-gallery__item {
  aspect-ratio: 1;
  border-radius: var(--md-sys-shape-m);
  overflow: hidden;
  border: 1px solid var(--md-sys-color-outline-variant);
  cursor: pointer;
  transition: transform var(--md-motion-very-short), box-shadow var(--md-motion-elevation);
}

.detail-gallery__item:hover {
  transform: scale(1.05);
  box-shadow: var(--md-sys-elevation-2);
}

.detail-gallery__item:focus-visible {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

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


/* ============================================================
   29. M3 SNACKBAR
   surface-container-highest #4d4d4d, white shadow
   ============================================================ */
.m3-snackbar {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--space-4));
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  z-index: 500;
  background-color: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface);
  border-radius: var(--md-sys-shape-xs);
  box-shadow: var(--md-sys-elevation-3);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  max-width: 500px;
  width: calc(100% - var(--space-8));
  font-size: var(--md-body-md-size);
  line-height: var(--md-body-md-line-height);
  animation: snackbar-enter var(--md-motion-standard) forwards;
  transition: transform var(--md-motion-standard), opacity var(--md-motion-standard);
  border: 1px solid var(--md-sys-color-outline-variant);
}

.m3-snackbar[hidden] {
  display: none !important;
}

.m3-snackbar--exit {
  animation: snackbar-exit var(--md-motion-decelerate) forwards;
}

@keyframes snackbar-enter {
  from {
    transform: translateX(-50%) translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

@keyframes snackbar-exit {
  from {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  to {
    transform: translateX(-50%) translateY(100%);
    opacity: 0;
  }
}

.m3-snackbar__content {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
  min-width: 0;
}

.m3-snackbar__icon {
  font-size: 1rem;
  flex-shrink: 0;
  color: var(--md-sys-color-on-surface-variant);
}

.m3-snackbar__message {
  flex: 1;
  min-width: 0;
}

.m3-snackbar__action {
  color: var(--md-sys-color-primary);
  font-weight: var(--md-label-lg-weight);
  font-size: var(--md-label-lg-size);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--md-sys-shape-xs);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background-color var(--md-motion-very-short);
}

.m3-snackbar__action:hover {
  background-color: var(--state-hover-soft);
}


/* ============================================================
   30. M3 DIALOG — Confirmation Modal
   28px corners, surface-container-high #404040, backdrop blur, white shadow
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: dialog-overlay-enter var(--md-motion-standard) both;
}

@keyframes dialog-overlay-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: overlay-fade var(--md-motion-standard) both;
}

@keyframes overlay-fade {
  from { opacity: 0; }
  to { opacity: 0.6; }
}

.modal__content {
  position: relative;
  /* Dialog surface: surface-container-high #404040 */
  background-color: var(--md-sys-color-surface-container-high);
  border-radius: var(--md-sys-shape-xl);
  box-shadow: var(--md-sys-elevation-8);
  max-width: 420px;
  width: 100%;
  animation: dialog-content-enter var(--md-motion-standard) both;
  overflow: hidden;
  border: 1px solid var(--md-sys-color-outline-variant);
}

@keyframes dialog-content-enter {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6) var(--space-3);
}

.modal__title {
  font-size: var(--md-headline-md-size);
  font-weight: 400;
  color: var(--md-sys-color-on-surface);
}

.modal__close {
  font-size: 1.25rem;
  color: var(--md-sys-color-on-surface-variant);
  padding: var(--space-1);
  border-radius: var(--md-sys-shape-full);
  transition: color var(--md-motion-very-short), background-color var(--md-motion-very-short);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__close:hover {
  background-color: var(--state-hover-soft);
  color: var(--md-sys-color-on-surface);
}

.modal__body {
  padding: 0 var(--space-6) var(--space-6);
}

.modal__body p {
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-body-md-size);
  line-height: var(--md-body-md-line-height);
}

.modal__product-name {
  margin-top: var(--space-3) !important;
  font-weight: 600;
  color: var(--md-sys-color-on-surface) !important;
  font-size: var(--md-body-lg-size) !important;
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-6) var(--space-5);
}

.modal[hidden] {
  display: none !important;
}


/* ============================================================
   31. VISOR DE IMÁGENES (Lightbox) — M3 Fullscreen Dialog
   ============================================================ */
.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 600;
  background-color: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: fadeIn var(--md-motion-standard);
}

.image-viewer__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  font-size: 1.5rem;
  color: var(--md-sys-color-on-surface);
  padding: var(--space-2);
  border-radius: var(--md-sys-shape-full);
  transition: background-color var(--md-motion-very-short);
  z-index: 1;
  width: var(--touch-target);
  height: var(--touch-target);
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-viewer__close:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.image-viewer__img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--md-sys-shape-m);
  animation: dialog-content-enter var(--md-motion-standard) both;
}

.image-viewer[hidden] {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}


/* ============================================================
   32. M3 CIRCULAR PROGRESS (Loading spinner)
   ============================================================ */
.m3-circular-progress {
  width: 48px;
  height: 48px;
  border: 3px solid var(--md-sys-color-surface-variant);
  border-top-color: var(--md-sys-color-primary);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.m3-circular-progress--sm {
  width: 24px;
  height: 24px;
  border-width: 2px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ============================================================
   33. SKELETON LOADING STATES (new for UI/UX overhaul)
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg,
    var(--skeleton-base) 25%,
    var(--skeleton-shine) 50%,
    var(--skeleton-base) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--md-sys-shape-s);
}

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

.skeleton-card {
  border-radius: var(--md-sys-shape-l);
  padding: var(--space-4);
  background: var(--md-sys-color-surface-container);
  border: 1px solid var(--md-sys-color-outline-variant);
}

.skeleton-card__header {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.skeleton-card__title {
  height: 20px;
  width: 60%;
}

.skeleton-card__badge {
  height: 20px;
  width: 80px;
  border-radius: var(--md-sys-shape-full);
}

.skeleton-card__meta {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.skeleton-card__meta-item {
  height: 16px;
  width: 100px;
  border-radius: var(--md-sys-shape-xs);
}

.skeleton-card__progress {
  height: 4px;
  width: 100%;
  border-radius: var(--md-sys-shape-full);
}

.skeleton-summary {
  border-radius: var(--md-sys-shape-l);
  padding: var(--space-4);
  background: var(--md-sys-color-surface-container);
  border: 1px solid var(--md-sys-color-outline-variant);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.skeleton-summary__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--md-sys-shape-full);
}

.skeleton-summary__text {
  flex: 1;
}

.skeleton-summary__value {
  height: 28px;
  width: 60px;
  margin-bottom: var(--space-1);
}

.skeleton-summary__label {
  height: 14px;
  width: 100px;
}


/* ============================================================
   34. RESPONSIVE — TABLET (≥ 640px)
   ============================================================ */
@media (min-width: 640px) {
  .summary-cards {
    grid-template-columns: repeat(4, 1fr);
  }

  .detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-actions {
    justify-content: flex-end;
  }

  .btn--full-mobile {
    flex: unset;
  }

  .m3-fab {
    bottom: calc(var(--nav-height) + var(--space-8));
    right: var(--space-8);
  }

  .m3-snackbar {
    bottom: calc(var(--nav-height) + var(--space-6));
  }
}


/* ============================================================
   35. RESPONSIVE — ESCRITORIO (≥ 1024px)
   ============================================================ */
@media (min-width: 1024px) {
  :root {
    --nav-height: 0px;
  }

  /* Navigation bar — top horizontal */
  .main-nav {
    position: sticky;
    top: var(--header-height);
    bottom: auto;
    left: auto;
    right: auto;
    border-top: none;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    box-shadow: none;
    background-color: var(--md-sys-color-surface-container-low);
    z-index: 99;
    padding-bottom: 0;
  }

  .main-nav__list {
    max-width: 960px;
    justify-content: flex-start;
    padding: var(--space-2) var(--space-4);
    gap: var(--space-1);
  }

  .main-nav__link {
    flex-direction: row;
    padding: var(--space-2) var(--space-4);
  }

  .main-nav__label {
    font-size: var(--md-label-lg-size);
  }

  .main-nav__link--active::before {
    inset: var(--space-1) 8px;
  }

  /* Hide hamburger on desktop */
  .app-header__menu-toggle {
    display: none;
  }

  /* Main content */
  .app-main {
    padding: var(--space-6);
    padding-bottom: var(--space-8);
  }

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

  .detail-gallery__grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  /* FAB position on desktop */
  .m3-fab {
    bottom: var(--space-8);
    right: var(--space-8);
  }

  .m3-snackbar {
    bottom: var(--space-6);
  }
}


/* ============================================================
   36. RESPONSIVE — PANTALLAS GRANDES (≥ 1280px)
   ============================================================ */
@media (min-width: 1280px) {
  .app-main {
    max-width: 1100px;
  }

  .form-page {
    max-width: 720px;
  }

  .detail-page {
    max-width: 720px;
  }
}


/* ============================================================
   37. ANIMACIONES ADICIONALES
   ============================================================ */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Urgent alert pulse */
.alert-banner--danger {
  animation: slideIn var(--md-motion-standard), pulse 2s ease-in-out infinite;
}


/* ============================================================
   38. ESTADOS DE FOCUS VISIBLE
   ============================================================ */
*:focus-visible {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}


/* ============================================================
   39. PRINT STYLES
   ============================================================ */
@media print {
  .app-header,
  .main-nav,
  .form-actions,
  .detail-page__actions,
  .btn--back,
  .detail-warranty-state,
  .storage-warning,
  .m3-fab,
  .m3-snackbar {
    display: none !important;
  }

  .app-main {
    padding: 0;
    max-width: none;
  }

  body {
    background: white;
    color: #1a1a1a;
  }

  .detail-info {
    border: 1px solid #ccc;
    box-shadow: none;
  }
}


/* ============================================================
    40. REDUCED MOTION
    ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}


/* ============================================================
    43. ANIMATION UTILITY CLASSES (JS-driven micro-interactions)
    ============================================================ */

/* Screen exit animation */
.screen--exiting {
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity var(--md-motion-decelerate) 200ms, transform var(--md-motion-decelerate) 200ms;
}

/* Stagger animation for list items */
.stagger-animate {
  animation: stagger-enter var(--md-motion-default-spatial) both;
}

@keyframes stagger-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* FAB pulse (JS-driven, double-class for specificity) */
.m3-fab.m3-fab--pulse {
  animation: fab-pulse 1.5s ease-in-out 3;
}

/* Ripple effect */
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: var(--md-sys-color-on-surface);
  opacity: 0.12;
  transform: scale(0);
  animation: ripple-expand 600ms ease-out forwards;
  pointer-events: none;
}

@keyframes ripple-expand {
  to {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Snackbar visible state (JS toggle) */
.m3-snackbar--visible {
  transform: translateX(-50%) translateY(0) !important;
  opacity: 1 !important;
}

/* Dialog open animation */
.m3-dialog--open {
  animation: dialog-content-enter var(--md-motion-standard) both;
}

/* Fullscreen dialog open animation */
.m3-fullscreen-dialog--open {
  animation: fadeIn var(--md-motion-standard) both;
}

/* Alert dismissal animation */
.alert-banner--dismiss {
  animation: alert-dismiss var(--md-motion-decelerate) 300ms forwards;
}

@keyframes alert-dismiss {
  from {
    opacity: 1;
    transform: translateX(0);
    max-height: 200px;
    margin-bottom: var(--space-2);
  }
  to {
    opacity: 0;
    transform: translateX(40px);
    max-height: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
}

/* Chip press animation */
.m3-chip--pressed {
  animation: chip-press 200ms ease-out;
}

@keyframes chip-press {
  0% { transform: scale(1); }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* Form error slide-in */
.form-error--visible {
  animation: error-slide-in var(--md-motion-standard) both;
}

@keyframes error-slide-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Photo preview fade-in */
.photo-preview__item--visible {
  animation: photo-fade-in var(--md-motion-very-short) both;
}

@keyframes photo-fade-in {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Nav icon bounce on active */
.main-nav__icon-wrap--bounce {
  animation: icon-bounce 400ms ease-out;
}

@keyframes icon-bounce {
  0% { transform: scale(1); }
  30% { transform: scale(1.25); }
  60% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* ============================================================
    44. CLASES DE CONTENEDOR (utility classes)
    ============================================================ */
.dashboard-products {
  /* Products section container */
}

.products-page {
  /* Products page container */
}

.detail-gallery {
  /* Photo gallery container */
}

.detail-notes {
  /* Notes container */
}

.file-upload__text {
  /* File upload button text */
}

.form-input--currency {
  /* Currency formatted input */
  font-variant-numeric: tabular-nums;
}

.main-nav__item {
  /* Nav list item */
}

/* Screen variants (used by JS for show/hide) */
.screen--dashboard,
.screen--products,
.screen--form,
.screen--detail {
  /* Individual screens inherit from .screen */
}

/* M3 chip shared class */
.m3-chip {
  /* Base chip styles */
}

/* M3 top app bar class */
.m3-top-app-bar {
  /* Inherits from .app-header */
}

/* M3 nav bar class */
.m3-nav-bar {
  /* Inherits from .main-nav */
}

/* M3 search bar class */
.m3-search-bar {
  /* Inherits from .search-bar */
}

/* M3 chip group class */
.m3-chip-group {
  /* Inherits from .filter-group */
}

/* M3 dialog classes */
.m3-dialog {
  /* Inherits from .modal */
}
.m3-dialog__overlay {
  /* Inherits from .modal__overlay */
}
.m3-dialog__content {
  /* Inherits from .modal__content */
}
.m3-dialog__header {
  /* Inherits from .modal__header */
}
.m3-dialog__title {
  /* Inherits from .modal__title */
}
.m3-dialog__body {
  /* Inherits from .modal__body */
}
.m3-dialog__actions {
  /* Inherits from .modal__footer */
}

/* M3 fullscreen dialog class */
.m3-fullscreen-dialog {
  /* Inherits from .image-viewer */
}

/* M3 linear progress class */
.m3-linear-progress {
  /* Inherits from .detail-progress */
}


/* ============================================================
    45. SCROLLBAR STYLING (Webkit)
    ============================================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--md-sys-color-surface-container);
}

::-webkit-scrollbar-thumb {
  background: var(--md-sys-color-surface-variant);
  border-radius: var(--md-sys-shape-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--md-sys-color-outline);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--md-sys-color-surface-variant) var(--md-sys-color-surface-container);
}
