:root {
  --ink: #20343a;
  --muted: #708087;
  --canvas: #f4f7f8;
  --surface: #fff;
  --line: #e3e9eb;
  --teal: #2563eb;
  --teal-dark: #1d4ed8;
  --teal-light: #eff6ff;
  --navy: #0f2238;
  --danger: #b64737;
  --radius: 12px;
  --shadow: 0 3px 12px rgb(25 47 55 / 3%);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  color: var(--ink);
  font-size: 14px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); line-height: 1.5; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dark); }
button, input, select, textarea { font: inherit; }
button, summary, select { cursor: pointer; }
button { color: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #3b82f6; outline-offset: 3px; }
img, svg { vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 650; line-height: 1.3; }
h1 { font-size: clamp(25px, 2.2vw, 32px); letter-spacing: -.8px; }
h2 { font-size: 16px; letter-spacing: -.2px; }
h3 { font-size: 14px; }
ul, ol { margin: 0; padding: 0; }
strong, b { font-weight: 600; }
.icon { width: 20px; height: 20px; flex: 0 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -70px; left: 16px; z-index: 100; padding: 12px 20px; background: #fff; border-radius: 6px; box-shadow: var(--shadow); }
.skip-link:focus { top: 12px; }
.text-muted { color: var(--muted); }
.text-teal { color: var(--teal) !important; }
.text-danger { color: var(--danger) !important; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: 246px; display: flex; flex-direction: column; padding: 32px 18px 0; background: var(--navy); color: #d4e1e5; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 11px; color: #fff; font-size: 23px; font-weight: 650; letter-spacing: -.8px; padding: 0 10px; }
.brand:hover { color: #fff; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 44px; border-radius: 11px; background: #2563eb; color: #fff; flex-shrink: 0; }
.brand-mark .icon { width: 24px; height: 24px; }
.brand-digital { font-weight: 350; }
.brand small { display: block; font-size: 8px; letter-spacing: 2.4px; font-weight: 500; color: #93b4d4; margin-top: 2px; }
.nav-caption { padding: 0 15px; font-size: 9px; font-weight: 650; letter-spacing: 1.65px; color: #88a6af; margin: 43px 0 13px; }
.nav-links { display: grid; gap: 6px; }
.nav-link { display: flex; gap: 12px; align-items: center; min-height: 46px; padding: 11px 14px; border-radius: 8px; color: #b7cbd2; font-size: 13px; font-weight: 500; transition: background .15s, color .15s; }
.nav-link .icon { opacity: .8; width: 19px; height: 19px; }
.nav-link:hover { background: #162f4d; color: #fff; }
.nav-link.is-active { background: #1d3d63; color: #fff; box-shadow: inset 3px 0 #3b82f6; }
.nav-link.is-active .icon { color: #60a5fa; opacity: 1; }
.nav-divider { height: 1px; background: #233e5c; margin: 22px 15px 0; }
.nav-links .nav-caption { margin-top: 18px; }
.sidebar-bottom { margin-top: auto; padding-top: 45px; }
.trace-note { display: flex; gap: 11px; align-items: flex-start; padding: 16px 12px; margin: 0 3px 22px; border: 1px solid #1f4268; border-radius: 9px; background: #13273e; }
.trace-note > .icon { color: #60a5fa; width: 18px; height: 18px; flex-basis: 18px; }
.trace-note strong { font-size: 10px; color: #d0e4f5; display: block; margin-bottom: 5px; }
.trace-note span { display: block; font-size: 10px; line-height: 1.7; color: #8eb3d4; }
.sidebar-account { display: flex; align-items: center; gap: 9px; border-top: 1px solid #233e5c; padding: 19px 5px; }
.avatar { height: 33px; width: 33px; flex: 0 0 33px; border-radius: 50%; display: grid; place-items: center; background: #dbeafe; color: #1e40af; font-weight: 650; }
.account-name { min-width: 0; flex: 1; }
.account-name strong, .account-name span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-name strong { font-size: 11px; color: #e6eff2; }
.account-name span { font-size: 10px; color: #9db7c0; margin-top: 3px; }
.icon-button { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 7px; background: transparent; }
.logout-button { color: #9fbac3; width: 28px; }
.logout-button .icon { width: 17px; height: 17px; }
.logout-button:hover { background: #1d3d63; color: #fff; }
.app-shell { margin-left: 246px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { min-height: 74px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 38px; font-size: 11px; }
.topbar-leading { display: flex; align-items: center; gap: 10px; }
.workspace-indicator { display: inline-block; height: 7px; width: 7px; border-radius: 50%; background: #2563eb; box-shadow: 0 0 0 4px #eff6ff; margin-right: 3px; }
.topbar-divider { color: #bdc9cd; padding: 0 7px; }
.topbar-role { display: flex; align-items: center; gap: 7px; color: #6f8187; }
.topbar-role .icon { width: 16px; height: 16px; }
.mobile-menu { display: none; }
.main-content { width: 100%; max-width: 1780px; margin: 0 auto; padding: 35px 38px 28px; flex: 1; }
.app-footer { display: flex; justify-content: space-between; gap: 16px; color: #8b989e; font-size: 10px; padding: 20px 38px; border-top: 1px solid var(--line); }
.footer-dot { margin: 0 5px; }
.page-heading { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 30px; }
.page-heading > div { min-width: 0; }
.eyebrow { color: var(--teal); font-size: 9px; letter-spacing: 1.7px; font-weight: 700; margin-bottom: 9px; }
.page-description { color: var(--muted); font-size: 13px; margin-top: 10px; line-height: 1.75; }
.button { min-height: 40px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 10px 16px; font-size: 12px; font-weight: 600; line-height: 1.4; border: 1px solid transparent; border-radius: 7px; white-space: nowrap; transition: background .15s, box-shadow .15s; text-align: center; }
.button .icon { width: 16px; height: 16px; flex-basis: 16px; }
.button-primary { color: #fff; background: var(--teal); border-color: var(--teal); box-shadow: 0 3px 5px rgb(37 99 235 / 15%); }
.button-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.button-secondary { background: #fff; color: #4e626b; border-color: #dce4e7; }
.button-secondary:hover { background: #f4f8f8; color: var(--ink); border-color: #b7c8ce; }
.button-small { min-height: 33px; padding: 7px 12px; font-size: 10px; }
.button-full { width: 100%; }
.button-row { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; }
.text-link .icon { width: 15px; height: 15px; }
.text-link:hover, .text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-button { border: 0; padding: 0; background: none; color: var(--teal); font-weight: 600; font-size: 11px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.panel-heading { padding: 23px 25px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #edf1f2; }
.panel-heading h2 + p { color: var(--muted); font-size: 12px; margin-top: 5px; line-height: 1.6; }
.panel-icon { color: #8a9ba2; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 27px; }
.metric-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); padding: 20px 21px 17px; }
.metric-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #5d717a; font-size: 12px; }
.metric-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; }
.metric-icon .icon { width: 18px; height: 18px; }
.metric-icon-teal { color: #2563eb; background: #eff6ff; }
.metric-icon-blue { color: #4b85b1; background: #edf4fa; }
.metric-icon-purple { color: #8972ac; background: #f3f0f8; }
.metric-icon-orange { color: #bd814c; background: #fcf4e9; }
.metric-value { font-size: 34px; font-weight: 600; letter-spacing: -1.1px; line-height: 1; display: block; margin: 13px 0 13px; font-variant-numeric: tabular-nums; }
.metric-card > p { color: #6c7f87; font-size: 11px; }
.dashboard-documents { margin-bottom: 24px; }
.table-scroll { overflow-x: auto; width: 100%; }
.document-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.document-table thead { background: #fafcfc; border-bottom: 1px solid var(--line); }
.document-table th { color: #637980; padding: 13px 16px; font-weight: 500; font-size: 11px; white-space: nowrap; }
.document-table th:first-child, .document-table td:first-child { padding-left: 25px; }
.document-table th:last-child, .document-table td:last-child { padding-right: 20px; }
.document-table tbody tr:not(:last-child) { border-bottom: 1px solid #edf1f2; }
.document-table tbody tr:hover { background: #fcfdfd; }
.document-table td { padding: 18px 16px; vertical-align: middle; }
.table-document { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.table-document > div { max-width: 285px; }
.file-icon { width: 33px; height: 40px; display: grid; place-items: center; border: 1px solid #bfdbfe; border-radius: 6px; background: #eff6ff; color: #2563eb; flex: 0 0 33px; }
.file-icon .icon { width: 18px; height: 18px; }
.document-subject { display: block; color: #2e4650; font-weight: 600; line-height: 1.5; }
.document-subject:hover { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.document-meta { display: flex; gap: 8px; align-items: center; color: #71838c; font-size: 10px; margin-top: 5px; flex-wrap: wrap; }
.cell-main { display: block; color: #526972; }
.cell-secondary { display: block; color: #75878e; font-size: 10px; margin-top: 5px; }
.date-cell { white-space: nowrap; }
.table-arrow { display: inline-grid; place-items: center; width: 25px; height: 30px; color: #8b9a9f; border-radius: 5px; }
.table-arrow:hover { color: var(--teal); background: var(--teal-light); }
.table-arrow .icon { width: 16px; height: 16px; }
.badge { font-size: 10px; font-weight: 600; padding: 5px 8px; border-radius: 5px; display: inline-flex; gap: 5px; align-items: center; line-height: 1.2; white-space: nowrap; color: #687c86; background: #eef2f4; }
.badge-dot { height: 4px; width: 4px; background: currentColor; border-radius: 50%; }
.status-draft { background: #f0f3f4; color: #77848b; }
.status-received { background: #eff6ff; color: #1d4ed8; }
.status-transit { background: #eaf2fb; color: #4d7eab; }
.status-processing { background: #f0edf9; color: #8064a7; }
.status-observed { background: #fff3df; color: #a97622; }
.status-answered { background: #e0f2fe; color: #0369a1; }
.status-archived { background: #eef0f2; color: #7b838c; }
.priority { font-size: 9px; font-weight: 550; border-radius: 4px; padding: 1px 5px; }
.priority-high { color: #b47b35; background: #fdf4e7; }
.priority-urgent { color: #b45d4f; background: #fcefeb; }
.empty-state { text-align: center; padding: 38px 20px; }
.empty-icon { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; color: #2563eb; background: #eff6ff; margin: 0 auto 14px; }
.empty-icon .icon { width: 24px; height: 24px; }
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { max-width: 340px; margin: 0 auto; color: var(--muted); font-size: 11px; line-height: 1.7; }
.empty-state .button { margin-top: 20px; }
.compact-empty { padding: 24px; font-size: 11px; line-height: 1.8; color: var(--muted); }
.compact-empty .text-link { margin-top: 10px; }
.dashboard-bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.area-load-list { padding: 2px 25px 9px; }
.area-load-list .compact-empty { padding: 22px 0; }
.area-load-row { display: flex; align-items: center; gap: 12px; padding: 15px 0; color: #5e727b; font-size: 11px; border-bottom: 1px solid #eef2f2; }
.area-load-row:last-child { border-bottom: 0; }
.area-load-symbol { background: #f3f7f7; border-radius: 6px; width: 30px; height: 30px; display: grid; place-items: center; color: #7e989d; }
.area-load-symbol .icon { width: 15px; height: 15px; }
.area-load-row strong { margin-left: auto; color: #49646b; background: #f0f5f5; min-width: 26px; text-align: center; border-radius: 5px; padding: 3px 7px; font-size: 10px; }
.activity-list { list-style: none; padding: 19px 25px 23px; }
.activity-list li { display: flex; gap: 12px; position: relative; padding-bottom: 19px; }
.activity-list li:last-child { padding-bottom: 0; }
.activity-list li:not(:last-child)::before { content: ''; position: absolute; left: 4px; width: 1px; top: 13px; bottom: 0; background: #dbeafe; }
.activity-dot { margin-top: 5px; height: 9px; width: 9px; flex: 0 0 9px; background: #3b82f6; border: 2px solid #eff6ff; border-radius: 50%; }
.activity-list strong { font-size: 11px; }
.activity-list p { font-size: 10px; color: #7b8c93; margin-top: 2px; }
.activity-list div > span { display: block; color: #95a0a5; font-size: 9px; margin-top: 4px; }
.activity-list .compact-empty { padding: 5px 0; }
.info-strip { display: flex; gap: 10px; align-items: center; color: #7a8c92; margin-top: 23px; padding: 0 5px; font-size: 10px; }
.info-strip > .icon { color: #3b82f6; width: 17px; height: 17px; flex-basis: 17px; }
.info-strip strong { color: #1e3a8a; }
.filter-bar { display: flex; align-items: center; gap: 12px; padding: 22px 25px; flex-wrap: wrap; }
.search-field { position: relative; flex: 1 1 270px; }
.search-field .icon { position: absolute; left: 12px; top: 11px; width: 17px; height: 17px; color: #99a6ad; }
input:not([type='checkbox']):not([type='radio']), select, textarea {
  border: 1.5px solid #cbd5e1;
  border-radius: 7px;
  background: #ffffff;
  padding: 8px 12px;
  color: #0f172a;
  width: 100%;
  min-height: 38px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: 0 1px 2px rgb(15 23 42 / 3%);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder, textarea::placeholder { color: #64748b; font-size: 13px; }
input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: #94a3b8; }
input:focus, select:focus, textarea:focus { border-color: #2563eb; outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16); }
.search-field input { padding-left: 37px !important; font-size: 13px !important; }
select { padding-right: 30px; }
.filter-select { flex: 0 1 175px; }
.filter-select select { font-size: 12px; }
.table-summary { display: flex; justify-content: space-between; gap: 12px; padding: 0 25px 17px; font-size: 10px; color: #86969d; }
.table-summary strong { color: #4d6872; }
.pagination { border-top: 1px solid var(--line); padding: 19px 25px; display: flex; align-items: center; justify-content: space-between; gap: 15px; color: #819198; font-size: 10px; }
.pagination > div { display: flex; gap: 8px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: #7e9299; font-size: 10px; margin-bottom: 23px; }
.back-link .icon { width: 14px; height: 14px; flex-basis: 14px; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; align-items: start; gap: 20px; }
.step-label { color: var(--teal); font-size: 10px; font-weight: 700; letter-spacing: 1px; white-space: nowrap; }
.step-label span { color: #a2b0b6; font-weight: 500; margin-left: 6px; }
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px 14px; padding: 18px 22px; }
.form-field { min-width: 0; grid-column: span 6; }
.field-wide, .form-grid > .alert { grid-column: 1 / -1; }
.col-12 { grid-column: span 12; }
.col-8 { grid-column: span 8; }
.col-6 { grid-column: span 6; }
.col-5 { grid-column: span 5; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }
.col-2 { grid-column: span 2; }
.form-section-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-left: 4px solid #2563eb;
  padding: 8px 14px;
  border-radius: 6px;
  margin-top: 6px;
  margin-bottom: 2px;
}
.form-section-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: #1e3a8a;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  letter-spacing: -0.2px;
}
.form-section-header .icon {
  width: 17px;
  height: 17px;
  color: #2563eb;
}
.form-field label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 4px; color: #0f172a; letter-spacing: -0.1px; }
.form-field .required { color: #dc2626; font-weight: 700; padding-left: 2px; }
.form-field .optional { font-weight: 400; color: #64748b; font-size: 11px; margin-left: 4px; }
.field-help { color: #475569; font-size: 11.5px; margin-top: 3px; line-height: 1.35; }
.field-error, .errorlist { color: #dc2626; font-size: 12px; font-weight: 600; padding: 0; list-style: none; margin-top: 3px; }
.has-error input, .has-error textarea, .has-error select { border-color: #ef4444; background: #fff8f8; }
.has-error input:focus, .has-error textarea:focus, .has-error select:focus { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15); }
textarea { resize: vertical; min-height: 58px; }
input[type='file'] { background: #f8fafc !important; padding: 7px 11px !important; border: 1.5px dashed #93c5fd !important; font-size: 12px !important; line-height: 1.5 !important; border-radius: 6px; cursor: pointer; }
input[type='file']:hover { background: #eff6ff !important; border-color: #3b82f6 !important; }
input::file-selector-button { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; border-radius: 5px; font-size: 11.5px; font-weight: 600; padding: 5px 11px; margin-right: 10px; cursor: pointer; transition: all .15s ease; }
input::file-selector-button:hover { background: #2563eb; color: #fff; border-color: #2563eb; }
input[type='checkbox'] { accent-color: var(--teal); width: 17px; height: 17px; }
.form-footer { padding: 13px 22px; border-top: 1px solid var(--line); background: #f8fafc; border-radius: 0 0 var(--radius) var(--radius); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.form-footer > p { color: #475569; font-size: 12px; line-height: 1.45; margin: 0; flex: 1 1 280px; }
.guide-card { border-radius: var(--radius); background: #ffffff; padding: 20px 22px; border: 1px solid #dbeafe; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.05); }
.guide-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #eff6ff; }
.guide-card h2 { font-size: 15px; font-weight: 700; color: #0f2744; margin: 0; }
.guide-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; flex-shrink: 0; }
.guide-icon .icon { width: 17px; height: 17px; }
.numbered-guide { list-style: none; margin-top: 10px; }
.numbered-guide li { display: flex; gap: 11px; margin-bottom: 13px; align-items: flex-start; }
.numbered-guide li:last-child { margin-bottom: 0; }
.numbered-guide li > span { height: 23px; width: 23px; flex: 0 0 23px; border: 1.5px solid #bfdbfe; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #2563eb; background: #eff6ff; margin-top: 1px; }
.numbered-guide strong { display: block; font-size: 13px; color: #0f2744; font-weight: 650; line-height: 1.3; }
.numbered-guide p { color: #475569; font-size: 11.5px; margin-top: 3px; line-height: 1.45; }
.aside-note { display: flex; align-items: flex-start; gap: 9px; color: #475569; font-size: 11px; line-height: 1.5; padding: 12px 14px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; margin-top: 12px; }
.aside-note .icon { width: 16px; height: 16px; flex-basis: 16px; margin-top: 2px; color: #2563eb; }
.heading-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 10px; }
.heading-meta .eyebrow { margin-bottom: 0; }
.detail-heading h1 { font-size: 27px; overflow-wrap: anywhere; }
.detail-heading { align-items: flex-start; }
.detail-heading > .button { margin-top: 25px; }
.location-banner { display: flex; align-items: center; gap: 16px; padding: 23px 25px; margin-bottom: 26px; border: 1px solid #bfdbfe; border-radius: var(--radius); background: #f0f7ff; }
.location-symbol { width: 45px; height: 45px; display: grid; place-items: center; background: #dbeafe; color: #1d4ed8; border-radius: 12px; flex: 0 0 45px; }
.location-symbol .icon { width: 23px; height: 23px; }
.location-label { display: block; color: #2563eb; font-size: 8px; font-weight: 650; letter-spacing: 1.5px; margin-bottom: 3px; }
.location-banner strong { color: #1e3a8a; font-size: 16px; }
.location-banner p { font-size: 10px; color: #475569; margin-top: 4px; }
.location-badge { margin-left: auto; display: flex; align-items: center; gap: 6px; color: #2563eb; font-size: 10px; white-space: nowrap; }
.location-badge .icon { width: 16px; height: 16px; }
.location-route { display: flex; align-items: center; gap: 13px; margin-left: auto; color: #2563eb; font-size: 13px; font-weight: 550; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 25px; align-items: start; }
.detail-main { display: grid; gap: 25px; }
.document-data { margin: 0; padding: 25px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
dt { font-size: 11px; color: #72868c; }
dd { font-size: 12px; color: #506871; margin: 5px 0 0; overflow-wrap: anywhere; }
.attachment-card { margin: 0 25px 20px; padding: 15px; border: 1px solid #e2e8f0; border-radius: 7px; display: flex; align-items: center; gap: 12px; background: #f8fafc; }
.attachment-card:hover { border-color: #bfdbfe; background: #eff6ff; }
.attachment-icon { width: 35px; height: 39px; display: grid; place-items: center; flex: 0 0 35px; border: 1px solid #bfdbfe; border-radius: 6px; background: #fff; color: #2563eb; }
.attachment-info { flex: 1; min-width: 0; }
.attachment-info strong { display: block; font-size: 11px; color: #1e3a8a; overflow-wrap: anywhere; }
.attachment-info small { display: block; font-size: 9px; color: #94a3b8; margin-top: 4px; }
.attachment-card > .icon { width: 16px; height: 16px; color: #3b82f6; }
.technical-details { border-top: 1px solid #edf1f2; padding: 14px 25px; font-size: 10px; color: #8d9fa4; }
.technical-details summary { font-size: 10px; }
.technical-details p { margin: 14px 0 5px; }
.hash-value { display: block; font-family: Consolas, "Courier New", monospace; font-size: 10px; color: #739087; word-break: break-all; line-height: 1.8; }
.document-timeline { list-style: none; padding: 25px; }
.timeline-event { display: flex; gap: 15px; position: relative; padding-bottom: 27px; }
.timeline-event:last-child { padding-bottom: 0; }
.timeline-event:not(:last-child)::before { content: ''; position: absolute; left: 12px; width: 1px; top: 26px; bottom: 0; background: #dbeafe; }
.timeline-marker { display: grid; place-items: center; width: 25px; height: 25px; flex: 0 0 25px; border-radius: 50%; border: 1px solid #bfdbfe; background: #eff6ff; color: #2563eb; position: relative; z-index: 1; }
.timeline-marker .icon { width: 13px; height: 13px; flex-basis: 13px; }
.timeline-marker > span { width: 6px; height: 6px; border-radius: 50%; background: #3b82f6; }
.timeline-event-content { flex: 1; min-width: 0; padding-top: 3px; }
.timeline-top { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.timeline-top h3 { font-size: 12px; color: #48656c; }
.timeline-top time { color: #748b90; font-size: 10px; white-space: nowrap; }
.timeline-area { color: #2563eb; margin-top: 6px; font-size: 11px; }
.timeline-actor { color: #64748b; margin-top: 3px; font-size: 10px; }
.timeline-actor span { margin: 0 4px; }
.timeline-note { font-size: 11px; color: #7e9295; line-height: 1.8; background: #f8faf9; padding: 11px 13px; border-radius: 5px; margin-top: 11px; overflow-wrap: anywhere; }
.receipt-stamp { display: flex; gap: 10px; align-items: center; background: #eff6ff; color: #1d4ed8; border: 1px dashed #93c5fd; border-radius: 6px; margin-top: 13px; padding: 10px 12px; max-width: 365px; }
.receipt-stamp:hover { background: #dbeafe; border-color: #60a5fa; color: #1e40af; }
.stamp-symbol { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #93c5fd; border-radius: 50%; }
.stamp-symbol .icon { width: 17px; height: 17px; }
.receipt-stamp strong { display: block; font-size: 8px; font-weight: 650; letter-spacing: 1px; }
.receipt-stamp small { display: block; font-size: 9px; margin-top: 3px; opacity: .8; }
.receipt-stamp > .icon { margin-left: auto; width: 14px; height: 14px; flex-basis: 14px; }
.action-panel .panel-heading { padding: 21px; }
.action-panel .panel-heading h2 { font-size: 14px; }
.action-list { padding: 6px 18px; }
.action-publish { padding: 15px 0 18px; }
.action-feature-icon { display: grid; place-items: center; background: #eff6ff; color: #2563eb; width: 34px; height: 34px; border-radius: 8px; margin-bottom: 13px; }
.action-publish h3 { font-size: 12px; margin-bottom: 6px; }
.action-publish > p { color: #71858c; font-size: 11px; line-height: 1.8; margin-bottom: 18px; }
.action-publish .form-field { margin-bottom: 17px; }
.single-action { padding: 14px 0; }
.action-disclosure { border-top: 1px solid #edf1f2; }
.action-disclosure summary { display: flex; align-items: center; gap: 9px; padding: 17px 0; font-size: 11px; font-weight: 550; color: #637b83; list-style: none; }
.action-disclosure summary::-webkit-details-marker { display: none; }
.action-disclosure summary .icon { width: 16px; height: 16px; flex-basis: 16px; color: #8ca59f; }
.action-disclosure summary .icon:last-child { width: 13px; height: 13px; flex-basis: 13px; margin-left: auto; color: #a2b2b3; }
.action-disclosure[open] summary .icon:last-child { transform: rotate(90deg); }
.action-disclosure form { padding: 0 0 20px; }
.action-disclosure .form-field { margin-bottom: 15px; }
.action-disclosure .form-field label { font-size: 10px; }
.action-disclosure form > .field-help { margin: 0 0 13px; }
.response-list { padding: 4px 25px; }
.response-item { padding: 20px 0; }
.response-item:not(:last-child) { border-bottom: 1px solid var(--line); }
.response-meta { display: flex; align-items: center; justify-content: space-between; gap: 15px; font-size: 11px; }
.response-meta time { color: #97a5a8; font-size: 9px; }
.response-body { color: #778d93; font-size: 12px; line-height: 1.8; margin: 12px 0; overflow-wrap: anywhere; }
.response-body p + p { margin-top: 10px; }
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border: 1px solid #dce9ee; background: #f0f7fa; color: #5a7d8e; border-radius: 8px; font-size: 11px; line-height: 1.7; margin-bottom: 18px; }
.alert > .icon { width: 17px; height: 17px; flex-basis: 17px; margin-top: 1px; }
.alert-success { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.alert-warning { background: #fff8ea; color: #aa8242; border-color: #f2e5c8; }
.alert-danger { background: #fbefec; color: #ab685b; border-color: #efd8d1; }
.alert .errorlist { margin-top: 0; }
.confirmation-layout { max-width: 520px; margin: 16px auto 30px; }
.confirmation-card { padding: 34px; text-align: center; }
.confirmation-icon { width: 59px; height: 59px; margin: 0 auto 21px; background: #eff6ff; color: #2563eb; border-radius: 17px; display: grid; place-items: center; }
.confirmation-icon .icon { width: 27px; height: 27px; }
.confirmation-card h1, .verification-card h1 { font-size: 25px; letter-spacing: -.5px; }
.confirmation-description { color: #84969e; font-size: 12px; line-height: 1.8; margin: 14px auto 23px; max-width: 360px; }
.confirmation-description strong { color: #1e3a8a; }
.operation-summary { text-align: left; margin: 0 0 23px; background: #f7faf9; border: 1px solid #e8efed; padding: 15px 17px; border-radius: 7px; }
.operation-summary > div { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; padding: 5px 0; }
.operation-summary dd { text-align: right; font-size: 11px; max-width: 70%; margin-top: 0; }
.operation-summary dt { font-size: 10px; }
.local-mail-notice { text-align: left; font-size: 10px; margin-bottom: 24px; }
.confirmation-form { text-align: left; }
.confirmation-form .form-field { margin-bottom: 18px; }
.confirmation-form input[name='code'] { text-align: center; font-size: 25px; letter-spacing: 9px; min-height: 58px; font-weight: 500; padding-left: 21px; }
.resend-block { display: flex; justify-content: center; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 11px; color: #92a0a5; margin-top: 21px; }
.confirmation-footnote { color: #a0adb1; font-size: 9px; margin-top: 23px; padding-top: 20px; border-top: 1px solid #edf1f1; }
.confirmation-security { display: flex; justify-content: center; align-items: center; gap: 7px; color: #64748b; font-size: 10px; margin: 20px 10px; }
.confirmation-security .icon { width: 14px; height: 14px; color: #2563eb; }
.areas-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
.area-directory { padding: 4px 25px; }
.area-directory-item { display: flex; gap: 15px; align-items: center; padding: 21px 0; }
.area-directory-item:not(:last-child) { border-bottom: 1px solid #edf1f2; }
.area-directory-icon { width: 43px; height: 43px; flex: 0 0 43px; display: grid; place-items: center; border: 1px solid #bfdbfe; background: #eff6ff; color: #2563eb; border-radius: 10px; }
.area-directory-name { flex: 1; min-width: 0; }
.area-directory-name h3 { font-size: 13px; overflow-wrap: anywhere; }
.area-directory-name p { font-size: 10px; color: #64748b; margin-top: 5px; }
.area-directory-name p span { margin: 0 5px; }
.area-form { padding: 25px; }
.area-form .form-field { margin-bottom: 19px; }
.area-form .button { margin-top: 4px; }
.public-body { background: #f8fafc; min-height: 100vh; display: flex; flex-direction: column; }

/* Public Header Wrapper & Dual Azul Noche Bars */
.public-header-wrapper {
  width: 100%;
  position: relative;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(15, 34, 56, 0.08);
}

/* 1. TOPBAR AZUL NOCHE */
.public-topbar {
  background: #091729;
  color: #94a3b8;
  font-size: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 7px 5.5vw;
}
.public-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1780px;
  margin: 0 auto;
}
.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.topbar-gov-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #f1f5f9;
  font-weight: 700;
  letter-spacing: 0.6px;
  font-size: 10.5px;
}
.topbar-separator {
  color: rgba(255, 255, 255, 0.2);
  font-size: 10px;
}
.topbar-live-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #38bdf8;
  font-weight: 600;
  font-size: 10.5px;
}
.pulse-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  animation: pulse-glow 2s infinite;
}
@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.topbar-clock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #cbd5e1;
  font-size: 10.5px;
}
.topbar-clock .icon {
  width: 13px;
  height: 13px;
  color: #60a5fa;
}
.topbar-interactive-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 10.5px;
  font-weight: 550;
  padding: 2px 7px;
  border-radius: 4px;
  transition: all .15s ease;
}
.topbar-interactive-link .icon {
  width: 13px;
  height: 13px;
  color: #60a5fa;
}
.topbar-interactive-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}
.topbar-security {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #94a3b8;
  font-size: 10.5px;
}
.topbar-security .icon {
  width: 13px;
  height: 13px;
  color: #10b981;
}

/* Campanita interactiva y menú de avisos */
.topbar-dropdown-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.topbar-icon-btn {
  background: transparent;
  border: 0;
  padding: 3px 6px;
  border-radius: 5px;
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  position: relative;
  cursor: pointer;
  transition: all .15s ease;
}
.topbar-icon-btn .icon {
  width: 14px;
  height: 14px;
  color: #fbbf24;
}
.topbar-icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
.topbar-badge-pill {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #ef4444;
  color: #ffffff;
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 10px;
  box-shadow: 0 0 0 2px #091729;
}
.notices-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: -10px;
  width: 330px;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 12px 36px rgba(15, 34, 56, 0.25);
  color: #0f172a;
  padding: 0;
  z-index: 100;
  animation: dropdown-fade-in .15s ease-out;
}
@keyframes dropdown-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.notices-dropdown-menu[hidden] {
  display: none !important;
}
.notices-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 10px 10px 0 0;
}
.notices-header strong {
  font-size: 12.5px;
  color: #0f2238;
  display: flex;
  align-items: center;
  gap: 7px;
}
.notices-header .icon {
  width: 15px;
  height: 15px;
  color: #2563eb;
}
.notices-badge {
  font-size: 9px;
  font-weight: 700;
  background: #dbeafe;
  color: #1d4ed8;
  padding: 2px 7px;
  border-radius: 20px;
  text-transform: uppercase;
}
.notices-list {
  list-style: none;
  padding: 10px 14px;
  margin: 0;
}
.notices-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 4px;
}
.notices-list li:not(:last-child) {
  border-bottom: 1px solid #f1f5f9;
}
.notice-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.notice-green { background: #10b981; }
.notice-blue { background: #3b82f6; }
.notices-list strong {
  display: block;
  font-size: 12px;
  color: #0f172a;
}
.notices-list p {
  font-size: 11px;
  color: #64748b;
  margin: 3px 0 0;
  line-height: 1.45;
}
.notices-footer {
  padding: 9px 16px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  text-align: right;
  border-radius: 0 0 10px 10px;
}
.notices-footer a {
  font-size: 11.5px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}
.notices-footer a:hover {
  text-decoration: underline;
}

/* 2. ENCABEZADO CENTRAL (PUBLIC HEADER) */
.public-header {
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 5.5vw;
  gap: 24px;
  border-bottom: 1px solid #e2e8f0;
}

/* 3. SUBBAR AZUL NOCHE */
.public-subbar {
  background: linear-gradient(90deg, #091729 0%, #0f2238 55%, #162f4d 100%);
  border-top: 1px solid #1e3a8a;
  border-bottom: 3px solid #2563eb;
  padding: 0 5.5vw;
}
.public-subbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
  max-width: 1780px;
  margin: 0 auto;
}
.subbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  white-space: nowrap;
}
.subbar-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 550;
  padding: 11px 14px;
  border-radius: 6px;
  text-decoration: none;
  transition: all .15s ease;
  position: relative;
}
.subbar-item .icon {
  width: 15px;
  height: 15px;
  color: #93c5fd;
  transition: transform .15s ease, color .15s ease;
}
.subbar-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
}
.subbar-item:hover .icon {
  color: #60a5fa;
  transform: translateY(-1px);
}
.subbar-item.is-active {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.35);
  font-weight: 650;
  box-shadow: inset 0 -2px 0 #3b82f6;
}
.subbar-item.is-active .icon {
  color: #60a5fa;
}
.subbar-pill {
  font-size: 9px;
  font-weight: 700;
  background: #2563eb;
  color: #ffffff;
  padding: 1px 6px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

.subbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.subbar-search-form {
  position: relative;
  display: flex;
  align-items: center;
}
.subbar-search-icon {
  position: absolute;
  left: 10px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  pointer-events: none;
  z-index: 2;
}
.subbar-search-icon .icon {
  width: 13px;
  height: 13px;
}
.subbar-search-form input {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  padding: 6px 10px 6px 30px !important;
  font-size: 11.5px !important;
  border-radius: 6px 0 0 6px !important;
  min-height: 32px !important;
  width: 230px;
  transition: all .15s ease;
}
.subbar-search-form input::placeholder {
  color: #94a3b8;
  font-size: 11px;
}
.subbar-search-form input:focus {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #3b82f6 !important;
  width: 260px;
}
.subbar-search-form input:focus::placeholder {
  color: #64748b;
}
.subbar-search-form button {
  background: #2563eb;
  color: #ffffff;
  border: 1px solid #2563eb;
  padding: 0 12px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 0 6px 6px 0;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  transition: background .15s ease;
}
.subbar-search-form button:hover {
  background: #1d4ed8;
}

.subbar-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 6px 13px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  min-height: 32px;
  white-space: nowrap;
  transition: all .15s ease;
}
.subbar-login-btn .icon {
  width: 14px;
  height: 14px;
  color: #60a5fa;
  transition: transform .15s ease;
}
.subbar-login-btn:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}
.subbar-login-btn:hover .icon {
  color: #ffffff;
  transform: rotate(-15deg);
}
.brand-light { color: var(--navy); padding: 0; }
.brand-light:hover { color: var(--navy); }
.brand-light .brand-mark { background: var(--teal); }
.brand-light small { color: #82a3c2; }
.public-header-note { font-size: 10px; color: #64748b; }
.public-content { flex: 1; width: 100%; padding: 35px 5.5vw; }
.public-footer { text-align: center; padding: 25px; font-size: 10px; color: #64748b; }
.login-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 90px; max-width: 1070px; margin: 55px auto; align-items: center; }
.login-introduction .eyebrow { margin-bottom: 20px; }
.login-introduction h1 { font-size: clamp(35px, 3.7vw, 50px); line-height: 1.19; letter-spacing: -1.5px; font-weight: 600; color: #0f2744; }
.login-introduction h1 > span { color: #2563eb; }
.login-lead { font-size: 13px; line-height: 1.9; color: #64748b; margin-top: 24px; max-width: 380px; }
.journey-illustration { display: flex; align-items: flex-start; margin-top: 42px; max-width: 430px; }
.journey-node { text-align: center; flex: 0 0 100px; }
.journey-node > span { width: 42px; height: 42px; border: 1px solid #bfdbfe; background: #eff6ff; color: #2563eb; border-radius: 11px; display: grid; place-items: center; margin: 0 auto 12px; }
.journey-node .icon { width: 20px; height: 20px; }
.journey-node strong { display: block; font-size: 10px; color: #1e3a8a; }
.journey-node small { display: block; font-size: 8px; color: #64748b; margin-top: 4px; }
.journey-line { border-top: 1px dashed #93c5fd; flex: 1; margin: 21px -3px 0; min-width: 10px; }
.login-trust { display: flex; align-items: center; gap: 9px; font-size: 10px; color: #475569; margin-top: 42px; }
.login-trust .icon { width: 17px; height: 17px; color: #2563eb; }
.login-card { padding: 35px; box-shadow: 0 14px 45px rgb(15 39 68 / 6%); }
.login-card-icon { display: grid; place-items: center; width: 39px; height: 39px; background: #eff6ff; color: #2563eb; border-radius: 10px; margin-bottom: 20px; }
.login-card h2 { font-size: 23px; letter-spacing: -.5px; }
.login-card > p { font-size: 11px; color: #64748b; margin-top: 10px; }
.login-form { margin-top: 28px; }
.login-form .form-field { margin-bottom: 21px; }
.login-form .button { margin-top: 4px; min-height: 44px; }
.login-access-note { display: flex; gap: 9px; color: #475569; padding-top: 23px; border-top: 1px solid #e2e8f0; margin-top: 27px; font-size: 10px; line-height: 1.8; }
.login-access-note .icon { height: 15px; width: 15px; flex-basis: 15px; margin-top: 2px; color: #2563eb; }
.login-card .environment-label { font-size: 8px; color: #9fb1a8; display: flex; align-items: center; gap: 6px; margin-top: 20px; }
.environment-label span { height: 4px; width: 4px; border-radius: 50%; background: #60a5fa; }
.verification-layout { max-width: 620px; margin: 10px auto 35px; }
.verification-card { padding: 36px; text-align: center; }
.verification-description { font-size: 12px; color: #64748b; line-height: 1.8; max-width: 410px; margin: 15px auto 25px; }
.verification-data { text-align: left; padding: 0 0 16px; margin: 0; border-top: 1px solid #edf1ef; }
.verification-data > div { border-bottom: 1px solid #edf1ef; padding: 17px 0; }
.verification-data dt { font-size: 10px; color: #64748b; }
.verification-data dd { font-size: 12px; color: #1e3a8a; }
.verification-data .hash-value { font-size: 10px; }
.verification-notice { display: flex; align-items: flex-start; gap: 9px; text-align: left; color: #2563eb; font-size: 10px; line-height: 1.8; margin-top: 8px; padding: 17px; border-radius: 6px; background: #eff6ff; }
.verification-notice .icon { width: 17px; height: 17px; flex-basis: 17px; margin-top: 1px; }
.verification-invalid { background: #fbefeb; color: #b7816c; }
.error-layout { max-width: 600px; margin: 55px auto; padding: 45px; text-align: center; }
.error-layout h1 { font-size: 26px; }
.error-layout > p:not(.eyebrow) { color: #8a9b9e; font-size: 13px; margin-top: 17px; line-height: 1.8; }
.error-layout .button { margin-top: 26px; }
.nav-overlay[hidden] { display: none; }
@media (min-width: 1600px) {
  :root { font-size: 15px; }
  .main-content { padding-top: 42px; }
  .page-heading { margin-bottom: 35px; }
  .metric-card { padding: 24px; }
  .metric-value { font-size: 39px; }
  .document-table td { padding-top: 22px; padding-bottom: 22px; }
}
@media (max-width: 1200px) {
  .sidebar { width: 218px; padding-left: 13px; padding-right: 13px; }
  .app-shell { margin-left: 218px; }
  .brand { font-size: 21px; gap: 9px; padding: 0 9px; }
  .brand-mark { width: 37px; height: 40px; }
  .brand small { font-size: 7px; }
  .nav-link { font-size: 11px; padding-left: 12px; gap: 10px; }
  .main-content { padding: 28px 26px; }
  .topbar { padding: 0 26px; }
  .app-footer { padding: 19px 26px; }
  .page-heading { align-items: flex-start; }
  .page-heading > .button { margin-top: 20px; }
  .metric-grid { gap: 12px; }
  .metric-card { padding: 17px; }
  .metric-top { font-size: 11px; }
  .metric-icon { width: 30px; height: 30px; }
  .metric-card > p { font-size: 9px; }
  .dashboard-bottom-grid { gap: 20px; }
  .form-layout { grid-template-columns: minmax(0, 1fr) 240px; gap: 20px; }
  .guide-card { padding: 22px; }
  .detail-layout { grid-template-columns: minmax(0, 1fr) 275px; gap: 20px; }
  .detail-heading h1 { font-size: 24px; }
  .location-badge { display: none; }
  .areas-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; }
  .login-layout { gap: 55px; }
  .login-card { padding: 30px; }
}
@media (max-width: 1000px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
  .metric-card { padding: 20px; }
  .form-layout, .areas-layout { grid-template-columns: 1fr; }
  .form-aside { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-aside { grid-row: 1; }
  .action-list { padding: 6px 22px; }
  .detail-aside .aside-note { padding-top: 12px; padding-bottom: 0; }
  .action-publish { display: block; }
  .action-publish .button-full { width: auto; }
  .action-feature-icon { display: none; }
  .single-action .button-full { width: auto; }
  .areas-layout > aside { max-width: 100%; }
  .area-form { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; align-items: end; }
  .area-form .form-field { margin-bottom: 0; }
  .area-form > .alert { grid-column: 1 / -1; }
  .area-form > .button { width: fit-content; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; width: 246px; padding: 30px 18px 0; }
  .no-js .sidebar { position: static; transform: none; width: 100%; padding: 20px; }
  .no-js .sidebar-bottom, .no-js .nav-caption, .no-js .nav-divider, .no-js .mobile-menu { display: none; }
  .no-js .nav-links { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 20px; }
  .navigation-open .sidebar { transform: translateX(0); }
  .navigation-open { overflow: hidden; }
  .nav-overlay { position: fixed; inset: 0; z-index: 25; background: rgb(15 39 47 / 40%); backdrop-filter: blur(2px); }
  .app-shell { margin-left: 0; }
  .mobile-menu { display: inline-grid; margin-left: -7px; margin-right: 3px; color: #5a7a75; }
  .topbar { min-height: 65px; }
  .workspace-indicator { display: none; }
  .brand { font-size: 23px; }
  .brand-mark { width: 42px; height: 44px; }
  .brand small { font-size: 8px; }
  .nav-link { font-size: 12px; }
  .login-layout { margin-top: 25px; gap: 36px; }
  .login-introduction h1 { font-size: 38px; }
  .login-lead { font-size: 12px; }
  .journey-node { flex-basis: 80px; }
  .journey-node small { display: none; }
  .login-card { padding: 27px; }
  .login-card h2 { font-size: 21px; }
  .public-header { padding: 14px 4vw; }
  .public-content { padding-left: 5vw; padding-right: 5vw; }
  .topbar-left .topbar-separator:nth-of-type(2),
  .topbar-left .topbar-clock,
  .topbar-right .topbar-security {
    display: none;
  }
  .subbar-search-form {
    display: none;
  }
}
@media (max-width: 660px) {
  h1 { font-size: 25px; }
  .main-content { padding: 24px 18px; }
  .topbar { padding: 0 18px; }
  .topbar-leading { gap: 7px; font-size: 10px; }
  .topbar-leading > .text-muted, .topbar-divider { display: none; }
  .topbar-role { font-size: 9px; }
  .topbar-role .icon { width: 14px; height: 14px; }
  .page-heading { display: block; margin-bottom: 24px; }
  .page-heading > .button { margin-top: 18px; }
  .page-description { font-size: 11px; }
  .eyebrow { font-size: 8px; }
  .metric-grid { gap: 12px; margin-bottom: 22px; }
  .metric-card { padding: 16px; }
  .metric-top { font-size: 10px; }
  .metric-icon { width: 27px; height: 27px; border-radius: 7px; }
  .metric-icon .icon { width: 15px; height: 15px; }
  .metric-value { font-size: 30px; margin-top: 12px; }
  .metric-card > p { font-size: 8px; }
  .panel-heading { padding: 20px; gap: 15px; }
  .panel-heading h2 { font-size: 14px; }
  .panel-heading h2 + p { font-size: 10px; }
  .panel-heading > .text-link { font-size: 9px; flex-shrink: 0; }
  .document-table th:first-child, .document-table td:first-child { padding-left: 20px; }
  .dashboard-bottom-grid { grid-template-columns: 1fr; gap: 22px; }
  .table-document { min-width: 195px; }
  .app-footer { padding: 18px; font-size: 9px; }
  .app-footer > span:last-child { display: none; }
  .info-strip { align-items: flex-start; font-size: 9px; }
  .filter-bar { padding: 20px; gap: 10px; }
  .search-field { flex-basis: 100%; }
  .filter-select { flex: 1 1 calc(50% - 10px); }
  .filter-bar .button { flex: 1; }
  .table-summary { padding: 0 20px 16px; }
  .table-summary span:last-child { display: none; }
  .pagination { padding: 18px 20px; flex-wrap: wrap; }
  .form-grid { grid-template-columns: 1fr; padding: 16px 14px; gap: 12px; }
  .form-field, .col-12, .col-8, .col-6, .col-5, .col-4, .col-3, .col-2 { grid-column: 1 / -1; }
  .form-footer { padding: 15px; }
  .form-footer .button-row { width: 100%; justify-content: stretch; }
  .form-footer .button { width: 100%; }
  .form-aside { display: block; }
  .step-label { display: inline-block; margin-top: 15px; }
  .back-link { margin-bottom: 20px; }
  .detail-heading h1 { font-size: 24px; }
  .location-banner { padding: 20px; align-items: flex-start; gap: 12px; }
  .location-symbol { width: 36px; height: 36px; flex-basis: 36px; border-radius: 9px; }
  .location-symbol .icon { width: 19px; height: 19px; }
  .location-banner strong { font-size: 14px; }
  .location-banner p { font-size: 9px; line-height: 1.7; }
  .location-route { display: none; }
  .document-data { padding: 22px 20px; gap: 20px; }
  .document-data dd { font-size: 11px; }
  .attachment-card { margin: 0 20px 20px; }
  .technical-details { padding-left: 20px; padding-right: 20px; }
  .document-timeline { padding: 22px 20px; }
  .timeline-event { gap: 11px; }
  .timeline-top { display: block; }
  .timeline-top time { display: block; margin-top: 4px; }
  .receipt-stamp { padding: 9px; gap: 8px; }
  .receipt-stamp strong { font-size: 7px; }
  .receipt-stamp small { font-size: 8px; }
  .receipt-stamp > .icon { display: none; }
  .response-meta { display: block; }
  .response-meta time { display: block; margin-top: 5px; }
  .confirmation-card, .verification-card { padding: 28px 22px; }
  .confirmation-card h1, .verification-card h1 { font-size: 23px; }
  .confirmation-description { font-size: 11px; }
  .operation-summary { padding: 13px; }
  .confirmation-security { font-size: 9px; }
  .area-directory { padding: 0 20px; }
  .area-directory-item { gap: 11px; }
  .area-directory-icon { width: 36px; height: 36px; flex-basis: 36px; }
  .area-directory-name h3 { font-size: 12px; }
  .area-directory-name p { font-size: 9px; }
  .area-directory-item > .badge { font-size: 8px; }
  .area-form { display: block; padding: 22px 20px; }
  .area-form .form-field { margin-bottom: 18px; }
  .public-topbar { padding: 6px 14px; }
  .topbar-left .topbar-live-status,
  .topbar-right .topbar-interactive-link span { display: none; }
  .public-header { padding: 12px 14px; }
  .public-header-note { display: none; }
  .public-header .brand { font-size: 20px; }
  .public-subbar { padding: 0 10px; }
  .public-subbar-inner { flex-wrap: nowrap; overflow-x: auto; gap: 8px; }
  .subbar-item span { font-size: 11px; }
  .subbar-login-btn span { display: none; }
  .public-content { padding: 15px 16px 30px; }
  .login-layout { grid-template-columns: 1fr; gap: 30px; margin: 12px auto; max-width: 430px; }
  .login-introduction h1 { font-size: 35px; line-height: 1.15; letter-spacing: -1px; }
  .login-introduction h1 br:first-child { display: none; }
  .login-introduction .eyebrow { margin-bottom: 14px; }
  .login-lead { font-size: 11px; margin-top: 17px; }
  .journey-illustration, .login-trust { display: none; }
  .login-card { padding: 26px; }
  .login-card-icon { display: none; }
  .login-card h2 { font-size: 22px; }
  .login-form { margin-top: 24px; }
  .public-footer { font-size: 9px; padding: 20px; }
  .error-layout { padding: 32px 22px; margin: 25px auto; }
  .error-layout h1 { font-size: 23px; }
  .public-nav { flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
  .cargo-header { flex-direction: column; gap: 20px; }
}

.badge-external { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; font-weight: 700; }
.badge-internal { background: #f2effc; color: #553ea1; border: 1px solid #ded6f7; font-weight: 700; }
.public-nav { display: flex; gap: 10px; align-items: center; }
.public-nav-link { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; padding: 7px 13px; border-radius: 7px; color: var(--navy); background: #eef4f8; transition: all .15s; }
.public-nav-link:hover { background: #dbeafe; color: var(--teal-dark); }
.public-nav-link .icon { width: 14px; height: 14px; }
.public-nav-login { background: var(--teal); color: #fff; }
.public-nav-login:hover { background: var(--teal-dark); color: #fff; }

.cargo-sheet { max-width: 820px; margin: 14px auto; background: #fff; border-radius: 12px; border: 1px solid var(--line); padding: 22px 26px; box-shadow: var(--shadow); }
.cargo-header { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding-bottom: 14px; border-bottom: 1.5px solid #e2e8f0; margin-bottom: 14px; }
.cargo-title-area h1 { font-size: 21px; color: var(--navy); margin-bottom: 2px; line-height: 1.2; }
.cargo-title-area p { color: var(--muted); font-size: 11.5px; }
.cargo-badges-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.cargo-badge-box { display: flex; flex-direction: column; gap: 2px; }
.cargo-badge-label { font-size: 9px; font-weight: 750; letter-spacing: 0.9px; color: #64748b; text-transform: uppercase; }
.cargo-code-badge { display: inline-block; background: #eff6ff; color: #1d4ed8; padding: 5px 14px; border-radius: 7px; font-size: 17px; font-weight: 750; letter-spacing: 0.8px; border: 1px solid #bfdbfe; }
.cargo-pin-badge { display: inline-block; background: #f1f5f9; color: #0f172a; padding: 5px 14px; border-radius: 7px; font-size: 16px; font-weight: 750; letter-spacing: 2.5px; border: 1px dashed #94a3b8; }
.cargo-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
.cargo-qr-box { display: inline-block; padding: 5px; background: #ffffff; border: 1px solid #bfdbfe; border-radius: 8px; box-shadow: 0 2px 5px rgba(15, 34, 56, 0.05); }
.cargo-qr-box img { display: block; width: 84px; height: 84px; }
.cargo-stamp-compact { margin: 0 !important; padding: 5px 9px !important; background: #eff6ff; border-color: #bfdbfe; }
.cargo-stamp-compact .stamp-symbol { width: 22px; height: 22px; }
.cargo-stamp-compact .stamp-symbol .icon { width: 13px; height: 13px; }
.cargo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 18px; margin: 0; }
.cargo-item dt { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.9px; color: var(--muted); margin-bottom: 2px; }
.cargo-item dd { margin: 0; font-size: 12px; font-weight: 550; color: var(--ink); word-break: break-word; line-height: 1.35; }
.cargo-item-full { grid-column: 1 / -1; }
.cargo-subject-box { line-height: 1.45; background: #f8fafc; padding: 7px 12px; border-radius: 6px; border: 1px solid var(--line); font-size: 12px; }
.cargo-hash-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding-top: 8px; border-top: 1px dashed #cbd5e1; margin-top: 2px; }
.cargo-hash-code { font-size: 10px; word-break: break-all; background: #eef3f5; padding: 2px 6px; border-radius: 4px; display: inline-block; }
.cargo-legal-note { font-size: 10.5px; color: #64748b; max-width: 310px; text-align: right; line-height: 1.35; margin: 0; }
.cargo-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.tracking-container { max-width: 900px; margin: 25px auto; }
.tracking-search-box { background: #fff; border-radius: 12px; border: 1px solid var(--line); padding: 32px; box-shadow: var(--shadow); margin-bottom: 25px; }
.tracking-search-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: flex-end; margin-top: 18px; }
.tracking-timeline-box { background: #fff; border-radius: 12px; border: 1px solid var(--line); padding: 32px; box-shadow: var(--shadow); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  @page { size: A4 portrait; margin: 8mm 12mm; }
  .sidebar, .topbar, .app-footer, .public-header-wrapper, .public-topbar, .public-header, .public-top-wave, .public-wave-footer-wrap, .public-footer-midnight, .public-footer, .whatsapp-float-btn, .schedule-modal-overlay, .messages, .cargo-screen-only, .cargo-actions, .back-link, .page-heading > .button, .attachment-card, .technical-details, .detail-aside { display: none !important; }
  html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; height: auto !important; min-height: 0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .app-shell, .public-content, .main-content { margin: 0 !important; padding: 0 !important; width: 100% !important; max-width: 100% !important; }
  .cargo-sheet {
    box-shadow: none !important;
    border: 1.5px solid #94a3b8 !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 132mm !important;
    overflow: hidden !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .cargo-header { padding-bottom: 8px !important; margin-bottom: 9px !important; }
  .cargo-title-area h1 { font-size: 17px !important; }
  .cargo-title-area p { font-size: 10px !important; }
  .cargo-badges-row { margin-top: 6px !important; gap: 10px !important; }
  .cargo-code-badge { font-size: 14px !important; padding: 3px 10px !important; }
  .cargo-pin-badge { font-size: 13.5px !important; padding: 3px 10px !important; }
  .cargo-qr-box { padding: 3px !important; }
  .cargo-qr-box img { width: 68px !important; height: 68px !important; }
  .cargo-stamp-compact { padding: 3px 7px !important; }
  .cargo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 7px 14px !important; }
  .cargo-item dt { font-size: 8.5px !important; margin-bottom: 1px !important; }
  .cargo-item dd { font-size: 10.5px !important; line-height: 1.25 !important; }
  .cargo-subject-box { padding: 5px 9px !important; font-size: 10.5px !important; line-height: 1.3 !important; }
  .cargo-hash-row { padding-top: 6px !important; margin-top: 2px !important; }
  .cargo-hash-code { font-size: 8.5px !important; }
  .cargo-legal-note { font-size: 9px !important; max-width: 260px !important; }
}

/* ==========================================================================
   PORTAL CIUDADANO: MESA DE PARTES VIRTUAL Y TRÁMITE DOCUMENTARIO
   ========================================================================== */

.portal-container {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 6px 0 24px;
}

/* Banner Oficial de Horario de Recepción */
.portal-schedule-banner {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  border-left: 5px solid #d97706;
  border-radius: 12px;
  padding: 16px 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: 0 2px 12px rgba(217, 119, 6, 0.08);
}
.portal-schedule-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #d97706;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.portal-schedule-badge .icon {
  width: 14px;
  height: 14px;
}
.portal-schedule-text {
  flex: 1;
}
.portal-schedule-text strong {
  display: block;
  font-size: 14px;
  color: #92400e;
  font-weight: 750;
  margin-bottom: 4px;
}
.portal-schedule-text p {
  font-size: 12.5px;
  color: #78350f;
  line-height: 1.55;
  margin: 0;
}
.public-nav-highlight {
  background: #2563eb !important;
  color: #ffffff !important;
}
.public-nav-highlight:hover {
  background: #1d4ed8 !important;
  color: #ffffff !important;
}
.public-nav-link.is-active {
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 700;
}

/* Hero Institucional */
.portal-hero {
  text-align: center;
  max-width: 840px;
  margin: 6px auto 0;
}

.portal-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  margin-bottom: 16px;
}

.portal-hero-badge .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563eb;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.portal-hero h1 {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 800;
  color: #0f2238;
  letter-spacing: -0.8px;
  line-height: 1.22;
  margin: 0 0 14px;
}

.portal-hero h1 span {
  color: #2563eb;
}

.portal-hero-lead {
  font-size: clamp(14px, 1.35vw, 15.5px);
  color: #64748b;
  line-height: 1.65;
  margin: 0 auto 22px;
  max-width: 720px;
}

.portal-trust-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 22px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.portal-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #ffffff;
  padding: 6px 13px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.portal-trust-pill .icon {
  width: 16px;
  height: 16px;
  color: #2563eb;
}

/* Tarjetas Principales de Servicios (2 Columnas) */
.portal-services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.portal-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 34px 32px;
  box-shadow: 0 4px 18px -2px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.portal-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -4px rgba(15, 34, 56, 0.09);
  border-color: #bfdbfe;
}

.portal-card-primary {
  border-top: 4px solid #2563eb;
}

.portal-card-secondary {
  border-top: 4px solid #0284c7;
}

.portal-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.portal-card-icon-box {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #dbeafe;
  display: grid;
  place-items: center;
}

.portal-card-icon-box .icon {
  width: 25px;
  height: 25px;
}

.portal-card-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
}

.portal-card-content h2 {
  font-size: 21px;
  font-weight: 700;
  color: #0f2238;
  margin: 0 0 10px;
  letter-spacing: -0.3px;
}

.portal-card-content p {
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.6;
  margin: 0 0 20px;
}

.portal-card-list {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.portal-card-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: #334155;
  line-height: 1.5;
}

.portal-card-list-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.portal-card-list-check .icon {
  width: 12px;
  height: 12px;
}

.portal-card-action {
  margin-top: auto;
}

.portal-btn-primary {
  min-height: 48px;
  background: #2563eb;
  color: #ffffff !important;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13.5px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  border: 1px solid #2563eb;
}

.portal-btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.portal-btn-secondary {
  min-height: 48px;
  background: #ffffff;
  color: #1e3a8a !important;
  border: 1.5px solid #bfdbfe;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13.5px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.portal-btn-secondary:hover {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8 !important;
  transform: translateY(-1px);
}

/* Sección de Pasos del Trámite */
.portal-steps-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 32px 34px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.portal-steps-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #f1f5f9;
}

.portal-steps-header h2 {
  font-size: 18px;
  color: #0f2238;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin: 3px 0 0;
}

.portal-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.portal-step-card {
  padding: 22px 20px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  position: relative;
  transition: border-color 0.15s, background 0.15s;
}

.portal-step-card:hover {
  border-color: #bfdbfe;
  background: #ffffff;
}

.portal-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  padding: 3px 9px;
  border-radius: 6px;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.portal-step-card h3 {
  font-size: 14.5px;
  color: #0f2238;
  font-weight: 700;
  margin: 0 0 6px;
}

.portal-step-card p {
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}

/* Fila Informativa y Legal */
.portal-info-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.portal-info-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.portal-info-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-info-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #eff6ff;
  color: #2563eb;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.portal-info-icon .icon {
  width: 18px;
  height: 18px;
}

.portal-info-card-top h3 {
  font-size: 13.5px;
  color: #0f2238;
  font-weight: 700;
  margin: 0;
}

.portal-info-card p {
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}

.portal-info-link {
  font-size: 11.5px;
  font-weight: 600;
  color: #2563eb;
  background: none;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  text-align: left;
}

.portal-info-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Banner Institucional de Operadores (Discreto y seguro) */
.portal-internal-banner {
  background: linear-gradient(135deg, #0f2238 0%, #173252 100%);
  border: 1px solid #1e3f64;
  border-radius: 14px;
  padding: 24px 30px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 4px 14px rgba(15, 34, 56, 0.15);
}

.portal-internal-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.portal-internal-shield {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #60a5fa;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.portal-internal-shield .icon {
  width: 22px;
  height: 22px;
}

.portal-internal-text h3 {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 3px;
}

.portal-internal-text p {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}

.portal-internal-action {
  flex-shrink: 0;
}

.portal-btn-internal {
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.portal-btn-internal:hover {
  background: #ffffff;
  color: #0f2238 !important;
  border-color: #ffffff;
}

/* MODALES / DIALOGS */
.portal-dialog {
  border: none;
  border-radius: 20px;
  padding: 0;
  background: transparent;
  max-width: 660px;
  width: 92%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

.portal-dialog::backdrop {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

.portal-dialog-content {
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.portal-dialog-header {
  padding: 22px 28px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

.portal-dialog-title-group h2 {
  font-size: 19px;
  color: #0f172a;
  margin: 4px 0 0;
}

.portal-dialog-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: #e0f2fe;
  color: #0284c7;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
}

.portal-dialog-close {
  background: transparent;
  border: none;
  font-size: 26px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.portal-dialog-close:hover {
  color: #0f172a;
}

.portal-dialog-body {
  padding: 26px 28px;
  max-height: 65vh;
  overflow-y: auto;
}

.portal-dialog-footer {
  padding: 16px 28px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
}

/* Guía de usuario lista */
.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.guide-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.guide-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.guide-step-body h3 {
  font-size: 15px;
  color: #0f172a;
  margin: 0 0 4px;
}

.guide-step-body p {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

/* Lista de avisos */
.notices-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.notice-item {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #edf2f7;
}

.notice-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  height: fit-content;
  white-space: nowrap;
}

.tag-convocatoria { background: #dbeafe; color: #1d4ed8; }
.tag-comunicado { background: #e0e7ff; color: #4338ca; }
.tag-legal { background: #fae8ff; color: #86198f; }
.tag-horario { background: #fef3c7; color: #b45309; }
.tag-seguridad { background: #fee2e2; color: #b91c1c; }

.notice-info strong {
  display: block;
  font-size: 13.5px;
  color: #0f172a;
  margin-bottom: 4px;
}

.notice-info p {
  font-size: 12px;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

/* RESPONSIVE PORTAL */
@media (max-width: 900px) {
  .portal-services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .portal-steps-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .portal-info-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .portal-internal-banner {
    flex-direction: column;
    text-align: center;
    gap: 18px;
  }
  .portal-internal-left {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   MODAL DE HORARIO OFICIAL: MESA DE PARTES CERRADO (DISEÑO INSTITUCIONAL)
   ========================================================================== */
.schedule-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 20, 36, 0.78);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInModal .2s ease-out;
}
.schedule-modal-overlay[hidden] {
  display: none !important;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.schedule-modal-card {
  position: relative;
  background: #ffffff;
  width: 100%;
  max-width: 480px;
  border-radius: 24px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  animation: popModal .25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popModal {
  from { transform: scale(0.92) translateY(12px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.schedule-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #ffffff;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: all .15s ease;
}
.schedule-modal-close:hover {
  background: rgba(255, 255, 255, 0.45);
  transform: scale(1.1);
}

.schedule-modal-header {
  color: #ffffff;
  padding: 34px 24px 26px;
  text-align: center;
  position: relative;
}

/* 1. TEMA TARDE: Naranja institucional con sol y nube */
.schedule-modal-header.theme-tarde {
  background: linear-gradient(180deg, #ea580c 0%, #c2410c 100%);
}
.schedule-modal-header.theme-tarde h2 {
  color: #002b54;
}
.schedule-modal-header.theme-tarde .schedule-modal-subtitle {
  color: #ffffff;
}

/* 2. TEMA MAÑANA: Ámbar soleado */
.schedule-modal-header.theme-manana {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}
.schedule-modal-header.theme-manana h2 {
  color: #002b54;
}

/* 3. TEMA NOCHE: Azul noche */
.schedule-modal-header.theme-noche {
  background: linear-gradient(180deg, #004b93 0%, #003670 100%);
}
.schedule-modal-header.theme-noche h2 {
  color: #ffffff;
}

.schedule-period-icon {
  margin-bottom: 12px;
  display: inline-flex;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.schedule-modal-header h2 {
  font-size: 23px;
  font-weight: 800;
  margin: 0 0 5px;
  letter-spacing: -0.4px;
}

.schedule-modal-subtitle {
  font-size: 13.5px;
  color: #cbd5e1;
  font-weight: 500;
  margin: 0;
}

.schedule-modal-body {
  padding: 24px 28px 28px;
  background: #ffffff;
}

.schedule-section-label {
  font-size: 10.5px;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 8px;
  text-align: center;
}

.schedule-current-time-box {
  background: #f0f7ff;
  border: 1px solid #d0e4ff;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  color: #003d7a;
  font-size: 13.5px;
  margin-bottom: 20px;
}

.schedule-clock-icon {
  color: #0284c7;
  flex-shrink: 0;
}

.schedule-hours-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #0056b3;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.schedule-hours-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.schedule-hours-day {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
}
.schedule-hours-day svg {
  flex-shrink: 0;
}

.schedule-hours-val {
  font-weight: 600;
  color: #334155;
}

.text-closed-red {
  color: #ef4444 !important;
  font-weight: 700 !important;
}

.schedule-next-open-box {
  border: 1.5px dashed #93c5fd;
  border-radius: 14px;
  background: #fafcff;
  padding: 16px 20px;
  text-align: center;
  margin-bottom: 22px;
}

.schedule-door-icon {
  margin-bottom: 4px;
  display: inline-flex;
}

.schedule-next-label {
  font-size: 12px;
  color: #64748b;
  margin: 0 0 3px;
}

.schedule-next-time {
  font-size: 17px;
  font-weight: 800;
  color: #003d7a;
  margin: 0;
}

.schedule-modal-action {
  width: 100%;
}

.schedule-btn-back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s ease;
}

/* Colores de botón según jornada */
.schedule-btn-back.theme-tarde,
.schedule-btn-back.theme-manana {
  background: #f59e0b;
  color: #0f172a;
}
.schedule-btn-back.theme-tarde:hover,
.schedule-btn-back.theme-manana:hover {
  background: #d97706;
  color: #0f172a;
  transform: translateY(-1px);
}

.schedule-btn-back.theme-noche {
  background: #002b54;
  color: #ffffff;
}
.schedule-btn-back.theme-noche:hover {
  background: #001f3d;
  color: #ffffff;
  transform: translateY(-1px);
}

/* LOGO INSTITUCIONAL (SOLO EL LOGO) */
.brand.brand-logo-only {
  padding: 0;
  gap: 0;
  display: inline-flex;
  align-items: center;
}

.institutional-logo {
  height: 62px;
  width: 62px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(15, 34, 56, 0.14));
  transition: transform 0.2s ease;
}

.institutional-logo:hover {
  transform: scale(1.04);
}

.institutional-logo-sidebar {
  height: 70px;
  width: 70px;
  margin: 0 auto;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.sidebar .brand.brand-logo-only {
  justify-content: center;
  width: 100%;
}

/* BOTÓN FLOTANTE DE WHATSAPP EN LA ESQUINA INFERIOR DERECHA */
.whatsapp-float-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45), 0 2px 6px rgba(0, 0, 0, 0.18);
  z-index: 9999;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
}

.whatsapp-float-btn:hover {
  background: #1ebe5d;
  color: #ffffff;
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.58), 0 4px 10px rgba(0, 0, 0, 0.22);
}

.whatsapp-float-btn svg {
  width: 32px;
  height: 32px;
  display: block;
}

/* ONDAS EN AZUL NOCHE EN LA PARTE INFERIOR (PIE DE PÁGINA) */
.public-wave-footer-wrap {
  width: 100%;
  margin-top: auto;
  overflow: hidden;
  line-height: 0;
}

.public-wave-divider {
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.public-wave-divider svg {
  display: block;
  width: 100%;
  height: 78px;
}

.public-footer-midnight {
  background: linear-gradient(90deg, #091729 0%, #0f2238 50%, #1e3a8a 100%);
  color: #cbd5e1;
  padding: 16px 5.5vw 24px;
  line-height: 1.5;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
}

.public-footer-inner {
  max-width: 1780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.public-footer-sub {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

/* ONDAS EN AZUL NOCHE EN LA PARTE SUPERIOR (ENCABEZADO) */
.public-header-wrapper {
  box-shadow: none !important;
}

.public-header {
  border-bottom: none !important;
}

.public-top-wave {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  background: transparent;
}

.public-top-wave svg {
  display: block;
  width: 100%;
  height: 54px;
  filter: drop-shadow(0 4px 10px rgba(15, 34, 56, 0.12));
}

/* ==========================================================================
   VISOR DE DOCUMENTOS INTEGRADO (PDF / ADJUNTOS / HOJA DE RUTA)
   ========================================================================== */
.document-viewer-panel {
  margin-bottom: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.viewer-header-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  padding: 10px 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.viewer-nav-tabs {
  display: flex;
  gap: 6px;
  background: #e2e8f0;
  padding: 4px;
  border-radius: 8px;
}

.viewer-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: transparent;
  border: none;
  border-radius: 6px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.viewer-tab-btn:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.6);
}

.viewer-tab-btn.is-active {
  color: #1e3a8a;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.viewer-tab-btn .icon {
  width: 15px;
  height: 15px;
}

.viewer-actions-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.viewer-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  text-decoration: none;
  transition: all 0.15s ease;
  line-height: 1.4;
}

.viewer-action-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.viewer-action-btn.btn-highlight {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.viewer-action-btn.btn-highlight:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

.viewer-action-btn .icon {
  width: 14px;
  height: 14px;
}

.viewer-content-pane {
  display: none;
  position: relative;
  width: 100%;
  background: #f1f5f9;
}

.viewer-content-pane.is-active {
  display: block;
}

.viewer-frame {
  width: 100%;
  height: 640px;
  border: none;
  display: block;
  background: #ffffff;
}

.viewer-image-box {
  width: 100%;
  padding: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0f172a;
  min-height: 440px;
}

.viewer-image-box img {
  max-width: 100%;
  max-height: 600px;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}

.viewer-docx-placeholder {
  padding: 60px 30px;
  text-align: center;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.viewer-docx-icon {
  width: 72px;
  height: 72px;
  background: #e0f2fe;
  color: #0284c7;
  border-radius: 16px;
  display: grid;
  place-items: center;
}

.viewer-docx-icon .icon {
  width: 38px;
  height: 38px;
}

.viewer-docx-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.viewer-docx-desc {
  font-size: 13px;
  color: #64748b;
  max-width: 520px;
  line-height: 1.6;
}

/* ==========================================================================
   SELLOS OFICIALES DE LA ADMINISTRACIÓN PÚBLICA (PERÚ)
   I.E.S.T.P. "HUMBERTO YAURI MARTÍNEZ"
   ========================================================================== */
.official-reception-stamp {
  position: relative;
  background: #f0f7ff;
  border: 3px double #1e40af;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 18px 0 22px;
  color: #1e3a8a;
  box-shadow: 0 3px 12px rgba(30, 64, 175, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.stamp-ribbon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid #1e40af;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.stamp-institution {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stamp-emblem {
  width: 38px;
  height: 38px;
  background: #1e40af;
  color: #ffffff;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(30, 64, 175, 0.3);
}

.stamp-titles h4 {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #1e3a8a;
  margin: 0;
  text-transform: uppercase;
}

.stamp-titles span {
  font-size: 10px;
  font-weight: 600;
  color: #3b82f6;
  letter-spacing: 1px;
  display: block;
}

.stamp-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #1e40af;
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.stamp-body-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
}

.stamp-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
}

.stamp-field {
  font-size: 11px;
  line-height: 1.4;
}

.stamp-field-label {
  font-size: 9px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
}

.stamp-field-value {
  font-weight: 700;
  color: #0f172a;
}

.stamp-field-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  font-weight: 800;
  color: #1e40af;
  background: #dbeafe;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.stamp-qr-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  padding-left: 14px;
  border-left: 1px dashed #93c5fd;
}

.stamp-qr-img {
  width: 76px;
  height: 76px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 3px;
  background: #ffffff;
  display: block;
}

.stamp-qr-col small {
  font-size: 8px;
  font-weight: 600;
  color: #2563eb;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.stamp-footer-hash {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #bfdbfe;
  font-size: 9px;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.stamp-hash-mono {
  font-family: ui-monospace, monospace;
  font-size: 9px;
  color: #334155;
  background: rgba(255, 255, 255, 0.7);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Sello Oficial de Derivación / Pase entre oficinas */
.official-derivation-stamp {
  margin-top: 12px;
  background: #f8fafc;
  border: 2px dashed #0284c7;
  border-radius: 8px;
  padding: 12px 16px;
  color: #0369a1;
  position: relative;
}

.derivation-stamp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  border-bottom: 1px solid #e0f2fe;
  padding-bottom: 6px;
}

.derivation-stamp-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #0369a1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.derivation-stamp-route {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #bae6fd;
  font-size: 12px;
  margin-bottom: 8px;
}

.derivation-stamp-origin {
  font-weight: 700;
  color: #0f172a;
}

.derivation-stamp-arrow {
  color: #0284c7;
  font-weight: 800;
}

.derivation-stamp-dest {
  font-weight: 700;
  color: #0284c7;
}

.derivation-stamp-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #64748b;
  flex-wrap: wrap;
  gap: 6px;
}

.derivation-stamp-note {
  margin-top: 6px;
  padding: 6px 10px;
  background: #ffffff;
  border-left: 3px solid #0284c7;
  border-radius: 0 4px 4px 0;
  font-size: 11px;
  color: #334155;
  line-height: 1.4;
}

@media print {
  .document-viewer-panel, .viewer-header-tabs, .viewer-actions-toolbar {
    display: none !important;
  }
  .official-reception-stamp, .official-derivation-stamp {
    border-color: #000000 !important;
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
  }
  .stamp-ribbon {
    border-bottom-color: #000000 !important;
  }
  .stamp-field-code {
    background: #f1f5f9 !important;
    color: #000000 !important;
  }
}




