/* ============================================================
   CALCULADORA DE TRABALHO EXTRAORDINÁRIO — MOÇAMBIQUE
   Folha de estilos isolada com prefixo .lex-calc
   ============================================================ */

.lex-calc, .lex-calc *, .lex-calc *::before, .lex-calc *::after { box-sizing: border-box; }
.lex-calc {
  --lex-navy: #0f1f3d;
  --lex-navy-2: #1a3055;
  --lex-gold: #c9a961;
  --lex-gold-soft: #f5e9cb;
  --lex-ink: #1a2332;
  --lex-ink-2: #4a5568;
  --lex-muted: #718096;
  --lex-line: #e2e8f0;
  --lex-line-2: #cbd5e0;
  --lex-surface: #ffffff;
  --lex-surface-2: #f7fafc;
  --lex-surface-3: #edf2f7;
  --lex-radius: 10px;
  --lex-radius-lg: 14px;
  --lex-success: #1a6e52;
  --lex-success-bg: #e6f4ef;
  --lex-warn: #9c4221;
  --lex-warn-bg: #fef2e6;
  --lex-info: #2c5282;
  --lex-info-bg: #e6f0fa;
  --lex-purple: #553c9a;
  --lex-purple-bg: #ede7f8;
  --lex-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --lex-font-serif: Georgia, "Times New Roman", "Palatino Linotype", Palatino, serif;

  max-width: 920px;
  margin: 2.5rem auto;
  font-family: var(--lex-font-sans);
  color: var(--lex-ink);
  line-height: 1.55;
  background: var(--lex-surface);
  border-radius: var(--lex-radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 31, 61, 0.04), 0 8px 24px rgba(15, 31, 61, 0.06);
  border: 1px solid var(--lex-line);
}
.lex-calc p { margin: 0; }
.lex-calc h1, .lex-calc h2, .lex-calc h3 { margin: 0; line-height: 1.3; }

.lex-calc .lex-hero {
  background: linear-gradient(135deg, var(--lex-navy) 0%, var(--lex-navy-2) 100%);
  color: #ffffff;
  padding: 2.25rem 2.25rem 2rem;
  position: relative;
  overflow: hidden;
}
.lex-calc .lex-hero::before {
  content: "";
  position: absolute;
  top: 0; right: 0; width: 220px; height: 220px;
  background: radial-gradient(circle at 70% 30%, rgba(201, 169, 97, 0.18) 0%, transparent 65%);
  pointer-events: none;
}
.lex-calc .lex-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--lex-gold) 0%, #e8d4a1 50%, var(--lex-gold) 100%);
}
.lex-calc .lex-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lex-gold);
  background: rgba(201, 169, 97, 0.12);
  border: 1px solid rgba(201, 169, 97, 0.3);
  padding: 5px 11px;
  border-radius: 20px;
  margin-bottom: 1rem;
}
.lex-calc .lex-hero-badge svg { width: 12px; height: 12px; }
.lex-calc .lex-hero h1 {
  font-family: var(--lex-font-serif);
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 0.4rem 0;
  color: #ffffff;
  letter-spacing: -0.01em;
}
.lex-calc .lex-hero p {
  margin: 0;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.75);
  max-width: 620px;
}
.lex-calc .lex-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.2rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}
.lex-calc .lex-hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.lex-calc .lex-hero-meta svg { width: 14px; height: 14px; opacity: 0.8; }

.lex-calc .lex-body { padding: 2rem 2.25rem; }
.lex-calc .lex-section { margin-bottom: 1.75rem; }
.lex-calc .lex-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lex-muted);
  margin: 0 0 0.9rem 0;
}
.lex-calc .lex-section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--lex-navy);
  color: var(--lex-gold);
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--lex-font-serif);
}

.lex-calc .lex-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.lex-calc .lex-field {
  position: relative;
  background: var(--lex-surface);
  border: 1px solid var(--lex-line);
  border-radius: var(--lex-radius);
  padding: 0.85rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lex-calc .lex-field:focus-within {
  border-color: var(--lex-navy-2);
  box-shadow: 0 0 0 3px rgba(15, 31, 61, 0.08);
}
.lex-calc .lex-field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--lex-muted);
  margin-bottom: 4px;
}
.lex-calc .lex-field-input-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.lex-calc .lex-field input[type="text"],
.lex-calc .lex-field input[type="number"] {
  flex: 1;
  width: 100%;
  border: none;
  background: transparent;
  padding: 2px 0;
  font-family: var(--lex-font-serif);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--lex-ink);
  outline: none;
  -moz-appearance: textfield;
}
.lex-calc .lex-field input::-webkit-outer-spin-button,
.lex-calc .lex-field input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.lex-calc .lex-field input::placeholder {
  color: var(--lex-line-2);
  font-style: italic;
  font-size: 1.1rem;
}
.lex-calc .lex-field-suffix {
  font-size: 0.8rem;
  color: var(--lex-muted);
  font-weight: 500;
}

.lex-calc .lex-hour-display {
  background: linear-gradient(135deg, var(--lex-surface-2) 0%, var(--lex-surface-3) 100%);
  border: 1px solid var(--lex-line);
  border-left: 3px solid var(--lex-gold);
  border-radius: var(--lex-radius);
  padding: 1.1rem 1.25rem;
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.lex-calc .lex-hour-display-label { flex: 1; min-width: 180px; }
.lex-calc .lex-hour-display-label strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--lex-ink);
  margin-bottom: 2px;
}
.lex-calc .lex-hour-display-label span {
  font-size: 0.78rem;
  color: var(--lex-muted);
  font-family: var(--lex-font-serif);
  font-style: italic;
}
.lex-calc .lex-hour-display-value {
  font-family: var(--lex-font-serif);
  font-size: 1.85rem;
  font-weight: 400;
  color: var(--lex-navy);
  letter-spacing: -0.01em;
  line-height: 1;
}

.lex-calc .lex-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 560px) {
  .lex-calc .lex-cards {
    grid-template-columns: 1fr;
  }
}
.lex-calc .lex-card {
  background: var(--lex-surface);
  border: 1px solid var(--lex-line);
  border-radius: var(--lex-radius);
  padding: 1.1rem 1.1rem 1rem;
  position: relative;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.lex-calc .lex-card:hover {
  border-color: var(--lex-line-2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 31, 61, 0.06);
}
.lex-calc .lex-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.lex-calc .lex-card-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lex-calc .lex-card-icon svg { width: 18px; height: 18px; }
.lex-calc .lex-card-mult {
  font-family: var(--lex-font-serif);
  font-size: 0.78rem;
  font-weight: 500;
  font-style: italic;
  color: var(--lex-muted);
  background: var(--lex-surface-2);
  padding: 3px 9px;
  border-radius: 12px;
}
.lex-calc .lex-card-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--lex-ink);
  margin: 0 0 2px 0;
}
.lex-calc .lex-card-sub {
  font-size: 0.78rem;
  color: var(--lex-muted);
  margin: 0 0 12px 0;
  line-height: 1.45;
  min-height: 34px;
}
.lex-calc .lex-card-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--lex-surface-2);
  border: 1px solid var(--lex-line);
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lex-calc .lex-card-input-row:focus-within {
  border-color: var(--lex-navy-2);
  background: var(--lex-surface);
  box-shadow: 0 0 0 3px rgba(15, 31, 61, 0.06);
}
.lex-calc .lex-card-input-row input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--lex-font-sans);
  font-size: 0.95rem;
  color: var(--lex-ink);
  padding: 2px 0;
  width: 100%;
  -moz-appearance: textfield;
}
.lex-calc .lex-card-input-row input::-webkit-outer-spin-button,
.lex-calc .lex-card-input-row input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.lex-calc .lex-card-input-row input::placeholder {
  color: var(--lex-line-2);
}
.lex-calc .lex-card-input-row span {
  font-size: 0.78rem;
  color: var(--lex-muted);
}
.lex-calc .lex-card-result {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--lex-line);
}
.lex-calc .lex-card-result-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--lex-muted);
  margin-bottom: 2px;
}
.lex-calc .lex-card-result-value {
  font-family: var(--lex-font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--lex-ink);
  line-height: 1.2;
}
.lex-calc .lex-card-ref {
  font-size: 0.7rem;
  color: var(--lex-muted);
  font-family: var(--lex-font-serif);
  font-style: italic;
  margin-top: 6px;
}

.lex-calc .lex-card.v-amber .lex-card-icon { background: var(--lex-warn-bg); color: var(--lex-warn); }
.lex-calc .lex-card.v-coral .lex-card-icon { background: #fde5e2; color: #9b2c2c; }
.lex-calc .lex-card.v-teal  .lex-card-icon { background: var(--lex-success-bg); color: var(--lex-success); }
.lex-calc .lex-card.v-purple .lex-card-icon { background: var(--lex-purple-bg); color: var(--lex-purple); }

.lex-calc .lex-summary {
  margin-top: 2rem;
  background: var(--lex-navy);
  border-radius: var(--lex-radius-lg);
  padding: 1.5rem 1.75rem;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}
.lex-calc .lex-summary::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; width: 4px;
  background: var(--lex-gold);
}
.lex-calc .lex-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.lex-calc .lex-summary-row:last-of-type { border-bottom: none; }
.lex-calc .lex-summary-row-label { display: flex; align-items: center; gap: 8px; }
.lex-calc .lex-summary-row-label::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--lex-gold);
  opacity: 0.5;
}
.lex-calc .lex-summary-row-value {
  font-family: var(--lex-font-serif);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.95rem;
}
.lex-calc .lex-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid rgba(201, 169, 97, 0.4);
}
.lex-calc .lex-summary-total-label {
  font-family: var(--lex-font-serif);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
}
.lex-calc .lex-summary-total-label small {
  display: block;
  font-family: var(--lex-font-sans);
  font-size: 0.72rem;
  font-style: normal;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.lex-calc .lex-summary-total-value {
  font-family: var(--lex-font-serif);
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--lex-gold);
  line-height: 1;
  letter-spacing: -0.01em;
}

.lex-calc .lex-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}
.lex-calc .lex-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  background: var(--lex-surface);
  border: 1px solid var(--lex-line-2);
  border-radius: 8px;
  color: var(--lex-ink);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--lex-font-sans);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.lex-calc .lex-btn:hover {
  background: var(--lex-surface-2);
  border-color: var(--lex-navy);
  color: var(--lex-navy);
}
.lex-calc .lex-btn:active { transform: translateY(1px); }
.lex-calc .lex-btn svg { width: 14px; height: 14px; }
.lex-calc .lex-btn.primary {
  background: var(--lex-navy);
  color: #ffffff;
  border-color: var(--lex-navy);
}
.lex-calc .lex-btn.primary:hover {
  background: var(--lex-navy-2);
  color: var(--lex-gold);
}

.lex-calc .lex-notes { margin-top: 1.5rem; }
.lex-calc details.lex-note {
  border: 1px solid var(--lex-line);
  border-radius: var(--lex-radius);
  margin-bottom: 8px;
  background: var(--lex-surface-2);
  overflow: hidden;
}
.lex-calc details.lex-note summary {
  cursor: pointer;
  padding: 0.85rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--lex-ink);
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
  transition: background 0.15s;
  list-style: none;
}
.lex-calc details.lex-note summary::-webkit-details-marker { display: none; }
.lex-calc details.lex-note summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--lex-navy);
  color: var(--lex-gold);
  font-size: 1.1rem;
  font-weight: 400;
  font-family: var(--lex-font-serif);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.lex-calc details.lex-note[open] summary::before { content: "\2212"; }
.lex-calc details.lex-note summary:hover { background: var(--lex-surface-3); }
.lex-calc details.lex-note[open] summary { border-bottom: 1px solid var(--lex-line); }
.lex-calc details.lex-note .lex-note-body {
  padding: 1rem 1.1rem 1.15rem;
  font-size: 0.85rem;
  color: var(--lex-ink-2);
  line-height: 1.65;
  background: var(--lex-surface);
}
.lex-calc details.lex-note .lex-note-body p { margin: 0 0 0.6rem 0; }
.lex-calc details.lex-note .lex-note-body p:last-child { margin-bottom: 0; }
.lex-calc details.lex-note .lex-note-body ul { margin: 0.3rem 0 0.5rem 0; padding-left: 1.25rem; }
.lex-calc details.lex-note .lex-note-body li { margin-bottom: 0.35rem; }
.lex-calc details.lex-note .lex-note-body strong { color: var(--lex-ink); font-weight: 600; }

.lex-calc .lex-footer {
  margin-top: 1.75rem;
  padding: 1.1rem 1.25rem;
  background: var(--lex-surface-2);
  border: 1px solid var(--lex-line);
  border-radius: var(--lex-radius);
  font-size: 0.78rem;
  color: var(--lex-ink-2);
  line-height: 1.6;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.lex-calc .lex-footer-icon {
  width: 32px; height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--lex-gold-soft);
  color: #7c5e20;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lex-calc .lex-footer-icon svg { width: 16px; height: 16px; }
.lex-calc .lex-footer strong { color: var(--lex-ink); font-weight: 600; }

.lex-calc .lex-diag {
  position: absolute;
  top: 12px; right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-family: var(--lex-font-sans);
  color: #d48b50;
  background: rgba(212, 139, 80, 0.12);
  border: 1px solid rgba(212, 139, 80, 0.3);
  padding: 3px 8px;
  border-radius: 12px;
  letter-spacing: 0.03em;
  z-index: 2;
}
.lex-calc .lex-diag::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #d48b50;
}
.lex-calc[data-lex-init="1"] .lex-diag {
  color: #5dcaa5;
  background: rgba(93, 202, 165, 0.12);
  border-color: rgba(93, 202, 165, 0.3);
}
.lex-calc[data-lex-init="1"] .lex-diag::before { background: #5dcaa5; }
.lex-calc[data-lex-init="1"] .lex-diag-text::before { content: "JS activo"; }
.lex-calc .lex-diag-text::before { content: "JS inactivo"; }

.lex-calc .lex-brand {
  text-align: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--lex-line);
  font-size: 0.72rem;
  color: var(--lex-muted);
  font-family: var(--lex-font-serif);
  font-style: italic;
  letter-spacing: 0.03em;
}

@media (max-width: 640px) {
  .lex-calc { margin: 1rem; border-radius: var(--lex-radius); }
  .lex-calc .lex-hero { padding: 1.75rem 1.4rem 1.5rem; }
  .lex-calc .lex-hero h1 { font-size: 1.4rem; }
  .lex-calc .lex-body { padding: 1.5rem 1.4rem; }
  .lex-calc .lex-summary { padding: 1.25rem 1.4rem; }
  .lex-calc .lex-summary-total-value { font-size: 1.75rem; }
  .lex-calc .lex-hour-display-value { font-size: 1.5rem; }
}
