:root {
  --bg: #070807;
  --ink: #101828;
  --muted: #667085;
  --line: #d9dee7;
  --soft: #f5f7f8;
  --panel: #ffffff;
  --green: #24e0a4;
  --green-deep: #0b8f69;
  --gold: #d6a84f;
  --red: #dc2626;
  --shadow: 0 18px 45px rgba(16, 24, 40, 0.16);
  --radius: 8px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.portal-body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(7, 8, 7, 0.76), rgba(7, 8, 7, 0.94)),
    url("img/Background2.jpg") center/cover fixed no-repeat;
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

.portal-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(7, 8, 7, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.portal-nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 900;
}

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

.portal-links {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 800;
}

.portal-links a:hover { color: var(--green); }

.portal-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 18px 64px;
}

.hero-copy,
.auth-card,
.panel-card,
.selection-panel,
.license-card,
.order-card {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy {
  min-height: 260px;
  padding: 36px;
  display: grid;
  align-content: center;
  overflow: hidden;
  position: relative;
  margin-bottom: 22px;
}

.hero-copy::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 5px;
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.eyebrow {
  color: var(--green-deep);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.hero-copy h1 {
  margin: 12px 0;
  font-size: 48px;
  line-height: 1;
  letter-spacing: 0;
}

.hero-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  max-width: 820px;
}

.auth-card,
.panel-card {
  padding: 22px;
}

.auth-card h1,
.panel-card h2,
.panel-card h3 {
  margin: 0 0 12px;
}

.auth-card p,
.panel-card p {
  color: var(--muted);
  line-height: 1.6;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field label,
.field > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.field input,
.field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
}

.field input:focus,
.field select:focus {
  outline: 2px solid rgba(36, 224, 164, 0.24);
  border-color: var(--green);
}

.password-control {
  position: relative;
}

.password-control input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: var(--radius);
  background: #eef2f6;
  color: #344054;
  display: grid;
  place-items: center;
}

.password-toggle:hover {
  background: #dff8ef;
  color: var(--green-deep);
}

.legal-acceptance {
  border: 1px solid #d6efe5;
  border-radius: var(--radius);
  background: #f3fffb;
  padding: 13px;
  display: grid;
  gap: 10px;
  color: #315046;
  line-height: 1.55;
  margin-bottom: 12px;
}

.legal-acceptance p {
  margin: 0;
  font-size: 13px;
}

.legal-acceptance.needs-confirmation,
.payment-ack.needs-confirmation {
  border-color: #ef4444;
  background: #fef2f2;
  color: #991b1b;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legal-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #cce8de;
  border-radius: var(--radius);
  background: #fff;
  color: var(--green-deep);
  padding: 7px 9px;
  font-weight: 900;
  font-size: 13px;
}

.auth-mini-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.auth-mini-links a {
  color: var(--green-deep);
  font-weight: 900;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn {
  border: 0;
  border-radius: var(--radius);
  min-height: 44px;
  padding: 11px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 900;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

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

.btn-primary {
  background: var(--green);
  color: #04130e;
  box-shadow: 0 10px 26px rgba(36, 224, 164, 0.28);
}

.btn-dark {
  background: #111827;
  color: #fff;
}

.btn-amber {
  background: #f59e0b;
  color: #111827;
}

.btn-line {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-red {
  background: var(--red);
  color: #fff;
}

.btn-full { width: 100%; }

.notice {
  border: 1px solid #b7e4d7;
  background: #effcf8;
  color: #065f46;
  border-radius: var(--radius);
  padding: 12px;
  line-height: 1.5;
  font-size: 14px;
}

.notice.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

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

.dashboard-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 18px;
  align-items: stretch;
}

.premium-dashboard-top .hero-copy {
  margin-bottom: 0;
}

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

.mini-stat {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.mini-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mini-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 26px;
}

.dashboard-metric {
  min-height: 118px;
  border-radius: var(--radius);
  padding: 18px;
  display: grid;
  align-content: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.dashboard-metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--green);
}

.dashboard-metric.primary {
  background: linear-gradient(135deg, #101828, #162033);
  color: #fff;
}

.dashboard-metric.primary::before {
  background: var(--gold);
}

.dashboard-metric span,
.dashboard-metric small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-metric.primary span,
.dashboard-metric.primary small {
  color: rgba(255, 255, 255, 0.72);
}

.dashboard-metric strong {
  font-size: 32px;
  line-height: 1;
}

.selection-panel {
  padding: 24px;
  margin-top: 20px;
}

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

.section-head h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.bot-selector {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.terms-agreement {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff;
  color: #475467;
  line-height: 1.5;
  font-weight: 800;
}

.terms-agreement input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.terms-agreement a {
  color: var(--green-deep);
  font-weight: 900;
}

.terms-agreement.needs-confirmation {
  border-color: #ef4444;
  background: #fef2f2;
  color: #991b1b;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
}

.bot-selector select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.selected-summary {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 240px;
  gap: 18px;
  padding: 16px;
  align-items: center;
}

.summary-media {
  border-radius: var(--radius);
  overflow: hidden;
  background: #111827;
}

.summary-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.summary-copy h2 {
  margin: 6px 0 8px;
  font-size: 26px;
}

.summary-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.clean-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
  color: #475467;
  font-size: 14px;
}

.clean-list li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--green);
}

.summary-price {
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

.summary-price span,
.checkout-amount span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-price strong,
.checkout-amount strong {
  display: block;
  margin-top: 6px;
  font-size: 30px;
}

.summary-price small,
.checkout-amount small {
  color: var(--muted);
  font-weight: 800;
}

.payment-shell {
  display: grid;
  grid-template-columns: minmax(260px, 0.76fr) minmax(420px, 1.24fr);
  gap: 18px;
  padding: 0;
}

.payment-product {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.payment-product h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.08;
}

.payment-product p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.checkout-amount {
  margin-top: 10px;
  padding: 18px;
  border-radius: var(--radius);
  background: #111827;
  color: #fff;
}

.checkout-amount span,
.checkout-amount small {
  color: rgba(255, 255, 255, 0.72);
}

.payment-form {
  display: grid;
  gap: 12px;
}

.payment-step {
  padding: 16px;
}

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

.choice-grid.method-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 4px;
  align-items: start;
  background: #fff;
}

.choice input {
  width: 18px;
  height: 18px;
  grid-row: 1 / span 2;
  margin: 1px 0 0;
}

.choice strong {
  display: block;
  grid-column: 2;
}

.choice span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  grid-column: 2;
}

.choice:has(input:checked) {
  border-color: rgba(11, 143, 105, 0.6);
  background: #f1fcf8;
}

.breakdown {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: grid;
  gap: 9px;
  background: var(--soft);
}

.breakdown-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.breakdown-title strong {
  font-size: 17px;
}

.breakdown-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.total-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.total-line strong {
  color: var(--ink);
  white-space: nowrap;
}

.total-line.grand {
  border-top: 1px solid var(--line);
  padding-top: 9px;
  color: var(--ink);
}

.total-line.grand strong {
  font-size: 22px;
}

.partial-alert {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  gap: 10px;
  line-height: 1.5;
}

.partial-alert[hidden],
.method-panel[hidden] {
  display: none !important;
}

.partial-alert.needs-confirmation {
  border-color: #ef4444;
  background: #fef2f2;
  color: #991b1b;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
}

.payment-ack {
  border: 1px solid #d6efe5;
  border-radius: var(--radius);
  background: #f7fffc;
  padding: 15px;
  display: grid;
  gap: 11px;
  color: #315046;
}

.payment-ack-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.payment-ack-head h2 {
  margin: 0;
  font-size: 20px;
}

.payment-ack a {
  color: var(--green-deep);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.check-row {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-weight: 800;
}

.check-row input {
  margin-top: 2px;
  width: 18px;
  height: 18px;
}

.method-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  gap: 12px;
  background: #fff;
}

.method-panel h3 {
  margin: 0;
}

.account-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
}

.account-line span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.account-line strong {
  word-break: break-word;
}

.portal-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  width: min(420px, calc(100vw - 36px));
  padding: 14px 16px;
  border-radius: var(--radius);
  background: #111827;
  color: #fff;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  font-weight: 800;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.portal-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.portal-toast.error {
  background: #991b1b;
}

.license-list,
.order-list {
  display: grid;
  gap: 14px;
}

.license-card,
.order-card {
  padding: 18px;
}

.license-top,
.order-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.license-top h3,
.order-top h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.license-key {
  background: #f3f6fa;
  border-radius: var(--radius);
  padding: 9px;
  word-break: break-all;
  font-family: Consolas, monospace;
  font-size: 13px;
}

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

.stat {
  background: var(--soft);
  border: 1px solid #edf0f5;
  border-radius: var(--radius);
  padding: 10px;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stat strong {
  color: var(--ink);
}

.table-wrap {
  overflow: auto;
  margin-top: 12px;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.portal-table th,
.portal-table td {
  border: 1px solid var(--line);
  padding: 8px;
  text-align: left;
}

.portal-table th {
  background: #f8fafc;
}

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

.order-card .service-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.62);
}

.modal.show { display: grid; }

.modal-panel {
  width: min(520px, 100%);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  padding: 24px;
  display: grid;
  gap: 14px;
  text-align: center;
}

.modal-mark {
  width: 48px;
  height: 48px;
  margin: 0 auto;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #04130e;
  font-weight: 900;
}

.portal-footer {
  color: rgba(255, 255, 255, 0.66);
  text-align: center;
  padding: 28px 18px 40px;
}

.mybot-hero {
  min-height: 190px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  margin-bottom: 18px;
}

.mybot-hero h1 {
  font-size: 42px;
}

.license-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.license-summary-strip .mini-stat {
  min-height: 96px;
}

.license-table-card,
.pending-section {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 18px;
}

.compact-head {
  margin-bottom: 12px;
}

.compact-head h2 {
  font-size: 24px;
}

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

.license-modern-table {
  width: 100%;
  min-width: 940px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.license-modern-table th {
  padding: 11px 12px;
  text-align: left;
  background: #101828;
  color: #fff;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.license-modern-table th:first-child {
  border-top-left-radius: var(--radius);
}

.license-modern-table th:last-child {
  border-top-right-radius: var(--radius);
}

.license-modern-table td {
  padding: 13px 12px;
  border-bottom: 1px solid #e8edf3;
  vertical-align: top;
  background: #fff;
}

.license-modern-table tr:hover td {
  background: #f8fffc;
}

.bot-name-cell strong,
.license-count strong,
.expiry-cell strong {
  display: block;
  color: var(--ink);
}

.bot-name-cell span,
.license-count span,
.expiry-cell span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.license-warning-note {
  display: block;
  margin-top: 7px;
  color: #9a3412;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.key-chip {
  display: inline-flex;
  max-width: 260px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: #f3f6fa;
  color: #111827;
  font-family: Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
  border: 1px solid transparent;
  text-align: left;
}

.key-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.key-copy-button {
  cursor: pointer;
}

.key-copy-button:hover {
  border-color: var(--green);
  background: #effcf8;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
  background: #ecfdf3;
  color: #067647;
}

.status-pill.warning {
  background: #fff7ed;
  color: #9a3412;
}

.status-pill.danger {
  background: #fef2f2;
  color: #991b1b;
}

.status-pill.muted-pill {
  background: #f2f4f7;
  color: #475467;
}

.license-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 210px;
}

.btn-small {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 12px;
}

.account-detail-row td {
  padding: 0 12px 14px;
  background: #fbfcfe;
}

.account-detail-row[hidden] {
  display: none;
}

.account-detail-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff;
}

.lot-stack {
  display: grid;
  gap: 3px;
  min-width: 118px;
}

.lot-stack strong {
  font-size: 16px;
  color: var(--ink);
}

.lot-stack span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.account-action-stack {
  display: grid;
  gap: 7px;
  min-width: 160px;
}

.account-action-stack .btn {
  width: 100%;
  justify-content: flex-start;
}

.device-paused-note {
  display: inline-flex;
  margin-left: 7px;
  border-radius: 999px;
  padding: 3px 7px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 11px;
  font-weight: 900;
}

.lot-history,
.lot-history-empty {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.lot-history h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

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

.lot-history-card {
  border: 1px solid #e8edf3;
  border-radius: var(--radius);
  padding: 10px;
  background: #fbfcfe;
}

.lot-history-card div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.lot-history-card strong {
  color: var(--ink);
}

.lot-history-card p {
  margin: 7px 0;
  color: #475467;
  line-height: 1.45;
  font-size: 13px;
}

.lot-history-card small,
.lot-history-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.compliance-record-list {
  display: grid;
  gap: 10px;
}

.compliance-record-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 13px;
  display: grid;
  gap: 10px;
}

.compliance-record-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.compliance-record-top strong,
.compliance-record-top span {
  display: block;
}

.compliance-record-top span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.compliance-record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.compliance-record-meta a {
  color: var(--green-deep);
  font-weight: 900;
}

.compliance-record-card details {
  border-top: 1px solid #edf0f5;
  padding-top: 9px;
}

.compliance-record-card summary {
  cursor: pointer;
  color: var(--green-deep);
  font-weight: 900;
}

.compliance-record-card ul {
  margin: 9px 0 0;
  padding-left: 18px;
  color: #475467;
  line-height: 1.55;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.lot-modal-panel {
  position: relative;
  width: min(780px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  text-align: left;
}

.lot-modal-head h2 {
  margin: 6px 0;
  font-size: 28px;
}

.lot-modal-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.lot-size-comparison {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.lot-size-comparison div {
  border: 1px solid #e8edf3;
  border-radius: var(--radius);
  padding: 12px;
  background: var(--soft);
}

.lot-size-comparison span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.lot-size-comparison strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
}

.risk-ack-box {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #7c2d12;
  border-radius: var(--radius);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.risk-ack-box h3 {
  margin: 0;
  color: #7c2d12;
}

.risk-ack-box p {
  margin: 0;
  line-height: 1.55;
  font-size: 13px;
}

.risk-ack-box.needs-confirmation {
  border-color: #ef4444;
  background: #fef2f2;
  color: #991b1b;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
}

.license-terms-box {
  background: #f7fffc;
  border-color: #b7ead8;
}

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

.pending-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: grid;
  gap: 12px;
  background: #fff;
}

.pending-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.pending-card h3 {
  margin: 0 0 5px;
  font-size: 18px;
}

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

.pending-meta div {
  border: 1px solid #edf0f5;
  border-radius: var(--radius);
  padding: 9px;
  background: var(--soft);
}

.pending-meta span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.pending-meta strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
}

.pending-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pending-actions .service-box {
  flex: 1 1 220px;
}

.pending-actions > .btn {
  align-self: flex-start;
}

.upgrade-select {
  margin: 14px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.download-hero {
  min-height: 210px;
  margin-bottom: 18px;
}

.download-guide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.guide-card {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.guide-card h2 {
  margin: 0 0 12px;
}

.guide-card p {
  color: var(--muted);
  line-height: 1.65;
}

.guide-card ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 9px;
  color: #475467;
  line-height: 1.55;
}

@media (max-width: 1050px) {
  .hero-panel,
  .dashboard-top,
  .payment-shell {
    grid-template-columns: 1fr;
  }

  .selected-summary {
    grid-template-columns: 140px 1fr;
  }

  .license-summary-strip,
  .pending-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .download-guide {
    grid-template-columns: 1fr;
  }

  .lot-size-comparison,
  .lot-history-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-price {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 14px;
  }
}

@media (max-width: 760px) {
  .portal-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .portal-main {
    padding: 24px 14px 44px;
  }

  .hero-copy {
    min-height: auto;
    padding: 24px;
  }

  .mybot-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

  .payment-product h1 {
    font-size: 30px;
  }

  .mini-stat-grid,
  .license-summary-strip,
  .pending-grid,
  .pending-meta,
  .download-guide,
  .bot-selector,
  .selected-summary,
  .choice-grid,
  .choice-grid.method-grid,
  .stat-grid,
  .service-grid,
  .order-card .service-grid,
  .lot-size-comparison,
  .lot-history-grid {
    grid-template-columns: 1fr;
  }

  .selection-panel {
    padding: 16px;
  }

  .payment-shell {
    padding: 0;
  }

  .total-line {
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  .total-line {
    flex-direction: column;
    gap: 4px;
  }

  .total-line strong {
    white-space: normal;
  }
}
