:root {
  --primary: #2563eb;
  --primary-dark: #0f1f3d;
  --accent: #c98a12;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #162033;
  --muted: #667085;
  --border: #d9e2ec;
  --success: #067647;
  --warning: #b54708;
  --danger: #b42318;
  --panel: var(--card);
  --ink: var(--text);
  --line: var(--border);
  --purple: #7c3aed;
  --gold-soft: #fff7df;
  --blue-soft: #eff6ff;
  --shadow: 0 18px 40px rgba(22, 33, 43, 0.08);
  --shadow-soft: 0 12px 28px rgba(15, 31, 61, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card,
.dashboard-card,
.setup-card,
.home-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-card {
  width: min(440px, 100%);
  padding: 28px;
}

.home-card {
  padding: 28px;
}

.setup-card,
.dashboard-card {
  padding: 24px;
}

.stack {
  display: grid;
  gap: 18px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: 28px;
}

h2 {
  margin-bottom: 8px;
  font-size: 22px;
}

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

.field-stack {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: #344251;
  font-size: 14px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd5df;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
  background: #ffffff;
}

select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd5df;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
  background: #ffffff;
}

textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  border: 1px solid #cbd5df;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
  background: #ffffff;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  border-color: var(--primary);
}

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

.btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 16px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn:hover {
  text-decoration: none;
  border-color: #b8c4cf;
}

.btn.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.btn.primary:hover {
  background: var(--primary-dark);
}

.btn.danger {
  border-color: rgba(180, 35, 24, 0.24);
  color: var(--danger);
}

.btn-primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover,
.btn.primary:hover {
  background: #1d4ed8;
}

.btn-secondary {
  border-color: rgba(37, 99, 235, 0.22);
  color: var(--primary);
  background: #ffffff;
}

.btn-danger {
  border-color: rgba(180, 35, 24, 0.24);
  color: var(--danger);
  background: #ffffff;
}

.btn-ghost {
  border-color: transparent;
  color: var(--muted);
  background: #f8fafc;
}

.btn.small {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.notice {
  margin: 14px 0 0;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  color: var(--muted);
  background: #f8fafc;
}

.notice.success {
  border-color: rgba(6, 118, 71, 0.24);
  color: var(--success);
  background: #ecfdf3;
}

.notice.error {
  border-color: rgba(180, 35, 24, 0.24);
  color: var(--danger);
  background: #fff4f2;
}

.notice.info {
  border-color: rgba(15, 118, 110, 0.24);
  color: var(--primary-dark);
  background: #f0fdfa;
}

.notice.warning {
  border-color: rgba(181, 71, 8, 0.24);
  color: var(--warning);
  background: #fffaeb;
}

.alert {
  box-shadow: 0 8px 20px rgba(15, 31, 61, 0.05);
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.12), transparent 32rem),
    linear-gradient(180deg, #f7f9fd 0%, var(--bg) 100%);
}

.dashboard-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.18), transparent 34%),
    linear-gradient(180deg, #0b1f3a 0%, #101828 100%);
  color: #ffffff;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-brand .brand-mark {
  flex: 0 0 auto;
  background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 58%, var(--accent) 100%);
}

.sidebar-brand strong,
.sidebar-brand span {
  display: block;
}

.sidebar-brand strong {
  font-size: 15px;
  line-height: 1.25;
}

.sidebar-brand span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.sidebar-link {
  display: flex;
  min-height: 42px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 700;
}

.sidebar-link:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  text-decoration: none;
}

.sidebar-link.active {
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.92), rgba(124, 58, 237, 0.82));
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.sidebar-link-button {
  width: 100%;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.sidebar-plan-card {
  display: grid;
  gap: 4px;
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-plan-card strong {
  font-size: 13px;
}

.sidebar-plan-card span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.dashboard-main {
  min-width: 0;
  padding: 28px;
}

.dashboard-shell .dashboard-topbar {
  border: 1px solid rgba(217, 226, 236, 0.88);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.dashboard-shell .topbar-brand .brand-mark {
  background: linear-gradient(135deg, var(--primary), var(--purple));
}

.dashboard-shell .topbar-brand h1 {
  color: var(--primary-dark);
}

.dashboard-grid {
  align-items: stretch;
}

.stat-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(217, 226, 236, 0.88);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), transparent 40%),
    var(--card);
  box-shadow: var(--shadow-soft);
}

.stat-card::after {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.16), rgba(201, 138, 18, 0.2));
  content: "";
}

.stat-card strong {
  color: var(--primary-dark);
}

.panel-card,
.table-card {
  border-color: rgba(217, 226, 236, 0.88);
  box-shadow: var(--shadow-soft);
}

.panel-card .section-head h2,
.table-card .section-head h2 {
  color: var(--primary-dark);
}

.credit-widget {
  background:
    linear-gradient(135deg, rgba(201, 138, 18, 0.12), transparent 48%),
    var(--card);
}

.action-card {
  min-height: 52px;
  justify-content: flex-start;
  box-shadow: 0 8px 18px rgba(15, 31, 61, 0.06);
}

.status-badge,
.status-pill {
  border-radius: 8px;
}

.responsive-table {
  background: var(--card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.empty-state {
  display: grid;
  gap: 8px;
  place-items: center;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 28px;
  color: var(--muted);
  background: #fbfcff;
  text-align: center;
}

.dashboard-topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
}

.topbar-brand {
  margin-bottom: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-name {
  color: var(--muted);
  font-size: 14px;
}

.admin-workspace {
  display: grid;
  gap: 18px;
}

.admin-dashboard-v2 .dashboard-main {
  display: grid;
  gap: 20px;
}

.admin-dashboard-header {
  align-items: center;
}

.admin-dashboard-header h1 {
  margin-bottom: 6px;
  font-size: 30px;
}

.admin-header-actions {
  justify-content: flex-end;
}

.admin-command-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at right top, rgba(201, 138, 18, 0.18), transparent 16rem),
    linear-gradient(135deg, #ffffff 0%, #eef5ff 52%, #f7f1ff 100%);
}

.admin-command-card h2 {
  max-width: 680px;
  margin-bottom: 8px;
  color: var(--primary-dark);
  font-size: 28px;
}

.admin-command-card p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.admin-stat-grid .summary-card {
  min-height: 128px;
}

.admin-create-card .admin-form,
.admin-branding-form {
  align-items: start;
}

.admin-focus-panel {
  border-color: rgba(37, 99, 235, 0.16);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.04), transparent 38%),
    var(--card);
}

.admin-credit-grid {
  margin-bottom: 18px;
}

.admin-recharge-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.78fr);
}

.admin-recharge-layout .recharge-form,
.admin-branding-logo-panel {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.adjustment-form {
  background: #fffdf7;
}

.admin-table-head {
  align-items: center;
}

.admin-table-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(190px, 240px);
  gap: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcff;
}

.admin-agent-table {
  min-width: 1180px;
}

.admin-agent-table th {
  background: #f3f7fb;
}

.admin-agent-table tbody tr:hover td {
  background: #fbfdff;
}

.admin-agent-identity {
  display: grid;
  gap: 4px;
}

.admin-agent-identity small {
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

.admin-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 300px;
}

.admin-action-group .btn.primary {
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.16);
}

.admin-branding-logo-panel {
  background: #fbfcff;
}

.agent-workspace {
  display: grid;
  gap: 20px;
}

.agent-dashboard-v2 .dashboard-main {
  display: grid;
  gap: 20px;
}

.agent-dashboard-header {
  align-items: center;
}

.agent-dashboard-header h1 {
  margin-bottom: 6px;
  font-size: 30px;
}

.agent-header-actions {
  justify-content: flex-end;
}

.credit-badge {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(201, 138, 18, 0.28);
  border-radius: 8px;
  padding: 8px 12px;
  color: #7a4d00;
  background: var(--gold-soft);
  font-size: 13px;
  font-weight: 700;
}

.agent-hero-credit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(360px, 0.78fr);
  gap: 16px;
  align-items: stretch;
}

.travel-hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.82fr);
  gap: 24px;
  min-height: 280px;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 14%, rgba(255, 255, 255, 0.72), transparent 12rem),
    linear-gradient(180deg, #dbeeff 0%, #e9f7ff 48%, #b9edf5 49%, #e5f8ff 70%, #fff4d6 71%, #fff9ea 100%);
}

.travel-hero-card::before {
  position: absolute;
  right: 0;
  bottom: 55px;
  left: 0;
  height: 78px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.62), transparent 42%, rgba(255, 255, 255, 0.42)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.22) 0 2px, transparent 2px 13px);
  content: "";
}

.travel-hero-content {
  position: relative;
  z-index: 1;
  align-self: center;
}

.hero-kicker {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  margin-bottom: 14px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  padding: 5px 9px;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.travel-hero-content h2 {
  max-width: 620px;
  margin-bottom: 10px;
  color: var(--primary-dark);
  font-size: 31px;
  line-height: 1.12;
}

.travel-hero-content p {
  max-width: 580px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.travel-visual {
  position: relative;
  min-height: 240px;
}

.travel-sun {
  position: absolute;
  top: 18px;
  right: 38px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffd166 0%, #f59e0b 58%, rgba(245, 158, 11, 0.3) 59%, transparent 72%);
}

.travel-cloud {
  position: absolute;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    20px -8px 0 rgba(255, 255, 255, 0.72),
    38px 1px 0 rgba(255, 255, 255, 0.64);
}

.travel-cloud-one {
  top: 62px;
  right: 190px;
  width: 74px;
}

.travel-cloud-two {
  top: 92px;
  right: 70px;
  width: 52px;
}

.travel-plane {
  position: absolute;
  top: 84px;
  right: 160px;
  display: grid;
  width: 64px;
  height: 36px;
  place-items: center;
  border-radius: 50% 50% 46% 46%;
  color: #ffffff;
  background: linear-gradient(135deg, #ffffff, #dbeafe);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  transform: rotate(-9deg);
}

.travel-plane::before,
.travel-plane::after {
  position: absolute;
  background: #ffffff;
  content: "";
}

.travel-plane::before {
  left: 20px;
  top: 13px;
  width: 34px;
  height: 8px;
  border-radius: 999px;
  transform: rotate(-18deg);
}

.travel-plane::after {
  right: 8px;
  bottom: -5px;
  width: 18px;
  height: 8px;
  border-radius: 999px;
  transform: rotate(28deg);
}

.travel-island {
  position: absolute;
  right: 20px;
  bottom: 26px;
  width: 270px;
  height: 58px;
  border-radius: 60% 45% 8px 8px;
  background:
    radial-gradient(circle at 34% 44%, rgba(255, 255, 255, 0.42), transparent 22%),
    linear-gradient(180deg, #ffd994 0%, #f1b45f 100%);
  box-shadow: 0 -10px 24px rgba(255, 255, 255, 0.42);
}

.travel-palm {
  position: absolute;
  right: 28px;
  bottom: 68px;
  width: 82px;
  height: 130px;
  content: "";
  background:
    radial-gradient(ellipse at 34% 18%, #1f9d61 0 18px, transparent 19px),
    radial-gradient(ellipse at 62% 20%, #15854e 0 20px, transparent 21px),
    radial-gradient(ellipse at 48% 10%, #31b475 0 22px, transparent 23px),
    linear-gradient(82deg, transparent 0 43px, #8b5e2e 44px 51px, transparent 52px);
  transform: rotate(9deg);
}

.travel-people {
  position: absolute;
  right: 124px;
  bottom: 80px;
  width: 76px;
  height: 96px;
  background:
    radial-gradient(circle at 22px 12px, #7c4a2d 0 8px, transparent 9px),
    radial-gradient(circle at 50px 10px, #7c4a2d 0 8px, transparent 9px),
    linear-gradient(#2563eb 0 0) 16px 24px / 14px 44px no-repeat,
    linear-gradient(#c98a12 0 0) 44px 22px / 15px 46px no-repeat,
    linear-gradient(#0f1f3d 0 0) 12px 66px / 8px 28px no-repeat,
    linear-gradient(#0f1f3d 0 0) 48px 68px / 8px 26px no-repeat;
}

.agent-stat-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.agent-stat-grid .summary-card {
  min-height: 116px;
}

.agent-stat-grid .summary-card strong {
  font-size: 24px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.agent-stat-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
  align-items: center;
}

.agent-stat-card::after {
  display: none;
}

.agent-stat-card span:not(.stat-icon) {
  margin-bottom: 6px;
}

.agent-stat-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.stat-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  font-weight: 900;
}

.stat-icon-purple {
  color: #5b21b6;
  background: #ede9fe;
}

.stat-icon-green {
  color: #047857;
  background: #dcfce7;
}

.stat-icon-gold {
  color: #b45309;
  background: #fef3c7;
}

.stat-icon-blue {
  color: #0369a1;
  background: #e0f2fe;
}

.stat-icon-pink {
  color: #be185d;
  background: #fce7f3;
}

.stat-icon-teal {
  color: #0f766e;
  background: #ccfbf1;
}

.credit-widget-panel {
  display: grid;
  gap: 16px;
}

.agent-credit-overview {
  --credit-used-percent: 0%;
  align-content: start;
}

.credit-widget-head,
.credit-meter-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.credit-widget-head h2 {
  margin-bottom: 4px;
}

.credit-meter {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
}

.credit-meter-row span,
.credit-breakdown span,
.credit-overview-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.credit-progress {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 8px;
  background: #e7eef8;
}

.credit-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--purple), var(--accent));
  transition: width 0.25s ease;
}

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

.credit-breakdown > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.credit-breakdown strong {
  display: block;
  margin-top: 6px;
  color: var(--primary-dark);
  font-size: 22px;
}

.credit-overview-layout {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.credit-donut {
  position: relative;
  display: grid;
  width: 122px;
  height: 122px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--purple) var(--credit-used-percent), #d9e2ec 0);
}

.credit-donut::after {
  position: absolute;
  inset: 14px;
  border-radius: inherit;
  background: #ffffff;
  content: "";
}

.credit-donut strong,
.credit-donut span {
  position: relative;
  z-index: 1;
}

.credit-donut strong {
  margin-top: 8px;
  color: var(--primary-dark);
  font-size: 24px;
}

.credit-donut span {
  margin-top: -28px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.credit-overview-list {
  display: grid;
  gap: 10px;
}

.credit-overview-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.credit-overview-list strong {
  color: var(--primary-dark);
}

.agent-action-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.agent-action-card {
  display: grid;
  gap: 8px;
  min-height: 112px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  color: var(--text);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.agent-action-card:hover {
  border-color: rgba(37, 99, 235, 0.34);
  text-decoration: none;
  transform: translateY(-1px);
}

.agent-action-card span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  font-weight: 900;
}

.agent-action-card strong {
  color: var(--primary-dark);
}

.agent-action-card small {
  color: var(--muted);
  line-height: 1.45;
}

.agent-dashboard-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.78fr);
  gap: 18px;
  align-items: start;
}

.recent-quote-list {
  display: grid;
  gap: 10px;
}

.recent-quote-table-shell {
  min-width: 0;
}

.recent-quotes-table {
  min-width: 780px;
}

.recent-quotes-table td strong,
.recent-quotes-table td small {
  display: block;
}

.recent-quotes-table td small {
  margin-top: 4px;
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

.recent-quote-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcff;
}

.recent-quote-card strong,
.recent-quote-card p {
  margin-bottom: 4px;
}

.recent-quote-card small {
  color: var(--muted);
}

.profile-summary-card {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcff;
}

.compact-logo-box {
  width: 82px;
  height: 82px;
}

.compact-logo-box .logo-placeholder {
  width: 58px;
  height: 58px;
  font-size: 20px;
}

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

.profile-summary-details span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.profile-summary-details strong {
  overflow-wrap: anywhere;
}

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

.profile-actions-row {
  margin-top: 14px;
}

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

.summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.summary-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.summary-card strong {
  font-size: 28px;
}

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

.section-head h2,
.section-head p {
  margin-bottom: 4px;
}

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

.admin-form .wide {
  grid-column: span 2;
}

.compact-form {
  grid-template-columns: minmax(240px, 360px) auto;
  align-items: end;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.inline-status {
  color: var(--muted);
  font-size: 14px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.agent-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  background: #ffffff;
}

.agent-table th,
.agent-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.agent-table th {
  background: #f8fafc;
  color: #344251;
  font-size: 12px;
  text-transform: uppercase;
}

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

.agent-table code {
  color: var(--primary-dark);
  font-family: Consolas, "Courier New", monospace;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 230px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
}

.status-pill.active {
  color: var(--success);
  background: #ecfdf3;
  border: 1px solid rgba(6, 118, 71, 0.24);
}

.status-pill.suspended {
  color: var(--danger);
  background: #fff4f2;
  border: 1px solid rgba(180, 35, 24, 0.24);
}

.builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.builder-form-card,
.quote-preview-card {
  min-width: 0;
}

.quote-preview-card {
  position: sticky;
  top: 16px;
}

.quote-form {
  display: grid;
  gap: 18px;
}

.form-block {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.form-block:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.form-block h3,
.compact-head h3 {
  margin: 0;
  font-size: 17px;
}

.compact-head {
  align-items: center;
  margin-bottom: 0;
}

.dynamic-list {
  display: grid;
  gap: 12px;
}

.repeat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.repeat-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.admin-image-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-image-thumb {
  width: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.admin-image-thumb img {
  display: block;
  width: 100%;
  height: 84px;
  object-fit: cover;
}

.admin-image-thumb .btn {
  width: 100%;
  border-width: 1px 0 0;
  border-radius: 0;
}

.quote-table-list {
  min-width: 980px;
}

.transaction-table {
  min-width: 1080px;
}

.credit-summary-grid {
  margin-bottom: 16px;
}

.credit-summary-grid .summary-card strong {
  overflow-wrap: anywhere;
  font-size: 24px;
}

.recharge-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.recharge-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.recharge-form .wide {
  grid-column: 1 / -1;
}

.plan-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.credit-history-head {
  align-items: center;
  margin-top: 10px;
  margin-bottom: 12px;
}

.credit-history-head h3 {
  margin: 0;
  font-size: 17px;
}

.public-link-panel {
  display: grid;
  gap: 12px;
  margin: 14px 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.public-link-panel p {
  margin-bottom: 0;
}

.public-link-field {
  font-weight: 700;
}

.public-link-field input {
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
}

.branding-logo-panel {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin: 16px 0 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcfd;
}

.logo-preview-box {
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.logo-preview-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.logo-placeholder {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
}

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

.branding-form {
  margin-top: 6px;
}

.quote-preview-paper {
  display: grid;
  gap: 16px;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
}

.quote-rendered {
  display: grid;
  gap: 16px;
}

.quote-brand-header {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border-bottom: 4px solid var(--quote-primary, var(--primary));
  padding-bottom: 14px;
}

.quote-brand-logo {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.quote-brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.quote-brand-logo span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 8px;
  background: var(--quote-primary, var(--primary));
  color: #ffffff;
  font-weight: 800;
}

.quote-brand-details h2 {
  margin: 0 0 4px;
  color: var(--quote-primary, var(--primary));
  font-size: 24px;
}

.quote-brand-owner {
  margin-bottom: 8px;
  color: #344251;
  font-weight: 700;
}

.quote-brand-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.quote-brand-meta span {
  overflow-wrap: anywhere;
}

.quote-lite-cover h2 {
  margin-bottom: 10px;
  font-size: 26px;
  color: var(--quote-primary, var(--primary));
}

.quote-lite-hero {
  margin: -18px -18px 16px;
}

.quote-lite-hero img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
}

.quote-section-lite {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.quote-section-lite h3 {
  margin: 0 0 10px;
  color: var(--quote-primary, var(--primary));
  font-size: 17px;
}

.quote-section-lite p {
  margin: 0 0 8px;
  line-height: 1.55;
}

.quote-section-lite ul {
  margin: 0;
  padding-left: 20px;
}

.quote-mini-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fbfcfd;
}

.quote-mini-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.quote-lite-table {
  width: 100%;
  border-collapse: collapse;
}

.quote-lite-table th,
.quote-lite-table td {
  border: 1px solid var(--line);
  padding: 9px;
  text-align: left;
  vertical-align: top;
}

.quote-lite-table th {
  background: #f8fafc;
}

.quote-lite-footer {
  border-top: 2px solid var(--quote-accent, var(--accent));
  padding-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.quote-lite-footer p {
  margin-bottom: 8px;
}

.quote-lite-footer strong {
  color: var(--quote-primary, var(--primary));
}

.public-quote-shell {
  width: min(960px, calc(100% - 32px));
}

.public-quote-card {
  display: grid;
  gap: 18px;
}

.public-quote-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.public-quote-head h1 {
  margin-bottom: 0;
}

.public-quote-actions {
  justify-content: flex-end;
}

.public-quote-paper {
  min-height: 0;
  box-shadow: var(--shadow);
}

.agent-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.agent-hero h2 {
  margin-bottom: 6px;
  font-size: 26px;
}

.agent-hero-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
}

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

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

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

.profile-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.profile-grid > div.wide {
  grid-column: span 2;
}

.profile-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.profile-grid strong {
  overflow-wrap: anywhere;
}

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

.meta-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.meta-box span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
}

.meta-box strong {
  overflow-wrap: anywhere;
}

.access-denied {
  border: 1px solid rgba(180, 35, 24, 0.24);
  border-radius: 8px;
  padding: 18px;
  background: #fff4f2;
}

@media (max-width: 1180px) {
  .admin-shell .summary-grid,
  .agent-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-command-card,
  .admin-recharge-layout {
    grid-template-columns: 1fr;
  }

  .admin-command-card {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .agent-hero-credit-grid,
  .agent-dashboard-columns,
  .travel-hero-card {
    grid-template-columns: 1fr;
  }

  .travel-visual {
    min-height: 180px;
  }

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

  .agent-action-grid,
  .credit-overview-layout,
  .credit-breakdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .dashboard-sidebar {
    position: static;
    height: auto;
    padding: 18px;
  }

  .sidebar-brand {
    padding-bottom: 14px;
  }

  .sidebar-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sidebar-link {
    justify-content: center;
    text-align: center;
  }

  .dashboard-main {
    padding: 20px;
  }
}

@media (max-width: 700px) {
  .page-shell {
    width: min(100% - 20px, 1080px);
    padding: 20px 0;
  }

  .dashboard-main {
    padding: 14px;
  }

  .dashboard-sidebar {
    padding: 14px;
  }

  .sidebar-nav {
    grid-template-columns: 1fr;
  }

  .dashboard-topbar,
  .public-quote-head,
  .button-row,
  .section-head,
  .topbar-actions,
  .admin-table-head,
  .agent-hero,
  .repeat-head {
    align-items: stretch;
    flex-direction: column;
  }

  .meta-grid,
  .summary-grid,
  .admin-form,
  .admin-table-toolbar,
  .compact-form,
  .agent-summary-grid,
  .agent-stat-grid,
  .agent-action-grid,
  .agent-hero-credit-grid,
  .agent-dashboard-columns,
  .credit-overview-layout,
  .credit-breakdown,
  .profile-summary-card,
  .profile-summary-details,
  .compact-profile-grid,
  .recharge-layout,
  .quick-action-grid,
  .profile-grid,
  .branding-logo-panel,
  .quote-brand-header {
    grid-template-columns: 1fr;
  }

  .logo-preview-box,
  .quote-brand-logo {
    width: 96px;
    height: 96px;
  }

  .admin-form .wide,
  .profile-grid > div.wide {
    grid-column: auto;
  }

  .btn {
    width: 100%;
  }
}

@media (max-width: 1100px) {
  .builder-layout {
    grid-template-columns: 1fr;
  }

  .quote-preview-card {
    position: static;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .dashboard-topbar,
  .builder-form-card,
  .quote-preview-card > .section-head,
  .notice {
    display: none !important;
  }

  .page-shell,
  .quote-builder-shell {
    width: 100%;
    padding: 0;
  }

  .builder-layout {
    display: block;
  }

  .quote-preview-card,
  .quote-preview-paper,
  .public-quote-paper {
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .public-quote-head,
  #publicQuoteMessage,
  .public-quote-actions {
    display: none !important;
  }
}
