:root {
  --cae-premium-navy:#071a33;
  --cae-premium-blue:#123e72;
  --cae-premium-cyan:#12a9c7;
  --cae-premium-red:#e31937;
  --cae-premium-ink:#10233f;
  --cae-premium-muted:#667892;
  --cae-premium-line:#dce5f0;
  --cae-premium-surface:#f4f7fb;
}

body.cae-login-active {
  min-height:100vh;
  background:
    radial-gradient(circle at 82% 12%, rgba(18,169,199,.16), transparent 31rem),
    linear-gradient(135deg, #edf3fa 0%, #f8fafc 48%, #e9f2f7 100%);
}

body.cae-login-active > header {
  position:relative;
  z-index:2;
  border-bottom:1px solid rgba(255,255,255,.14);
  background:linear-gradient(105deg, #071a33 0%, #123e72 62%, #087f92 100%);
  box-shadow:0 12px 28px rgba(7,26,51,.18);
}

.cae-static-brand-fallback {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:82px;
  height:42px;
  padding:0 12px;
  border:1px solid rgba(255,255,255,.28);
  border-radius:10px;
  color:#fff;
  background:rgba(255,255,255,.1);
  font-weight:800;
  letter-spacing:.08em;
}

body.cae-login-active #headerCompanyLogo:not([src]),
body.cae-login-active #headerCompanyLogo[src=""] {
  display:none;
}

#loginPanel.cae-login-premium-static {
  display:grid;
  grid-template-columns:minmax(310px,.9fr) minmax(390px,1.1fr);
  width:min(1080px, calc(100% - 36px));
  min-height:530px;
  margin:46px auto;
  padding:0;
  overflow:hidden;
  border:0;
  border-radius:26px;
  background:#fff;
  box-shadow:0 28px 74px rgba(7,26,51,.18);
}

.cae-login-brand {
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding:48px 44px;
  overflow:hidden;
  color:#fff;
  background:linear-gradient(145deg, #071a33 0%, #123e72 63%, #087f92 100%);
}

.cae-login-brand::before,
.cae-login-brand::after {
  content:"";
  position:absolute;
  border:1px solid rgba(255,255,255,.14);
  border-radius:50%;
}

.cae-login-brand::before {
  width:340px;
  height:340px;
  right:-175px;
  top:-150px;
}

.cae-login-brand::after {
  width:220px;
  height:220px;
  left:-120px;
  bottom:-90px;
}

.cae-login-brand > * { position:relative; z-index:1; }

.cae-login-wordmark {
  display:flex;
  align-items:center;
  gap:14px;
  font-weight:900;
  letter-spacing:.08em;
}

.cae-login-mark {
  display:grid;
  place-items:center;
  width:52px;
  height:52px;
  border-radius:15px;
  background:linear-gradient(135deg, #fff, #d8f7fb);
  color:var(--cae-premium-blue);
  font-size:15px;
  box-shadow:0 12px 30px rgba(0,0,0,.16);
}

.cae-login-kicker {
  margin:0 0 12px;
  color:#7de8f3;
  font-size:12px;
  font-weight:800;
  letter-spacing:.18em;
  text-transform:uppercase;
}

.cae-login-brand h2 {
  max-width:430px;
  margin:0;
  color:#fff;
  font-size:clamp(32px, 4vw, 48px);
  line-height:1.06;
}

.cae-login-brand p {
  max-width:430px;
  margin:20px 0 0;
  color:#d7e8fb;
  font-size:16px;
  line-height:1.65;
}

.cae-login-trust {
  display:grid;
  gap:9px;
  color:#c9dff4;
  font-size:13px;
}

.cae-login-trust span::before {
  content:"✓";
  margin-right:8px;
  color:#72e2c5;
  font-weight:900;
}

.cae-login-form {
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:54px 58px;
}

.cae-login-form h2 {
  margin:0 0 8px;
  color:var(--cae-premium-ink);
  font-size:30px;
}

.cae-login-form > p {
  margin:0 0 32px;
  color:var(--cae-premium-muted);
  line-height:1.6;
}

.cae-login-fields {
  display:grid;
  gap:19px;
}

.cae-login-fields label {
  display:grid;
  gap:8px;
  color:var(--cae-premium-ink);
  font-weight:700;
}

.cae-login-fields select,
.cae-login-fields input {
  width:100%;
  min-height:50px;
  padding:0 15px;
  border:1px solid #cbd7e7;
  border-radius:11px;
  background:#fff;
  color:var(--cae-premium-ink);
  font:inherit;
  box-sizing:border-box;
}

.cae-login-fields select:focus,
.cae-login-fields input:focus {
  outline:3px solid rgba(18,169,199,.18);
  border-color:var(--cae-premium-cyan);
}

#loginPanel #loginBtn {
  width:100%;
  min-height:52px;
  margin-top:24px;
  border:0;
  border-radius:11px;
  background:linear-gradient(105deg, var(--cae-premium-blue), #087f92);
  color:#fff;
  font-weight:800;
  box-shadow:0 13px 26px rgba(18,62,114,.2);
}

.cae-login-security {
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin-top:24px;
  padding:14px 15px;
  border:1px solid #d8e9e5;
  border-radius:11px;
  background:#f1fbf8;
  color:#315c55;
  font-size:13px;
  line-height:1.5;
}

.cae-login-security strong { color:#176c5b; }

.cae-rehire-modal {
  position:fixed;
  inset:0;
  z-index:12000;
  display:grid;
  place-items:center;
  padding:20px;
  background:rgba(4,18,35,.7);
  backdrop-filter:blur(4px);
}

.cae-rehire-modal[hidden] { display:none !important; }

.cae-rehire-card {
  width:min(620px, 100%);
  max-height:calc(100vh - 40px);
  overflow:auto;
  border-radius:20px;
  background:#fff;
  box-shadow:0 30px 85px rgba(0,0,0,.3);
}

.cae-rehire-header {
  padding:24px 26px 20px;
  border-bottom:1px solid var(--cae-premium-line);
  background:linear-gradient(120deg, #f7fbff, #eef8f9);
}

.cae-rehire-header h3 {
  margin:0 0 7px;
  color:var(--cae-premium-ink);
  font-size:23px;
}

.cae-rehire-header p {
  margin:0;
  color:var(--cae-premium-muted);
  line-height:1.55;
}

.cae-rehire-body {
  display:grid;
  gap:17px;
  padding:24px 26px;
}

.cae-rehire-body label {
  display:grid;
  gap:7px;
  color:var(--cae-premium-ink);
  font-weight:700;
}

.cae-rehire-body select,
.cae-rehire-body input[type="date"],
.cae-rehire-body textarea {
  width:100%;
  padding:11px 12px;
  border:1px solid #cbd7e7;
  border-radius:9px;
  background:#fff;
  font:inherit;
  box-sizing:border-box;
}

.cae-rehire-body textarea { min-height:92px; resize:vertical; }

.cae-rehire-confirm {
  display:flex !important;
  grid-template-columns:none !important;
  align-items:flex-start;
  gap:10px !important;
  padding:13px;
  border:1px solid #eadcba;
  border-radius:9px;
  background:#fffaf0;
  font-weight:600 !important;
  line-height:1.45;
}

.cae-rehire-actions {
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding:18px 26px 24px;
  border-top:1px solid var(--cae-premium-line);
}

.cae-rehire-context {
  padding:12px 13px;
  border-left:4px solid var(--cae-premium-cyan);
  border-radius:8px;
  background:#f3f8fc;
  color:#40546d;
  font-size:13px;
  line-height:1.5;
}

#registerWorkerRehire {
  background:linear-gradient(105deg, #123e72, #087f92);
  color:#fff;
}

#processWorkflowCards .card {
  border-top:4px solid #94a3b8;
  min-height:118px;
}

#processWorkflowCards .card p {
  margin:8px 0 5px;
  font-weight:900;
  color:#475569;
}

#processWorkflowCards .card p[data-status="APROBADO"] {
  color:#047857;
}

#processWorkflowCards .card:has(p[data-status="APROBADO"]) {
  border-top-color:#10b981;
  background:#f0fdf4;
}

#processWorkflowCards .card:has(p[data-status="EN REVISIÓN"]) {
  border-top-color:#2563eb;
  background:#eff6ff;
}

#processWorkflowCards .card:has(p[data-status="OBSERVADO"]),
#processWorkflowCards .card:has(p[data-status="REQUIERE CORRECCIÓN"]) {
  border-top-color:#b91c1c;
  background:#fef2f2;
}

@media (max-width:820px) {
  #loginPanel.cae-login-premium-static {
    grid-template-columns:1fr;
    margin:20px auto;
  }
  .cae-login-brand { min-height:300px; padding:36px 30px; }
  .cae-login-form { padding:38px 30px; }
}
