/* ============================================
   NEXUS ENGENHARIA - Design System
   ============================================ */

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

:root {
  /* Cores Base */
  --bg-primary: #060b18;
  --bg-secondary: #0a1128;
  --bg-tertiary: #0f1a36;

  /* Surfaces */
  --surface-1: rgba(15, 26, 54, 0.6);
  --surface-2: rgba(22, 35, 66, 0.5);
  --surface-hover: rgba(30, 48, 86, 0.6);
  --surface-glass: rgba(12, 20, 42, 0.65);

  /* Accent */
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-teal: #14b8a6;
  --accent-purple: #8b5cf6;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-green: #22c55e;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #3b82f6, #06b6d4);
  --gradient-hero: linear-gradient(135deg, #3b82f6 0%, #06b6d4 50%, #14b8a6 100%);
  --gradient-card-border: linear-gradient(135deg, rgba(59,130,246,0.3), rgba(6,182,212,0.1), transparent);
  --gradient-bg: radial-gradient(ellipse at top, #0f1a36 0%, #060b18 70%);

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #38bdf8;

  /* Borders */
  --border-subtle: rgba(59, 130, 246, 0.08);
  --border-medium: rgba(59, 130, 246, 0.15);
  --border-strong: rgba(59, 130, 246, 0.3);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --shadow-glow-blue: 0 0 30px rgba(59,130,246,0.15);
  --shadow-glow-cyan: 0 0 30px rgba(6,182,212,0.15);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Transition */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Container */
  --container-max: 1280px;
  --container-padding: 1.5rem;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

ul, ol {
  list-style: none;
}

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

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

/* --- Container --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ============================================
   HEADER
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-md) 0;
  transition: var(--transition-base);
  background: transparent;
}

.header.scrolled {
  background: rgba(6, 11, 24, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-sm) 0;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.header__logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 1.1rem;
}

.header__logo-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
}

.header__nav-links {
  display: flex;
  gap: var(--space-xl);
}

.header__nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  position: relative;
}

.header__nav-link:hover {
  color: var(--text-primary);
}

.header__nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: var(--transition-base);
}

.header__nav-link:hover::after {
  width: 100%;
}

.header__cta {
  padding: 0.6rem 1.4rem;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  transition: var(--transition-base);
  box-shadow: 0 2px 10px rgba(59,130,246,0.3);
}

.header__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(59,130,246,0.4);
}

/* Mobile Menu */
.header__mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.header__mobile-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition-base);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  padding: 10rem 0 6rem;
  text-align: center;
  overflow: hidden;
  background: var(--gradient-bg);
}

/* Animated background orbs */
.hero__bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  pointer-events: none;
}

.hero__bg-orb--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59,130,246,0.2), transparent 70%);
  top: -200px;
  right: -150px;
  animation: orbFloat1 20s ease-in-out infinite;
}

.hero__bg-orb--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(6,182,212,0.15), transparent 70%);
  bottom: -150px;
  left: -100px;
  animation: orbFloat2 25s ease-in-out infinite;
}

.hero__bg-orb--3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(139,92,246,0.12), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: orbFloat3 18s ease-in-out infinite;
}

/* Grid pattern overlay */
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59,130,246,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.4rem 1rem;
  background: var(--surface-1);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-accent);
  margin-bottom: var(--space-xl);
  animation: fadeInDown 0.8s ease;
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.8s ease 0.1s both;
}

.hero__title-gradient {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.7;
  font-weight: 400;
  animation: fadeInUp 0.8s ease 0.2s both;
}

/* Search Bar */
.hero__search {
  max-width: 560px;
  margin: 0 auto var(--space-2xl);
  position: relative;
  animation: fadeInUp 0.8s ease 0.3s both;
}

.hero__search-input {
  width: 100%;
  padding: 1rem 1.25rem 1rem 3.2rem;
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition-base);
}

.hero__search-input::placeholder {
  color: var(--text-muted);
}

.hero__search-input:focus {
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-glow-blue);
}

.hero__search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  pointer-events: none;
}

/* Stats */
.hero__stats {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  animation: fadeInUp 0.8s ease 0.4s both;
}

.hero__stat {
  text-align: center;
}

.hero__stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.hero__stat-separator {
  width: 1px;
  background: var(--border-medium);
  align-self: stretch;
}

/* ============================================
   TOOLS SECTION
   ============================================ */
.tools {
  padding: var(--space-4xl) 0;
  position: relative;
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section__label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-cyan);
  margin-bottom: var(--space-sm);
}

.section__title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.section__description {
  color: var(--text-secondary);
  max-width: 550px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* Category Filters */
.tools__filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
}

.tools__filter-btn {
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  transition: var(--transition-base);
}

.tools__filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
  background: var(--surface-2);
}

.tools__filter-btn.active {
  color: white;
  background: var(--gradient-primary);
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(59,130,246,0.3);
}

/* Tools Grid */
.tools__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

/* ============================================
   TOOL CARD
   ============================================ */
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--space-xl);
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: var(--transition-base);
  overflow: hidden;
  text-decoration: none;
}

.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(59,130,246,0.05), transparent 60%);
  opacity: 0;
  transition: var(--transition-base);
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg), var(--shadow-glow-blue);
  background: var(--surface-hover);
}

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

.tool-card__icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 1;
  transition: var(--transition-base);
}

.tool-card:hover .tool-card__icon-wrapper {
  transform: scale(1.08);
}

.tool-card__icon-wrapper svg {
  width: 26px;
  height: 26px;
}

/* Category colors for icons */
.tool-card__icon-wrapper--memoriais {
  background: rgba(59,130,246,0.12);
  color: var(--accent-blue);
}

.tool-card__icon-wrapper--calculos {
  background: rgba(20,184,166,0.12);
  color: var(--accent-teal);
}

.tool-card__icon-wrapper--conversores {
  background: rgba(139,92,246,0.12);
  color: var(--accent-purple);
}

.tool-card__icon-wrapper--documentos {
  background: rgba(245,158,11,0.12);
  color: var(--accent-amber);
}

.tool-card__badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-sm);
  position: relative;
  z-index: 1;
}

.tool-card__badge--memoriais {
  background: rgba(59,130,246,0.12);
  color: var(--accent-blue);
}

.tool-card__badge--calculos {
  background: rgba(20,184,166,0.12);
  color: var(--accent-teal);
}

.tool-card__badge--conversores {
  background: rgba(139,92,246,0.12);
  color: var(--accent-purple);
}

.tool-card__badge--documentos {
  background: rgba(245,158,11,0.12);
  color: var(--accent-amber);
}

.tool-card__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}

.tool-card__description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex-grow: 1;
  position: relative;
  z-index: 1;
}

.tool-card__arrow {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition-base);
  position: relative;
  z-index: 1;
}

.tool-card:hover .tool-card__arrow {
  color: var(--text-accent);
  gap: var(--space-md);
}

.tool-card__arrow svg {
  width: 16px;
  height: 16px;
  transition: var(--transition-base);
}

.tool-card:hover .tool-card__arrow svg {
  transform: translateX(4px);
}

/* Card hidden by filter */
.tool-card.hidden {
  display: none;
}

/* Scroll animation */
.tool-card {
  opacity: 0;
  transform: translateY(30px);
}

.tool-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.tool-card:nth-child(1) { transition-delay: 0.05s; }
.tool-card:nth-child(2) { transition-delay: 0.1s; }
.tool-card:nth-child(3) { transition-delay: 0.15s; }
.tool-card:nth-child(4) { transition-delay: 0.2s; }
.tool-card:nth-child(5) { transition-delay: 0.25s; }
.tool-card:nth-child(6) { transition-delay: 0.3s; }
.tool-card:nth-child(7) { transition-delay: 0.35s; }
.tool-card:nth-child(8) { transition-delay: 0.4s; }
.tool-card:nth-child(9) { transition-delay: 0.45s; }
.tool-card:nth-child(10) { transition-delay: 0.5s; }
.tool-card:nth-child(11) { transition-delay: 0.55s; }
.tool-card:nth-child(12) { transition-delay: 0.6s; }

/* ============================================
   FEATURES SECTION
   ============================================ */
.features {
  padding: var(--space-4xl) 0;
  background: var(--gradient-bg);
  position: relative;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-3xl);
}

.feature-card {
  padding: var(--space-2xl);
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  text-align: center;
  transition: var(--transition-base);
}

.feature-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.feature-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-lg);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.feature-card__icon--speed {
  background: rgba(59,130,246,0.12);
  color: var(--accent-blue);
}

.feature-card__icon--precision {
  background: rgba(20,184,166,0.12);
  color: var(--accent-teal);
}

.feature-card__icon--free {
  background: rgba(139,92,246,0.12);
  color: var(--accent-purple);
}

.feature-card__title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.feature-card__description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta {
  padding: var(--space-4xl) 0;
  text-align: center;
}

.cta__card {
  padding: var(--space-4xl) var(--space-2xl);
  background: var(--surface-1);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-2xl);
  position: relative;
  overflow: hidden;
}

.cta__card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59,130,246,0.06), rgba(6,182,212,0.04), transparent);
  pointer-events: none;
}

.cta__title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: var(--space-md);
  position: relative;
}

.cta__description {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto var(--space-2xl);
  position: relative;
}

.cta__button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.9rem 2.2rem;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 600;
  color: white;
  transition: var(--transition-base);
  box-shadow: 0 4px 20px rgba(59,130,246,0.3);
  position: relative;
}

.cta__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(59,130,246,0.4);
}

.cta__button svg {
  width: 18px;
  height: 18px;
  transition: var(--transition-base);
}

.cta__button:hover svg {
  transform: translateX(3px);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: var(--space-3xl) 0 var(--space-xl);
  border-top: 1px solid var(--border-subtle);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.footer__logo-icon {
  width: 28px;
  height: 28px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 0.8rem;
}

.footer__logo-text {
  font-weight: 700;
  font-size: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer__copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer__links {
  display: flex;
  gap: var(--space-xl);
}

.footer__link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.footer__link:hover {
  color: var(--text-primary);
}

/* ============================================
   TOOL PAGE STYLES
   ============================================ */
.tool-page {
  padding: 8rem 0 var(--space-4xl);
  min-height: 100vh;
}

.tool-page__breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tool-page__breadcrumb a {
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.tool-page__breadcrumb a:hover {
  color: var(--text-accent);
}

.tool-page__breadcrumb-separator {
  color: var(--text-muted);
}

.tool-page__header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.tool-page__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--space-lg);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59,130,246,0.12);
  color: var(--accent-blue);
}

.tool-page__icon svg {
  width: 36px;
  height: 36px;
}

.tool-page__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.tool-page__description {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 550px;
  margin: 0 auto;
}

/* Upload Area */
.upload-area {
  max-width: 700px;
  margin: 0 auto var(--space-2xl);
  padding: var(--space-4xl) var(--space-2xl);
  background: var(--surface-1);
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-2xl);
  text-align: center;
  cursor: pointer;
  transition: var(--transition-base);
  position: relative;
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--accent-blue);
  background: var(--surface-2);
  box-shadow: var(--shadow-glow-blue);
}

.upload-area__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg);
  color: var(--text-muted);
  transition: var(--transition-base);
}

.upload-area:hover .upload-area__icon {
  color: var(--accent-blue);
  transform: translateY(-4px);
}

.upload-area__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.upload-area__subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.upload-area__browse {
  color: var(--accent-blue);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.upload-area__formats {
  margin-top: var(--space-lg);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* Config Panel */
.config-panel {
  max-width: 700px;
  margin: 0 auto var(--space-2xl);
  padding: var(--space-xl);
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
}

.config-panel__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.config-panel__title svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.config-panel__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.config-panel__row:last-child {
  border-bottom: none;
}

.config-panel__label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.config-panel__select {
  padding: 0.4rem 0.8rem;
  background: var(--surface-2);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

.config-panel__select:focus {
  border-color: var(--accent-blue);
}

/* Action Button */
.tool-page__actions {
  text-align: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 1rem 2.5rem;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  font-size: 1.05rem;
  font-weight: 600;
  color: white;
  transition: var(--transition-base);
  box-shadow: 0 4px 20px rgba(59,130,246,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(59,130,246,0.4);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary svg {
  width: 20px;
  height: 20px;
}

/* ============================================
   PROGRESS AREA
   ============================================ */
.progress-area {
  display: none;
  max-width: 700px;
  margin: 0 auto var(--space-2xl);
  text-align: center;
}

.progress-area__bar {
  width: 100%;
  height: 6px;
  background: var(--surface-2);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.progress-area__fill {
  width: 0%;
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

.progress-area__text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  animation: pulse 1.5s ease-in-out infinite;
}

/* ============================================
   RESULT AREA
   ============================================ */
.result-area {
  display: none;
  max-width: 700px;
  margin: 0 auto var(--space-2xl);
  padding: var(--space-xl);
  background: var(--surface-1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-xl);
}

.result-area__header {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.result-area__icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: var(--radius-lg);
  background: rgba(34, 197, 94, 0.12);
  color: var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-area__icon svg {
  width: 24px;
  height: 24px;
}

.result-area__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-green);
}

.result-area__subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.result-area__file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
}

.result-area__file-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.result-area__file-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: var(--radius-md);
  background: rgba(59,130,246,0.12);
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-area__file-icon svg {
  width: 20px;
  height: 20px;
}

.result-area__file-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.result-area__file-size {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Download Button */
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.65rem 1.5rem;
  background: linear-gradient(135deg, #22c55e, #14b8a6);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  border: none;
  cursor: pointer;
  transition: var(--transition-base);
  box-shadow: 0 2px 12px rgba(34, 197, 94, 0.3);
  white-space: nowrap;
}

.btn-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
}

.btn-download svg {
  width: 18px;
  height: 18px;
}

/* ---- Hero Download Button (Big & Prominent) ---- */
.btn-download-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  width: 100%;
  padding: 1.25rem 2rem;
  background: linear-gradient(135deg, #22c55e 0%, #14b8a6 50%, #06b6d4 100%);
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
  border-radius: var(--radius-xl);
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow:
    0 4px 20px rgba(34, 197, 94, 0.4),
    0 0 40px rgba(34, 197, 94, 0.15);
  letter-spacing: 0.02em;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-lg);
  position: relative;
  overflow: hidden;
}

.btn-download-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%, rgba(255,255,255,0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-download-hero:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow:
    0 8px 32px rgba(34, 197, 94, 0.5),
    0 0 60px rgba(34, 197, 94, 0.25);
}

.btn-download-hero:hover::before {
  opacity: 1;
}

.btn-download-hero:active {
  transform: translateY(-1px) scale(0.99);
}

.btn-download-hero:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.btn-download-hero svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.btn-download-hero--success {
  background: linear-gradient(135deg, #22c55e, #10b981) !important;
  animation: none !important;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* File info row (compact) */
.result-area__file-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--space-md);
}

.result-area__file-icon-small {
  width: 24px;
  height: 24px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.result-area__file-icon-small svg {
  width: 20px;
  height: 20px;
}

.result-area__file-row .result-area__file-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.result-area__file-row .result-area__file-size {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* Secondary Button */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.6rem 1.4rem;
  background: var(--surface-2);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-base);
}

.btn-secondary:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.btn-secondary svg {
  width: 16px;
  height: 16px;
}

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

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-30px, 20px); }
  50% { transform: translate(-10px, -30px); }
  75% { transform: translate(20px, 10px); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(30px, -20px); }
  66% { transform: translate(-20px, 30px); }
}

@keyframes orbFloat3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.3); }
}

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

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

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

/* ============================================
   RESPONSIVE
   ============================================ */

/* ---- Tablet landscape / small desktop ---- */
@media (max-width: 1024px) {
  .tools__grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-md);
  }

  .features__grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-md);
  }

  .hero {
    padding: 9rem 0 5rem;
  }
}

/* ---- Tablet / Mobile landscape ---- */
@media (max-width: 768px) {
  :root {
    --container-padding: 1.25rem;
  }

  /* Header */
  .header__nav-links {
    display: none;
  }

  .header__cta {
    display: none;
  }

  .header__mobile-toggle {
    display: flex;
  }

  /* Mobile Menu */
  .header__nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(6, 11, 24, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: var(--space-xl);
    border-bottom: 1px solid var(--border-subtle);
    gap: var(--space-lg);
    z-index: 100;
  }

  /* Hero */
  .hero {
    padding: 8rem 0 4rem;
  }

  .hero__stats {
    gap: var(--space-lg);
  }

  .hero__stat-value {
    font-size: 1.2rem;
  }

  /* Tools Grid */
  .tools__grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  /* Features */
  .features__grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer__inner {
    flex-direction: column;
    text-align: center;
    gap: var(--space-md);
  }

  .footer__links {
    justify-content: center;
  }

  /* Tool Page */
  .tool-page {
    padding: 7rem 0 var(--space-3xl);
  }

  .tool-page__header {
    margin-bottom: var(--space-2xl);
  }

  .tool-page__title {
    font-size: 1.4rem;
  }

  .tool-page__description {
    font-size: 0.95rem;
  }

  /* Upload Area */
  .upload-area {
    max-width: 100%;
    padding: var(--space-3xl) var(--space-lg);
    margin: 0 auto var(--space-xl);
  }

  .upload-area__icon {
    width: 48px;
    height: 48px;
  }

  .upload-area__title {
    font-size: 1rem;
  }

  /* Config Panel */
  .config-panel {
    max-width: 100%;
    padding: var(--space-lg);
    margin: 0 auto var(--space-xl);
  }

  .config-panel__row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
  }

  .config-panel__select {
    width: 100%;
  }

  /* Progress & Result */
  .progress-area {
    max-width: 100%;
  }

  .result-area {
    max-width: 100%;
    padding: var(--space-lg);
  }

  .result-area__file {
    flex-direction: column;
    gap: var(--space-md);
    align-items: stretch;
    text-align: center;
  }

  .result-area__file-info {
    justify-content: center;
  }

  .btn-download {
    width: 100%;
    justify-content: center;
  }

  /* Buttons */
  .btn-primary {
    padding: 0.85rem 2rem;
    font-size: 0.95rem;
    width: 100%;
    justify-content: center;
  }

  .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  /* CTA */
  .cta__card {
    padding: var(--space-3xl) var(--space-lg);
  }
}

/* ---- Small mobile (landscape-ish) ---- */
@media (max-width: 600px) {
  .tools__grid {
    grid-template-columns: 1fr;
  }

  .hero__search-input {
    padding: 0.85rem 1rem 0.85rem 2.8rem;
    font-size: 0.9rem;
  }

  .hero__search-icon {
    left: 0.8rem;
    width: 18px;
    height: 18px;
  }

  .tool-page__icon {
    width: 56px;
    height: 56px;
  }

  .tool-page__icon svg {
    width: 28px;
    height: 28px;
  }

  .result-area__header {
    flex-direction: column;
    text-align: center;
    gap: var(--space-md);
  }

  .result-area__icon {
    margin: 0 auto;
  }
}

/* ---- Portrait phones ---- */
@media (max-width: 480px) {
  :root {
    --container-padding: 1rem;
  }

  .hero__stats {
    flex-direction: column;
    gap: var(--space-md);
  }

  .hero__stat-separator {
    width: 40px;
    height: 1px;
    align-self: center;
  }

  .hero__title {
    font-size: 2rem;
  }

  .hero__subtitle {
    font-size: 0.95rem;
  }

  .tools__filters {
    gap: var(--space-xs);
  }

  .tools__filter-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .section__title {
    font-size: 1.4rem;
  }

  .section__description {
    font-size: 0.9rem;
  }

  .tool-page__breadcrumb {
    font-size: 0.75rem;
    flex-wrap: wrap;
  }

  .upload-area {
    padding: var(--space-2xl) var(--space-md);
  }

  .config-panel__title {
    font-size: 0.9rem;
  }

  .config-panel__label {
    font-size: 0.85rem;
  }

  .config-panel__select {
    font-size: 0.8rem;
  }

  .result-area__title {
    font-size: 0.95rem;
  }

  .result-area__file-name {
    font-size: 0.8rem;
    word-break: break-all;
  }

  .footer__copyright {
    font-size: 0.7rem;
  }

  .footer__link {
    font-size: 0.8rem;
  }

  .footer__links {
    gap: var(--space-md);
  }
}

/* ---- Very small screens ---- */
@media (max-width: 360px) {
  .hero {
    padding: 7rem 0 3rem;
  }

  .hero__title {
    font-size: 1.6rem;
  }

  .hero__badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.7rem;
  }

  .tool-page {
    padding: 6rem 0 var(--space-2xl);
  }

  .tool-page__title {
    font-size: 1.2rem;
  }

  .btn-primary {
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
  }

  .btn-download {
    padding: 0.55rem 1.2rem;
    font-size: 0.8rem;
  }
}

/* ============================================
   NO RESULTS STATE
   ============================================ */
.tools__no-results {
  text-align: center;
  padding: var(--space-4xl) var(--space-xl);
  display: none;
}

.tools__no-results.show {
  display: block;
}

.tools__no-results-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.tools__no-results-text {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ============================================
   HEADER AUTH & USER MENU
   ============================================ */
.header__user-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition-base);
  margin-left: var(--space-md);
}

.header__user-menu:hover {
  border-color: var(--border-medium);
  background: var(--surface-2);
}

.header__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-medium);
}

.header__avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.header__user-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header__user-dropdown {
  position: absolute;
  top: calc(100% + var(--space-sm));
  right: 0;
  background: var(--surface-1);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: var(--space-xs);
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.header__user-menu.open .header__user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header__dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: 0.8rem 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: var(--transition-base);
}

.header__dropdown-item:hover {
  background: var(--surface-2);
  color: var(--text-primary);
}

.header__dropdown-item--admin {
  color: var(--brand-primary);
}
.header__dropdown-item--admin:hover {
  background: rgba(6, 182, 212, 0.1);
  color: var(--brand-secondary);
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem var(--space-lg) var(--space-2xl);
  position: relative;
  overflow: hidden;
}

.login-page__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  z-index: -1;
}

.login-page__orb--1 {
  width: 500px;
  height: 500px;
  background: var(--brand-primary);
  top: -100px;
  left: -100px;
}

.login-page__orb--2 {
  width: 400px;
  height: 400px;
  background: var(--brand-secondary);
  bottom: -100px;
  right: -100px;
}

.login-page__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -1;
  mask-image: radial-gradient(circle at center, black, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at center, black, transparent 80%);
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(13, 20, 36, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 10;
}

.login-card__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.login-card__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.login-card__title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.login-card__subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.login-card__google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  width: 100%;
  padding: 0.9rem 1.5rem;
  background: white;
  color: #3c4043;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: var(--space-xl);
}

.login-card__google-btn:hover {
  background: #f8f9fa;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

.login-card__google-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.login-card__divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin-bottom: var(--space-xl);
}

.login-card__divider::before,
.login-card__divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-medium);
}

.login-card__divider span {
  padding: 0 var(--space-md);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.login-card__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.login-card__field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.login-card__label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.login-card__input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.login-card__input-icon {
  position: absolute;
  left: 1rem;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.login-card__input {
  width: 100%;
  padding: 0.9rem 1rem 0.9rem 2.8rem;
  background: var(--surface-1);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition-base);
}

.login-card__input:focus {
  outline: none;
  border-color: var(--brand-primary);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.login-card__toggle-pass {
  position: absolute;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card__toggle-pass svg {
  width: 18px;
  height: 18px;
  transition: color 0.2s;
}

.login-card__toggle-pass:hover svg {
  color: var(--text-secondary);
}

.login-card__forgot {
  text-align: right;
  margin-top: -0.2rem;
}

.login-card__forgot a {
  color: var(--brand-primary);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.login-card__forgot a:hover {
  color: var(--brand-secondary);
  text-decoration: underline;
}

.login-card__captcha {
  display: flex;
  justify-content: center;
  margin: var(--space-md) 0;
  min-height: 78px; /* Standard reCAPTCHA height */
}

.login-card__error {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.8rem 1rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
  color: #fca5a5;
  font-size: 0.85rem;
}

.login-card__error--success {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.login-card__error svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.login-card__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: var(--space-sm);
}

.login-card__submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.login-card__submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.login-card__spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.login-card__toggle {
  text-align: center;
  margin-top: var(--space-xl);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.login-card__toggle-btn {
  background: transparent;
  border: none;
  color: var(--brand-primary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0 0 0 0.3rem;
  transition: color 0.2s;
}

.login-card__toggle-btn:hover {
  color: var(--brand-secondary);
  text-decoration: underline;
}

/* ============================================
   ADMIN DASHBOARD
   ============================================ */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background: var(--surface-bg);
}

/* Sidebar */
.admin-sidebar {
  width: 260px;
  background: var(--surface-1);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  z-index: 50;
}

.admin-sidebar__header {
  padding: var(--space-xl);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-sidebar__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
}

.admin-sidebar__badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.admin-sidebar__nav {
  flex: 1;
  padding: var(--space-lg) var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.admin-sidebar__link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 0.8rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: var(--transition-base);
}

.admin-sidebar__link:hover {
  color: var(--text-primary);
  background: var(--surface-2);
}

.admin-sidebar__link.active {
  color: var(--brand-primary);
  background: rgba(6, 182, 212, 0.1);
}

.admin-sidebar__footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
}

.admin-sidebar__user {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.admin-sidebar__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-primary);
}

.admin-sidebar__user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-sidebar__user-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-sidebar__user-email {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-sidebar__logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  padding: 0.8rem;
  background: transparent;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-base);
}

.admin-sidebar__logout:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* Main Content */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0; /* Important for flex children truncation */
}

.admin-topbar {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-xl);
  background: var(--surface-1);
  border-bottom: 1px solid var(--border-subtle);
}

.admin-topbar__toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: var(--space-xs);
}

.admin-topbar__title {
  font-size: 1.2rem;
  font-weight: 600;
}

.admin-topbar__site-link {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--brand-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.admin-topbar__site-link:hover {
  text-decoration: underline;
}

.admin-section {
  padding: var(--space-2xl);
  flex: 1;
  overflow-y: auto;
}

.admin-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
}

/* Stats Cards */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.admin-stat-card {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.admin-stat-card__icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-stat-card__icon--blue {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.admin-stat-card__icon--green {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.admin-stat-card__icon--purple {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
}

.admin-stat-card__info {
  display: flex;
  flex-direction: column;
}

.admin-stat-card__value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.admin-stat-card__label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Admin Table */
.admin-table-wrapper {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th,
.admin-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-table th {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--surface-2);
}

.admin-table tbody tr {
  transition: background 0.2s ease;
}

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.admin-table__name {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.admin-table__name svg {
  color: var(--brand-primary);
}

.admin-table__name strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.admin-table__name small {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.admin-badge--parcelamento { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.admin-badge--desmembramento { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.admin-badge--loteamento { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.admin-badge--incorporacao { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.admin-badge--geral { background: rgba(107, 114, 128, 0.15); color: #9ca3af; }

.admin-status-toggle {
  background: transparent;
  border: 1px solid var(--border-medium);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.admin-status-toggle.active {
  border-color: rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.admin-table__actions {
  display: flex;
  gap: var(--space-sm);
}

.admin-action-btn {
  background: var(--surface-2);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.admin-action-btn:hover {
  background: var(--surface-3);
  color: var(--text-primary);
}

.admin-action-btn--danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* Empty State / Loading */
.admin-empty, .admin-loading {
  text-align: center;
  padding: var(--space-4xl) var(--space-xl);
  background: var(--surface-1);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-xl);
}

.admin-empty svg {
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.admin-empty h3 {
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.admin-empty p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.admin-loading {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Buttons */
.admin-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--brand-primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-btn-primary:hover:not(:disabled) {
  background: var(--brand-secondary);
  transform: translateY(-1px);
}

.admin-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-medium);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-btn-secondary:hover {
  background: var(--surface-2);
  color: var(--text-primary);
}

/* Modal */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-lg);
}

.admin-modal {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 600px;
  box-shadow: var(--shadow-xl);
  max-height: 90vh;
  overflow-y: auto;
}

.admin-modal__header {
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-modal__close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-md);
}

.admin-modal__close:hover {
  background: var(--surface-2);
  color: var(--text-primary);
}

.admin-modal__form {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.admin-modal__field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex: 1;
}

.admin-modal__row {
  display: flex;
  gap: var(--space-lg);
}

.admin-modal__field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.admin-modal__field input[type="text"],
.admin-modal__field select {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
}

.admin-modal__field input:focus,
.admin-modal__field select:focus {
  outline: none;
  border-color: var(--brand-primary);
}

.admin-modal__upload {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  position: relative;
  transition: all 0.2s;
  cursor: pointer;
}

.admin-modal__upload:hover {
  border-color: var(--brand-primary);
  background: rgba(6, 182, 212, 0.05);
}

.admin-modal__upload.has-file {
  border-style: solid;
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}

.admin-modal__upload.has-file svg {
  color: #10b981;
}

.admin-modal__upload input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.admin-modal__upload svg {
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.admin-modal__upload p {
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: var(--space-xs);
}

.admin-modal__upload small {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.admin-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
}

.admin-modal__error {
  padding: 0.8rem;
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  text-align: center;
}

/* Notifications */
.admin-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  color: white;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2000;
}

.admin-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.admin-notification--success {
  background: #10b981;
}

.admin-notification--error {
  background: #ef4444;
}

/* Admin Responsive */
@media (max-width: 1024px) {
  .admin-sidebar {
    position: fixed;
    height: 100vh;
    transform: translateX(-100%);
  }

  .admin-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }

  .admin-topbar__toggle {
    display: block;
  }
}

@media (max-width: 768px) {
  .admin-modal__row {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .admin-section {
    padding: var(--space-lg);
  }
}

/* ============================================
   HEADER USER MENU & DROPDOWN (AUTH STATE)
   ============================================ */
.header__user-container {
  position: relative;
  display: inline-block;
}

.header__user-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 1.1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  cursor: pointer;
  outline: none;
  color: #ffffff;
  transition: all 0.2s ease;
  min-height: 44px;
}

.header__user-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.35);
}

.header__user-btn * {
  pointer-events: none; /* Garante que 100% da área do botão receba o clique */
}

.header__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.header__avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header__user-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header__user-arrow {
  transition: transform 0.2s ease;
  stroke: #94a3b8;
}

.header__user-container.open .header__user-arrow {
  transform: rotate(180deg);
}

.header__user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 0.5rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100000;
}

.header__user-container.open .header__user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header__dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  color: #cbd5e1;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.header__dropdown-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.header__dropdown-item--admin {
  color: #60a5fa;
  font-weight: 600;
}

.header__dropdown-item--admin:hover {
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}

.header__dropdown-item svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}
