/* =============================================================================
   broker.css — Broker area styles
   Sections: #banner (dashboard), #materiais, .pagination,
             broker login & register forms
   ============================================================================= */

/* ── BANNER (dashboard) ─────────────────────────────────────────────────────── */
#banner {
  position: relative;
  height: 800px;
  overflow: hidden;
  background: var(--g01);
}
.banner-bg {
  position: absolute;
  inset: 0;
}
.banner-bg picture,
.banner-bg img,
.banner-bg video {
  display: block;
  width: 100%; height: 100%;
}
.banner-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}
.banner-bg video {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}
.banner-youtube {
  position: absolute;
  top: 50%; left: 50%;
  width: 100vw; height: 56.25vw;
  min-width: 177.78vh; min-height: 100vh;
  transform: translate(-50%, -50%);
  border: 0; pointer-events: none;
}
.banner-poster {
  position: absolute; inset: 0;
  z-index: 0;
}
.banner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 1;
}


/* Decorative lines — bottom-right */
.banner-deco {
  position: absolute;
  bottom: 24px; right: 24px;
  width: 360px; height: 360px;
  pointer-events: none;
  z-index: 2;
}
.banner-deco img { width: 100%; height: 100%; }
/* Decorative lines — top-left (rotated) */
.banner-deco-tl {
  position: absolute;
  bottom: 416px; left: -80px;
  width: 360px; height: 360px;
  pointer-events: none;
  z-index: 2;
  transform: rotate(180deg);
  opacity: .6;
}
.banner-deco-tl img { width: 100%; height: 100%; }
/* Back link */
.banner-back {
  position: absolute;
  top: 152px; left: var(--pp);
  z-index: 3;
  display: flex; align-items: center; gap: 10px;
  color: white;
  font-size: 14px; font-weight: 300;
  letter-spacing: .06em; text-transform: uppercase;
  transition: opacity var(--t), transform var(--t);
}
.banner-back:hover { opacity: .75; transform: translateX(-3px); }
.banner-back-ic {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--g03);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--t), border-color var(--t);
}
.banner-back:hover .banner-back-ic { background: rgba(255,255,255,.15); border-color: white; }
.banner-back-ic svg { width: 16px; height: 16px; color: white; }
/* Content */
.banner-cnt {
  position: absolute;
  bottom: 112px; left: var(--pp);
  max-width: 845px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 19px;
}
.banner-greeting {
  display: flex; align-items: center;
  gap: 16px; margin-bottom: 19px;
}
.banner-greeting-txt {
  font-size: 16px; font-weight: 700; color: white;
  letter-spacing: .08em; text-transform: uppercase;
  white-space: nowrap;
}
.banner-sair {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 16px;
  background: var(--ve); color: white;
  border-radius: var(--r);
  font-size: 14px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  transition: background var(--t), transform var(--t);
  cursor: pointer;
}
.banner-sair:hover { background: #700000; transform: translateY(-1px); }
.banner-tag {
  font-size: 16px;
  font-weight: 700;
  color: white;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: 0;
  animation: brkFu .6s .15s forwards;
}
.banner-ttl {
  font-size: 56px; font-weight: 700; color: white;
  line-height: 1.2;
  opacity: 0; transform: translateY(20px);
  animation: brkFu .7s .3s forwards;
}
@keyframes brkFu { to { opacity: 1; transform: translateY(0); } }

/* ── MATERIAIS SECTION ───────────────────────────────────────────────────────── */
#materiais { background: white; }

.mat-tag {
  font-size: 16px; font-weight: 700; color: var(--ve);
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 16px;
}
.mat-ttl {
  font-size: 40px; font-weight: 500; color: var(--preto);
  line-height: 1.2; margin-bottom: 16px;
}
.mat-sub {
  font-size: 16px; color: var(--g07); line-height: 1.6;
}

/* Pastas por empreendimento */
.mat-folders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.mat-folder {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border: 1px solid var(--g02); border-radius: var(--rl);
  background: white; text-align: left; cursor: pointer;
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
}
.mat-folder:hover { border-color: var(--ve); }
.mat-folder.active {
  border-color: var(--ve);
  background: #fffafa;
  box-shadow: 0 8px 24px rgba(153,0,0,.08);
}
.mat-folder__ic { width: 24px; height: 24px; flex-shrink: 0; color: var(--ve); }
.mat-folder__name {
  flex: 1; min-width: 0;
  font-size: 15px; font-weight: 500; color: var(--preto); line-height: 1.3;
  overflow-wrap: anywhere;
}
.mat-folder__count {
  flex-shrink: 0; min-width: 28px; padding: 2px 8px;
  border-radius: 999px; background: var(--g01);
  font-size: 13px; font-weight: 700; color: var(--g07); text-align: center;
}
.mat-folder.active .mat-folder__count { background: var(--ve); color: white; }

/* Stat cards */
.stat-cards {
  display: flex;
  gap: var(--gap);
  margin-bottom: 48px;
}
.stat-card {
  flex: 1; min-width: 0;
  background: var(--g01);
  border: 1px solid transparent;
  border-radius: var(--rl);
  padding: 24px;
  height: 157px;
  position: relative;
  text-align: left;
  cursor: pointer;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t), background var(--t);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.stat-card.active {
  border-color: var(--ve);
  background: #fffafa;
  box-shadow: 0 8px 24px rgba(153,0,0,.08);
}
.stat-ic { width: 32px; height: 32px; margin-bottom: 24px; }
.stat-ic img { width: 100%; height: 100%; object-fit: contain; }
.stat-num { font-size: 24px; font-weight: 500; color: var(--preto); line-height: 1.5; margin-bottom: 4px; }
.stat-lbl { font-size: 14px; color: var(--g07); line-height: 1.5; }

/* File list */
.file-list {
  display: flex; flex-direction: column;
  gap: 16px; margin-bottom: 48px;
}
.file-card[hidden] { display: none; }
.file-card {
  display: flex; align-items: center;
  gap: 24px; padding: 0 25px;
  height: 102px;
  border: 1px solid var(--g02);
  border-radius: var(--rl);
  transition: border-color var(--t), box-shadow var(--t);
}
.file-card:hover { border-color: var(--g03); box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.file-ic { width: 40px; height: 40px; flex-shrink: 0; }
.file-ic img { width: 100%; height: 100%; object-fit: contain; }
.file-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.file-name {
  font-size: 18px; font-weight: 500; color: var(--preto);
  line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.file-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--g07); line-height: 1.5;
}
.file-meta-sep { color: var(--g06); }
.btn-dl {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 24px; height: 45px;
  background: var(--ve); color: white;
  border-radius: var(--r);
  font-size: 14px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .04em;
  white-space: nowrap; flex-shrink: 0;
  transition: background var(--t), transform var(--t), box-shadow var(--t);
}
.btn-dl:hover { background: #700000; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(153,0,0,.3); }
.btn-dl svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-dl--disabled,
.btn-dl--disabled:hover {
  background: var(--g03);
  color: var(--g08);
  transform: none;
  box-shadow: none;
}
.materials-empty {
  padding: 24px;
  border: 1px solid var(--g02);
  border-radius: var(--rl);
  color: var(--g08);
  text-align: center;
  margin-bottom: 48px;
}

/* ── PAGINATION ──────────────────────────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
}
.pg-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--g03);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--preto);
  cursor: pointer;
  transition: background var(--t), border-color var(--t), color var(--t);
  background: transparent;
}
.pg-btn:hover { border-color: var(--ve); color: var(--ve); }
.pg-btn.active { background: var(--ve); border-color: var(--ve); color: white; font-weight: 700; }
.pg-btn.arrow { border: 1px solid var(--g03); }
.pg-btn.arrow:hover { background: var(--g01); border-color: var(--g03); color: var(--preto); }
.pg-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.pg-btn svg { width: 14px; height: 14px; }
.pg-ellipsis { font-size: 14px; color: var(--preto); padding: 0 4px; line-height: 32px; }

/* ── LOGIN FORM SECTION ──────────────────────────────────────────────────────── */
#login-section {
  background: white;
  padding: 72px 0;
}
.login-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 584px;
  margin: 0 auto;
}
.login-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.lform-fields {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}
.lform-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.lform-label {
  font-size: 14px;
  font-weight: 300;
  color: var(--g08);
  line-height: 1.4;
}
.lform-input-wrap {
  position: relative;
  width: 100%;
}
.lform-input {
  width: 100%;
  border: 1px solid var(--g02);
  border-radius: 4px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 500;
  color: var(--preto);
  background: white;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
  line-height: 1.4;
}
.lform-input::placeholder {
  color: var(--g06);
  font-weight: 400;
}
.lform-input:focus {
  border-color: var(--g06);
  box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}
.lform-input--pwd {
  padding-right: 48px;
}
.pwd-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--g06);
  transition: color var(--t);
  background: none;
  border: none;
}
.pwd-toggle:hover { color: var(--preto); }
.pwd-toggle svg { width: 20px; height: 20px; pointer-events: none; }
.pwd-eye-off { display: none; }
.lform-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}
/* Forgot password layout variant */
.lform-actions--col { flex-direction: column; align-items: stretch; gap: 16px; }
.lform-actions--col .btn-entrar { width: 100%; }
.lform-actions--col .lform-forgot { text-align: center; }

/* Forgot intro */
.forgot-ttl { font-size: 24px; font-weight: 700; color: var(--preto); margin-bottom: 12px; }
.forgot-sub { font-size: 15px; color: var(--g08); line-height: 1.6; margin-bottom: 24px; }

.lform-forgot {
  font-size: 14px;
  font-weight: 700;
  font-style: normal;
  color: var(--g08);
  line-height: 1.4;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-skip-ink: auto;
  text-decoration-thickness: auto;
  text-underline-offset: auto;
  text-underline-position: from-font;
  transition: color var(--t);
  white-space: nowrap;
  flex: 1;
}
.lform-forgot:hover { color: var(--preto); }
.btn-entrar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  height: 45px;
  background: var(--ve);
  color: white;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--t), transform var(--t), box-shadow var(--t);
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.btn-entrar:hover { background: #700000; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(153,0,0,.3); }
.lform-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}
.lform-divider-line {
  flex: 1;
  height: 1px;
  background: var(--g02);
}
.lform-divider-txt {
  font-size: 16px;
  color: var(--preto);
  font-weight: 400;
  white-space: nowrap;
}
.lform-no-account {
  font-size: 16px;
  color: var(--preto);
  font-weight: 400;
  text-align: center;
}
.btn-cadastre {
  display: flex;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  padding: 12px 40px;
  border: 1px solid var(--v);
  border-radius: var(--r);
  background: transparent;
  color: var(--preto);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  cursor: pointer;
  transition: background var(--t), color var(--t), border-color var(--t), transform var(--t);
}
.btn-cadastre:hover {
  background: var(--v);
  color: white;
  transform: translateY(-1px);
}

/* ── CADASTRO FORM SECTION ───────────────────────────────────────────────────── */
#cadastro { background: #fff; }
.form-wrap {
  max-width: 1216px;
  margin: 0 auto;
  padding: 72px 0;
}
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-label {
  font-size: 14px;
  font-weight: 300;
  color: var(--g08);
  line-height: 1.4;
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--g02);
  border-radius: 4px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 400;
  color: var(--preto);
  background: #fff;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
  appearance: none;
}
.form-input::placeholder { color: var(--g06); font-weight: 400; }
.form-input:focus { border-color: var(--v); box-shadow: 0 0 0 3px rgba(255,0,0,.12); }
/* Custom dropdown */
.form-dropdown { position: relative; }
.form-dropdown-trigger {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--g02);
  border-radius: 4px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 500;
  color: var(--preto);
  background: #fff;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: border-color var(--t), box-shadow var(--t);
  height: 49px;
}
.form-dropdown-trigger:focus,
.form-dropdown-trigger.open { border-color: var(--v); box-shadow: 0 0 0 3px rgba(255,0,0,.12); }
.form-dropdown-trigger img { width: 24px; height: 24px; flex-shrink: 0; transition: transform var(--t); }
.form-dropdown-trigger.open img { transform: rotate(180deg); }
.form-dropdown-trigger svg { width: 16px; height: 16px; flex-shrink: 0; transition: transform var(--t); }
.form-dropdown-trigger.open svg { transform: rotate(180deg); }
.form-dropdown-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid var(--g02);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  z-index: 50;
  overflow: hidden;
  display: none;
}
.form-dropdown-list.open { display: block; }
.form-dropdown-opt {
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 400;
  color: var(--preto);
  cursor: pointer;
  transition: background var(--t), color var(--t);
}
.form-dropdown-opt:hover { background: var(--g01); color: var(--ve); }
.form-dropdown-opt.selected { font-weight: 600; color: var(--ve); background: var(--g01); }
/* Footer row: checkbox + button */
.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin-top: 8px;
}
.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.form-check input[type=checkbox] {
  width: 20px; height: 20px;
  flex-shrink: 0;
  border: 1px solid var(--g02);
  border-radius: 2px;
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: border-color var(--t), background var(--t);
}
.form-check input[type=checkbox]:checked { background: var(--ve); border-color: var(--ve); }
.form-check input[type=checkbox]:checked::after {
  content: '';
  position: absolute;
  left: 5px; top: 2px;
  width: 8px; height: 13px;
  border: 2px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(45deg);
}
.form-check-lbl {
  font-size: 14px;
  font-weight: 300;
  color: var(--g08);
  line-height: 1.4;
  user-select: none;
}
.form-check-lbl a {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  color: var(--g08);
  transition: color var(--t);
}
.form-check-lbl a:hover { color: var(--ve); }
.btn-cadastrar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  height: 44px;
  background: var(--ve);
  color: white;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background var(--t), transform var(--t), box-shadow var(--t);
  border: none;
  font-family: inherit;
}
.btn-cadastrar:hover { background: #700000; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(153,0,0,.35); }

/* ── Validação ───────────────────────────────────────────────────────────────── */
.form-input.field--error,
.form-dropdown-trigger.field--error { border-color: var(--v) !important; box-shadow: 0 0 0 2px rgba(255,0,0,.12) !important; }
.error-msg { display: block; font-size: 12px; color: var(--v); font-weight: 500; margin-top: 4px; }
.form-privacy--error .form-check-lbl { color: var(--v); }
.form-privacy--error .error-msg { display: block; margin-top: 4px; }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .banner-ttl    { font-size: 42px; }
  .stat-cards    { flex-wrap: wrap; }
  .stat-card     { flex: 0 0 calc(50% - 16px); }
  .file-name     { white-space: normal; }
}
@media (max-width: 900px) {
  .banner-ttl    { font-size: 36px; }
  .file-card     { flex-wrap: wrap; height: auto; padding: 16px 20px; gap: 12px; }
  .btn-dl        { width: 100%; justify-content: center; }
}
@media (max-width: 640px) {
  .banner-ttl    { font-size: 28px; }
  .banner-deco   { display: none; }
  .stat-card     { flex: 0 0 100%; }
  .mat-ttl       { font-size: 28px; }
  .login-wrap    { padding: 0 4px; }
  .lform-actions { flex-direction: column-reverse; align-items: stretch; gap: 12px; }
  .btn-entrar    { width: 100%; }
  .lform-forgot  { text-align: center; }
  .form-grid-2   { grid-template-columns: 1fr; gap: 24px; }
  .form-footer   { flex-direction: column; align-items: stretch; gap: 16px; }
  .btn-cadastrar { width: 100%; justify-content: center; }
}
