* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #05060a;
  --panel: #11131c;
  --panel-2: #0d0f17;
  --line: #232736;
  --line-soft: #1a1d29;
  --text: #f5f7ff;
  --muted: #9ca3b8;
  --input-bg: #0a0c13;
  --primary: #f3f4f6;
  --primary-text: #111217;
  --secondary: #1a1d28;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #05060a 0%, #06070d 100%);
  color: var(--text);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(9, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.topbar-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.nav {
  display: flex;
  gap: 22px;
}

.nav a {
  font-size: 14px;
  color: var(--muted);
  transition: 0.2s ease;
}

.nav a.active,
.nav a:hover {
  color: var(--text);
}

.notification-widget {
  position: relative;
  display: inline-flex;
}

.notification-btn {
  position: relative;
  border: 1px solid var(--line);
  background: #111827;
  color: var(--text);
  border-radius: 12px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

.notification-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

.notification-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  display: none;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0b1020;
  box-shadow: var(--shadow);
  z-index: 30;
}

.notification-widget.is-open .notification-menu {
  display: grid;
  gap: 8px;
}

.notification-item,
.notification-empty {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.notification-item strong {
  color: var(--text);
}

.notification-item span {
  font-size: 13px;
  line-height: 1.45;
}

.notification-item small {
  color: #7c86a3;
}

.notification-item.is-unread {
  border-color: rgba(141, 240, 181, 0.45);
  background: rgba(20, 83, 45, 0.18);
}

.notification-menu {
  max-height: min(520px, calc(100vh - 140px));
  overflow-y: auto;
}

.notification-menu .notification-item {
  grid-template-columns: 1fr auto;
  align-items: start;
}

.notification-item-link {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.notification-delete-btn {
  border: 1px solid rgba(248, 113, 113, 0.32);
  background: rgba(127, 29, 29, 0.38);
  color: #fecaca;
  border-radius: 10px;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.notification-delete-btn:disabled {
  opacity: 0.55;
  cursor: pointer;
}

.notification-item {
  transition: opacity 120ms ease, transform 120ms ease, max-height 120ms ease, padding 120ms ease, margin 120ms ease;
}

.notification-item.is-removing {
  opacity: 0;
  transform: translateY(-4px);
  max-height: 0;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

.page {
  padding: 42px 0 60px;
}

.hero {
  max-width: 760px;
  margin: 0 auto 26px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: #c7ccda;
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: 36px;
  line-height: 1.2;
  margin-bottom: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(320px, 0.76fr);
  gap: 20px;
  align-items: start;
  max-width: 1240px;
  margin: 0 auto;
}

.panel {
  background: linear-gradient(180deg, rgba(18, 20, 30, 0.96), rgba(14, 16, 24, 0.98));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 18px;
  box-shadow: var(--shadow);
}

.panel-header {
  margin-bottom: 18px;
}

.panel-header h2 {
  font-size: 18px;
  margin-bottom: 8px;
}

.panel-header p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: #f4f6ff;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--line-soft);
  color: var(--text);
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 14px;
  outline: none;
  transition: 0.2s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #6f768a;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #34384a;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.03);
}

.form-group input.locked-field {
  color: #dbeafe;
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.28);
  cursor: not-allowed;
}

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

.multi-input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.multi-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.multi-input-row input {
  flex: 1;
}

.buyer-target-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(170px, 0.95fr) minmax(190px, 1fr) 52px;
  gap: 12px;
  align-items: center;
}

.buyer-target-row input {
  width: 100%;
  min-width: 0;
}

.buyer-target-row input[name="buyerEstimatedAmount"] {
  flex: initial;
}

.buyer-target-row input[name="buyerPaymentTerm"] {
  flex: initial;
}

.icon-add-btn,
.icon-remove-btn {
  width: 52px;
  min-width: 52px;
  height: 52px;
  border-radius: 10px;
  border: 1px solid #232838;
  background: var(--secondary);
  color: var(--text);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: 0.2s ease;
}

.icon-add-btn:hover,
.icon-remove-btn:hover {
  background: #212633;
}

.error {
  display: none;
  margin-top: 6px;
  font-size: 12px;
  color: #ff7d7d;
}

.invalid {
  border-color: #6d2a2a !important;
}

.upload-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #0a0c13;
  border: 1px dashed #2e3344;
  border-radius: 12px;
  padding: 14px;
}

.upload-text {
  color: var(--muted);
  font-size: 13px;
}

.upload-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.file-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-item {
  background: #0b0d15;
  border: 1px solid #212535;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  color: #d9ddea;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.submit-status {
  display: none;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14px;
  line-height: 1.6;
}

.submit-status.is-visible {
  display: block;
}

.submit-status.is-loading {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(96, 165, 250, 0.18);
  color: #bfdbfe;
}

.submit-status.is-success {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(52, 211, 153, 0.18);
  color: #bbf7d0;
}

.submit-status.is-error {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(248, 113, 113, 0.18);
  color: #fecaca;
}

.primary-btn,
.secondary-btn {
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.primary-btn {
  background: var(--primary);
  color: var(--primary-text);
}

.primary-btn:hover {
  opacity: 0.92;
}

.primary-btn:disabled,
.secondary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.secondary-btn {
  background: var(--secondary);
  color: var(--text);
  border-color: #232838;
}

.secondary-btn:hover {
  background: #212633;
}

.info-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-card {
  background: #0c0e16;
  border: 1px solid #1d2231;
  border-radius: 14px;
  padding: 14px;
}

.info-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.info-card p,
.info-card li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.info-card ul {
  list-style: none;
}

.contact-list li + li {
  margin-top: 4px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 4, 8, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal {
  width: min(460px, 100%);
  background: #11131c;
  border: 1px solid #232736;
  border-radius: 18px;
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.modal-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  background: #1b2330;
  font-size: 26px;
}

.modal h3 {
  margin-bottom: 10px;
  font-size: 22px;
}

.modal p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 18px;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.request-code-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  margin-bottom: 12px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  background: rgba(30, 41, 59, 0.72);
  color: #dbeafe;
  font-size: 13px;
  font-weight: 600;
}

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

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

  .hero h1 {
    font-size: 30px;
  }
}

@media (max-width: 720px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 0;
  }

  .nav {
    flex-wrap: wrap;
    gap: 12px 16px;
  }

  .form-row,
  .button-row {
    grid-template-columns: 1fr;
  }

  .buyer-target-row {
    grid-template-columns: 1fr;
  }

  .buyer-target-row input[name="buyerEstimatedAmount"],
  .buyer-target-row input[name="buyerPaymentTerm"] {
    flex: initial;
  }

  .hero {
    text-align: left;
  }

  .hero h1 {
    font-size: 27px;
  }
}


.page-narrow {
  max-width: 980px;
}

.page-hero-left {
  max-width: 760px;
  margin: 0 0 26px;
  text-align: left;
}

.hero-compact {
  max-width: 820px;
  margin: 0 0 26px;
  text-align: left;
}

.content-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.body-text {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.body-text + .body-text {
  margin-top: 12px;
}

.content-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bullet-list li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  padding-left: 18px;
  position: relative;
}

.bullet-list li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8b93a7;
  position: absolute;
  left: 0;
  top: 9px;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline-item h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.step-badge {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  background: #0c0f17;
  border: 1px solid #232838;
  color: #cdd3e0;
  font-size: 12px;
  margin-bottom: 12px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 16px;
}

.button-row-single {
  grid-template-columns: 1fr;
}

.quote-block {
  margin: 0;
  padding: 18px 20px;
  border-left: 4px solid #6f768a;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.7;
  font-style: italic;
}

.auth-shell {
  max-width: 1180px;
}

.auth-shell--single .auth-hero {
  margin-left: auto;
  margin-right: auto;
}

.auth-hero {
  max-width: 680px;
}

.auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  gap: 20px;
  align-items: start;
}

.auth-grid--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.auth-panel,
.auth-side-panel {
  min-height: 100%;
}

.inline-link-row {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.inline-link-row a {
  color: var(--text);
  font-weight: 600;
}

.inline-link-row a:hover {
  text-decoration: underline;
}

.auth-metric-grid {
  display: grid;
  gap: 14px;
}

.auth-metric-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.auth-metric {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-metric-label {
  font-size: 13px;
  color: var(--muted);
}

.auth-metric-value {
  font-size: 22px;
  line-height: 1.35;
  color: var(--text);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.22);
  background: rgba(6, 78, 59, 0.4);
  color: #86efac;
  font-size: 13px;
  font-weight: 700;
}

.table-card {
  overflow: hidden;
}

.table-like {
  display: flex;
  flex-direction: column;
}

.table-like-row + .table-like-row {
  border-top: 1px solid var(--line);
}

.table-like-cell {
  padding: 18px 0;
}

.table-like-cell h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.table-like-cell p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.portal-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.portal-panel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.portal-panel-header-row h2 {
  margin-bottom: 0;
}

.portal-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.portal-filter-actions .primary-btn,
.portal-filter-actions .secondary-btn {
  min-width: 148px;
}

.portal-list-row {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  padding: 18px;
}

.portal-list-grid {
  display: grid;
  gap: 16px;
}

.portal-list-grid--deal,
.portal-list-grid--target {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-list-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
}

.portal-list-title {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.portal-deal-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.portal-detail-btn {
  min-width: 150px;
}

.portal-back-row {
  max-width: 240px;
  margin-top: 18px;
}

#portalTargetsPage {
  padding: 36px 0 60px;
}

#portalTargetsPage .portal-targets-container {
  width: min(1960px, calc(100vw - 48px)) !important;
  max-width: none !important;
  margin: 0 auto !important;
}

#portalTargetsPage .content-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  max-width: none;
  margin: 0;
}

#portalTargetsPage .panel {
  background: linear-gradient(180deg, rgba(18, 20, 30, 0.96), rgba(14, 16, 24, 0.98));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}

#portalTargetsPage .table-card {
  overflow: visible;
}

#portalTargetsPage .panel-header {
  justify-content: flex-end;
  margin-bottom: 14px;
}

#portalTargetsPage .portal-list {
  display: block;
  gap: 0;
}

.selected-batch-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 12px;
  background: rgba(251, 191, 36, 0.08);
}

.selected-batch-banner span {
  color: #fcd34d;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.selected-batch-banner strong {
  color: #f8fafc;
  font-size: 15px;
  text-align: right;
}

#portalTargetsPage .subdeal-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: visible;
  overflow-y: hidden;
  padding: 0 0 0;
}

#portalTargetsPage .deal-table {
  width: 100%;
  border-collapse: collapse;
}

#portalTargetsPage .subdeal-dashboard-table {
  min-width: 0;
  width: 100%;
  table-layout: auto;
}

#portalTargetsPage .subdeal-dashboard-table th,
#portalTargetsPage .subdeal-dashboard-table td {
  padding: 9px 7px;
  font-size: 11px;
  line-height: 1.28;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

#portalTargetsPage .deal-table th,
#portalTargetsPage .deal-table td {
  text-align: left;
  border-bottom: 1px solid #1d2231;
}

#portalTargetsPage .deal-table th {
  color: #c9d0de;
  font-weight: 600;
}

#portalTargetsPage .deal-table td {
  color: #eef2ff;
}

#portalTargetsPage .deal-table .subdeal-table-group-row th {
  padding: 10px 8px;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 11px;
}

#portalTargetsPage .deal-table .subdeal-table-group-debt {
  background: rgba(147, 197, 253, 0.14);
  color: #dbeafe;
}

#portalTargetsPage .deal-table .subdeal-table-group-counter {
  background: rgba(251, 191, 36, 0.16);
  color: #fef3c7;
}

#portalTargetsPage .deal-table .subdeal-table-group-available {
  background: rgba(134, 239, 172, 0.16);
  color: #dcfce7;
}

#portalTargetsPage .deal-table .subdeal-table-group-support {
  background: rgba(251, 146, 60, 0.14);
  color: #fed7aa;
}

#portalTargetsPage .deal-table .subdeal-table-group-note {
  background: rgba(251, 113, 133, 0.18);
  color: #fed7aa;
}

#portalTargetsPage .subdeal-col-hospital {
  width: 11%;
}

#portalTargetsPage .subdeal-col-date {
  width: 5.4%;
}

#portalTargetsPage .subdeal-col-invoice {
  width: 4.8%;
}

#portalTargetsPage .subdeal-col-money {
  width: 5.9%;
}

#portalTargetsPage .subdeal-col-money-wide {
  width: 6.3%;
}

#portalTargetsPage .subdeal-col-status,
#portalTargetsPage .subdeal-col-note {
  width: 4.2%;
}

.portal-list-meta {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.portal-import-table-scroll {
  width: 100%;
  overflow-x: visible;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(9, 13, 24, 0.72);
}

.portal-import-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: auto;
  color: var(--text);
  font-size: 12px;
}

.portal-import-table th,
.portal-import-table td {
  padding: 10px 7px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
  word-break: normal;
}

.portal-import-table th {
  color: #f8fafc;
  font-weight: 800;
}

.portal-import-table td {
  color: #f8fafc;
  line-height: 1.3;
}

.portal-import-table th:nth-child(1),
.portal-import-table td:nth-child(1) {
  width: 14%;
}

.portal-import-table th:nth-child(2),
.portal-import-table td:nth-child(2),
.portal-import-table th:nth-child(5),
.portal-import-table td:nth-child(5),
.portal-import-table th:nth-child(10),
.portal-import-table td:nth-child(10),
.portal-import-table th:nth-child(12),
.portal-import-table td:nth-child(12),
.portal-import-table th:nth-child(14),
.portal-import-table td:nth-child(14) {
  width: 5.7%;
}

.portal-import-table th:nth-child(3),
.portal-import-table td:nth-child(3),
.portal-import-table th:nth-child(6),
.portal-import-table td:nth-child(6) {
  width: 5.3%;
}

.portal-import-table th:nth-child(4),
.portal-import-table td:nth-child(4),
.portal-import-table th:nth-child(7),
.portal-import-table td:nth-child(7),
.portal-import-table th:nth-child(9),
.portal-import-table td:nth-child(9),
.portal-import-table th:nth-child(11),
.portal-import-table td:nth-child(11),
.portal-import-table th:nth-child(13),
.portal-import-table td:nth-child(13) {
  width: 6.3%;
}

.portal-import-table th:nth-child(8),
.portal-import-table td:nth-child(8),
.portal-import-table th:nth-child(15),
.portal-import-table td:nth-child(15),
.portal-import-table th:nth-child(16),
.portal-import-table td:nth-child(16),
.portal-import-table th:nth-child(17),
.portal-import-table td:nth-child(17) {
  width: 4.6%;
}

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

.portal-import-group {
  text-align: center !important;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0;
}

.portal-import-group-debt {
  background: rgba(59, 91, 134, 0.36);
}

.portal-import-group-counter {
  background: rgba(153, 117, 24, 0.34);
}

.portal-import-group-available {
  background: rgba(25, 97, 92, 0.38);
}

.portal-import-group-support {
  background: rgba(111, 70, 63, 0.36);
}

.portal-import-group-note {
  background: rgba(113, 63, 84, 0.42);
}

.portal-import-group-rating {
  background: rgba(65, 79, 105, 0.42);
}

.portal-withdraw-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.portal-withdraw-field label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.portal-withdraw-field input {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #070a12;
  color: var(--text);
  padding: 0 14px;
  font: inherit;
  outline: none;
}

.portal-withdraw-field input:focus {
  border-color: rgba(148, 163, 184, 0.55);
}

.portal-withdraw-btn {
  min-width: 132px;
}

.portal-withdraw-status {
  grid-column: 1 / -1;
  min-height: 20px;
  font-size: 13px;
  color: var(--muted);
}

.portal-withdraw-status.is-success {
  color: #bbf7d0;
}

.portal-withdraw-status.is-error {
  color: #fecaca;
}

.portal-empty {
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 18px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 720px) {
  .info-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .modal-actions,
  .auth-grid,
  .auth-metric-grid--two,
  .auth-metric-grid--three {
    grid-template-columns: 1fr;
  }

  .portal-list-grid--deal,
  .portal-list-grid--target {
    grid-template-columns: 1fr;
  }

  .portal-panel-header-row {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-panel-header-row h2 {
    margin-bottom: 0;
  }

  .portal-filter-actions {
    margin-left: 0;
    justify-content: stretch;
    flex-direction: column;
  }

  .portal-filter-actions .primary-btn,
  .portal-filter-actions .secondary-btn {
    width: 100%;
  }

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

  .portal-deal-actions {
    justify-content: stretch;
  }

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

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


.error {
  display: none;
  color: #f87171;
  margin-top: 6px;
  font-size: 13px;
}

.file-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-item {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  padding: 10px 12px;
  color: #e2e8f0;
  font-size: 14px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  width: 440px;
  max-width: 92%;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  padding: 24px;
  text-align: center;
}

.modal-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
  font-size: 28px;
  font-weight: 700;
}
