/* =========================
   THEME / TOKENS
========================= */
:root{
  --bg:#070708;
  --text:#f2f2f2;
  --muted:#b8b8b8;

  --gold:#a4a682;          /* R164 G166 B130 */
  --gold-2:#cbbf7a;
  --border:rgba(164,166,130,.22);

  --r:16px;
  --r2:20px;
  --shadow: 0 18px 55px rgba(0,0,0,.55);
  --shadow2: 0 10px 28px rgba(0,0,0,.45);
}

/* força controles nativos em dark */
:root{
  color-scheme: dark;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family:"Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(164,166,130,.10), transparent 55%),
    radial-gradient(700px 420px at 90% 30%, rgba(203,191,122,.10), transparent 60%),
    linear-gradient(180deg, #050506 0%, var(--bg) 55%, #050506 100%);
  color:var(--text);
}

/* =========================
   LAYOUT BASE
========================= */
main{
  max-width: 1040px;
  margin: 0 auto;
  padding: 22px 16px 60px;
}

.small{ font-size: 12px; }
.muted{ color: var(--muted); }
.sep{ opacity:.5; margin: 0 8px; }

h1{ font-size: 26px; margin:0 0 6px; }
h3{ font-size: 18px; margin:0 0 12px; }
h4{ margin: 0 0 10px; }

/* =========================
   CARDS
========================= */
.card{
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
  border-radius: var(--r2);
  padding: 18px;
  margin: 14px 0;
  box-shadow: var(--shadow2);
}

.subcard{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  border-radius: var(--r);
  padding: 14px;
  margin: 12px 0;
}

.subcard.dashed{
  border-style:dashed;
}

/* =========================
   TOPBAR
========================= */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 10px;
}

.topbar-left{
  display:flex;
  gap:12px;
  align-items:center;
}

.brand{
  font-weight:700;
  letter-spacing:.2px;
  font-size:18px;
}

.logo{
  width: 46px;
  height:46px;
  object-fit:contain;
  border-radius: 14px;
  border: 1px solid rgba(164,166,130,.28);
  background: rgba(255,255,255,.03);
  padding: 8px;
}

.topbar-right{
  display:flex;
  align-items:center;
}

.btn-link{
  background: transparent;
  border: 0;
  color: var(--gold-2);
  cursor: pointer;
  font-weight: 600;
  padding: 6px 8px;
}

.btn-link:hover{
  text-decoration: underline;
}

/* =========================
   INPUTS / SELECTS (FIX)
========================= */
input, textarea, select{
  width:100%;
  max-width:560px;
  padding: 11px 12px;
  margin: 6px 0 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(10,10,12,.72);
  color: var(--text);
  outline:none;
  font-family: inherit;
}

input::placeholder,
textarea::placeholder{
  color: rgba(242,242,242,.42);
}

/* SELECT — remove branco e seta padrão */
select{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-image:
    linear-gradient(45deg, transparent 50%, rgba(242,242,242,.75) 50%),
    linear-gradient(135deg, rgba(242,242,242,.75) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

/* opções internas */
select option{
  background-color: rgba(10,10,12,.95);
  color: var(--text);
}

select option:checked{
  background-color: rgba(203,191,122,.22);
}

/* foco */
input:focus,
textarea:focus,
select:focus{
  border-color: rgba(203,191,122,.55);
  box-shadow: 0 0 0 3px rgba(203,191,122,.12);
}

/* =========================
   BUTTONS
========================= */
button{
  width:auto;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(203,191,122,.55);
  background: linear-gradient(180deg, rgba(203,191,122,.95), rgba(164,166,130,.85));
  color: #14140f;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
}

button:disabled{
  opacity:.45;
  cursor:not-allowed;
}

.btn-ghost{
  background: rgba(255,255,255,.04);
  color: rgba(242,242,242,.90);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: none;
}

.btn-ghost:hover{
  border-color: rgba(203,191,122,.35);
}

/* =========================
   MESSAGES
========================= */
.msg{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.25);
  border-radius: 14px;
  padding: 10px 12px;
  margin-top: 10px;
}

.msg--success{
  border-color: rgba(164,166,130,.55);
  background: rgba(164,166,130,.10);
}

.msg--error{
  border-color: rgba(255,120,120,.35);
  background: rgba(255,120,120,.08);
}

.msg--warning{
  border-color: rgba(203,191,122,.40);
  background: rgba(203,191,122,.09);
}

.msg--info{
  border-color: rgba(203,191,122,.28);
  background: rgba(203,191,122,.06);
}

/* =========================
   PROGRESS
========================= */
.progress-card{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 14px;
}

.progress-left{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.progress-title{
  font-size: 14px;
}

.progressbar{
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  overflow:hidden;
}

.progressbar-fill{
  height:100%;
  background: linear-gradient(90deg, rgba(203,191,122,.95), rgba(164,166,130,.85));
  width:0%;
}

.progress-right{
  display:flex;
  flex-direction:column;
  gap:8px;
  justify-content:center;
}

.progress-meta{
  grid-column: 1 / -1;
  margin-top: 6px;
}

/* =========================
   PILLS
========================= */
.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
}

.pill--pending{
  border-color: rgba(203,191,122,.25);
}

.pill--done{
  border-color: rgba(164,166,130,.55);
  background: rgba(164,166,130,.12);
}

.pill--review{
  border-color: rgba(203,191,122,.40);
  background: rgba(203,191,122,.10);
}

.pill--soon{
  border-color: rgba(255,255,255,.10);
  opacity: .85;
}

/* =========================
   TABLE
========================= */
.table-wrap{
  overflow:auto;
}

.deliveries{
  width:100%;
  border-collapse: collapse;
  min-width: 820px;
}

.deliveries thead th{
  text-align:left;
  font-size: 12px;
  color: rgba(242,242,242,.72);
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.deliveries tbody td{
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  vertical-align: top;
}

.row-title{
  font-weight:700;
  margin-bottom: 3px;
}

.panel td{
  background: rgba(0,0,0,.18);
}

.panel-inner{
  padding: 10px 0 6px;
}

/* =========================
   FIELDSET
========================= */
.fieldset{
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--r);
  padding: 14px;
  margin: 14px 0;
  background: rgba(0,0,0,.18);
}

.fieldset legend{
  padding: 0 10px;
  font-weight: 600;
}

/* =========================
   CERT
========================= */
.cert-area{
  display:flex;
  align-items:center;
  gap:12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 820px){
  .progress-card{
    grid-template-columns: 1fr;
  }
}

/* =========================
   RATING 1–10 (estilo forms)
========================= */
.rating{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;              /* <- espaçamento entre os botões */
  margin: 10px 0 18px;
}

.rate-btn{
  width: 46px;
  height: 42px;
  border-radius: 14px;    /* arredondado */
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.45);  /* preto */
  color: rgba(242,242,242,.92); /* branco */
  font-weight: 700;
  box-shadow: none;
  padding: 0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor: pointer;
  user-select: none;
}

.rate-btn:hover{
  border-color: rgba(203,191,122,.30);
  transform: translateY(-1px);
}

.rate-btn.is-active{
  border-color: rgba(203,191,122,.65);
  background: linear-gradient(180deg, rgba(203,191,122,.95), rgba(164,166,130,.85));
  color: #14140f; /* contraste quando seleciona */
}

/* opcional: foco acessível */
.rate-btn:focus{
  outline: none;
  box-shadow: 0 0 0 3px rgba(203,191,122,.12);
}

/* evita “esticar” botões em telas menores */
@media (max-width: 520px){
  .rate-btn{
    width: 40px;
    height: 38px;
    border-radius: 12px;
  }
}

/* =========================
   TABS (Entregas | Sala de Aula)
========================= */
.tabs{
  display:flex;
  gap:10px;
  margin: 10px 0 14px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  width: fit-content;
}

.tab{
  border-radius: 999px;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: rgba(242,242,242,.90);
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}

.tab:hover{
  border-color: rgba(203,191,122,.35);
}

.tab.is-active{
  border-color: rgba(203,191,122,.65);
  background: linear-gradient(180deg, rgba(203,191,122,.95), rgba(164,166,130,.85));
  color: #14140f;
}

/* =========================
   LINKS (tema)
========================= */
a{
  color: var(--gold-2);
  text-decoration: none;
  font-weight: 600;
}

a:hover{
  text-decoration: underline;
}

