/* ══════════════════════════════════════
   screens.css — Estilos por tela
   Grupo Comber — Portal de Gestão
══════════════════════════════════════ */

/* ── LOGIN ── */
#screen-login { min-height: 100vh; display: flex; align-items: stretch; }
.login-left {
  flex: 1; background: var(--bg);
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  padding: 48px; position: relative; overflow: hidden;
}
.login-left::before {
  content: ''; position: absolute;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(200,153,42,.1) 0%, transparent 70%);
  top: -100px; left: -100px;
}
.login-left::after {
  content: ''; position: absolute;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(16,52,81,.4) 0%, transparent 70%);
  bottom: -80px; right: -80px;
}
.brand-area    { text-align: center; z-index: 1; }
.brand-logo {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 20px; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px; font-family: 'Montserrat', sans-serif;
  font-size: 28px; font-weight: 800; color: #0a2238;
  box-shadow: 0 8px 32px rgba(200,153,42,.3);
}
.brand-name    { font-family: 'Montserrat', sans-serif; font-size: 28px; font-weight: 700; letter-spacing: -.5px; }
.brand-sub     { font-size: 13px; color: var(--text2); margin-top: 6px; letter-spacing: 2px; text-transform: uppercase; }
.login-divider { width: 40px; height: 2px; background: linear-gradient(90deg, var(--gold), transparent); margin: 28px auto; }
.login-tagline { font-size: 14px; color: var(--text2); text-align: center; max-width: 220px; line-height: 1.6; }
.login-right {
  width: 420px; background: var(--bg2);
  display: flex; flex-direction: column;
  justify-content: center; padding: 56px 48px; position: relative;
}
.login-right::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
}
.login-title    { font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.login-desc     { font-size: 14px; color: var(--text2); margin-bottom: 36px; }
.remember-row   { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.remember-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--gold); cursor: pointer; }
.remember-row label { font-size: 13px; color: var(--text2); cursor: pointer; }
.btn-login {
  width: 100%; background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border: none; border-radius: 10px; padding: 16px;
  color: #0a2238; font-family: 'Montserrat', sans-serif;
  font-size: 15px; font-weight: 700; letter-spacing: .5px;
  cursor: pointer; transition: transform .15s, box-shadow .15s, opacity .15s;
  box-shadow: 0 4px 20px rgba(200,153,42,.25);
}
.btn-login:hover  { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(200,153,42,.35); }
.btn-login.loading { opacity: .7; pointer-events: none; }
.login-error {
  margin-top: 16px; padding: 12px 16px;
  background: rgba(220,60,60,.1); border: 1px solid rgba(220,60,60,.25);
  border-radius: 8px; font-size: 13px; color: #e05a5a; display: none;
}
@media (max-width: 700px) {
  #screen-login  { flex-direction: column; }
  .login-left    { padding: 40px 24px 32px; flex: none; }
  .login-right   { width: 100%; padding: 36px 24px 48px; }
  .login-right::before { width: 100%; height: 2px; top: 0; left: 0; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
}

/* ── HOME ── */
#screen-app      { display: none; flex-direction: column; min-height: 100vh; }
.app-content     { flex: 1; padding: 20px 16px 90px; max-width: 680px; margin: 0 auto; width: 100%; }
.greeting        { margin-bottom: 24px; }
.greeting-hello  { font-size: 12px; color: var(--text2); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.greeting-name   { font-family: 'Montserrat', sans-serif; font-size: 22px; font-weight: 700; }
.greeting-role   { font-size: 13px; color: var(--gold-light); margin-top: 3px; }
.menu-grid       { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.menu-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px; cursor: pointer;
  transition: transform .18s, border-color .18s, box-shadow .18s;
  position: relative; overflow: hidden;
}
.menu-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: 0; transition: opacity .2s;
}
.menu-card:hover  { transform: translateY(-2px); border-color: rgba(200,153,42,.3); box-shadow: 0 6px 20px var(--shadow); }
.menu-card:hover::before { opacity: 1; }
.menu-card:active { transform: translateY(0); }
.menu-icon        { width: 48px; height: 48px; border-radius: 13px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; color: #fff; flex-shrink: 0; }
.menu-icon svg    { width: 22px; height: 22px; }
.icon-bg-blue     { background: #1e509e; }
.icon-bg-gold     { background: #8a6200; }
.icon-bg-green    { background: #1a6b45; }
.icon-bg-red      { background: #b02a2a; }
.icon-bg-purple   { background: #5e3499; }
.menu-card-title  { font-family: 'Montserrat', sans-serif; font-size: 12px; font-weight: 700; margin-bottom: 3px; }
.menu-card-desc   { font-size: 11px; color: var(--text2); line-height: 1.4; }
.menu-badge       { position: absolute; top: 10px; right: 10px; background: var(--gold); color: #0a2238; font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 20px; }
.menu-card--disabled {
  opacity: .4; pointer-events: none; cursor: default;
}
.menu-card--disabled::after {
  content: 'Em breve'; position: absolute; top: 8px; right: 8px;
  font-size: 9px; font-weight: 700; letter-spacing: .3px;
  background: var(--bg3); color: var(--text2);
  padding: 2px 7px; border-radius: 20px;
  border: 1px solid var(--border);
}
.pending-list     { display: flex; flex-direction: column; gap: 8px; }
.pending-item {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; transition: border-color .2s;
}
.pending-item:hover { border-color: rgba(200,153,42,.25); }
.pending-dot        { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.pending-dot.yellow { background: var(--gold); }
.pending-dot.green  { background: var(--green); }
.pending-dot.red    { background: var(--red); }
.pending-info       { flex: 1; }
.pending-type       { font-size: 13px; font-weight: 500; margin-bottom: 2px; }
.pending-meta       { font-size: 11px; color: var(--text2); }
.pending-value      { font-family: 'Montserrat', sans-serif; font-size: 12px; font-weight: 700; color: var(--gold-light); white-space: nowrap; }

/* ── SOLICITAÇÕES ── */
#screen-requests  { display: none; flex-direction: column; min-height: 100vh; }
.requests-content { flex: 1; padding: 20px 16px 90px; max-width: 680px; margin: 0 auto; width: 100%; }
.filter-tabs      { display: flex; gap: 8px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 4px; }
.filter-tab {
  padding: 7px 16px; border-radius: 20px; font-size: 12px;
  font-weight: 500; border: 1.5px solid var(--border);
  background: var(--bg2); color: var(--text2);
  cursor: pointer; white-space: nowrap; flex-shrink: 0; transition: all .2s;
}
.filter-tab.active { background: var(--gold); color: #0a2238; border-color: var(--gold); font-weight: 700; }
.req-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px; margin-bottom: 10px;
  cursor: pointer; transition: border-color .2s, box-shadow .2s;
}
.req-card:hover  { border-color: rgba(200,153,42,.25); box-shadow: 0 4px 14px var(--shadow); }
.req-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.req-card-title  { font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 700; }
.req-status      { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; flex-shrink: 0; }
.req-status.pending  { background: rgba(200,153,42,.15); color: var(--gold); }
.req-status.approved { background: rgba(76,175,138,.15); color: var(--green); }
.req-status.rejected { background: rgba(224,90,90,.15); color: var(--red); }
.req-meta        { font-size: 11px; color: var(--text2); display: flex; gap: 12px; flex-wrap: wrap; }

/* ── NOTIFICAÇÕES ── */
#screen-notifications { display: none; flex-direction: column; min-height: 100vh; }
.notif-content  { flex: 1; padding: 20px 16px 90px; max-width: 680px; margin: 0 auto; width: 100%; }
.notif-item {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px; margin-bottom: 10px; display: flex; gap: 12px;
}
.notif-item.unread  { border-color: rgba(200,153,42,.3); background: rgba(200,153,42,.04); }
.notif-dot          { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex-shrink: 0; margin-top: 5px; }
.notif-dot.read     { background: var(--border2); }
.notif-body         { flex: 1; }
.notif-title        { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.notif-desc         { font-size: 12px; color: var(--text2); line-height: 1.5; }
.notif-time         { font-size: 11px; color: var(--text2); margin-top: 4px; }

/* ── PERFIL ── */
#screen-profile  { display: none; flex-direction: column; min-height: 100vh; }
.profile-content { flex: 1; padding: 20px 16px 90px; max-width: 680px; margin: 0 auto; width: 100%; }
.profile-card    { background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 28px; text-align: center; margin-bottom: 20px; }
.profile-avatar-big {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--navy), #1a4a6e);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: 'Montserrat', sans-serif; font-size: 28px; font-weight: 700;
  color: var(--gold-light); margin: 0 auto 14px;
  border: 3px solid rgba(200,153,42,.3);
}
.profile-name         { font-family: 'Montserrat', sans-serif; font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.profile-role         { font-size: 13px; color: var(--gold-light); margin-bottom: 4px; }
.profile-email        { font-size: 12px; color: var(--text2); }
.profile-section-title { font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--text2); margin: 20px 0 10px; }
.profile-menu         { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.profile-menu-item    { display: flex; align-items: center; gap: 14px; padding: 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s; }
.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-item:hover      { background: var(--bg3); }
.profile-menu-icon    { font-size: 20px; width: 32px; text-align: center; flex-shrink: 0; }
.profile-menu-label   { flex: 1; font-size: 14px; font-weight: 500; }
.profile-menu-arrow   { color: var(--text2); font-size: 16px; }
.theme-toggle-row     { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.theme-toggle-label   { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.toggle-switch        { position: relative; width: 44px; height: 24px; }
.toggle-switch input  { opacity: 0; width: 0; height: 0; }
.toggle-slider        { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: var(--border2); border-radius: 24px; cursor: pointer; transition: background .3s; }
.toggle-slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .3s; }
.toggle-switch input:checked + .toggle-slider { background: var(--gold); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── FORM SCREEN ── */
#screen-form  { display: none; flex-direction: column; min-height: 100vh; }
.form-content { flex: 1; padding: 20px 16px 90px; max-width: 680px; margin: 0 auto; width: 100%; }
.form-header  { margin-bottom: 20px; }
.form-icon    { margin-bottom: 12px; color: var(--gold); }
.form-icon svg { width: 38px; height: 38px; }
.form-title   { font-family: 'Montserrat', sans-serif; font-size: 20px; font-weight: 700; margin-bottom: 5px; }
.form-subtitle { font-size: 13px; color: var(--text2); line-height: 1.5; }

/* ── OVERLAY OFFLINE ── */
.offline-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: #0a2238;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 20px; padding: 32px; text-align: center;
}
.offline-logo  { width: 160px; margin-bottom: 8px; }
.offline-title { font-family: 'Montserrat', sans-serif; font-size: 22px; font-weight: 700; color: #f5f7fa; }
.offline-desc  { font-size: 14px; color: #8a9ab0; max-width: 280px; line-height: 1.6; }
.offline-btn   {
  margin-top: 8px; background: #c8992a; border: none; border-radius: 10px;
  padding: 14px 32px; color: #0a2238; font-family: 'Montserrat', sans-serif;
  font-size: 14px; font-weight: 700; cursor: pointer; transition: opacity .2s;
}
.offline-btn:hover { opacity: .85; }

/* ── LOGOS ── */
.topbar-logo-wrap { display: flex; align-items: center; }
.topbar-logo-img  { height: 30px; width: auto; object-fit: contain; }
[data-theme="light"] .topbar-logo-img { filter: brightness(0); }
.brand-logo-img   { width: 80px; height: 80px; object-fit: contain; margin: 0 auto 24px; display: block; }

/* ── HISTÓRICO POR FORMULÁRIO ── */
.form-history-section {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.form-history-header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 16px;
}
.form-history-title {
  font-size: 10px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase; color: var(--text2);
}
.form-history-badge {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 20px; padding: 2px 10px;
  font-size: 11px; font-weight: 700; color: var(--text2);
}
.history-empty-state {
  display: flex; flex-direction: column;
  align-items: center; padding: 32px 0; gap: 8px;
}
.history-empty-icon { font-size: 32px; opacity: .35; }
.history-empty-text { font-size: 13px; color: var(--text2); }
.history-item {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px; margin-bottom: 8px;
  cursor: pointer; transition: border-color .2s, box-shadow .2s;
}
.history-item:hover { border-color: rgba(200,153,42,.25); box-shadow: 0 4px 14px var(--shadow); }
.history-item-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.history-item-id  { font-family: 'Montserrat', sans-serif; font-size: 12px; font-weight: 700; }
.history-item-meta { font-size: 11px; color: var(--text2); display: flex; gap: 10px; flex-wrap: wrap; }
.history-item { display: flex; align-items: center; justify-content: space-between; }
.history-item-num  { font-size: 13px; font-weight: 700; }
.history-item-date { font-size: 11px; color: var(--text2); margin-top: 3px; }

/* ── STATUS BADGES ── */
.status-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; padding: 4px 10px;
  border-radius: 20px; flex-shrink: 0; white-space: nowrap;
}
.status-enviado    { background: rgba(91,155,213,.15);  color: var(--blue);   }
.status-em_analise { background: rgba(200,153,42,.15);  color: var(--gold);   }
.status-aprovado   { background: rgba(76,175,138,.15);  color: var(--green);  }
.status-recusado   { background: rgba(224,90,90,.15);   color: var(--red);    }
