/* ==========================================================================
   iTecBR — Design system (vanilla CSS, sem framework)
   Sumário: 1. Tokens  2. Reset  3. Tipografia  4. Layout  5. Header/Nav
   6. Wordmark  7. Hero  8. Cards de serviço  9. Grade de produtos
   10. Blocos institucionais  11. Formulários  12. Footer  13. Utilitários
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --color-primary: #2a63c9;
  --color-primary-dark: #17356e;
  --color-primary-light: #eaf2ff;
  --color-accent: #e8823c;
  --color-accent-dark: #c26526;

  --color-ink: #1a1d23;
  --color-muted: #5b6472;
  --color-surface: #ffffff;
  --color-surface-alt: #f5f8fc;
  --color-border: #e1e7ef;

  --color-success: #1f8a54;
  --color-error: #c23b3b;

  --color-page-bg: #BDB76B;
  --color-form-bg: #6CA6CD;
  --color-input-focus-bg: #FFD39B;
  --color-card-bg: #FFF6E3;
  --color-card-border: #DCCF8F;
  --color-nav-bg: rgba(23, 53, 110, 0.94);
  --color-tint-bg: #CBE0EF;

  --font-heading: 'Sora', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Manrope', 'Segoe UI', system-ui, sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(23, 53, 110, 0.06), 0 2px 8px rgba(23, 53, 110, 0.06);
  --shadow-md: 0 4px 12px rgba(23, 53, 110, 0.08), 0 12px 32px rgba(23, 53, 110, 0.10);

  --container-max: 1200px;
}

/* 2. Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-page-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }

/* 3. Tipografia --------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
  margin: 0 0 var(--space-3);
  color: var(--color-primary-dark);
}
h1 { font-size: clamp(32px, 4.5vw, 48px); }
h2 { font-size: clamp(24px, 3vw, 32px); }
h3 { font-size: 19px; }
p { margin: 0 0 var(--space-3); color: var(--color-muted); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

/* 4. Layout ------------------------------------------------------------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-5);
}
.section { padding: var(--space-8) 0; }
.section-alt { background: var(--color-tint-bg); }
.section-head { max-width: 66ch; margin-bottom: var(--space-6); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.grid {
  display: grid;
  gap: var(--space-5);
}
@media (min-width: 640px) {
  .container { padding: 0 var(--space-6); }
}

/* 5. Header / Nav --------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-nav-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-sm);
  background: transparent;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 0 8px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  display: none;
  width: 100%;
}
.site-nav.is-open { display: block; }
.site-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding-top: var(--space-3);
}
.site-nav a {
  display: block;
  padding: var(--space-2) var(--space-1);
  font-weight: 600;
  color: #fff;
  border-radius: var(--radius-sm);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--color-accent); }
.site-nav .submenu-label {
  padding: var(--space-2) var(--space-1);
  font-weight: 600;
  color: #fff;
}
.site-nav .submenu {
  padding-left: var(--space-4);
  border-left: 2px solid rgba(255, 255, 255, 0.25);
  margin-left: var(--space-2);
  display: flex;
  flex-direction: column;
}
.site-nav .submenu a { font-weight: 500; font-size: 14.5px; }

@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .site-nav { display: block; width: auto; }
  .site-nav > ul { flex-direction: row; align-items: center; gap: var(--space-2); padding-top: 0; }
  .site-nav > ul > li { position: relative; }
  .site-nav > ul > li > a,
  .site-nav > ul > li > .submenu-label { padding: var(--space-2) var(--space-3); }
  .site-nav .has-submenu .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: var(--color-card-bg);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: var(--space-2);
    margin: 0;
    border-left: none;
  }
  .site-nav .has-submenu:hover .submenu,
  .site-nav .has-submenu:focus-within .submenu { display: block; }
  .site-nav .submenu a { padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); color: var(--color-primary-dark); transition: background 0.15s ease, color 0.15s ease; }
  .site-nav .submenu a:hover { background: var(--color-form-bg); color: var(--color-primary-dark); }
}

/* 6. Wordmark ------------------------------------------------------------- */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  color: var(--color-primary-dark);
}
.wordmark-badge {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  flex-shrink: 0;
}
.wordmark-badge span {
  display: block;
  width: 5px;
  border-radius: 2px;
  background: #fff;
}
.wordmark-badge span:nth-child(1) { height: 40%; }
.wordmark-badge span:nth-child(2) { height: 70%; }
.wordmark-badge span:nth-child(3) { height: 100%; background: var(--color-accent); }
.wordmark-text b { color: var(--color-accent-dark); }
.site-header .wordmark,
.site-footer .wordmark,
.site-header .wordmark-text,
.site-footer .wordmark-text { color: #fff; }
.site-header .wordmark-text b,
.site-footer .wordmark-text b { color: var(--color-accent); }

/* 7. Hero ------------------------------------------------------------------ */
.hero {
  padding: var(--space-8) 0;
  background: linear-gradient(180deg, var(--color-tint-bg) 0%, var(--color-page-bg) 100%);
}
.hero .container {
  display: grid;
  gap: var(--space-7);
  align-items: center;
}
.hero-copy p { font-size: 17.5px; max-width: 52ch; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.hero-figure {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.hero-figure::before,
.hero-figure::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
.hero-figure::before { width: 55%; aspect-ratio: 1; top: -15%; right: -10%; }
.hero-figure::after { width: 35%; aspect-ratio: 1; bottom: -10%; left: -8%; background: rgba(232, 130, 60, 0.25); }
.hero-figure-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding: var(--space-5);
}
.hero-figure-grid span {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  color: #fff;
}
.hero-figure-grid svg { width: 40%; height: 40%; }

@media (min-width: 900px) {
  .hero .container { grid-template-columns: 1.1fr 0.9fr; }
}

/* 7b. Cabeçalho de página institucional ------------------------------------ */
.page-header {
  padding: var(--space-8) 0 var(--space-6);
  background: linear-gradient(180deg, var(--color-tint-bg) 0%, var(--color-page-bg) 100%);
  text-align: center;
}
.page-header .container { max-width: 66ch; }
.prose { max-width: 66ch; margin: 0 auto; }
.prose p { font-size: 17.5px; margin-bottom: var(--space-4); }
.prose p:last-child { margin-bottom: 0; }
.blog-post-cover {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
}

/* 7d. Busca (motor de busca legado do WebSite X5, output cru) -------------- */
.imPageSearchField { margin-bottom: var(--space-6); }
.imPageSearchField input[type="text"] {
  font: inherit;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 360px;
}
.imPageSearchField input[type="submit"] {
  font: inherit;
  font-weight: 600;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
}
#imSearchResults { display: flex; flex-wrap: wrap; gap: var(--space-6); }
#imSearchSideBar ul { list-style: none; margin: 0; padding: 0; }
#imSearchSideBar li { margin-bottom: var(--space-2); }
#imSearchContent { flex: 1; min-width: 0; }
#imSearchContent a { color: var(--color-primary); }

/* 7c. Loja: toolbar de busca + cotação -------------------------------------- */
.loja-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}
.fx-widget {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  font-size: 14px;
}
.fx-widget .fx-label { color: var(--color-muted); }
.fx-widget .fx-value { font-weight: 700; color: var(--color-primary-dark); }
.loja-sem-resultado { color: var(--color-muted); margin-top: var(--space-4); }

/* 8. Cards de serviço ----------------------------------------------------- */
.service-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.service-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.service-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--color-primary-light);
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}
.service-card-icon svg { width: 24px; height: 24px; }
.service-card h3 { margin-bottom: var(--space-1); }
.service-card p { font-size: 14.5px; margin: 0; }

/* 9. Grade de produtos ---------------------------------------------------- */
.product-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.product-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--color-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card-media img { max-width: 78%; max-height: 78%; object-fit: contain; }
.product-badge {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 100px;
  background: var(--color-accent);
  color: #fff;
}
.product-badge.is-discount { left: auto; right: var(--space-2); background: var(--color-primary-dark); }
.product-card-body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-1); flex: 1; }
.product-card-name { font-family: var(--font-heading); font-weight: 700; font-size: 14.5px; color: var(--color-ink); }
.product-card-avail { font-size: 12.5px; color: var(--color-muted); display: flex; align-items: center; gap: 6px; }
.product-card-avail::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--color-success); flex-shrink: 0; }
.product-card-avail.is-unavailable::before { background: var(--color-error); }
.product-card-price { margin-top: auto; padding-top: var(--space-2); font-family: var(--font-heading); font-weight: 700; font-size: 17px; color: var(--color-primary-dark); }
.product-card-price .was { font-family: var(--font-body); font-weight: 500; font-size: 13px; color: var(--color-muted); text-decoration: line-through; margin-left: var(--space-2); }

/* 10. Blocos institucionais ------------------------------------------------- */
.callout-grid { grid-template-columns: 1fr; }
.callout-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.callout-card .btn { align-self: flex-start; }
@media (min-width: 720px) { .callout-grid { grid-template-columns: repeat(2, 1fr); } }

.rate-card {
  background: linear-gradient(160deg, var(--color-primary-dark), var(--color-primary));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  max-width: 420px;
}
.rate-card h2 { color: #fff; margin-bottom: var(--space-1); }
.rate-card .rate-value { font-family: var(--font-heading); font-size: 34px; font-weight: 700; }
.rate-card .rate-note { color: rgba(255, 255, 255, 0.75); font-size: 13px; margin-bottom: var(--space-4); }
.rate-card label { display: block; font-size: 13.5px; margin-bottom: var(--space-1); color: rgba(255, 255, 255, 0.85); }
.rate-card input[type="number"] {
  width: 100%;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  margin-bottom: var(--space-3);
}
.rate-card input[type="number"]::placeholder { color: rgba(255, 255, 255, 0.55); }
.rate-result { font-family: var(--font-heading); font-size: 20px; font-weight: 700; margin-bottom: var(--space-4); }

.partners-strip { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; margin-top: var(--space-5); }
.partners-strip a {
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-muted);
}
.partners-strip a:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* 11. Formulários ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-ghost { background: transparent; border-color: var(--color-border); color: var(--color-primary-dark); }
.btn-ghost:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn-accent { background: var(--color-accent); color: #fff; }
.btn-accent:hover { background: var(--color-accent-dark); }

.field { margin-bottom: var(--space-4); }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: var(--space-1); }
.field .hint { font-size: 12.5px; color: var(--color-muted); margin-top: 4px; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-ink);
}
.field input:hover,
.field select:hover,
.field textarea:hover,
.field input:focus,
.field select:focus,
.field textarea:focus { background: var(--color-input-focus-bg); }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.field textarea { min-height: 130px; resize: vertical; }
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea { border-color: var(--color-error); }
.field-error { font-size: 12.5px; color: var(--color-error); margin-top: 4px; }
.form-alert { padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); margin-bottom: var(--space-5); font-size: 14.5px; }
.form-alert.is-success { background: #e7f6ee; color: var(--color-success); }
.form-alert.is-error { background: #fbeaea; color: var(--color-error); }
.hp-field { position: absolute; left: -9999px; top: -9999px; }

/* 11b. Tabelas de dados (listagens administrativas) -------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--color-card-border); border-radius: var(--radius-md); }
.data-table { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--color-card-bg); }
.data-table th,
.data-table td { padding: var(--space-3) var(--space-4); text-align: left; border-bottom: 1px solid var(--color-border); white-space: nowrap; }
.data-table th { background: var(--color-surface-alt); font-weight: 700; color: var(--color-ink); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--color-surface-alt); }
.data-table a { color: var(--color-primary); font-weight: 600; }
.data-table a:hover { color: var(--color-primary-dark); }
.period-toggle { display: flex; gap: var(--space-3); margin-bottom: var(--space-5); }
.highlight-card {
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  font-size: 16px;
  color: var(--color-primary-dark);
  font-weight: 600;
}

/* 11c. Casca admin (telas internas devsite/) --------------------------------- */
.admin-body { background: var(--color-page-bg); }
.admin-shell { min-height: 100vh; display: flex; flex-direction: column; }
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  background: var(--color-nav-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.admin-topbar-brand { font-family: var(--font-heading); font-weight: 700; color: #fff; text-decoration: none; }
.admin-topbar-brand span { color: rgba(255, 255, 255, 0.65); font-weight: 500; font-size: 13px; margin-left: var(--space-1); }
.admin-topbar-back { font-size: 14px; font-weight: 600; color: #fff; text-decoration: none; }
.admin-topbar-back:hover { color: var(--color-accent); }
.admin-main { flex: 1; padding: var(--space-7) var(--space-5); max-width: 960px; margin: 0 auto; width: 100%; }
.admin-page-title { margin-bottom: var(--space-6); }
.admin-card {
  background: var(--color-form-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  max-width: 440px;
  margin: 0 auto;
}
.admin-card .btn { width: 100%; margin-top: var(--space-2); }

.form-card {
  background: var(--color-form-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.admin-toolbar { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end; margin-bottom: var(--space-6); }
.admin-toolbar .field { margin-bottom: 0; min-width: 150px; }
.admin-pagination { display: flex; gap: var(--space-2); margin-top: var(--space-5); flex-wrap: wrap; }
.admin-pagination a {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--color-ink);
  text-decoration: none;
}
.admin-pagination a.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* 11d. Widget de chat (webchat/) ---------------------------------------------- */
.chat-widget {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  width: 350px;
  height: 500px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
}
.chat-widget-header {
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-3) var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-widget-toggle { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; line-height: 1; }
.chat-widget-waiting { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-border); max-height: 140px; overflow-y: auto; font-size: 13.5px; }
.chat-widget-waiting ul { list-style: none; margin: var(--space-2) 0 0; padding: 0; }
.chat-widget-selector { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-border); font-size: 13.5px; }
.chat-widget-selector select { width: 100%; margin-top: var(--space-1); padding: var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.chat-widget-messages { flex: 1; padding: var(--space-3); overflow-y: auto; background: var(--color-surface-alt); display: flex; flex-direction: column; gap: var(--space-3); }
.chat-widget-form { display: flex; border-top: 1px solid var(--color-border); }
.chat-widget-form input { flex: 1; padding: var(--space-3); border: none; }
.chat-widget-form input:focus { outline: none; }
.chat-widget-form button { padding: var(--space-3) var(--space-4); background: var(--color-primary); border: none; color: #fff; cursor: pointer; }
.chat-widget-form button:hover { background: var(--color-primary-dark); }

.msg { max-width: 80%; padding: var(--space-3); border-radius: var(--radius-md); display: flex; gap: var(--space-2); }
.msg.user { background: var(--color-primary-light); align-self: flex-end; flex-direction: row-reverse; }
.msg.admin { background: var(--color-surface); align-self: flex-start; border: 1px solid var(--color-border); }
.msg .avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; }
.msg .text { display: flex; flex-direction: column; }
.msg .name { font-size: 12px; font-weight: 700; }
.msg .content { font-size: 14px; }
.msg .time { font-size: 10px; color: var(--color-muted); text-align: right; }

.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.status-dot.online { background: var(--color-success); }
.status-dot.offline { background: var(--color-border); }

/* 11e. Painéis com gráficos (Chart.js) ---------------------------------------- */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--space-6); margin-top: var(--space-6); }
.charts canvas { background: var(--color-surface); padding: var(--space-5); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); width: 100%; height: 300px; border: 1px solid var(--color-border); }

/* 11f. Dashboard de estatísticas (visitas/downloads) -------------------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-4); margin-bottom: var(--space-6); }
.stat-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  box-shadow: var(--shadow-sm);
}
.stat-card h3 { margin: 0 0 var(--space-1); font-size: 13px; font-weight: 600; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.02em; }
.stat-card p { margin: 0; font-size: 28px; font-weight: 700; font-family: var(--font-heading); color: var(--color-primary-dark); }
.stat-card small { display: block; margin-top: var(--space-1); color: var(--color-muted); font-size: 12px; }
.stat-card.is-success { border-left-color: var(--color-success); }
.stat-card.is-error { border-left-color: var(--color-error); }
.stat-card.is-accent { border-left-color: var(--color-accent); }

.chart-card, .table-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
}
.chart-card h3, .table-card h3 { margin: 0 0 var(--space-1); font-size: 16px; }
.chart-card .desc, .table-card .desc { margin: 0 0 var(--space-4); color: var(--color-muted); font-size: 13.5px; }
.chart-wrap { position: relative; width: 100%; height: 300px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: var(--space-5); margin-bottom: var(--space-5); }
#lista-espera div { background: var(--color-surface); margin-bottom: var(--space-3); padding: var(--space-4); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); border: 1px solid var(--color-border); }
#lista-espera button { margin-right: var(--space-2); margin-top: var(--space-2); padding: var(--space-2) var(--space-3); border: 1px solid var(--color-primary); border-radius: var(--radius-sm); background: var(--color-primary); color: #fff; cursor: pointer; font-size: 13px; }
#lista-espera button:hover { background: var(--color-primary-dark); }

/* 11f. Console de atendimento (webchat/admin/chat) --------------------------- */
.support-console { display: flex; height: calc(100vh - 65px); }
.support-sidebar { width: 280px; background: var(--color-primary-dark); color: #fff; padding: var(--space-5); overflow-y: auto; flex-shrink: 0; }
.support-sidebar h2 { margin-top: 0; font-size: 16px; color: #fff; }
.support-sidebar ul { list-style: none; margin: 0; padding: 0; }
.support-sidebar li { margin: var(--space-2) 0; cursor: pointer; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); font-size: 14px; }
.support-sidebar li:hover { background: rgba(255,255,255,0.08); }
.support-sidebar li.active { font-weight: 700; background: var(--color-accent); }
.support-chat { flex-grow: 1; display: flex; flex-direction: column; background: var(--color-surface-alt); }
.support-chat-header {
  padding: var(--space-3) var(--space-4);
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  text-align: center;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.support-chat-header button { background: var(--color-error); color: #fff; border: none; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); cursor: pointer; }
.support-messages { flex: 1; padding: var(--space-5); overflow-y: auto; }
.support-form { display: flex; padding: var(--space-3); background: var(--color-surface); border-top: 1px solid var(--color-border); }
.support-form input { flex: 1; padding: var(--space-3); font-size: 15px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.support-form button { padding: var(--space-3) var(--space-5); margin-left: var(--space-3); background: var(--color-primary); color: #fff; border: none; border-radius: var(--radius-sm); cursor: pointer; }
.support-form button:hover { background: var(--color-primary-dark); }

/* 11g. Blog ------------------------------------------------------------------- */
.blog-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.blog-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.blog-card-body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); }
.blog-card-category { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-primary); }
.blog-card-body h3 { margin: 0; font-size: 18px; }
.blog-card-body p { margin: 0; color: var(--color-muted); font-size: 14.5px; }
.blog-card-meta { font-size: 12.5px; color: var(--color-muted); margin-top: auto; }
.blog-comments { margin-top: var(--space-7); border-top: 1px solid var(--color-border); padding-top: var(--space-6); }
.comment-card { background: var(--color-surface-alt); border-radius: var(--radius-md); padding: var(--space-4); margin-bottom: var(--space-3); }
.comment-card .comment-date { font-size: 12.5px; color: var(--color-muted); margin-left: var(--space-2); }
.comment-card p { margin: var(--space-2) 0 0; }

/* 11h. Downloads --------------------------------------------------------------- */
.download-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.download-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.download-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.download-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.download-card-body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.download-card-body h3 { margin: 0; font-size: 16px; }
.download-card-body p { margin: 0; color: var(--color-muted); font-size: 14px; flex: 1; }

/* 12. Footer ----------------------------------------------------------------- */
.site-footer { background: var(--color-primary-dark); color: rgba(255, 255, 255, 0.82); padding: var(--space-8) 0 var(--space-5); }
.footer-grid { grid-template-columns: 1fr; gap: var(--space-7); }
.footer-social { display: flex; gap: var(--space-3); margin-top: var(--space-4); }
.footer-social a {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
.footer-social a:hover { background: var(--color-accent); }
.footer-social svg { width: 16px; height: 16px; fill: #fff; }
.footer-newsletter .field input { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.2); color: #fff; }
.footer-newsletter .field input::placeholder { color: rgba(255, 255, 255, 0.55); }
.footer-newsletter .field input:hover,
.footer-newsletter .field input:focus { background: rgba(255, 255, 255, 0.16); }
.footer-bottom {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: space-between;
  font-size: 13px;
}
.footer-bottom a:hover { color: #fff; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.3fr 1fr; } }

/* 13. Utilitários ------------------------------------------------------------ */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-3); top: -60px;
  background: var(--color-primary-dark); color: #fff;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm);
  z-index: 200; transition: top 0.15s ease;
}
.skip-link:focus { top: var(--space-3); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .product-card { transition: none; }
}
