/* ============================================================
   Target Contratos — main.css
   Design moderno, paleta corporativa Target Informações
   ============================================================ */
:root {
  --red:          #CC0000;
  --red-dark:     #aa0000;
  --red-light:    #fff5f5;
  --red-border:   #fccaca;
  --sidebar-bg:   #1a2035;
  --sidebar-w:    248px;
  --bg:           #f0f2f7;
  --white:        #ffffff;
  --border:       #e8eaf0;
  --border-light: #f0f2f7;
  --text:         #1a1d2e;
  --text-2:       #5a5f7d;
  --text-3:       #9fa5c0;
  --success:      #10b981;
  --warning:      #f59e0b;
  --info:         #3b82f6;
  --radius:       12px;
  --radius-sm:    8px;
  --radius-lg:    16px;
  --shadow:       0 1px 4px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.06);
  --shadow-md:    0 4px 16px rgba(0,0,0,.10);
  --transition:   .15s ease;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

/* ── SIDEBAR ──────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w); height: 100vh;
  background: var(--sidebar-bg);
  display: flex; flex-direction: column;
  z-index: 100; overflow-y: auto;
  box-shadow: 2px 0 12px rgba(0,0,0,.18);
}

.sidebar-logo-wrap {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.04);
}
.sidebar-logo-box {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: .5rem .75rem;
  display: flex; align-items: center; justify-content: center;
}
.sidebar-logo-box img { width: 100%; max-width: 148px; height: 44px; object-fit: contain; }
.sidebar-tagline {
  text-align: center; font-size: 10px;
  color: rgba(255,255,255,.28);
  letter-spacing: .06em; text-transform: uppercase;
  margin-top: .6rem;
}

.sidebar-section { padding: .6rem 0; }
.sidebar-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255,255,255,.2);
  padding: .2rem 1.25rem .4rem;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: .55rem 1.25rem;
  color: rgba(255,255,255,.55);
  text-decoration: none;
  transition: var(--transition);
  font-size: 13px; font-weight: 500;
  border-left: 3px solid transparent;
  position: relative;
}
.sidebar-link:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.9); }
.sidebar-link.active {
  background: rgba(204,0,0,.18);
  color: #fff;
  border-left-color: var(--red);
}
.sidebar-link .icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.sidebar-divider { border: none; border-top: 1px solid rgba(255,255,255,.06); margin: .25rem 0; }

.sidebar-user {
  margin-top: auto; padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.07);
}
.sidebar-user .u-name { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.8); }
.sidebar-user .u-role { font-size: 11px; color: rgba(255,255,255,.3); margin-top: 1px; }
.sidebar-user .u-logout {
  display: flex; align-items: center; gap: 5px;
  color: rgba(255,255,255,.3); font-size: 12px;
  text-decoration: none; margin-top: .6rem;
  transition: var(--transition);
}
.sidebar-user .u-logout:hover { color: var(--red); }

/* ── MAIN ─────────────────────────────────────────────────── */
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: 60px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 1.75rem; gap: 12px;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 0 var(--border);
}
.topbar-title { font-size: 15px; font-weight: 600; flex: 1; color: var(--text); }
.page-content { padding: 1.75rem; flex: 1; }

/* ── CARDS ────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.card-title { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 1rem; }

/* ── KPIs ─────────────────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 1.5rem; }
.kpi {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.kpi::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--red), #ff4444);
}
.kpi .kpi-label { font-size: 12px; color: var(--text-2); margin-bottom: .4rem; font-weight: 500; }
.kpi .kpi-value { font-size: 28px; font-weight: 700; color: var(--text); }
.kpi .kpi-icon { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); font-size: 30px; opacity: .08; }

/* ── TABLE ────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .65rem 1rem; text-align: left; font-size: 13px; }
th {
  font-weight: 600; color: var(--text-2); font-size: 11px;
  text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 2px solid var(--border); background: #fafbff;
}
tr:not(:last-child) td { border-bottom: 1px solid var(--border-light); }
tr:hover td { background: #fafbff; }
td a { color: var(--text); text-decoration: none; font-weight: 500; }
td a:hover { color: var(--red); }

/* ── BADGES ───────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 20px;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger   { background: var(--red-light); color: #991b1b; }
.badge-secondary{ background: #f1f3f9; color: #4b5563; }
.badge-info     { background: #dbeafe; color: #1e40af; }
.badge-warning  { background: #fef3c7; color: #92400e; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 0 16px; height: 38px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: none;
  transition: var(--transition);
  text-decoration: none; white-space: nowrap;
  letter-spacing: .01em;
}
.btn-primary   { background: var(--red); color: #fff; }
.btn-primary:hover  { background: var(--red-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(204,0,0,.3); }
.btn-outline   { background: var(--white); color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover  { border-color: var(--red); color: var(--red); }
.btn-ghost     { background: transparent; color: var(--text-2); }
.btn-ghost:hover    { background: var(--bg); }
.btn-danger    { background: var(--red-light); color: #991b1b; border: 1px solid var(--red-border); }
.btn-danger:hover   { background: var(--red); color: #fff; }
.btn-success   { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.btn-success:hover  { background: var(--success); color: #fff; }
.btn-sm  { height: 32px; padding: 0 12px; font-size: 12px; }
.btn-lg  { height: 48px; padding: 0 24px; font-size: 15px; border-radius: var(--radius); }
.btn-full{ width: 100%; justify-content: center; }
.btn:active { transform: scale(.98); }

/* ── FORMS ────────────────────────────────────────────────── */
.form-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.form-section-title {
  font-size: 11px; font-weight: 700; color: var(--red);
  text-transform: uppercase; letter-spacing: .07em;
  margin-bottom: .9rem;
  display: flex; align-items: center; gap: 6px;
}
.fields-grid { display: grid; gap: 12px; }
.c1 { grid-template-columns: 1fr; }
.c2 { grid-template-columns: 1fr 1fr; }
.c3 { grid-template-columns: 1fr 1fr 1fr; }
.cend { grid-template-columns: 2fr 1fr 1fr; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.field input, .field select, .field textarea {
  font-size: 13px; padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: #fafbff; color: var(--text);
  transition: var(--transition); font-family: inherit;
}
.field input, .field select { height: 38px; }
.field textarea { padding: 9px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--red);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(204,0,0,.1);
}
.field input::placeholder { color: var(--text-3); }
.field-preview { font-size: 11px; color: var(--text-3); margin-top: 2px; min-height: 16px; font-style: italic; }
.field-preview.ok { color: var(--success); }
.required-star { color: var(--red); }

/* Sócios */
.socios-list { display: flex; flex-direction: column; gap: 8px; }
.socio-entry {
  background: #fafbff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: .8rem 1rem;
  transition: var(--transition);
}
.socio-entry:hover { border-color: #c7d2fe; }
.socio-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.socio-num { font-size: 12px; font-weight: 700; color: var(--red); }
.btn-rem-socio {
  width: 26px; height: 26px; border-radius: 6px;
  background: var(--red-light); border: 1px solid var(--red-border);
  color: #991b1b; font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.btn-rem-socio:hover { background: var(--red); color: #fff; }
.socio-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-add-socio {
  display: flex; align-items: center; gap: 6px;
  margin-top: 8px; padding: 0 14px; height: 34px;
  background: var(--white); color: var(--red);
  border: 1.5px dashed var(--red); border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600; cursor: pointer;
  width: fit-content; transition: var(--transition);
}
.btn-add-socio:hover { background: var(--red-light); }

/* ── ALERTS ───────────────────────────────────────────────── */
.messages-wrap { margin-bottom: 1rem; }
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: .75rem 1rem;
  border-radius: var(--radius-sm); margin-bottom: .5rem;
  font-size: 13px;
}
.alert-success { background: #d1fae5; border: 1px solid #6ee7b7; color: #065f46; }
.alert-error   { background: var(--red-light); border: 1px solid var(--red-border); color: #991b1b; }
.alert-info    { background: #dbeafe; border: 1px solid #93c5fd; color: #1e40af; }

/* ── PAGE HEADER ──────────────────────────────────────────── */
.page-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem; flex-wrap: wrap; gap: .75rem;
}
.page-header h1 { font-size: 20px; font-weight: 700; color: var(--text); }
.breadcrumb-bar {
  display: flex; align-items: center;
  gap: 6px; font-size: 13px; color: var(--text-2);
  margin-bottom: 1.5rem; flex-wrap: wrap;
}
.breadcrumb-bar a { color: var(--text-2); text-decoration: none; transition: var(--transition); }
.breadcrumb-bar a:hover { color: var(--red); }
.breadcrumb-bar .sep { color: var(--text-3); }
.breadcrumb-bar .current { color: var(--text); font-weight: 600; }

/* ── FOLDER CARDS ─────────────────────────────────────────── */
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 1rem; }
.folder-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.3rem;
  cursor: pointer; transition: var(--transition);
  text-decoration: none; color: var(--text);
  display: block; box-shadow: var(--shadow);
}
.folder-card:hover {
  border-color: var(--red);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(204,0,0,.12);
}
.folder-card .fc-icon { font-size: 28px; margin-bottom: .65rem; }
.folder-card .fc-name {
  font-size: 14px; font-weight: 700; margin-bottom: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.folder-card .fc-sub  { font-size: 11px; color: var(--text-2); }
.folder-card .fc-count {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 20px;
  background: var(--red-light); color: #991b1b;
  border: 1px solid var(--red-border); margin-top: .45rem;
}
.template-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.15rem;
  transition: var(--transition); position: relative;
  box-shadow: var(--shadow);
}
.template-card:hover {
  border-color: var(--red);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(204,0,0,.1);
}
.template-card .tc-icon { font-size: 22px; margin-bottom: .5rem; }
.template-card .tc-name {
  font-size: 13px; font-weight: 700; margin-bottom: 2px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  line-height: 1.35;
}
.template-card .tc-file { font-size: 11px; color: var(--text-3); }
.template-card .tc-del {
  position: absolute; top: 9px; right: 9px;
  width: 24px; height: 24px; border-radius: 6px;
  background: var(--red-light); border: 1px solid var(--red-border);
  color: #991b1b; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: var(--transition);
}
.template-card:hover .tc-del { opacity: 1; }
.template-card .tc-del:hover { background: var(--red); color: #fff; }
.empty-folder {
  text-align: center; padding: 3rem 1rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border);
  grid-column: 1/-1; box-shadow: var(--shadow);
}
.empty-folder p { font-size: 13px; color: var(--text-2); }

/* ── MODAL ────────────────────────────────────────────────── */
.modal-bg {
  display: none; position: fixed; inset: 0;
  background: rgba(15,20,40,.55);
  backdrop-filter: blur(2px);
  z-index: 200; align-items: center; justify-content: center;
}
.modal-bg.open { display: flex; }
.modal {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 1.75rem; width: 100%; max-width: 480px;
  margin: 1rem; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-md);
}
.modal h3 { font-size: 17px; font-weight: 700; margin-bottom: 1.25rem; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 1.25rem; }
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 1.5rem; text-align: center;
  cursor: pointer; transition: var(--transition); margin: .5rem 0;
}
.drop-zone:hover, .drop-zone.drag { border-color: var(--red); background: var(--red-light); }
.drop-zone p { font-size: 13px; color: var(--text-2); }
.drop-zone .chosen { font-size: 13px; font-weight: 600; color: var(--success); }

/* ── STATUS / AUDIT ───────────────────────────────────────── */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-success { background: var(--success); }
.dot-danger  { background: var(--red); }
.dot-secondary { background: var(--text-3); }
.dot-warning  { background: var(--warning); }

.audit-item {
  display: flex; gap: 12px; padding: .6rem 0;
  border-bottom: 1px solid var(--border-light); font-size: 13px;
}
.audit-item:last-child { border-bottom: none; }
.audit-icon { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 13px; }
.audit-body { flex: 1; }
.audit-action { font-weight: 600; color: var(--text); }
.audit-meta   { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.audit-details{ font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* ── CHARTS ───────────────────────────────────────────────── */
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.chart-wrap { background: var(--white); border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow); border: 1px solid var(--border); }
.chart-title { font-size: 11px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1rem; }
canvas { max-height: 220px; }

/* ── FILTERS BAR ──────────────────────────────────────────── */
.filters-bar {
  display: flex; gap: 8px; flex-wrap: wrap;
  align-items: center; margin-bottom: 1.25rem;
  background: var(--white); padding: .9rem 1.25rem;
  border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.filters-bar input, .filters-bar select {
  height: 34px; font-size: 13px; padding: 0 10px;
  border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  background: #fafbff; color: var(--text);
}
.filters-bar input:focus, .filters-bar select:focus { outline: none; border-color: var(--red); }

/* ── UTILS ────────────────────────────────────────────────── */
.text-muted   { color: var(--text-2); }
.text-red     { color: var(--red); }
.text-sm      { font-size: 12px; }
.mt-1 { margin-top: .5rem; }  .mt-2 { margin-top: 1rem; }  .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; }
.flex { display: flex; } .flex-col { flex-direction: column; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; } .w-full { width: 100%; }
hr.divider { border: none; border-top: 1px solid rgba(255,255,255,.07); margin: .3rem 0; }

/* ── MISC ─────────────────────────────────────────────────── */
.mfield { margin-bottom: 12px; }
.mfield label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.mfield input, .mfield select {
  width: 100%; height: 38px; font-size: 13px; padding: 0 12px;
  border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: #fafbff;
}
.mfield input:focus, .mfield select:focus { outline: none; border-color: var(--red); }
.gap { margin-bottom: 10px; }

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .main { margin-left: 0; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
  .c2, .c3, .cend, .socio-fields { grid-template-columns: 1fr; }
}

/* ============================================================
   AUTENTICAÇÃO — login.html e setup.html
   ============================================================ */
.auth-page {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #111827; min-height: 100vh; display: flex;
}
.auth-left {
  flex: 1; background: linear-gradient(145deg, #111827 60%, #1e2030);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 3rem; border-right: 1px solid rgba(255,255,255,.06);
}
.auth-logo-box {
  background: #fff; border-radius: var(--radius);
  padding: .75rem 1.25rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.auth-logo-box img { width: 220px; height: 56px; object-fit: contain; display: block; }
.auth-tagline {
  text-align: center; font-size: 13px; margin-top: 1.5rem;
  color: rgba(255,255,255,.3); line-height: 1.7;
}
.auth-tagline strong { color: rgba(255,255,255,.55); }
.auth-right {
  width: 440px; background: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 3rem 2.5rem; overflow-y: auto;
}
.auth-right h2 { font-size: 22px; font-weight: 700; margin-bottom: .25rem; }
.auth-right .auth-sub { font-size: 13px; color: var(--text-2); margin-bottom: 2rem; }
.auth-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; width: 100%; }
.auth-field label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.auth-field input {
  height: 44px; font-size: 14px; padding: 0 13px;
  border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  background: #fafbff; width: 100%; transition: var(--transition);
}
.auth-field input:focus { outline: none; border-color: var(--red); background: #fff; box-shadow: 0 0 0 3px rgba(204,0,0,.1); }
.auth-btn {
  width: 100%; height: 46px; background: var(--red); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600; cursor: pointer;
  margin-top: .5rem; transition: var(--transition);
}
.auth-btn:hover { background: var(--red-dark); transform: translateY(-1px); }
.auth-alert {
  padding: .65rem .9rem; border-radius: var(--radius-sm);
  font-size: 13px; margin-bottom: 1rem; width: 100%;
  background: var(--red-light); border: 1px solid var(--red-border); color: #991b1b;
}
.auth-setup-note {
  background: #fefce8; border: 1px solid #fde68a; border-radius: var(--radius-sm);
  padding: .75rem 1rem; font-size: 12px; color: #92400e;
  margin-bottom: 1.25rem; line-height: 1.6; width: 100%;
}
.auth-footer { text-align: center; font-size: 11px; color: var(--text-3); margin-top: 1.5rem; }

@media (max-width: 640px) {
  .auth-page { flex-direction: column; }
  .auth-left { padding: 2rem; border-right: none; border-bottom: 1px solid rgba(255,255,255,.06); }
  .auth-right { width: 100%; }
}

/* ============================================================
   DASHBOARD — versão melhorada
   ============================================================ */
.dash-hero {
  background: linear-gradient(135deg, #1a2035 0%, #CC0000 100%);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  color: #fff;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(204,0,0,.25);
}
.dash-hero::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,.05);
  border-radius: 50%;
}
.dash-hero::after {
  content: '';
  position: absolute; bottom: -60px; right: 60px;
  width: 140px; height: 140px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
}
.dash-hero h2 { font-size: 22px; font-weight: 700; margin-bottom: .25rem; }
.dash-hero p  { font-size: 13px; opacity: .7; }

.kpi-grid-new { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 1.5rem; }

.kpi-new {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex; align-items: center; gap: 1rem;
  transition: var(--transition);
}
.kpi-new:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi-icon-box {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.kpi-icon-red    { background: var(--red-light); color: var(--red); }
.kpi-icon-green  { background: #d1fae5; color: #059669; }
.kpi-icon-blue   { background: #dbeafe; color: #2563eb; }
.kpi-icon-orange { background: #fef3c7; color: #d97706; }
.kpi-body .kpi-label { font-size: 12px; color: var(--text-2); font-weight: 500; margin-bottom: .2rem; }
.kpi-body .kpi-value { font-size: 24px; font-weight: 700; color: var(--text); line-height: 1.2; }
.kpi-body .kpi-delta { font-size: 11px; color: var(--text-3); margin-top: 1px; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.dash-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.dash-full { grid-column: 1 / -1; }

.chart-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem; box-shadow: var(--shadow); border: 1px solid var(--border);
}
.chart-card-title {
  font-size: 13px; font-weight: 700; color: var(--text);
  margin-bottom: .25rem; display: flex; align-items: center; gap: 7px;
}
.chart-card-sub { font-size: 11px; color: var(--text-3); margin-bottom: 1rem; }

@media (max-width: 960px) {
  .kpi-grid-new { grid-template-columns: repeat(2,1fr); }
  .dash-grid, .dash-grid-3 { grid-template-columns: 1fr; }
}

/* ── Template card overflow fix ── */
.template-card { overflow: hidden; }
.template-card .tc-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.template-card .tc-file {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.folder-card { overflow: hidden; }
.folder-card .fc-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.folder-card .fc-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Uppercase em campos de texto do formulário ── */
/* CSS dá feedback visual imediato enquanto digita  */
#contractForm input[type="text"]:not([name*="email"]):not([name*="EMAIL"]):not([name*="fone"]):not([name*="FONE"]):not([name*="cnpj"]):not([name*="CNPJ"]):not([name*="cpf"]):not([name*="CPF"]):not([name*="cep"]):not([name*="CEP"]):not([name*="valor_mensal"]):not([name*="VALOR_MENSAL"]) {
  text-transform: uppercase;
}
