/* ============================================================
   Paraná Consórcios — Portal do cliente (módulo de produto)
   Mesma linguagem da marca, adaptada para interface de produto.
   ============================================================ */

.portal { min-height: 100vh; display: grid; grid-template-columns: 264px 1fr; background: var(--cream-50); }

/* ---- Sidebar ---- */
.p-side { background: var(--green-950); color: var(--green-100); display: flex; flex-direction: column; padding: 24px 18px; position: sticky; top: 0; height: 100vh; }
.p-side .logo { padding: 6px 8px 22px; }
.p-side .logo-text b { color: #fff; }
.p-side .logo-text span { color: var(--gold-400); }
.p-nav { display: flex; flex-direction: column; gap: 3px; }
.p-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--r-md); font-size: var(--fs-sm); font-weight: 600; color: var(--green-300); transition: background var(--dur-fast), color var(--dur-fast); }
.p-nav a svg { width: 20px; height: 20px; stroke: currentColor; flex-shrink: 0; }
.p-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.p-nav a.active { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.p-nav .p-nav-label { font-size: var(--fs-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--green-300); opacity: 0.6; padding: 18px 14px 8px; font-weight: 700; }
.p-side-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.1); }
.p-side-foot a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--r-md); font-size: var(--fs-sm); color: var(--green-300); }
.p-side-foot a:hover { color: #fff; }
.p-side-foot a svg { width: 20px; height: 20px; stroke: currentColor; }

/* ---- Main ---- */
.p-main { display: flex; flex-direction: column; min-width: 0; }
.p-topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 3vw, 40px); background: rgba(250,248,243,0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.p-topbar .p-greet b { font-family: var(--font-display); font-size: 1.3rem; color: var(--ink-900); font-weight: 700; }
.p-topbar .p-greet span { font-size: var(--fs-xs); color: var(--ink-500); display: block; }
.p-top-actions { display: flex; align-items: center; gap: var(--sp-3); }
.p-iconbtn { width: 42px; height: 42px; border-radius: var(--r-full); background: var(--paper); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; position: relative; transition: box-shadow var(--dur-fast); }
.p-iconbtn:hover { box-shadow: var(--shadow-sm); }
.p-iconbtn svg { width: 20px; height: 20px; stroke: var(--ink-600); }
.p-iconbtn .p-dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-500); border: 2px solid var(--paper); }
.p-avatar { width: 42px; height: 42px; border-radius: var(--r-full); background: var(--green-700); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: var(--fs-sm); }
.p-mobile-toggle { display: none; }

.p-content { padding: clamp(20px, 3vw, 36px); display: flex; flex-direction: column; gap: var(--sp-5); max-width: 1180px; width: 100%; }
.p-page-title { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.p-page-title h1 { font-size: var(--fs-2xl); }
.p-page-title p { color: var(--ink-500); font-size: var(--fs-sm); margin-top: 2px; }

/* hero status card */
.p-hero { background: linear-gradient(150deg, var(--green-800), var(--green-950)); color: #fff; border-radius: var(--r-xl); padding: clamp(24px, 3vw, 36px); position: relative; overflow: hidden; }
.p-hero::before { content: ""; position: absolute; top: -60px; right: -40px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(196,154,69,0.22), transparent 70%); }
.p-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-4); flex-wrap: wrap; position: relative; }
.p-hero .p-eyebrow { font-size: var(--fs-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-400); font-weight: 700; }
.p-hero h2 { color: #fff; font-size: clamp(1.5rem, 1.2rem + 1.4vw, 1.9rem); margin-top: 6px; line-height: 1.15; }
.p-hero .p-hero-meta { display: flex; gap: var(--sp-5); margin-top: var(--sp-5); flex-wrap: wrap; }
.p-hero .p-hero-meta div span { font-size: var(--fs-xs); color: var(--green-300); display: block; }
.p-hero .p-hero-meta div b { font-size: var(--fs-base); color: #fff; font-weight: 700; }
.p-status-tag { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--r-full); font-size: var(--fs-sm); font-weight: 700; background: rgba(196,154,69,0.2); color: var(--gold-400); border: 1px solid rgba(196,154,69,0.35); }
.p-status-tag .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-400); }
.p-progress { margin-top: var(--sp-6); position: relative; }
.p-progress-top { display: flex; justify-content: space-between; font-size: var(--fs-sm); margin-bottom: 10px; }
.p-progress-top b { color: #fff; }
.p-progress-top span { color: var(--green-300); }
.p-bar { height: 10px; border-radius: var(--r-full); background: rgba(255,255,255,0.14); overflow: hidden; }
.p-bar-fill { height: 100%; border-radius: var(--r-full); background: linear-gradient(90deg, var(--green-400), var(--gold-400)); }

/* stat tiles */
.p-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); }
.p-tile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-5); }
.p-tile .p-tile-ic { width: 40px; height: 40px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; margin-bottom: var(--sp-4); }
.p-tile .p-tile-ic svg { width: 21px; height: 21px; }
.p-tile-ic.t-green { background: var(--green-50); } .p-tile-ic.t-green svg { stroke: var(--brand); }
.p-tile-ic.t-gold { background: var(--gold-100); } .p-tile-ic.t-gold svg { stroke: var(--bronze-600); }
.p-tile-ic.t-blue { background: var(--info-bg); } .p-tile-ic.t-blue svg { stroke: var(--info); }
.p-tile .p-tile-label { font-size: var(--fs-xs); color: var(--ink-500); }
.p-tile .p-tile-val { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; color: var(--ink-900); margin-top: 2px; line-height: 1.1; }
.p-tile .p-tile-sub { font-size: var(--fs-xs); margin-top: 4px; }
.p-tile-sub.up { color: var(--success); } .p-tile-sub.muted { color: var(--ink-400); }
@media (max-width: 900px) { .p-tiles { grid-template-columns: 1fr 1fr; } }

/* columns layout */
.p-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--sp-4); align-items: start; }
@media (max-width: 940px) { .p-cols { grid-template-columns: 1fr; } }

.p-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-5); }
.p-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-4); }
.p-card-head h3 { font-size: var(--fs-lg); }
.p-card-head a { font-size: var(--fs-sm); font-weight: 600; color: var(--brand); }

/* table */
.p-table { width: 100%; border-collapse: collapse; }
.p-table th { text-align: left; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-400); font-weight: 700; padding: 0 8px 12px; }
.p-table td { padding: 13px 8px; border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--ink-700); }
.p-table td.num, .p-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.p-table tr:hover { background: var(--cream-50); }
.p-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 700; }
.p-pill.paid { background: var(--success-bg); color: var(--success); }
.p-pill.due { background: var(--warning-bg); color: var(--warning); }
.p-pill.open { background: var(--cream-100); color: var(--ink-500); }
.p-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* timeline / próximas datas */
.p-timeline { display: flex; flex-direction: column; gap: 2px; }
.p-tl-item { display: flex; gap: 14px; padding: 12px 0; }
.p-tl-date { flex-shrink: 0; width: 52px; text-align: center; }
.p-tl-date b { font-family: var(--font-display); font-size: 1.3rem; color: var(--ink-900); display: block; line-height: 1; }
.p-tl-date span { font-size: var(--fs-xs); color: var(--ink-400); text-transform: uppercase; }
.p-tl-body { border-left: 2px solid var(--line); padding-left: 14px; }
.p-tl-item.next .p-tl-body { border-color: var(--brand); }
.p-tl-body b { font-size: var(--fs-sm); color: var(--ink-900); display: block; }
.p-tl-body span { font-size: var(--fs-xs); color: var(--ink-500); }

/* lance panel */
.p-lance { background: linear-gradient(150deg, var(--green-50), var(--cream-50)); border: 1px solid var(--green-100); border-radius: var(--r-lg); padding: var(--sp-5); }
.p-lance h3 { font-size: var(--fs-lg); }
.p-lance p { font-size: var(--fs-sm); color: var(--ink-600); margin-top: 6px; }
.p-lance .p-lance-stat { display: flex; gap: var(--sp-5); margin: var(--sp-4) 0; }
.p-lance .p-lance-stat div span { font-size: var(--fs-xs); color: var(--ink-500); display: block; }
.p-lance .p-lance-stat div b { font-family: var(--font-display); font-size: 1.3rem; color: var(--brand); }

/* docs */
.p-docs { display: flex; flex-direction: column; gap: 2px; }
.p-doc { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-radius: var(--r-md); transition: background var(--dur-fast); }
.p-doc:hover { background: var(--cream-50); }
.p-doc .p-doc-ic { width: 38px; height: 38px; border-radius: var(--r-sm); background: var(--green-50); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.p-doc .p-doc-ic svg { width: 18px; height: 18px; stroke: var(--brand); }
.p-doc b { font-size: var(--fs-sm); color: var(--ink-900); display: block; }
.p-doc span { font-size: var(--fs-xs); color: var(--ink-400); }
.p-doc .p-doc-dl { margin-left: auto; }
.p-doc .p-doc-dl svg { width: 18px; height: 18px; stroke: var(--ink-400); }

.p-banner { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-xs); color: var(--ink-500); background: var(--paper); border: 1px solid var(--line); padding: 8px 14px; border-radius: var(--r-full); }
.p-banner svg { width: 15px; height: 15px; stroke: var(--brand); }

/* ---- responsivo: sidebar drawer ---- */
@media (max-width: 860px) {
  .portal { grid-template-columns: 1fr; }
  .p-side { position: fixed; left: 0; top: 0; z-index: 50; width: 264px; transform: translateX(-100%); transition: transform var(--dur-slow) var(--ease-in-out); }
  .portal.nav-open .p-side { transform: translateX(0); }
  .p-mobile-toggle { display: flex; }
  .portal.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 40; }
}
