:root {
  --background: #ffffff;
  --foreground: #0a0a0a;
  --card: #ffffff;
  --card-foreground: #0a0a0a;
  --muted: #f5f5f5;
  --muted-foreground: #66666e;
  --accent: #f4f4f5;
  --accent-foreground: #18181b;
  --border: #e5e5e5;
  --input: #e5e5e5;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-foreground: #ffffff;
  --primary-soft: #eff6ff;
  --primary-soft-foreground: #1d4ed8;
  --ring: #3b82f6;
  --destructive: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  --sidebar: #fafafa;
  --sidebar-border: #e5e5e5;
  --sidebar-accent: #f0f0f1;
  --chart-1: #2563eb;
  --chart-2: #93c5fd;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-xl: 14px;
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.08), 0 1px 2px -1px rgb(0 0 0 / 0.08);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --sidebar-width: 272px;
  --header-height: 48px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p {
  margin: 0;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

.icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}

.btn:disabled {
  opacity: .6;
  pointer-events: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-xs);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-outline {
  background: var(--background);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}

.btn-outline:hover {
  background: var(--accent);
}

.btn-ghost {
  background: transparent;
}

.btn-ghost:hover {
  background: var(--accent);
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  gap: 6px;
  font-size: 13px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
}

.btn-block {
  width: 100%;
}

.spin {
  animation: spin 1s linear infinite;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.label {
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
}

.input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  background: var(--background);
  font-size: 14px;
  box-shadow: var(--shadow-xs);
  transition: border-color .15s, box-shadow .15s;
}

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

.input:focus-visible {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgb(59 130 246 / 0.25);
}

.input[aria-invalid="true"] {
  border-color: var(--destructive);
}

.input[aria-invalid="true"]:focus-visible {
  box-shadow: 0 0 0 3px rgb(220 38 38 / 0.2);
}

.input-wrap {
  position: relative;
}

.input-wrap .input {
  padding-right: 44px;
}

.input-action {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted-foreground);
}

.input-action:hover {
  color: var(--foreground);
  background: var(--accent);
}

.field-error {
  font-size: 13px;
  color: var(--destructive);
}

.link {
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
}

.link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.45;
}

.alert[hidden] {
  display: none;
}

.alert .icon {
  margin-top: 1px;
}

.alert-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.alert-info {
  border-color: #bfdbfe;
  background: var(--primary-soft);
  color: var(--primary-soft-foreground);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--foreground);
  background: var(--background);
}

.badge .icon {
  width: 12px;
  height: 12px;
}

.badge-muted {
  color: var(--muted-foreground);
}

.badge-primary {
  border-color: transparent;
  background: var(--primary);
  color: var(--primary-foreground);
}

.badge-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  justify-content: center;
  border-color: transparent;
  background: var(--muted);
  color: var(--muted-foreground);
  border-radius: 999px;
}

.status-ok .icon { color: var(--success); }
.status-wait .icon { color: var(--muted-foreground); }
.status-err .icon { color: var(--destructive); }

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.login-page {
  display: grid;
  min-height: 100dvh;
  grid-template-columns: 1fr;
}

.login-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 16px;
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none;
}

.login-logo {
  display: block;
  width: auto;
  height: 28px;
}

.login-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-form {
  width: 100%;
  max-width: 340px;
  display: grid;
  gap: 24px;
}

.login-head {
  display: grid;
  gap: 8px;
  text-align: center;
}

.login-head h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.login-head p {
  color: var(--muted-foreground);
  font-size: 14px;
}

.login-fields {
  display: grid;
  gap: 20px;
}

.login-foot {
  text-align: center;
  font-size: 13px;
  color: var(--muted-foreground);
}

.login-aside {
  display: none;
  position: relative;
  overflow: hidden;
  background: var(--primary);
  color: var(--primary-foreground);
}

.login-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at 30% 20%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 20%, #000 20%, transparent 75%);
}

.login-aside::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -160px;
  bottom: -200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(147 197 253 / 0.45), transparent 65%);
}

.login-aside-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding: 40px;
  gap: 24px;
}

.login-aside-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: auto;
}

.login-aside-stat {
  padding: 16px;
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.1);
  border: 1px solid rgb(255 255 255 / 0.18);
  backdrop-filter: blur(4px);
}

.login-aside-stat strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.login-aside-stat span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: rgb(255 255 255 / 0.8);
}

.login-aside blockquote {
  margin: 0;
  max-width: 460px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -.01em;
}

.login-aside figcaption {
  margin-top: 12px;
  font-size: 13px;
  color: rgb(255 255 255 / 0.8);
}

@media (min-width: 1024px) {
  .login-page {
    grid-template-columns: 1fr 1fr;
  }

  .login-main {
    padding: 40px;
  }

  .login-aside {
    display: block;
  }
}

.app[data-loading] {
  visibility: hidden;
}

.app {
  display: flex;
  min-height: 100dvh;
  background: var(--sidebar);
}

.sidebar {
  position: sticky;
  top: 0;
  flex-shrink: 0;
  width: var(--sidebar-width);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  transition: margin-left .2s ease, transform .2s ease;
}

.app.is-collapsed .sidebar {
  margin-left: calc(var(--sidebar-width) * -1);
}

.sidebar-header {
  padding: 8px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 8px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.sidebar-brand:hover {
  background: var(--sidebar-accent);
}

.sidebar-logo {
  display: block;
  width: auto;
  height: 24px;
}

.sidebar-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-group {
  padding: 8px;
}

.sidebar-group-label {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
}

.sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.sidebar-quick {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.sidebar-quick .btn-primary {
  flex: 1;
  justify-content: flex-start;
  height: 32px;
  padding: 0 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  color: var(--foreground);
  transition: background-color .15s;
}

.nav-item:hover {
  background: var(--sidebar-accent);
}

.nav-item[aria-current="page"] {
  background: var(--sidebar-accent);
  font-weight: 500;
  color: var(--primary);
}

.nav-item .badge-count {
  margin-left: auto;
}

.sidebar-secondary {
  margin-top: auto;
}

.nav-item-muted {
  color: var(--muted-foreground);
}

.sidebar-footer {
  position: relative;
  padding: 8px;
}

.user-button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  text-align: left;
}

.user-button:hover,
.user-button[aria-expanded="true"] {
  background: var(--sidebar-accent);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--primary-soft-foreground);
  font-size: 12px;
  font-weight: 600;
}

.user-meta {
  display: grid;
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}

.user-meta strong {
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-meta span {
  font-size: 12px;
  color: var(--muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu {
  position: absolute;
  z-index: 50;
  min-width: 224px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--background);
  box-shadow: var(--shadow-lg);
}

.menu[hidden] {
  display: none;
}

.user-menu {
  left: calc(100% + 4px);
  bottom: 8px;
}

.menu-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
}

.menu-sep {
  height: 1px;
  margin: 4px -4px;
  background: var(--border);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 14px;
  text-align: left;
}

.menu-item:hover,
.menu-item:focus-visible {
  background: var(--accent);
  outline: none;
}

.menu-item .icon {
  color: var(--muted-foreground);
}

.menu-check {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
}

.menu-check:hover {
  background: var(--accent);
}

.inset {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin: 8px 8px 8px 0;
  border-radius: var(--radius-xl);
  background: var(--background);
  box-shadow: var(--shadow-sm);
  transition: margin .2s ease;
}

.app.is-collapsed .inset {
  margin-left: 8px;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--header-height);
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.site-header .btn-icon {
  margin-left: -6px;
}

.v-sep {
  width: 1px;
  height: 16px;
  margin: 0 4px;
  background: var(--border);
}

.site-header h1 {
  font-size: 15px;
  font-weight: 500;
}

.site-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 0;
}

.page[hidden] {
  display: none;
}

.px {
  padding-left: 16px;
  padding-right: 16px;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
  color: var(--card-foreground);
  box-shadow: var(--shadow-xs);
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  background: linear-gradient(to top, rgb(37 99 235 / 0.05), var(--card));
}

.stat-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.stat-label {
  font-size: 14px;
  color: var(--muted-foreground);
}

.stat-value {
  margin-top: 6px;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.stat-foot {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.stat-foot strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.stat-foot span {
  color: var(--muted-foreground);
}

.chart-card {
  padding: 24px 0 16px;
}

.chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 0 24px;
}

.chart-head h2,
.section-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.chart-head p {
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted-foreground);
}

.toggle-group {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.toggle-group button {
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-left: 1px solid var(--border);
  background: var(--background);
  font-size: 13px;
  font-weight: 500;
}

.toggle-group button:first-child {
  border-left: 0;
}

.toggle-group button:hover {
  background: var(--accent);
}

.toggle-group button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--primary);
}

.select {
  height: 32px;
  padding: 0 32px 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--background) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2366666e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;
  appearance: none;
  -webkit-appearance: none;
  font-size: 13px;
  box-shadow: var(--shadow-xs);
}

.chart-legend {
  display: flex;
  gap: 16px;
  padding: 0 24px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted-foreground);
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.chart-body {
  position: relative;
  height: 250px;
  margin-top: 8px;
  padding: 0 16px;
}

.chart-body svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-grid line {
  stroke: var(--border);
  stroke-dasharray: 3 3;
}

.chart-axis text {
  fill: var(--muted-foreground);
  font-size: 12px;
  font-family: var(--font);
}

.chart-cursor {
  stroke: var(--muted-foreground);
  stroke-width: 1;
  opacity: .5;
}

.chart-empty {
  position: absolute;
  inset: 0 16px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  font-size: 13px;
  pointer-events: none;
}

.chart-tooltip {
  position: absolute;
  z-index: 5;
  min-width: 150px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--background);
  box-shadow: var(--shadow-lg);
  font-size: 12px;
  pointer-events: none;
}

.chart-tooltip[hidden] {
  display: none;
}

.chart-tooltip strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}

.chart-tooltip div {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-foreground);
}

.chart-tooltip div b {
  margin-left: auto;
  padding-left: 12px;
  color: var(--foreground);
  font-weight: 500;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.chart-tooltip i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tabs {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 3px;
  border-radius: var(--radius-md);
  background: var(--muted);
}

.tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
}

.tabs button[aria-selected="true"] {
  background: var(--background);
  color: var(--foreground);
  box-shadow: var(--shadow-xs);
}

.tabs .badge-count {
  height: 18px;
  min-width: 18px;
  font-size: 11px;
  background: rgb(0 0 0 / 0.06);
}

.tab-select {
  display: none;
}

.toolbar-actions {
  position: relative;
  display: flex;
  gap: 8px;
}

.columns-menu {
  top: calc(100% + 4px);
  right: 0;
  min-width: 200px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead {
  position: sticky;
  top: 0;
  background: var(--muted);
}

th {
  height: 40px;
  padding: 0 12px;
  text-align: left;
  font-weight: 500;
  white-space: nowrap;
}

td {
  height: 52px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  white-space: nowrap;
}

tbody tr:hover {
  background: rgb(0 0 0 / 0.02);
}

tbody tr[data-selected="true"] {
  background: var(--primary-soft);
}

.col-check {
  width: 40px;
  padding-right: 0;
}

.check {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
  vertical-align: middle;
  cursor: pointer;
}

.cell-title {
  font-weight: 500;
}

.cell-sub {
  display: block;
  font-size: 12px;
  color: var(--muted-foreground);
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table-empty td {
  height: 120px;
  text-align: center;
  color: var(--muted-foreground);
  white-space: normal;
}

.table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  font-size: 14px;
}

.table-foot-info {
  color: var(--muted-foreground);
}

.pager {
  display: flex;
  align-items: center;
  gap: 24px;
}

.pager-size {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.pager-label {
  font-weight: 500;
  white-space: nowrap;
}

.pager-buttons {
  display: flex;
  gap: 8px;
}

.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 360px;
  padding: 32px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-xl);
  text-align: center;
}

.placeholder-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary);
}

.placeholder-icon .icon {
  width: 20px;
  height: 20px;
}

.placeholder p {
  max-width: 380px;
  color: var(--muted-foreground);
}

.skeleton {
  display: inline-block;
  min-width: 48px;
  height: 1em;
  border-radius: var(--radius-sm);
  background: var(--muted);
  color: transparent;
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: .5;
  }
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  max-width: 360px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--background);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
}

.toast[hidden] {
  display: none;
}

.overlay {
  display: none;
}

@media (max-width: 639px) {
  .hide-sm {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page {
    gap: 24px;
    padding: 24px 0;
  }

  .px {
    padding-left: 24px;
    padding-right: 24px;
  }

  .site-header {
    padding: 0 24px;
  }
}

@media (min-width: 1280px) {
  .cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  .tabs {
    display: none;
  }

  .tab-select {
    display: inline-block;
  }

  .table-foot-info {
    display: none;
  }

  .table-foot {
    justify-content: flex-end;
  }

  .pager-size {
    display: none;
  }
}

@media (max-width: 767px) {
  .sidebar {
    position: fixed;
    left: 0;
    z-index: 60;
    box-shadow: var(--shadow-lg);
    transform: translateX(-100%);
    background: var(--sidebar);
  }

  .app.is-collapsed .sidebar {
    margin-left: 0;
  }

  .app.is-mobile-open .sidebar {
    transform: none;
  }

  .app.is-mobile-open .overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgb(0 0 0 / 0.5);
  }

  .app {
    background: var(--background);
  }

  .inset,
  .app.is-collapsed .inset {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .user-menu {
    left: 8px;
    right: 8px;
    bottom: calc(100% - 4px);
    min-width: 0;
  }

  .site-header-actions .btn-label {
    display: none;
  }

  .chart-head .toggle-group {
    display: none;
  }
}

@media (min-width: 768px) {
  .chart-head .select {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page-desc {
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted-foreground);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.search {
  position: relative;
  flex: 1 1 280px;
  max-width: 420px;
}

.search .icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  pointer-events: none;
}

.search .input {
  height: 36px;
  padding-left: 36px;
}

.select-lg,
.toggle-lg button {
  height: 36px;
}

.select-field {
  width: 100%;
  height: 40px;
  font-size: 14px;
}

.table-click tbody tr[data-id] {
  cursor: pointer;
}

.table-click tbody tr[data-id]:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: -2px;
}

.table-hint {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted-foreground);
}

.mono {
  font-family: var(--font-mono);
  font-size: 13px;
}

.cell-empty {
  color: var(--muted-foreground);
}

.table-empty .btn {
  margin-top: 12px;
}

.dialog {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--background);
  color: var(--foreground);
  box-shadow: var(--shadow-lg);
}

.dialog[open] {
  display: flex;
  animation: dialog-in .16s ease-out;
}

.dialog::backdrop {
  background: rgb(0 0 0 / 0.5);
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.dialog form {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 0 24px;
}

.dialog-head h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.dialog-head p {
  margin-top: 4px;
  color: var(--muted-foreground);
}

.dialog-body {
  display: grid;
  gap: 20px;
  padding: 20px 24px;
  overflow-y: auto;
}

.dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--sidebar);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

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

.form-section {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.form-section legend {
  margin-bottom: 12px;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  align-items: start;
}

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

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

.input-mono {
  font-family: var(--font-mono);
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.switch-row strong {
  display: block;
  font-weight: 500;
}

.switch-row small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted-foreground);
}

.switch {
  flex: none;
  position: relative;
  width: 36px;
  height: 20px;
  margin: 0;
  border-radius: 999px;
  background: var(--input);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: background .15s;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .15s;
}

.switch:checked {
  background: var(--primary);
}

.switch:checked::after {
  transform: translateX(16px);
}

@media (max-width: 767px) {
  .hide-md {
    display: none;
  }

  .page-head .btn {
    width: 100%;
  }

  .search {
    max-width: none;
    flex-basis: 100%;
  }

  .dialog {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 24px);
    margin: auto 0 0;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }

  .dialog-foot {
    border-radius: 0;
  }

  .dialog-foot .btn {
    flex: 1;
  }
}

.foto-field {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.foto-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--primary-soft);
  color: var(--primary-soft-foreground);
  font-size: 20px;
  font-weight: 600;
}

.foto-preview img,
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.foto-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.foto-acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.foto-acoes label:has(+ input:focus-visible) {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.cell-projeto {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--primary-soft-foreground);
  font-size: 12px;
  font-weight: 600;
}

.board-wrap {
  position: relative;
  overflow-x: auto;
  padding: 0 16px 8px;
  scroll-snap-type: x proximity;
  scroll-padding: 0 16px;
  overscroll-behavior-x: contain;
}

.board-wrap > .px {
  padding: 0;
}

.board {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: max-content;
  min-width: 100%;
}

.board-col {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--sidebar);
  scroll-snap-align: start;
}

.board-col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.board-col-head h3 {
  font-size: 14px;
  font-weight: 600;
}

.board-col-head .badge-count {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.board-col.is-today {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.board-col.is-today .board-col-head h3 {
  color: var(--primary);
}

.board-col.is-past .board-col-head h3 {
  color: var(--muted-foreground);
}

.board-col-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}

.lanc-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-xs);
}

.lanc-card[data-status="PENDENTE"] {
  border-left-color: var(--primary);
}

.lanc-card[data-status="ENVIADO"] {
  border-left-color: var(--success);
}

.lanc-card[data-status="ERRO"] {
  border-left-color: var(--destructive);
}

.lanc-card-top,
.lanc-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.lanc-hora {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}

.lanc-hora.cell-empty {
  font-family: var(--font);
  font-weight: 400;
}

.lanc-hora .icon {
  width: 14px;
  height: 14px;
  color: var(--muted-foreground);
}

.lanc-titulo {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.lanc-corpo {
  font-size: 13px;
  color: var(--muted-foreground);
  white-space: pre-line;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}

.lanc-card.is-open .lanc-corpo {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: none;
}

.lanc-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.lanc-badges .badge {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lanc-card-foot .btn {
  margin-right: -6px;
  color: var(--primary);
}

@media (min-width: 768px) {
  .board-wrap {
    padding: 0 24px 8px;
    scroll-padding: 0 24px;
  }
}

@media (max-width: 767px) {
  .board-col {
    flex-basis: min(300px, calc(100vw - 56px));
  }
}

.lanc-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.proj-grid-titulo {
  grid-column: 1 / -1;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
}

.proj-grid-vazio {
  grid-column: 1 / -1;
}

.proj-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  text-decoration: none;
  background: linear-gradient(to top, rgb(37 99 235 / 0.04), var(--card));
  transition: border-color .15s ease, box-shadow .15s ease;
}

a.proj-card:hover {
  border-color: #bfdbfe;
  box-shadow: var(--shadow-sm);
}

a.proj-card:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.proj-card.is-inativo {
  background: var(--card);
}

.proj-card.is-inativo .thumb {
  filter: grayscale(1);
  opacity: .7;
}

.proj-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.proj-card-top .thumb,
.lanc-hero .thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  font-size: 16px;
}

.proj-card-nome {
  flex: 1;
  min-width: 0;
}

.proj-card-nome h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.proj-card-nome p {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted-foreground);
}

.proj-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.proj-card-stats div {
  padding: 10px 12px;
}

.proj-card-stats div + div {
  border-left: 1px solid var(--border);
}

.proj-card-stats dt {
  font-size: 12px;
  color: var(--muted-foreground);
}

.proj-card-stats dd {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.proj-card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.proj-card-foot > .icon {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--muted-foreground);
}

.proj-card-foot strong {
  font-weight: 500;
}

.proj-card-foot .proj-card-seta {
  margin-left: auto;
  width: 16px;
  height: 16px;
  transition: transform .15s ease;
}

a.proj-card:hover .proj-card-seta {
  transform: translateX(2px);
  color: var(--primary);
}

#lanc-voltar {
  align-self: flex-start;
}

.lanc-hero {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lanc-hero-info {
  min-width: 0;
}

.lanc-hero .section-title {
  font-size: 20px;
  outline: none;
}

.lanc-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted-foreground);
}

.board-col-vazio {
  padding: 16px 4px;
  font-size: 13px;
  text-align: center;
  color: var(--muted-foreground);
}

@media (max-width: 767px) {
  .proj-grid {
    grid-template-columns: 1fr;
  }

  .lanc-hero {
    align-items: flex-start;
  }

  .lanc-hero .section-title {
    font-size: 18px;
  }
}

.btn-xs {
  width: 26px;
  height: 26px;
}

.btn-xs .icon {
  width: 14px;
  height: 14px;
}

.btn-danger {
  color: var(--destructive);
  margin-right: auto;
}

.btn-danger:hover {
  background: #fef2f2;
  color: #b91c1c;
}

.label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.label-row .field-hint {
  font-variant-numeric: tabular-nums;
}

.textarea {
  height: auto;
  min-height: 140px;
  padding: 10px 12px;
  line-height: 1.5;
  resize: vertical;
}

.input:disabled,
.switch:disabled {
  cursor: not-allowed;
  opacity: .7;
}

.input:disabled {
  background: var(--muted);
}

.lanc-nova {
  margin-left: auto;
  align-self: center;
  flex: none;
}

.lanc-card[data-msg-id] {
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.lanc-card[data-msg-id]:hover {
  box-shadow: var(--shadow-sm);
}

.lanc-card-top .badge {
  margin-left: auto;
}

.lanc-card-top .btn-xs {
  margin: -4px -6px -4px -4px;
  color: var(--muted-foreground);
}

.lanc-card-top .btn-xs:hover {
  color: var(--foreground);
}

.board-col-head .btn-xs {
  margin: -4px -6px -4px 0;
  color: var(--muted-foreground);
}

.board-col-head .btn-xs:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

@media (max-width: 767px) {
  .lanc-hero {
    flex-wrap: wrap;
  }

  .lanc-nova {
    width: 100%;
    margin-left: 0;
  }
}

/* Abas do projeto em Lançamentos (Mensagens / Grupos) */
.lanc-abas .icon {
  width: 14px;
  height: 14px;
}

.lanc-painel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lanc-painel[hidden] {
  display: none;
}

.label-opcional {
  margin-left: 4px;
  font-weight: 400;
  color: var(--muted-foreground);
}

.grupo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.grupo-vazio {
  grid-column: 1 / -1;
  min-height: 280px;
}

.grupo-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.grupo-card:hover {
  border-color: rgb(37 99 235 / 0.4);
  box-shadow: var(--shadow-xs);
}

.grupo-card.is-inativo {
  background: var(--muted);
}

.grupo-card.is-inativo .grupo-nome,
.grupo-card.is-inativo .grupo-icone {
  opacity: .65;
}

.grupo-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.grupo-icone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--primary);
}

.grupo-nome {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.grupo-card-top .btn-xs {
  margin-right: -6px;
  color: var(--muted-foreground);
}

.grupo-card-top .btn-xs:hover {
  color: var(--foreground);
}

.grupo-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  white-space: pre-line;
  color: var(--muted-foreground);
}

.grupo-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted-foreground);
}

.grupo-wpp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.grupo-wpp .icon {
  width: 14px;
  height: 14px;
}

.grupo-wpp code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--foreground);
}

@media (max-width: 1023px) {
  .tabs.lanc-abas {
    display: inline-flex;
  }
}

@media (max-width: 767px) {
  .tabs.lanc-abas {
    display: flex;
  }

  .lanc-abas button {
    flex: 1;
    justify-content: center;
  }

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

/* WhatsApp (WAHA): números, grupos e modais */
.page-head-acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wpp-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.wpp-card-nome {
  flex: 1;
  min-width: 0;
}

.wpp-info {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--muted);
}

.wpp-info dt {
  font-size: 12px;
  color: var(--muted-foreground);
}

.wpp-info dd {
  margin: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.wpp-acoes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.wpp-acoes-fim {
  display: inline-flex;
  gap: 2px;
  margin-left: auto;
}

.wpp-soltas {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
  padding: 16px;
}

.wpp-soltas ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wpp-soltas li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.wpp-soltas li .btn {
  margin-left: auto;
}

.wpp-conectar {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: start;
}

.wpp-qr {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  height: 220px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  overflow: hidden;
}

.wpp-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.wpp-qr-vazio {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted-foreground);
}

.wpp-qr-vazio .icon {
  width: 24px;
  height: 24px;
}

.wpp-conectar-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.wpp-passos {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
}

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

.wpp-codigo {
  grid-column: 1 / -1;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.wpp-codigo summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
}

.wpp-codigo[open] summary {
  margin-bottom: 12px;
}

.wpp-codigo-linha {
  display: flex;
  gap: 8px;
}

.wpp-codigo-linha .input {
  flex: 1;
  min-width: 0;
}

.wpp-codigo-valor {
  margin: 4px 0 8px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: .12em;
}

.wpp-ok {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  text-align: center;
}

.wpp-ok .placeholder-icon {
  color: var(--success);
}

.wg-numeros button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wg-numeros .icon {
  width: 14px;
  height: 14px;
}

#wg-body .grupo-icone {
  width: 36px;
  height: 36px;
}

.col-acoes {
  width: 1%;
  white-space: nowrap;
}

.acoes-linha {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
}

.acoes-linha .btn {
  color: var(--muted-foreground);
}

.acoes-linha .btn:hover {
  color: var(--foreground);
}

.proj-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  max-height: 264px;
  overflow-y: auto;
  padding: 2px;
}

.proj-opcao {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.proj-opcao:hover {
  border-color: rgb(37 99 235 / 0.4);
}

.proj-opcao:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.proj-opcao:has(input:focus-visible) {
  outline: 2px solid var(--ring);
  outline-offset: 1px;
}

.proj-opcao input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.proj-opcao .thumb {
  width: 32px;
  height: 32px;
}

.proj-opcao .thumb .icon {
  width: 14px;
  height: 14px;
}

.proj-opcao-nome {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

.proj-opcao-nome small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted-foreground);
}

.msg-grupos {
  max-height: 220px;
}

.msg-grupos .proj-opcao:has(input:disabled) {
  cursor: default;
}

.msg-grupos-vazio {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--muted-foreground);
}

#wd-campos {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#wd-campos[hidden] {
  display: none;
}

.wd-nomes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wd-resultado {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wd-lista {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wd-lista li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

@media (max-width: 767px) {
  .page-head-acoes {
    width: 100%;
  }

  .page-head-acoes .btn-primary {
    flex: 1;
  }

  .wpp-conectar {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .wpp-conectar-info {
    width: 100%;
  }

  .wg-numeros {
    display: flex;
    overflow-x: auto;
  }

  .wg-numeros button {
    flex: none;
  }

  .proj-picker {
    grid-template-columns: 1fr;
  }
}

/* Edição em massa da tela Grupos */

.wg-massa {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 12px;
  padding: 8px 8px 8px 14px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--primary-soft-foreground);
  font-size: 14px;
  font-weight: 500;
}

.wg-massa-acoes {
  display: flex;
  gap: 8px;
}

.wg-fila {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.wg-fila-linha {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--primary-soft-foreground);
  font-size: 13px;
  line-height: 1.45;
}

.wg-fila-linha > .icon {
  flex: none;
  margin-top: 1px;
}

.wg-fila-linha > span:first-of-type {
  flex: 1;
  min-width: 0;
}

.wg-fila-linha .btn {
  flex: none;
}

.wg-fila-erro {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.wg-fila-erro summary {
  margin-top: 4px;
  cursor: pointer;
  font-weight: 500;
}

.wg-fila-lista {
  margin: 6px 0 0;
  padding-left: 18px;
}

.wg-fila-botoes {
  display: flex;
  flex: none;
  gap: 4px;
}

.wg-na-fila {
  margin-left: 6px;
  vertical-align: 1px;
}

#wg-body .col-check,
#wg-tabela th.col-check {
  cursor: pointer;
}

.wm-previa {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 4px 0 0;
  padding: 8px 10px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  list-style: none;
  font-size: 13px;
  color: var(--muted-foreground);
}

.wm-previa li {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.wm-previa li span,
.wm-previa li strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wm-previa strong {
  font-weight: 500;
  color: var(--foreground);
}

.wm-previa .icon {
  flex: none;
  width: 14px;
  height: 14px;
}

.wm-sub-campo {
  margin-top: -8px;
}

#wm-resumo {
  margin: 0;
}

@media (max-width: 767px) {
  .wg-massa-acoes {
    width: 100%;
  }

  .wg-massa-acoes .btn-primary {
    flex: 1;
  }

  .wg-fila-linha {
    flex-wrap: wrap;
  }

  .wg-fila-linha > span:first-of-type {
    flex-basis: calc(100% - 26px);
  }
}
