:root {
  --bg: #f4f7fb;
  --bg-soft: #eef4fb;
  --panel: #ffffff;
  --panel-2: #f8fbff;
  --border: #d7e0eb;
  --border-strong: #bfd0e3;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --accent-soft: #dbeafe;
  --success: #15803d;
  --success-soft: #dcfce7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.08);
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.06), transparent 25%),
    linear-gradient(180deg, #f8fbff 0%, #eff4f9 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

.app-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 18px 42px;
}

.hero,
.card {
  background: rgba(255,255,255,0.94);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.hero {
  padding: 24px;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto auto auto;
  grid-template-rows: auto auto auto;
  gap: 12px 24px;
  align-items: center;
  position: relative;
}

.hero h1 {
  margin: 0 0 6px;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
  white-space: normal;
}

.card {
  padding: 20px;
  margin-bottom: 16px;
}

h2 { margin: 0 0 14px; font-size: 21px; }
h3 { margin: 0 0 10px; font-size: 17px; }

.upload-row,
.action-row,
.grid.two {
  display: grid;
  gap: 12px;
}

.upload-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

button,
input[type="text"],
input[type="file"],
select,
textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

button {
  width: auto;
  min-width: 170px;
  cursor: pointer;
  background: #fff;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

button.primary {
  color: #fff;
  background: #FF6B35 !important;
  border-color: #E85D2F;
}

button:hover,
input[type="text"]:hover,
input[type="file"]:hover,
select:hover,
textarea:hover {
  border-color: var(--border-strong);
}

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

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}

.muted { color: var(--muted); }
.hidden { display: none !important; }

.status-pill,
.msg {
  display: inline-block;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: #1e1c20;
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

.msg { margin-top: 10px; }
.msg.success { border-color: #bbf7d0; background: var(--success-soft); color: var(--success); }
.msg.error { border-color: #fecaca; background: var(--danger-soft); color: var(--danger); }
.msg.info { border-color: #bfdbfe; background: var(--accent-soft); color: var(--accent-2); }

.table-wrap {
  display: block;
  width: 100%;
  overflow-x: scroll;
  overflow-y: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.table-wrap table {
  width: max-content;
  min-width: 720px;
  white-space: nowrap;
}

.table-wrap th,
.table-wrap td {
  white-space: nowrap;
}

.table-wrap.compact table { min-width: 560px; }

table {
  width: max-content;
  min-width: max-content;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  padding: 11px 12px;
  border-bottom: 1px solid #e8eef5;
  vertical-align: top;
  text-align: left;
}

th {
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #475569;
}

tr:hover td { background: #fafcff; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 6px;
}

.chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.rule-box, .sub-block, .column-rule-card, .confirm-box {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-radius: 16px;
}

.column-rule-card { margin-top: 18px; }

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

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

.radio-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.radio-group.vertical {
  flex-direction: column;
  gap: 10px;
}

.label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent);
}

code {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #111319;
  padding: 8px 10px;
  border-radius: 10px;
  display: inline-block;
  margin: 6px 0 10px;
  font-family: Consolas, monospace;
  font-size: 13px;
}

pre.log {
  white-space: pre-wrap;
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid #1e293b;
  border-radius: 16px;
  padding: 14px;
  overflow: auto;
  font-size: 13px;
}

.download-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.download-row a { text-decoration: none; }

.accordion {
  padding: 0;
  overflow: visible;
}

.accordion-header {
  width: 100%;
  min-width: 0;
  padding: 18px 20px;
  border: none;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 19px;
  text-align: left;
}

.accordion:hover .accordion-header {
  background: #fbfdff;
}

.accordion-body {
  display: none;
  padding: 0 20px 20px;
}

.accordion.open .accordion-body {
  display: block;
}

.accordion.open .accordion-header {
  border-bottom-color: var(--border);
}

.accordion-icon {
  font-size: 18px;
  transition: transform .18s ease;
  color: var(--muted);
}

.accordion.open .accordion-icon,
.result-accordion.open .accordion-icon {
  transform: rotate(180deg);
}

.multi-select {
  position: relative;
}

.multi-select-trigger {
  width: 100%;
  min-width: 0;
  justify-content: space-between;
  display: flex;
  align-items: center;
  text-align: left;
}

.multi-select-trigger-text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.multi-select-menu {
  display: none;
  position: absolute;
  z-index: 2000;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 300px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15,23,42,.14);
}

.multi-select.open .multi-select-menu {
  display: block;
}

.multi-select-actions {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  background: #f8fbff;
}

.multi-action {
  min-width: 0;
  padding: 8px 10px;
  font-size: 13px;
}

.multi-select-list {
  max-height: 240px;
  overflow: auto;
  padding: 8px;
}

.multi-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.multi-option:hover {
  background: #f8fbff;
}

.result-accordion {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: visible;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.result-accordion-header {
  width: 100%;
  min-width: 0;
  padding: 15px 16px;
  border: none;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  text-align: left;
}

.result-accordion-body {
  display: none;
  padding: 0 16px 16px;
  overflow-x: auto;
}

.result-accordion.open .result-accordion-body {
  display: block;
}

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

.stat-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 14px 16px;
}

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

.stat-card strong {
  font-size: 22px;
}

.rename-row input {
  max-width: 520px;
}

#messages:empty,
#results:empty,
#multifieldWrap:empty,
#duplicateReport:empty,
#splitSection:empty,
#mergeSection:empty,
#derivedSection:empty,
#columnRules:empty,
#columnScanTable:empty,
#outlierTable:empty,
#outlierControls:empty,
#filterRules:empty,
#intentMapping:empty,
#renameMapForm:empty,
#identifierCols:empty,
#deleteColumns:empty {
  display: none;
}

#workspace {
  animation: fadeIn .22s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}


#workspace,
#workspace > section.card,
#workspace > section.card.step-collapsible,
.step-body,
.rule-box,
.sub-block,
.columns-2,
.columns-3,
#mergeSection,
#derivedSection,
#summaryCalcSection,
#percentageCalcSection,
#mathCalcSection,
#deleteColumns,
#mergeSourceColumns,
#summaryCalcOperationWrap,
#summaryCalcColumnsWrap,
#percentageTargetColumnsWrap,
#mathSelectedColumnsWrap,
#identifierCols,
#duplicateReport { 
  overflow: visible !important;
}

#workspace > section.card,
#workspace > section.card.step-collapsible,
.step-body,
.rule-box,
.sub-block,
.columns-2,
.columns-3 {
  position: relative;
}

.multi-select {
  position: relative;
  z-index: 20;
}

.multi-select.open {
  z-index: 99999;
}

.multi-select-menu {
  z-index: 99999;
  overflow: visible;
}

.multi-select-list {
  max-height: 280px;
  overflow: auto;
}

#workspace > section.card:has(.multi-select.open),
#workspace > section.card.step-collapsible:has(.multi-select.open),
.step-body:has(.multi-select.open),
.rule-box:has(.multi-select.open),
.sub-block:has(.multi-select.open),
.columns-2:has(.multi-select.open),
.columns-3:has(.multi-select.open) {
  z-index: 1000;
}

#workspace > section.card.step-collapsible {
  isolation: isolate;
}

@media (max-width: 980px) {
  .app-shell { padding: 16px 12px 28px; }
  .hero { flex-direction: column; align-items: flex-start; }
  .upload-row, .grid.two, .columns-3, .columns-2, .result-summary-grid {
    grid-template-columns: 1fr;
  }
  button { width: 100%; }
  .download-row a, .download-row button { width: 100%; }
  .accordion-header { font-size: 17px; }
}

#repeatedHeaderSection{margin-top:12px;}


@media (max-width: 640px) {
  .app-shell {
    padding: 10px 8px 20px;
  }

  .hero,
  .card {
    border-radius: 14px;
  }

  .hero {
    padding: 16px;
    gap: 12px;
    margin-bottom: 14px;
  }

  .card {
    padding: 14px;
    margin-bottom: 12px;
  }

  h2 {
    font-size: 18px;
    line-height: 1.25;
  }

  h3 {
    font-size: 15px;
    line-height: 1.3;
  }

  .label,
  .muted,
  .chip,
  code,
  table,
  th,
  td,
  pre.log {
    font-size: 12px;
  }

  .status-pill,
  .msg {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

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

  button,
  input[type="text"],
  input[type="file"],
  select,
  textarea {
    padding: 11px 12px;
    min-height: 46px;
  }

  .accordion-header,
  .result-accordion-header {
    padding-left: 0;
    padding-right: 0;
    font-size: 15px;
  }

  .accordion-body,
  .result-accordion-body {
    padding-left: 0;
    padding-right: 0;
  }

  .rule-box,
  .sub-block,
  .column-rule-card,
  .confirm-box,
  .stat-card {
    padding: 12px;
    border-radius: 14px;
  }

  .radio-group {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .inline-check,
  .radio-group label {
    align-items: flex-start;
  }

  .chips {
    gap: 6px;
  }

  .chip {
    width: 100%;
    text-align: left;
  }

  .table-wrap {
    border-radius: 12px;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 520px;
  }

  .table-wrap.compact table {
    min-width: 460px;
  }

  th,
  td {
    padding: 9px 10px;
  }

  .download-row {
    gap: 8px;
  }

  .multi-select-menu {
    max-height: 240px;
  }

  .multi-select-actions {
    flex-direction: column;
  }

  .multi-action {
    width: 100%;
  }
}



#workspace, #workspace > section.card, .step-collapsible, .step-body, .rule-box, .sub-block, .columns-2, .columns-3, .columns-4, .responsive-grid-4, .grid, .card { overflow: visible !important; }
select, input[list] { position: relative; z-index: 5; }
select:focus, input[list]:focus { z-index: 99999; }


.premium-badge,.crown-badge{
  display:inline-block;font-size:20px;
  line-height:1;
  vertical-align:middle;
  margin-left:4px
}
  .premium-option{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}.premium-locked{opacity:.65;cursor:not-allowed}.premium-locked input{cursor:not-allowed}.premium-section-label{display:inline-flex;align-items:center;gap:8px}.premium-note{font-size:12px;color:#7a4b00;margin-top:6px}

.premium-hidden-for-active-user { display: none !important; }
.premium-upgrade-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:14px; }
.payment-method-card { display:flex; flex-direction:column; gap:6px; padding:16px; border:1px solid var(--border); border-radius:16px; background:linear-gradient(180deg,#fff 0%,#f8fbff 100%); cursor:pointer; }
.payment-method-card input[type="radio"] { width:auto; }
.payment-method-card.active { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(37,99,235,.08); }
.payment-method-title { font-weight:700; }
.payment-method-meta { color: var(--muted); font-size:14px; }
#paymentSelectorCard.hidden, #upgradeBtn.hidden, #premiumTimerPill.hidden { display:none !important; }
@media (max-width: 700px){ .premium-upgrade-grid{grid-template-columns:1fr;} }


.column-name-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 24px;align-items:start;margin-top:6px}
.column-name-item{padding:0;margin:0;word-break:break-word}
#columnChips.chips{display:block}
#columnChips .label{margin-bottom:6px}
.split-rule-card textarea{min-height:64px;resize:vertical}

.table-wrap table {
  white-space: nowrap;
}

.table-wrap table {
  width: max-content;
  min-width: max-content;
}

.table-wrap th,
.table-wrap td {
  white-space: nowrap;
}



.result-accordion-body .table-wrap {
  max-height: 420px;
  overflow: auto !important;
}

.result-accordion-body .table-wrap table {
  width: max-content;
  min-width: max-content;
}

.result-accordion-body .table-wrap th,
.result-accordion-body .table-wrap td {
  white-space: nowrap;
}


.auto-detection-card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.auto-detection-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.auto-detection-head .eyebrow {
  margin: 0 0 6px;
  color: var(--accent-2);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 12px;
}
.auto-detection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.auto-detection-item {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.auto-detection-item strong {
  display: block;
  margin-bottom: 6px;
}
.auto-detection-item span {
  color: var(--muted);
  font-size: 14px;
}
.auto-detection-item.warning {
  border-color: #fed7aa;
  background: #fff7ed;
}
.auto-detection-item.info {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.auto-suggested-actions {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}
.auto-suggested-actions ul {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--text);
}
.auto-empty-state {
  padding: 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  color: var(--muted);
  background: #fff;
}
@media (max-width: 900px) {
  .auto-detection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .auto-detection-grid {
    grid-template-columns: 1fr;
  }
  .auto-detection-head {
    flex-direction: column;
  }
}


.auto-detection-title {
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.01em;
}



#uploadScanStatus.upload-scan-status {
  display: block;
  width: 100%;
  max-width: 700px;

  margin-top: 14px;
  padding: 18px 24px;

 
  background: #ffffff;

 
  color: #000000;

  border: 1px solid #d7e0eb;

  /*
    Border radius:

    border-radius: 0;      = square
    border-radius: 16px;   = rounded box
    border-radius: 30px;   = softer rounded
    border-radius: 999px;  = full pill/capsule
  */

 
  border-radius: 999px;

  box-shadow: none;

  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  text-align: center;
}


#uploadScanStatus.upload-scan-status strong {

 
  color: #000000;

  font-weight: 800;
}




.auth-primary-btn {
  background: #FF6B35 !important;
  color: #ffffff !important;
  font-family: inherit !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}




.auth-secondary-btn {
  background: #EAB308 !important;
  color: #ffffff !important;
  font-family: inherit !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}

#upgradeBtn,
#inspectBtn,
#startPaymentBtn,
button.primary {
  min-width: 150px !important;
  width: 150px !important;

  background: #FF6B35 !important;
  background-image: none !important;
  border-color: #E85D2F !important;
  color: #ffffff !important;
}


.header-link-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:0 16px;
  border-radius:12px;
  border:1px solid rgba(37,99,235,.25);
  background:#FF6B35;
  color:#ffffff;
  text-decoration:none;
  font-weight:700;
  border-color: #E85D2F !important;;
  box-shadow:0 6px 18px rgba(15,23,42,.08)
}
.header-link-btn:hover{
  background:#FF6B35;
  color:#ffffff;
}
.profile-page-shell{max-width:1100px;margin:0 auto;padding:24px}
.profile-hero{gap:12px;flex-wrap:wrap}
.profile-card{margin-top:20px}
.profile-layout{display:grid;grid-template-columns:180px 1fr;gap:24px;align-items:center}
.profile-avatar{width:150px;height:150px;border-radius:50%;background:#eef2ff;display:flex;align-items:center;justify-content:center;overflow:hidden;font-size:64px;border:1px solid #d7dfeb}
.profile-avatar img{width:100%;height:100%;object-fit:cover}
.profile-avatar span{display:none}
.profile-avatar.empty-avatar span{display:block}
.profile-info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:18px}
.profile-info-grid div{background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:14px}
.profile-info-grid strong{display:block;color:#334155;margin-bottom:6px}
.profile-info-grid span{color:#0f172a;word-break:break-word}
.profile-form{display:grid;gap:16px}
@media (max-width:720px){.profile-layout{grid-template-columns:1fr}.profile-info-grid{grid-template-columns:1fr}.profile-avatar-wrap{display:flex;justify-content:center}}

.profile-icon-link{width:54px;min-width:54px;padding:0;border-radius:999px}
.profile-header-avatar{width:34px;height:34px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;overflow:hidden;font-size:20px;background:#eff6ff}
.profile-header-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.profile-info-grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}


.profile-hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.profile-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: #eef2ff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 64px;
  border: 1px solid #d7dfeb;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar.empty-avatar span {
  display: block;
}

.profile-avatar:not(.empty-avatar) span {
  display: none;
}

.profile-photo-note {
  text-align: center;
  margin-top: 10px;
  font-size: 13px;
}

.profile-header-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 20px;
  background: #eff6ff;
}

.profile-header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-header-avatar.has-profile-image{background:transparent;border:0;}
.profile-icon-link{padding:8px 12px;}


.profile-header-avatar{position:relative;}
.profile-header-avatar-img{width:100%;height:100%;object-fit:cover;border-radius:999px;display:block;}
.profile-header-avatar-img[hidden]{display:none !important;}
.profile-header-avatar-fallback[hidden]{display:none !important;}
.profile-header-avatar.has-profile-image{background:#fff;}


.profile-icon-link {
  width: 58px;
  min-width: 58px;
  height: 58px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}
.profile-header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  position: relative;
}
.profile-header-avatar-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 999px;
  display: block;
}
.profile-header-avatar-img[hidden],
.profile-header-avatar-fallback[hidden] {
  display: none !important;
}
.profile-header-avatar.has-profile-image .profile-header-avatar-img {
  display: block !important;
}
.profile-header-avatar.has-profile-image .profile-header-avatar-fallback {
  display: none !important;
}



.profile-icon-link {
  width: 58px !important;
  min-width: 58px !important;
  height: 58px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
}

.profile-header-avatar {
  width: 40px !important;
  height: 40px !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  position: relative !important;
  display: inline-block !important;
  background: #eff6ff !important;
  flex: 0 0 40px !important;
}

.profile-header-avatar-img,
.profile-header-avatar-fallback {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.profile-header-avatar-img {
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: 999px !important;
  display: block !important;
}

.profile-header-avatar-fallback {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 22px !important;
  line-height: 1 !important;
}

.profile-header-avatar-img[hidden],
.profile-header-avatar-fallback[hidden],
.profile-header-avatar.has-profile-image .profile-header-avatar-fallback {
  display: none !important;
}

.profile-header-avatar.has-profile-image .profile-header-avatar-img {
  display: block !important;
}



.profile-icon-link {
  flex-direction: column !important;
  gap: 3px !important;
  height: auto !important;
  min-height: 58px !important;
  padding: 6px 10px !important;
  text-decoration: none !important;
}
.profile-header-name {
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: #1f2937;
}
.profile-header-name[hidden] {
  display: none !important;
}



#homeLinkBtn.header-link-btn {
  background: #FF6B35 !important;
  color: #ffffff !important;
  border-color: #E85D2F !important;
  border-radius: 10px !important;
  min-height: 42px !important;
  padding: 0 18px !important;
  box-shadow: 0 8px 20px rgba(91, 33, 182, 0.18) !important;
}

#homeLinkBtn.header-link-btn:hover {
  background: #FF6B35 !important;
  border-color: #FF6B35 !important;
  color: #ffffff !important;
}


#profileLinkBtn.profile-icon-link {
  width: 78px !important;
  min-width: 78px !important;
  min-height: 84px !important;
  height: auto !important;
  padding: 8px 8px 7px !important;
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  border-radius: 20px !important;
  overflow: visible !important;
}

#profileHeaderAvatar.profile-header-avatar {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  flex: 0 0 46px !important;
  display: block !important;
  margin: 0 auto !important;
  position: relative !important;
}

#profileHeaderName.profile-header-name {
  display: block;
  width: 100%;
  max-width: 68px;
  text-align: center;
  margin: 0 auto;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: static !important;
}

#profileHeaderName.profile-header-name[hidden] {
  display: none !important;
}


#profileLinkBtn.profile-icon-link {
  width: auto !important;
  min-width: 64px !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 6px !important;
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
  text-decoration: none !important;
}

#profileHeaderAvatar.profile-header-avatar {
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  flex: 0 0 52px !important;
  display: block !important;
  position: relative !important;
  overflow: hidden !important;
  border-radius: 999px !important;
  border: 1px solid #bfdbfe !important;
  background: #eff6ff !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08) !important;
}

#profileHeaderName.profile-header-name {
  display: block !important;
  width: max-content !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: center !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  color: #0f172a !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  position: static !important;
}

#profileHeaderName.profile-header-name[hidden] {
  display: none !important;
}



#premiumTimerPill {
  width: 110px !important;
  height: 50px !important;
  min-width: 110px !important;
  border-radius: 12px !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  padding: 5px !important;
  text-align: center !important;
  line-height: 1.15 !important;
}



#premiumTimerPill .premium-timer-content {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 1px !important;
}

#premiumTimerPill .premium-timer-title {
  font-size: 12px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

#premiumTimerPill .premium-timer-subtitle {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #1d2024 !important;
  white-space: nowrap !important;
}

#premiumTimerPill .premium-timer-time {
  font-size: 12px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}



.auth-header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

#appShell .hero > div:first-child {
  grid-column: 1 / 5;
  grid-row: 1 / 3;
  min-width: 0;
}

#appShell #backendStatus {
  grid-column: 6;
  grid-row: 1;
  justify-self: end;
  align-self: start;
}

#appShell #userStatus {
  grid-column: 1;
  grid-row: 3;
  justify-self: start;
  align-self: start;

  width: 230px !important;
  min-width: 230px !important;
  max-width: 230px !important;

  height: auto !important;
  display: block !important;

  white-space: normal !important;
  line-height: 1.35 !important;
  text-align: left !important;
  overflow: visible !important;
}

#appShell #premiumTimerPill {
  grid-column: 2;
  grid-row: 3;
}

#appShell #profileLinkBtn {
  grid-column: 3;
  grid-row: 3;
}

#appShell #homeLinkBtn {
  grid-column: 4;
  grid-row: 3;
}

#appShell #upgradeBtn {
  grid-column: 5;
  grid-row: 3;
}

#appShell #logoutBtn {
  grid-column: 6;
  grid-row: 3;
}

#appShell #homeLinkBtn,
#appShell #upgradeBtn,
#appShell #logoutBtn {
  width: auto !important;
  min-width: 0 !important;
  height: 50px !important;
  padding: 0 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

.status-pill, .msg {
    
    gap: 8px;
    padding: 9px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    color: #1e1c20;
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}





#appShell #userStatus.status-pill {

  border: 0 !important;

  background: transparent !important;

  box-shadow: none !important;

  border-radius: 0 !important;

}

#startPaymentBtn {
  width: 220px !important;
  margin-top: 20px !important;
}



@media (max-width: 900px) {

  #appShell .hero {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 14px 10px !important;
    align-items: center !important;
  }

  #appShell .hero > div:first-child {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
  }

 #appShell #backendStatus {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  width: fit-content !important;
  min-width: 120px !important;
  justify-self: center !important;
}

  #appShell #userStatus {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  #appShell #profileLinkBtn {
    grid-column: 1 / -1 !important;
    grid-row: 4 !important;
    justify-self: center !important;
  }

 #appShell #premiumTimerPill {
  grid-column: 1 / -1 !important;
  grid-row: 5 !important;
  justify-self: center !important;
  width: 130px !important;
  min-width: 130px !important;
  height: 42px !important;
}

  #appShell #upgradeBtn {
    grid-column: 1 !important;
    grid-row: 6 !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  #appShell #homeLinkBtn {
    grid-column: 2 !important;
    grid-row: 6 !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  #appShell #logoutBtn {
    grid-column: 3 !important;
    grid-row: 6 !important;
    width: 100% !important;
    min-width: 0 !important;
  }
}


@media (max-width: 768px) {

  .profile-hero {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .profile-hero-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-top: 15px !important;
  }

}

#downloadActions .download-excel-btn {
  background: #FF6B35 !important;
  color: #ffffff !important;
  white-space: nowrap !important;
  width: 263px !important;
  min-width: 263px !important;
  padding: 16px 18px !important;
}

#executeBtn {
  background: #FF6B35 !important;
  color: #ffffff !important;
  white-space: nowrap !important;
  width: 263px !important;
  min-width: 263px !important;
  padding: 16px 18px !important;
}