/* portal.css — Estilos globais do Portal do Cliente */
/* Extraído e organizado a partir do mockup visual */

:root {
  --bg:         #f4f7fb;
  --card:       #ffffff;
  --text:       #10233f;
  --muted:      #6f7f95;
  --primary:    #163968;
  --primary-2:  #285ea8;
  --line:       #e5ecf5;
  --success:    #1f9d68;
  --warn:       #d08a00;
  --danger:     #d94b4b;
  --shadow:     0 10px 30px rgba(16,35,63,.08);
  --radius:     18px;
  --brand:      #163968;
  --brand-dark: #0a1d36;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, 'Segoe UI', Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
  min-height: 100vh;
}

/* ── Utilitários ─────────────────────────────────────── */
.text-muted   { color: var(--muted); }
.text-danger  { color: var(--danger); }
.text-success { color: var(--success); }
.text-warn    { color: var(--warn); }
.mt-0 { margin-top: 0; }

/* ── Botões ──────────────────────────────────────────── */
.btn {
  height: 52px;
  border: none;
  border-radius: 14px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}
.btn-secondary  { background: #eef4fb; color: #294566; }
.btn-sm         { height: 38px; font-size: 13px; padding: 0 14px; }
.btn-danger     { background: #fdeaea; color: var(--danger); }

/* ── Alertas ─────────────────────────────────────────── */
.alert-erro {
  background: #fdeaea;
  color: var(--danger);
  border: 1px solid #f5c6c6;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}
.alert-aviso {
  background: #fff8e4;
  color: #8a6300;
  border: 1px solid #f0d98a;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
}

/* ── Cards ───────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

/* ── Tags / Badges de status ─────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.tag-open  { background: #fff3e4; color: #9a6200; }   /* Liberação / Em análise */
.tag-sep   { background: #edf5ff; color: #225ca5; }   /* Separação / Em andamento */
.tag-paid  { background: #e9fbf3; color: #11764a; }   /* Faturado / Pago */
.tag-late  { background: #fdeaea; color: #b03030; }   /* Vencido */
.tag-pend  { background: #f4f0ff; color: #5a3ea8; }   /* Pendente */

/* ── Formulários ─────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #41556f;
}
.field input,
.field select {
  width: 100%;
  height: 50px;
  border-radius: 14px;
  border: 1px solid #d9e4f0;
  background: #fbfdff;
  padding: 0 16px;
  font-size: 15px;
  outline: none;
  font-family: inherit;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus,
.field select:focus {
  border-color: #8cb0df;
  box-shadow: 0 0 0 4px rgba(40,94,168,.08);
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── Tabelas ─────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; }
.table th,
.table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  text-align: left;
}
.table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #7a8aa0;
  font-weight: 700;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover   { background: #f8fbff; }

/* ── Barras de progresso ─────────────────────────────── */
.bar {
  height: 8px;
  background: #edf2f8;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}
.bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3e7dd6, #76a7f0);
  transition: width .4s ease;
}
.bar > span.danger { background: linear-gradient(90deg, #d94b4b, #f07676); }

/* ── Linha de timeline ───────────────────────────────── */
.timeline { display: grid; gap: 0; }
.t-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.t-item:last-child { border-bottom: none; }

/* ── Pills / filtros ─────────────────────────────────── */
.pill {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
  color: #3d5675;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.pill:hover { background: #f0f6ff; }

/* ── Loading skeleton ────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #e8eef5 25%, #f5f8fc 50%, #e8eef5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
  display: inline-block;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Tela de Login ───────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 28px;
  align-items: center;
  padding: 28px;
}
.login-hero {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 100%);
  color: #fff;
  border-radius: 26px;
  min-height: 680px;
  padding: 48px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.brand        { display: flex; align-items: center; gap: 14px; }
.logo {
  width: 54px; height: 54px;
  border-radius: 14px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
  display: grid; place-items: center;
  font-size: 26px; font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.hero-copy h1 { font-size: 40px; line-height: 1.1; margin: 0 0 12px; }
.hero-copy p  { font-size: 17px; line-height: 1.55; color: rgba(255,255,255,.82); max-width: 580px; }
.hero-cards   { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.mini-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  padding: 18px;
  backdrop-filter: blur(6px);
}
.mini-card .k { font-size: 13px; color: rgba(255,255,255,.7); margin-bottom: 8px; }
.mini-card .v { font-size: 26px; font-weight: 800; }

.login-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 36px;
  min-height: 680px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-form-wrap { max-width: 480px; margin: 0 auto; width: 100%; }
.login-card h2 { font-size: 30px; margin: 0 0 8px; }
.sub    { color: var(--muted); margin: 0 0 24px; font-size: 15px; }
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 22px;
}
.foot-note { margin-top: 18px; color: var(--muted); font-size: 13px; }

/* ── Shell do Dashboard ──────────────────────────────── */
.dash-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────── */
.sidebar {
  background: var(--brand-dark);
  color: #fff;
  padding: 22px 16px;
  border-right: 1px solid rgba(255,255,255,.06);
  display: flex;
  flex-direction: column;
}
.side-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.side-logo  {
  width: 42px; height: 42px; border-radius: 12px;
  background: rgba(255,255,255,.15); display: grid; place-items: center;
  font-weight: 800; font-size: 18px; flex-shrink: 0; overflow: hidden;
}
.side-title  { font-weight: 800; font-size: 15px; }
.side-sub    { color: rgba(255,255,255,.65); font-size: 12px; }

.menu { display: grid; gap: 4px; }
.menu a {
  text-decoration: none;
  color: rgba(255,255,255,.85);
  padding: 11px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background .15s;
}
.menu a.active,
.menu a:hover { background: rgba(0,0,0,.18); color: #fff; }
.menu a.active { pointer-events: none; }

.side-card {
  margin-top: auto;
  background: rgba(0,0,0,.15);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px;
  padding: 16px;
}
.side-card .label  { font-size: 13px; color: rgba(255,255,255,.65); }
.side-card .big    { font-size: 24px; font-weight: 800; margin-top: 6px; }
.side-card .update { margin-top: 6px; color: rgba(255,255,255,.75); font-size: 12px; }

/* ── Área principal ──────────────────────────────────── */
.main { padding: 26px; overflow-y: auto; }

.topbar { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.topbar h1 { margin: 0; font-size: 26px; }
.topbar .sub { margin: 4px 0 0; }
.top-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Cards de métricas ───────────────────────────────── */
.summary { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 20px; }
.metric .k {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #70829a;
  margin-bottom: 10px;
  font-weight: 800;
}
.metric .v  { font-size: 32px; font-weight: 800; line-height: 1; }
.metric .s  { margin-top: 8px; color: var(--muted); font-size: 13px; }

/* ── Grid do conteúdo ────────────────────────────────── */
.content-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.stack        { display: grid; gap: 18px; align-content: start; }
.split        { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ── Cabeçalho de card ───────────────────────────────── */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.card-header h3 { margin: 0; font-size: 16px; }
.card-header .hint { color: var(--muted); font-size: 13px; }

/* ── Paginação simples ───────────────────────────────── */
.pager { display: flex; gap: 8px; align-items: center; margin-top: 16px; justify-content: flex-end; }
.pager span { font-size: 13px; color: var(--muted); }

/* ── Responsivo ──────────────────────────────────────── */
@media (max-width: 1100px) {
  .login-wrap            { grid-template-columns: 1fr; }
  .dash-shell            { grid-template-columns: 1fr; }
  .sidebar               { display: none; }
  .summary               { grid-template-columns: 1fr 1fr; }
  .content-grid          { grid-template-columns: 1fr; }
  .split                 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .login-wrap            { padding: 16px; gap: 16px; }
  .login-hero            { min-height: auto; padding: 28px; }
  .hero-copy h1          { font-size: 28px; }
  .hero-cards            { grid-template-columns: repeat(3,1fr); }
  .summary               { grid-template-columns: 1fr 1fr; }
  .row                   { grid-template-columns: 1fr; }
}
