:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --wine: #28643c;
  --wine-dark: #1c4c2c;
  --wine-soft: #edf6e9;
  --ink: #183423;
  --muted: #68756a;
  --line: #dce7d8;
  --paper: #fff;
  --canvas: #f5f8f2;
  --green: #28643c;
  --amber: #9a5c00;
  --red: #a32632;
  --dla-red: #e30613;
  --dla-black: #121417;
  background: var(--canvas);
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
a { color: var(--wine); text-decoration: none; }
a:hover { color: var(--wine-dark); }
button, input, select, textarea { font: inherit; }
button:disabled { cursor: not-allowed; opacity: .5; }

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  align-items: center;
  min-height: 78px;
  padding: 0 clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 30px rgba(20, 28, 22, .07);
  backdrop-filter: blur(12px);
}

.product-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.product-brand:hover { color: var(--ink); }
.product-brand img { display: block; width: 46px; height: 46px; object-fit: contain; }
.product-brand span { display: grid; line-height: 1; }
.product-brand strong { font-size: 1.12rem; letter-spacing: -.025em; }
.product-brand small { margin-top: 5px; color: #68a033; font-size: .64rem; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.enterprise-brand { display: flex; align-items: center; gap: 10px; margin-left: 20px; padding-left: 20px; border-left: 1px solid var(--line); }
.enterprise-brand span { color: #8a928c; font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.enterprise-brand img { display: block; width: 128px; height: 48px; object-fit: contain; }
.topbar nav { display: flex; justify-content: center; gap: clamp(12px, 2vw, 28px); }
.topbar nav a { color: #526257; font-size: .92rem; font-weight: 700; }
.topbar nav a:hover { color: var(--wine); }
.userbox { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .86rem; }
.userbox > span { display: grid; gap: 2px; }
.userbox > span small { color: var(--muted); font-size: .74rem; }
.userbox form { margin: 0; }
.link-button { border: 0; background: transparent; color: var(--wine); cursor: pointer; padding: 0; font-weight: 800; }
.period-selector { margin: 0 18px 0 0; }
.period-selector label { gap: 3px; color: var(--muted); font-size: .7rem; }
.period-selector select { min-width: 210px; min-height: 38px; padding: 7px 10px; font-size: .82rem; }

.page { width: min(1440px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0 70px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-heading h1 { margin: 4px 0 0; font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1; letter-spacing: -.045em; }
.eyebrow { margin: 0; color: var(--wine); font-size: .76rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.muted { margin: 10px 0 0; color: var(--muted); }
.back { display: inline-block; margin-bottom: 18px; font-weight: 800; }
.dla-principle {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: -8px 0 26px;
  padding: 15px 18px;
  border-left: 3px solid var(--dla-red);
  border-radius: 0 12px 12px 0;
  background: rgba(255,255,255,.7);
  color: var(--dla-black);
}
.dla-principle span {
  flex: 0 0 auto;
  color: var(--dla-red);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.dla-principle strong { font-size: .9rem; font-weight: 750; }

.panel {
  padding: clamp(20px, 2.5vw, 32px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 12px 35px rgba(31, 75, 43, .05);
}
.panel h2 { margin: 0 0 22px; font-size: 1.15rem; letter-spacing: -.015em; }
.panel.compact { padding: 20px; }
.panel.compact span, .identity-grid > div span { display: block; margin-bottom: 8px; color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; }
.panel.compact strong, .identity-grid > div strong { display: block; }
.panel.compact small, .identity-grid > div small { display: block; margin-top: 6px; color: var(--muted); }
.top-gap { margin-top: 24px; }

.metric-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 24px; }
.metric-grid article { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.metric-grid span { display: block; min-height: 2.4em; color: var(--muted); font-size: .84rem; font-weight: 700; }
.metric-grid strong { display: block; margin-top: 8px; font-size: 2.15rem; letter-spacing: -.05em; }
.two-column, .split-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.panel-heading a { font-size: .86rem; font-weight: 800; }

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 850;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--wine); color: #fff; box-shadow: 0 8px 20px rgba(40, 100, 60, .18); }
.button.primary:hover { background: var(--wine-dark); color: #fff; }
.button.secondary { border-color: #c9ddc3; background: var(--wine-soft); color: var(--wine); }
.button.ghost { border-color: var(--line); background: #fff; color: var(--ink); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .span-two { grid-column: span 2; }
.stack { display: grid; gap: 18px; }
.section-stack { display: grid; gap: 20px; }
label { display: grid; align-content: start; gap: 8px; color: #4f4144; font-size: .84rem; font-weight: 800; }
label small, .hint { color: var(--muted); font-size: .78rem; font-weight: 500; line-height: 1.55; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cfddcb;
  border-radius: 9px;
  outline: none;
  background: #fff;
  color: var(--ink);
}
textarea { resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--wine); box-shadow: 0 0 0 3px rgba(40, 100, 60, .1); }
input[readonly] { background: #f0f4ed; color: var(--muted); }
.check { display: flex; flex-direction: row; align-items: center; gap: 9px; padding-top: 28px; }
.check input { width: 18px; min-height: 18px; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { padding: 11px 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 15px 12px; border-bottom: 1px solid #f0eaeb; vertical-align: middle; }
td small, td strong { display: block; }
td small { margin-top: 5px; color: var(--muted); font-size: .76rem; }
tbody tr:last-child td { border-bottom: 0; }

.status {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eee9e7;
  color: #64585a;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.status-ready, .status-active, .status-complete, .status-valid { background: #e4f3ea; color: var(--green); }
.status-draft, .status-expiring, .status-incomplete { background: #fff0d6; color: var(--amber); }
.status-expired, .status-blocked, .status-invalid, .status-cancelled { background: #f9e4e7; color: var(--red); }
.status-missing, .status-closed, .status-replaced { background: #eee9e7; color: #716568; }
.status-stamped { background: #e4edf9; color: #2e5f98; }

.card-list { display: grid; gap: 12px; }
.list-card {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
}
.list-card:hover { border-color: #bfd3b9; color: var(--ink); box-shadow: 0 7px 20px rgba(31, 75, 43, .07); }
.list-card.static:hover { box-shadow: none; border-color: var(--line); }
.list-card strong, .list-card span, .list-card small { display: block; }
.list-card span { margin-top: 6px; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.list-card small { margin-top: 6px; color: #8a7d80; }
.list-meta { min-width: 125px; text-align: right; }
.empty { padding: 20px 0; color: var(--muted); text-align: center; }

.warning, .notice, .flash { margin-bottom: 22px; padding: 14px 17px; border-radius: 11px; line-height: 1.5; }
.warning { border: 1px solid #edcf9f; background: #fff5e5; color: #80500a; }
.notice { border: 1px solid #cfddcb; background: #f3f7f0; color: #526257; font-size: .84rem; }
.flash-success { border: 1px solid #c4dfd0; background: #eaf6ef; color: #275d42; }
.flash-error { border: 1px solid #edc4ca; background: #fcedef; color: #8c1e2a; }

.identity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.history { display: grid; gap: 10px; margin-top: 22px; }
.history div { padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.history strong, .history span { display: block; }
.history span { margin-top: 5px; color: var(--muted); font-size: .75rem; }
.alert-list { margin: 0; padding: 0; list-style: none; }
.alert-list li { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.alert-list li:last-child { border: 0; }
.alert-list strong, .alert-list span { display: block; }
.alert-list span { margin-top: 4px; color: var(--muted); font-size: .77rem; }
.alert-list time { color: var(--red); font-size: .82rem; font-weight: 800; }

.preview-panel { position: sticky; top: 96px; background: linear-gradient(145deg, #fff, #f2f8ef); }
.preview-panel h2 { font-size: 1.5rem; }
.preview-panel dl, .detail-list, .calculation { margin: 0; }
.preview-panel dl div, .detail-list div, .calculation div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 800; text-align: right; }
.preview-panel .total, .calculation .total { padding-top: 18px; border-bottom: 0; color: var(--wine); font-size: 1.2rem; }
.concept-box { padding: 20px; border-left: 4px solid var(--wine); background: #f3f8f0; font-weight: 750; line-height: 1.75; text-transform: uppercase; }

.wizard-step { display: grid; grid-template-columns: 48px 1fr; gap: 20px; }
.step-number { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; background: var(--wine); color: #fff; font-weight: 900; }
.step-body { min-width: 0; }
.source-summary { margin-top: 18px; padding: 13px 15px; border-radius: 10px; background: #f3f7f0; color: var(--muted); font-size: .86rem; }
.client-table-wrap { max-height: 480px; border: 1px solid var(--line); border-radius: 12px; }
.client-table thead { position: sticky; z-index: 2; top: 0; background: #fff; }
.client-table input[type="checkbox"] { width: 18px; min-height: 18px; }
.client-table input { min-width: 130px; }
.client-table td:first-child { width: 40px; }
.selection-total { display: flex; justify-content: space-between; gap: 20px; padding: 18px 4px 0; color: var(--wine); }
.invoice-preview { margin-top: 24px; padding: 22px; border: 1px solid #d8e5d3; border-radius: 14px; background: linear-gradient(145deg, #fff, #f2f8ef); }
.invoice-preview > strong { display: block; margin-top: 7px; font-size: 1.35rem; }
.invoice-preview > p:not(.eyebrow) { color: var(--muted); line-height: 1.65; }
.invoice-preview dl { margin: 18px 0 0; }
.invoice-preview dl div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-top: 1px solid var(--line); }
.inbox-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 22px; margin-bottom: 22px; }
.mail-body { white-space: pre-wrap; line-height: 1.65; background: #f7faf7; border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 22px; max-height: 420px; overflow: auto; }
.attachment-list { display: grid; gap: 10px; }
.attachment-list > div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.attachment-list small { display: block; color: var(--muted); margin-top: 4px; }
.detail-list > div { display: flex; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; font-weight: 700; text-align: right; }
.button.full { width: 100%; }
.button.compact { padding: 8px 12px; }
.empty-state { text-align: center; color: var(--muted); padding: 30px !important; }
@media (max-width: 900px) { .inbox-layout { grid-template-columns: 1fr; } }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 56px);
  background:
    radial-gradient(circle at 10% 10%, rgba(51, 111, 68, .08), transparent 31rem),
    radial-gradient(circle at 90% 90%, rgba(227, 6, 19, .045), transparent 28rem),
    #f3f5f1;
}
.login-card {
  display: grid;
  grid-template-columns: minmax(350px, .9fr) minmax(420px, 1.1fr);
  width: min(940px, 100%);
  min-height: 590px;
  overflow: hidden;
  border: 1px solid rgba(24, 52, 35, .08);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 32px 90px rgba(30, 49, 36, .13);
}
.login-identity {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 38px 42px 34px;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 12%, rgba(124, 177, 82, .2), transparent 15rem),
    linear-gradient(155deg, #153b28 0%, #225a39 58%, #173e2b 100%);
  color: #fff;
}
.login-identity::after {
  position: absolute;
  right: -90px;
  bottom: -125px;
  width: 290px;
  height: 290px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(255,255,255,.025), 0 0 0 70px rgba(255,255,255,.018);
  content: "";
}
.dla-signature { display: flex; align-items: center; gap: 9px; min-height: 42px; }
.dla-signature span { color: rgba(255,255,255,.62); font-size: .58rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.dla-signature img { width: 148px; height: 46px; padding: 0; background: transparent; object-fit: contain; object-position: left center; }
.login-brand { display: flex; align-items: center; gap: 13px; margin-top: 58px; }
.login-brand img { width: 62px; height: 84px; padding: 0; border-radius: 0; background: transparent; object-fit: contain; filter: drop-shadow(0 5px 12px rgba(0,0,0,.18)); }
.login-brand div { display: grid; line-height: 1; }
.login-brand strong { color: #fff; font-size: 1.8rem; letter-spacing: -.045em; }
.login-brand span { margin-top: 7px; color: #a9d67f; font-size: .72rem; font-weight: 900; letter-spacing: .22em; text-transform: uppercase; }
.identity-copy { position: relative; z-index: 1; margin-top: auto; padding-top: 54px; }
.identity-copy .eyebrow { color: #a9d67f; }
.identity-copy h1 { margin: 12px 0 18px; font-size: clamp(2rem, 3.4vw, 2.75rem); line-height: 1.08; letter-spacing: -.05em; }
.identity-copy > p:last-child { max-width: 30rem; margin: 0; color: rgba(255,255,255,.72); font-size: .92rem; line-height: 1.65; }
.identity-footer { position: relative; z-index: 1; margin: 46px 0 0; color: rgba(255,255,255,.48); font-size: .64rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.login-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(40px, 6vw, 72px);
  border-top: 4px solid var(--dla-red);
}
.login-heading { display: flex; align-items: center; gap: 14px; }
.secure-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: #edf6e9; color: #28643c; font-size: 1.05rem; font-weight: 900; }
.login-heading .eyebrow { color: #347a48; font-size: .66rem; }
.login-heading h2 { margin: 4px 0 0; color: #18241c; font-size: 2.1rem; letter-spacing: -.045em; }
.login-intro { margin: 17px 0 0; color: #748078; font-size: .9rem; }
.login-card .stack { margin-top: 30px; gap: 20px; }
.login-card label { color: #334239; font-size: .8rem; }
.login-card input {
  min-height: 52px;
  padding: 13px 15px;
  border-color: #d7dfd9;
  border-radius: 11px;
  background: #fafbf9;
  font-size: .9rem;
}
.login-card input::placeholder { color: #a1aaa3; font-weight: 450; }
.login-card input:focus { border-color: #347a48; box-shadow: 0 0 0 3px rgba(52, 122, 72, .12); }
.login-card .button.primary { min-height: 52px; margin-top: 4px; border-radius: 11px; background: #28643c; box-shadow: 0 12px 24px rgba(40, 100, 60, .18); }
.login-card .button.primary:hover { background: #1c4c2c; }
.login-help { margin: 25px 0 0; color: #9aa39d; font-size: .72rem; text-align: center; }
.narrow-card { width: min(560px, 100%); margin: 7vh auto 0; }
.platform-metrics { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1050px) {
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .form-grid.four, .form-grid.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { grid-template-columns: auto 1fr; padding: 12px 20px; }
  .enterprise-brand { justify-self: end; margin-left: 12px; padding-left: 12px; }
  .enterprise-brand span { display: none; }
  .period-selector { grid-column: 1 / -1; order: 4; margin: 12px 0 0; }
  .period-selector select { min-width: 0; }
  .topbar nav { grid-column: 1 / -1; order: 3; justify-content: flex-start; overflow-x: auto; padding-top: 12px; }
  .userbox { justify-content: flex-end; }
}

@media (max-width: 760px) {
  .page { width: min(100% - 22px, 1440px); padding-top: 28px; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .page-heading > .button { align-self: flex-start; }
  .two-column, .split-layout, .identity-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .platform-metrics { grid-template-columns: repeat(2, 1fr); }
  .form-grid, .form-grid.three, .form-grid.four, .form-grid.five { grid-template-columns: 1fr; }
  .form-grid .span-two { grid-column: auto; }
  .preview-panel { position: static; }
  .wizard-step { grid-template-columns: 1fr; }
  .step-number { width: 34px; height: 34px; }
  .selection-total { flex-direction: column; gap: 6px; }
  .userbox span { display: none; }
  .enterprise-brand img { width: 104px; }
  .login-shell { align-items: start; padding: 14px; }
  .login-card { grid-template-columns: 1fr; min-height: 0; border-radius: 20px; }
  .login-identity { padding: 24px; }
  .dla-signature { justify-content: flex-start; }
  .login-brand { margin-top: 30px; }
  .login-brand img { width: 50px; height: 68px; border-radius: 0; }
  .login-brand strong { font-size: 1.55rem; }
  .identity-copy { display: none; }
  .identity-footer { margin-top: 28px; }
  .login-form-panel { padding: 34px 24px 38px; }
  .login-heading h2 { font-size: 1.8rem; }
  .dla-principle { align-items: flex-start; flex-direction: column; gap: 7px; }
}

.company-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.company-summary article { padding: 18px; border: 1px solid #e1e8e3; border-radius: 14px; background: #fff; }
.company-summary span { display: block; color: #7b857e; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.company-summary strong { display: block; margin-top: 7px; color: #1d3d2a; font-size: 1.25rem; }
.company-editor { display: grid; gap: 22px; }
.company-sections { display: grid; grid-template-columns: 1.05fr .8fr 1fr; gap: 18px; }
.company-sections fieldset { min-width: 0; padding: 20px; border: 1px solid #e1e8e3; border-radius: 14px; }
.company-sections legend { padding: 0 8px; color: #1d3d2a; font-weight: 800; }
.company-form { max-width: 920px; }
.company-module-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 18px 0; }
.compact-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.compact-form .button { justify-content: center; }
.payment-form { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.record-list { display: grid; gap: 9px; }
.record-list article { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid #e5ebe7; border-radius: 11px; }
.record-list small { display: block; margin-top: 3px; color: #7b857e; }
.security-note { margin: 14px 0 0; padding: 11px 13px; border-radius: 10px; background: #f5f8f6; color: #65726a; font-size: .78rem; }
.span-2 { grid-column: span 2; }
.check-label { display: flex; align-items: center; gap: 9px; align-self: end; min-height: 44px; }
.check-label input { width: auto; }
.button.subtle { border: 1px solid #dce4de; background: #fff; color: #31533f; }
.status-paid { background: #e8f6ed; color: #246642; }
.status-pending { background: #fff5d9; color: #86620a; }
.status-overdue, .status-cancelled { background: #fde8e8; color: #9b2c2c; }

@media (max-width: 1180px) {
  .company-sections { grid-template-columns: 1fr 1fr; }
  .company-sections fieldset:last-child { grid-column: span 2; }
  .payment-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .company-summary, .company-module-grid, .company-sections { grid-template-columns: 1fr; }
  .company-sections fieldset:last-child { grid-column: auto; }
  .payment-form, .compact-form { grid-template-columns: 1fr; }
}

/* DLA · Empresa enfocada 006 */
.company-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 22px; }
.company-title h1 { margin: 4px 0 3px; font-size: clamp(2rem, 3vw, 3rem); letter-spacing: -.045em; }
.company-title p { margin: 0; color: var(--muted); }
.company-back { display: inline-block; margin-bottom: 18px; color: var(--green); font-size: .84rem; font-weight: 800; text-decoration: none; }
.company-statusbar { display: flex; align-items: center; gap: 0; padding: 11px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: 0 8px 24px rgba(25, 43, 32, .04); }
.company-statusbar > span { min-width: 112px; padding: 0 18px; border-right: 1px solid var(--line); }
.company-statusbar > span:last-child { border: 0; }
.company-statusbar small { display: block; margin-bottom: 4px; color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.company-statusbar strong { color: var(--ink); font-size: .92rem; text-transform: capitalize; }
.company-statusbar .status { display: inline-flex; }
.company-tabs { display: flex; gap: 4px; margin-bottom: 16px; padding: 5px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #eef2ef; }
.company-tab { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 116px; padding: 11px 16px; border: 0; border-radius: 10px; background: transparent; color: #59645d; font: inherit; font-size: .84rem; font-weight: 800; cursor: pointer; }
.company-tab span { padding: 2px 7px; border-radius: 99px; background: #dfe6e1; font-size: .68rem; }
.company-tab.is-active { background: #fff; color: var(--green); box-shadow: 0 2px 10px rgba(26, 46, 33, .08); }
.company-tab.is-active span { background: var(--wine-soft); }
.company-tab-ai { margin-left: auto; color: #4c4868; }
.company-tab-ai::before { content: "✦"; color: var(--green); }
.company-pane { display: none; }
.company-pane.is-active { display: block; animation: company-pane-in .18s ease-out; }
@keyframes company-pane-in { from { opacity: 0; transform: translateY(4px); } }
.company-editor { position: relative; padding: 28px 32px; }
.company-form-columns { display: grid; grid-template-columns: 1.2fr .8fr; gap: 26px; }
.company-form-columns fieldset { min-width: 0; padding: 0; border: 0; }
.company-form-columns fieldset + fieldset { padding-left: 26px; border-left: 1px solid var(--line); }
.company-form-columns legend { margin-bottom: 16px; color: var(--ink); font-size: .92rem; font-weight: 850; }
.company-editor-narrow { max-width: 1060px; }
.company-module { padding: 28px 32px; }
.company-create { margin: 0 0 18px; border: 1px solid var(--line); border-radius: 12px; background: #fafcfb; }
.company-create summary { padding: 13px 16px; color: var(--green); font-size: .84rem; font-weight: 850; cursor: pointer; list-style: none; }
.company-create summary::-webkit-details-marker { display: none; }
.company-create[open] summary { border-bottom: 1px solid var(--line); }
.company-create .compact-form { margin: 0; padding: 16px; }
.company-copilot { max-width: 1080px; overflow: hidden; padding: 0; }
.copilot-heading { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 26px 30px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, #fbfdfb, #f1f6f3); }
.copilot-heading h2 { margin: 3px 0 4px; }
.copilot-heading p { margin: 0; color: var(--muted); }
.copilot-mark { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 14px; background: var(--green); color: #fff; font-size: .78rem; font-weight: 900; box-shadow: 0 8px 18px rgba(31, 105, 65, .2); }
.copilot-result { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; padding: 24px 30px; }
.copilot-result article { padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.copilot-result small { display: block; margin-bottom: 9px; color: var(--muted); font-size: .68rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.copilot-result strong { color: var(--ink); line-height: 1.5; }
.copilot-result ul { margin: 0; padding-left: 18px; color: #4e5a52; }
.copilot-result li + li { margin-top: 7px; }
.copilot-next { grid-column: 1 / -1; border-left: 3px solid var(--green) !important; }
.copilot-disclaimer { margin: 0; padding: 0 30px 24px; color: var(--muted); font-size: .75rem; }
.copilot-empty { padding: 42px 30px; text-align: center; }
.copilot-empty p { max-width: 560px; margin: 7px auto 0; color: var(--muted); }

@media (max-width: 1050px) {
  .company-hero { align-items: stretch; flex-direction: column; }
  .company-statusbar { align-self: flex-start; }
}
@media (max-width: 760px) {
  .company-statusbar { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .company-statusbar > span { min-width: 0; padding: 10px 14px; border-right: 1px solid var(--line); }
  .company-statusbar > span:nth-child(2) { border-right: 0; }
  .company-statusbar > span:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .company-form-columns { grid-template-columns: 1fr; }
  .company-form-columns fieldset + fieldset { padding: 22px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .company-editor, .company-module { padding: 22px 18px; }
  .company-tabs { margin-inline: -3px; }
  .company-tab-ai { margin-left: 0; }
  .copilot-heading { grid-template-columns: auto 1fr; padding: 22px 18px; }
  .copilot-heading form { grid-column: 1 / -1; }
  .copilot-result { grid-template-columns: 1fr; padding: 18px; }
  .copilot-next { grid-column: auto; }
}

/* DLA Enterprise · Ambiente Premium 003 */
:root {
  --ink: #17201b;
  --muted: #6f7a73;
  --line: #e3e9e4;
  --canvas: #f4f6f4;
  --paper: #ffffff;
  --green: #1f6941;
  --wine: #1f6941;
  --wine-dark: #164d31;
  --wine-soft: #eaf4ee;
  --sidebar: #171b19;
  --sidebar-soft: #232925;
}

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: 228px;
  flex-direction: column;
  padding: 28px 20px 22px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 15% 0, rgba(50, 125, 78, .17), transparent 19rem),
    var(--sidebar);
  color: #fff;
  box-shadow: 18px 0 45px rgba(17, 27, 20, .08);
}
.enterprise-brand {
  display: block;
  height: 66px;
  padding: 2px 7px 18px;
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.enterprise-brand img {
  width: 160px;
  height: 44px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,.25));
}
.sidebar .product-brand {
  gap: 12px;
  margin: 25px 5px 34px;
  color: #fff;
}
.sidebar .product-brand:hover { color: #fff; }
.sidebar .product-brand img {
  width: 38px;
  height: 48px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,.2));
}
.sidebar .product-brand strong { font-size: 1.02rem; }
.sidebar .product-brand small { color: #86c29a; font-size: .56rem; }
.main-nav { display: grid; gap: 5px; }
.main-nav .nav-label {
  margin: 0 12px 8px;
  color: #768079;
  font-size: .61rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.main-nav .nav-label-spaced { margin-top: 24px; }
.main-nav a {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 13px;
  padding: 9px 12px;
  border-radius: 11px;
  color: #c8d0cb;
  font-size: .86rem;
  font-weight: 720;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.main-nav a:hover {
  transform: translateX(2px);
  background: rgba(255,255,255,.075);
  color: #fff;
}
.main-nav a i {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  color: #83bd96;
  font-size: .59rem;
  font-style: normal;
  font-weight: 900;
}
.sidebar-phrase {
  margin: auto 8px 0;
  padding-top: 34px;
  color: #69726c;
  font-size: .68rem;
  line-height: 1.5;
}
.workspace { min-height: 100vh; margin-left: 228px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  padding: 10px clamp(24px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.92);
  box-shadow: none;
  backdrop-filter: blur(16px);
}
.mobile-brand { display: none; }
.workspace-context {
  margin: 0;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.period-selector { margin: 0; }
.period-selector label { display: flex; align-items: center; gap: 12px; }
.period-selector select { min-width: 235px; min-height: 40px; background: #f7f9f7; }
.userbox { gap: 18px; }
.userbox > span { text-align: right; }
.userbox > span small { order: -1; font-size: .66rem; letter-spacing: .04em; text-transform: uppercase; }
.userbox > span strong { color: var(--ink); font-size: .84rem; }
.link-button {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: #58635c;
  font-size: .78rem;
}
.page { width: min(1440px, calc(100% - 48px)); padding: 34px 0 64px; }
.page-heading { margin-bottom: 30px; }
.page-heading h1 { font-size: clamp(2rem, 3vw, 2.75rem); color: #17201b; }
.eyebrow { color: #43805a; font-size: .68rem; letter-spacing: .15em; }
.panel {
  border-color: rgba(30, 62, 43, .09);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(25, 46, 32, .045);
}
.panel:hover { border-color: rgba(31,105,65,.18); }
.metric-grid { gap: 16px; }
.metric-grid article {
  position: relative;
  overflow: hidden;
  border-color: rgba(30,62,43,.08);
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(25,46,32,.035);
}
.metric-grid article::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #347852;
  content: "";
}
.metric-grid strong { color: #1d3d2a; }
th { background: #f8faf8; color: #7b857e; }
tbody tr { transition: background .14s ease; }
tbody tr:hover { background: #fafcfb; }
input, select, textarea { border-color: #dbe3dd; background: #fbfcfb; }
input:focus, select:focus, textarea:focus { background: #fff; }
.button { border-radius: 9px; }
.button.primary { background: #216a43; box-shadow: 0 8px 18px rgba(33,106,67,.16); }
.dla-principle { border-left-width: 2px; background: #fff; box-shadow: 0 7px 22px rgba(25,46,32,.035); }

.inbox-page { display: grid; gap: 18px; }
.inbox-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  padding: clamp(24px, 3vw, 38px);
  border: 1px solid rgba(30,62,43,.08);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0, rgba(48,125,79,.10), transparent 25rem),
    #fff;
  box-shadow: 0 12px 38px rgba(25,46,32,.05);
}
.inbox-hero h1 {
  max-width: 720px;
  margin: 6px 0 10px;
  color: #17201b;
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  line-height: .98;
  letter-spacing: -.05em;
}
.inbox-hero-copy > .muted { max-width: 680px; margin: 0; font-size: .98rem; }
.inbox-hero-actions { display: grid; min-width: 190px; gap: 14px; }
.inbox-hero-actions form, .inbox-hero-actions .button { width: 100%; }
.inbox-stat {
  display: grid;
  padding: 16px 18px;
  border: 1px solid #e1e9e3;
  border-radius: 13px;
  background: rgba(248,251,249,.88);
}
.inbox-stat strong { color: #1f6941; font-size: 1.8rem; line-height: 1; }
.inbox-stat span { margin-top: 6px; color: #718078; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.inbox-page .dla-principle { margin: 0; }
.inbox-page .panel { margin: 0; min-height: 250px; }
.inbox-status { display: inline-flex; align-items: center; gap: 7px; color: #65726a; font-size: .75rem; font-weight: 800; }
.inbox-status i { width: 8px; height: 8px; border-radius: 50%; background: #38a169; box-shadow: 0 0 0 4px #e7f5ec; }

@media (max-width: 1050px) {
  .sidebar { width: 192px; padding-inline: 16px; }
  .workspace { margin-left: 192px; }
  .enterprise-brand img { width: 145px; }
  .page { width: min(100% - 32px, 1440px); }
  .topbar { display: flex; padding: 10px 22px; }
  .period-selector { grid-column: auto; order: initial; margin: 0; }
  .userbox { justify-content: initial; }
  .inbox-hero { grid-template-columns: 1fr; }
  .inbox-hero-actions { grid-template-columns: 1fr 1fr; min-width: 0; }
}

@media (max-width: 760px) {
  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    padding: 10px 14px;
    overflow-x: auto;
  }
  .sidebar .enterprise-brand, .sidebar .product-brand, .sidebar-phrase, .main-nav .nav-label { display: none; }
  .main-nav { display: flex; min-width: max-content; gap: 3px; }
  .main-nav a { min-height: 40px; padding: 7px 10px; font-size: .76rem; }
  .main-nav a i { display: none; }
  .workspace { margin-left: 0; }
  .topbar { min-height: 64px; padding: 9px 14px; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; font-size: .82rem; }
  .mobile-brand img { width: 28px; height: 28px; object-fit: contain; }
  .workspace-context, .period-selector label { display: none; }
  .page { width: min(100% - 24px, 1280px); padding-top: 28px; }
  .inbox-hero { padding: 22px 18px; border-radius: 16px; }
  .inbox-hero-actions { grid-template-columns: 1fr; }
}
