/* --- 1. Design Tokens --- */
:root {
    /* Cores e Gradientes */
    --brand-dark: #001035; 
    --blue-1: #38BCFF;
    --blue-2: #20A4FE;
    --blue-3: #1991FA;
    --blue-4: #0B82F9;
    --blue-5: #016FF4;

    --brand-gradient: linear-gradient(90deg, var(--blue-1) 0%, var(--blue-2) 25%, var(--blue-3) 50%, var(--blue-4) 75%, var(--blue-5) 100%);
    
    --primary-color: #0B82F9;
    --primary-hover: #016FF4;
    
    --text-main: #001035;
    --text-muted: #536382;
    --bg-body: #FFFFFF;
    --bg-light: #F4F7FB;
    --border-color: #DAE3F0;

    --spacing-md: 16px;
    --spacing-lg: 32px;
    --radius: 12px;

    /* Dashboard Tokens (dashboard_static-main) */
    --bg: #f4f6f9;
    --panel: #ffffff;
    --text: #0c0d0e;
    --muted: #6b7280;
    --primary: #016ff4;
    --primary-2: #0b82f9;
    --border: #e5e7eb;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.06);

    /* Tipografia (Material Design scale do dashboard) */
    --md-display-large: 57px;
    --md-display-medium: 45px;
    --md-display-small: 36px;
    --md-headline-large: 32px;
    --md-headline-medium: 28px;
    --md-headline-small: 24px;
    --md-title-large: 22px;
    --md-title-medium: 16px;
    --md-title-small: 14px;
    --md-body-large: 16px;
    --md-body-medium: 14px;
    --md-body-small: 12px;
    --md-label-large: 14px;
    --md-label-medium: 12px;
    --md-label-small: 11px;
}

/* --- 2. Reset & Base --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; color: var(--text-main); background-color: var(--bg-body); line-height: 1.6; }

/* --- 3. Layout --- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 260px;
    background-color: var(--brand-dark);
    color: #fff;
    padding: var(--spacing-lg);
    position: fixed;
    height: 100%;
    overflow-y: auto;
    z-index: 100;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.brand-name { font-size: 1.5rem; margin-bottom: 40px; color: #fff; }
.brand-name strong { background: var(--brand-gradient); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.sidebar ul { list-style: none; }
.sidebar li { margin-bottom: 8px; }

.sidebar a {
    text-decoration: none;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 16px;
}

.sidebar a:hover, .sidebar a.active { color: #fff; background-color: rgba(255,255,255,0.1); }
.sidebar a .lucide { width: 18px; height: 18px; }

.submenu-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    padding: 10px 12px;
    border-radius: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    justify-content: space-between;
    font-size: 16px;
}

.submenu-toggle-content {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.submenu-caret {
    width: 16px;
    height: 16px;
    opacity: 0.8;
    transition: transform 0.2s ease;
}

.submenu-title.open .submenu-caret {
    transform: rotate(180deg);
}

.submenu-toggle:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.submenu-title .lucide { width: 18px; height: 18px; }

.submenu {
    list-style: none;
    margin: 6px 0 0 18px;
    padding-left: 8px;
    border-left: 1px solid rgba(255,255,255,0.12);
    display: none;
}

.submenu li { margin-bottom: 6px; }

.submenu-title.open .submenu {
    display: block;
}

.content { margin-left: 260px; padding: 60px 80px; width: 100%; max-width: 1400px; }

/* --- 4. Elementos Gerais --- */
h1 { font-size: 2.5rem; margin-bottom: var(--spacing-md); letter-spacing: -1px; }
h2 { font-size: 2rem; margin-bottom: var(--spacing-md); margin-top: 10px; }
p { margin-bottom: var(--spacing-md); color: var(--text-muted); max-width: 800px; }
hr { border: 0; border-top: 1px solid var(--border-color); margin: 60px 0; }

.card { background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius); padding: var(--spacing-lg); box-shadow: 0 4px 20px rgba(0, 16, 53, 0.05); }
.grid-2 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* --- 5. Logos & Downloads --- */
.logo-card-container { display: flex; flex-direction: column; gap: var(--spacing-md); padding: 20px; }
.logo-header { display: flex; justify-content: space-between; align-items: center; }

.logo-preview { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    height: 180px; 
    border-radius: var(--radius); 
    border: 1px solid var(--border-color); 
    padding: 20px; 
    overflow: hidden; 
}

.logo-preview img { 
    max-width: 100%; 
    max-height: 100%; 
    object-fit: contain; 
}

.logo-preview.dark { background-color: var(--brand-dark); }
.logo-preview.light { background-color: var(--bg-light); }

/* Downloads */
.download-controls { display: flex; flex-direction: column; gap: 12px; }
.inputs-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input-group label { font-size: 0.85rem; color: rgba(0,0,0,0.6); }
.input-size { width: 100%; border: 1px solid var(--border-color); border-radius: 8px; padding: 10px 12px; outline: none; }
.input-size:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(11, 130, 249, 0.12); }

.buttons-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#components .btn { padding: 10px 20px; border-radius: 6px; border: none; cursor: pointer; font-weight: 600; transition: 0.2s; font-size: 0.95rem; display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 1; }
.btn { padding: 10px 20px; border-radius: 6px; border: none; cursor: pointer; font-weight: 600; transition: 0.2s; font-size: 0.95rem; display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 1; text-decoration: none; }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }
.btn-primary { background: var(--primary-color); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1px solid var(--primary-color); color: var(--primary-color); }
.btn-outline:hover { background: rgba(11, 130, 249, 0.1); }
#components .btn .lucide { width: 16px; height: 16px; }

.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.info-note { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: rgba(0,0,0,0.65); background: rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.06); padding: 10px 12px; border-radius: 10px; }
.info-note .lucide { width: 18px; height: 18px; }
.icon-link-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.icon-link-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(1, 111, 244, 0.25);
  background: #ffffff;
  color: #016ff4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
}

.icon-link-btn:hover {
  background: #eef6ff;
}

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

.template-open {
  position: relative;
  align-items: flex-start;
}

.template-open-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: auto;
  right: 0;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
  display: none;
  flex-direction: column;
  padding: 6px;
  z-index: 5;
}

.template-open-menu a {
  padding: 10px 12px;
  border-radius: 8px;
  color: #0f172a;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}

.template-open-menu a:hover {
  background: rgba(0,0,0,0.05);
}

.template-open-menu.open {
  display: flex;
}

.icon-library {
  margin-top: 24px;
  display: grid;
  gap: 18px;
}

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

.icon-card {
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  padding: 12px;
  background: #ffffff;
  display: grid;
  gap: 10px;
}

.icon-preview {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(1, 111, 244, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #016ff4;
}

.icon-preview svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.2;
}

.icon-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #334155;
}

.icon-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  align-items: stretch;
}

.icon-actions .btn {
  flex: 0 0 auto;
  padding: 6px 8px;
  font-size: 0.75rem;
  border-radius: 8px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-actions .icon-copy-jsx {
  grid-column: 1 / -1;
  background: #016ff4;
  color: #ffffff;
  border-color: #016ff4;
}

.icon-actions .icon-copy-jsx:hover {
  filter: brightness(0.95);
}

.icon-actions .icon-download {
  background: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.icon-actions .icon-download:hover {
  background: rgba(11, 130, 249, 0.1);
}

/* --- 6. Cores --- */
.color-section-title { margin: 24px 0 14px; font-size: 1.1rem; font-weight: 600; }
.color-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.color-card { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; padding: 16px; }
.color-swatch { width: 64px; height: 64px; border-radius: 14px; border: 1px solid rgba(0,0,0,0.06); overflow: hidden; background-clip: padding-box; }
.color-info strong { display: block; margin-bottom: 8px; }
.value-row { display: grid; grid-template-columns: 48px 1fr; gap: 10px; padding: 6px 8px; border-radius: 10px; cursor: pointer; transition: background .12s ease; }
.value-row:hover { background: rgba(0,0,0,0.03); }
.value-label { font-size: 12px; font-weight: 700; color: rgba(0,0,0,0.55); }
.value { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 12px; color: rgba(0,0,0,0.78); }

/* --- 6.1 Paleta Legada --- */
.legacy-colors .color-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 30px; }
.legacy-colors .color-swatch { width: auto; height: auto; border: none; border-radius: 0; display: flex; flex-direction: column; }
.legacy-colors .swatch-box { height: 120px; border-radius: 12px; margin-bottom: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); border: 1px solid rgba(0,0,0,0.05); transition: transform 0.2s; }
.legacy-colors .color-swatch:hover .swatch-box { transform: translateY(-3px); }
.legacy-colors .swatch-info strong { display: block; font-size: 1rem; margin-bottom: 10px; color: var(--text-main); }
.legacy-colors .color-values { display: flex; flex-direction: column; gap: 6px; }
.legacy-colors .value-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.75rem; background: #f0f2f5; padding: 8px 10px; border-radius: 6px; border: 1px solid transparent; }
.legacy-colors .value-row:hover { background: #e2e6ea; border-color: #cbd3da; }
.legacy-colors .value-text { display: flex; align-items: center; flex: 1; padding-right: 10px; }
.legacy-colors .value-label { font-weight: 700; color: var(--text-muted); text-transform: uppercase; font-size: 0.65rem; margin-right: 8px; min-width: 35px; }
.legacy-colors .value-code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; color: var(--text-main); word-break: break-word; font-size: 0.7rem; }
.legacy-colors .copy-icon { width: 14px; height: 14px; color: var(--text-muted); opacity: 0.5; transition: 0.2s; flex-shrink: 0; }
.legacy-colors .value-row:hover .copy-icon { opacity: 1; color: var(--primary-color); }
.legacy-colors .gradient-box { width: 100%; height: 120px; border-radius: var(--radius); background: var(--brand-gradient); margin-bottom: 10px; cursor: pointer; position: relative; box-shadow: 0 4px 15px rgba(1, 111, 244, 0.3); transition: transform 0.2s; }
.legacy-colors .gradient-box:hover { transform: scale(1.01); }
.legacy-colors .gradient-box::after { content: "Copiar CSS"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0, 16, 53, 0.8); color: #fff; padding: 8px 16px; border-radius: 20px; font-size: 0.8rem; opacity: 0; transition: 0.2s; pointer-events: none; }
.legacy-colors .gradient-box:hover::after { opacity: 1; }
.legacy-colors .hidden-css { display: none; }

/* --- 7. Responsivo --- */
@media (max-width: 1200px) {
    .content { padding: 50px 50px; }
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
    .content { margin-left: 0; padding: 30px 20px; }
    .sidebar { display: none; }
    .grid-2 { grid-template-columns: 1fr; }
}

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

.type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.type-sample {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.05);
  display: grid;
  gap: 12px;
}

.type-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.type-token {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  color: #4b5563;
}

.type-preview{
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
}

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

.type-spec-item{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  color: #4b5563;
  background: #f3f4f6;
  border: 1px solid rgba(0,0,0,0.06);
  padding: 6px 8px;
  border-radius: 999px;
}

/* --- Landing Page --- */
.landing-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.landing-type-sample {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.05);
  display: grid;
  gap: 12px;
}

.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  background: #001035;
  color: #fff;
  padding: 12px 16px;
  border-radius: 14px;
}

.landing-logo {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.landing-nav {
  display: flex;
  gap: 14px;
  font-size: 0.85rem;
  color: #e3efff;
}

.landing-nav a {
  color: #e3efff;
}

.landing-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-header .icon-button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #ffffff;
}

.landing-header .icon-button svg {
  width: 22px;
  height: 22px;
  stroke: #ffffff;
  stroke-width: 2;
}

.landing-hero {
  width: 100%;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  padding: 18px;
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.landing-hero-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: #1991fa;
}

.landing-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
}

.landing-card {
  background: #f4f7fb;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  position: relative;
  overflow: hidden;
  aspect-ratio: 560 / 320;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.landing-card.wide {
  grid-column: span 2;
  aspect-ratio: 1160 / 320;
}

.landing-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #ffffff;
  color: #1991fa;
  padding: 6px 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.78rem;
  box-shadow: 0 8px 18px rgba(25, 145, 250, 0.18);
  z-index: 2;
}

.landing-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.landing-card-desc {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px;
  color: #ffffff;
  font-size: 0.9rem;
  line-height: 1.4;
  background: linear-gradient(180deg, rgba(0, 16, 53, 0) 0%, rgba(0, 16, 53, 0.72) 100%);
}

.landing-carousel {
  width: 100%;
  overflow: hidden;
}

.landing-carousel-track {
  display: flex;
  gap: 16px;
  transition: transform 0.35s ease;
  will-change: transform;
}

.landing-solution-card {
  background: #2e4a8b;
  color: #ffffff;
  border-radius: 22px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
  flex: 0 0 calc(50% - 8px);
}

.landing-solution-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-solution-title h4 {
  margin: 0;
  font-size: 1.05rem;
}

.landing-solution-title svg {
  width: 34px;
  height: 34px;
  stroke: #38bcff;
  stroke-width: 2;
}

.landing-solution-lead {
  margin: 0;
  font-weight: 700;
  color: #ffffff;
  font-size: 0.98rem;
}

.landing-solution-desc {
  margin: 0;
  color: #d6ecff;
  font-size: 0.9rem;
  line-height: 1.5;
}

.landing-footer {
  width: 100%;
  background: #001035;
  color: #ffffff;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
}

.landing-search {
  width: 100%;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.landing-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #d6deea;
  border-radius: 12px;
}

.landing-search-row input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 0.9rem;
}

.landing-mobile-menu {
  width: 100%;
  background: #001035;
  color: #fff;
  border-radius: 16px;
  padding: 16px;
  display: none;
  gap: 14px;
}

.landing-mobile-menu a {
  color: #e3efff;
  text-decoration: none;
}

.landing-mobile-shell {
  width: 100%;
  background: #001035;
  border-radius: 18px;
  overflow: hidden;
  max-width: 360px;
  margin: 0 auto;
}

.landing-mobile-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #001035;
  border-bottom: none;
}

.landing-mobile-logo {
  font-weight: 800;
  color: #38bcff;
  letter-spacing: 1px;
}

.landing-mobile-toggle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.landing-mobile-toggle svg {
  width: 22px;
  height: 22px;
  stroke: #ffffff;
}

.landing-mobile-nav {
  display: grid;
  gap: 12px;
  font-weight: 600;
  text-align: center;
}

.landing-mobile-search {
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 10px 12px;
  background: transparent;
  color: #ffffff;
}

.landing-mobile-search::placeholder {
  color: rgba(255,255,255,0.6);
}

.landing-mobile-divider {
  height: 1px;
  background: rgba(255,255,255,0.12);
}

.landing-mobile-cta {
  width: 100%;
  border-radius: 999px;
}

.landing-mobile-shell.is-open .landing-mobile-menu {
  display: grid;
}

.landing-carousel-controls {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.landing-carousel-controls .icon-button.ghost {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid #d6deea;
  background: #ffffff;
  color: #0b82f9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.landing-carousel-controls .icon-button.ghost:hover {
  background: #eef6ff;
}

.landing-carousel-controls .icon-button.ghost svg {
  width: 20px;
  height: 20px;
  stroke: #0b82f9;
  stroke-width: 2.2;
}

.landing-dots {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.landing-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cfe2ff;
}

.landing-dot.active {
  background: #0b82f9;
}

.landing-backtotop {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #016ff4;
  color: #fff;
  display: grid;
  place-items: center;
}
/* --- Style Guide: Componentes --- */
.component-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.component-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.05);
  padding: 16px;
  display: grid;
  gap: 14px;
  grid-column: 1 / -1;
}

.component-head h3 {
  margin: 0 0 6px;
}

.component-head p {
  margin: 0;
  color: #6b7280;
  font-size: 0.95rem;
}

.component-preview {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Tabs + code blocks */
.code-tabs {
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 12px;
}

.tab-list {
  display: inline-flex;
  background: #f3f4f6;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}

.tab {
  border: none;
  background: transparent;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  color: #374151;
}

.tab.active {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);
}

.tab-panels {
  margin-top: 12px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: grid;
  gap: 12px;
}

.code-block {
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  overflow: hidden;
  background: #0b1220;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.85);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
}

.code-copy-btn {
  border: none;
  background: rgba(255,255,255,0.14);
  color: #fff;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
}
.code-copy-btn:hover { background: rgba(255,255,255,0.22); }

.code-block pre {
  margin: 0;
  padding: 12px;
  overflow: auto;
}

.code-block code {
  color: #e5e7eb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.5;
}

/* Component styles (escopados para preview) */
#components .btn {
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
  min-height: 44px;
  min-width: 160px;
}

#components .btn.primary { background: var(--primary); color: #fff; }
#components .btn.primary:hover { background: var(--primary-2); transform: translateY(-1px); }

#components .btn.outline { background: transparent; border-color: var(--primary); color: var(--primary); border-width: 2px; min-width: 180px; }
#components .btn.outline:hover { background: #eef6ff; }

#components .btn.danger { background: #dc5f5f; color: #fff; }
#components .btn.danger:hover { filter: brightness(0.95); transform: translateY(-1px); }

#components .btn:disabled {
  opacity: 1;
  cursor: not-allowed;
  transform: none;
  background: #cbd5e1;
  color: #ffffff;
  border-color: #cbd5e1;
}

#components .btn.with-icon svg,
#components .btn.with-icon .lucide {
  width: 18px;
  height: 18px;
}

#components .icon-actions .btn {
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 0;
  min-height: auto;
  border-width: 1px;
}

#components .icon-actions .icon-copy-jsx {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

#components .icon-actions .icon-download {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

/* Filter menu */
#components .filter-demo {
  position: relative;
  width: 100%;
}

#components .filter-btn {
  background: #016ff4;
  border: none;
  color: #ffffff;
  font-weight: 700;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  min-height: 44px;
  min-width: 140px;
  justify-content: center;
}

#components .filter-menu {
  margin-top: 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  padding: 12px 14px;
  width: min(560px, 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#components .filter-clear {
  color: #016ff4;
  background: transparent;
  border: none;
  font-weight: 700;
  text-align: right;
  padding: 6px 2px;
  justify-self: end;
  margin-left: auto;
  display: inline-flex;
}

#components .filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

#components .filter-group {
  display: grid;
  gap: 10px;
}

#components .filter-title {
  font-weight: 700;
  color: #111827;
}

#components .filter-option {
  border-radius: 14px;
  border: none;
  background: transparent;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  font-weight: 600;
  color: #111827;
  position: relative;
}

#components .filter-option.active {
  background: #eaf3ff;
  color: #016ff4;
}

#components .filter-option.active::after {
  content: "✓";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #016ff4;
  font-weight: 700;
}

#components .icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  position: relative;
}

#components .icon-btn:hover { background: #eef6ff; }
#components .material-symbols-rounded { font-size: 20px; }

#components .icon-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0b1220;
  color: #ffffff;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

#components .icon-btn:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

#components .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  min-width: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

#components .form-field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
#components .form-field > span { font-size: 12px; font-weight: 700; color: var(--muted); }
#components .form-field input {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  background: var(--panel);
  color: var(--text);
  outline: none;
}
#components .form-field input:focus {
  border-color: rgba(1,111,244,0.45);
  box-shadow: 0 0 0 4px rgba(1,111,244,0.12);
}

#components .search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #ffffff;
  border: 2px solid var(--primary);
  border-radius: 16px;
  color: var(--text);
  min-height: 48px;
}

#components .search-field input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 14px;
  background: transparent;
  color: var(--text);
}

#components .search-field .lucide {
  color: var(--primary);
}

#components .search-field:focus-within {
  box-shadow: 0 0 0 4px rgba(1,111,244,0.12);
}


#components .stat-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

#components .stat-card:hover {
  border-color: #cfe3ff;
  box-shadow: 0 10px 24px rgba(1, 111, 244, 0.12);
}

#components .stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #eef6ff;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#components .stat-icon .material-symbols-rounded { font-size: 22px; }
#components .stat-body { display: grid; gap: 2px; }

#components .stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
}

#components .stat-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

/* Tabs navigation (WES Hub) */
#components .hub-tabs {
  display: flex;
  gap: 26px;
  border-bottom: 2px solid #e6eef9;
  padding-bottom: 10px;
  width: 100%;
}

#components .hub-tab {
  background: none;
  border: none;
  color: #1c63ff;
  font-weight: 700;
  font-size: 16px;
  padding: 6px 0 12px;
  cursor: pointer;
  position: relative;
}

#components .hub-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -12px;
  width: 100%;
  height: 4px;
  background: #1c63ff;
  border-radius: 999px;
}

/* Table (WES Hub) */
#components .hub-table {
  display: grid;
  gap: 10px;
  width: 100%;
}

#components .hub-row {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr 1.6fr 0.8fr;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  align-items: center;
}

#components .hub-row.header {
  background: #f8fafc;
  font-weight: 700;
  color: #111827;
}

#components .hub-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

#components .hub-action {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #016ff4;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

#components .hub-action:hover {
  background: #eef6ff;
  transform: translateY(-1px);
}

#components .hub-action.danger {
  color: #e25959;
}

#components .hub-action.danger:hover {
  background: #fdecec;
}

/* Pagination (WES Hub) */
#components .hub-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

#components .page-btn {
  background: transparent;
  border: none;
  color: #111827;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 8px;
  position: relative;
}

#components .page-btn.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 3px;
  background: #016ff4;
  border-radius: 999px;
}

#components .page-arrow {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #016ff4;
  cursor: pointer;
}

/* Modal (WES Hub) */
#components .modal-demo {
  position: relative;
  width: 100%;
}

#components .modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 16px;
}

#components .modal-card {
  position: relative;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  padding: 18px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

#components .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

#components .modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

#components .modal-close {
  border: none;
  background: transparent;
  color: #016ff4;
  font-size: 22px;
  cursor: pointer;
}

#components .modal-body {
  display: grid;
  gap: 12px;
}

#components .modal-label {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

#components .modal-input,
#components .modal-textarea {
  width: 100%;
  border: 2px solid #016ff4;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
}

#components .modal-textarea {
  min-height: 80px;
  resize: vertical;
}

#components .modal-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #111827;
}

#components .switch {
  position: relative;
  width: 46px;
  height: 26px;
}

#components .switch input {
  display: none;
}

#components .switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #e5e7eb;
}

#components .switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

#components .switch input:checked + .switch-track {
  background: #016ff4;
}

#components .switch input:checked + .switch-track::after {
  transform: translateX(20px);
}

#components .modal-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}
/* Toast */
.toast {
  position: fixed;
  left: 50%;
  top: 18px;
  transform: translate(-50%, -40px);
  padding: 12px 14px;
  background: #0b1220;
  color: #fff;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 16px 40px rgba(0,0,0,0.22);
  display: flex;
  gap: 10px;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 999;
}

.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #3b0b10; }
.toast .lucide { width: 18px; height: 18px; }
