:root {
  --navy: #0b1728;
  --blue: #315a93;
  --blue-light: #eaf1fb;
  --ink: #172033;
  --muted: #667085;
  --line: #dce3ec;
  --surface: #ffffff;
  --background: #f4f7fb;
  --danger: #b42318;
  --success: #027a48;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--background); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 248px; padding: 20px 14px;
  display: flex; flex-direction: column; color: #e8eef7;
  background:
    radial-gradient(circle at 12% 0%, rgba(49, 90, 147, .34), transparent 28%),
    linear-gradient(180deg, #081426 0%, #0b1728 48%, #07111f 100%);
  border-right: 1px solid rgba(148, 163, 184, .18);
  box-shadow: 16px 0 36px rgba(8, 20, 38, .18);
}
.brand {
  display: flex; align-items: center; gap: 12px; margin: 0 2px 24px; padding: 11px;
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .025));
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.brand-logo-wrap {
  width: 52px; height: 52px; display: grid; place-items: center; flex: 0 0 auto;
  border-radius: 15px; background: white; box-shadow: 0 12px 28px rgba(0, 0, 0, .24);
}
.brand img { width: 45px; height: 45px; object-fit: contain; border-radius: 11px; }
.brand span { letter-spacing: .055em; line-height: 1.1; }
.brand small { display: block; color: #b9c7dc; font-size: 11px; font-weight: 600; letter-spacing: 0; margin-top: 5px; }
nav { display: grid; gap: 7px; }
nav a.nav-link {
  position: relative; display: flex; align-items: center; gap: 11px;
  min-height: 47px; padding: 10px 12px; border: 1px solid transparent;
  border-radius: 12px; color: #c8d5e6; font-weight: 700;
  transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}
nav a.nav-link:hover {
  color: white; background: rgba(49, 90, 147, .30);
  border-color: rgba(147, 181, 224, .16); transform: translateX(2px);
}
nav a.nav-link.active {
  color: white; background: linear-gradient(135deg, #3469ad, #1d3a66 70%, #132845);
  border-color: rgba(185, 207, 238, .34);
  box-shadow: 0 14px 28px rgba(49, 90, 147, .28);
}
nav a.nav-link.active::before {
  content: ""; position: absolute; left: -7px; top: 10px; bottom: 10px;
  width: 4px; border-radius: 999px; background: linear-gradient(#ffd66b, #75a7ee);
}
.nav-icon {
  width: 31px; height: 31px; display: grid; place-items: center; flex: 0 0 auto;
  border-radius: 10px; background: rgba(255, 255, 255, .10);
  color: #d9e8fb; font-size: 17px; font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.nav-link.active .nav-icon {
  background: rgba(255, 255, 255, .20);
  color: white;
  transform: scale(1.03);
}
.nav-section {
  margin: 17px 8px 4px; color: #7f93af; font-size: 10px; font-weight: 900;
  letter-spacing: .13em; text-transform: uppercase;
}
.logout { margin-top: 8px; padding-top: 10px; }
.logout button {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; border: 1px solid rgba(165, 185, 214, .35); border-radius: 12px;
  background: rgba(255, 255, 255, .035); color: #eef5ff; font-weight: 800;
}
.logout button:hover { background: rgba(180, 35, 24, .18); border-color: rgba(248, 150, 142, .45); }

main { margin-left: 248px; min-height: 100vh; }
main.public { margin-left: 0; }
.topbar { height: 72px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; background: white; border-bottom: 1px solid var(--line); }
.global-search input { width: min(42vw, 520px); padding: 11px 14px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafc; }
.topbar-meta { display: flex; align-items: center; gap: 14px; }
.topbar-meta .status-pill { min-width: 76px; padding: 7px 10px; font-size: 11px; }
.identity { display: grid; text-align: right; font-weight: 700; }
.identity small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.content { padding: 36px; max-width: 1500px; margin: auto; }

.page-heading { margin-bottom: 28px; }
.page-heading.horizontal { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0 0 8px; color: var(--navy); font-size: clamp(26px, 3vw, 36px); letter-spacing: -.03em; }
.page-heading p:last-child { margin: 0; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.module-card { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: start; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 4px 18px #23395d0a; }
.module-card:hover { border-color: #9bb3d4; transform: translateY(-1px); }
.module-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--blue-light); color: var(--blue); font-size: 25px; }
.module-card strong { color: var(--blue); font-size: 30px; }
.module-card h2 { margin: 3px 0 5px; font-size: 18px; }
.module-card p { margin: 0; color: var(--muted); font-size: 13px; }
.arrow { color: var(--blue); font-size: 22px; }
.info-panel { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 22px; border-radius: 12px; background: #e9f0fa; }
.info-panel p { margin: 4px 0 0; color: #52647c; font-size: 13px; }
.status-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 92px; padding: 8px 12px; border-radius: 999px;
  background: var(--blue-light); color: var(--blue);
  font-size: 12px; font-weight: 900; letter-spacing: .08em;
}
.status-pill--local { background: #ecfdf3; color: var(--success); }
.status-pill--servidor { background: #fef3c7; color: #92400e; }
.system-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.system-panel {
  margin-bottom: 18px; padding: 22px; border: 1px solid var(--line);
  border-radius: 12px; background: white; box-shadow: 0 4px 18px #23395d0a;
}
.system-panel--wide { margin-top: 2px; }
.system-panel__heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.system-panel h2 { margin: 0 0 16px; color: var(--navy); font-size: 18px; }
.system-panel__heading h2 { margin: 0; }
.system-panel p { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.system-details { display: grid; gap: 10px; margin: 0; }
.system-details div {
  display: grid; grid-template-columns: 150px 1fr; gap: 14px;
  padding: 12px; border-radius: 8px; background: #f7f9fc;
}
.system-details dt { color: #667085; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.system-details dd { margin: 0; font-weight: 800; overflow-wrap: anywhere; }
.system-path { max-width: none; font-family: Consolas, "Courier New", monospace; font-size: 12px; white-space: normal; }
.plan-document {
  margin: 16px 0 0; padding: 18px; max-height: 680px; overflow: auto;
  border: 1px solid var(--line); border-radius: 8px; background: #f7f9fc;
  color: var(--ink); font-family: Consolas, "Courier New", monospace;
  font-size: 12px; line-height: 1.6; white-space: pre-wrap;
}
.badge.ok { background: #ecfdf3; color: var(--success); }
.badge.danger { background: #fee4e2; color: var(--danger); }
.badge.pending { background: #fef3c7; color: #92400e; }
.server-readiness-summary { margin-bottom: 18px; }
.migration-report-details { margin-top: 16px; }
.migration-report-details div:first-child { grid-column: 1 / -1; }
.server-plan-actions { margin-top: 16px; }
.activity-filters {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end; gap: 14px; margin-bottom: 18px; padding: 18px;
  border: 1px solid var(--line); border-radius: 12px; background: white;
}
.activity-filter-actions { display: flex; gap: 8px; }
.activity-table table { min-width: 980px; }

.button, button.primary { display: inline-block; padding: 10px 15px; border: 0; border-radius: 8px; font-weight: 700; }
.primary { background: var(--blue); color: white; }
.secondary { background: white; color: var(--ink); border: 1px solid var(--line); }
.filter { display: flex; gap: 9px; margin-bottom: 16px; }
.filter input { width: min(520px, 70%); padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.filter button { padding: 8px 14px; border: 0; border-radius: 8px; background: var(--navy); color: white; }
.filter a { padding: 10px; color: var(--muted); }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: white; }
.table-wrap.narrow { max-width: 900px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 13px 14px; background: #f7f9fc; color: #475467; text-align: left; white-space: nowrap; }
td { max-width: 340px; padding: 14px; border-top: 1px solid #edf0f4; vertical-align: top; }
td:not(.actions) { overflow: hidden; text-overflow: ellipsis; }
.actions { min-width: 145px; text-align: right; white-space: nowrap; }
.actions a, .actions .link { color: var(--blue); margin-left: 9px; }
.actions form { display: inline; }
.actions .danger { color: var(--danger); }
.link { padding: 0; border: 0; background: transparent; }
.empty { padding: 40px; color: var(--muted); text-align: center; }
.table-note { color: var(--muted); font-size: 12px; }
.badge { display: inline-block; padding: 4px 8px; border-radius: 20px; background: var(--blue-light); color: var(--blue); font-size: 11px; font-weight: 800; }
.process-tabs {
  display: flex; gap: 8px; margin-bottom: 18px;
}
.process-tabs a {
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px;
  background: white; color: var(--ink); font-weight: 800;
}
.process-tabs a.active { background: var(--blue); border-color: var(--blue); color: white; }
.process-panel {
  display: grid; gap: 16px;
}
.process-upload {
  display: grid; grid-template-columns: minmax(280px, 1fr) auto; align-items: end; gap: 12px;
  padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: white;
}
.process-filter {
  display: flex; gap: 9px;
}
.process-filter input {
  width: min(560px, 70%); padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
}
.process-filter button {
  padding: 8px 14px; border: 0; border-radius: 8px; background: var(--navy); color: white; font-weight: 800;
}
.process-filter a { padding: 10px; color: var(--muted); }
.process-table table { min-width: 1450px; }
.process-description { min-width: 360px; white-space: normal; }
.process-actions {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 0; color: var(--muted); font-size: 13px;
}
.contract-filters {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-bottom: 18px; padding: 20px; border: 1px solid var(--line);
  border-radius: 12px; background: white;
}
.contract-filters .wide { grid-column: 1 / -1; }
.contract-table { max-height: 54vh; }
.contract-table table { min-width: 1500px; }
.contract-table .contract-name { min-width: 320px; white-space: normal; }
.contract-table .numeric { text-align: right; white-space: nowrap; }
.table-link { color: var(--blue); font-weight: 700; white-space: nowrap; }
.experience-summary {
  display: flex; justify-content: space-between; gap: 20px; align-items: center;
  margin-top: 14px; padding: 14px 18px; border-radius: 9px;
  background: var(--blue); color: white;
}
.contract-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.contract-actions .disabled { cursor: not-allowed; opacity: .55; }
.document-toolbar {
  display: grid; grid-template-columns: minmax(360px, 1.4fr) minmax(240px, 1fr);
  gap: 16px; margin-bottom: 18px; padding: 20px;
  border: 1px solid var(--line); border-radius: 12px; background: white;
}
.document-table table { min-width: 1180px; }
.document-table .document-name { min-width: 220px; white-space: normal; }
.document-table td:nth-child(5), .document-table td:nth-child(6),
.document-table td:nth-child(7) { min-width: 180px; white-space: normal; }
.document-form .storage-help { margin-top: 4px; }
.professional-search {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end; gap: 10px; margin-bottom: 14px;
}
.professional-search button {
  height: 42px; padding: 0 18px; border: 0; border-radius: 8px;
  background: var(--navy); color: white; font-weight: 700;
}
.professional-search > a { padding: 12px 4px; color: var(--muted); }
.professional-filters {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px; margin-bottom: 18px; padding: 20px;
  border: 1px solid var(--line); border-radius: 12px; background: white;
}
.professional-filters .wide { grid-column: 1 / -1; }
.professional-profile {
  margin-bottom: 20px; padding: 22px; border: 1px solid var(--line);
  border-radius: 14px; background: white; box-shadow: 0 6px 22px rgba(31,55,90,.05);
}
.professional-profile__heading {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  margin-bottom: 18px;
}
.professional-heading-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap;
}
.professional-heading-actions form { display: inline-flex; margin: 0; }
.professional-heading-actions .icon-action {
  width: 40px; height: 40px; padding: 0; display: inline-grid; place-items: center;
  border-radius: 12px;
}
.professional-heading-actions .icon-action svg {
  width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.profile-edit-action {
  border: 1px solid #b7cdf0; background: #eef5ff; color: #28558f;
}
.profile-edit-action:hover { background: #dbeafe; border-color: #8bb2eb; }
.professional-profile__heading span:first-child {
  color: var(--blue); font-size: 11px; font-weight: 800;
  letter-spacing: .09em; text-transform: uppercase;
}
.professional-profile h2 { margin: 5px 0 0; color: var(--navy); font-size: 22px; }
.professional-profile dl {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px; margin: 0;
}
.professional-profile dl div {
  padding: 12px; border-radius: 9px; background: #f5f8fc;
}
.professional-profile dt { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.professional-profile dd { margin: 5px 0 0; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.professional-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.professional-actions form { display: inline; }
.professional-table {
  border: 1px solid #9fb0c7;
  box-shadow: inset 0 0 0 1px #d4dce8;
}
.professional-table table {
  min-width: 1450px;
  border-collapse: separate;
  border-spacing: 0;
}
.professional-table th,
.professional-table td {
  border-right: 1px solid #aebbd0;
  border-bottom: 1px solid #aebbd0;
  text-align: center;
  vertical-align: middle;
}
.professional-table th:last-child,
.professional-table td:last-child { border-right: 0; }
.professional-table tbody tr:last-child td { border-bottom: 0; }
.professional-table th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #eaf0f7;
  color: #263a55;
  border-bottom: 2px solid #8fa2bf;
  font-weight: 900;
}
.professional-table tbody tr:nth-child(even) { background: #fbfdff; }
.professional-table tbody tr:hover { background: #f2f7ff; }
.professional-table .professional-project {
  min-width: 360px;
  max-width: 480px;
  white-space: normal;
  line-height: 1.35;
  text-align: left;
}
.professional-table td:nth-child(2),
.professional-table td:nth-child(4),
.professional-table td:nth-child(5),
.professional-table td:nth-child(6) {
  white-space: normal;
  line-height: 1.35;
}
.professional-table .actions {
  min-width: 92px;
  text-align: center;
}
.professional-table .actions form { display: inline-flex; margin: 0; }
.professional-table .icon-action {
  width: 34px;
  height: 34px;
  margin: 0 auto;
}
.view-action {
  border: 1px solid #b7cdf0;
  background: #eef5ff;
  color: #28558f;
}
.view-action:hover { background: #dbeafe; border-color: #8bb2eb; }
.professional-total {
  margin-top: 14px; padding: 16px 20px; border-radius: 10px;
  background: var(--blue); color: white; text-align: center;
}
.professional-total strong { margin-left: 5px; }
.professional-total span { margin-left: 8px; color: #dce8f6; font-size: 12px; }
.professional-empty { border: 1px solid var(--line); border-radius: 12px; background: white; }

.record-form {
  padding: 30px; border: 1px solid #d7e0ec; border-radius: 16px; background: white;
  box-shadow: 0 12px 35px rgba(31, 55, 90, .07);
}
.password-form { max-width: 620px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
label { display: grid; gap: 7px; color: #344054; font-size: 13px; font-weight: 700; }
label.wide { grid-column: 1 / -1; }
input, textarea, select { width: 100%; padding: 11px 13px; border: 1px solid #cbd5e1; border-radius: 9px; color: var(--ink); background: white; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: #7096ca; box-shadow: 0 0 0 3px rgba(49, 90, 147, .12); }
input[readonly] { background: #f2f6fb; color: #344054; font-weight: 700; }
input:disabled { background: #f2f4f7; color: #98a2b3; }
textarea { resize: vertical; }
label small { color: var(--muted); font-weight: 400; }
.storage-help {
  margin-top: 3px; padding: 10px 12px; border: 1px solid #cfe0f4;
  border-radius: 8px; background: #f2f7fd; color: #52647c;
}
.storage-help strong { color: var(--blue); overflow-wrap: anywhere; }
.input-action { display: grid; grid-template-columns: minmax(0, 1fr) 42px 42px; gap: 7px; }
.icon-action {
  width: 42px; height: 42px; display: grid; place-items: center; padding: 0;
  border-radius: 9px; transition: transform .15s, background .15s, box-shadow .15s;
}
.icon-action svg {
  width: 19px; height: 19px; fill: none; stroke: currentColor;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.icon-action:hover { transform: translateY(-1px); }
.add-action { border: 1px solid #9bb8df; background: #edf4fd; color: var(--blue); }
.add-action:hover { background: #dfeafa; box-shadow: 0 4px 12px rgba(49, 90, 147, .15); }
.danger-action { border: 1px solid #f0bbb7; background: #fff3f2; color: var(--danger); }
.danger-action:hover { background: #fee4e2; box-shadow: 0 4px 12px rgba(180, 35, 24, .12); }
.form-section-title {
  display: flex; align-items: center; gap: 12px; margin-top: 8px; padding: 14px 0 11px;
  border-bottom: 1px solid #e7edf5; color: var(--navy);
}
.form-section-title.wide { grid-column: 1 / -1; }
.form-section-title:first-child { margin-top: -6px; padding-top: 0; }
.form-section-title > span {
  width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 auto;
  border-radius: 50%; background: var(--blue); color: white; font-size: 12px; font-weight: 800;
}
.form-section-title > div { display: grid; gap: 2px; }
.form-section-title strong { font-size: 14px; }
.form-section-title small { color: var(--muted); font-size: 11px; font-weight: 400; }
.mini-button {
  padding: 9px 12px; border: 1px solid #9bb3d4; border-radius: 8px;
  background: var(--blue-light); color: var(--blue); font-size: 12px; font-weight: 800;
}
.mini-button:hover { background: #dbe8f8; }
.danger-button { border-color: #f3b7b2; background: #fff1f0; color: var(--danger); }
.danger-button:hover { background: #fee4e2; }
label.checkbox { display: flex; align-items: center; }
label.checkbox input, .permissions input { width: auto; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.section-title { margin-top: 28px; font-size: 18px; }
.permissions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.permissions > div { display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
.permissions label { display: flex; align-items: center; gap: 6px; font-weight: 500; }

.flash { margin-bottom: 18px; padding: 12px 14px; border-radius: 8px; }
.flash.error { color: #912018; background: #fee4e2; }
.flash.success { color: var(--success); background: #dff7ea; }
.inline-message {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #badbcc;
  background: #eaf8f0;
  color: #10733f;
  font-size: 13px;
  font-weight: 800;
}
.inline-message.error {
  border-color: #f5b7b1;
  background: #fff0ee;
  color: #b42318;
}
.inline-message[hidden] {
  display: none;
}
.madeco-modal-backdrop {
  position: fixed; z-index: 1000; inset: 0; padding: 20px;
  display: grid; place-items: center; background: rgba(5, 18, 35, .58);
  opacity: 0; transition: opacity .16s ease; backdrop-filter: blur(3px);
}
.madeco-modal-backdrop.visible { opacity: 1; }
.madeco-modal {
  width: min(440px, 100%); padding: 0; overflow: hidden;
  border: 1px solid #d5deea; border-radius: 16px; background: white;
  box-shadow: 0 28px 80px rgba(5, 18, 35, .3);
  transform: translateY(8px); transition: transform .16s ease;
}
.madeco-modal-backdrop.visible .madeco-modal { transform: translateY(0); }
.madeco-modal__header {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: 11px; padding: 18px 20px; border-bottom: 1px solid #e4eaf2;
  background: #f6f9fd;
}
.madeco-modal__mark {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 9px; background: var(--blue); color: white;
  font-size: 13px; font-weight: 900;
}
.madeco-modal h2 { margin: 0; color: var(--navy); font-size: 17px; }
.madeco-modal__close {
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: #667085; font-size: 24px; line-height: 1;
}
.madeco-modal__close:hover { background: #e8eef7; color: var(--navy); }
.madeco-modal__message {
  margin: 20px 20px 0; color: #475467; font-size: 14px; line-height: 1.5;
}
.madeco-modal__field { margin: 20px; }
.madeco-modal__field span { color: #344054; font-size: 13px; font-weight: 700; }
.madeco-modal__field input { margin-top: 7px; }
.madeco-modal__actions {
  display: flex; justify-content: flex-end; gap: 9px;
  padding: 16px 20px; border-top: 1px solid #e4eaf2; background: #fbfcfe;
}
.madeco-modal__actions .button { min-width: 96px; text-align: center; }
.madeco-modal__actions .danger-confirm { background: var(--danger); color: white; }
.madeco-modal__actions .danger-confirm:disabled {
  cursor: not-allowed;
  background: #f2aaa4;
}
.madeco-modal--danger {
  border-color: #f5b7b1;
  box-shadow: 0 28px 90px rgba(145, 32, 24, .34);
}
.madeco-modal--danger .madeco-modal__header {
  border-bottom-color: #f5b7b1;
  background: #fff0ee;
}
.madeco-modal--danger .madeco-modal__mark {
  background: var(--danger);
}
.danger-list {
  margin: 12px 0 0;
  padding-left: 20px;
  color: #912018;
}
.danger-list li {
  margin: 6px 0;
}
.login-shell { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 24px; }
.login-card { width: min(430px, 100%); padding: 38px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 20px 60px #1c2c4514; }
.login-card img { display: block; width: 110px; height: 110px; object-fit: contain; margin: 0 auto 18px; }
.login-card h1, .login-card p { text-align: center; }
.login-card p { margin-bottom: 28px; color: var(--muted); }
.login-card label { margin-top: 16px; }
.login-card button { width: 100%; margin-top: 24px; }
.search-results { display: grid; gap: 10px; }
.search-results a { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.search-results span { color: var(--blue); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.error-page { padding: 100px 20px; text-align: center; }
.error-page strong { color: #dbe4f0; font-size: 100px; }

/* Portada de Inicio */
.content.dashboard-content {
  max-width: none;
  padding: 0;
}
.home-hero {
  position: relative;
  min-height: calc(100vh - 72px);
  padding: 30px 38px 26px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  color: white;
  background: #132238 url("fondo.jpg") center 58% / cover no-repeat;
}
.home-hero__shade {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 18, 35, .48) 0%, rgba(5, 18, 35, .2) 30%, rgba(5, 18, 35, .7) 76%, rgba(5, 18, 35, .94) 100%),
    linear-gradient(90deg, rgba(5, 18, 35, .27), transparent 45%, rgba(5, 18, 35, .15));
}
.home-hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}
.home-status, .home-version {
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(5, 18, 35, .32);
  backdrop-filter: blur(8px);
}
.home-status i {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 7px;
  border-radius: 50%;
  background: #67e7a2;
  box-shadow: 0 0 0 4px rgba(103, 231, 162, .14);
}
.home-welcome {
  width: min(760px, 100%);
  margin: auto;
  padding: 28px 20px 38px;
  text-align: center;
  text-shadow: 0 3px 20px rgba(0, 0, 0, .45);
}
.home-logo {
  width: 130px;
  height: 130px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 24px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 55px rgba(0, 0, 0, .32);
}
.home-logo img {
  width: 112px;
  height: 112px;
  object-fit: contain;
}
.home-kicker {
  margin: 0 0 7px;
  color: #d9e7f8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.home-welcome h1 {
  margin: 0;
  color: white;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.05;
  letter-spacing: -.025em;
}
.home-subtitle {
  margin: 12px 0 0;
  color: #eef5fc;
  font-size: clamp(14px, 1.4vw, 18px);
}
.home-rule {
  width: 150px;
  height: 2px;
  margin: 22px auto 0;
  background: rgba(255, 255, 255, .28);
}
.home-rule span {
  width: 48px;
  height: 2px;
  display: block;
  margin: auto;
  background: #e8ad30;
}
.home-modules {
  width: min(1120px, 100%);
  margin: 0 auto 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.home-module {
  min-width: 0;
  padding: 14px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 13px;
  background: rgba(7, 22, 40, .74);
  box-shadow: 0 12px 35px rgba(0, 0, 0, .16);
  backdrop-filter: blur(10px);
  transition: transform .18s, background .18s, border-color .18s;
}
.home-module:hover {
  color: white;
  border-color: rgba(255, 255, 255, .55);
  background: rgba(25, 55, 89, .9);
  transform: translateY(-3px);
}
.home-module__icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, .13);
  color: #91c8ff;
  font-size: 20px;
}
.home-module__text {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.home-module__text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.home-module__text small {
  color: #b8c7d8;
  font-size: 10px;
}
.home-module__arrow {
  color: #8db8e5;
}
.home-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #dce8f6;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
}
.home-datetime {
  display: flex;
  gap: 8px;
  align-items: center;
  font-variant-numeric: tabular-nums;
}
.home-dot { color: #e8ad30; }

@media (max-width: 900px) {
  .sidebar { position: static; width: 100%; padding: 12px 16px; }
  .brand { padding-bottom: 12px; }
  nav { display: flex; overflow-x: auto; }
  nav a { white-space: nowrap; }
  .logout { position: absolute; top: 22px; right: 18px; }
  .logout button { width: auto; }
  main { margin-left: 0; }
  .topbar { padding: 0 18px; }
  .content { padding: 24px 18px; }
  .cards, .info-panel { grid-template-columns: 1fr; }
  .home-hero { min-height: calc(100vh - 131px); padding: 24px 20px; }
  .home-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .form-grid, .permissions { grid-template-columns: 1fr; }
  .contract-filters { grid-template-columns: 1fr; }
  .document-toolbar { grid-template-columns: 1fr; }
  .professional-filters, .professional-profile dl { grid-template-columns: 1fr 1fr; }
  .contract-filters .wide { grid-column: auto; }
  .experience-summary, .contract-actions { align-items: stretch; flex-direction: column; }
  .contract-form .wide { grid-column: auto; }
  .input-action { grid-template-columns: 1fr 1fr; }
  .input-action select { grid-column: 1 / -1; }
  .icon-action { width: 100%; }
  .page-heading.horizontal { align-items: flex-start; flex-direction: column; }
  .global-search input { width: 58vw; }
  .identity { display: none; }
  .professional-search { grid-template-columns: 1fr; }
  .professional-filters, .professional-profile dl { grid-template-columns: 1fr; }
  .professional-profile__heading { align-items: flex-start; flex-direction: column; }
  .home-hero { padding: 18px 14px; }
  .home-welcome { padding: 24px 8px; }
  .home-logo { width: 100px; height: 100px; border-radius: 19px; }
  .home-logo img { width: 88px; height: 88px; }
  .home-modules { grid-template-columns: 1fr; }
  .home-footer { gap: 12px; }
  .home-footer > span:first-child { display: none; }
  .home-datetime { margin-left: auto; }
}

.sidebar-tools {
  margin-top: auto;
  padding: 10px 8px 8px;
  border-top: 1px solid rgba(165, 185, 214, .18);
}
.tools-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  color: #8fa4c0;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.tool-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 9px;
  color: #c8d5e6;
  font-size: 12px;
  font-weight: 800;
}
.tool-link:hover,
.tool-link.active {
  color: white;
  background: rgba(49, 90, 147, .28);
}
.logout {
  margin-top: 8px;
}
