/* LAS Message — reaproveita o design system do LAS Hub Site (mesmas fontes/cores) */
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #0a0a0b;
  --fg: #f2f2f0;
  --primary: #3ecf7e;
  --primary-2: #2fae68;
  --primary-fg: #0a0a0b;
  --danger: #ff6e6e;
  --card: #131315;
  --card-2: #17171a;
  --muted: #8a8a88;
  --muted-2: #6a6a68;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --radius: 0.875rem;
  --radius-lg: 1.25rem;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-family: var(--font-head); font-weight: 700; letter-spacing: -0.02em; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.hidden { display: none !important; }

/* ---------- Telas públicas (login/signup) ---------- */
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(62, 207, 126, 0.10), transparent 70%),
    var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.6rem;
}
.brand .dot {
  width: 0.6rem; height: 0.6rem; border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 12px rgba(62, 207, 126, 0.7);
}
.brand span { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; }
.auth-card h1 { font-size: 1.4rem; margin-bottom: 0.35rem; }
.auth-card .sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.5rem; }

.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 0.4rem; }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--card-2);
  border: 1px solid var(--border-strong);
  color: var(--fg);
  border-radius: 0.6rem;
  padding: 0.7rem 0.85rem;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.12s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); }
.field textarea { resize: vertical; min-height: 4.5rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1.2rem;
  border-radius: 0.65rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  background: var(--primary);
  color: var(--primary-fg);
  transition: transform 0.1s, opacity 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.btn.secondary { background: transparent; border-color: var(--border-strong); color: var(--fg); }
.btn.danger { background: transparent; border-color: rgba(255, 110, 110, 0.4); color: var(--danger); }
.btn.small { width: auto; padding: 0.5rem 0.9rem; font-size: 0.85rem; }

.auth-switch { margin-top: 1.3rem; text-align: center; font-size: 0.87rem; color: var(--muted); }
.auth-switch a { color: var(--primary); font-weight: 600; text-decoration: none; cursor: pointer; }

.alert {
  border-radius: 0.55rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 110, 110, 0.3);
  background: rgba(255, 110, 110, 0.08);
  color: #ffb3b3;
}
.alert.ok {
  border-color: rgba(62, 207, 126, 0.35);
  background: rgba(62, 207, 126, 0.08);
  color: #a6f0c6;
}

/* ---------- App logado ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 1.4rem 1rem;
  display: flex;
  flex-direction: column;
}
.sidebar .brand { padding: 0 0.4rem; margin-bottom: 2rem; }
.nav-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.65rem 0.8rem;
  border-radius: 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 0.2rem;
}
.nav-item:hover { color: var(--fg); background: var(--card-2); }
.nav-item.active { color: var(--primary-fg); background: var(--primary); font-weight: 600; }
.sidebar-footer { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border); }
.sidebar-footer .email { font-size: 0.78rem; color: var(--muted-2); word-break: break-all; margin-bottom: 0.6rem; }

.main { flex: 1; padding: 2.2rem 2.6rem; max-width: 980px; }
.main h2 { font-size: 1.5rem; margin-bottom: 0.3rem; }
.main .sub { color: var(--muted); margin-bottom: 1.8rem; font-size: 0.92rem; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  margin-bottom: 1.2rem;
}
.card-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.card h3 { font-size: 1rem; margin-bottom: 0.2rem; }
.card .muted { color: var(--muted); font-size: 0.85rem; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
}
.badge.sent { background: rgba(62, 207, 126, 0.12); color: var(--primary); }
.badge.failed { background: rgba(255, 110, 110, 0.12); color: var(--danger); }

table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
th, td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.8rem; }
.media-item {
  border: 1px solid var(--border-strong);
  border-radius: 0.7rem;
  overflow: hidden;
  cursor: pointer;
  background: var(--card-2);
  transition: border-color 0.12s;
}
.media-item.selected { border-color: var(--primary); }
.media-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.media-item .cap { padding: 0.4rem 0.5rem; font-size: 0.72rem; color: var(--muted); }

.toast {
  position: fixed; bottom: 1.4rem; right: 1.4rem;
  background: var(--card-2);
  border: 1px solid var(--border-strong);
  padding: 0.75rem 1.1rem;
  border-radius: 0.6rem;
  font-size: 0.85rem;
  max-width: 320px;
  z-index: 50;
}
.toast.ok { border-color: rgba(62, 207, 126, 0.4); }
.toast.error { border-color: rgba(255, 110, 110, 0.4); color: #ffb3b3; }

@media (max-width: 760px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; overflow-x: auto; }
  .sidebar .brand, .sidebar-footer { display: none; }
  .main { padding: 1.4rem; }
  .grid-2 { grid-template-columns: 1fr; }
}
