/* Cadastro e edição compartilham a mesma apresentação e controles originais. */
#empresaModal .empresa-form-modal,
#editModal .empresa-form-modal {
  width:min(980px,calc(100vw - 32px));
  max-width:none;
  max-height:calc(100dvh - 32px);
  padding:28px;
  border-radius:22px;
  overflow:auto;
  color:var(--ink);
  background:var(--surface);
}
.empresa-form-header {
  display:flex;
  align-items:center;
  gap:20px;
  padding-bottom:22px;
  margin-bottom:22px;
  border-bottom:1px solid var(--line);
}
.empresa-form-header h2 {
  margin:0 0 4px;
  font-size:27px;
  line-height:1.2;
  font-weight:800;
  color:var(--navy);
}
.empresa-form-header p {margin:0;font-size:13px;color:var(--muted);line-height:1.5}
.empresa-form-mark {
  width:66px;height:66px;flex:0 0 66px;
  border-radius:19px;
  display:grid;place-items:center;
  color:#fff;
  background:linear-gradient(145deg,#3a74ff,#6742f5);
  box-shadow:0 6px 16px rgba(70,75,215,.18);
  position:relative;
}
.empresa-form-mark .app-fa {font-size:29px}
.empresa-form-mark::after {
  content:"";position:absolute;bottom:-12px;left:0;right:0;height:3px;
  border-radius:3px;background:linear-gradient(90deg,#0eafd2,#7843ee);
}
.empresa-fields-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px 22px}
.empresa-field {min-width:0;--field-accent:var(--blue)}
.empresa-field.tone-green {--field-accent:var(--green)}
.empresa-field.tone-violet {--field-accent:var(--violet)}
.empresa-field.tone-teal {--field-accent:var(--teal)}
.empresa-field.tone-amber {--field-accent:var(--amber)}
.empresa-field.tone-red {--field-accent:var(--red)}
.empresa-field-full {grid-column:1/-1}
.empresa-field-double {grid-column:span 2}
#empresaModal .empresa-field label,
#editModal .empresa-field label {
  display:flex;align-items:center;gap:9px;
  min-height:24px;margin:0 0 9px;
  color:var(--navy);font-size:11px;font-weight:750;
  text-transform:uppercase;letter-spacing:.1px;
}
.empresa-field label .app-fa {color:var(--field-accent);width:22px;flex:0 0 22px;font-size:20px;text-align:center}
.empresa-input-wrap {position:relative}
.empresa-input-wrap > .app-fa {
  position:absolute;top:50%;left:14px;transform:translateY(-50%);
  font-size:15px;color:var(--muted);pointer-events:none;
  width:18px;text-align:center;
}
#empresaModal .empresa-input-wrap input,
#editModal .empresa-input-wrap input {
  width:100%;height:44px;margin:0;padding:10px 12px 10px 42px;
  border:1px solid var(--line);border-radius:10px;
  font-size:13px;line-height:1.3;color:var(--ink);background:transparent;
  transition:border-color .18s,box-shadow .18s;
}
#empresaModal .empresa-input-wrap input:focus,
#editModal .empresa-input-wrap input:focus {
  outline:none;border-color:var(--blue);box-shadow:0 0 0 3px rgba(52,87,230,.10);
}
#empresaModal .empresa-input-wrap input::placeholder,
#editModal .empresa-input-wrap input::placeholder {color:var(--muted);opacity:.85}
.empresa-form-actions {margin-top:24px;padding-top:20px;border-top:1px solid var(--line);gap:12px}
.empresa-form-actions .btn {min-width:124px;justify-content:center;font-size:13px;padding:11px 20px;border-radius:11px}
.empresa-delete-action {text-align:right;margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
.empresa-delete-action .btn-red {background:transparent;color:var(--red);border:1px solid currentColor;font-size:12px;padding:9px 14px;border-radius:9px}
body.dark-mode .empresa-field.tone-blue {--field-accent:#78b8ff}
body.dark-mode .empresa-field.tone-green {--field-accent:#64d5a0}
body.dark-mode .empresa-field.tone-violet {--field-accent:#bea0ff}
body.dark-mode .empresa-field.tone-teal {--field-accent:#60d3e3}
body.dark-mode .empresa-field.tone-amber {--field-accent:#f6cb6b}
body.dark-mode .empresa-field.tone-red {--field-accent:#ff919a}
body.dark-mode .empresa-delete-action .btn-red {color:#ff919a}
@media(max-height:760px) and (min-width:741px) {
  #empresaModal .empresa-form-modal,#editModal .empresa-form-modal {padding:22px}
  .empresa-form-header {padding-bottom:18px;margin-bottom:18px}
  .empresa-fields-grid {gap:15px 20px}
  .empresa-form-actions {margin-top:20px;padding-top:16px}
}
@media(max-width:740px) {
  .empresa-fields-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  .empresa-field-double {grid-column:1/-1}
  #empresaModal .empresa-form-modal,#editModal .empresa-form-modal {padding:20px}
  .empresa-form-header {gap:14px}
  .empresa-form-header h2 {font-size:23px}
}
@media(max-width:480px) {
  .empresa-fields-grid {grid-template-columns:minmax(0,1fr);gap:16px}
  .empresa-field-full,.empresa-field-double {grid-column:auto}
  .empresa-form-mark {width:48px;height:48px;flex-basis:48px;border-radius:14px}
  .empresa-form-mark .app-fa {font-size:23px}
  .empresa-form-header p {font-size:12px}
  .empresa-form-actions .btn {min-width:0;flex:1}
}
