/* public/assets/css/app.css
   Tema do Automac Propostas. Compacto, claro, foco em legibilidade. */

:root{
  --ap-bg:#f4f6fb;
  --ap-sidebar:#0f172a;
  --ap-sidebar-2:#1e293b;
  --ap-accent:#2563eb;
  --ap-accent-soft:#dbeafe;
  --ap-text:#1e293b;
  --ap-muted:#64748b;
  --ap-border:#e2e8f0;
  --ap-ok:#16a34a;
  --ap-warn:#d97706;
  --ap-bad:#dc2626;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  background:var(--ap-bg);
  color:var(--ap-text);
  font-family:-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  font-size:14px;
}

/* ---------- Shell ---------- */
.app-shell{ display:flex; min-height:100vh; }
.sidebar{
  width:230px; background:var(--ap-sidebar); color:#cbd5e1;
  flex-shrink:0; display:flex; flex-direction:column; position:sticky; top:0; height:100vh;
}
.sidebar-brand{
  display:flex; align-items:center; gap:.6rem; padding:1.1rem 1.2rem;
  font-weight:700; color:#fff; font-size:1rem; border-bottom:1px solid var(--ap-sidebar-2);
}
.sidebar-brand i{ color:var(--ap-accent); font-size:1.2rem; }
.sidebar-nav{ display:flex; flex-direction:column; padding:.6rem; gap:.15rem; }
.sidebar-nav a{
  display:flex; align-items:center; gap:.65rem; padding:.6rem .8rem;
  color:#cbd5e1; text-decoration:none; border-radius:8px; font-size:.9rem;
}
.sidebar-nav a:hover{ background:var(--ap-sidebar-2); color:#fff; }
.sidebar-nav a.active{ background:var(--ap-accent); color:#fff; }
.sidebar-nav i{ width:18px; text-align:center; }

.app-main{ flex:1; display:flex; flex-direction:column; min-width:0; }
.topbar{
  display:flex; align-items:center; gap:1rem; background:#fff;
  padding:.6rem 1.2rem; border-bottom:1px solid var(--ap-border);
}
.content{ padding:1.4rem; }

/* ---------- Header da página ---------- */
.page-head{ display:flex; align-items:center; gap:1rem; margin-bottom:1.1rem; flex-wrap:wrap; }
.page-head h1{ font-size:1.3rem; font-weight:700; margin:0; }
.page-head .spacer{ flex:1; }

/* ---------- Cards ---------- */
.card{ border:1px solid var(--ap-border); border-radius:12px; }
.card-soft{ background:#fff; }

.stat{ background:#fff; border:1px solid var(--ap-border); border-radius:12px; padding:1rem 1.1rem; }
.stat .label{ color:var(--ap-muted); font-size:.78rem; text-transform:uppercase; letter-spacing:.03em; }
.stat .value{ font-size:1.45rem; font-weight:700; margin-top:.25rem; }
.stat.ok .value{ color:var(--ap-ok); }
.stat.bad .value{ color:var(--ap-bad); }
.stat.accent .value{ color:var(--ap-accent); }
.stat.warn .value{ color:var(--ap-warn); }

/* ---------- Tabelas ---------- */
.table{ font-size:.875rem; }
.table thead th{
  text-transform:uppercase; font-size:.72rem; letter-spacing:.03em;
  color:var(--ap-muted); border-bottom:2px solid var(--ap-border);
}
.table-card{ background:#fff; border:1px solid var(--ap-border); border-radius:12px; overflow:hidden; }
.table-card .table{ margin:0; }
.table-card .table td, .table-card .table th{ padding:.6rem .9rem; vertical-align:middle; }

/* ---------- Itens da proposta ---------- */
.item-row td{ vertical-align:top; }
.item-row textarea{ min-height:64px; font-size:.85rem; }
.money-input{ text-align:right; }

/* ---------- Misc ---------- */
.text-money{ font-variant-numeric:tabular-nums; }
.badge{ font-weight:600; }
label.form-label{ font-size:.8rem; color:var(--ap-muted); margin-bottom:.2rem; font-weight:600; }
.required:after{ content:" *"; color:var(--ap-bad); }

/* ---------- Filtros (estilo do gerador de propostas) ---------- */
.filters-form .form-label{
  font-size:.65rem; font-weight:700; color:var(--ap-muted);
  letter-spacing:.05em; text-transform:uppercase; margin-bottom:.3rem;
}
.filters-form .form-select,
.filters-form .form-control,
.filters-form textarea{
  border:1.5px solid var(--ap-border); border-radius:4px;
  padding:.45rem .65rem; font-size:.85rem; color:var(--ap-text);
}
.filters-form .form-select:focus,
.filters-form .form-control:focus,
.filters-form textarea:focus{
  outline:none; border-color:var(--ap-sidebar);
  box-shadow:none;
}
.filters-form label.required{ color:var(--ap-muted); }

/* ---------- Formulário em modo somente-leitura (ex.: dados do cliente antes de clicar "Editar") ---------- */
.view-mode .form-control,
.view-mode .form-select{
  background:transparent; border-color:transparent; padding-left:0;
  pointer-events:none;
}
.view-mode .btn-group{ pointer-events:none; }
.view-mode .btn-group .btn{ opacity:.6; }
.view-mode .btn-group .btn-check:checked + .btn{ opacity:1; }

/* ---------- Login ---------- */
.login-wrap{
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,#0f172a,#1e3a8a); padding:1rem;
}
.login-card{
  width:100%; max-width:380px; background:#fff; border-radius:16px;
  padding:2rem 1.8rem; box-shadow:0 20px 50px rgba(0,0,0,.3);
}
.login-card .brand{ text-align:center; font-weight:700; font-size:1.3rem; margin-bottom:.3rem; }
.login-card .brand i{ color:var(--ap-accent); }
.login-card .sub{ text-align:center; color:var(--ap-muted); font-size:.85rem; margin-bottom:1.4rem; }

/* ---------- Responsivo ---------- */
@media (max-width: 992px){
  .sidebar{ position:fixed; left:-240px; z-index:1050; transition:left .2s ease; }
  .sidebar.open{ left:0; }
}
