/* Shell, formularios y piezas de producto sobre Wemvy Design System v5 */

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

html, body {
  height: 100%;
  margin: 0;
}

a {
  color: var(--wemvy-cyan);
  text-decoration: none;
}
a:hover { color: var(--wemvy-cyan-dark); }

button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }

.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--apple-bg);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.app-sidebar {
  width: 80px;
  flex-shrink: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0;
  background: linear-gradient(180deg, #E0F7FA 0%, #FCE4EC 50%, #E8F5E9 100%) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-right: 1px solid var(--apple-border);
  z-index: 50;
}
.app-sidebar .sidebar-logo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 20px rgba(0, 208, 212, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  transition: transform 0.2s ease;
}
.app-sidebar .sidebar-logo:hover { transform: scale(1.06); }
.app-sidebar .sidebar-logo svg { width: 32px; height: 32px; }
.app-sidebar .sidebar-rule {
  width: 32px;
  height: 1px;
  background: rgba(0, 0, 0, 0.06);
  margin: 8px 0 16px;
}
.app-sidebar nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  width: 100%;
}
.app-sidebar .sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.nav-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  color: var(--apple-text);
  transition: all 0.2s ease;
}
.nav-icon-btn svg,
.nav-icon-btn .lucide {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-icon-btn.nav-tone-cyan { color: var(--wemvy-cyan); }
.nav-icon-btn.nav-tone-pink { color: var(--wemvy-pink); }
.nav-icon-btn.nav-tone-blue { color: #3B82F6; }
.nav-icon-btn.nav-tone-purple { color: #A855F7; }
.nav-icon-btn.nav-tone-amber { color: #F59E0B; }
.nav-icon-btn.nav-tone-emerald { color: #10B981; }
.nav-icon-btn.nav-tone-muted { color: var(--apple-muted); }
.nav-icon-btn:hover {
  transform: scale(1.05);
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.nav-icon-btn.active {
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 208, 212, 0.18);
}

.app-main {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}
.app-main > #bg-stars {
  z-index: 0;
}

.app-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 0 32px;
  z-index: 20;
  position: relative;
  background: rgba(245, 245, 247, 0.55);
}
.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.header-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  align-items: center;
  justify-content: center;
  color: var(--apple-text);
}
.header-menu-btn .lucide {
  width: 18px;
  height: 18px;
}
.header-crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--apple-muted);
  min-width: 0;
}
.header-crumbs a { color: var(--apple-muted); }
.header-crumbs a:hover { color: var(--apple-text); }
.header-crumbs strong {
  color: var(--apple-text);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-crumbs .crumb-chevron {
  width: 14px;
  height: 14px;
  color: var(--apple-subtle);
  flex-shrink: 0;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-chip {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #00D0D4, #FA47C9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 208, 212, 0.28);
}
.dropdown-user {
  min-width: 240px;
  padding-top: 8px;
}
.dropdown-user .dropdown-meta {
  padding: 4px 12px 10px;
}
.dropdown-user .dropdown-meta strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
.dropdown-user .dropdown-meta span {
  display: block;
  font-size: 12px;
  color: var(--apple-muted);
  margin-top: 2px;
}

.app-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}
.app-content-inner {
  flex: 1;
  overflow: auto;
  padding: 24px 32px 72px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}
.app-content-inner > * {
  flex-shrink: 0;
}

.page-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
}
.page-toolbar > div:first-child {
  min-width: 0;
  flex: 1 1 220px;
}
.page-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.page-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0;
}
.page-lead {
  font-size: 13px;
  color: var(--apple-muted);
  margin: 6px 0 0;
  line-height: 1.5;
}
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--apple-muted);
  margin-bottom: 6px;
  font-weight: 500;
}
.page-kicker .lucide {
  width: 14px;
  height: 14px;
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.card-premium {
  width: 100%;
  padding: 22px 24px;
}
.card-premium.card-editor {
  overflow: visible;
}
.app-content .card-premium:hover {
  transform: none;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 16px;
  width: 100%;
}
.stat-card {
  padding: 20px 22px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--apple-muted);
}
.stat-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: 4px;
}
.stat-hint {
  font-size: 12px;
  color: var(--apple-muted);
  margin-top: 4px;
}
.stat-link {
  display: inline-block;
  margin-top: auto;
  padding-top: 10px;
  font-size: 13px;
  font-weight: 500;
}

.btn-premium {
  height: 36px;
  padding: 0 18px;
  border: none;
  border-radius: 100px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  justify-content: center;
}
a.btn-premium { color: #fff; }
a.btn-premium:hover { color: #fff; }
.btn-premium:disabled,
.btn-premium[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-gradient {
  text-decoration: none;
  justify-content: center;
  background-color: transparent;
}
a.btn-gradient { color: var(--apple-text); }
.btn-gradient.danger { color: #EF4444; }
.btn-sm {
  height: 32px;
  padding: 0 14px;
  font-size: 12px;
  border-radius: 100px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--apple-text);
  margin-bottom: 6px;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  box-sizing: border-box;
  background-color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 0 14px;
  height: 42px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--apple-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.form-input::placeholder { color: var(--apple-subtle); font-weight: 400; }
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: rgba(0, 208, 212, 0.35);
  box-shadow: 0 0 0 3px rgba(0, 208, 212, 0.08);
  background-color: #fff;
}
.form-input.error {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}
.form-input:disabled,
.form-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.app-content select,
select.form-input,
select.form-select,
.form-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: rgba(255, 255, 255, 0.7);
  background-image: 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='%2386868B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
  padding-right: 40px;
  cursor: pointer;
}
.app-content select:focus,
select.form-input:focus,
select.form-select:focus,
.form-select:focus {
  background-color: #fff;
  background-image: 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='%2300B8BC' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}
select::-ms-expand { display: none; }

.csel {
  position: relative;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.csel.is-disabled { opacity: 0.55; pointer-events: none; }
.csel-native {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  clip: rect(0, 0, 0, 0);
}
.csel-trigger {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 42px;
  min-height: 42px;
  padding: 0 40px 0 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--apple-text);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.csel-trigger:hover {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
}
.csel.is-open .csel-trigger,
.csel-trigger:focus {
  outline: none;
  background: #fff;
  border-color: rgba(0, 208, 212, 0.35);
  box-shadow: 0 0 0 3px rgba(0, 208, 212, 0.08);
}
.csel-trigger::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid #86868B;
  border-bottom: 2px solid #86868B;
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.18s ease, border-color 0.18s ease;
  pointer-events: none;
}
.csel.is-open .csel-trigger::after {
  border-color: var(--wemvy-cyan);
  transform: translateY(-20%) rotate(225deg);
}
.csel-trigger.is-placeholder { color: var(--apple-muted); font-weight: 400; }
.csel:has(select.error) .csel-trigger {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}
.csel-menu {
  display: none;
  position: fixed;
  z-index: 400;
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06);
}
.csel-option {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--apple-text);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.csel-option:hover,
.csel-option.is-active,
.csel-option:focus {
  outline: none;
  background: rgba(0, 208, 212, 0.1);
  color: #00B8BC;
}
.csel-option.is-selected {
  background: rgba(0, 208, 212, 0.14);
  color: #00B8BC;
  font-weight: 600;
}
.csel-option[aria-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
}
.form-textarea {
  height: auto;
  min-height: 100px;
  padding: 11px 14px;
  resize: vertical;
  line-height: 1.5;
}
input[type="datetime-local"].form-input,
input[type="date"].form-input,
input[type="time"].form-input {
  color-scheme: light;
}
input[type="datetime-local"].form-input::-webkit-calendar-picker-indicator,
input[type="date"].form-input::-webkit-calendar-picker-indicator {
  opacity: 0.55;
  cursor: pointer;
}
.form-hint {
  font-size: 12px;
  color: var(--apple-muted);
  margin-top: 6px;
  line-height: 1.4;
}
.form-error {
  font-size: 12px;
  color: #EF4444;
  margin-top: 4px;
  display: none;
}
.form-group.error .form-error,
.form-error.is-visible { display: block; }
.form-group { margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14px;
}
.form-check input[type="checkbox"]:not(.switch) {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--wemvy-cyan);
  flex-shrink: 0;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.file-field + .form-actions { margin-top: 16px; }
.control-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.control-row > .form-input,
.control-row > .form-select,
.control-row > select,
.control-row > .search-field {
  flex: 1 1 180px;
  min-width: 0;
  width: auto;
}
.control-row > .csel {
  flex: 1 1 16rem;
  width: auto;
  min-width: 12rem;
  max-width: 28rem;
}
.control-row > .btn-premium,
.control-row > .btn-gradient {
  height: 42px;
  flex-shrink: 0;
}
.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--apple-text);
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}
.check-inline .switch { flex-shrink: 0; }
form > .check-inline {
  height: 24px;
  margin: 4px 0 16px;
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.filter-row > .form-group {
  margin: 0;
  flex: 1 1 180px;
  min-width: 0;
}
.filter-row .search-field {
  flex: 1 1 180px;
  width: auto;
}
.filter-row > select,
.filter-row > .form-select,
.filter-row > .csel,
.card-toolbar > select,
.card-toolbar > .form-select,
.card-toolbar > .csel {
  width: auto;
  flex: 0 0 200px;
  min-width: 160px;
  max-width: 260px;
}
.filter-row .btn-gradient,
.filter-row .btn-premium { flex-shrink: 0; }

.table-wrap { overflow-x: auto; }
.data-table a { font-weight: 500; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table td,
.data-table th { vertical-align: middle; }
.data-table .num {
  font-variant-numeric: tabular-nums;
  text-align: center;
  white-space: nowrap;
  width: 1%;
}
.data-table .col-actions {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}
.filter-compact {
  flex-wrap: nowrap;
  flex-shrink: 0;
  min-width: max-content;
  align-items: center;
}
.filter-compact .btn-gradient,
.filter-compact .btn-premium,
.card-head .filter-row .btn-gradient {
  flex-shrink: 0;
  white-space: nowrap;
}
.card-premium > .table-wrap + form,
.card-premium > .muted + form {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--apple-border);
}
.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 12px 0 0;
  padding: 14px 2px 0;
  border-top: 1px solid var(--apple-border);
  font-size: 13px;
  color: var(--apple-muted);
}
.table-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--apple-muted);
}
.table-count-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(0, 208, 212, 0.12);
  color: #0a8a8e;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.card-foot {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--apple-border);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.018), transparent 72%);
}
.card-premium:not(.card-table) > .card-foot {
  margin: 16px -24px -22px;
  padding: 18px 24px 20px;
}
a.page-btn {
  color: var(--apple-muted);
  text-decoration: none;
}
a.page-btn:hover { color: var(--apple-text); }
.page-btn[aria-disabled="true"] {
  opacity: 0.3;
  pointer-events: none;
}
.page-btn .lucide {
  width: 14px;
  height: 14px;
}

.split-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
  width: 100%;
}
.split-2 > .card-premium,
.split-2 > .stack {
  min-width: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.split-2 > .stack > .card-premium {
  flex: 1;
  margin: 0;
}
.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.muted { color: var(--apple-muted); font-size: 13px; }
.list-plain {
  list-style: none;
  margin: 0;
  padding: 0;
}
.list-plain li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--apple-border);
  font-size: 14px;
}
.list-plain li:last-child { border-bottom: none; }
.card-head + .list-plain li:first-child { padding-top: 4px; }
.card-head .filter-row,
.card-head .control-row { margin: 0; }
.card-head .filter-row {
  display: flex;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-width: max-content;
  width: auto;
}
.card-head .form-input,
.card-head .form-select,
.card-head select,
.card-head .csel {
  height: 36px;
  width: 180px;
  min-width: 148px;
  max-width: 220px;
  flex: 0 0 180px;
}
.card-head .csel-trigger {
  height: 36px;
  min-height: 36px;
  font-size: 13px;
  padding: 0 36px 0 12px;
}
.card-head .btn-gradient,
.card-head .btn-premium { height: 36px; }
.form-block:last-child { margin-bottom: 0; }
.snippet-box,
.code-block {
  width: 100%;
  box-sizing: border-box;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--apple-border);
  border-radius: 12px;
  padding: 12px;
}
.font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}
.plantilla-preview {
  width: 100%;
  min-height: 180px;
  height: 280px;
  background: #fff;
  border: 1px solid var(--apple-border);
  border-radius: 12px;
}
.form-block {
  border: 1px solid var(--apple-border);
  border-radius: 14px;
  padding: 16px;
  margin-top: 16px;
  margin-bottom: 0;
}
.form-block:first-of-type { margin-top: 8px; }
.form-block-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.form-block-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.form-block-title strong { font-size: 15px; }
.form-block .code-panel { margin-top: 12px; }
.form-block .code-panel-head .form-label { margin: 0; }
.hint-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--apple-muted);
  font-size: 13px;
  line-height: 1.5;
}
.hint-list li { margin-bottom: 8px; }
.hint-list li:last-child { margin-bottom: 0; }
.hint-list code,
.page-lead code,
.muted code,
.form-hint code,
.guide-steps code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 6px;
  padding: 1px 5px;
}
.api-docs { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--apple-border); }
.section-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--apple-muted);
  margin: 0 0 12px;
}
.guide-steps {
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--apple-text);
  font-size: 13px;
  line-height: 1.55;
}
.guide-steps li { margin-bottom: 8px; }
.guide-steps li:last-child { margin-bottom: 0; }
.code-panel { margin: 0 0 14px; }
.code-panel:last-child { margin-bottom: 0; }
.code-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.code-panel-head > span {
  font-size: 12px;
  font-weight: 600;
  color: var(--apple-muted);
}
.code-panel .code-block {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}
.code-panel .form-textarea {
  margin: 0;
  white-space: pre;
  overflow-x: auto;
}
.id-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 14px;
}
.id-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  background: rgba(0, 208, 212, 0.08);
  border-radius: 999px;
  padding: 3px 10px;
  color: var(--apple-text);
}
.id-chip a { font-weight: 500; }
.empty-state.compact { padding: 12px 0 4px; }
.code-panel-head .btn-gradient {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.code-panel-head .btn-gradient .lucide {
  width: 14px;
  height: 14px;
}
.secret-once { min-width: 0; width: 100%; }
.secret-once .code-panel { margin-bottom: 0; }
.secret-once .code-block { margin-top: 0; }
.alert-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
  width: 100%;
}
.alert-banner .alert-icon,
.alert-banner > .lucide {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}
.alert-banner.warning {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #92400E;
}
.alert-banner.info {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E40AF;
}
.alert-banner.success {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
}
.alert-banner.danger {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}
.impersonation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.impersonation-banner > span {
  flex: 1;
  min-width: 180px;
}
.table-actions {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.home-cliente-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
button.dropdown-item {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  font-family: inherit;
}
.w-full { width: 100%; }
.text-break { overflow-wrap: anywhere; word-break: break-word; }
.inline-form { display: inline; }
.hidden { display: none !important; }
#global-tooltip { position: fixed; pointer-events: none; }

.auth-screen {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F5F5F7;
  padding: 24px 16px;
}
#bg-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.auth-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 400px;
  border-radius: 24px;
  padding: 32px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.auth-card.auth-wide { max-width: 460px; }
.auth-brand {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #00D0D4, #FA47C9);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 208, 212, 0.22);
}
.auth-logo svg { width: 32px; height: 32px; }
.auth-brand h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.auth-brand p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--apple-muted);
}
.auth-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--apple-text);
  transition: all 0.2s ease;
}
.auth-input:focus {
  outline: none;
  border-color: rgba(0, 208, 212, 0.35);
  box-shadow: 0 0 0 3px rgba(0, 208, 212, 0.08);
  background: #fff;
}
.auth-card .form-group { margin-bottom: 16px; }
.auth-card .btn-premium { width: 100%; margin-top: 8px; }
.auth-foot {
  margin: 20px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--apple-muted);
}
.toast-body { line-height: 1.45; }

.btn-premium .lucide,
.btn-gradient .lucide,
.dropdown-item .lucide {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.search-field {
  position: relative;
  flex: 1;
  min-width: 180px;
}
.search-field > .lucide {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--apple-subtle);
  pointer-events: none;
}
.search-field .form-input { padding-left: 38px; }
.cell-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.cell-copy { min-width: 0; }
.cell-title {
  display: block;
  font-weight: 600;
  color: var(--apple-text);
}
.cell-sub {
  font-size: 12px;
  color: var(--apple-muted);
  margin-top: 2px;
}
.avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  background: rgba(0, 208, 212, 0.12);
  color: var(--wemvy-cyan-dark);
}
.avatar-sm.tone-pink { background: rgba(250, 71, 201, 0.12); color: var(--wemvy-pink); }
.avatar-sm.tone-blue { background: rgba(59, 130, 246, 0.12); color: #2563EB; }
.avatar-sm.tone-purple { background: rgba(168, 85, 247, 0.12); color: #7C3AED; }
.avatar-sm.tone-amber { background: rgba(245, 158, 11, 0.16); color: #B45309; }
.avatar-sm .lucide {
  width: 16px;
  height: 16px;
}
.stat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon .lucide { width: 18px; height: 18px; }
.stat-icon.tone-cyan { background: rgba(0, 208, 212, 0.12); color: var(--wemvy-cyan); }
.stat-icon.tone-pink { background: rgba(250, 71, 201, 0.12); color: var(--wemvy-pink); }
.stat-icon.tone-blue { background: rgba(59, 130, 246, 0.12); color: #3B82F6; }
.stat-icon.tone-purple { background: rgba(168, 85, 247, 0.12); color: #A855F7; }
.stat-icon.tone-amber { background: rgba(245, 158, 11, 0.16); color: #F59E0B; }
.stat-icon.tone-emerald { background: rgba(16, 185, 129, 0.14); color: #10B981; }
.card-premium:has(> .card-head),
.card-premium:has(> .card-toolbar) {
  overflow: hidden;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: -22px -24px 20px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--apple-border);
  background: linear-gradient(135deg, rgba(0, 208, 212, 0.06) 0%, rgba(250, 71, 201, 0.04) 50%, transparent 100%);
  border-radius: 16px 16px 0 0;
}
.card-head .stat-head { margin: 0; }
.card-head .card-title,
.stat-head .card-title { margin: 0; }
.card-head-copy { min-width: 0; }
.card-head-copy .card-title { margin: 0; }
.card-head-copy .card-sub {
  font-size: 13px;
  color: var(--apple-muted);
  margin: 2px 0 0;
}
.card-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: -22px -24px 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--apple-border);
  background: linear-gradient(135deg, rgba(0, 208, 212, 0.06) 0%, rgba(250, 71, 201, 0.04) 50%, transparent 100%);
}
.card-toolbar .form-input,
.card-toolbar .form-select,
.card-toolbar select,
.card-toolbar .csel-trigger {
  height: 36px;
  min-height: 36px;
  font-size: 13px;
}
.card-toolbar .csel-trigger {
  padding: 0 36px 0 12px;
}
.card-toolbar .btn-gradient,
.card-toolbar .btn-premium {
  height: 36px;
}
.card-toolbar + .table-wrap,
.card-toolbar + .empty-state { margin-top: 0; }
.card-premium.card-table {
  padding: 0;
  overflow: hidden;
}
.card-premium.card-table .card-head,
.card-premium.card-table .card-toolbar {
  margin: 0;
  border-radius: 16px 16px 0 0;
}
.card-premium.card-table .empty-state {
  padding: 24px 20px 32px;
}
.card-premium.card-table > .muted {
  padding: 12px 20px 24px;
  margin: 0;
}
.card-premium.card-table .table-footer {
  margin: 0;
  padding: 14px 20px 16px;
  border-top: 1px solid var(--apple-border);
  background: linear-gradient(180deg, rgba(0, 208, 212, 0.04), rgba(255, 255, 255, 0));
}
.card-premium.card-table > .table-wrap + form,
.card-premium.card-table > .muted + form {
  margin: 0;
  padding: 16px 20px 20px;
}
.card-premium.card-table .data-table th:first-child,
.card-premium.card-table .data-table td:first-child { padding-left: 20px; }
.card-premium.card-table .data-table th:last-child,
.card-premium.card-table .data-table td:last-child { padding-right: 20px; }
.shortcut-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.shortcut-card .page-lead {
  flex: 1;
  margin-top: 0;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
}
.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--apple-muted);
  text-decoration: none;
}
.btn-icon .lucide { width: 15px; height: 15px; }
.btn-icon:hover {
  background: #fff;
  color: var(--apple-text);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.empty-state .btn-premium { margin-top: 16px; }
.empty-state-icon .lucide {
  width: 24px;
  height: 24px;
  color: var(--apple-muted);
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--apple-muted);
}
.meta-dot { opacity: 0.4; }

.file-field {
  width: 100%;
  position: relative;
}
.file-field-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.file-dropzone {
  display: block;
  padding: 32px 20px;
  border-color: rgba(0, 208, 212, 0.28);
  background: rgba(0, 208, 212, 0.035);
}
.file-dropzone:hover,
.file-dropzone.dragover,
.file-dropzone:focus {
  outline: none;
  border-color: #00D0D4;
  background: rgba(0, 208, 212, 0.08);
  box-shadow: 0 0 0 3px rgba(0, 208, 212, 0.1);
}
.file-dropzone.dragover {
  border-style: solid;
}
.file-dropzone-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0, 208, 212, 0.18), rgba(250, 71, 201, 0.12));
  color: var(--wemvy-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.file-dropzone-icon .lucide {
  width: 22px;
  height: 22px;
}
.file-dropzone-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--apple-text);
}
.file-dropzone-lead {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--apple-muted);
}
.file-dropzone-lead span {
  color: var(--wemvy-cyan);
  font-weight: 500;
}
.file-dropzone-hint {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--apple-subtle);
}
.file-chosen { margin-top: 0; }
.file-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--apple-border);
}
.file-chip-thumb {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(0, 208, 212, 0.1);
  color: var(--wemvy-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.file-chip-thumb .lucide { width: 18px; height: 18px; }
.file-chip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.file-chip-copy { min-width: 0; flex: 1; }
.file-chip-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--apple-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-chip-meta {
  font-size: 11px;
  color: var(--apple-muted);
  margin-top: 2px;
}
.file-csv-preview {
  margin-top: 12px;
  border: 1px solid var(--apple-border);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.file-csv-caption {
  font-size: 11px;
  font-weight: 600;
  color: var(--apple-muted);
  margin: 0;
  padding: 10px 12px 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.file-csv-preview .table-wrap { margin: 0; padding-bottom: 4px; }
.file-csv-table { font-size: 12px; }
.file-csv-table th {
  background: rgba(0, 208, 212, 0.04);
  font-size: 11px;
}
.file-csv-table th,
.file-csv-table td {
  padding: 8px 12px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1023px) {
  .header-menu-btn { display: flex; }
  .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 80px !important;
    background: linear-gradient(180deg, #E0F7FA 0%, #FCE4EC 50%, #E8F5E9 100%) !important;
  }
  .app-header { padding: 0 16px; }
  .app-content-inner { padding: 20px 16px 56px; }
}
@media (min-width: 1024px) {
  .sidebar-overlay { display: none !important; }
}
@media (max-width: 900px) {
  .split-2 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .form-row { grid-template-columns: 1fr; }
  .page-title { font-size: 22px; }
  .check-inline { height: auto; white-space: normal; }
  .card-head .filter-row,
  .filter-compact {
    min-width: 0;
    width: 100%;
  }
  .card-head .filter-row > .csel,
  .card-head .filter-row > select,
  .card-head .filter-row > .form-select,
  .card-head .csel {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
  }
}
