/* ============================================================
   Soft & Co. · Painel Administrativo Clean (Fundo Branco)
   100% Montserrat · Mobile-First, Mac (13"/14"/16") & Second Screen
   Sem cards desnecessários: apenas o Kanban e os cards do Kanban.
   ============================================================ */

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

:root {
  --font-sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Fundo Branco & Alto Contraste na Identidade Soft */
  --adm-bg: #FFFFFF;
  --adm-bg-soft: #F8F6F2;
  --adm-panel: transparent;
  --adm-panel-solid: #FFFFFF;
  --adm-input-bg: #FFFFFF;
  --adm-border: #E6E0D6;
  --adm-border-strong: #C8BCA8;
  --adm-border-glow: #3B2A20;
  --adm-shadow: 0 4px 16px rgba(23, 17, 14, 0.06);
  --adm-text: #17110E;
  --adm-text-secondary: #3B2A20;
  --adm-text-muted: #6E5D52;
  --adm-text-dim: #8C7A6B;
  --adm-accent: #3B2A20;
  --adm-chocolate: #3B2A20;
  --adm-sand: #D8C8B0;
  --adm-creme: #F7F3EB;
  --adm-radius-sm: 8px;
  --adm-radius-md: 12px;
  --adm-radius-lg: 16px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
  background-color: #FFFFFF;
  color: #17110E;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; transition: color 0.15s ease, opacity 0.15s ease; }
button, input, select, textarea { font-family: var(--font-sans); color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; font-family: var(--font-sans); }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid #3B2A20; outline-offset: 2px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; transform: translateY(-300%); }
.skip-link:focus { transform: none; }

/* ---------- Tipografia 100% Montserrat ---------- */
.a-title {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: #17110E;
}
.a-heading {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: #17110E;
}
.a-kpi {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(26px, 2.5vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: #17110E;
}
.eyebrow {
  font-family: var(--font-sans);
  font-size: 10.5px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6E5D52;
}
.small {
  font-size: 12.5px;
  line-height: 1.5;
  color: #5C4B40;
}
.num { font-variant-numeric: tabular-nums; }

/* ---------- Layout Mobile-First -> Mac -> Second Screen ---------- */
.a-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100svh;
  width: 100%;
  max-width: 100vw;
}

.a-side {
  display: none;
}

.a-mobile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #FFFFFF;
  border-bottom: 1px solid #E6E0D6;
  color: #17110E;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 30;
}
.a-mobile-head img {
  height: 26px;
  width: auto;
  filter: invert(1) brightness(0.15);
}

.a-main {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 16px 16px 96px;
  display: grid;
  gap: 20px;
  align-content: start;
}

.a-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: #FFFFFF;
  border-top: 1px solid #E6E0D6;
  color: #5C4B40;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.a-bottom a,
.a-bottom .a-bottom-btn {
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 54px;
  padding: 6px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
}
.a-bottom a[aria-current="page"] {
  color: #17110E;
  font-weight: 800;
  border-top: 2px solid #17110E;
}

/* Desktop / Mac (1024px+) & Second Screen */
@media (min-width: 1024px) {
  .a-shell {
    grid-template-columns: 204px minmax(0, 1fr);
  }
  .a-mobile-head,
  .a-bottom {
    display: none !important;
  }
  .a-side {
    position: sticky;
    top: 0;
    height: 100svh;
    overflow-y: auto;
    background: #FAF8F5;
    border-right: 1px solid #E6E0D6;
    color: #17110E;
    padding: 24px 14px;
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  .a-side .brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px 16px;
    border-bottom: 1px solid #E6E0D6;
  }
  .a-side .brand img {
    height: 28px;
    width: auto;
    filter: invert(1) brightness(0.15);
  }
  .a-main {
    padding: 24px 28px 64px;
    gap: 22px;
  }
}

/* Second Screen / Ultrawide (1600px+) */
@media (min-width: 1600px) {
  .a-shell {
    grid-template-columns: 224px minmax(0, 1fr);
  }
  .a-main {
    padding: 32px 40px 72px;
  }
}

.a-nav { display: grid; gap: 4px; }
.a-nav a,
.a-nav button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  width: 100%;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5C4B40;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}
.a-nav a:hover,
.a-nav button:hover {
  background: #EFECE6;
  color: #17110E;
}
.a-nav a[aria-current="page"],
.a-nav button[aria-current="page"] {
  background: #17110E;
  color: #FFFFFF;
  font-weight: 700;
}
.a-nav .count {
  margin-left: auto;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  font-size: 11px;
  font-weight: 700;
}
.a-nav a[aria-current="page"] .count {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

.a-side-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #E6E0D6;
  display: grid;
  gap: 12px;
  font-size: 12px;
}
.a-user { display: flex; align-items: center; gap: 10px; font-weight: 700; color: #17110E; }
.a-user img {
  width: 32px;
  height: 32px;
  padding: 5px;
  border-radius: 8px;
  background: #EFECE6;
}

/* ---------- Topbar e Seções SEM CARDS (Aberto no Fundo Branco) ---------- */
.a-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 0 0 16px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #E6E0D6;
  border-radius: 0;
  box-shadow: none;
  width: 100%;
}
.a-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Seções abertas sem caixas/cards */
.a-card,
.a-tile,
.a-tile-dark,
.a-alert,
.a-notice {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid #E6E0D6 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 16px 0 !important;
  color: #17110E !important;
  min-width: 0;
}
.a-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
}

/* ---------- Botões & Tags ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid #17110E;
  background: #17110E;
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 11.5px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  transition: all 0.15s ease;
}
.btn:hover {
  background: #3B2A20;
  border-color: #3B2A20;
  color: #FFFFFF;
}
.btn-secondary {
  background: #F4F1EA;
  border-color: #D8C8B0;
  color: #17110E;
}
.btn-secondary:hover {
  background: #E6DEC8;
  color: #17110E;
}
.btn-outline {
  background: #FFFFFF;
  border-color: #C8BCA8;
  color: #17110E;
}
.btn-outline:hover {
  background: #F4F1EA;
  border-color: #17110E;
  color: #17110E;
}
.btn-small { min-height: 34px; padding: 0 12px; font-size: 11px; }
.btn-block { width: 100%; }
.btn[aria-disabled="true"], .btn:disabled { opacity: 0.45; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: #F4F1EA;
  color: #3B2A20;
  border: 1px solid #D8C8B0;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Grids Responsivos ---------- */
.a-grid { display: grid; gap: 16px; min-width: 0; }
.a-grid-2 { grid-template-columns: minmax(0, 1fr); }
.a-grid-3 { grid-template-columns: minmax(0, 1fr); }
.a-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) {
  .a-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .a-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .a-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.a-list { display: grid; }
.a-list > li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding-block: 12px;
  border-top: 1px solid #E6E0D6;
}
.a-list > li:first-child { border-top: 0; padding-top: 0; }
.a-rule-thin { height: 1px; border: 0; background: #E6E0D6; }
.a-alerts { display: grid; gap: 0; }

/* ---------- Formulários & Inputs no Fundo Branco ---------- */
.a-form { display: grid; gap: 16px; }
.fields { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) {
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.field { display: grid; gap: 6px; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field > label, .field-label {
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3B2A20;
}
.input, .select, .textarea {
  width: 100%;
  max-width: 100%;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  color: #17110E;
  background: #FFFFFF;
  border: 1px solid #C8BCA8;
  border-radius: 8px;
  padding: 8px 12px;
  min-height: 40px;
  transition: border-color 0.15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: #17110E;
}
.textarea { min-height: 96px; resize: vertical; }
.input::placeholder, .textarea::placeholder {
  color: #8C7A6B;
}
.select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 32px; }
.select-wrap { position: relative; }
.select-wrap::after {
  content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #3B2A20;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { position: relative; display: inline-flex; width: auto; height: auto; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #C8BCA8;
  background: #FFFFFF;
  color: #3B2A20;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}
.chip input:checked + span {
  background: #17110E;
  border-color: #17110E;
  color: #FFFFFF;
}

/* ---------- Toast ---------- */
.a-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 90;
  padding: 10px 20px;
  border-radius: 999px;
  background: #17110E;
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}
.a-toast[hidden] { display: none; }

.maquette-banner { display: none !important; }

/* ---------- Autenticação 3131 (Fundo Branco Clean) ---------- */
html.admin-locked .a-shell { display: none !important; }
.admin-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.admin-auth-card {
  width: 100%;
  max-width: 400px;
  background: #FFFFFF;
  border: 1px solid #E6E0D6;
  border-radius: 16px;
  padding: 32px;
  color: #17110E;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}
.admin-auth-brand { margin-bottom: 20px; display: flex; justify-content: center; }
.admin-auth-brand img { filter: invert(1) brightness(0.15); }
.admin-auth-header { text-align: center; }
.admin-auth-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #B91C1C !important;
  border-radius: 8px;
  padding: 8px 12px;
}
