@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700&display=swap');

:root {
  --ink: #1b1f23;
  --muted: #5f6b7a;
  --surface: #f5f7fb;
  --panel: #ffffff;
  --line: #dbe2ea;
  --brand-primary: #0f6cbd;
  --brand-secondary: #0067b8;
  --accent: #0f6cbd;
  --accent-soft: #e8f2fb;
  --power-blue: var(--brand-primary);
  --power-blue-strong: var(--brand-secondary);
  --power-black: var(--ink);

  /* Workspace Alerts: user-customizable colors (saved in localStorage) */
  --alerts-author-bg: #f7f3cf;
  --alerts-author-border: rgba(245, 208, 94, 0.45);
  --alerts-assignee-bg: #79c3aa;
  --alerts-assignee-border: rgba(16, 185, 129, 0.38);
  --alerts-assignee-text: #05302a;
  --alerts-assignee-muted: rgba(5, 48, 42, 0.7);
  --radius-sm: 5px;
  --radius-md: 7px;
  --radius-lg: 9px;
  --shadow-xs: 0 2px 6px rgba(15, 108, 189, 0.08);
  --shadow-sm: 0 4px 10px rgba(15, 108, 189, 0.1);
  --shadow-md: 0 8px 20px rgba(15, 108, 189, 0.12);
  --shadow-lg: 0 12px 30px rgba(15, 108, 189, 0.16);
  --shadow: var(--shadow-md);

  /* Scrollbar (default = light theme) */
  --scroll-track: rgba(15, 23, 42, 0.06);
  --scroll-thumb: rgba(15, 108, 189, 0.35);
  --scroll-thumb-hover: rgba(15, 108, 189, 0.55);
}

* {
  box-sizing: border-box;
}

/* evita scroll fantasma */
html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: 'Manrope', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 20%, rgba(15, 108, 189, 0.12), transparent 42%),
    radial-gradient(circle at 90% 10%, rgba(0, 120, 212, 0.14), transparent 40%),
    linear-gradient(135deg, #f5f7fb, #eef3f9);
}

/* Scrollbar theming (Firefox + WebKit). Dark pages override vars. */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--scroll-track);
}

::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 999px;
  border: 2px solid var(--scroll-track);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
}

/* área principal cobre a tela sem ultrapassar */
main {
  min-height: calc(100vh - 72px); /* altura da top-nav */
  background: #ffffff;
}

/* ===================== WORKSPACE THEME (Portal/Admin) ===================== */

/* Dark theme matches the DataGLAM landing (glass + deep navy). */
body.theme-dark-glass {
  color-scheme: dark;
  color: rgba(248, 250, 252, 0.96);

  /* Keep these generic tokens usable by pages that rely on theme.css. */
  --ink: rgba(248, 250, 252, 0.96);
  --muted: rgba(226, 232, 240, 0.72);
  --surface: transparent;
  --panel: rgba(255, 255, 255, 0.06);
  --line: rgba(148, 163, 184, 0.18);

  /* Scrollbar */
  --scroll-track: rgba(2, 6, 23, 0.70);
  --scroll-thumb: rgba(114, 183, 178, 0.40);
  --scroll-thumb-hover: rgba(114, 183, 178, 0.70);

  background:
    radial-gradient(1200px 520px at 10% 0%, rgba(15, 108, 189, 0.32), transparent 60%),
    radial-gradient(1000px 520px at 90% 10%, rgba(114, 183, 178, 0.24), transparent 60%),
    radial-gradient(900px 520px at 50% 120%, rgba(212, 163, 115, 0.16), transparent 55%),
    linear-gradient(135deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.98));
}

body.theme-dark-glass input,
body.theme-dark-glass select,
body.theme-dark-glass textarea {
  background: rgba(2, 6, 23, 0.35);
  border-color: rgba(148, 163, 184, 0.22);
  color: rgba(248, 250, 252, 0.96);
}

body.theme-dark-glass input::placeholder,
body.theme-dark-glass textarea::placeholder {
  color: rgba(226, 232, 240, 0.58);
}

/* The light theme uses a white "main" slab, but dark needs the background to show through. */
body.theme-dark-glass main {
  background: transparent;
}

/* ===================== AUTH (Login/Register) ===================== */

body.auth-glass {
  background:
    radial-gradient(1200px 520px at 10% 0%, rgba(15, 108, 189, 0.28), transparent 60%),
    radial-gradient(1000px 520px at 90% 10%, rgba(114, 183, 178, 0.20), transparent 60%),
    radial-gradient(900px 520px at 50% 120%, rgba(212, 163, 115, 0.14), transparent 55%),
    linear-gradient(135deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.98));
  color: rgba(248, 250, 252, 0.96);
  color-scheme: dark;

  --auth-input-bg: rgba(2, 6, 23, 0.52);

  --scroll-track: rgba(2, 6, 23, 0.65);
  --scroll-thumb: rgba(114, 183, 178, 0.45);
  --scroll-thumb-hover: rgba(114, 183, 178, 0.72);
}

/* Landing page uses its own CSS, but keep scrollbars consistent with the dark theme. */
body.landing-glass {
  --scroll-track: rgba(2, 6, 23, 0.70);
  --scroll-thumb: rgba(114, 183, 178, 0.40);
  --scroll-thumb-hover: rgba(114, 183, 178, 0.70);
}

body.auth-glass main {
  background: transparent;
  min-height: 100vh;
  padding: 42px 18px 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Long forms (register, reset password, etc.) should start closer to the top. */
body.auth-glass.auth-long main { align-items: flex-start; }

.auth-shell {
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 26px;
  align-items: stretch;
}

.auth-shell--stack {
  width: min(1200px, 100%);
  grid-template-columns: 1fr;
}

.auth-shell--stack .auth-copy,
.auth-shell--stack .auth-card {
  width: 100%;
}

.auth-copy,
.auth-card {
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 26px 80px rgba(2, 6, 23, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.auth-copy {
  padding: 24px 24px 22px;
  position: relative;
  overflow: hidden;
}

.auth-copy::before {
  content: "";
  position: absolute;
  inset: -1px;
  background:
    radial-gradient(560px 280px at 18% 18%, rgba(15, 108, 189, 0.30), transparent 60%),
    radial-gradient(520px 260px at 88% 10%, rgba(114, 183, 178, 0.18), transparent 65%);
  opacity: 0.9;
  pointer-events: none;
}

.auth-copy > * { position: relative; }

.auth-eyebrow {
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 800;
  color: rgba(226, 232, 240, 0.88);
}

.auth-title {
  font-family: 'Manrope', sans-serif;
  font-size: 36px;
  line-height: 1.08;
  margin: 10px 0 12px;
  letter-spacing: -0.02em;
  text-shadow: 0 14px 36px rgba(2, 6, 23, 0.65);
}

.auth-subtitle {
  margin: 0;
  color: rgba(226, 232, 240, 0.74);
  line-height: 1.65;
  font-size: 15px;
}

.auth-bullets {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.auth-bullets li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: rgba(226, 232, 240, 0.78);
  line-height: 1.55;
  font-size: 13px;
}

.auth-bullets li svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: rgba(114, 183, 178, 0.95);
}

.auth-card {
  padding: 22px 22px 18px;
  display: grid;
  gap: 16px;
}

.auth-card form {
  display: grid;
  gap: 14px;
  margin-top: 4px;
}

.auth-submit { margin-top: 6px; }

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.auth-brand strong {
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: rgba(248, 250, 252, 0.96);
}

.auth-brand small {
  display: block;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.74);
  margin-top: 2px;
}

.auth-field {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
  color: rgba(226, 232, 240, 0.78);
}

.auth-field input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: var(--auth-input-bg);
  color: rgba(248, 250, 252, 0.96);
  outline: none;
}

.auth-field input::placeholder { color: rgba(226, 232, 240, 0.42); }

.auth-field input:focus {
  border-color: rgba(114, 183, 178, 0.55);
  box-shadow: 0 0 0 3px rgba(114, 183, 178, 0.14);
}

body.auth-glass .btn {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.30);
  color: rgba(226, 232, 240, 0.92);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.35);
}

body.auth-glass .btn:hover {
  border-color: rgba(226, 232, 240, 0.24);
  background: rgba(2, 6, 23, 0.42);
  box-shadow: 0 20px 55px rgba(2, 6, 23, 0.45);
}

body.auth-glass .btn-primary {
  background: linear-gradient(135deg, rgba(15, 108, 189, 0.92), rgba(0, 120, 212, 0.92));
  border: 1px solid rgba(15, 108, 189, 0.55);
  color: #fff;
  box-shadow: 0 22px 70px rgba(15, 108, 189, 0.30);
}

body.auth-glass .btn-primary:hover {
  background: linear-gradient(135deg, rgba(15, 108, 189, 0.98), rgba(0, 120, 212, 0.98));
  border-color: rgba(226, 232, 240, 0.28);
}

.auth-alert {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.12);
  color: rgba(254, 226, 226, 0.96);
  font-size: 13px;
  font-weight: 800;
}

.auth-notice {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(16, 185, 129, 0.40);
  background: rgba(16, 185, 129, 0.10);
  color: rgba(167, 243, 208, 0.96);
  font-size: 13px;
  font-weight: 900;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}

.auth-links--start { justify-content: flex-start; }
.auth-submit { width: 100%; }

.auth-link {
  font-size: 12px;
  font-weight: 900;
  color: rgba(226, 232, 240, 0.86);
}

.auth-link:hover { text-decoration: underline; }

.auth-footnote {
  margin: 0;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.66);
  line-height: 1.5;
}

/* Registration helper components (kept generic but scoped by .auth-glass usage) */
body.auth-glass .section-title {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin: 10px 0 8px;
  color: rgba(248, 250, 252, 0.96);
}

body.auth-glass .form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
body.auth-glass .form-grid.form-grid--1 { grid-template-columns: 1fr; }
body.auth-glass .form-grid.form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.auth-glass .form-grid.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 980px) {
  body.auth-glass .form-grid.form-grid--2,
  body.auth-glass .form-grid.form-grid--3 { grid-template-columns: 1fr; }
}

body.auth-glass .form-field {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
  color: rgba(226, 232, 240, 0.78);
}

body.auth-glass .form-field input,
body.auth-glass .form-field select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: var(--auth-input-bg);
  color: rgba(248, 250, 252, 0.96);
  outline: none;
}

/* Some browsers allow styling option list; keep it dark where supported. */
body.auth-glass select option {
  background: rgba(2, 6, 23, 0.98);
  color: rgba(248, 250, 252, 0.96);
}

/* Keep browser autofill aligned with the dark auth theme. */
body.auth-glass input:-webkit-autofill,
body.auth-glass input:-webkit-autofill:hover,
body.auth-glass input:-webkit-autofill:focus {
  -webkit-text-fill-color: rgba(248, 250, 252, 0.96);
  -webkit-box-shadow: 0 0 0px 1000px rgba(2, 6, 23, 0.35) inset;
  transition: background-color 9999s ease-in-out 0s;
}

body.auth-glass .form-field input:focus,
body.auth-glass .form-field select:focus {
  border-color: rgba(114, 183, 178, 0.55);
  box-shadow: 0 0 0 3px rgba(114, 183, 178, 0.14);
}

body.auth-glass .note {
  margin: 0;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.66);
  line-height: 1.5;
}

body.auth-glass .hidden { display: none !important; }

body.auth-glass .is-invalid {
  border-color: rgba(239, 68, 68, 0.75) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

body.auth-glass .field-error {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 900;
  color: rgba(254, 202, 202, 0.96);
}

@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-title { font-size: 30px; }
}

/* ===================== COMPONENTES ===================== */

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 108, 189, 0.4);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-secondary), var(--brand-primary));
  border: none;
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: #ffffff;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 12px;
}

.nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.section-title {
  font-family: 'Manrope', sans-serif;
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 4px;
}

.section-subtitle {
  color: var(--muted);
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.is-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.field-error {
  color: #b91c1c;
  font-size: 12px;
  margin-top: 4px;
  font-weight: 700;
}

/* ===================== TOP NAV ===================== */

.top-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.top-nav-inner {
  width: 100%;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--power-black);
}

.brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 10px;
  align-items: center;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 13px;
}

.nav-links a:hover {
  border-color: rgba(15, 108, 189, 0.35);
  background: var(--accent-soft);
}

.nav-toggle {
  display: none;
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: flex-start;
  }

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

/* ===================== ELEMENTOS ===================== */

.panel,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.hero {
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(235,244,255,0.95));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 20px;
}

input,
select,
textarea {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

/* ===================== UTILIDADES ===================== */

.hidden { display: none; }
.inline-block { display: inline-block; }
.overflow-x { overflow-x: auto; }

.flex-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.align-end { align-items: flex-end; }
.align-start { align-items: flex-start; }

.mt-6 { margin-top: 6px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-10 { margin-bottom: 10px; }
.mb-12 { margin-bottom: 12px; }
.ml-auto { margin-left: auto; }

.full-row { grid-column: 1 / -1; }

/* ===================== TABLE COMPONENT (shared) ===================== */

/* wrapper para evitar quebrar layout em telas pequenas */
.table-wrapper,
.table-wrap{
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
}

.table-wrapper--scroll{
  overflow: auto;
  max-height: min(70vh, 720px);
}

/* tabela padrão do workspace */
.table-cards,
.ws-table,
.admin-table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--line-color, var(--line));
  border-radius: 14px;
  background: #fff;
  min-width: 720px;
}

/* quando a tabela for pequena, pode remover min-width no HTML adicionando class ws-table--auto */
.ws-table--auto{ min-width: 0 !important; }

.table-cards thead th,
.ws-table thead th,
.admin-table thead th{
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(245,247,251,0.96));
  color: var(--text-muted, var(--muted));
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line-color, var(--line));
}

.table-cards th, .table-cards td,
.ws-table th, .ws-table td,
.admin-table th, .admin-table td{
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line-color, var(--line));
  vertical-align: middle;
  color: var(--text-ink, var(--ink));
  font-size: 14px;
}

.table-cards tbody tr:nth-child(even),
.ws-table tbody tr:nth-child(even),
.admin-table tbody tr:nth-child(even){
  background: rgba(245,247,251,0.55);
}

.table-cards tbody tr:hover,
.ws-table tbody tr:hover,
.admin-table tbody tr:hover{
  background: rgba(232,242,251,0.75);
}

.inline-actions,
.table-actions{
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

/* coluna de ações alinhada à direita */
.table-cards td:last-child,
.ws-table td:last-child,
.admin-table td:last-child{
  text-align: right;
}

/* cell com avatar + nome */
.table-name{
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-weight: 700;
}

.table-avatar{
  width: 32px;
  height: 32px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--line-color, var(--line));
  background: #fff;
}

/* Dark glass: tables should not render as white blocks. */
body.theme-dark-glass .table-wrapper,
body.theme-dark-glass .table-wrap{
  border: 1px solid rgba(148, 163, 184, 0.18);
}

body.theme-dark-glass .table-cards,
body.theme-dark-glass .ws-table,
body.theme-dark-glass .admin-table{
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  box-shadow: 0 26px 80px rgba(2, 6, 23, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.theme-dark-glass .table-cards thead th,
body.theme-dark-glass .ws-table thead th,
body.theme-dark-glass .admin-table thead th{
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.65), rgba(2, 6, 23, 0.35)) !important;
  color: rgba(226, 232, 240, 0.80) !important;
  border-bottom-color: rgba(148, 163, 184, 0.18) !important;
}

body.theme-dark-glass .table-cards th,
body.theme-dark-glass .table-cards td,
body.theme-dark-glass .ws-table th,
body.theme-dark-glass .ws-table td,
body.theme-dark-glass .admin-table th,
body.theme-dark-glass .admin-table td{
  color: rgba(248, 250, 252, 0.92) !important;
  border-bottom-color: rgba(148, 163, 184, 0.18) !important;
}

body.theme-dark-glass .table-cards tbody tr:nth-child(even),
body.theme-dark-glass .ws-table tbody tr:nth-child(even),
body.theme-dark-glass .admin-table tbody tr:nth-child(even){
  background: rgba(2, 6, 23, 0.18) !important;
}

body.theme-dark-glass .table-cards tbody tr:hover,
body.theme-dark-glass .ws-table tbody tr:hover,
body.theme-dark-glass .admin-table tbody tr:hover{
  background: rgba(255, 255, 255, 0.08) !important;
}

body.theme-dark-glass .table-avatar{
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
}

/* status pill */
.pill{
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  background: #F1F5F9;
  color: var(--text-muted, var(--muted));
  border: 1px solid var(--line-color, var(--line));
}

.pill-ok {
  background: #DCFCE7;
  border-color: #BBF7D0;
  color: #166534;
}

.help-step-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.help-mt-12 {
  margin-top: 12px;
}

.help-form {
  margin: 0;
}

.help-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.help-card {
  background: #ffffff;
  border: 1px solid var(--line-color, var(--line));
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.theme-dark-glass .help-card {
  background: #0b1220;
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.35);
}

.help-card--wide {
  grid-column: 1 / -1;
}

.help-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.help-card-title {
  font-weight: 900;
}

.help-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line-color, var(--line));
  background:
    radial-gradient(circle at 10% 20%, rgba(15, 108, 189, 0.10), transparent 45%),
    radial-gradient(circle at 95% 10%, rgba(0, 120, 212, 0.10), transparent 35%),
    #ffffff;
  box-shadow: var(--shadow-xs);
}

body.theme-dark-glass .help-hero {
  border-color: rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(circle at 10% 20%, rgba(93, 169, 255, 0.18), transparent 45%),
    radial-gradient(circle at 95% 10%, rgba(46, 211, 198, 0.12), transparent 35%),
    #0b1220;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.35);
}

.help-hero-title {
  margin: 0 0 6px;
  font-weight: 900;
  font-size: 22px;
}

.help-hero-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.help-hero-meta {
  display: grid;
  gap: 10px;
  min-width: min(340px, 100%);
}

.help-progress-row {
  display: grid;
  gap: 6px;
}

.help-progress-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.help-progress {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line-color, var(--line));
  background: #f1f5f9;
}

.help-progress::-webkit-progress-bar {
  background: #f1f5f9;
}

.help-progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--brand-secondary), var(--brand-primary));
  border-radius: 999px;
}

.help-progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--brand-secondary), var(--brand-primary));
  border-radius: 999px;
}

.help-quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.help-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--line-color, var(--line));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  color: var(--brand-secondary);
  flex: 0 0 auto;
}

.help-card-icon svg {
  width: 18px;
  height: 18px;
}

.help-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.help-card-head-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.help-bullets {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  display: grid;
  gap: 6px;
}

.help-faq {
  border: 1px solid var(--line-color, var(--line));
  border-radius: 16px;
  padding: 12px 14px;
  background: #ffffff;
}

body.theme-dark-glass .help-faq {
  background: #0b1220;
  border-color: rgba(148, 163, 184, 0.18);
}

.help-faq summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--ink);
  list-style: none;
}

body.theme-dark-glass .help-faq summary {
  color: rgba(226, 232, 240, 0.9);
}

.help-faq summary::-webkit-details-marker {
  display: none;
}

.help-faq summary::after {
  content: '+';
  float: right;
  color: var(--muted);
  font-weight: 900;
}

.help-faq[open] summary::after {
  content: '-';
}

.help-faq p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.help-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.help-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-color, var(--line));
}

.help-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* simple onboarding/help modal (portal) */
.ws-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px 12px;
  z-index: 2000;
}

.ws-modal.is-open {
  display: flex;
}

.ws-modal-card {
  width: min(760px, 100%);
  background: #ffffff;
  border: 1px solid var(--line-color, var(--line));
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-lg);
}

body.theme-dark-glass .ws-modal-card {
  background: #0b1220 !important;
  border-color: #1f2a37 !important;
  box-shadow: 0 26px 80px rgba(2, 6, 23, 0.55);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.ws-modal-title {
  margin: 0 0 6px;
  font-weight: 900;
  font-size: 18px;
}

.ws-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.ws-checklist {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* mobile: esconde cabeçalho e usa data-label */
@media (max-width: 720px){
  .table-cards,
  .ws-table,
  .admin-table{
    min-width: 0;
    border: none;
    border-radius: 0;
  }

  .table-cards thead,
  .ws-table thead,
  .admin-table thead{
    display:none;
  }

  .table-cards tr,
  .ws-table tr,
  .admin-table tr{
    display:block;
    padding: 12px;
    border: 1px solid var(--line-color, var(--line));
    border-radius: 14px;
    background: #fff;
    margin-bottom: 10px;
  }

  .table-cards td,
  .ws-table td,
  .admin-table td{
    display:flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 0;
    padding: 8px 0;
    text-align: left !important;
  }

  .table-cards td::before,
  .ws-table td::before,
  .admin-table td::before{
    content: attr(data-label);
    color: var(--text-muted, var(--muted));
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
  }

  .inline-actions,
  .table-actions{
    width: 100%;
    justify-content: flex-start;
  }
}

/* alerts: kanban layout + comment preview */
.alerts-head-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.alerts-tabs {
  gap: 8px;
}

.alerts-recurring-board {
  margin-top: 8px;
}

.alerts-recurring-board .alerts-kanban {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .alerts-recurring-board .alerts-kanban { grid-template-columns: 1fr; }
}

.alerts-kanban {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

@media (max-width: 1100px) {
  .alerts-kanban {
    grid-template-columns: 1fr;
  }
}

.kanban-col {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line-color, var(--line));
  border-radius: 18px;
  overflow: hidden;
}

.kanban-col-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--line-color, var(--line));
  background: #ffffff;
}

.kanban-col-head--novo {
  background: linear-gradient(180deg, rgba(247, 243, 207, 0.75), #ffffff);
}

.kanban-col-head--analise {
  background: linear-gradient(180deg, rgba(219, 234, 254, 0.75), #ffffff);
}

.kanban-col-head--feito {
  background: linear-gradient(180deg, rgba(220, 252, 231, 0.75), #ffffff);
}

.kanban-col-title strong {
  display: block;
  font-weight: 900;
}

.kanban-col-body {
  display: grid;
  gap: 12px;
  padding: 12px 14px 14px;
  max-height: 62vh;
  overflow: auto;
}

.alert-card {
  background: #ffffff;
  border: 1px solid var(--line-color, var(--line));
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  display: grid;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.alert-card:not(.is-dragging):not(.is-updating):hover {
  border-color: rgba(15, 108, 189, 0.26);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.alert-card.is-dragging {
  opacity: 0.65;
  transform: rotate(-0.4deg);
}

.alert-card.is-just-moved {
  animation: wsCardPop 0.55s ease both;
}

.alert-card.is-updating {
  pointer-events: none;
  opacity: 0.78;
}

.alert-card.is-updating::after {
  content: "Salvando...";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.76);
  letter-spacing: .02em;
  z-index: 3;
}

.alert-card.is-updating::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(15, 23, 42, 0.18);
  border-top-color: rgba(15, 108, 189, 0.85);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, calc(-50% - 18px));
  animation: wsSpin 0.8s linear infinite;
  z-index: 4;
}

/* Dark glass: alerts/kanban surfaces must match the theme. */
body.theme-dark-glass .kanban-col{
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  box-shadow: 0 26px 80px rgba(2, 6, 23, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.theme-dark-glass .kanban-col-head{
  background: rgba(2, 6, 23, 0.45) !important;
  border-bottom-color: rgba(148, 163, 184, 0.18) !important;
  color: rgba(248, 250, 252, 0.96);
}

body.theme-dark-glass .kanban-col-head--novo{
  background: linear-gradient(180deg, rgba(245, 208, 94, 0.10), rgba(2, 6, 23, 0.45)) !important;
}

body.theme-dark-glass .kanban-col-head--analise{
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.14), rgba(2, 6, 23, 0.45)) !important;
}

body.theme-dark-glass .kanban-col-head--feito{
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.14), rgba(2, 6, 23, 0.45)) !important;
}

body.theme-dark-glass .alert-card{
  background: rgba(2, 6, 23, 0.38) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  box-shadow: 0 18px 55px rgba(2, 6, 23, 0.50);
  color: rgba(248, 250, 252, 0.92);
}

body.theme-dark-glass .alert-card:not(.is-dragging):not(.is-updating):hover{
  border-color: rgba(114, 183, 178, 0.55) !important;
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.62);
}

body.theme-dark-glass .alert-card.is-updating::after{
  background: rgba(2, 6, 23, 0.70) !important;
  color: rgba(248, 250, 252, 0.92) !important;
}

body.theme-dark-glass .alerts-filter-block{
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  box-shadow: 0 26px 80px rgba(2, 6, 23, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.theme-dark-glass .alerts-date,
body.theme-dark-glass .alerts-search-input,
body.theme-dark-glass .alerts-select,
body.theme-dark-glass .alerts-theme-field input[type="color"]{
  background: rgba(2, 6, 23, 0.35) !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
  color: rgba(248, 250, 252, 0.92) !important;
}

body.theme-dark-glass .alerts-filter-help{ color: rgba(226, 232, 240, 0.70); }

body.theme-dark-glass .alert-card.is-recurring{
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.10), rgba(2, 6, 23, 0.38)) !important;
  border-left-color: rgba(16, 185, 129, 0.60) !important;
}

body.theme-dark-glass .pill--recurring{
  color: rgba(167, 243, 208, 0.96);
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.28);
}

body.theme-dark-glass .recurring-title{ color: rgba(226, 232, 240, 0.78); }

body.theme-dark-glass .alerts-search-input,
body.theme-dark-glass .alerts-select{
  background: rgba(2, 6, 23, 0.35) !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
  color: rgba(248, 250, 252, 0.92) !important;
}

body.theme-dark-glass .alerts-assignee-summary{
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  box-shadow: 0 26px 80px rgba(2, 6, 23, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.theme-dark-glass .swimlane{
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
}

body.theme-dark-glass .swimlane-head{
  background: rgba(2, 6, 23, 0.45) !important;
  border-bottom-color: rgba(148, 163, 184, 0.18) !important;
  color: rgba(248, 250, 252, 0.96);
}

body.theme-dark-glass .ws-toast--error{
  background: rgba(127, 29, 29, 0.25);
  border-color: rgba(239, 68, 68, 0.45);
  color: rgba(254, 226, 226, 0.96);
}

body.theme-dark-glass .ws-toast--ok{
  background: rgba(6, 95, 70, 0.25);
  border-color: rgba(16, 185, 129, 0.42);
  color: rgba(209, 250, 229, 0.96);
}

/* ===================== DARK GLASS: Global forms + billing + alerts thread ===================== */

body.theme-dark-glass input,
body.theme-dark-glass select,
body.theme-dark-glass textarea {
  background: rgba(2, 6, 23, 0.35) !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
  color: rgba(248, 250, 252, 0.96) !important;
}

body.theme-dark-glass input::placeholder,
body.theme-dark-glass textarea::placeholder {
  color: rgba(226, 232, 240, 0.58) !important;
}

body.theme-dark-glass select option {
  color: #0f172a;
}

body.theme-dark-glass .hero {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 26px 80px rgba(2, 6, 23, 0.45);
}

body.theme-dark-glass .addon-card {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
}

body.theme-dark-glass .plan-tag {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(148, 163, 184, 0.28);
  color: rgba(226, 232, 240, 0.86);
}
body.theme-dark-glass .plan-tag.tag-cycle {
  border-color: rgba(114, 183, 178, 0.45);
  background: rgba(114, 183, 178, 0.18);
  color: rgba(226, 232, 240, 0.92);
}
body.theme-dark-glass .plan-tag.tag-recommended,
body.theme-dark-glass .plan-tag.tag-best {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(148, 163, 184, 0.16);
}
body.theme-dark-glass .plan-tag.tag-current {
  border-color: rgba(217, 129, 185, 0.45);
  background: rgba(217, 129, 185, 0.18);
  color: rgba(255, 228, 248, 0.95);
}

body.theme-dark-glass .receipts-table th,
body.theme-dark-glass .receipts-table td {
  border-bottom-color: rgba(148, 163, 184, 0.18);
  color: rgba(226, 232, 240, 0.86);
}

body.theme-dark-glass .alert-reply {
  background: rgba(2, 6, 23, 0.45) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  color: rgba(248, 250, 252, 0.92);
}
body.theme-dark-glass .alert-reply-msg { color: rgba(226, 232, 240, 0.86); }
body.theme-dark-glass .alert-thread-form textarea {
  background: rgba(2, 6, 23, 0.35) !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
  color: rgba(248, 250, 252, 0.96) !important;
}
body.theme-dark-glass .mentions-popover {
  background: rgba(2, 6, 23, 0.85) !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
  box-shadow: 0 26px 80px rgba(2, 6, 23, 0.65);
}
body.theme-dark-glass .mentions-search {
  background: rgba(2, 6, 23, 0.35) !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
  color: rgba(248, 250, 252, 0.92) !important;
}
body.theme-dark-glass .mentions-item {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
  color: rgba(226, 232, 240, 0.88) !important;
}
body.theme-dark-glass .mentions-item:hover {
  background: rgba(255, 255, 255, 0.10) !important;
  border-color: rgba(114, 183, 178, 0.55) !important;
}

@keyframes wsSpin {
  to { transform: translate(-50%, calc(-50% - 18px)) rotate(360deg); }
}

@keyframes wsCardPop {
  0% { transform: translateY(0); }
  35% { transform: translateY(-2px); box-shadow: 0 22px 46px rgba(15, 23, 42, 0.16); }
  100% { transform: translateY(0); }
}

.kanban-col.is-dragover {
  box-shadow: 0 0 0 3px rgba(15, 108, 189, 0.14);
  border-color: rgba(15, 108, 189, 0.35);
}

.alert-card-top {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.alert-people {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 520px) {
  .alert-people { grid-template-columns: 1fr; }
}

.alert-person {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-radius: 14px;
  border: 1px dashed rgba(100, 116, 139, 0.35);
  background: rgba(248, 250, 252, 0.8);
}

.alert-person--author {
  border-style: solid;
  border-color: var(--alerts-author-border);
  background: var(--alerts-author-bg);
}

.alert-person--assignee {
  border-style: solid;
  border-color: var(--alerts-assignee-border);
  background: var(--alerts-assignee-bg);
  color: var(--alerts-assignee-text);
}

.alert-person--assignee .muted {
  color: var(--alerts-assignee-muted);
}

.alert-person-value {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.alert-person-value strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .02em;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: rgba(15, 23, 42, 0.8);
  flex: 0 0 auto;
}

.alert-person--assignee .ws-avatar {
  color: var(--alerts-assignee-text);
}

.label-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.label-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  opacity: 0.8;
}

.alert-title {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.25;
}

.alert-title-text { min-width: 0; }

.kind-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(248, 250, 252, 0.92);
  color: rgba(15, 23, 42, 0.72);
}

.kind-badge--comment {
  background: rgba(59, 130, 246, 0.10);
  border-color: rgba(59, 130, 246, 0.22);
  color: rgb(255 255 255 / 92%);
}

.kind-badge--recurring {
  background: rgba(16, 185, 129, 0.10);
  border-color: rgba(16, 185, 129, 0.22);
  color: rgb(245 245 245 / 92%);
}

.kind-badge--planned {
  background: rgba(99, 102, 241, 0.10);
  border-color: rgba(99, 102, 241, 0.22);
  color: rgba(49, 46, 129, 0.92);
}

.title-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  opacity: 0.9;
}

.age-pill,
.date-pill {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
  color: rgba(15, 23, 42, 0.72);
}

.age-7 {
  border-left: 4px solid rgba(239, 68, 68, 0.55);
}

.age-3 {
  border-left: 4px solid rgba(245, 158, 11, 0.55);
}

.age-1 {
  border-left: 4px solid rgba(59, 130, 246, 0.45);
}

.age-0 {
  border-left: 4px solid rgba(16, 185, 129, 0.35);
}

.alert-context {
  display: grid;
  gap: 2px;
}

.alert-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.alert-meta-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.alert-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(248, 250, 252, 0.88);
  font-size: 12px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.78);
}

body.theme-dark-glass .alert-meta-item {
  background: #0b1220;
  border-color: #1f2a37;
  color: rgba(226, 232, 240, 0.86);
}

.alert-meta-item svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  opacity: 0.86;
}

.alert-meta-item strong {
  font-weight: 900;
  color: rgb(247 247 247 / 90%);
}

.alert-meta-item .muted {
  font-weight: 800;
  font-size: 11px;
}

.alert-meta-item--time {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.08);
}

.alert-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.alert-actions .inline-actions {
  justify-content: flex-start;
  margin-right: auto;
}

.alert-actions select.btn {
  width: auto;
  min-width: 132px;
}

@media (max-width: 520px) {
  .alert-actions select.btn { width: 100%; }
}

.alerts-filters {
  display: grid;
  grid-template-columns: 1.55fr 1.05fr 1.25fr 1.15fr 1fr 1fr;
  gap: 12px;
  align-items: start;
  margin: 6px 0 14px;
}

@media (max-width: 1100px) {
  .alerts-filters { grid-template-columns: 1fr; }
}

.alerts-filter-block {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line-color, var(--line));
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 108px;
}

.alerts-filters .pill {
  cursor: pointer;
}

.alerts-filters .pill.status-ativo,
.alerts-filters .pill[aria-pressed="true"] {
  background: rgba(249, 115, 22, 0.22);
  border-color: rgba(249, 115, 22, 0.65);
  color: #fff;
  box-shadow: 0 10px 18px rgba(249, 115, 22, 0.18);
}

body.theme-dark-glass .alerts-filters .pill.status-ativo,
body.theme-dark-glass .alerts-filters .pill[aria-pressed="true"] {
  background: rgba(249, 115, 22, 0.26);
  border-color: rgba(249, 115, 22, 0.75);
  color: rgba(255, 255, 255, 0.95);
}

.alerts-filter-label {
  font-weight: 900;
  letter-spacing: .02em;
  margin-bottom: 8px;
}

.alerts-date-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}

.alerts-date {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(248, 250, 252, 0.85);
  font-weight: 700;
  color: rgba(15, 23, 42, 0.86);
}

.alerts-date:focus {
  outline: 2px solid rgba(15, 108, 189, 0.28);
  border-color: rgba(15, 108, 189, 0.35);
}

.alerts-filter-help {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.78;
}

.alerts-theme-form {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.alerts-theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 10px;
}

.alerts-theme-field {
  display: grid;
  gap: 8px;
}

.alerts-theme-field input[type="color"] {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(248, 250, 252, 0.85);
  padding: 6px;
  cursor: pointer;
}

@media (max-width: 520px) {
  .alerts-date-grid { grid-template-columns: 1fr; }
  .alerts-date-grid .btn { width: 100%; }
  .alerts-theme-grid { grid-template-columns: 1fr; }
}

[data-filter-status],
[data-filter-origin],
[data-filter-priority],
[data-filter-view],
[data-recurring-filter-priority] {
  cursor: pointer;
}

.alert-card.is-recurring {
  border-left: 4px solid rgba(16, 185, 129, 0.55);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.06), #ffffff);
}

.alert-card.is-recurring.is-recurring-done {
  border-left-color: rgba(34, 197, 94, 0.6);
}

.pill--recurring {
  background: rgba(16, 185, 129, 0.10);
  border-color: rgba(16, 185, 129, 0.25);
  color: rgba(5, 48, 42, 0.92);
}

.recurring-title {
  font-size: 12px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.78);
}

.ws-toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  z-index: 3000;
  max-width: min(420px, calc(100vw - 32px));
}

.ws-toast {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
  font-size: 13px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.86);
  transform: translateY(8px);
  opacity: 0;
  transition: transform .18s ease, opacity .18s ease;
}

.ws-toast.is-in {
  transform: translateY(0);
  opacity: 1;
}

.ws-toast--error {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(254, 242, 242, 0.92);
  color: rgba(127, 29, 29, 0.95);
}

.ws-toast--ok {
  border-color: rgba(16, 185, 129, 0.42);
  background: rgba(236, 253, 245, 0.92);
  color: rgba(6, 95, 70, 0.95);
}

.alerts-search {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.alerts-search-input {
  flex: 1;
  min-width: 220px;
  border: 1px solid var(--line-color, var(--line));
  border-radius: 12px;
  padding: 10px 12px;
  background: #ffffff;
}

.alerts-select {
  width: 100%;
  border: 1px solid var(--line-color, var(--line));
  border-radius: 12px;
  padding: 10px 12px;
  background: #ffffff;
}

.alerts-assignee-summary {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line-color, var(--line));
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 12px;
}

.alerts-assignee-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.is-hidden {
  display: none !important;
}

.alerts-summary {
  margin-top: 16px;
}

.swimlanes {
  display: grid;
  gap: 14px;
}

.swimlane {
  border: 1px solid var(--line-color, var(--line));
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.65);
  overflow: hidden;
}

.swimlane-head {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line-color, var(--line));
  background: linear-gradient(180deg, rgba(15, 108, 189, 0.06), #ffffff);
}

.swimlane-body {
  padding: 12px 14px 14px;
  display: grid;
  gap: 12px;
  grid-auto-flow: column;
  grid-auto-columns: minmax(320px, 1fr);
  overflow-x: auto;
}

.swimlane-body .alert-card {
  max-width: 560px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.alert-modal-card {
  width: min(860px, 100%);
}

.alert-modal-meta {
  margin-top: 8px;
}

.alert-modal-message {
  margin-top: 12px;
  white-space: pre-wrap;
  line-height: 1.55;
  color: var(--text-ink, var(--ink));
}

.alert-modal-image-wrap {
  margin-top: 14px;
}

.alert-modal-image {
  max-width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line-color, var(--line));
  display: block;
}

.alert-modal-image-missing {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px dashed rgba(100, 116, 139, 0.35);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.85);
}

body.theme-dark-glass .alert-modal-image-missing {
  background: #0b1220;
  border-color: rgba(148, 163, 184, 0.28);
  color: rgba(226, 232, 240, 0.82);
}

.alert-thread {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(100, 116, 139, 0.35);
  display: grid;
  gap: 10px;
}

.alert-thread-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.alert-thread-list {
  max-height: 260px;
  overflow: auto;
  display: grid;
  gap: 10px;
  padding-right: 4px;
}

.alert-reply {
  border: 1px solid var(--line-color, var(--line));
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.85);
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}

.alert-reply-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.alert-reply-author {
  font-weight: 900;
  font-size: 12px;
  color: var(--text-ink, var(--ink));
}

.alert-reply-time {
  font-size: 11px;
  color: var(--text-muted, var(--muted));
}

.alert-reply-msg {
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  color: rgba(15, 23, 42, 0.88);
}

.alert-thread-form {
  display: grid;
  gap: 8px;
}

.alert-thread-form textarea {
  width: 100%;
  min-height: 84px;
  border: 1px solid var(--line-color, var(--line));
  border-radius: 14px;
  padding: 10px 12px;
  background: #ffffff;
  font-size: 13px;
  line-height: 1.45;
  resize: vertical;
}

.alert-thread-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.alert-reply-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.alert-reply-mentions {
  position: relative;
}

.mentions-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: min(320px, calc(100vw - 40px));
  background: #ffffff;
  border: 1px solid var(--line-color, var(--line));
  border-radius: 14px;
  box-shadow: 0 18px 40px -24px rgba(15, 23, 42, 0.38);
  padding: 10px;
  z-index: 1200;
}

.mentions-search {
  width: 100%;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line-color, var(--line));
  padding: 8px 10px;
  font-size: 13px;
}

.mentions-list {
  margin-top: 8px;
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}

.mentions-item {
  width: 100%;
  text-align: left;
  border-radius: 12px;
  padding: 9px 10px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(248, 250, 252, 0.85);
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
}

.mentions-item:hover {
  border-color: rgba(148, 163, 184, 0.9);
  background: rgba(241, 245, 249, 0.95);
}

.ws-mention {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  color: #0c4a6e;
  background: rgba(224, 242, 254, 0.9);
  border: 1px solid rgba(186, 230, 253, 0.95);
  margin: 0 2px;
}

.alert-reply-attach-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line-color, var(--line));
  border-radius: 14px;
  padding: 10px;
  background: rgba(248, 250, 252, 0.85);
}

body.theme-dark-glass .alert-reply-attach-preview {
  background: #0b1220;
  border-color: rgba(148, 163, 184, 0.22);
  color: rgba(226, 232, 240, 0.82);
}

.alert-reply-attach-preview img {
  width: 100%;
  max-width: 320px;
  max-height: 140px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #ffffff;
}

.alert-reply-attachment {
  margin-top: 8px;
}

.alert-reply-attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.alert-reply-attachment-thumb {
  width: 160px;
  max-width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #ffffff;
}

.alert-thread-form.is-loading {
  opacity: 0.85;
}

.alert-thread-form.is-loading textarea {
  pointer-events: none;
}

.ws-skel {
  border: 1px solid var(--line-color, var(--line));
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

.ws-skel .ws-skel-bar {
  height: 10px;
  margin: 10px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(15,23,42,0.06), rgba(15,23,42,0.12), rgba(15,23,42,0.06));
  background-size: 240% 100%;
  animation: wsSkel 1.1s ease infinite;
}

.ws-skel .ws-skel-bar.ws-skel-bar--short {
  width: 54%;
}

.ws-skel .ws-skel-bar.ws-skel-bar--long {
  width: 86%;
}

@keyframes wsSkel {
  0% { background-position: 0% 0; }
  100% { background-position: 120% 0; }
}
