@import url('https://fonts.googleapis.com/css2?family=Sentient:ital,wght@0,400;0,700;1,400&family=Caveat:wght@400;600&display=swap');

/* ============================================
   modoPAZ — Design System v1.0
   ============================================ */

:root {
  /* Azul — âncora */
  --azul-claro:        #daeaf5;
  --azul:              #7fb3cc;
  --azul-escuro:       #2e6f96;
  /* Azul-claro — abertura */
  --azul2-claro:       #f0f7fc;
  --azul2:             #c8e2f0;
  --azul2-escuro:      #7aaec8;
  /* Turquesa — encontro */
  --turquesa-claro:    #d4f0ec;
  --turquesa:          #72c4b8;
  --turquesa-escuro:   #2a8a80;
  /* Verde — vida */
  --verde-claro:       #d8edd8;
  --verde:             #88bb88;
  --verde-escuro:      #3a7a3a;
  /* Amarelo — presença */
  --amarelo-claro:     #fdf0cc;
  --amarelo:           #f0c060;
  --amarelo-escuro:    #c88a10;
  /* Coral — humanidade */
  --coral-claro:       #fae0d8;
  --coral:             #e89080;
  --coral-escuro:      #c04a38;
  /* Rosa — acolhimento */
  --rosa-claro:        #fce8f0;
  --rosa:              #e8a0b8;
  --rosa-escuro:       #b84a70;
  /* Lilás — contemplação */
  --lilas-claro:       #ede8f8;
  --lilas:             #c0a8d8;
  --lilas-escuro:      #7a4aaa;

  /* Neutros */
  --dark:              #2d2a25;
  --mid:               #5a5650;
  --muted:             #8a8680;
  --subtle:            #b8b4b0;
  --light:             #f7f5f2;
  --white:             #ffffff;
  --border:            rgba(45,42,37,0.09);
  --border-mid:        rgba(45,42,37,0.16);

  /* Tipografia */
  --font-display:      'Caveat', cursive;
  --font-body:         'Sentient', Georgia, serif;
  --font-mono:         'SFMono-Regular', Consolas, monospace;

  /* Tokens de espaçamento */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;

  /* Border radius */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-btn:  10px;
  --radius-card: 16px;
  --radius-lg:   20px;
  --radius-pill: 999px;

  /* Sombras */
  --shadow-xs:  0 1px 2px rgba(0,0,0,.05);
  --shadow-sm:  0 2px 6px rgba(0,0,0,.07);
  --shadow-md:  0 4px 16px rgba(0,0,0,.09);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.11);
  --shadow-xl:  0 16px 56px rgba(0,0,0,.14);
  --shadow-azul: 0 4px 20px rgba(127,179,204,.32);

  /* Z-index */
  --z-base:     0;
  --z-raised:   10;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-modal:    500;
  --z-toast:    600;
}

/* BASE */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-body); background: #faf8f5; color: var(--dark); line-height: 1.7; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--azul2); border-radius: 3px; }

/* ============================================
   LAYOUT
   ============================================ */

.ds-nav {
  position: fixed; top: 0; left: 0;
  width: 224px; height: 100vh;
  background: var(--white);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1.2rem;
  overflow-y: auto; z-index: var(--z-sticky);
  display: flex; flex-direction: column; gap: 0;
}

.ds-main { margin-left: 224px; padding: 3rem 4rem 6rem; max-width: 920px; }

/* NAV */
.nav-brand { margin-bottom: 1.5rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--border); }
.nav-brand img { height: 26px; width: auto; display: block; margin-bottom: 0.3rem; }
.nav-version { font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--subtle); }

.nav-tab-switcher {
  display: flex; gap: 4px;
  background: var(--light);
  border-radius: var(--radius-btn);
  padding: 3px; margin-bottom: 1.2rem;
}

.nav-tab-btn {
  flex: 1; padding: 5px 6px;
  font-size: 0.68rem; font-family: var(--font-body);
  border: none; background: transparent;
  border-radius: 7px; cursor: pointer;
  color: var(--muted); transition: all 0.15s;
  letter-spacing: 0.02em;
}

.nav-tab-btn.active {
  background: var(--white);
  color: var(--dark);
  box-shadow: var(--shadow-xs);
}

.nav-group { margin-bottom: 0.2rem; }

.nav-section-label {
  font-size: 0.58rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: #ccc;
  padding: 1rem 0.5rem 0.35rem;
  display: block;
}

nav ul { list-style: none; }
nav ul li { margin-bottom: 1px; }

nav ul li a {
  font-size: 0.8rem; color: var(--mid);
  text-decoration: none;
  padding: 0.28rem 0.55rem;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 6px;
  transition: background 0.12s, color 0.12s;
}

nav ul li a:hover { background: var(--azul-claro); color: var(--azul-escuro); }
nav ul li a.active { background: var(--azul-claro); color: var(--azul-escuro); font-weight: 500; }

.nav-dot {
  width: 6px; height: 6px; border-radius: 50%;
  flex-shrink: 0; opacity: 0.5;
}

/* LAYER TOGGLE */
.layer { display: none; }
.layer.active { display: block; }

/* ============================================
   SECTIONS
   ============================================ */

.ds-section {
  padding-top: 3.5rem;
  border-top: 1px solid var(--border);
  margin-top: 3.5rem;
}
.ds-section:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }

.section-label {
  font-size: 0.62rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--azul);
  margin-bottom: 0.35rem; display: block;
}

.section-num {
  font-size: 0.6rem; color: var(--subtle);
  letter-spacing: 0.1em; margin-right: 0.4rem;
}

.ds-section h2 {
  font-family: var(--font-display);
  font-size: 1.9rem; font-weight: 600;
  color: var(--dark); line-height: 1.2;
  margin-bottom: 1rem;
}

.ds-section h3 {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 600;
  color: var(--dark); margin-top: 2rem; margin-bottom: 0.7rem;
}

.ds-section p {
  font-size: 0.95rem; line-height: 1.85;
  color: #3e3a33; margin-bottom: 0.8rem; max-width: 620px;
}
.ds-section p:last-child { margin-bottom: 0; }
.ds-section p em { font-style: italic; }

.ds-divider { height: 1px; background: var(--border); margin: 1.2rem 0; }

/* HERO */
.ds-hero {
  background: var(--azul-claro);
  border-radius: var(--radius-lg);
  padding: 2.5rem 3rem;
  margin-bottom: 3.5rem;
  display: flex; align-items: center;
  justify-content: space-between; gap: 2rem;
}

.ds-hero-left img { height: 40px; width: auto; display: block; margin-bottom: 0.6rem; }
.ds-hero-tagline { font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--azul-escuro); display: block; margin-bottom: 0.6rem; }
.ds-hero-desc { font-size: 0.85rem; color: var(--mid); line-height: 1.6; max-width: 340px; }

.ds-hero-stats { display: flex; gap: 1.5rem; flex-shrink: 0; }
.ds-hero-stat { text-align: center; }
.ds-hero-stat-num { font-family: var(--font-display); font-size: 2rem; font-weight: 600; color: var(--azul-escuro); line-height: 1; display: block; }
.ds-hero-stat-label { font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--azul); }

/* ============================================
   COPY ON CLICK
   ============================================ */

.copyable {
  cursor: pointer; position: relative;
  transition: opacity 0.15s;
}
.copyable:hover { opacity: 0.8; }
.copyable::after {
  content: 'copiar';
  position: absolute; top: -24px; left: 50%; transform: translateX(-50%);
  font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--dark); color: var(--white);
  padding: 3px 7px; border-radius: var(--radius-sm);
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
  white-space: nowrap;
}
.copyable:hover::after { opacity: 1; }
.copyable.copied::after { content: 'copiado!'; background: var(--verde-escuro); opacity: 1; }

/* ============================================
   CORES
   ============================================ */

.color-group { margin-bottom: 2rem; }
.color-group-header { margin-bottom: 0.8rem; }
.color-group-name { font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.color-group-meaning { font-size: 0.82rem; color: var(--mid); margin-top: 0.2rem; line-height: 1.5; }

.color-swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }

.swatch {
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer; transition: transform 0.12s, box-shadow 0.12s;
}
.swatch:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.swatch-color { height: 52px; width: 100%; }
.swatch-info { padding: 0.6rem 0.75rem; background: var(--white); }
.swatch-tone { font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: #bbb; margin-bottom: 0.35rem; }
.swatch-vals { font-size: 0.7rem; line-height: 1.8; color: var(--mid); }
.swatch-vals b { color: var(--dark); font-weight: 500; min-width: 46px; display: inline-block; font-size: 0.68rem; }
.swatch-hex-val { font-family: var(--font-mono); }

/* ============================================
   TOKENS TABLE
   ============================================ */

.token-table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 0.82rem; }
.token-table th { font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); padding: 0.5rem 0.8rem; text-align: left; border-bottom: 1px solid var(--border-mid); }
.token-table td { padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--border); color: var(--mid); vertical-align: middle; }
.token-table tr:hover td { background: var(--light); }
.token-table tr.copyable-row { cursor: pointer; }
.token-table tr.copyable-row td:first-child { font-family: var(--font-mono); color: var(--azul-escuro); font-size: 0.75rem; }
.token-table .preview-cell { width: 32px; }
.token-swatch { width: 24px; height: 24px; border-radius: var(--radius-sm); border: 1px solid var(--border); display: inline-block; }

/* ============================================
   TIPOGRAFIA
   ============================================ */

.type-specimen {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 1.8rem 2rem;
  margin-bottom: 0.8rem;
}
.type-label { font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; display: block; }
.type-scale { margin-top: 1.2rem; }
.type-scale-row {
  display: flex; align-items: baseline; gap: 1.5rem;
  padding: 0.9rem 0; border-bottom: 1px solid var(--border);
}
.type-scale-row:last-child { border-bottom: none; }
.type-meta { min-width: 110px; font-size: 0.68rem; color: var(--muted); line-height: 1.6; flex-shrink: 0; }
.type-meta strong { display: block; color: var(--mid); font-size: 0.7rem; margin-bottom: 0.1rem; }

/* ============================================
   TOKENS VISUAIS (espaçamento, radius, sombras)
   ============================================ */

.token-visual-grid { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; }

.sp-token {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer;
}
.sp-bar { background: var(--azul); border-radius: 2px; height: 8px; }
.sp-label { font-size: 0.65rem; color: var(--muted); text-align: center; line-height: 1.4; }
.sp-label code { font-family: var(--font-mono); font-size: 0.62rem; color: var(--azul-escuro); display: block; }

.radius-token {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer;
}
.radius-box {
  width: 52px; height: 52px;
  background: var(--azul-claro);
  border: 2px solid var(--azul);
}
.radius-label { font-size: 0.65rem; color: var(--muted); text-align: center; line-height: 1.4; }
.radius-label code { font-family: var(--font-mono); font-size: 0.62rem; color: var(--azul-escuro); display: block; }

.shadow-token {
  background: var(--white); border-radius: var(--radius-md);
  padding: 1rem 1.2rem; cursor: pointer;
  min-width: 140px;
}
.shadow-label { font-size: 0.65rem; color: var(--muted); margin-top: 0.5rem; line-height: 1.4; }
.shadow-label code { font-family: var(--font-mono); font-size: 0.62rem; color: var(--azul-escuro); display: block; }
.shadow-val { font-size: 0.68rem; color: var(--subtle); margin-top: 0.2rem; }

/* ============================================
   LOGO
   ============================================ */

.logo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-top: 1.2rem; }
.logo-card {
  border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 2rem; display: flex; flex-direction: column;
  align-items: center; gap: 1.2rem;
}
.logo-card.dark { background: var(--dark); border-color: transparent; }
.logo-card img { max-width: 100%; height: auto; }
.logo-card.horizontal img { max-width: 200px; }
.logo-card.vertical img { max-width: 90px; }
.logo-card-label { font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); text-align: center; }
.logo-card.dark .logo-card-label { color: rgba(255,255,255,0.35); }

.logo-variants-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin-top: 1rem; }
.logo-variant {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 1.2rem 0.8rem; display: flex; flex-direction: column;
  align-items: center; gap: 0.8rem;
  transition: border-color 0.15s, background 0.15s; cursor: default;
}
.logo-variant img { height: 36px; width: auto; }
.logo-variant-name { font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* DOWNLOAD BUTTON */
.btn-download {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: var(--radius-btn);
  font-size: 0.78rem; font-family: var(--font-body);
  background: var(--white); border: 1px solid var(--border-mid);
  color: var(--mid); text-decoration: none; cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.btn-download:hover { background: var(--azul-claro); border-color: var(--azul); color: var(--azul-escuro); }
.btn-download svg { width: 14px; height: 14px; flex-shrink: 0; }

.download-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

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

/* Botões */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; border-radius: var(--radius-btn);
  font-size: 0.85rem; font-family: var(--font-body);
  font-weight: 400; border: 1px solid transparent;
  cursor: pointer; transition: all 0.15s; text-decoration: none;
  line-height: 1;
}
.btn:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }

.btn-primary { background: var(--azul); color: var(--white); border-color: var(--azul); }
.btn-primary:hover { background: var(--azul-escuro); border-color: var(--azul-escuro); }

.btn-outline { background: transparent; color: var(--azul-escuro); border-color: var(--azul); }
.btn-outline:hover { background: var(--azul-claro); }

.btn-ghost { background: transparent; color: var(--mid); border-color: var(--border-mid); }
.btn-ghost:hover { background: var(--light); color: var(--dark); }

.btn-sm { padding: 6px 14px; font-size: 0.78rem; }
.btn-lg { padding: 12px 28px; font-size: 0.95rem; }

.btn:disabled, .btn.disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

.btn-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn-loading::after {
  content: ''; position: absolute;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.btn-group { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 1rem; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.02em;
  border: 1px solid transparent;
}
.badge-azul    { background: var(--azul-claro);    color: var(--azul-escuro);    border-color: var(--azul2); }
.badge-verde   { background: var(--verde-claro);   color: var(--verde-escuro);   border-color: var(--verde); }
.badge-amarelo { background: var(--amarelo-claro); color: var(--amarelo-escuro); border-color: var(--amarelo); }
.badge-coral   { background: var(--coral-claro);   color: var(--coral-escuro);   border-color: var(--coral); }
.badge-lilas   { background: var(--lilas-claro);   color: var(--lilas-escuro);   border-color: var(--lilas); }
.badge-neutral { background: var(--light);         color: var(--mid);            border-color: var(--border-mid); }

.badge-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }

/* Cards */
.ds-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 1.5rem;
  transition: box-shadow 0.15s, transform 0.15s;
}
.ds-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.ds-card-label { font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem; display: block; }
.ds-card h4 { font-family: var(--font-display); font-size: 1.2rem; color: var(--dark); margin-bottom: 0.4rem; }
.ds-card p { font-size: 0.85rem; color: var(--mid); line-height: 1.6; max-width: none; margin-bottom: 1rem; }
.ds-card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; margin-top: 1rem; }

/* Citação */
.ds-quote {
  border-left: 3px solid var(--azul);
  padding: 1rem 1.5rem; margin: 1.5rem 0;
  background: var(--azul-claro);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.ds-quote p { font-family: var(--font-display); font-size: 1.3rem; color: var(--azul-escuro); line-height: 1.4; max-width: none; margin: 0; }
.ds-quote cite { font-size: 0.72rem; color: var(--muted); display: block; margin-top: 0.4rem; font-style: normal; letter-spacing: 0.08em; }

/* Alerta */
.ds-alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 0.9rem 1.1rem; border-radius: var(--radius-md);
  border: 1px solid; margin-bottom: 0.5rem; font-size: 0.85rem;
}
.ds-alert-info    { background: var(--azul-claro);    border-color: var(--azul2);   color: var(--azul-escuro); }
.ds-alert-success { background: var(--verde-claro);   border-color: var(--verde);   color: var(--verde-escuro); }
.ds-alert-warn    { background: var(--amarelo-claro); border-color: var(--amarelo); color: var(--amarelo-escuro); }

/* Formulário */
.ds-field { margin-bottom: 1rem; }
.ds-label { font-size: 0.78rem; color: var(--mid); margin-bottom: 0.35rem; display: block; }
.ds-input, .ds-select {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md); background: var(--white);
  font-family: var(--font-body); font-size: 0.88rem; color: var(--dark);
  transition: border-color 0.12s, box-shadow 0.12s;
  appearance: none;
}
.ds-input:focus, .ds-select:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(127,179,204,0.2); }
.ds-hint { font-size: 0.72rem; color: var(--muted); margin-top: 0.25rem; display: block; }
.ds-form-demo { max-width: 360px; margin-top: 1rem; }

/* Nota */
.ds-nota {
  background: var(--amarelo-claro); border: 1px solid var(--amarelo);
  border-radius: var(--radius-md); padding: 0.9rem 1.1rem; margin-top: 1rem;
}
.ds-nota p { font-size: 0.82rem; color: var(--amarelo-escuro); margin: 0; max-width: none; line-height: 1.6; }

/* Rules */
.rules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-top: 1.2rem; }
.rule-card { border-radius: var(--radius-card); padding: 1.2rem; border: 1px solid; }
.rule-card.do   { background: var(--verde-claro);  border-color: var(--verde); }
.rule-card.dont { background: var(--coral-claro);  border-color: var(--coral); }
.rule-tag { font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600; margin-bottom: 0.6rem; display: block; }
.rule-card.do .rule-tag   { color: var(--verde-escuro); }
.rule-card.dont .rule-tag { color: var(--coral-escuro); }
.rule-card p { font-size: 0.85rem; line-height: 1.6; color: var(--dark); max-width: none; margin: 0; }

/* Iconografia */
.icon-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.icon-item {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 0.8rem; border: 1px solid var(--border);
  border-radius: var(--radius-md); background: var(--white);
  cursor: pointer; transition: background 0.12s; min-width: 64px;
}
.icon-item:hover { background: var(--azul-claro); }
.icon-item svg { width: 20px; height: 20px; stroke: var(--mid); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-item span { font-size: 0.6rem; color: var(--muted); text-align: center; }

/* Voz e tom */
.voztom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1.2rem; }
.voztom-col h4 { font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 0.8rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.voztom-col.do h4   { color: var(--verde-escuro); }
.voztom-col.dont h4 { color: var(--coral-escuro); }
.voztom-item { font-size: 0.85rem; color: var(--mid); padding: 0.5rem 0; border-bottom: 1px solid var(--border); line-height: 1.5; }
.voztom-item:last-child { border-bottom: none; }
.voztom-item em { font-style: italic; color: var(--dark); }

/* Changelog */
.changelog-item { padding: 1.5rem 0; border-bottom: 1px solid var(--border); display: flex; gap: 2rem; }
.changelog-item:last-child { border-bottom: none; }
.changelog-meta { min-width: 80px; flex-shrink: 0; }
.changelog-version { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; color: var(--dark); display: block; }
.changelog-date { font-size: 0.7rem; color: var(--muted); }
.changelog-entries { flex: 1; }
.changelog-entry { font-size: 0.83rem; color: var(--mid); padding: 0.2rem 0; display: flex; gap: 8px; align-items: flex-start; line-height: 1.5; }
.changelog-tag {
  font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 2px 6px; border-radius: var(--radius-sm);
  flex-shrink: 0; margin-top: 2px;
}
.tag-new     { background: var(--verde-claro);   color: var(--verde-escuro); }
.tag-changed { background: var(--azul-claro);    color: var(--azul-escuro); }
.tag-fix     { background: var(--amarelo-claro); color: var(--amarelo-escuro); }

/* Dev layer */
.dev-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--dark); color: var(--white);
  font-size: 0.65rem; padding: 3px 9px;
  border-radius: var(--radius-pill); margin-bottom: 1rem;
  letter-spacing: 0.06em;
}

code.inline {
  font-family: var(--font-mono); font-size: 0.78rem;
  background: var(--light); color: var(--azul-escuro);
  padding: 2px 6px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-mid);
}

pre.code-block {
  background: #1e1c19; color: #d4d0c8;
  border-radius: var(--radius-md); padding: 1.2rem 1.5rem;
  font-family: var(--font-mono); font-size: 0.78rem;
  line-height: 1.7; overflow-x: auto; margin-top: 0.8rem;
}
pre.code-block .tok-key  { color: #7fb3cc; }
pre.code-block .tok-val  { color: #c8e2f0; }
pre.code-block .tok-com  { color: #666; }
pre.code-block .tok-str  { color: #88bb88; }

/* Toast */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: var(--z-toast); display: flex; flex-direction: column; gap: 0.4rem; pointer-events: none; }
.toast {
  background: var(--dark); color: var(--white);
  padding: 10px 16px; border-radius: var(--radius-btn);
  font-size: 0.8rem; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }



/* ============================================
   CARROSSEL
   ============================================ */

.carousel-wrap { margin-top: 1.5rem; }

.carousel {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--light);
}

.carousel-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(.22,1,.36,1);
  will-change: transform;
}

.carousel-slide {
  flex-shrink: 0;
  width: 100%;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  display: block;
  background: #f0ece6;
}

.carousel-slide img.is-placeholder {
  object-fit: contain;
  background: #f0ece6;
}

.carousel-footer {
  padding: 0.75rem 1.2rem;
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 52px;
}

.carousel-legend {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
  flex: 1;
}

.carousel-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.carousel-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-mid);
  background: var(--white);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  color: var(--mid);
  padding: 0;
}

.carousel-btn:hover {
  background: var(--azul-claro);
  border-color: var(--azul);
  color: var(--azul-escuro);
}

.carousel-btn svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none;
  stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  pointer-events: none;
}

.carousel-dots {
  display: flex;
  gap: 5px;
  align-items: center;
}

.carousel-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border-mid);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  border: none;
  padding: 0;
  flex-shrink: 0;
}

.carousel-dot.active {
  background: var(--azul);
  transform: scale(1.35);
}

.carousel-counter {
  font-size: 0.7rem;
  color: var(--subtle);
  min-width: 32px;
  text-align: center;
}

.carousel-loading {
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.carousel-nota {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.6rem;
  font-style: italic;
  line-height: 1.5;
}

/* ============================================
   GALERIA DE DOODLES
   ============================================ */

.doodles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.doodle-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  position: relative;
}

.doodle-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--azul);
}

.doodle-item img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  display: block;
  padding: 0.8rem;
  background: var(--light);
}

.doodle-item-footer {
  padding: 0.4rem 0.6rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.doodle-name {
  font-size: 0.62rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.doodle-ext {
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--light);
  color: var(--muted);
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.doodle-dl-group {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.doodle-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-mid);
  background: var(--white);
  font-size: 0.62rem;
  font-family: var(--font-body);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.12s;
  letter-spacing: 0.04em;
}

.doodle-dl-btn:hover {
  background: var(--azul-claro);
  border-color: var(--azul);
  color: var(--azul-escuro);
}

.doodle-dl-svg:hover {
  background: var(--verde-claro);
  border-color: var(--verde);
  color: var(--verde-escuro);
}

.doodle-dl-png:hover {
  background: var(--lilas-claro);
  border-color: var(--lilas);
  color: var(--lilas-escuro);
}

.doodle-dl-btn svg {
  width: 11px; height: 11px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.doodles-loading {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 1rem 0;
}

/* Lightbox */
.doodle-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(45,42,37,0.85);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.doodle-lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.doodle-lightbox img {
  max-width: 80vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-card);
  background: var(--white);
  padding: 1.5rem;
  box-shadow: var(--shadow-xl);
}

.doodle-lightbox-close {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: none; cursor: pointer;
  color: white;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s;
}

.doodle-lightbox-close:hover { background: rgba(255,255,255,0.25); }
.doodle-lightbox-close svg {
  width: 18px; height: 18px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ============================================
   MOBILE — HEADER GLOBAL E DRAWER DA NAV
   Aplicado a index.html. O /criar tem suas próprias regras
   inline e esconde a ds-nav completamente.
   ============================================ */

/* Header mobile global — escondido em desktop */
.ds-mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 14px;
  align-items: center;
  justify-content: space-between;
  z-index: var(--z-sticky, 100);
}

.ds-mobile-header img { height: 22px; width: auto; }

.ds-mobile-hamburger {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent;
  cursor: pointer; padding: 0;
  border-radius: var(--radius-sm);
}
.ds-mobile-hamburger:hover { background: var(--light); }
.ds-mobile-hamburger svg {
  width: 22px; height: 22px;
  stroke: var(--dark); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.ds-mobile-cta {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  background: var(--azul);
  color: white;
  border-radius: 999px;
  font-size: 0.74rem;
  text-decoration: none;
  font-family: var(--font-body);
}
.ds-mobile-cta svg {
  width: 13px; height: 13px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* Backdrop da nav mobile */
.ds-nav-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.25s;
}
.ds-nav-backdrop.visible {
  display: block;
  opacity: 1;
}

/* Media query mobile */
@media (max-width: 900px) {
  .ds-mobile-header { display: flex; }

  /* Nav vira drawer */
  .ds-nav {
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 95;
    box-shadow: 4px 0 24px rgba(0,0,0,0.08);
    width: 280px;
  }
  .ds-nav.open {
    transform: translateX(0);
  }

  /* Main ganha padding pro header */
  .ds-main {
    margin-left: 0 !important;
    padding: 4.5rem 1.25rem 4rem;
    max-width: 100%;
  }

  /* Ajustes de tipografia e seções pra mobile */
  .ds-hero { flex-direction: column; gap: 1.5rem; }
  .ds-hero-left, .ds-hero-right { width: 100%; }

  /* Tabelas e grids vazam menos */
  table { font-size: 0.78rem; }
}

