:root {
  --hec-blue: #0b5ea8;
  --hec-blue-dark: #073d70;
  --hec-blue-soft: #eaf4ff;
  --hec-green: #198754;
  --hec-green-dark: #126c43;
  --hec-green-soft: #eaf8f1;
  --hec-cyan: #1e88c7;
  --hec-bg: #f4f8fc;
  --hec-surface: #ffffff;
  --hec-text: #1d2a36;
  --hec-muted: #647587;
  --hec-border: #dce6ef;
  --hec-danger: #c93636;
  --hec-warning: #a86500;
  --hec-shadow: 0 16px 45px rgba(31, 67, 101, .11);
  --hec-shadow-sm: 0 8px 24px rgba(31, 67, 101, .09);
  --hec-radius: 18px;
  --hec-radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.portal-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--hec-text);
  background:
    radial-gradient(circle at 8% 8%, rgba(30, 136, 199, .10), transparent 28rem),
    radial-gradient(circle at 92% 20%, rgba(25, 135, 84, .08), transparent 25rem),
    var(--hec-bg);
  line-height: 1.55;
}

a {
  color: var(--hec-blue);
}

a:hover {
  color: var(--hec-blue-dark);
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

img {
  max-width: 100%;
}

/* Header */
.portal-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: linear-gradient(108deg, #07365f 0%, #0b5ea8 64%, #087451 100%);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 7px 24px rgba(7, 45, 75, .22);
}

.portal-nav {
  width: min(1440px, calc(100% - 48px));
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(16px, 2vw, 30px);
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex: 0 0 auto;
}

.portal-brand img {
  height: 54px;
  width: auto;
  object-fit: contain;
}

.portal-brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}

.portal-brand-copy strong {
  color: #fff;
  font-size: .98rem;
}

.portal-brand-copy span {
  color: rgba(255, 255, 255, .76);
  font-size: .76rem;
}

.portal-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
}

.portal-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 10px;
  border-radius: 10px;
  color: rgba(255, 255, 255, .94);
  font-size: .84rem;
  font-weight: 650;
  white-space: nowrap;
  transition: .2s ease;
}

.portal-nav-link:hover {
  background: rgba(255, 255, 255, .14);
  color: #fff;
}

.portal-nav-link.is-primary {
  background: #fff;
  color: #075285;
  box-shadow: 0 5px 14px rgba(4, 35, 65, .16);
}

.portal-nav-link.is-primary:hover {
  background: #e9f5ff;
  color: #073d70;
}

.portal-nav-link.is-danger {
  color: #ffe2df;
}

.portal-nav-link.is-danger:hover {
  background: rgba(255, 225, 223, .15);
  color: #fff;
}

.portal-social {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: 5px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, .3);
}

.portal-social a {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #fff;
  transition: .2s ease;
}

.portal-social a:hover {
  background: rgba(255, 255, 255, .14);
}

.portal-menu-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .12);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 11px;
}

.portal-main {
  flex: 1;
}

.portal-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.portal-section {
  padding: 46px 0;
}

.portal-section-tight {
  padding: 28px 0 42px;
}

/* Shared typography */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--hec-blue);
  background: var(--hec-blue-soft);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 750;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.page-title {
  margin: 12px 0 8px;
  color: var(--hec-blue-dark);
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  font-weight: 800;
  line-height: 1.12;
}

.page-lead {
  margin: 0;
  color: var(--hec-muted);
  font-size: 1rem;
  max-width: 720px;
}

.section-title {
  margin: 0 0 8px;
  color: var(--hec-blue-dark);
  font-weight: 800;
  font-size: 1.35rem;
}

.section-copy {
  margin: 0;
  color: var(--hec-muted);
}

.muted {
  color: var(--hec-muted);
}

.required-mark {
  color: var(--hec-danger);
}

/* Cards */
.surface-card {
  background: var(--hec-surface);
  border: 1px solid var(--hec-border);
  border-radius: var(--hec-radius);
  box-shadow: var(--hec-shadow-sm);
}

.panel-padding {
  padding: clamp(22px, 3vw, 34px);
}

/* Alerts */
.portal-alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: .91rem;
}

.portal-alert-danger {
  background: #fff0f0;
  border: 1px solid #f2caca;
  color: #8b2e2e;
}

.portal-alert-info {
  background: #eef7ff;
  border: 1px solid #cfe6f8;
  color: #245f89;
}

.portal-alert-success {
  background: var(--hec-green-soft);
  border: 1px solid #c8e8d8;
  color: #1c6946;
}

/* Buttons */
.portal-btn {
  border: 0;
  border-radius: 11px;
  min-height: 44px;
  padding: 10px 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 750;
  font-size: .92rem;
  text-decoration: none !important;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.portal-btn:hover {
  transform: translateY(-1px);
}

.portal-btn-primary {
  background: var(--hec-blue);
  color: white;
  box-shadow: 0 7px 18px rgba(11, 94, 168, .20);
}

.portal-btn-primary:hover {
  background: var(--hec-blue-dark);
  color: white;
}

.portal-btn-success {
  background: var(--hec-green);
  color: white;
  box-shadow: 0 7px 18px rgba(25, 135, 84, .18);
}

.portal-btn-success:hover {
  background: var(--hec-green-dark);
  color: white;
}

.portal-btn-light {
  background: #f3f7fb;
  border: 1px solid var(--hec-border);
  color: var(--hec-blue-dark);
}

.portal-btn-light:hover {
  background: #e8f1f8;
}

.portal-btn-block {
  width: 100%;
}

/* Forms */
.form-card-header {
  margin-bottom: 24px;
}

.form-card-header .form-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hec-blue-soft);
  color: var(--hec-blue);
  font-size: 1.15rem;
  margin-bottom: 14px;
}

.portal-form .form-group {
  margin-bottom: 16px;
}

.portal-form label {
  display: block;
  margin-bottom: 7px;
  color: #30485c;
  font-size: .9rem;
  font-weight: 700;
}

.portal-form input:not([type="checkbox"]):not([type="radio"]),
.portal-form select,
.portal-form textarea,
.login-form input:not([type="checkbox"]):not([type="radio"]),
.auth-form input:not([type="checkbox"]):not([type="radio"]) {
  width: 100%;
  min-height: 46px;
  border: 1px solid #ccd9e5;
  border-radius: 11px;
  padding: 10px 12px;
  color: var(--hec-text);
  background: #fff;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.portal-form textarea {
  min-height: 110px;
  resize: vertical;
}

.portal-form input:focus,
.portal-form select:focus,
.portal-form textarea:focus,
.login-form input:focus,
.auth-form input:focus {
  border-color: #5ca5df;
  box-shadow: 0 0 0 4px rgba(11, 94, 168, .10);
  background: #fff;
}

.portal-form input[type="file"] {
  padding: 8px 10px;
  background: #fbfdff;
}

.portal-form input[readonly] {
  background: #f2f6f9;
  color: #566c7d;
}

.portal-form input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--hec-blue);
  flex: 0 0 auto;
  margin-top: 2px;
}

.portal-form .checkbox-row,
.register-form .form-group:has(input[type="checkbox"]) {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.portal-form .checkbox-row label,
.register-form .form-group:has(input[type="checkbox"]) label {
  margin: 0;
}

.field-help {
  display: block;
  color: var(--hec-muted);
  font-size: .79rem;
  margin-top: 6px;
}

.field-error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: #a72f2f;
  font-size: .80rem;
  margin-top: 6px;
}

.form-note {
  display: flex;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid #d8e8f4;
  background: #f2f9ff;
  border-radius: 11px;
  color: #46657c;
  font-size: .82rem;
  margin: 12px 0 18px;
}

.non-field-errors {
  margin-bottom: 16px;
}

.errorlist {
  list-style: none;
  padding: 0;
  margin: 0;
  color: #a72f2f;
  font-size: .82rem;
}

/* Login + password */
.auth-layout {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
  min-height: calc(100vh - 170px);
  display: grid;
  grid-template-columns: 1.05fr .85fr;
  gap: 28px;
  align-items: stretch;
}

.auth-visual {
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  min-height: 530px;
  background: linear-gradient(145deg, #07518f, #0d79bc 62%, #17865e);
  color: white;
  box-shadow: var(--hec-shadow);
}

.auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .17;
  background-image: radial-gradient(circle at 30% 30%, white 0 1px, transparent 1px);
  background-size: 22px 22px;
}

.auth-visual-content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: clamp(30px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-mark {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 16px;
  font-size: 1.5rem;
}

.auth-visual h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.08;
  margin: 22px 0 14px;
}

.auth-visual p {
  max-width: 500px;
  color: rgba(255, 255, 255, .87);
  font-size: 1rem;
}

.auth-benefits {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.auth-benefit {
  display: flex;
  gap: 10px;
  align-items: center;
  color: rgba(255, 255, 255, .94);
  font-size: .91rem;
}

.auth-benefit i {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  align-self: center;
  padding: clamp(26px, 4vw, 42px);
}

.auth-card h2 {
  margin: 0 0 7px;
  color: var(--hec-blue-dark);
  font-size: 1.7rem;
  font-weight: 800;
}

.auth-card>p {
  color: var(--hec-muted);
  margin: 0 0 24px;
}

.login-form p,
.auth-form p {
  margin: 0 0 16px;
}

.login-form label,
.auth-form label {
  display: block;
  margin-bottom: 7px;
  color: #30485c;
  font-size: .9rem;
  font-weight: 700;
}

.login-form button,
.auth-form button {
  width: 100%;
  margin-top: 4px;
}

.login-links {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 1px solid var(--hec-border);
  margin-top: 22px;
  padding-top: 18px;
  font-size: .86rem;
}

.login-links a {
  font-weight: 700;
}

.auth-single {
  width: min(500px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
  min-height: calc(100vh - 190px);
  display: flex;
  align-items: center;
}

.auth-single .surface-card {
  width: 100%;
}

/* Register */
.register-layout {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 54px;
  display: grid;
  grid-template-columns: .78fr 1.22fr;
  gap: 28px;
  align-items: start;
}

.register-aside {
  position: sticky;
  top: 104px;
  overflow: hidden;
}

.register-aside-image {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  display: block;
}

.register-aside-content {
  padding: 24px;
}

.register-aside-points {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.register-point {
  display: flex;
  gap: 10px;
  color: #4b6072;
  font-size: .88rem;
}

.register-point i {
  color: var(--hec-green);
  margin-top: 3px;
}

.register-card {
  padding: clamp(22px, 4vw, 36px);
}

.register-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
}

.register-form .form-group {
  min-width: 0;
  margin-bottom: 15px;
}

.register-form .form-group:nth-last-child(-n+3),
.register-form .form-actions {
  grid-column: 1 / -1;
}

.register-form label {
  display: block;
  margin-bottom: 7px;
  color: #30485c;
  font-size: .9rem;
  font-weight: 700;
}

.register-form input:not([type="checkbox"]),
.register-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #ccd9e5;
  border-radius: 11px;
  padding: 10px 12px;
  outline: none;
}

.register-form input:focus,
.register-form select:focus {
  border-color: #5ca5df;
  box-shadow: 0 0 0 4px rgba(11, 94, 168, .10);
}

.register-form .form-actions {
  margin-top: 4px;
}

/* Office */
.office-hero {
  padding: 44px 0 28px;
}

.office-hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: clamp(28px, 5vw, 48px);
  background: linear-gradient(115deg, #073f74, #0b69ad 60%, #12845c);
  color: white;
  box-shadow: var(--hec-shadow);
}

.office-hero-card::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  right: -110px;
  top: -150px;
  background: rgba(255, 255, 255, .10);
}

.office-hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.office-hero h1 {
  margin: 9px 0 10px;
  font-size: clamp(2rem, 4vw, 3.05rem);
  font-weight: 800;
}

.office-hero p {
  margin: 0;
  color: rgba(255, 255, 255, .86);
}

.office-quick {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.office-quick .portal-btn-light {
  background: rgba(255, 255, 255, .13);
  border-color: rgba(255, 255, 255, .22);
  color: white;
}

.office-services {
  padding: 16px 0 54px;
}

.services-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.service-card {
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--hec-shadow);
}

.service-image-wrap {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: #eaf1f7;
}

.service-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.service-card:hover .service-image {
  transform: scale(1.025);
}

.service-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: var(--hec-blue-dark);
  font-size: .75rem;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .09);
}

.service-body {
  padding: 22px;
}

.service-body h3 {
  color: var(--hec-blue-dark);
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 7px;
}

.service-body p {
  color: var(--hec-muted);
  font-size: .9rem;
  min-height: 44px;
  margin-bottom: 18px;
}

/* Request form */
.request-page {
  padding: 38px 0 56px;
}

.request-head {
  margin-bottom: 24px;
}

.request-layout {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 26px;
  align-items: start;
}

.request-guide {
  overflow: hidden;
  position: sticky;
  top: 102px;
}

.request-guide-header {
  padding: 24px 24px 18px;
  background: linear-gradient(135deg, #f1f8ff, #f5fbf8);
  border-bottom: 1px solid var(--hec-border);
}

.request-guide-list {
  padding: 12px;
  max-height: calc(100vh - 190px);
  overflow: auto;
}

.guide-item {
  border: 1px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 8px;
  transition: .2s ease;
}

.guide-item:last-child {
  margin-bottom: 0;
}

.guide-button {
  width: 100%;
  border: 0;
  background: #fff;
  padding: 13px 14px;
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  color: #29465c;
  font-weight: 750;
  cursor: pointer;
}

.guide-button:hover {
  background: #f6faff;
}

.guide-button .guide-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--hec-blue-soft);
  color: var(--hec-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.guide-button .chevron {
  margin-left: auto;
  color: #8393a1;
  transition: transform .2s ease;
}

.guide-item.active {
  border-color: #d8e8f4;
  background: #fafdff;
}

.guide-item.active .chevron {
  transform: rotate(180deg);
}

.guide-content {
  display: none;
  padding: 0 15px 15px 56px;
  color: #52697b;
  font-size: .87rem;
}

.guide-item.active .guide-content {
  display: block;
}

.guide-content ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.guide-content li {
  margin: 5px 0;
}

.guide-download {
  padding: 15px 12px 12px;
}

.request-form-card {
  padding: clamp(22px, 3vw, 32px);
}

.request-form-card .form-group:has(input[type="hidden"]) {
  display: none;
}

/* Requests table */
.requests-page {
  padding: 40px 0 58px;
}

.requests-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.table-card {
  overflow: hidden;
}

.portal-table-wrap {
  overflow-x: auto;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

.portal-table th {
  background: #f1f7fc;
  color: #3d566a;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .035em;
  font-weight: 800;
  padding: 13px 15px;
  border-bottom: 1px solid var(--hec-border);
  white-space: nowrap;
}

.portal-table td {
  padding: 14px 15px;
  border-bottom: 1px solid #edf1f5;
  color: #435a6d;
  font-size: .88rem;
  vertical-align: middle;
}

.portal-table tr:last-child td {
  border-bottom: 0;
}

.portal-table tbody tr:hover {
  background: #fbfdff;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 9px;
  font-weight: 800;
  font-size: .76rem;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-pending {
  color: #966000;
  background: #fff6dd;
}

.status-approved {
  color: #17633f;
  background: #e9f7f0;
}

.status-rejected {
  color: #a33333;
  background: #fff0f0;
}

.empty-state {
  text-align: center;
  padding: 50px 24px;
}

.empty-state-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 17px;
  background: var(--hec-blue-soft);
  color: var(--hec-blue);
  font-size: 1.35rem;
}

.pagination-wrap {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.pagination-list {
  display: flex;
  gap: 5px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pagination-list a,
.pagination-list span {
  min-width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hec-border);
  border-radius: 10px;
  color: #496074;
  background: white;
  font-size: .85rem;
  font-weight: 700;
  padding: 0 10px;
}

.pagination-list .active span {
  color: white;
  background: var(--hec-blue);
  border-color: var(--hec-blue);
}

.pagination-list .disabled span {
  opacity: .45;
}

/* Success */
.success-page {
  min-height: calc(100vh - 190px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 16px;
}

.success-card {
  width: min(520px, 100%);
  padding: 42px 32px;
  text-align: center;
}

.success-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: var(--hec-green-soft);
  color: var(--hec-green);
  font-size: 1.8rem;
}

.success-card h1 {
  color: var(--hec-blue-dark);
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.success-card p {
  color: var(--hec-muted);
  margin-bottom: 24px;
}

.success-actions {
  display: flex;
  gap: 9px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer */
.portal-footer {
  background: #07365f;
  color: rgba(255, 255, 255, .82);
  margin-top: auto;
}

.portal-footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
}

.portal-footer-brand strong {
  color: white;
  display: block;
  font-size: .93rem;
}

.portal-footer-brand span {
  font-size: .79rem;
}

.portal-footer-links {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.portal-footer-links a {
  color: rgba(255, 255, 255, .82);
  font-size: .79rem;
}

.portal-footer-links a:hover {
  color: white;
  text-decoration: underline;
}

@media (max-width: 1280px) {
  .portal-brand-copy span {
    display: none;
  }

  .portal-nav {
    width: min(100% - 32px, 1180px);
    min-height: 70px;
    justify-content: space-between;
    gap: 16px;
  }

  .portal-brand img {
    height: 48px;
  }

  .portal-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
  }

  .portal-menu {
    display: none;
    position: absolute;
    top: calc(100% - 1px);
    left: 16px;
    right: 16px;
    padding: 12px;
    background: linear-gradient(145deg, #07365f, #0b5a86);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 0 0 14px 14px;
    box-shadow: 0 16px 32px rgba(7, 45, 75, .24);
    flex-direction: column;
    align-items: stretch;
  }

  .portal-menu.is-open {
    display: flex;
  }

  .portal-nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 11px 13px;
  }

  .portal-social {
    justify-content: flex-start;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, .22);
    padding: 8px 4px 0;
    margin: 3px 0 0;
  }

  .auth-layout,
  .register-layout,
  .request-layout {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 330px;
  }

  .register-aside,
  .request-guide {
    position: static;
  }

  .request-guide-list {
    max-height: none;
  }

  .register-layout {
    max-width: 760px;
  }
}

@media (max-width: 720px) {
  .portal-nav {
    width: min(100% - 22px, 1180px);
    min-height: 68px;
  }

  .portal-brand {
    gap: 9px;
  }

  .portal-brand img {
    width: 96px;
    height: 36px;
  }

  .portal-brand-copy strong {
    max-width: 145px;
    font-size: .8rem;
  }

  .portal-shell,
  .auth-layout,
  .register-layout {
    width: min(100% - 22px, 1180px);
  }

  .portal-section {
    padding: 34px 0;
  }

  .auth-layout {
    padding: 28px 0 40px;
    min-height: auto;
  }

  .auth-visual {
    display: none;
  }

  .auth-card {
    width: 100%;
  }

  .register-layout {
    padding: 28px 0 42px;
  }

  .register-aside-image {
    aspect-ratio: 16 / 7;
  }

  .register-aside-content {
    padding: 20px;
  }

  .register-form {
    grid-template-columns: 1fr;
  }

  .register-form .form-group,
  .register-form .form-actions {
    grid-column: 1;
  }

  .office-hero {
    padding: 28px 0 20px;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .service-image-wrap {
    height: 190px;
  }

  .services-heading,
  .requests-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .request-page,
  .requests-page {
    padding: 28px 0 44px;
  }

  .guide-content {
    padding-left: 15px;
  }

  .portal-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-footer-links {
    justify-content: flex-start;
  }

  .success-card {
    padding: 34px 22px;
  }
}

@media (max-width: 420px) {
  .page-title {
    font-size: 1.65rem;
  }

  .office-hero-card {
    padding: 25px 21px;
  }

  .office-quick {
    flex-direction: column;
  }

  .office-quick .portal-btn {
    width: 100%;
  }

  .login-links {
    flex-direction: column;
  }

  .portal-btn {
    width: 100%;
  }

  .success-actions .portal-btn {
    width: 100%;
  }
}

/* =========================================================
   Oficina Virtual 2026 - catálogo principal de 4 servicios
   ========================================================= */
.office-hero-v2 {
  padding: 34px 0 20px;
}

.office-hero-card-v2 {
  min-height: 330px;
  display: flex;
  align-items: center;
  padding: clamp(30px, 4vw, 50px);
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, .13), transparent 25%),
    linear-gradient(122deg, #063b69 0%, #0b67a8 47%, #0b7b57 100%);
}

.office-hero-card-v2::before {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -90px;
  bottom: -220px;
  border: 46px solid rgba(255, 255, 255, .055);
  border-radius: 50%;
}

.office-hero-card-v2::after {
  width: 290px;
  height: 290px;
  right: -80px;
  top: -145px;
  background: rgba(255, 255, 255, .07);
}

.office-eyebrow {
  background: rgba(255, 255, 255, .14) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, .16);
}

.office-hero-card-v2 .office-hero-content {
  max-width: 900px;
  width: min(100%, 900px);
}

.office-hero-card-v2 h1 {
  max-width: 780px;
  margin-top: 12px;
  font-size: clamp(2.15rem, 4vw, 3.35rem);
  line-height: 1.06;
  letter-spacing: -.025em;
}

.office-hero-card-v2 p {
  max-width: 780px;
  font-size: .98rem;
  line-height: 1.65;
}

.office-quick-v2 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 25px;
}

.office-quick-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px;
  background: rgba(255, 255, 255, .105);
  color: #fff !important;
  text-decoration: none !important;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.office-quick-link:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .17);
}

.office-quick-icon {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .15);
  font-size: .92rem;
}

.office-quick-link strong,
.office-quick-link small {
  display: block;
}

.office-quick-link strong {
  color: #fff;
  font-size: .8rem;
  line-height: 1.2;
}

.office-quick-link small {
  margin-top: 3px;
  color: rgba(255, 255, 255, .73);
  font-size: .66rem;
  line-height: 1.2;
}

.office-hero-decoration {
  position: absolute;
  right: clamp(20px, 5vw, 70px);
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, .07);
  font-size: clamp(8rem, 16vw, 13rem);
  pointer-events: none;
}

.office-services-v2 {
  padding-top: 22px;
}

.services-heading-v2 {
  margin-bottom: 18px;
}

.office-section-kicker {
  display: block;
  margin-bottom: 5px;
  color: #08784a;
  font-size: .73rem;
  font-weight: 900;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.service-grid-v2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.service-card-v2 {
  position: relative;
  overflow: hidden;
  border: 1px solid #dbe5ec;
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 10px 32px rgba(23, 54, 75, .075);
}

.service-card-v2:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 44px rgba(23, 54, 75, .13);
}

.service-image-wrap-v2 {
  height: 245px;
  background: #eef4f7;
}

.service-image-wrap-v2 .service-image {
  object-position: center;
}

.service-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 32, 53, .02) 42%, rgba(4, 32, 53, .18) 100%);
  pointer-events: none;
}

.service-badge-green {
  color: #08784a;
}

.service-badge-blue {
  color: #0b65a8;
}

.service-badge-teal {
  color: #087a72;
}

.service-badge-navy {
  color: #073f74;
}

.service-body-v2 {
  position: relative;
  padding: 26px 24px 24px;
}

.service-icon {
  position: absolute;
  top: -25px;
  right: 23px;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 5px solid #fff;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(27, 60, 80, .10);
  font-size: 1rem;
}

.service-icon-green {
  background: #e9f7f0;
  color: #08784a;
}

.service-icon-blue {
  background: #eaf4fb;
  color: #0b65a8;
}

.service-icon-teal {
  background: #e7f7f5;
  color: #087a72;
}

.service-icon-navy {
  background: #eaf1f7;
  color: #073f74;
}

.service-body-v2 h3 {
  margin-right: 55px;
  font-size: 1.34rem;
  line-height: 1.25;
}

.service-body-v2 p {
  min-height: 66px;
  margin: 9px 0 20px;
  color: #5e7282;
  font-size: .9rem;
  line-height: 1.6;
}

.service-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.service-actions .portal-btn {
  min-height: 42px;
  white-space: nowrap;
}

.service-main-btn {
  box-shadow: 0 7px 16px rgba(23, 74, 107, .12);
}

.service-secondary-btn {
  background: #fff;
}

.portal-btn-outline {
  border: 1px solid #cbd9e2;
  background: #fff;
  color: #31536b;
}

.portal-btn-outline:hover {
  border-color: #9ebbcf;
  background: #f5f9fc;
  color: #173f5d;
}

@media (max-width: 980px) {
  .office-quick-v2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .office-hero-decoration {
    opacity: .55;
  }
}

@media (max-width: 760px) {
  .service-grid-v2 {
    grid-template-columns: 1fr;
  }

  .service-image-wrap-v2 {
    height: 210px;
  }

  .service-body-v2 p {
    min-height: 0;
  }
}

@media (max-width: 520px) {
  .office-hero-v2 {
    padding-top: 20px;
  }

  .office-hero-card-v2 {
    min-height: 0;
    padding: 26px 20px;
    border-radius: 19px;
  }

  .office-quick-v2 {
    grid-template-columns: 1fr;
  }

  .office-hero-decoration {
    display: none;
  }

  .service-actions,
  .service-actions .portal-btn {
    width: 100%;
  }

  .service-actions .portal-btn {
    justify-content: center;
  }

  .service-image-wrap-v2 {
    height: 185px;
  }
}


/* Contraste reforzado - Oficina Virtual 2026-09-14 */
.portal-main .office-hero-card-v2 .office-quick-link,
.portal-main .office-hero-card-v2 .office-quick-link:visited {
  color: #fff !important;
  text-decoration: none !important;
}

.portal-main .office-hero-card-v2 .office-quick-link strong {
  color: #fff !important;
}

.portal-main .office-hero-card-v2 .office-quick-link small {
  color: rgba(255, 255, 255, .88) !important;
}

.portal-main .service-actions a.portal-btn-success,
.portal-main .service-actions a.portal-btn-primary {
  color: #fff !important;
}

.portal-main .service-actions a.portal-btn-outline {
  color: #173f5d !important;
}


/* Clinical result request forms - V5 */
.clinical-request-head {
  max-width: 900px;
  margin-bottom: 26px;
}

.clinical-request-head .page-lead {
  max-width: 860px;
  line-height: 1.65;
}

.clinical-request-layout {
  display: grid;
  grid-template-columns: minmax(280px, .76fr) minmax(0, 1.55fr);
  gap: 26px;
  align-items: start;
}

.clinical-summary-card {
  position: sticky;
  top: 96px;
  padding: 26px;
  overflow: hidden;
  background: linear-gradient(155deg, #ffffff 0%, #f7fbff 58%, #f2faf6 100%);
}

.clinical-summary-card::before {
  content: "";
  position: absolute;
  right: -60px;
  top: -70px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(11, 94, 168, .06);
  pointer-events: none;
}

.clinical-summary-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 18px;
  border-radius: 17px;
  background: #e9f4fd;
  color: var(--hec-blue);
  font-size: 1.45rem;
  box-shadow: inset 0 0 0 1px rgba(11, 94, 168, .08);
}

.clinical-summary-icon--xray {
  background: #edf7f3;
  color: var(--hec-green-dark);
  box-shadow: inset 0 0 0 1px rgba(25, 135, 84, .10);
}

.clinical-summary-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--hec-blue);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.clinical-summary-card h2 {
  margin: 0 0 10px;
  color: var(--hec-blue-dark);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.25;
}

.clinical-summary-card>p {
  margin: 0;
  color: var(--hec-muted);
  font-size: .9rem;
  line-height: 1.6;
}

.clinical-checklist {
  display: grid;
  gap: 10px;
  margin: 22px 0;
  padding: 0;
  list-style: none;
}

.clinical-checklist li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid #e1eaf1;
  border-radius: 12px;
  background: rgba(255, 255, 255, .82);
}

.clinical-checklist li>i {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--hec-blue-soft);
  color: var(--hec-blue);
  font-size: .9rem;
}

.clinical-checklist strong {
  display: block;
  color: #304b61;
  font-size: .87rem;
  line-height: 1.35;
}

.clinical-checklist small {
  display: block;
  margin-top: 3px;
  color: var(--hec-muted);
  font-size: .77rem;
  line-height: 1.45;
}

.clinical-privacy-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 13px;
  margin: 0 0 18px;
  border: 1px solid #d7e9df;
  border-radius: 12px;
  background: #f3faf6;
  color: #456657;
  font-size: .79rem;
  line-height: 1.5;
}

.clinical-privacy-note i {
  margin-top: 2px;
  color: var(--hec-green);
}

.clinical-back-btn {
  margin-top: 4px;
}

.clinical-form-card {
  padding: 0;
  overflow: hidden;
}

.clinical-form-header {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 0;
  padding: 26px 28px 22px;
  border-bottom: 1px solid var(--hec-border);
  background: linear-gradient(135deg, #f7fbff, #fbfefc);
}

.clinical-form-header .form-icon {
  flex: 0 0 48px;
  margin: 0;
}

.clinical-form {
  padding: 0;
}

.clinical-form-section {
  padding: 24px 28px;
  border-bottom: 1px solid #e9eef2;
}

.clinical-section-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.clinical-section-number {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--hec-blue);
  color: #fff;
  font-size: .82rem;
  font-weight: 900;
  box-shadow: 0 5px 13px rgba(11, 94, 168, .18);
}

.clinical-section-heading h3 {
  margin: 1px 0 3px;
  color: #2c4c64;
  font-size: 1rem;
  font-weight: 800;
}

.clinical-section-heading p {
  margin: 0;
  color: var(--hec-muted);
  font-size: .81rem;
  line-height: 1.45;
}

.clinical-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.clinical-form-grid .form-group {
  min-width: 0;
  margin: 0;
}

.clinical-field-full {
  grid-column: 1/-1;
}

.clinical-form .form-group>label {
  margin-bottom: 7px;
  color: #30485c;
  font-size: .85rem;
  font-weight: 800;
  line-height: 1.35;
}

.clinical-form input:not([type="checkbox"]):not([type="radio"]),
.clinical-form select,
.clinical-form textarea {
  border-color: #c8d6e2;
  background: #fff;
}

.clinical-form input[readonly] {
  border-color: #dde6ed;
  background: #f5f8fa;
  color: #566c7d;
}

.clinical-form textarea {
  min-height: 128px;
}

.clinical-choice-card {
  padding: 15px 16px;
  border: 1px solid #d7e7df;
  border-radius: 13px;
  background: #f7fbf9;
}

.clinical-choice-card .checkbox-row {
  align-items: center;
}

.clinical-choice-card .checkbox-row label {
  color: #244f3b;
  font-size: .9rem;
  font-weight: 800;
}

.clinical-choice-card .field-help {
  padding-left: 27px;
  color: #60776b;
}

.clinical-captcha-wrap {
  padding-top: 2px;
}

.clinical-submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 28px;
  background: #fbfcfd;
}

.clinical-submit-copy {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  max-width: 480px;
  color: #617485;
  font-size: .79rem;
  line-height: 1.45;
}

.clinical-submit-copy i {
  margin-top: 2px;
  color: var(--hec-green);
}

.clinical-submit-btn {
  flex: 0 0 auto;
  min-width: 180px;
}

@media(max-width:980px) {
  .clinical-request-layout {
    grid-template-columns: 1fr;
  }

  .clinical-summary-card {
    position: static;
  }
}

@media(max-width:680px) {
  .clinical-request-page {
    padding-top: 26px;
  }

  .clinical-form-header,
  .clinical-form-section,
  .clinical-submit-bar {
    padding-left: 18px;
    padding-right: 18px;
  }

  .clinical-form-header {
    align-items: flex-start;
  }

  .clinical-form-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .clinical-field-full {
    grid-column: auto;
  }

  .clinical-submit-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .clinical-submit-btn {
    width: 100%;
  }

  .clinical-summary-card {
    padding: 20px;
  }
}


/* V7 - autorización de tratamiento de datos */
.privacy-consent-card {
  padding: 15px 16px !important;
  border: 1px solid #cfe2d8;
  border-radius: 13px;
  background: #f5faf7;
}

.privacy-consent-row {
  align-items: flex-start !important;
}

.privacy-consent-row input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: 4px;
}

.privacy-consent-row label {
  margin: 0 !important;
  color: #234c39;
  font-size: .9rem;
  line-height: 1.45;
}

.privacy-consent-copy {
  display: inline-block;
  margin-top: 3px;
  color: #5e7469;
  font-size: .82rem;
  font-weight: 500;
}

.privacy-consent-copy a {
  color: #087247;
  text-decoration: underline;
  font-weight: 700;
}