:root {
  color-scheme: light;
  --page: #f7f9fc;
  --paper: #ffffff;
  --paper-soft: #f3f6fb;
  --ink: #07111f;
  --ink-soft: #2b384c;
  --muted: #6d7788;
  --line: rgba(7, 17, 31, 0.09);
  --blue: #2468ff;
  --blue-deep: #173c9f;
  --cyan: #11a7d9;
  --green: #0c8f62;
  --amber: #b77900;
  --red: #c22929;
  --shadow: 0 24px 70px rgba(22, 34, 55, 0.1);
  --soft-shadow: 0 16px 42px rgba(22, 34, 55, 0.08);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 249, 252, 0.95)),
    radial-gradient(circle at 16% 0%, rgba(36, 104, 255, 0.13), transparent 28%),
    radial-gradient(circle at 86% 10%, rgba(17, 167, 217, 0.14), transparent 30%),
    var(--page);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1fr) minmax(260px, 0.8fr);
  gap: 18px;
  align-items: center;
  min-height: 84px;
  padding: 16px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid rgba(7, 17, 31, 0.06);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(22px);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  width: max-content;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(7, 17, 31, 0.1);
  border-radius: 8px;
  background: linear-gradient(145deg, #fff, #f2f6fb);
  color: var(--ink);
  font-size: 22px;
  font-weight: 950;
  box-shadow: 0 14px 30px rgba(7, 17, 31, 0.08);
}

.brand strong,
.brand em {
  display: block;
  font-style: normal;
}

.brand strong {
  color: var(--ink);
  font-size: 19px;
  font-weight: 950;
}

.brand em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.topnav {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.topnav a {
  min-height: 38px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 900;
}

.topnav a:hover {
  background: rgba(36, 104, 255, 0.08);
  color: var(--blue);
}

.partner-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}

.partner-identity {
  min-width: 0;
  text-align: right;
}

.partner-identity span,
.partner-identity small {
  display: block;
  overflow: hidden;
  max-width: 180px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.partner-identity span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.partner-identity small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

main {
  padding: clamp(22px, 4vw, 58px) clamp(18px, 5vw, 72px) 70px;
}

.public-shell {
  display: grid;
  grid-template-columns: minmax(340px, 1.04fr) minmax(380px, 0.78fr);
  gap: clamp(28px, 5vw, 74px);
  align-items: center;
  min-width: 0;
  max-width: 1360px;
  min-height: calc(100vh - 180px);
  margin: 0 auto;
}

.public-copy {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 560px;
  padding: clamp(34px, 5vw, 70px);
  overflow: hidden;
  border: 1px solid rgba(7, 17, 31, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(242, 247, 255, 0.9)),
    radial-gradient(circle at 70% 28%, rgba(36, 104, 255, 0.13), transparent 32%);
  box-shadow: var(--shadow);
}

.public-copy::after {
  position: absolute;
  right: 9%;
  bottom: 12%;
  width: min(42vw, 420px);
  height: min(42vw, 420px);
  border: 1px solid rgba(36, 104, 255, 0.12);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.12)),
    repeating-linear-gradient(90deg, rgba(36, 104, 255, 0.08) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(0deg, rgba(17, 167, 217, 0.08) 0 1px, transparent 1px 32px);
  content: "";
  mask-image: radial-gradient(circle, #000 58%, transparent 70%);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.public-copy h1 {
  position: relative;
  z-index: 1;
  max-width: 660px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(42px, 5.4vw, 72px);
  line-height: 1.04;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.lead,
.workspace-hero p {
  position: relative;
  z-index: 1;
  max-width: 660px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.public-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 58px;
}

.public-metrics div,
.stat-card,
.panel-card,
.auth-card,
.invite-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--soft-shadow);
}

.public-metrics div {
  min-height: 104px;
  padding: 18px;
}

.public-metrics span,
.public-metrics strong,
.stat-card span,
.stat-card strong {
  display: block;
}

.public-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.public-metrics strong {
  margin-top: 12px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
}

.auth-card {
  display: grid;
  min-width: 0;
  gap: 18px;
  padding: clamp(22px, 4vw, 38px);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(7, 17, 31, 0.08);
  border-radius: 8px;
  background: #eef3f9;
}

.tab-button,
.button,
.icon-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 950;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease;
}

.tab-button {
  min-height: 48px;
  background: transparent;
  color: rgba(7, 17, 31, 0.58);
}

.tab-button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(22, 34, 55, 0.08);
}

.button,
.icon-button {
  min-height: 46px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  font-size: 14px;
}

.icon-button {
  display: grid;
  width: 44px;
  place-items: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 20px;
}

.button:hover,
.icon-button:hover,
.tab-button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, #07111f, #2468ff 72%, #11a7d9);
  color: #fff;
  box-shadow: 0 18px 44px rgba(36, 104, 255, 0.2);
}

.button-light {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.form {
  display: grid;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-label {
  color: rgba(7, 17, 31, 0.62);
  font-size: 13px;
  font-weight: 950;
}

.input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(7, 17, 31, 0.11);
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
}

.textarea {
  height: auto;
  min-height: 132px;
  padding-top: 12px;
  padding-bottom: 12px;
  resize: vertical;
}

.input:disabled {
  background: #f5f7fb;
  color: var(--muted);
}

.input:focus {
  border-color: rgba(36, 104, 255, 0.82);
  box-shadow: 0 0 0 4px rgba(36, 104, 255, 0.1);
}

.compact-input {
  height: 38px;
  min-width: 96px;
  padding: 0 10px;
}

.compact-button {
  min-height: 38px;
  padding: 0 12px;
}

.child-agent-form {
  margin-bottom: 16px;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.message {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 850;
}

.message.info {
  background: #edf4ff;
  color: var(--blue-deep);
}

.message.success {
  background: #eafaf2;
  color: var(--green);
}

.message.error {
  background: #fff0f0;
  color: var(--red);
}

.workspace {
  max-width: 1440px;
  margin: 0 auto;
}

.workspace-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.hero-copy,
.invite-panel {
  min-height: 260px;
  padding: clamp(24px, 4vw, 42px);
  border-radius: 8px;
}

.hero-copy {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(36, 104, 255, 0.12);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(242, 247, 255, 0.94)),
    radial-gradient(circle at 78% 8%, rgba(17, 167, 217, 0.14), transparent 34%);
  box-shadow: var(--shadow);
}

.hero-copy::after {
  position: absolute;
  right: 36px;
  bottom: 30px;
  width: 240px;
  height: 120px;
  border: 1px solid rgba(36, 104, 255, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(36, 104, 255, 0.1) 18% 19%, transparent 19% 48%, rgba(17, 167, 217, 0.16) 48% 49%, transparent 49%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.16));
  content: "";
  opacity: 0.8;
}

.hero-copy h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ink);
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1;
}

.hero-copy small {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.invite-panel {
  display: grid;
  align-content: space-between;
  background: #07111f;
  color: #fff;
}

.invite-panel span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  font-weight: 950;
}

.invite-panel strong {
  display: block;
  margin-top: 14px;
  color: #fff;
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 950;
  line-height: 1;
  overflow-wrap: anywhere;
}

.invite-link {
  min-height: 42px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.invite-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  min-height: 142px;
  padding: 22px;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
}

.stat-card strong {
  margin-top: 18px;
  color: var(--ink);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 950;
  line-height: 1;
  overflow-wrap: anywhere;
}

.accent-blue {
  background: linear-gradient(180deg, #fff, #f3f7ff);
}

.accent-green {
  background: linear-gradient(180deg, #fff, #f0fbf6);
}

.accent-cyan {
  background: linear-gradient(180deg, #fff, #eefaff);
}

.operation-panel {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.35fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.agent-action-card {
  display: grid;
  align-content: space-between;
  gap: 18px;
  min-height: 246px;
  padding: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, #07111f, #173c9f 66%, #11a7d9);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.agent-action-card span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agent-action-card h2 {
  margin: 0;
  color: #ffffff;
  font-size: 34px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.agent-action-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.75;
}

.agent-action-card .button-primary {
  width: max-content;
  border-color: rgba(255, 255, 255, 0.22);
  background: #ffffff;
  color: var(--blue-deep);
}

.agent-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.agent-shortcuts a {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 116px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.agent-shortcuts a:hover {
  border-color: rgba(36, 104, 255, 0.3);
  background: #f7fbff;
}

.agent-shortcuts span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
}

.agent-shortcuts strong {
  color: var(--ink);
  font-size: 18px;
}

.agent-shortcuts p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.profile-summary {
  display: grid;
  gap: 12px;
}

.profile-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.accent-amber {
  background: linear-gradient(180deg, #fff, #fff8eb);
}

.dashboard-grid,
.table-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.panel-card {
  padding: 24px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.section-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(7, 17, 31, 0.08);
  border-radius: 8px;
  background: #fff;
}

.table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.wide-table {
  min-width: 920px;
}

.table th,
.table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(7, 17, 31, 0.07);
  color: var(--ink-soft);
  font-size: 14px;
  text-align: left;
  vertical-align: top;
}

.table th {
  background: #f7f9fc;
  color: rgba(7, 17, 31, 0.55);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  white-space: nowrap;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table td.empty {
  padding: 34px 14px;
  color: var(--muted);
  text-align: center;
}

.value-strong {
  color: var(--ink);
  font-weight: 950;
}

.value-muted {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.status-success {
  background: #eafaf2;
  color: var(--green);
}

.status-warning {
  background: #fff7e6;
  color: var(--amber);
}

.status-info {
  background: #edf4ff;
  color: var(--blue-deep);
}

.status-danger {
  background: #fff0f0;
  color: var(--red);
}

.support-board {
  margin-bottom: 18px;
}

.support-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.35fr);
  gap: 16px;
  align-items: start;
}

.ticket-list,
.ticket-detail-wrap,
.ticket-detail,
.support-reply {
  display: grid;
  gap: 12px;
}

.ticket-list {
  max-height: 640px;
  overflow: auto;
}

.ticket-item {
  display: grid;
  gap: 8px;
  width: 100%;
  min-height: auto;
  padding: 14px;
  border: 1px solid rgba(7, 17, 31, 0.09);
  border-radius: 8px;
  background: #f7f9fc;
  color: inherit;
  text-align: left;
}

.ticket-item.active,
.ticket-item:hover {
  border-color: rgba(36, 104, 255, 0.32);
  background: #edf4ff;
}

.ticket-item-head,
.ticket-detail-head,
.ticket-badges,
.ticket-message-head,
.attachment-list {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ticket-item-head,
.ticket-detail-head {
  justify-content: space-between;
}

.ticket-item-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-item-meta,
.ticket-no,
.ticket-meta,
.ticket-message-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.ticket-detail {
  padding: 18px;
  border: 1px solid rgba(7, 17, 31, 0.08);
  border-radius: 8px;
  background: #fff;
}

.ticket-detail h3 {
  margin: 4px 0 0;
  color: var(--ink);
}

.ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.ticket-original,
.ticket-message {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(7, 17, 31, 0.08);
  border-radius: 8px;
  background: #f7f9fc;
}

.ticket-message.admin {
  background: #edf4ff;
}

.ticket-message.user {
  background: #fff;
}

.ticket-original p,
.ticket-message p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ticket-message-head {
  justify-content: space-between;
}

.ticket-messages {
  display: grid;
  gap: 10px;
}

.attachment-list {
  flex-wrap: wrap;
}

.attachment-list span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.ticket-empty {
  display: grid;
  gap: 6px;
  padding: 14px;
  color: var(--muted);
  line-height: 1.7;
}

.ticket-empty strong {
  color: var(--ink);
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .topnav,
  .partner-actions {
    justify-content: flex-start;
  }

  .public-shell,
  .workspace-hero,
  .dashboard-grid,
  .table-grid,
  .operation-panel,
  .support-layout {
    grid-template-columns: 1fr;
  }

  .public-copy {
    min-height: 460px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar {
    padding: 14px 16px;
  }

  .topnav {
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 2px;
  }

  main {
    padding: 18px 16px 44px;
  }

  .public-copy,
  .auth-card,
  .hero-copy,
  .invite-panel,
  .panel-card {
    padding: 22px;
  }

  .public-copy h1,
  .hero-copy h1 {
    font-size: 36px;
  }

  .lead,
  .workspace-hero p {
    font-size: 16px;
    max-width: 100%;
    word-break: break-all;
  }

  .public-metrics,
  .stats-grid,
  .form-grid,
  .invite-actions,
  .agent-shortcuts {
    grid-template-columns: 1fr;
  }
}

/* 2026 refined partner UI: compact SaaS console */
body {
  background: #f6f7f9;
}

.topbar {
  min-height: 58px;
  padding: 7px 10px;
  border-radius: 22px;
  box-shadow: 0 14px 36px rgba(16, 24, 40, 0.07);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.brand strong {
  font-size: 16px;
}

.brand em {
  font-size: 12px;
}

.topnav a {
  min-height: 38px;
  padding: 10px 13px;
  font-size: 13px;
}

main {
  padding-top: 24px;
}

.public-shell {
  gap: 28px;
  padding-top: 30px;
}

.public-copy {
  min-height: 440px;
  padding: 42px;
  border-radius: 26px;
  box-shadow: 0 18px 48px rgba(16, 24, 40, 0.08);
}

.public-copy h1 {
  font-size: clamp(44px, 5vw, 70px);
  line-height: 1.02;
}

.lead,
.workspace-hero p {
  font-size: 17px;
  line-height: 1.7;
}

.public-metrics {
  margin-top: 44px;
}

.public-metrics div {
  min-height: 96px;
  padding: 20px;
  border-radius: 18px;
}

.public-metrics strong {
  font-size: 21px;
}

.auth-card {
  padding: 30px;
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(16, 24, 40, 0.09);
}

.tabs {
  min-height: 54px;
  border-radius: 18px;
}

.input {
  min-height: 46px;
  border-radius: 14px;
}

.button {
  min-height: 42px;
}

.workspace {
  gap: 16px;
}

.workspace-hero {
  gap: 16px;
}

.hero-copy,
.invite-panel {
  min-height: 260px;
  padding: 30px;
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(16, 24, 40, 0.08);
}

.hero-copy h1 {
  font-size: clamp(36px, 4vw, 54px);
  line-height: 1.04;
}

.invite-panel strong {
  font-size: clamp(30px, 3vw, 42px);
}

.stats-grid {
  gap: 12px;
}

.stat-card {
  min-height: 112px;
  padding: 18px 20px;
  border-radius: 18px;
}

.stat-card strong {
  margin-top: 13px;
  font-size: 26px;
}

.operation-panel,
.dashboard-grid,
.table-grid {
  gap: 16px;
}

.agent-action-card {
  min-height: 250px;
  padding: 28px;
  border-radius: 24px;
}

.agent-action-card h2 {
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.1;
}

.agent-action-card p {
  font-size: 15px;
}

.agent-shortcuts {
  gap: 12px;
}

.agent-shortcuts a {
  min-height: 118px;
  padding: 20px;
  border-radius: 18px;
}

.agent-shortcuts strong {
  font-size: 20px;
}

.panel-card,
.table-wrap,
.ticket-list,
.ticket-detail,
.support-reply {
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(16, 24, 40, 0.055);
}

.panel-card {
  padding: 22px;
}

.section-header h2 {
  font-size: 25px;
}

.table th,
.table td {
  padding: 14px 16px;
}

@media (max-width: 760px) {
  .public-copy h1,
  .hero-copy h1 {
    font-size: 34px;
  }

  .public-copy,
  .auth-card,
  .hero-copy,
  .invite-panel,
  .agent-action-card,
  .panel-card {
    padding: 22px;
    border-radius: 20px;
  }
}

/* 2026 premium partner console */
:root {
  --agent-bg: #f5f5f7;
  --agent-ink: #101828;
  --agent-muted: #667085;
  --agent-line: rgba(16, 24, 40, 0.09);
  --agent-blue: #0071e3;
  --agent-cyan: #06aed5;
  --agent-shadow: 0 30px 90px rgba(16, 24, 40, 0.12);
  --agent-soft-shadow: 0 18px 54px rgba(16, 24, 40, 0.08);
}

body,
button,
input,
select,
textarea {
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body {
  background:
    radial-gradient(circle at 72% -10%, rgba(207, 236, 255, 0.86), transparent 30%),
    linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 100%);
  color: var(--agent-ink);
}

.topbar {
  position: sticky;
  z-index: 40;
  top: 16px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  width: min(1460px, calc(100% - 40px));
  min-height: 66px;
  margin: 16px auto 0;
  padding: 10px 12px;
  border: 1px solid var(--agent-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 52px rgba(16, 24, 40, 0.08);
  backdrop-filter: blur(24px) saturate(1.35);
}

.brand {
  gap: 10px;
  min-width: 230px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #101828;
  color: #fff;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.18);
}

.brand strong {
  color: var(--agent-ink);
  font-size: 17px;
  font-weight: 860;
}

.brand em {
  color: rgba(16, 24, 40, 0.48);
}

.topnav {
  justify-content: center;
  gap: 4px;
}

.topnav a {
  min-height: 42px;
  padding: 12px 16px;
  border-radius: 999px;
  color: rgba(16, 24, 40, 0.62);
  font-size: 14px;
  font-weight: 760;
}

.topnav a:hover {
  background: rgba(16, 24, 40, 0.07);
  color: var(--agent-ink);
}

.partner-actions {
  gap: 10px;
}

.partner-identity,
.icon-button,
.button {
  border-radius: 999px;
}

.partner-identity {
  min-height: 44px;
  padding: 7px 14px;
  border: 1px solid var(--agent-line);
  background: rgba(255, 255, 255, 0.72);
}

main {
  width: min(1460px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 72px;
}

.public-shell {
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.78fr);
  gap: 34px;
  min-height: auto;
  padding: 52px 0 36px;
}

.public-copy {
  min-height: 560px;
  padding: 64px;
  border: 1px solid var(--agent-line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 82% 20%, rgba(0, 113, 227, 0.16), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f6f9ff 62%, #eef6ff 100%);
  box-shadow: var(--agent-shadow);
}

.public-copy::after {
  right: 6%;
  bottom: 4%;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  opacity: 0.75;
}

.eyebrow {
  color: var(--agent-blue);
  font-size: 13px;
  font-weight: 820;
  text-transform: none;
}

.public-copy h1 {
  max-width: 760px;
  color: #05070d;
  font-size: clamp(58px, 7vw, 96px);
  font-weight: 860;
  line-height: 0.96;
  letter-spacing: 0;
}

.lead,
.workspace-hero p {
  color: rgba(16, 24, 40, 0.66);
  font-size: 20px;
  line-height: 1.75;
}

.public-metrics {
  gap: 12px;
  margin-top: 68px;
}

.public-metrics div {
  min-height: 116px;
  padding: 24px;
  border: 1px solid var(--agent-line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 18px 46px rgba(16, 24, 40, 0.07);
}

.public-metrics span {
  color: rgba(16, 24, 40, 0.48);
  font-weight: 760;
}

.public-metrics strong {
  color: #05070d;
  font-size: 23px;
}

.auth-card {
  align-self: center;
  padding: 38px;
  border: 1px solid var(--agent-line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--agent-shadow);
}

.tabs {
  min-height: 60px;
  padding: 5px;
  border: 1px solid var(--agent-line);
  border-radius: 20px;
  background: #f2f4f7;
}

.tab-button {
  border-radius: 16px;
  color: rgba(16, 24, 40, 0.58);
  font-weight: 820;
}

.tab-button.active {
  background: #fff;
  color: var(--agent-ink);
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.09);
}

.field {
  color: rgba(16, 24, 40, 0.62);
  font-weight: 760;
}

.input {
  min-height: 50px;
  border-color: var(--agent-line);
  border-radius: 16px;
  background: #fff;
}

.input:focus {
  border-color: var(--agent-blue);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.11);
}

.button {
  min-height: 46px;
  padding: 0 20px;
  font-weight: 820;
}

.button-primary {
  border: 0;
  background: var(--agent-blue);
  color: #fff;
  box-shadow: 0 18px 42px rgba(0, 113, 227, 0.22);
}

.button-light {
  border-color: var(--agent-line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--agent-ink);
}

.workspace {
  display: grid;
  gap: 18px;
}

.workspace-hero {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
  gap: 18px;
  margin: 0;
}

.hero-copy,
.invite-panel {
  min-height: 340px;
  padding: 40px;
  border: 1px solid var(--agent-line);
  border-radius: 34px;
  box-shadow: var(--agent-shadow);
}

.hero-copy {
  background:
    radial-gradient(circle at 84% 18%, rgba(0, 113, 227, 0.18), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
}

.hero-copy h1 {
  max-width: 720px;
  color: #05070d;
  font-size: clamp(48px, 5vw, 76px);
  font-weight: 860;
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy small {
  display: inline-flex;
  margin-top: 22px;
  padding: 9px 13px;
  border: 1px solid var(--agent-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: rgba(16, 24, 40, 0.56);
  font-weight: 760;
}

.invite-panel {
  background:
    radial-gradient(circle at 84% 16%, rgba(6, 174, 213, 0.32), transparent 34%),
    linear-gradient(135deg, #101828, #0b1020 76%);
}

.invite-panel strong {
  font-size: clamp(36px, 4vw, 56px);
  letter-spacing: 0;
}

.invite-link {
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card,
.panel-card,
.agent-shortcuts a,
.table-wrap,
.ticket-list,
.ticket-detail,
.support-reply {
  border: 1px solid var(--agent-line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--agent-soft-shadow);
}

.stat-card {
  min-height: 150px;
  padding: 24px;
}

.stat-card span {
  color: rgba(16, 24, 40, 0.5);
  font-weight: 760;
}

.stat-card strong {
  color: #05070d;
  font-size: 34px;
  letter-spacing: 0;
}

.operation-panel {
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.35fr);
  gap: 18px;
}

.agent-action-card {
  min-height: 300px;
  padding: 36px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 82% 12%, rgba(6, 174, 213, 0.36), transparent 36%),
    linear-gradient(135deg, #101828, #0b1020 74%);
  box-shadow: 0 28px 76px rgba(16, 24, 40, 0.24);
}

.agent-action-card h2 {
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 860;
  letter-spacing: 0;
}

.agent-action-card p {
  max-width: 560px;
  font-size: 17px;
}

.agent-action-card .button-primary {
  color: #101828;
}

.agent-shortcuts {
  gap: 14px;
}

.agent-shortcuts a {
  min-height: 142px;
  padding: 24px;
}

.agent-shortcuts a:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 113, 227, 0.2);
  box-shadow: 0 24px 64px rgba(16, 24, 40, 0.11);
}

.agent-shortcuts span {
  color: var(--agent-blue);
  font-size: 13px;
  font-weight: 820;
}

.agent-shortcuts strong {
  color: #05070d;
  font-size: 22px;
}

.agent-shortcuts p {
  color: rgba(16, 24, 40, 0.58);
}

.dashboard-grid,
.table-grid {
  gap: 18px;
}

.panel-card {
  padding: 28px;
}

.section-header h2 {
  color: #05070d;
  font-size: 30px;
  font-weight: 840;
  line-height: 1.08;
  letter-spacing: 0;
}

.table-wrap {
  overflow: hidden;
}

.table {
  border-collapse: separate;
  border-spacing: 0;
}

.table th {
  background: #fbfbfd;
  color: rgba(16, 24, 40, 0.48);
}

.table th,
.table td {
  padding: 18px 20px;
  border-bottom-color: rgba(16, 24, 40, 0.08);
}

.status-chip {
  border-radius: 999px;
}

.ticket-item {
  border-radius: 20px;
}

@media (max-width: 1120px) {
  .topbar,
  .public-shell,
  main {
    width: min(100% - 28px, 980px);
  }

  .topbar,
  .public-shell,
  .workspace-hero,
  .operation-panel,
  .dashboard-grid,
  .table-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar {
    position: static;
    top: 10px;
    grid-template-columns: 1fr;
    margin-top: 10px;
    border-radius: 24px;
  }

  .topnav {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
    justify-content: stretch;
    overflow-x: visible;
  }

  .topnav a {
    min-height: 34px;
    padding: 8px 4px;
    text-align: center;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
    font-size: 12px;
  }

  .partner-actions {
    justify-content: flex-start;
  }

  .public-copy,
  .auth-card,
  .hero-copy,
  .invite-panel,
  .agent-action-card,
  .panel-card {
    width: 100%;
    min-width: 0;
    padding: 26px;
    border-radius: 28px;
  }

  .public-copy h1,
  .hero-copy h1 {
    font-size: 42px;
    line-height: 1.02;
    overflow-wrap: anywhere;
  }

  .lead,
  .workspace-hero p {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .public-metrics div,
  .stat-card,
  .agent-shortcuts a {
    min-width: 0;
  }

  .public-metrics,
  .stats-grid,
  .agent-shortcuts,
  .form-grid,
  .invite-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .topnav a {
    font-size: 11px;
  }
}

/* Mobile fit hardening: keep real data readable without horizontal clipping. */
@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  main,
  .topbar,
  .public-shell {
    width: min(100% - 20px, 720px);
    max-width: 100%;
    box-sizing: border-box;
  }

  .topbar,
  .brand,
  .brand span,
  .partner-actions,
  .partner-identity,
  .panel-card,
  .invite-panel,
  .agent-action-card,
  .auth-card,
  .public-copy,
  .hero-copy {
    min-width: 0;
  }

  .brand strong,
  .brand em,
  .partner-identity span,
  .partner-identity small {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topnav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topnav a {
    min-width: 0;
    white-space: normal;
    line-height: 1.2;
  }

  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-wrap {
    width: 100%;
    max-width: 100%;
    overflow: visible !important;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .table-wrap .table,
  .table-wrap table {
    display: block;
    width: 100%;
    min-width: 0 !important;
  }

  .table-wrap thead {
    display: none;
  }

  .table-wrap tbody {
    display: grid;
    gap: 12px;
    width: 100%;
  }

  .table-wrap tr {
    display: grid;
    gap: 10px;
    width: 100%;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(16, 24, 40, 0.08);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(16, 24, 40, 0.055);
    box-sizing: border-box;
  }

  .table-wrap td {
    display: grid;
    grid-template-columns: minmax(76px, 0.32fr) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
    color: rgba(16, 24, 40, 0.82);
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .table-wrap td::before {
    content: attr(data-label);
    color: rgba(16, 24, 40, 0.48);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.5;
  }

  .table-wrap td[colspan] {
    display: block;
    padding: 18px !important;
    text-align: center;
  }

  .table-wrap td[colspan]::before {
    display: none;
  }

  .compact-input,
  .compact-button,
  .table-wrap .button {
    width: 100%;
    max-width: 100%;
  }

  .value-strong,
  .value-muted,
  .copy-value {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .support-layout,
  .support-board,
  .ticket-list,
  .ticket-detail-wrap,
  .ticket-detail,
  .support-reply,
  .ticket-item,
  .ticket-item-head,
  .ticket-detail-head,
  .ticket-item-meta,
  .ticket-badges {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .support-layout {
    grid-template-columns: 1fr;
  }

  .ticket-list {
    max-height: none;
    overflow: visible;
  }

  .ticket-item {
    width: 100%;
    overflow: hidden;
  }

  .ticket-item-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .ticket-detail-head,
  .ticket-badges {
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .ticket-item-head strong,
  .ticket-detail-head h3,
  .ticket-item-meta {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .ticket-item .status-chip {
    flex: 0 0 auto;
  }
}

@media (max-width: 380px) {
  .topnav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-wrap td {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

/* 2026 partner UI pass: polished workspace, softer sales surface, mobile-first login. */
:root {
  --agent-page: #fbfaf7;
  --agent-paper: #ffffff;
  --agent-ink: #0b1220;
  --agent-soft: #eef6f4;
  --agent-muted: #5f6b7a;
  --agent-line: rgba(15, 23, 42, 0.1);
  --agent-blue: #0b7df2;
  --agent-green: #15a36b;
  --agent-amber: #f2a20c;
  --agent-shadow: 0 24px 68px rgba(15, 23, 42, 0.1);
  --agent-soft-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
body {
  background:
    linear-gradient(180deg, #fbfaf7 0%, #f4f8fb 52%, #ffffff 100%),
    linear-gradient(90deg, rgba(11, 125, 242, 0.08), rgba(21, 163, 107, 0.06), rgba(242, 162, 12, 0.05));
  color: var(--agent-ink);
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
  pointer-events: none;
}
.topbar {
  position: sticky;
  top: 16px;
  z-index: 20;
  width: min(1180px, calc(100% - 32px));
  min-height: 64px;
  margin: 16px auto 0;
  padding: 8px;
  grid-template-columns: minmax(220px, 0.9fr) minmax(360px, 1.1fr) minmax(220px, 0.9fr);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(20px);
}
.brand {
  gap: 10px;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #0b1220;
  color: #ffffff;
  box-shadow: none;
}
.brand strong {
  font-size: 17px;
  font-weight: 850;
}
.brand em {
  color: rgba(15, 23, 42, 0.54);
  font-size: 12px;
  font-weight: 720;
}
.topnav {
  gap: 6px;
}
.topnav a {
  min-height: 38px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(15, 23, 42, 0.72);
  font-size: 14px;
  font-weight: 760;
}
.topnav a:hover {
  background: rgba(11, 125, 242, 0.08);
  color: var(--agent-blue);
}
.partner-actions {
  gap: 8px;
}
main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 74px;
}
.public-shell {
  grid-template-columns: minmax(0, 0.94fr) minmax(380px, 0.78fr);
  gap: 40px;
  align-items: center;
  max-width: none;
  min-height: calc(100vh - 166px);
}
.public-copy {
  min-height: 0;
  padding: 42px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 252, 250, 0.94)),
    repeating-linear-gradient(90deg, rgba(11, 125, 242, 0.07) 0 1px, transparent 1px 28px);
  box-shadow: var(--agent-shadow);
}
.public-copy::after {
  display: none;
}
.eyebrow {
  color: var(--agent-blue);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
}
.public-copy h1 {
  max-width: 620px;
  color: var(--agent-ink);
  font-size: 56px;
  font-weight: 880;
  line-height: 1.06;
  letter-spacing: 0;
}
.lead,
.workspace-hero p {
  max-width: 620px;
  margin-top: 20px;
  color: var(--agent-muted);
  font-size: 17px;
  line-height: 1.78;
  letter-spacing: 0;
}
.public-metrics {
  gap: 12px;
  margin-top: 34px;
}
.public-metrics div,
.stat-card,
.panel-card,
.auth-card,
.invite-panel,
.agent-shortcuts a,
.table-wrap,
.ticket-list,
.ticket-detail,
.support-reply {
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--agent-soft-shadow);
}
.public-metrics div {
  min-height: 96px;
  padding: 16px;
}
.public-metrics span {
  color: rgba(15, 23, 42, 0.52);
  font-size: 12px;
  font-weight: 820;
}
.public-metrics strong {
  margin-top: 10px;
  color: var(--agent-ink);
  font-size: 18px;
  font-weight: 850;
}
.auth-card {
  gap: 18px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 68px rgba(15, 23, 42, 0.12);
}
.tabs {
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #f0f3f7;
}
.tab-button,
.button,
.icon-button,
.input {
  border-radius: 8px;
}
.tab-button {
  min-height: 46px;
  color: rgba(15, 23, 42, 0.56);
  font-weight: 820;
}
.tab-button.active {
  color: var(--agent-ink);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}
.field-label {
  color: rgba(15, 23, 42, 0.62);
  font-weight: 760;
}
.input {
  min-height: 48px;
  border-color: rgba(15, 23, 42, 0.1);
  background: #ffffff;
}
.input:focus {
  border-color: rgba(11, 125, 242, 0.5);
  box-shadow: 0 0 0 3px rgba(11, 125, 242, 0.12);
}
.button {
  min-height: 46px;
  font-weight: 820;
}
.button-primary {
  background: #0b1220;
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
}
.button-light {
  border: 1px solid rgba(15, 23, 42, 0.11);
  background: rgba(255, 255, 255, 0.86);
}
.workspace {
  gap: 16px;
}
.workspace-hero {
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.76fr);
  gap: 16px;
}
.hero-copy,
.invite-panel {
  min-height: 300px;
  padding: 30px;
  border-radius: 8px;
}
.hero-copy {
  border: 1px solid rgba(15, 23, 42, 0.09);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 250, 0.96));
  box-shadow: var(--agent-soft-shadow);
}
.hero-copy h1 {
  max-width: 640px;
  color: var(--agent-ink);
  font-size: 48px;
  font-weight: 880;
  line-height: 1.08;
  letter-spacing: 0;
}
.hero-copy small {
  border-radius: 8px;
}
.invite-panel {
  border-color: rgba(15, 23, 42, 0.88);
  background:
    linear-gradient(135deg, #0b1220, #122337);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
}
.invite-panel strong {
  font-size: 42px;
  letter-spacing: 0;
}
.invite-link {
  border-radius: 8px;
}
.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.stat-card {
  min-height: 128px;
  padding: 20px;
}
.stat-card strong {
  color: var(--agent-ink);
  font-size: 30px;
  letter-spacing: 0;
}
.operation-panel {
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.28fr);
  gap: 16px;
}
.agent-action-card {
  min-height: 260px;
  padding: 30px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #0b1220, #122337);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
}
.agent-action-card h2 {
  font-size: 38px;
  font-weight: 880;
  line-height: 1.1;
  letter-spacing: 0;
}
.agent-action-card p {
  font-size: 16px;
}
.agent-shortcuts {
  gap: 12px;
}
.agent-shortcuts a {
  min-height: 126px;
  padding: 20px;
}
.agent-shortcuts strong {
  font-size: 20px;
}
.dashboard-grid,
.table-grid {
  gap: 16px;
}
.panel-card {
  padding: 24px;
}
.section-header h2 {
  color: var(--agent-ink);
  font-size: 26px;
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: 0;
}
.table th {
  background: #f7f9fb;
}
.table th,
.table td {
  padding: 15px 16px;
}
@media (max-width: 1120px) {
  .topbar,
  main {
    width: min(100% - 28px, 920px);
  }
  .public-shell,
  .workspace-hero,
  .operation-panel,
  .dashboard-grid,
  .table-grid {
    grid-template-columns: 1fr;
  }
  .public-copy,
  .auth-card,
  .hero-copy,
  .invite-panel {
    max-width: 760px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .topbar {
    position: static;
    width: 100%;
    margin: 0;
    padding: 12px;
    grid-template-columns: 1fr;
    border-top: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }
  .brand {
    width: 100%;
  }
  .topnav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }
  .topnav a {
    min-width: 0;
    min-height: 34px;
    padding: 8px 4px;
    text-align: center;
    white-space: normal;
    line-height: 1.2;
    font-size: 12px;
  }
  main {
    width: min(100% - 24px, 560px);
    padding: 24px 0 56px;
  }
  .public-shell {
    gap: 16px;
    min-height: auto;
  }
  #authSection .auth-card {
    order: -1;
  }
  .public-copy,
  .auth-card,
  .hero-copy,
  .invite-panel,
  .agent-action-card,
  .panel-card {
    width: 100%;
    max-width: 100%;
    padding: 22px;
    border-radius: 8px;
  }
  .public-copy h1,
  .hero-copy h1 {
    font-size: 34px;
    line-height: 1.1;
  }
  .lead,
  .workspace-hero p {
    font-size: 15px;
    line-height: 1.7;
  }
  .public-metrics,
  .stats-grid,
  .agent-shortcuts,
  .form-grid,
  .invite-actions {
    grid-template-columns: 1fr;
  }
  .public-metrics {
    margin-top: 20px;
  }
  .auth-card {
    gap: 14px;
  }
  .tabs {
    grid-template-columns: 1fr 1fr;
  }
  .button,
  .input {
    width: 100%;
  }
  .invite-panel strong {
    font-size: 32px;
  }
  .agent-action-card h2 {
    font-size: 30px;
  }
}
@media (max-width: 380px) {
  .topnav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .public-copy h1,
  .hero-copy h1 {
    font-size: 31px;
  }
}

/* Final partner viewport tuning. */
@media (min-width: 1121px) {
  .public-shell {
    min-height: 520px;
  }
  main {
    padding-top: 40px;
  }
}
@media (max-width: 760px) {
  body,
  main,
  .topbar,
  .public-shell,
  .public-copy,
  .auth-card,
  .form,
  .field,
  .tabs,
  .workspace,
  .workspace-hero,
  .hero-copy,
  .invite-panel,
  .stats-grid,
  .operation-panel,
  .agent-action-card,
  .agent-shortcuts,
  .dashboard-grid,
  .table-grid,
  .panel-card {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  .topbar {
    overflow: hidden;
  }
  .topnav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  main {
    width: 100% !important;
    padding: 24px 12px 56px !important;
  }
  .public-shell {
    width: 100% !important;
  }
  .auth-card,
  .public-copy {
    overflow: hidden;
    width: calc(100vw - 24px) !important;
    margin-right: auto;
    margin-left: auto;
  }
  .public-copy,
  .public-copy * {
    overflow-wrap: anywhere;
    word-break: normal;
  }
  .tabs,
  .tab-button,
  .input,
  .button {
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

/* 2026 partner dashboard polish: clearer data hierarchy and readable records. */
.workspace {
  width: 100%;
}
.workspace-hero {
  align-items: stretch;
}
.workspace .hero-copy,
.workspace .invite-panel,
.workspace .stat-card,
.workspace .panel-card,
.workspace .agent-action-card,
.workspace .agent-shortcuts a,
.workspace .table-wrap,
.workspace .ticket-list,
.workspace .ticket-detail,
.workspace .support-reply {
  border-radius: 8px;
}
.workspace .hero-copy {
  display: grid;
  align-content: center;
  min-height: 260px;
}
.workspace .hero-copy h1 {
  font-size: clamp(36px, 4.2vw, 56px);
}
.workspace .invite-panel {
  display: grid;
  gap: 10px;
  min-height: 260px;
  padding: 26px;
}
.workspace .invite-panel span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 820;
}
.workspace .invite-panel strong {
  color: #ffffff;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.08;
  overflow-wrap: anywhere;
}
.workspace .invite-link {
  min-width: 0;
  padding: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.workspace .invite-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
.workspace .invite-panel .button-light {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}
.workspace .invite-panel .button-primary {
  background: #ffffff;
  color: #0b1220;
  box-shadow: none;
}
.workspace .stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.workspace .stat-card {
  position: relative;
  min-height: 118px;
  overflow: hidden;
  padding: 18px;
}
.workspace .stat-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--agent-blue);
  content: "";
}
.workspace .stat-card.accent-green::before {
  background: var(--agent-green);
}
.workspace .stat-card.accent-cyan::before {
  background: #06a6d4;
}
.workspace .stat-card.accent-amber::before {
  background: var(--agent-amber);
}
.workspace .stat-card span {
  color: rgba(15, 23, 42, 0.52);
  font-size: 12px;
  font-weight: 820;
}
.workspace .stat-card strong {
  margin-top: 14px;
  font-size: clamp(24px, 2.5vw, 32px);
  line-height: 1.08;
  overflow-wrap: anywhere;
}
.workspace .agent-action-card {
  min-height: 230px;
}
.workspace .agent-action-card span {
  color: #9ee6c7;
}
.workspace .agent-action-card .button-primary {
  width: max-content;
  background: #ffffff;
  color: #0b1220;
  box-shadow: none;
}
.workspace .agent-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.workspace .agent-shortcuts a {
  min-height: 116px;
  text-decoration: none;
}
.workspace .panel-card {
  background: rgba(255, 255, 255, 0.94);
}
.workspace .section-header {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.workspace .section-header h2 {
  font-size: 24px;
}
.workspace .form {
  gap: 14px;
}
.workspace .profile-summary {
  display: grid;
  gap: 12px;
}
.workspace .table-wrap {
  overflow: hidden;
  background: #ffffff;
}
.workspace .table {
  min-width: 0;
}
.workspace .wide-table {
  min-width: 760px;
}
.workspace .table th {
  background: #f7f9fb;
  color: rgba(15, 23, 42, 0.5);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}
.workspace .table td {
  color: rgba(15, 23, 42, 0.74);
}
.workspace .table td.empty {
  padding: 30px 16px;
  background:
    linear-gradient(180deg, rgba(248, 252, 250, 0.8), rgba(255, 255, 255, 0.92));
  color: rgba(15, 23, 42, 0.5);
  font-weight: 760;
}
.workspace .support-board {
  margin-bottom: 0;
}
.workspace .support-layout {
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
}
.workspace .ticket-list,
.workspace .ticket-detail,
.workspace .support-reply {
  background: #ffffff;
}
.workspace .ticket-item {
  border-radius: 8px;
  background: #f8fafc;
}
.workspace .ticket-item.active,
.workspace .ticket-item:hover {
  border-color: rgba(11, 125, 242, 0.28);
  background: rgba(11, 125, 242, 0.06);
}
.workspace .ticket-empty {
  min-height: 120px;
  align-content: center;
  padding: 22px;
  border: 1px dashed rgba(15, 23, 42, 0.14);
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
}
.workspace .ticket-original,
.workspace .ticket-message {
  border-radius: 8px;
}
@media (max-width: 1120px) {
  .workspace .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .workspace .support-layout,
  .workspace .operation-panel {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .workspace {
    gap: 12px;
  }
  .workspace .hero-copy,
  .workspace .invite-panel,
  .workspace .agent-action-card,
  .workspace .panel-card {
    padding: 20px;
  }
  .workspace .invite-actions,
  .workspace .stats-grid,
  .workspace .agent-shortcuts,
  .workspace .dashboard-grid,
  .workspace .table-grid,
  .workspace .support-layout {
    grid-template-columns: 1fr;
  }
  .workspace .agent-action-card .button-primary {
    width: 100%;
  }
  .workspace .section-header {
    gap: 10px;
  }
  .workspace .wide-table,
  .workspace .table {
    min-width: 0;
  }
}

/* Final mobile containment: keep the partner entry and console inside the viewport. */
@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .topbar {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 12px !important;
    overflow: hidden;
  }

  .topbar > *,
  .brand,
  .topnav,
  .partner-actions,
  main,
  .public-shell,
  .workspace,
  .workspace-hero,
  .operation-panel,
  .dashboard-grid,
  .table-grid {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .brand {
    width: 100% !important;
  }

  .topnav {
    display: grid !important;
    width: 100% !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
  }

  .topnav a {
    width: auto !important;
    min-width: 0 !important;
    padding: 8px 4px !important;
    text-align: center;
  }

  main {
    width: 100vw !important;
    margin: 0 !important;
    padding: 24px 12px 56px !important;
    overflow: hidden;
  }

  .public-shell {
    width: 100% !important;
    grid-template-columns: minmax(0, 1fr) !important;
    overflow: hidden;
  }

  .auth-card,
  .public-copy,
  .hero-copy,
  .invite-panel,
  .agent-action-card,
  .panel-card {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    overflow: hidden;
  }

  .public-copy,
  .public-copy *,
  .hero-copy,
  .hero-copy *,
  .panel-card,
  .panel-card * {
    overflow-wrap: anywhere;
  }
}
