:root {
  --portal-black: #0a0a0a;
  --portal-black-soft: #191919;
  --portal-gold: #c8a34f;
  --portal-gold-dark: #967322;
  --portal-gold-soft: #f6edd8;
  --portal-surface: #ffffff;
  --portal-bg: #f7f5f0;
  --portal-line: #e4ded1;
  --portal-text: #202020;
  --portal-muted: #706d67;
  --portal-success: #247a50;
  --portal-warning: #a26a08;
  --portal-danger: #a43a35;
  --portal-info: #315c8c;
  --portal-radius: 16px;
  --portal-shadow: 0 18px 48px rgba(16, 16, 16, .075);
}

body.evaluator-portal {
  min-height: 100vh;
  color: var(--portal-text);
  background: var(--portal-bg);
}

.evaluator-portal .main-header {
  box-shadow: 0 6px 20px rgba(0, 0, 0, .055);
}

.evaluator-portal .award-nav .nav-link {
  font-size: .82rem;
}

.portal-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-toggle,
.portal-user-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 13px;
  color: #242424;
  border: 1px solid #dcd5c7;
  border-radius: 9px;
  background: #fff;
  font-size: .78rem;
  font-weight: 700;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.language-toggle:hover,
.portal-user-button:hover,
.portal-user-button[aria-expanded="true"] {
  color: #111;
  border-color: var(--portal-gold);
  background: #fbf7ed;
}

.portal-user-button {
  padding: 6px 10px 6px 7px;
}

.portal-avatar {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: #111;
  border-radius: 50%;
  background: linear-gradient(135deg, #ead390, var(--portal-gold));
  font-size: .9rem;
}

.portal-user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
}

.portal-user-meta small {
  color: var(--portal-muted);
  font-size: .62rem;
  font-weight: 500;
}

.portal-user-menu {
  min-width: 210px;
  padding: 8px;
  border: 1px solid var(--portal-line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .12);
}

.portal-user-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border-radius: 8px;
  font-size: .78rem;
}

.portal-user-menu .dropdown-item:hover {
  background: var(--portal-gold-soft);
}

/* Login */
.evaluator-login-page {
  background:
    radial-gradient(circle at 13% 12%, rgba(200, 163, 79, .14), transparent 28%),
    radial-gradient(circle at 88% 82%, rgba(200, 163, 79, .12), transparent 30%),
    var(--portal-bg);
}

.login-main {
  position: relative;
  min-height: calc(100vh - 132px);
  display: flex;
  align-items: center;
  padding: 54px 0 70px;
  overflow: hidden;
}

.login-main::before,
.login-main::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(200, 163, 79, .17);
  border-radius: 50%;
}

.login-main::before {
  width: 330px;
  height: 330px;
  inset-inline-start: -180px;
  top: 14%;
}

.login-main::after {
  width: 500px;
  height: 500px;
  inset-inline-end: -280px;
  bottom: -250px;
}

.login-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(340px, .84fr) minmax(430px, 1.16fr);
  overflow: hidden;
  border: 1px solid rgba(200, 163, 79, .22);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .12);
}

.login-brand-panel {
  position: relative;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 52px 45px;
  overflow: hidden;
  color: rgba(255, 255, 255, .78);
  background: linear-gradient(145deg, #070707, #232323);
}

.login-brand-panel::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  inset-inline-end: -120px;
  top: -120px;
  border: 46px solid rgba(200, 163, 79, .17);
  border-radius: 50%;
}

.login-brand-panel::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  inset-inline-start: -80px;
  bottom: -85px;
  border: 28px solid rgba(200, 163, 79, .1);
  border-radius: 50%;
}

.login-brand-content,
.login-brand-foot {
  position: relative;
  z-index: 2;
}

.login-security-mark {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  margin-bottom: 34px;
  color: #151515;
  border-radius: 16px;
  background: linear-gradient(135deg, #ead394, var(--portal-gold));
  box-shadow: 0 12px 30px rgba(200, 163, 79, .2);
  font-size: 1.8rem;
}

.login-brand-panel .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
  color: #ecd497;
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.login-brand-panel .eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--portal-gold);
}

.login-brand-panel h1 {
  max-width: 430px;
  margin-bottom: 20px;
  color: #fff;
  font-size: clamp(2rem, 3.5vw, 3.25rem);
}

.login-brand-panel p {
  max-width: 430px;
  margin: 0;
  color: rgba(255, 255, 255, .68);
  font-size: .9rem;
  line-height: 2;
}

.login-brand-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .62);
  font-size: .73rem;
}

.login-brand-foot i {
  color: #ecd497;
  font-size: 1rem;
}

.login-form-panel {
  min-height: 600px;
  display: flex;
  align-items: center;
  padding: 55px 64px;
  background: #fff;
}

.login-form-wrap {
  width: 100%;
  max-width: 470px;
  margin: auto;
}

.login-form-heading {
  margin-bottom: 31px;
}

.login-form-heading .small-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  color: var(--portal-gold-dark);
  border: 1px solid #e4d6af;
  border-radius: 12px;
  background: #fbf7ed;
  font-size: 1.2rem;
}

.login-form-heading h2 {
  margin-bottom: 9px;
  color: #101010;
  font-size: 1.75rem;
}

.login-form-heading p {
  margin: 0;
  color: var(--portal-muted);
  font-size: .86rem;
}

.evaluator-login-form .form-label,
.portal-filter-card .form-label {
  margin-bottom: 8px;
  color: #2b2b2b;
  font-size: .78rem;
  font-weight: 800;
}

.portal-input-wrap {
  position: relative;
}

.portal-input-wrap > i {
  position: absolute;
  z-index: 3;
  inset-inline-start: 15px;
  top: 50%;
  color: #9b7a27;
  transform: translateY(-50%);
}

.portal-input-wrap .form-control {
  min-height: 52px;
  padding-inline-start: 45px;
  border-color: #dcd6ca;
  border-radius: 10px;
  font-size: .84rem;
}

.portal-input-wrap .form-control:focus,
.portal-filter-card .form-control:focus,
.portal-filter-card .form-select:focus {
  border-color: var(--portal-gold);
  box-shadow: 0 0 0 .2rem rgba(200, 163, 79, .14);
}

.password-toggle {
  position: absolute;
  z-index: 4;
  inset-inline-end: 9px;
  top: 50%;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #777;
  border: 0;
  border-radius: 8px;
  background: transparent;
  transform: translateY(-50%);
}

.password-toggle:hover {
  color: #111;
  background: #f6f1e5;
}

.evaluator-login-form .form-check-input {
  border-color: #b7aa8d;
}

.evaluator-login-form .form-check-input:checked {
  border-color: #161616;
  background-color: #161616;
}

.login-submit {
  width: 100%;
  min-height: 52px;
  margin-top: 7px;
  border-radius: 10px;
}

.demo-credentials {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin-top: 20px;
  color: #665626;
  border: 1px dashed #d4bd79;
  border-radius: 10px;
  background: #fffaf0;
  font-size: .69rem;
  line-height: 1.7;
}

.demo-credentials i {
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--portal-gold-dark);
}

.login-alert {
  margin-bottom: 18px;
  border: 0;
  border-inline-start: 4px solid var(--portal-danger);
  border-radius: 9px;
  font-size: .78rem;
}

/* Portal pages */
.portal-hero {
  position: relative;
  padding: 52px 0 98px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(118deg, #060606, #272727);
}

.portal-hero::after {
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  inset-inline-end: -115px;
  top: -155px;
  border: 42px solid rgba(200, 163, 79, .13);
  border-radius: 50%;
}

.portal-hero .container {
  position: relative;
  z-index: 2;
}

.portal-breadcrumb {
  margin-bottom: 13px;
  color: rgba(255, 255, 255, .57);
  font-size: .72rem;
}

.portal-breadcrumb a {
  color: rgba(255, 255, 255, .68);
}

.portal-breadcrumb a:hover {
  color: #fff;
}

.portal-hero h1 {
  margin-bottom: 11px;
  color: #fff;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
}

.portal-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, .69);
  font-size: .88rem;
}

.portal-content {
  position: relative;
  z-index: 4;
  padding: 0 0 76px;
  margin-top: -54px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 112px;
  padding: 21px;
  border: 1px solid var(--portal-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .055);
}

.stat-icon {
  flex: 0 0 49px;
  width: 49px;
  height: 49px;
  display: grid;
  place-items: center;
  color: #141414;
  border-radius: 12px;
  background: var(--portal-gold-soft);
  font-size: 1.2rem;
}

.stat-card[data-tone="dark"] .stat-icon {
  color: #f2d898;
  background: #151515;
}

.stat-card[data-tone="success"] .stat-icon {
  color: var(--portal-success);
  background: #eaf6f0;
}

.stat-card[data-tone="warning"] .stat-icon {
  color: var(--portal-warning);
  background: #fff5df;
}

.stat-label {
  display: block;
  margin-bottom: 2px;
  color: var(--portal-muted);
  font-size: .7rem;
  font-weight: 600;
}

.stat-value {
  display: block;
  color: #111;
  font-size: 1.55rem;
  line-height: 1.2;
  font-weight: 800;
}

.portal-card {
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  background: #fff;
  box-shadow: var(--portal-shadow);
}

.portal-filter-card {
  padding: 24px;
  margin-bottom: 21px;
}

.portal-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid #ede8de;
}

.portal-heading-copy {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-heading-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #171717;
  border-radius: 10px;
  background: linear-gradient(135deg, #ead495, var(--portal-gold));
  font-size: 1.05rem;
}

.portal-card-heading h2 {
  margin: 0 0 3px;
  font-size: 1.05rem;
}

.portal-card-heading p {
  margin: 0;
  color: var(--portal-muted);
  font-size: .72rem;
}

.portal-filter-card .form-control,
.portal-filter-card .form-select {
  min-height: 46px;
  border-color: #dcd6ca;
  border-radius: 9px;
  font-size: .77rem;
}

.filter-search {
  position: relative;
}

.filter-search i {
  position: absolute;
  z-index: 2;
  inset-inline-start: 14px;
  top: 50%;
  color: #9b7a27;
  transform: translateY(-50%);
}

.filter-search .form-control {
  padding-inline-start: 42px;
}

.btn-reset-filters {
  min-height: 46px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #333;
  border: 1px solid #d7d0c3;
  border-radius: 9px;
  background: #fff;
  font-size: .76rem;
  font-weight: 700;
}

.btn-reset-filters:hover {
  color: #fff;
  border-color: #171717;
  background: #171717;
}

.applications-card {
  overflow: hidden;
}

.applications-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 20px 23px;
  border-bottom: 1px solid var(--portal-line);
}

.applications-toolbar h2 {
  margin: 0 0 4px;
  font-size: 1.06rem;
}

.applications-toolbar p {
  margin: 0;
  color: var(--portal-muted);
  font-size: .7rem;
}

.result-count {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  color: #705719;
  border: 1px solid #dcc789;
  border-radius: 20px;
  background: #fffaf0;
  font-size: .7rem;
  font-weight: 700;
}

.applications-table {
  min-width: 1040px;
  margin: 0;
}

.applications-table thead th {
  padding: 14px 15px;
  color: #685d43;
  border: 0;
  border-bottom: 1px solid #ddd5c6;
  background: #f8f5ee;
  font-size: .68rem;
  font-weight: 800;
  white-space: nowrap;
}

.applications-table tbody td {
  padding: 16px 15px;
  color: #313131;
  border-color: #eee9df;
  font-size: .73rem;
  vertical-align: middle;
}

.applications-table tbody tr {
  transition: background .2s ease;
}

.applications-table tbody tr:hover {
  background: #fffdf8;
}

.application-code {
  display: inline-flex;
  direction: ltr;
  color: #795d19;
  font-family: "Inter", Arial, sans-serif;
  font-size: .7rem;
  font-weight: 800;
  white-space: nowrap;
}

.entity-name strong {
  display: block;
  margin-bottom: 3px;
  color: #121212;
  font-size: .77rem;
}

.entity-name small {
  display: block;
  color: var(--portal-muted);
  font-size: .64rem;
}

.category-cell {
  max-width: 245px;
  line-height: 1.7;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 18px;
  font-size: .65rem;
  font-weight: 800;
  white-space: nowrap;
}

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

.status-new {
  color: var(--portal-info);
  background: #edf4fb;
}

.status-review {
  color: var(--portal-warning);
  background: #fff5df;
}

.status-info {
  color: var(--portal-danger);
  background: #fceeed;
}

.status-completed {
  color: var(--portal-success);
  background: #eaf6f0;
}

.btn-view-application {
  min-width: 42px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 10px;
  color: #fff;
  border: 1px solid #151515;
  border-radius: 8px;
  background: #151515;
  font-size: .68rem;
  font-weight: 700;
}

.btn-view-application:hover {
  color: #111;
  border-color: var(--portal-gold);
  background: var(--portal-gold);
}

.empty-state {
  padding: 56px 22px;
  text-align: center;
}

.empty-state i {
  display: block;
  margin-bottom: 13px;
  color: #b49443;
  font-size: 2.3rem;
}

.empty-state h3 {
  margin-bottom: 7px;
  font-size: 1rem;
}

.empty-state p {
  margin: 0;
  color: var(--portal-muted);
  font-size: .75rem;
}

.applications-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 16px 22px;
  border-top: 1px solid var(--portal-line);
  color: var(--portal-muted);
  font-size: .69rem;
}

.applications-pagination {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-control {
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #333;
  border: 1px solid #d8d1c4;
  border-radius: 8px;
  background: #fff;
  font-size: .7rem;
}

.page-control.active,
.page-control:hover:not(:disabled) {
  color: #fff;
  border-color: #151515;
  background: #151515;
}

.page-control:disabled {
  opacity: .42;
}

/* Details */
.details-content {
  margin-top: -54px;
}

.details-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.details-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.btn-portal-light,
.btn-print-application {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 9px;
  font-size: .73rem;
  font-weight: 800;
}

.btn-portal-light {
  color: #292929;
  border: 1px solid #d8d0c2;
  background: #fff;
}

.btn-portal-light:hover {
  color: #111;
  border-color: var(--portal-gold);
  background: #fffaf0;
}

.btn-print-application {
  color: #111;
  border: 1px solid var(--portal-gold);
  background: var(--portal-gold);
}

.btn-print-application:hover {
  color: #fff;
  border-color: #151515;
  background: #151515;
}

.application-summary {
  position: relative;
  padding: 30px;
  margin-bottom: 20px;
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(200, 163, 79, .25);
  border-radius: 18px;
  background: linear-gradient(130deg, #080808, #272727);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .12);
}

.application-summary::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  inset-inline-end: -75px;
  bottom: -115px;
  border: 32px solid rgba(200, 163, 79, .13);
  border-radius: 50%;
}

.application-summary-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.application-summary-main {
  display: flex;
  align-items: center;
  gap: 18px;
}

.application-summary-icon {
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  color: #151515;
  border-radius: 15px;
  background: linear-gradient(135deg, #ead496, var(--portal-gold));
  font-size: 1.45rem;
}

.application-summary .application-code {
  margin-bottom: 8px;
  color: #e8cf91;
}

.application-summary h2 {
  margin: 0 0 7px;
  color: #fff;
  font-size: 1.45rem;
}

.application-summary p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, .66);
  font-size: .75rem;
}

.summary-status {
  flex: 0 0 auto;
}

.summary-status .status-badge {
  padding: 8px 13px;
  font-size: .69rem;
}

.detail-layout {
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.details-side-nav {
  position: sticky;
  top: 20px;
  padding: 12px;
}

.details-side-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  margin-bottom: 5px;
  color: #56534d;
  border-radius: 9px;
  font-size: .73rem;
  font-weight: 700;
}

.details-side-nav .nav-link:last-child {
  margin-bottom: 0;
}

.details-side-nav .nav-link i {
  color: #9c7922;
  font-size: .93rem;
}

.details-side-nav .nav-link:hover,
.details-side-nav .nav-link.active {
  color: #111;
  background: var(--portal-gold-soft);
}

.detail-panel {
  padding: 26px;
  margin-bottom: 20px;
  scroll-margin-top: 25px;
}

.detail-panel:last-child {
  margin-bottom: 0;
}

.detail-panel-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 17px;
  margin-bottom: 22px;
  border-bottom: 1px solid #ede8de;
}

.detail-panel-heading .heading-icon {
  flex: 0 0 43px;
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  color: #151515;
  border-radius: 11px;
  background: var(--portal-gold-soft);
  font-size: 1.05rem;
}

.detail-panel-heading h2 {
  margin: 0 0 3px;
  font-size: 1.08rem;
}

.detail-panel-heading p {
  margin: 0;
  color: var(--portal-muted);
  font-size: .7rem;
}

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

.info-item {
  min-height: 86px;
  padding: 14px 15px;
  border: 1px solid #ebe5da;
  border-radius: 11px;
  background: #fcfbf8;
}

.info-item.wide {
  grid-column: span 2;
}

.info-item.full {
  grid-column: 1 / -1;
}

.info-label {
  display: block;
  margin-bottom: 7px;
  color: #7a7468;
  font-size: .65rem;
  font-weight: 700;
}

.info-value {
  display: block;
  color: #1c1c1c;
  font-size: .77rem;
  line-height: 1.75;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.criteria-intro {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
  color: #665727;
  border: 1px solid #ddc986;
  border-inline-start: 4px solid var(--portal-gold);
  border-radius: 11px;
  background: #fffaf0;
  font-size: .72rem;
  line-height: 1.8;
}

.criteria-intro i {
  flex: 0 0 auto;
  margin-top: 2px;
  color: #9a7620;
}

.criteria-accordion .accordion-item {
  margin-bottom: 11px;
  overflow: hidden;
  border: 1px solid #e7e0d4;
  border-radius: 12px;
}

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

.criteria-accordion .accordion-button {
  display: flex;
  gap: 12px;
  padding: 17px 18px;
  color: #222;
  background: #fff;
  box-shadow: none;
  font-size: .78rem;
  font-weight: 800;
}

.criteria-accordion .accordion-button:not(.collapsed) {
  color: #111;
  background: #fbf5e6;
}

.criterion-number {
  flex: 0 0 29px;
  width: 29px;
  height: 29px;
  display: inline-grid;
  place-items: center;
  color: #111;
  border-radius: 50%;
  background: var(--portal-gold);
  font-size: .68rem;
}

.criteria-accordion .accordion-body {
  padding: 20px;
  background: #fff;
}

.criterion-answer-block {
  margin-bottom: 18px;
}

.criterion-answer-block:last-child {
  margin-bottom: 0;
}

.criterion-answer-block h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #3c382f;
  font-size: .76rem;
}

.criterion-answer-block h4 i {
  color: #9a7721;
}

.criterion-text-answer {
  padding: 14px 15px;
  margin: 0;
  color: #44413c;
  border: 1px solid #ece6dc;
  border-radius: 10px;
  background: #fcfbf8;
  font-size: .73rem;
  line-height: 1.95;
}

.details-table-wrap {
  overflow: hidden;
  border: 1px solid #e5ded2;
  border-radius: 10px;
}

.details-table {
  min-width: 670px;
  margin: 0;
}

.details-table thead th {
  padding: 11px 12px;
  color: #5e543b;
  border: 0;
  border-bottom: 1px solid #ddd4c4;
  background: #f7f2e7;
  font-size: .64rem;
  font-weight: 800;
  white-space: nowrap;
}

.details-table tbody td {
  padding: 11px 12px;
  color: #3b3935;
  border-color: #eee8de;
  font-size: .68rem;
  vertical-align: middle;
}

.metric-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.metric-card {
  padding: 14px;
  border: 1px solid #e8e1d5;
  border-radius: 10px;
  background: #fcfbf8;
}

.metric-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--portal-muted);
  font-size: .62rem;
}

.metric-card strong {
  color: #151515;
  font-size: .86rem;
}

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

.attachment-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 62px;
  padding: 10px 12px;
  color: #242424;
  border: 1px solid #e7e0d4;
  border-radius: 10px;
  background: #fff;
}

.attachment-item:hover {
  color: #111;
  border-color: var(--portal-gold);
  background: #fffaf0;
}

.attachment-icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #8d6d1f;
  border-radius: 9px;
  background: var(--portal-gold-soft);
  font-size: 1rem;
}

.attachment-copy {
  min-width: 0;
  flex: 1;
}

.attachment-copy strong,
.attachment-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-copy strong {
  margin-bottom: 2px;
  font-size: .7rem;
}

.attachment-copy small {
  color: var(--portal-muted);
  font-size: .59rem;
}

.print-masthead {
  display: none;
}

html[dir="ltr"] .portal-user-meta {
  align-items: flex-start;
}

html[dir="ltr"] .application-code,
html[dir="ltr"] input[type="email"],
html[dir="ltr"] input[type="password"] {
  direction: ltr;
}

.application-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-view-application,
.btn-delete-application {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 15px;
    border-radius: 9px;
    font-weight: 700;
    transition: 0.2s ease;
}

.btn-view-application {
    color: #fff;
    background: #171717;
    border: 1px solid #171717;
}

    .btn-view-application:hover {
        color: #171717;
        background: #e4cc91;
        border-color: #e4cc91;
    }

.btn-delete-application {
    color: #b42318;
    background: #fff;
    border: 1px solid #e5b5b0;
}

    .btn-delete-application:hover {
        color: #fff;
        background: #b42318;
        border-color: #b42318;
    }

.delete-modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

    .delete-modal-content .modal-header {
        align-items: flex-start;
        padding: 22px;
        border-bottom: 1px solid #eee8dc;
    }

.delete-modal-title {
    display: flex;
    align-items: center;
    gap: 13px;
}

    .delete-modal-title h5 {
        margin-bottom: 3px;
        font-weight: 800;
    }

    .delete-modal-title small {
        color: #777;
    }

.delete-modal-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: #b42318;
    background: #fff0ee;
    border-radius: 50%;
    font-size: 1.3rem;
}

.delete-application-info {
    padding: 14px 16px;
    background: #f8f6f1;
    border-right: 4px solid #c8a34f;
    border-radius: 8px;
}

    .delete-application-info strong,
    .delete-application-info span {
        display: block;
    }

    .delete-application-info span {
        margin-top: 3px;
        color: #8a681f;
        font-size: 0.88rem;
    }

@media (max-width: 575.98px) {
    .application-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn-view-application,
    .btn-delete-application {
        width: 100%;
    }
}

@media (max-width: 1199.98px) {
  .portal-user-meta {
    display: none;
  }

  .portal-nav-actions {
    margin-top: 8px;
    align-items: stretch;
    flex-direction: column;
  }

  .portal-nav-actions .language-toggle,
  .portal-nav-actions .portal-user-button {
    width: 100%;
  }

  .login-shell {
    grid-template-columns: minmax(310px, .8fr) minmax(390px, 1.2fr);
  }

  .login-form-panel {
    padding: 48px 44px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .login-main {
    padding: 38px 0 55px;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    min-height: auto;
    padding: 38px;
  }

  .login-brand-foot {
    margin-top: 38px;
  }

  .login-form-panel {
    min-height: auto;
    padding: 44px 38px 49px;
  }

  .portal-hero {
    padding-bottom: 88px;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .details-side-nav {
    position: static;
    display: flex;
    gap: 5px;
    padding: 8px;
    overflow-x: auto;
    white-space: nowrap;
  }

  .details-side-nav .nav-link {
    flex: 0 0 auto;
    margin: 0;
  }

  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .login-main {
    min-height: 0;
    padding: 24px 0 38px;
  }

  .login-shell {
    border-radius: 15px;
  }

  .login-brand-panel {
    padding: 28px 23px;
  }

  .login-security-mark {
    width: 52px;
    height: 52px;
    margin-bottom: 23px;
    border-radius: 13px;
    font-size: 1.35rem;
  }

  .login-brand-panel h1 {
    font-size: 1.7rem;
  }

  .login-brand-foot {
    margin-top: 28px;
  }

  .login-form-panel {
    padding: 31px 22px 35px;
  }

  .login-form-heading {
    margin-bottom: 24px;
  }

  .login-form-heading h2 {
    font-size: 1.4rem;
  }

  .portal-hero {
    padding: 38px 0 78px;
  }

  .portal-content,
  .details-content {
    margin-top: -43px;
    padding-bottom: 55px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card {
    min-height: 102px;
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
    padding: 15px;
  }

  .stat-icon {
    width: 39px;
    height: 39px;
    flex-basis: 39px;
    font-size: .98rem;
  }

  .stat-value {
    font-size: 1.25rem;
  }

  .portal-filter-card {
    padding: 18px;
  }

  .portal-card-heading {
    align-items: flex-start;
  }

  .applications-toolbar,
  .applications-footer,
  .details-toolbar,
  .application-summary-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .applications-card .table-responsive {
    overflow: visible;
  }

  .applications-table {
    min-width: 0;
  }

  .applications-table thead {
    display: none;
  }

  .applications-table,
  .applications-table tbody,
  .applications-table tr,
  .applications-table td {
    display: block;
    width: 100%;
  }

  .applications-table tbody {
    padding: 12px;
  }

  .applications-table tbody tr {
    padding: 7px 12px;
    margin-bottom: 12px;
    border: 1px solid #e4ddd0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(0, 0, 0, .04);
  }

  .applications-table tbody tr:last-child {
    margin-bottom: 0;
  }

  .applications-table tbody td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border: 0;
    border-bottom: 1px solid #eee8de;
    text-align: end;
  }

  .applications-table tbody td:last-child {
    justify-content: flex-end;
    border-bottom: 0;
  }

  .applications-table tbody td::before {
    content: attr(data-label);
    flex: 0 0 37%;
    color: #7a7468;
    font-size: .64rem;
    font-weight: 800;
    text-align: start;
  }

  .applications-table tbody td:last-child::before {
    display: none;
  }

  .category-cell {
    max-width: none;
  }

  .applications-footer {
    padding: 15px;
  }

  .details-toolbar-actions {
    width: 100%;
  }

  .details-toolbar-actions > * {
    flex: 1;
  }

  .application-summary {
    padding: 22px;
  }

  .application-summary-main {
    align-items: flex-start;
  }

  .application-summary-icon {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    border-radius: 12px;
    font-size: 1.1rem;
  }

  .application-summary h2 {
    font-size: 1.12rem;
  }

  .detail-panel {
    padding: 19px;
  }

  .info-grid,
  .metric-cards,
  .attachments-list {
    grid-template-columns: 1fr;
  }

  .info-item.wide {
    grid-column: auto;
  }
}

@media (max-width: 420px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 85px;
    align-items: center;
    flex-direction: row;
  }

  .application-summary-main {
    flex-direction: column;
  }

  .details-toolbar-actions {
    flex-direction: column;
  }

  .details-toolbar-actions > * {
    width: 100%;
  }
}

@media print {
  @page {
    size: A4;
    margin: 14mm 12mm;
  }

  html,
  body,
  body.evaluator-portal {
    color: #000 !important;
    background: #fff !important;
    font-size: 10pt;
  }

  .no-print,
  .main-header,
  .portal-hero,
  .site-footer,
  .details-side-nav,
  .details-toolbar,
  .back-to-top {
    display: none !important;
  }

  .print-masthead {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 10mm;
    margin-bottom: 8mm;
    border-bottom: 2px solid #b58f2b;
  }

  .print-masthead img {
    max-width: 58mm;
    max-height: 22mm;
    object-fit: contain;
  }

  .details-content,
  .portal-content {
    padding: 0 !important;
    margin: 0 !important;
  }

  .details-content .container {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
  }

  .application-summary {
    padding: 7mm !important;
    color: #000 !important;
    border: 1px solid #b58f2b !important;
    background: #fff !important;
    box-shadow: none !important;
    break-inside: avoid;
  }

  .application-summary::after,
  .application-summary-icon,
  .summary-status {
    display: none !important;
  }

  .application-summary h2,
  .application-summary p,
  .application-summary .application-code {
    color: #000 !important;
  }

  .detail-layout {
    display: block !important;
  }

  .portal-card,
  .detail-panel {
    border: 1px solid #cfcfcf !important;
    box-shadow: none !important;
  }

  .detail-panel {
    padding: 6mm !important;
    margin: 0 0 7mm !important;
    break-inside: auto;
  }

  .detail-panel-heading,
  .criterion-answer-block,
  .info-item,
  .metric-card,
  .attachment-item,
  .details-table-wrap {
    break-inside: avoid;
  }

  .detail-panel-heading .heading-icon,
  .criteria-intro,
  .criterion-number {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .criteria-accordion .accordion-collapse {
    display: block !important;
    height: auto !important;
    visibility: visible !important;
  }

  .criteria-accordion .accordion-button::after {
    display: none !important;
  }

  .criteria-accordion .accordion-item {
    break-inside: auto;
  }

  .info-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .metric-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .attachments-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .details-table {
    min-width: 0 !important;
    width: 100% !important;
  }

  a {
    color: #000 !important;
    text-decoration: none !important;
  }
}
