/* RCS Partner Portal - CSS unificado (header + dashboard + quote view) */
/* Objetivo: visual limpo, sem cinza “feio”, botões padronizados, espaçamento consistente */

:root{
  --rcs-black:#111111;
  --rcs-white:#ffffff;

  --rcs-surface:#ffffff;
  --rcs-surface-muted:#f6f7f9;

  --rcs-border:#e6e8ee;
  --rcs-muted:#6b7280;

  --rcs-orange:#d96306;
  --rcs-orange-dark:#b95405;

  --rcs-green:#198754;
  --rcs-red:#c00;
  --rcs-blue:#0d6efd;

  --rcs-shadow:0 10px 22px rgba(17,17,17,.08);
}

/* Escopo / reset local */
.rcs-portal, .rcs-portal *{
  box-sizing:border-box;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.rcs-portal a{ text-decoration:none; color:inherit; }
.rcs-portal p{ margin:0; }
.rcs-portal h3, .rcs-portal h4{ margin:0; }

/* Header */
.rcs-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:12px 18px;
  background:linear-gradient(135deg,#111 0%, #222 100%);
  color:var(--rcs-white);
  border-radius:12px;
  margin:10px 0 22px;
  box-shadow:0 8px 18px rgba(0,0,0,.10);
}

.rcs-header-logo{
  font-weight:800;
  letter-spacing:.2px;
  color:var(--rcs-white);
}

.rcs-header-nav{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.rcs-header-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:9px 12px;
  border-radius:10px;
  background:rgba(255,255,255,.10);
  color:var(--rcs-white);
  font-size:14px;
  line-height:1;
  border:1px solid rgba(255,255,255,.14);
}

.rcs-header-btn:hover{ background:rgba(255,255,255,.16); }
.rcs-header-btn.is-active{ background:var(--rcs-orange); border-color:rgba(0,0,0,.08); }

.rcs-header-user-box{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding-left:10px;
  margin-left:6px;
  border-left:1px solid rgba(255,255,255,.16);
}

.rcs-header-user-name{
  font-size:13px;
  color:rgba(255,255,255,.82);
}

.rcs-header-logout{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:9px 12px;
  border-radius:10px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.14);
  color:rgba(255,255,255,.92);
}
.rcs-header-logout:hover{ background:rgba(255,255,255,.12); }

/* Dashboard layout */
.rcs-dashboard-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:12px;
  margin:0 0 14px;
}

.rcs-muted{
  margin-top:6px;
  font-size:13px;
  color:var(--rcs-muted);
}

.rcs-dashboard-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(310px,1fr));
  gap:18px;
  align-items:stretch;
}

/* Card */
.rcs-card{
  background:var(--rcs-surface);
  border:1px solid var(--rcs-border);
  border-radius:16px;
  padding:16px;
  box-shadow:0 2px 4px rgba(17,17,17,.04);
  display:flex;
  flex-direction:column;
  min-height:0;
}

.rcs-card--clickable{
  cursor:pointer;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.rcs-card--clickable:hover{
  transform:translateY(-2px);
  box-shadow:var(--rcs-shadow);
  border-color:rgba(17,17,17,.14);
}

.rcs-card-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  margin-bottom:10px;
}

.rcs-card-title{
  font-size:16px;
  font-weight:800;
  color:#1f2937;
}

.rcs-card-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid var(--rcs-border);
  background:var(--rcs-surface-muted);
  color:#111;
}
.rcs-card-link:hover{ background:#eef0f4; }

/* Status badge (remove “cinza feio”) */
.rcs-status-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:5px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  letter-spacing:.2px;
  width:max-content;
  border:1px solid transparent;
}

/* Draft = neutro elegante (não cinza chapado) */
.rcs-status--draft{
  background:#fff;
  color:#374151;
  border-color:#d1d5db;
}

/* Approved = laranja (como você pediu) */
.rcs-status--approved{
  background:rgba(253,126,20,.16);
  color:#9a4c08;
  border-color:rgba(253,126,20,.35);
}

/* Paid (quando existir) = verde */
.rcs-status--paid{
  background:rgba(25,135,84,.16);
  color:#0f5c37;
  border-color:rgba(25,135,84,.35);
}

/* Metas */
.rcs-card-meta{
  margin-top:10px;
  font-size:14px;
  color:#374151;
}

/* Actions: espaçamento consistente */
.rcs-actions{
  margin-top:auto;
  display:flex;
  flex-direction:column;
  gap:10px;
  padding-top:14px;
}

/* Terms row */
.rcs-terms-row{
  display:flex;
  gap:8px;
  align-items:flex-start;
  font-size:13px;
  color:#374151;
}
.rcs-terms-row input{ margin-top:2px; }
.rcs-terms-row a{ color:var(--rcs-blue); text-decoration:underline; }

/* Buttons: padroniza e evita “marron” do tema */
.rcs-btn{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:100% !important;
  padding:10px 12px !important;
  border-radius:12px !important;
  border:1px solid rgba(17,17,17,.10) !important;
  background:var(--rcs-black) !important;
  color:var(--rcs-white) !important;
  font-size:14px !important;
  font-weight:800 !important;
  line-height:1.1 !important;
}

.rcs-btn:disabled{
  opacity:.55 !important;
  cursor:not-allowed !important;
}

.rcs-btn--orange{
  background:var(--rcs-orange) !important;
  border-color:rgba(0,0,0,.06) !important;
}
.rcs-btn--orange:hover{ background:var(--rcs-orange-dark) !important; }

.rcs-btn--green{
  background:var(--rcs-green) !important;
  border-color:rgba(0,0,0,.06) !important;
}

.rcs-btn--red{
  background:var(--rcs-red) !important;
  border-color:rgba(0,0,0,.06) !important;
}

/* Quote view “app” */
.rcs-quote-box{
  border:1px solid var(--rcs-border);
  border-radius:16px;
  background:var(--rcs-surface);
  padding:16px;
  box-shadow:0 2px 4px rgba(17,17,17,.04);
}

.rcs-quote-grid{
  margin-top:12px;
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
  background:var(--rcs-surface-muted);
  padding:14px;
  border-radius:14px;
}

.rcs-quote-item{ display:flex; flex-direction:column; gap:6px; }
.rcs-quote-label{ font-size:12px; font-weight:800; color:var(--rcs-muted); text-transform:uppercase; letter-spacing:.3px; }
.rcs-quote-value{ font-size:15px; font-weight:700; color:#111; }

/* Mobile */
@media (max-width: 768px){
  .rcs-header{
    flex-direction:column;
    align-items:stretch;
    padding:14px;
    gap:10px;
  }
  .rcs-header-nav{
    justify-content:center;
  }
  .rcs-header-user-box{
    border-left:none;
    padding-left:0;
    margin-left:0;
  }
  .rcs-dashboard-grid{
    grid-template-columns:1fr;
  }
  .rcs-quote-grid{
    grid-template-columns:1fr;
  }
}