/* ══════════════════════════════════════
   components.css — Componentes globais
   Grupo Comber — Portal de Gestão
══════════════════════════════════════ */

/* ── TOPBAR ── */
.topbar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-brand  { display: flex; align-items: center; gap: 10px; }
.topbar-right  { display: flex; align-items: center; gap: 8px; }
.topbar-title  { font-family: 'Montserrat', sans-serif; font-size: 15px; font-weight: 700; }
.topbar-logo {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Montserrat', sans-serif; font-size: 14px; font-weight: 800;
  color: #0a2238; flex-shrink: 0;
}
.topbar-company {
  font-size: 11px; color: var(--text2);
  background: var(--bg3); padding: 4px 10px;
  border-radius: 20px; border: 1px solid var(--border);
}
.topbar-avatar {
  width: 34px; height: 34px;
  background: var(--navy); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: var(--gold-light);
  cursor: pointer; border: 2px solid rgba(200,153,42,.3); flex-shrink: 0;
}
.topbar-back {
  background: none; border: none; color: var(--text2);
  font-size: 22px; cursor: pointer;
  padding: 4px 8px 4px 0; line-height: 1; transition: color .2s;
}
.topbar-back:hover { color: var(--text); }
.btn-theme {
  background: none; border: 1px solid var(--border);
  border-radius: 8px; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px; flex-shrink: 0;
  transition: border-color .2s, background .2s;
}
.btn-theme:hover { border-color: var(--gold); background: rgba(200,153,42,.08); }

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg2); border-top: 1px solid var(--border);
  display: flex; justify-content: space-around;
  padding: 8px 0 14px; z-index: 100;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; cursor: pointer; padding: 4px 14px;
  border-radius: 10px; transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.nav-item:hover { background: var(--bg3); }
.nav-item .nav-icon  { font-size: 20px; line-height: 1; }
.nav-item .nav-label { font-size: 10px; color: var(--text2); letter-spacing: .3px; }
.nav-item.active .nav-label { color: var(--gold-light); font-weight: 600; }

/* ── FORM FIELDS ── */
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 11px; font-weight: 500;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--text2); margin-bottom: 7px;
}
.field input,
.field select,
.field textarea {
  width: 100%; background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: 10px; padding: 13px 15px;
  color: var(--text); font-family: 'Montserrat', sans-serif;
  font-size: 14px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field select { cursor: pointer; }
.field select option { background: var(--bg2); color: var(--text); }
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,153,42,.12);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text2); }

.field-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 480px) {
  .field-row, .field-row3 { grid-template-columns: 1fr; }
}

/* ── UPLOAD ZONE ── */
.upload-zone {
  border: 2px dashed var(--border2); border-radius: 12px;
  padding: 20px; text-align: center; cursor: pointer;
  background: var(--input-bg);
  transition: border-color .2s, background .2s;
}
.upload-zone:hover { border-color: var(--gold); background: rgba(200,153,42,.04); }
.upload-zone input[type="file"] { display: none; }
.upload-icon  { font-size: 28px; margin-bottom: 8px; }
.upload-label { font-size: 13px; color: var(--text2); line-height: 1.5; }
.upload-label strong { color: var(--gold); }
.upload-limit { font-size: 11px; color: var(--text2); margin-top: 4px; opacity: .7; }
.upload-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.preview-item {
  position: relative; width: 72px; height: 72px;
  border-radius: 10px; overflow: hidden;
  border: 1.5px solid var(--border2); flex-shrink: 0;
}
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.preview-item .preview-doc {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: var(--bg3); font-size: 9px;
  color: var(--text2); text-align: center; padding: 4px; gap: 2px;
}
.preview-item .preview-doc span { font-size: 20px; }
.preview-remove {
  position: absolute; top: 2px; right: 2px;
  width: 18px; height: 18px;
  background: rgba(224,90,90,.9); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 10px; color: #fff; font-weight: 700;
}
.upload-error { font-size: 12px; color: var(--red); margin-top: 6px; display: none; }

/* ── BUTTONS ── */
.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border: none; border-radius: 12px; padding: 15px;
  color: #0a2238; font-family: 'Montserrat', sans-serif;
  font-size: 15px; font-weight: 700; letter-spacing: .5px;
  cursor: pointer; margin-top: 8px;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 20px rgba(200,153,42,.25);
}
.btn-submit:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(200,153,42,.35); }
.btn-cancel {
  width: 100%; background: transparent;
  border: 1.5px solid var(--border2); border-radius: 12px;
  padding: 13px; color: var(--text2);
  font-family: 'Montserrat', sans-serif; font-size: 14px;
  cursor: pointer; margin-top: 10px;
  transition: border-color .2s, color .2s;
}
.btn-cancel:hover { border-color: var(--border2); color: var(--text); }
.btn-logout {
  width: 100%; background: transparent;
  border: 1.5px solid rgba(224,90,90,.35);
  border-radius: 12px; padding: 14px;
  color: var(--red); font-family: 'Montserrat', sans-serif;
  font-size: 14px; font-weight: 500; cursor: pointer; margin-top: 16px;
  transition: background .2s;
}
.btn-logout:hover { background: rgba(224,90,90,.08); }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 80px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--green); color: #fff;
  font-size: 13px; font-weight: 600;
  padding: 11px 22px; border-radius: 30px;
  opacity: 0; transition: all .3s;
  pointer-events: none; z-index: 9999;
  white-space: nowrap; box-shadow: 0 4px 20px rgba(76,175,138,.4);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── SECTION TITLE ── */
.section-title {
  font-size: 10px; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text2);
  margin-bottom: 12px; margin-top: 24px;
}
.form-section-label {
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px; margin-top: 22px; font-weight: 700;
}
.form-divider { height: 1px; background: var(--border); margin: 18px 0; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: .4; }
.empty-state-text { font-size: 14px; color: var(--text2); line-height: 1.6; }
