/**
 * SetorEmail — Neo Brutalism + Modern SaaS + Developer Dashboard
 * Tema: High Contrast, Hard Shadows, Bold Borders, Vibrant Colors.
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --primary: #3b82f6; /* Blue SaaS */
  --primary-dark: #1d4ed8;
  --accent: #facc15; /* Yellow Neo */
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #000000;
  --ink-soft: #4b5563;
  --danger: #ef4444;
  --success: #22c55e;
  --border-width: 3px;
  --shadow: 6px 6px 0px #000000;
  --shadow-hover: 2px 2px 0px #000000;
  --radius: 0px; /* Neo-Brutalism often uses sharp or very slight radius */
  --font-main: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.5;
}

/* ===== Typography ===== */
h1, h2, h3, h4 { font-weight: 800;  letter-spacing: -0.01em; margin-bottom: 1rem; }
.mono { font-family: var(--font-mono); }

/* ===== Components ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 24px;
  border: var(--border-width) solid #000;
  background: var(--accent);
  color: #000;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.1s;
  text-decoration: none;
  
}
.btn:hover { transform: translate(2px, 2px); box-shadow: var(--shadow-hover); }
.btn:active { transform: translate(4px, 4px); box-shadow: none; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-secondary { background: #fff; color: #000; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn-block { width: 100%; }

.panel {
  background: var(--surface);
  border: var(--border-width) solid #000;
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 32px;
}

.info-card {
  background: #fff;
  border: var(--border-width) solid #000;
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.info-card.gold { background: var(--accent); }
.info-card .tag { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700;  opacity: 0.7; }
.info-card .val { font-size: 1.8rem; font-weight: 800; color: #000; }

.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 700; font-family: var(--font-mono); font-size: 0.85rem; margin-bottom: 8px;  }
input, textarea, select {
  width: 100%;
  padding: 12px 16px;
  border: var(--border-width) solid #000;
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
  outline: none;
}
input:focus, textarea:focus { background: #f8fafc; }

/* ===== Layout ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Landing Hero */
.hero {
  padding: 80px 0;
  border-bottom: var(--border-width) solid #000;
  background: #f0f9ff;
  text-align: left;
}
.hero h1 { font-size: clamp(2.5rem, 8vw, 4.5rem); line-height: 1; margin-bottom: 24px; }
.hero p { font-size: 1.25rem; max-width: 600px; margin-bottom: 32px; font-weight: 500; }

/* App Shell */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px;
  background: #fff;
  border-right: var(--border-width) solid #000;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  flex-shrink: 0;
  z-index: 100;
}
.sidebar .brand {
  font-weight: 900;
  font-size: 1.25rem;
  margin-bottom: 40px;
  padding: 0 10px;
  
  border-bottom: var(--border-width) solid #000;
  padding-bottom: 16px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  color: #000;
  text-decoration: none;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  
  border: var(--border-width) solid transparent;
  margin-bottom: 8px;
  transition: all 0.1s;
}
.nav-item:hover { background: #f1f5f9; border-color: #000; transform: translate(-2px, -2px); box-shadow: 4px 4px 0px #000; }
.nav-item.active { background: var(--primary); color: #fff; border-color: #000; transform: translate(-2px, -2px); box-shadow: 4px 4px 0px #000; }

.main { flex: 1; padding: 48px 64px; background: #f8fafc; }
.main h1 { font-size: 2rem; margin-bottom: 8px; border-bottom: var(--border-width) solid #000; display: inline-block; padding-bottom: 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; margin-bottom: 32px; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 32px; }
.page-sub { font-family: var(--font-mono); font-weight: 500; color: var(--ink-soft); margin-bottom: 40px; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin-top: 16px; border: var(--border-width) solid #000; }
th { background: #000; color: #fff; text-align: left; padding: 14px 16px; font-family: var(--font-mono); font-size: 0.75rem;  }
td { padding: 14px 16px; border-bottom: 1px solid #000; background: #fff; font-size: 0.9rem; }
tr:last-child td { border-bottom: none; }

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.7rem;
  
  border: 2px solid #000;
}
.badge-success { background: var(--success); color: #fff; }
.badge-pending { background: var(--accent); color: #000; }
.badge-danger { background: var(--danger); color: #fff; }
.room-card.selected { background: var(--accent) !important; box-shadow: 4px 4px 0 #000; transform: translate(-2px, -2px); }

/* Mobile Hamburger */
.hamburger {
  display: none;
  background: #fff;
  border: var(--border-width) solid #000;
  width: 48px; height: 48px;
  cursor: pointer;
  box-shadow: 4px 4px 0px #000;
}
.hamburger:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0px #000; }

@media (max-width: 1024px) {
  .main { padding: 32px 24px; }
  .sidebar { width: 240px; }
}

@media (max-width: 768px) {
  .app-shell { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: relative; border-right: none; border-bottom: var(--border-width) solid #000;
    padding: 16px 20px;
  }
  .side-topbar { display: flex; justify-content: space-between; align-items: center; }
  .hamburger { display: block; }
  .side-nav { display: none; margin-top: 20px; }
  .nav-open .side-nav { display: block; }
  .main { padding: 24px 20px; }
  .hero { text-align: center; }
  .hero h1 { font-size: 2.8rem; }
}

/* Toast Neo */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px);
  background: #000; color: #fff;
  padding: 16px 24px;
  border: var(--border-width) solid #fff;
  box-shadow: 8px 8px 0px rgba(0,0,0,0.2);
  font-family: var(--font-mono);
  font-weight: 700;
  z-index: 10000;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); color: #000; border-color: #000; }
.toast.error { background: var(--danger); color: #fff; border-color: #000; }

/* News & Leaderboard Items (Neo) */
.news-item { border-bottom: 2px solid #000; padding: 16px 0; }
.news-item:last-child { border-bottom: none; }
.news-item h3 { font-size: 1.1rem; margin-bottom: 4px; }
.news-item .meta { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-soft); margin-bottom: 8px; }

.lb-row { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border: var(--border-width) solid #000; margin-bottom: 8px; background: #fff; }
.lb-row.first { background: var(--accent); box-shadow: 4px 4px 0 #000; }
.lb-row .rank { font-weight: 900; font-family: var(--font-mono); width: 30px; }
.lb-row .name { flex: 1; font-weight: 700; }
.lb-row .count { font-family: var(--font-mono); font-size: 0.8rem; }
.lb-row .reward { font-weight: 800; color: var(--primary-dark); }

.banner { background: #000; color: #fff; padding: 12px 20px; font-family: var(--font-mono); font-size: 0.85rem; border: var(--border-width) solid #000; margin-bottom: 32px; box-shadow: 6px 6px 0 var(--accent); }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: #fff; border-left: var(--border-width) solid #000; }
::-webkit-scrollbar-thumb { background: #000; border: 2px solid #fff; }


/* ===== SetorEmail Responsive Motion Layer ===== */
:root {
  --ease-snap: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-pop: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
.container { width: 100%; min-width: 0; }
.main { min-width: 0; }

/* High-contrast decorative motion for the public landing page. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border: var(--border-width) solid #000;
}
.hero::before {
  width: 170px;
  height: 170px;
  right: 7%;
  top: 96px;
  background: var(--accent);
  box-shadow: 10px 10px 0 #000;
  transform: rotate(9deg);
  animation: se-float 4.8s ease-in-out infinite;
}
.hero::after {
  width: 120px;
  height: 120px;
  right: 23%;
  bottom: 34px;
  background: repeating-linear-gradient(135deg, #fff 0 8px, #000 8px 10px);
  transform: rotate(-14deg);
  opacity: .13;
  animation: se-drift 7s ease-in-out infinite reverse;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 span { display: inline-block; transform-origin: center; animation: se-breathe 3.6s ease-in-out infinite; }

/* Entrance cascade: transform and opacity only, keeping layout stable. */
.hero .container > * { animation: se-rise .6s var(--ease-snap) both; }
.hero .container > :nth-child(1) { animation-delay: 60ms; }
.hero .container > :nth-child(2) { animation-delay: 130ms; }
.hero .container > :nth-child(3) { animation-delay: 200ms; }
.hero .container > :nth-child(4) { animation-delay: 270ms; }
.hero .cards .info-card { animation: se-rise .55s var(--ease-snap) both; }
.hero .cards .info-card:nth-child(1) { animation-delay: 340ms; }
.hero .cards .info-card:nth-child(2) { animation-delay: 410ms; }
.hero .cards .info-card:nth-child(3) { animation-delay: 480ms; }
.hero .cards .info-card:nth-child(4) { animation-delay: 550ms; }

.btn,
.nav-item,
.info-card,
.feature,
.step,
.panel,
.hamburger,
.close-x {
  transition: transform .18s var(--ease-snap), box-shadow .18s var(--ease-snap), background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -120%;
  width: 55%;
  pointer-events: none;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
}
.btn:hover::after { animation: se-sheen .58s ease-out; }
.btn:active { transform: translate(3px, 3px) scale(.98); }
.info-card:hover { transform: translate(-3px, -5px); box-shadow: 9px 11px 0 #000; }
.feature { animation: se-rise .6s var(--ease-snap) both; }
.feature:nth-child(1) { animation-delay: 80ms; }
.feature:nth-child(2) { animation-delay: 150ms; }
.feature:nth-child(3) { animation-delay: 220ms; }
.feature:hover { transform: translate(-4px, -5px); box-shadow: 12px 13px 0 #000; background: #f8fbff; }
.feature .ico { display: inline-block; animation: se-float 3.2s ease-in-out infinite; }
.feature:nth-child(2) .ico { animation-delay: -1.1s; }
.feature:nth-child(3) .ico { animation-delay: -2.1s; }
.step { animation: se-rise .58s var(--ease-snap) both; }
.step:nth-child(1) { animation-delay: 90ms; }
.step:nth-child(2) { animation-delay: 160ms; }
.step:nth-child(3) { animation-delay: 230ms; }
.step:hover { transform: translateY(-5px); box-shadow: 7px 8px 0 #000; }
.step::before { transition: transform .18s var(--ease-pop), background-color .18s ease; }
.step:hover::before { transform: rotate(8deg) scale(1.08); background: #fff; }

/* Dashboard and admin: prevent narrow screens from forcing horizontal layout. */
.admin-grid { grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr)); }
.cards { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.panel, .admin-grid > *, .cards > *, .feature, .step { min-width: 0; }
.panel { overflow-wrap: anywhere; }
.panel:hover { transform: translateY(-2px); box-shadow: 8px 8px 0 #000; }

/* Tables remain readable without widening the page. */
table { max-width: 100%; }
@media (max-width: 768px) {
  .container { padding-left: 20px; padding-right: 20px; }
  .hero { padding: 56px 0 48px; }
  .hero h1 { font-size: clamp(2.2rem, 10vw, 3.6rem); line-height: .98; }
  .hero h1 span { padding-left: 8px !important; padding-right: 8px !important; }
  .hero p { font-size: 1rem; max-width: 45rem; }
  .hero .container > div:last-child { gap: 12px !important; margin-top: 28px !important; }
  .hero .container > div:last-child .btn { flex: 1 1 220px; min-height: 50px; }
  .hero::before { width: 110px; height: 110px; right: -20px; top: 88px; }
  .hero::after { width: 80px; height: 80px; right: 23px; bottom: 25px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .info-card { padding: 16px; }
  .info-card .val { font-size: clamp(1.25rem, 4vw, 1.65rem); }
  .section { padding: 56px 0; }
  .features { grid-template-columns: 1fr; gap: 20px; margin-top: 32px; }
  .feature { padding: 24px; box-shadow: 6px 6px 0 #000; }
  .steps { grid-template-columns: 1fr; gap: 20px; margin-top: 32px; }
  .step { padding: 22px; }
  table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  th, td { padding: 12px; }
  .lb-row { gap: 10px; padding: 11px 12px; }
  .lb-row .name { overflow-wrap: anywhere; }
  .banner { margin-bottom: 24px; padding: 12px 14px; }
  .panel { padding: 20px; margin-bottom: 24px; }
  .modal { width: min(450px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; padding: 28px 20px; }
  .toast { width: calc(100vw - 32px); max-width: 420px; bottom: 16px; padding: 13px 16px; text-align: center; }
  .nav-open .side-nav { animation: se-nav-in .22s var(--ease-snap) both; }
}

@media (max-width: 480px) {
  .container { padding-left: 14px; padding-right: 14px; }
  .main { padding: 20px 14px; }
  .hero { padding-top: 44px; }
  .hero h1 { font-size: clamp(2rem, 12.6vw, 3rem); }
  .hero p { font-size: .95rem; }
  .hero .container > div:last-child .btn { flex-basis: 100%; width: 100%; }
  .cards { grid-template-columns: 1fr; gap: 12px; }
  .info-card { min-height: 0; }
  .section { padding: 44px 0; }
  .section h2 { font-size: clamp(1.75rem, 9vw, 2.25rem); }
  .feature { padding: 20px; }
  .feature .ico { font-size: 2rem; margin-bottom: 14px; }
  .panel { padding: 16px; box-shadow: 4px 4px 0 #000; }
  .main h1 { font-size: clamp(1.55rem, 8vw, 2rem); }
  .page-sub { margin-bottom: 24px; font-size: .9rem; }
  .sidebar { padding-left: 14px; padding-right: 14px; }
  .side-topbar { gap: 12px; }
  .sidebar .brand { margin-bottom: 24px; font-size: 1.05rem; }
  .nav-item { padding: 12px; font-size: .78rem; }
  .hamburger { width: 44px; height: 44px; }
  .badge { white-space: normal; }
}

@keyframes se-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes se-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-7px) rotate(-3deg); }
}
@keyframes se-drift {
  0%, 100% { transform: translate(0, 0) rotate(-14deg); }
  50% { transform: translate(-16px, 13px) rotate(-7deg); }
}
@keyframes se-breathe {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(-1deg); }
}
@keyframes se-sheen {
  from { left: -120%; }
  to { left: 150%; }
}
@keyframes se-nav-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}


/* ===== Final responsive polish ===== */
html, body { max-width: 100%; }
img, svg, video, canvas { max-width: 100%; height: auto; }
.hero h1 { text-wrap: balance; overflow-wrap: anywhere; }
.hero .container, .section .container { min-width: 0; }

/* Keep key copy readable on the first paint while retaining the entrance motion. */
@keyframes se-rise {
  from { opacity: 1; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .hero::before {
    width: 92px;
    height: 92px;
    right: -36px;
    top: auto;
    bottom: 92px;
  }
  .hero::after {
    width: 72px;
    height: 72px;
    right: 18px;
    bottom: 28px;
  }
  .hero .container > div:last-child { display: flex; flex-wrap: wrap; }
  .hero .container > div:last-child .btn { min-width: 0; }
  .main, .panel { min-width: 0; }
  .admin-grid { gap: 22px; }
}

@media (max-width: 480px) {
  .hero::before {
    width: 62px;
    height: 62px;
    right: -28px;
    bottom: 82px;
    box-shadow: 6px 6px 0 #000;
  }
  .hero::after {
    width: 58px;
    height: 58px;
    right: 12px;
    bottom: 22px;
  }
  .hero h1 span { padding-left: 5px !important; padding-right: 5px !important; }
  .hero .container > div:last-child { margin-top: 24px !important; }
  .hero .container > div:last-child .btn { flex: 1 1 100%; }
  .cards { grid-template-columns: 1fr; }
  .feature, .step { width: 100%; }
  .lb-row { align-items: flex-start; flex-wrap: wrap; }
  .lb-row .name { min-width: 0; flex-basis: calc(100% - 46px); }
  .lb-row .count, .lb-row .reward { margin-left: 46px; }
  .toast { left: 16px; right: 16px; width: auto; transform: translateY(100px); }
  .toast.show { transform: translateY(0); }
}

@media (max-width: 360px) {
  .container { padding-left: 12px; padding-right: 12px; }
  .hero { padding-top: 36px; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: .9rem; }
  .info-card, .feature, .step, .panel { padding: 14px; }
  .btn { font-size: .78rem; padding: 11px 14px; }
  .main h1 { font-size: 1.45rem; }
}


/* Keep decorative blocks away from copy and controls on compact screens. */
@media (max-width: 768px) {
  .hero::before { right: -48px; bottom: -20px; width: 72px; height: 72px; }
}
@media (max-width: 480px) {
  .hero::before { display: none; }
}
