/* ================================================
   LOME Documents Management - Styles
   L'Oréal Middle East Scientific & Regulatory Affairs
   Bright & Colorful with Pastel Tinted Cards
   ================================================ */

:root {
  --loreal-black: #111111;
  --loreal-gold: #c5a55a;
  --loreal-gold-light: #d4b96e;

  /* Lively Color Palette */
  --blue: #4f7df9;
  --blue-light: #dfe8ff;
  --blue-bg: #e8eeff;
  --red: #ef4444;
  --red-light: #ffe4e4;
  --red-bg: #fff0f0;
  --green: #22c55e;
  --green-light: #dcfce7;
  --green-bg: #ecfdf5;
  --purple: #8b5cf6;
  --purple-light: #ede9fe;
  --purple-bg: #f3f0ff;
  --orange: #f59e0b;
  --orange-light: #fef3c7;
  --orange-bg: #fffbeb;
  --pink: #ec4899;
  --pink-light: #fce7f3;
  --pink-bg: #fef1f7;
  --teal: #14b8a6;
  --teal-light: #ccfbf1;
  --teal-bg: #f0fdfa;
  --amber: #d97706;
  --amber-bg: #fef3c7;

  /* Surfaces */
  --surface-page: #ffffff;
  --surface-card: #ffffff;
  --surface-muted: #f8f9fb;

  /* Text */
  --text-primary: #1a1a2e;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --text-on-dark: #ffffff;

  /* Borders */
  --border: #e8ecf1;
  --border-light: #f1f5f9;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-blue: 0 4px 14px rgba(79, 125, 249, 0.25);
  --shadow-gold: 0 4px 14px rgba(197, 165, 90, 0.3);

  /* Geometry */
  --radius: 16px;
  --radius-lg: 22px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --radius-pill: 100px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  background: var(--surface-page);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ========================================
   AMBIENT BACKGROUND (subtle on white)
   ======================================== */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  animation: orbFloat 25s ease-in-out infinite;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(79, 125, 249, 0.12) 0%, transparent 70%);
  top: -15%;
  right: -10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.08) 0%, transparent 70%);
  bottom: 5%;
  left: -10%;
  animation-delay: -8s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.08) 0%, transparent 70%);
  top: 45%;
  left: 35%;
  animation-delay: -16s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -40px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(15px, 30px) scale(1.02); }
}

/* ========================================
   NAVIGATION - White with Blue accent
   ======================================== */
.top-nav {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: var(--text-primary);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
}

.nav-logo {
  height: 34px;
  width: auto;
  filter: invert(1);
}

.nav-links {
  display: flex;
  gap: 4px;
  background: var(--surface-muted);
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
}

.nav-links a {
  color: var(--text-tertiary);
  text-decoration: none;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  letter-spacing: 0.1px;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(79, 125, 249, 0.06);
}

.nav-links a.active {
  color: white;
  background: var(--blue);
  box-shadow: var(--shadow-blue);
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ========================================
   PAGE SYSTEM
   ======================================== */
.page {
  display: none;
  animation: pageIn 0.35s var(--ease);
}

.page.active {
  display: block;
}

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

/* ========================================
   LANDING - VIBRANT BLUE HERO BANNER
   ======================================== */
.landing-hero {
  background: linear-gradient(135deg, #4f7df9 0%, #6c5ce7 40%, #a78bfa 100%);
  color: white;
  padding: 64px 2rem 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.landing-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 150%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.landing-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 50%;
  height: 100%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  padding: 6px 18px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 24px;
  position: relative;
}

.landing-hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
  line-height: 1.15;
  position: relative;
}

.landing-hero h1 span {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 300;
}

.landing-hero .subtitle {
  font-size: 1.02rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 48px;
  font-weight: 400;
  position: relative;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Landing Cards */
.landing-cards {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 820px;
  margin: 0 auto;
  position: relative;
}

.landing-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 32px 28px 28px;
  width: 380px;
  cursor: pointer;
  transition: var(--transition-slow);
  text-align: left;
  position: relative;
  overflow: hidden;
}

.landing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.landing-card:hover {
  transform: translateY(-5px) scale(1.01);
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.card-icon-wrap.admin-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.card-icon-wrap.dist-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.landing-card h3 {
  font-size: 1.12rem;
  margin-bottom: 8px;
  font-weight: 700;
  color: white;
}

.landing-card p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.86rem;
  line-height: 1.55;
}

.card-arrow {
  position: absolute;
  top: 32px;
  right: 28px;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.2);
  transition: var(--transition);
}

.landing-card:hover .card-arrow {
  color: white;
  transform: translateX(4px);
}

/* ========================================
   STATS - PASTEL TINTED CARDS
   Inspired by the screenshot's colorful boxes
   ======================================== */
.landing-stats {
  display: flex;
  gap: 14px;
  justify-content: center;
  padding: 40px 2rem;
  flex-wrap: wrap;
}

.stat-box {
  text-align: left;
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  min-width: 180px;
  flex: 1;
  max-width: 240px;
  transition: var(--transition);
  border: 1px solid transparent;
}

.stat-box:nth-child(1) {
  background: var(--blue-bg);
  border-color: var(--blue-light);
}

.stat-box:nth-child(2) {
  background: var(--purple-bg);
  border-color: var(--purple-light);
}

.stat-box:nth-child(3) {
  background: var(--green-bg);
  border-color: var(--green-light);
}

.stat-box:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.stat-box:nth-child(1) .stat-icon {
  background: rgba(79, 125, 249, 0.15);
  color: var(--blue);
}

.stat-box:nth-child(2) .stat-icon {
  background: rgba(139, 92, 246, 0.15);
  color: var(--purple);
}

.stat-box:nth-child(3) .stat-icon {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
}

.stat-box .stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -1px;
  line-height: 1;
}

.stat-box .stat-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 600;
}

/* ========================================
   INFO SECTION
   ======================================== */
.landing-info {
  max-width: 740px;
  margin: 0 auto;
  padding: 40px 2rem 56px;
  text-align: center;
}

.landing-info h2 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.landing-info p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.92rem;
}

.region-tags {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

.region-tag {
  color: var(--text-primary);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  border: 1px solid var(--border);
  transition: var(--transition);
  background: white;
  box-shadow: var(--shadow-sm);
}

.region-tag:nth-child(1) { background: var(--blue-bg); border-color: var(--blue-light); color: var(--blue); }
.region-tag:nth-child(2) { background: var(--green-bg); border-color: var(--green-light); color: var(--green); }
.region-tag:nth-child(3) { background: var(--red-bg); border-color: var(--red-light); color: var(--red); }
.region-tag:nth-child(4) { background: var(--purple-bg); border-color: var(--purple-light); color: var(--purple); }
.region-tag:nth-child(5) { background: var(--orange-bg); border-color: var(--orange-light); color: var(--amber); }
.region-tag:nth-child(6) { background: var(--teal-bg); border-color: var(--teal-light); color: var(--teal); }
.region-tag:nth-child(7) { background: var(--pink-bg); border-color: var(--pink-light); color: var(--pink); }
.region-tag:nth-child(8) { background: var(--blue-bg); border-color: var(--blue-light); color: var(--blue); }
.region-tag:nth-child(9) { background: var(--green-bg); border-color: var(--green-light); color: var(--green); }

.region-tag:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ========================================
   PAGE CONTAINERS
   ======================================== */
.page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 2rem;
}

/* ========================================
   PAGE HEADER
   ======================================== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ========================================
   SEARCH CONTAINER
   ======================================== */
.search-container {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

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

.search-input-wrap {
  flex: 1;
  min-width: 250px;
  position: relative;
}

.search-input-wrap input {
  width: 100%;
  padding: 11px 16px 11px 42px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
  background: var(--surface-muted);
  color: var(--text-primary);
}

.search-input-wrap input::placeholder {
  color: var(--text-tertiary);
}

.search-input-wrap input:focus {
  border-color: var(--blue);
  background: white;
  box-shadow: 0 0 0 3px rgba(79, 125, 249, 0.12);
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
}

.filter-select {
  padding: 11px 38px 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: inherit;
  background: var(--surface-muted);
  color: var(--text-primary);
  min-width: 155px;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%239ca3af' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.filter-select:focus {
  border-color: var(--blue);
  background-color: white;
  box-shadow: 0 0 0 3px rgba(79, 125, 249, 0.12);
}

.search-hint {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin-top: 10px;
  line-height: 1.4;
}

/* ========================================
   CARDS / CONTAINERS
   ======================================== */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  font-weight: 600;
  font-size: 0.92rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-body {
  padding: 22px;
}

/* ========================================
   PRODUCT GRID
   ======================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
}

.product-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 4px 0 0 4px;
  opacity: 0;
  transition: var(--transition);
}

.product-card:nth-child(5n+1)::before { background: var(--blue); }
.product-card:nth-child(5n+2)::before { background: var(--green); }
.product-card:nth-child(5n+3)::before { background: var(--purple); }
.product-card:nth-child(5n+4)::before { background: var(--pink); }
.product-card:nth-child(5n+5)::before { background: var(--orange); }

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.product-card:hover::before {
  opacity: 1;
}

.product-card .product-brand {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--blue);
  font-weight: 700;
  margin-bottom: 8px;
}

.product-card .product-name {
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 14px;
  line-height: 1.35;
  color: var(--text-primary);
}

.product-card .product-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.product-card .product-meta .meta-row {
  display: flex;
  gap: 8px;
}

.product-card .product-meta .meta-label {
  font-weight: 600;
  min-width: 62px;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-card .doc-count {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.doc-badge {
  background: var(--blue);
  color: white;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.doc-badge.empty {
  background: var(--surface-muted);
  color: var(--text-tertiary);
  border: 1px solid var(--border);
}

.category-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.category-badge.skincare { background: var(--blue-bg); color: var(--blue); }
.category-badge.haircare { background: var(--pink-bg); color: var(--pink); }
.category-badge.makeup { background: var(--orange-bg); color: var(--amber); }
.category-badge.fragrance { background: var(--purple-bg); color: var(--purple); }
.category-badge.sun\ care, .category-badge.suncare { background: var(--orange-bg); color: var(--orange); }
.category-badge.hair\ color, .category-badge.haircolor { background: var(--green-bg); color: var(--green); }

/* ========================================
   PRODUCT DETAIL
   ======================================== */
.product-detail-header {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 30px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.product-detail-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--purple), var(--pink));
}

.product-detail-header .back-link {
  color: var(--blue);
  cursor: pointer;
  font-size: 0.84rem;
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  transition: var(--transition);
  padding: 5px 14px;
  background: var(--blue-bg);
  border-radius: var(--radius-pill);
  border: 1px solid var(--blue-light);
}

.product-detail-header .back-link:hover {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.product-detail-header h2 {
  font-size: 1.45rem;
  margin-bottom: 6px;
  font-weight: 700;
}

.product-detail-header .detail-brand {
  color: var(--blue);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.75rem;
  margin-bottom: 8px;
}

.product-detail-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.product-detail-meta strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ========================================
   DOCUMENTS TABLE
   ======================================== */
.documents-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.documents-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-light);
  font-weight: 600;
  white-space: nowrap;
}

.documents-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.documents-table td strong {
  color: var(--text-primary);
  font-weight: 600;
}

.documents-table tr:last-child td {
  border-bottom: none;
}

.documents-table tbody tr {
  transition: var(--transition);
}

.documents-table tbody tr:hover {
  background: var(--surface-muted);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-family: inherit;
  letter-spacing: 0.2px;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--blue);
  color: white;
}

.btn-primary:hover {
  background: #3d6ce8;
  box-shadow: var(--shadow-blue);
}

.btn-gold {
  background: var(--blue);
  color: white;
}

.btn-gold:hover {
  background: #3d6ce8;
  box-shadow: var(--shadow-blue);
}

.btn-sm {
  padding: 7px 16px;
  font-size: 0.78rem;
}

.btn-danger {
  background: var(--red-bg);
  color: var(--red);
}

.btn-danger:hover {
  background: var(--red);
  color: white;
}

.btn-download {
  background: var(--green-bg);
  color: var(--green);
}

.btn-download:hover {
  background: var(--green);
  color: white;
}

/* ========================================
   MODAL
   ======================================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
  animation: overlayIn 0.2s var(--ease);
}

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

.modal {
  background: white;
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  animation: modalIn 0.3s var(--ease-spring);
}

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

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.08rem;
  font-weight: 700;
}

.modal-close {
  background: var(--surface-muted);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--red);
  color: white;
}

.modal-body {
  padding: 22px 24px;
}

/* ========================================
   FORMS
   ======================================== */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
  letter-spacing: 0.2px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
  background: var(--surface-muted);
  color: var(--text-primary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-tertiary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  background: white;
  box-shadow: 0 0 0 3px rgba(79, 125, 249, 0.12);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%239ca3af' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

.form-row {
  display: flex;
  gap: 14px;
}

.form-row .form-group {
  flex: 1;
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
.toast {
  position: fixed;
  top: 72px;
  right: 20px;
  padding: 14px 22px;
  border-radius: var(--radius);
  color: white;
  font-weight: 500;
  font-size: 0.86rem;
  font-family: inherit;
  z-index: 300;
  animation: toastIn 0.4s var(--ease-spring);
  box-shadow: var(--shadow-lg);
  max-width: 360px;
}

.toast.success { background: var(--green); }
.toast.error { background: var(--red); }

@keyframes toastIn {
  from { transform: translateX(100%) translateY(-8px); opacity: 0; }
  to { transform: translateX(0) translateY(0); opacity: 1; }
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
  text-align: center;
  padding: 56px 20px;
  color: var(--text-tertiary);
}

.empty-state .empty-icon {
  font-size: 2.2rem;
  margin-bottom: 14px;
  opacity: 0.4;
}

.empty-state p {
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.empty-state p:last-child {
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

/* ========================================
   UTILITIES
   ======================================== */
.file-size {
  color: var(--text-tertiary);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: var(--text-primary);
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 22px 2rem;
  font-size: 0.78rem;
  margin-top: 50px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-brand span {
  color: white;
  font-weight: 700;
}

.footer-sep {
  color: rgba(255, 255, 255, 0.15);
}

/* ========================================
   SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
  width: 5px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.18);
}

/* ========================================
   SELECTION
   ======================================== */
::selection {
  background: var(--blue);
  color: white;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .top-nav {
    padding: 0 1rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 8px;
    right: 8px;
    background: white;
    flex-direction: column;
    padding: 8px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }

  .top-nav.nav-open .nav-links {
    display: flex;
  }

  .nav-links a {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
  }

  .nav-logo {
    height: 26px;
  }

  .landing-hero {
    padding: 44px 1.5rem 52px;
  }

  .landing-hero h1 {
    font-size: 1.8rem;
  }

  .landing-cards {
    flex-direction: column;
    align-items: center;
  }

  .landing-card {
    width: 100%;
    max-width: 400px;
  }

  .landing-stats {
    flex-direction: column;
    gap: 10px;
    align-items: center;
    padding: 28px 1.5rem;
  }

  .stat-box {
    width: 100%;
    max-width: 320px;
    padding: 22px 28px;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-row {
    flex-direction: column;
  }

  .product-detail-meta {
    flex-direction: column;
    gap: 10px;
  }

  .documents-table {
    font-size: 0.8rem;
  }

  .documents-table th,
  .documents-table td {
    padding: 10px 8px;
  }

  .page-content {
    padding: 20px 1rem;
  }

  .product-detail-header {
    padding: 22px;
  }

  .orb { opacity: 0.2; }
}

@media (max-width: 480px) {
  .landing-hero h1 {
    font-size: 1.5rem;
  }

  .hero-badge {
    font-size: 0.65rem;
    padding: 5px 14px;
  }

  .stat-box .stat-number {
    font-size: 1.8rem;
  }

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