/* srt.to app — components on top of the Cuba admin theme.
   Cuba (bootstrap.css + cuba.css) supplies layout, cards, forms, buttons,
   tables and badges; this file only styles srt.to-specific widgets, using
   Cuba's CSS variables so light and dark (`body.dark-only`) both work. */

:root {
  --srt-primary: #7366ff;
  --srt-primary-rgb: 115, 102, 255;
  --srt-secondary: #f73164;
  --srt-muted: #8f8f8f;
  --srt-track: rgba(var(--srt-primary-rgb), 0.1);
  --geo-map-from: #f5f4ff;
  --geo-map-to: #eceaff;
}

body.dark-only {
  --srt-muted: rgba(255, 255, 255, 0.45);
  --srt-track: rgba(255, 255, 255, 0.08);
  --geo-map-from: #1f2029;
  --geo-map-to: #1a1b22;
}

.f-light { color: var(--srt-muted) !important; }

/* ---------- Shell ---------- */
.srt-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.srt-logo img { width: 32px; height: 32px; border-radius: 9px; }
.srt-logo-text {
  font-family: Rubik, sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--body-font-color, #2f2f3b);
}
.srt-logo-text span { color: var(--theme-default); }
.page-wrapper .page-header .header-logo-wrapper .srt-logo-text { font-size: 20px; }

.page-wrapper .page-header .header-wrapper .nav-right .feather,
.page-wrapper .page-header .header-wrapper .toggle-sidebar .feather,
.sidebar-wrapper .toggle-sidebar .feather,
.sidebar-wrapper .back-btn .feather {
  width: 20px;
  height: 20px;
}
.page-wrapper .page-header .header-wrapper .nav-right .mode,
.page-wrapper .page-header .header-wrapper .nav-right .header-search { cursor: pointer; }

.header-create-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  color: #fff !important;
}
.page-wrapper .page-header .header-wrapper .nav-right .header-create-btn svg,
.page-wrapper .page-header .header-wrapper .nav-right .header-create-btn .feather {
  width: 16px;
  height: 16px;
  stroke: #fff;
  fill: none;
}
@media (max-width: 991px) {
  .header-create-item { display: none !important; }
}

.srt-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(var(--srt-primary-rgb), 0.12);
  color: var(--theme-default);
  font-family: Rubik, sans-serif;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
}
.page-wrapper .page-header .header-wrapper .nav-right .profile-nav .profile-media .srt-avatar + .flex-grow-1 { margin-left: 10px; }
.page-wrapper .page-header .header-wrapper .nav-right .profile-nav .profile-media p .feather {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  vertical-align: middle;
}
.page-wrapper .page-header .header-wrapper .nav-right .profile-dropdown li .feather {
  width: 16px;
  height: 16px;
  margin-right: 10px;
  vertical-align: middle;
}
.profile-dropdown-email {
  font-size: 12px;
  color: var(--srt-muted);
  word-break: break-all;
  border-bottom: 1px solid var(--chart-border);
  padding-bottom: 8px !important;
}
.profile-dropdown-email:empty { display: none; }
/* Keyboard access for Cuba's hover-only dropdown. */
.onhover-dropdown:focus-within .onhover-show-div {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.page-wrapper .page-header .header-wrapper .left-header .notification-slider a {
  color: var(--theme-default);
  font-weight: 500;
  white-space: nowrap;
}
.page-wrapper .page-header .header-wrapper .left-header .notification-slider h6 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-wrapper .page-header .header-wrapper .search-full .close-search {
  position: absolute;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--srt-muted);
  display: flex;
}
.page-wrapper .page-header .header-wrapper .search-full .close-search .feather { width: 18px; height: 18px; }

/* Static stand-in for the SimpleBar markup Cuba's sidebar CSS is keyed on. */
.page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper .sidebar-main .sidebar-links { overflow: hidden; }
#sidebar-menu .simplebar-content-wrapper {
  max-height: calc(100vh - 115px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--srt-primary-rgb), 0.25) transparent;
}
.sidebar-links .sidebar-create-li { list-style: none; }
.sidebar-create-card {
  margin: 24px 20px 30px;
  padding: 18px;
  border-radius: 12px;
  background: rgba(var(--srt-primary-rgb), 0.08);
}
.sidebar-create-card h6 { font-weight: 600; margin-bottom: 4px; color: var(--theme-default); }
.sidebar-create-card p { font-size: 12px; line-height: 1.5; color: var(--srt-muted); margin-bottom: 12px; }
.sidebar-create-card .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.sidebar-create-card .feather { width: 14px; height: 14px; }
.sidebar-wrapper.close_icon .sidebar-create-card { display: none; }

.page-wrapper .page-body-wrapper .page-title .breadcrumb .breadcrumb-item a svg {
  width: 14px;
  height: 14px;
}

/* ---------- Generic ---------- */
.app-view { display: none; }
.app-view.is-active { display: block; }
.error, .auth-error {
  color: var(--bs-danger, #fc564a);
}
p.error, div.error {
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(252, 86, 74, 0.1);
  font-size: 13px;
}
.empty-state, .dash-empty, .top-links-empty {
  color: var(--srt-muted);
  text-align: center;
  padding: 24px 12px;
  margin: 0;
}
.dash-empty p { margin: 0 0 4px; font-weight: 500; color: var(--body-font-color); }
.dash-empty small { color: var(--srt-muted); }
.text-muted { color: var(--srt-muted) !important; }
code {
  color: var(--theme-default);
  background: rgba(var(--srt-primary-rgb), 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}
.form-row-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.form-row-inline > input,
.form-row-inline > .form-control { flex: 1 1 180px; width: auto; }
.form-row-inline > select { width: auto; }
.card .card-header .header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.card .card-header .header-top h5 { margin: 0; }
.card .card-header .header-top a { font-weight: 500; }

.plan-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.plan-banner[hidden] { display: none; }

/* ---------- Dashboard ---------- */
.default-dashboard .profile-box { min-height: calc(100% - 30px); }
.default-dashboard .profile-box .card-body { position: relative; }
.default-dashboard .profile-box .greeting-user h2 { font-size: 24px; }
.default-dashboard .profile-box .greeting-user p { width: 70%; }
.profile-box-art {
  position: absolute;
  right: 24px;
  bottom: 24px;
  opacity: 0.95;
}
.profile-box-art img {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  border: 3px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transform: rotate(-8deg);
}
.widget-1 .widget-round.primary .bg-round { background-color: rgba(var(--srt-primary-rgb), 0.1); }
.widget-1 .widget-round.primary .bg-round svg { fill: var(--theme-default); }
.widget-1 .widget-round.primary .half-circle { fill: rgba(var(--srt-primary-rgb), 0.3); }
.widget-1 .widget-round .bg-round svg:not(.half-circle) { stroke: currentColor; }
.widget-1 .widget-content h4 { margin-bottom: 4px; }

.create-mode-tabs { gap: 6px; }
.create-mode-tabs .nav-link {
  padding: 6px 14px;
  font-size: 13px;
  border: 0;
  background: transparent;
}
.create-panel[hidden] { display: none; }
.quick-create-usage { margin-top: 6px; font-size: 13px; }
.quick-create-usage .quick-usage-info { display: none; }
.quick-domain-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 13px;
}
.quick-slug-preview { font-size: 12px; margin: 6px 0 16px; }
#create-workspace-wrap:has(#create-workspace[hidden]) { display: none; }
.shorten-success {
  margin-top: 16px;
  padding: 16px;
  border-radius: 10px;
  border: 1px dashed rgba(84, 186, 74, 0.5);
  background: rgba(84, 186, 74, 0.06);
}
.shorten-success[hidden] { display: none; }
.shorten-success-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.qr-create-result {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.qr-create-result[hidden] { display: none; }
.qr-create-preview svg,
.qr-modal-preview svg,
.qr-preview svg {
  width: 180px;
  height: 180px;
  background: #fff;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--chart-border);
}
.qr-modal-preview { margin-top: 16px; }

.workflow-card .card-body {
  background-image: linear-gradient(135deg, rgba(var(--srt-primary-rgb), 0.12), rgba(247, 49, 100, 0.06));
  border-radius: inherit;
}
.workflow-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.workflow-pill {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 20px;
  background: var(--white);
  color: var(--theme-default);
  border: 1px solid rgba(var(--srt-primary-rgb), 0.2);
  transition: background 0.2s, color 0.2s;
}
.workflow-pill:hover { background: var(--theme-default); color: #fff; }

.top-links-list { display: flex; flex-direction: column; gap: 14px; }
.top-links-row { display: flex; align-items: center; gap: 12px; }
.top-links-rank {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  background: rgba(var(--srt-primary-rgb), 0.1);
  color: var(--theme-default);
}
.top-links-main { flex: 1; min-width: 0; }
.top-links-slug {
  display: block;
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 6px;
}
.top-links-track, .analytics-bar-track, .bar-track {
  height: 6px;
  border-radius: 6px;
  background: var(--srt-track);
  overflow: hidden;
}
.top-links-fill, .analytics-bar-fill, .bar-fill {
  height: 100%;
  min-width: 4px;
  border-radius: 6px;
  background: var(--theme-default);
}
.top-links-clicks { font-weight: 600; font-size: 13px; }

.clicks-chart { min-height: 230px; }
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 230px;
  padding-top: 20px;
  border-bottom: 1px dashed var(--chart-border);
}
.chart-bar-col {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  position: relative;
}
.chart-bar {
  width: 100%;
  max-width: 36px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--theme-default), rgba(var(--srt-primary-rgb), 0.35));
}
.chart-bar-col span { font-size: 12px; color: var(--srt-muted); }
.chart-bar-col em {
  position: absolute;
  top: -2px;
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--theme-default);
}
.chart-empty { text-align: center; padding: 30px 0; }
.chart-empty-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  height: 80px;
  margin-bottom: 16px;
}
.chart-empty-bars span { width: 18px; border-radius: 4px 4px 0 0; background: var(--srt-track); }
.chart-empty-bars span:nth-child(1) { height: 30%; }
.chart-empty-bars span:nth-child(2) { height: 60%; }
.chart-empty-bars span:nth-child(3) { height: 45%; }
.chart-empty-bars span:nth-child(4) { height: 80%; }
.chart-empty-bars span:nth-child(5) { height: 55%; }
.chart-empty p { margin: 0; font-weight: 500; }
.chart-empty small { color: var(--srt-muted); }
.chart-range--up { background-color: rgba(84, 186, 74, 0.12) !important; color: #54ba4a !important; }
.chart-range--down { background-color: rgba(252, 86, 74, 0.12) !important; color: #fc564a !important; }

#recent-links .table td,
#recent-links .table th { padding: 12px 16px; vertical-align: middle; }
#recent-links .table th { font-size: 13px; color: var(--srt-muted); font-weight: 500; }
.recent-link-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(var(--srt-primary-rgb), 0.1);
  color: var(--theme-default);
  font-weight: 600;
}
.recent-dest {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--srt-muted);
}

/* ---------- Link library ---------- */
.usage-bar { margin-bottom: 16px; }
.usage-bar[hidden] { display: none; }
.usage-bar .progress { height: 8px; }
.usage-bar-fill.usage-warning { background-color: #ffaa05 !important; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.quick-actions .toolbar-search { width: 200px; }
.quick-actions .toolbar-date { width: 150px; }
.links-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.links-table-toolbar .toolbar-search { flex: 1 1 240px; }
.links-table-toolbar .themed-select { width: 180px; }
#links-list { display: flex; flex-direction: column; }
.link-row {
  display: flex;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px dashed var(--chart-border);
}
.link-row:last-child { border-bottom: 0; }
.link-row-archived { opacity: 0.6; }
.link-select-wrap { padding-top: 3px; }
.link-select { width: 16px; height: 16px; accent-color: var(--theme-default); }
.link-main { flex: 1; min-width: 0; }
.link-title { font-weight: 600; font-size: 15px; margin-bottom: 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.link-main .short, #link-header .short { color: var(--theme-default); font-weight: 500; font-size: 14px; }
.link-main .long, #link-header .long {
  color: var(--srt-muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link-notes { font-size: 13px; margin-top: 6px; color: var(--body-font-color); }
.link-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag-chip {
  border: 0;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(var(--srt-primary-rgb), 0.1);
  color: var(--theme-default);
}
.tag-chip:hover { background: var(--theme-default); color: #fff; }
.link-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}
.link-side .clicks { font-weight: 600; color: var(--theme-default); }
.link-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
@media (max-width: 767px) {
  .link-row { flex-wrap: wrap; }
  .link-side { align-items: flex-start; width: 100%; padding-left: 30px; }
  .link-actions { justify-content: flex-start; }
}
.variant-row .variant-weight { max-width: 100px; }

/* ---------- Modals (srt-managed, toggled with [hidden]) ---------- */
.srt-modal {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: grid;
  place-items: center;
  padding: 16px;
}
.srt-modal[hidden] { display: none; }
.srt-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.5); }
.srt-modal-panel {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.srt-modal-panel--lg { width: min(620px, 100%); }
.srt-modal-panel .modal-footer { gap: 8px; }

/* ---------- Themed select ---------- */
.themed-select { position: relative; }
.themed-select-btn { text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.themed-select-menu {
  position: fixed;
  z-index: 1080;
  margin: 0;
  padding: 6px;
  max-height: 300px;
  overflow: auto;
  border-radius: 8px;
  border: 1px solid var(--chart-border);
  background: var(--white);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.themed-select-menu[hidden] { display: none !important; }
.themed-select-menu .dropdown-item { cursor: pointer; border-radius: 6px; font-size: 14px; }
.themed-select-menu .dropdown-item.active { background: var(--theme-default); color: #fff; }

/* ---------- Analytics (Cuba "Analytics" dashboard) ---------- */
.analytics-card .card-header .header-top h5 { font-size: 18px; }
.analytics-range-wrap { display: flex; align-items: center; gap: 8px; }
.analytics-range-wrap .themed-select { width: 160px; }
.analytics-range-wrap .themed-select-btn { padding-top: 6px; padding-bottom: 6px; font-size: 14px; }
.analytics-global-error[hidden], .analytics-plan-banner[hidden] { display: none; }
.analytics-toolbar-meta { font-size: 12px; margin-top: 6px; }

.analytics-module-body { min-height: 120px; }
.analytics-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 120px;
  color: var(--srt-muted);
  font-size: 13px;
}
.analytics-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(var(--srt-primary-rgb), 0.15);
  border-top-color: var(--theme-default);
  animation: srtSpin 0.7s linear infinite;
}
@keyframes srtSpin { to { transform: rotate(360deg); } }
.analytics-module-error {
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(252, 86, 74, 0.1);
  color: #fc564a;
  font-size: 13px;
}
.analytics-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  text-align: center;
}
.analytics-empty-chart {
  width: 80px;
  height: 80px;
  margin-bottom: 12px;
  border-radius: 50%;
  border: 10px solid var(--srt-track);
  border-top-color: rgba(var(--srt-primary-rgb), 0.35);
}
.analytics-empty p { margin: 0 0 4px; font-weight: 500; }
.analytics-empty a { font-size: 13px; font-weight: 500; }

/* All clicks */
.clicks-summary {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding: 10px 16px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: var(--light-background);
  font-size: 14px;
}
.clicks-summary strong { font-family: Rubik, sans-serif; font-size: 20px; font-weight: 600; }
.analytics-area-wrap { width: 100%; }
.analytics-area-chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart-axis-label { font-size: 12px; fill: var(--srt-muted); font-family: Rubik, sans-serif; }
.chart-grid-line { stroke: var(--chart-border); stroke-width: 1; }
.chart-point .chart-point-dot { fill: var(--white); stroke: var(--theme-default); stroke-width: 2; opacity: 0; transition: opacity 0.15s; }
.chart-point:hover .chart-point-dot { opacity: 1; }
.chart-peak-line { stroke: var(--theme-default); stroke-dasharray: 3 4; stroke-width: 1.5; opacity: 0.6; }
.chart-peak-dot { fill: var(--theme-default); stroke: var(--white); stroke-width: 3; }
.chart-peak-tag rect { fill: var(--white); stroke: var(--chart-border); }
.chart-peak-tag text { font-size: 12px; font-weight: 600; fill: var(--body-font-color); font-family: Rubik, sans-serif; }

/* Tables */
.analytics-table { margin: 0; }
.analytics-table thead th {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--srt-muted);
  background: var(--light-background);
  border-bottom: 0;
  white-space: nowrap;
}
.analytics-table tbody td {
  padding: 12px 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--chart-border);
  font-size: 14px;
}
.analytics-table tbody tr:last-child td { border-bottom: 0; }
.analytics-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.analytics-cell span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; font-weight: 500; }
#mod-referrers .table-responsive, #mod-browsers .table-responsive { overflow-x: visible; }
#mod-referrers .analytics-cell span:last-child { max-width: 110px; }
.src-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--src) 35%, transparent);
  background: color-mix(in srgb, var(--src) 10%, transparent);
  color: var(--src);
  font-family: Rubik, sans-serif;
  font-size: 12px;
  font-weight: 700;
}
.rank-chip {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(var(--srt-primary-rgb), 0.1);
  color: var(--theme-default);
}
.link-cell { display: flex; flex-direction: column; min-width: 0; }
.link-cell strong { font-weight: 500; color: var(--theme-default); }
.link-cell span { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.share-cell { min-width: 160px; }
.share-cell .analytics-bar-track { display: inline-block; width: calc(100% - 56px); vertical-align: middle; margin-right: 8px; }
.share-cell span { font-size: 12px; }

/* Country columns */
.country-columns {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
  height: 250px;
  padding-top: 4px;
}
.country-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.country-col-pct { font-size: 11px; font-weight: 600; color: var(--srt-muted); }
.country-col-track { flex: 1; width: 100%; max-width: 34px; display: flex; align-items: flex-end; border-radius: 8px; background: var(--srt-track); }
.country-col-bar {
  position: relative;
  width: 100%;
  border-radius: 8px;
  background: rgba(var(--srt-primary-rgb), 0.35);
  overflow: hidden;
}
.country-col-bar i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, #16c7f9, var(--theme-default));
  border-radius: 8px;
}
.country-col-label { font-size: 12px; font-weight: 600; font-family: Rubik, sans-serif; }

/* Promo */
.analytics-promo { overflow: hidden; }
.analytics-promo .card-body {
  position: relative;
  display: flex;
  gap: 20px;
  align-items: center;
  min-height: 100%;
  color: #fff;
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.18), transparent 45%),
    linear-gradient(120deg, #7366ff 0%, #5a4ff0 60%, #3e36c2 100%);
  border-radius: inherit;
}
.analytics-promo h5 { color: #fff; font-size: 20px; margin-bottom: 8px; }
.analytics-promo p { color: rgba(255, 255, 255, 0.85); margin-bottom: 16px; }
.analytics-promo .btn-light { color: #7366ff !important; background: #fff !important; border-color: #fff !important; }
.analytics-promo .btn-outline-light { color: #fff !important; background: transparent !important; }
.analytics-promo .btn-outline-light { border-color: rgba(255, 255, 255, 0.6); }
.analytics-promo .btn[hidden] { display: none; }
.analytics-promo-art {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.promo-bar { flex: 1; border-radius: 4px 4px 2px 2px; background: rgba(255, 255, 255, 0.85); }
.promo-bar:nth-child(2n) { background: rgba(255, 255, 255, 0.55); }
.promo-pie {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: conic-gradient(#ffaa05 0 38%, #f73164 38% 62%, #fff 62% 100%);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
@media (max-width: 575px) { .analytics-promo-art { display: none; } }

/* KPI cards */
.analytics-kpi-card .card-body { padding: 22px 22px 0; overflow: hidden; }
.analytics-kpi-head { display: flex; justify-content: space-between; gap: 12px; }
.analytics-kpi-text { min-width: 0; }
.analytics-kpi-text > span.f-light { font-size: 14px; }
.analytics-kpi-text h4 {
  margin: 6px 0 2px;
  font-size: 22px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.analytics-kpi-sub { display: block; font-size: 12px; color: var(--srt-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.analytics-kpi-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 10px;
}
.analytics-kpi-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; }
.bg-light-primary { background-color: rgba(115, 102, 255, 0.1) !important; color: #7366ff; }
.bg-light-danger { background-color: rgba(252, 68, 56, 0.1) !important; color: #fc4438; }
.bg-light-warning { background-color: rgba(255, 170, 5, 0.12) !important; color: #e89a00; }
.bg-light-success { background-color: rgba(84, 186, 74, 0.1) !important; color: #54ba4a; }
.kpi-trend { font-size: 13px; font-weight: 500; margin-left: 4px; }
.kpi-trend.is-up { color: #54ba4a; }
.kpi-trend.is-down { color: #fc4438; }
.analytics-kpi-chart { height: 70px; margin: 12px -22px 0; display: flex; align-items: flex-end; }
.analytics-kpi-chart .kpi-spark { display: block; width: 100%; height: 64px; }
.analytics-kpi-chart .kpi-spark rect:last-child { opacity: 1; }
.analytics-kpi-card:first-child .analytics-kpi-chart,
.analytics-kpi-grid > div:first-child .analytics-kpi-chart { margin: 12px 0 18px; height: 52px; }
.kpi-progress { width: 100%; padding: 0 22px 26px; }
.kpi-progress-track {
  position: relative;
  height: 8px;
  border-radius: 8px;
  background: rgba(84, 186, 74, 0.15);
}
.kpi-progress-fill { height: 100%; border-radius: 8px; background: var(--kpi); }
.kpi-progress-knob {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 4px solid var(--kpi);
  background: var(--white);
  transform: translate(-50%, -50%);
}
.kpi-progress-knob em {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 8px;
  border-radius: 6px;
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--kpi);
  white-space: nowrap;
}

/* Device breakdown / progress lists */
.device-breakdown { display: grid; grid-template-columns: 1fr 170px; gap: 24px; align-items: center; }
@media (max-width: 575px) { .device-breakdown { grid-template-columns: 1fr; } }
.device-list, .analytics-progress-list, .geo-rank-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.device-row-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 14px; }
.device-row-head span:first-child { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-row-head span:last-child { white-space: nowrap; font-weight: 500; }
.device-row-head em { font-style: normal; font-size: 12px; }
.analytics-bar-track { height: 8px; }
.device-donut { position: relative; width: 170px; height: 170px; margin: 0 auto; }
.device-donut svg { width: 100%; height: 100%; }
.analytics-donut-track { stroke: var(--srt-track); }
.device-donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.device-donut-center strong { font-family: Rubik, sans-serif; font-size: 24px; font-weight: 600; }
.device-donut-center span { font-size: 13px; color: var(--srt-muted); }

/* Geography */
.geo-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; }
@media (max-width: 991px) { .geo-layout { grid-template-columns: 1fr; } }
.geo-map { border-radius: 12px; background: var(--light-background); padding: 12px; }
.geo-map-svg { display: block; width: 100%; height: auto; }
.geo-land { fill: rgba(var(--srt-primary-rgb), 0.13); stroke: rgba(var(--srt-primary-rgb), 0.22); stroke-width: 0.8; }
body.dark-only .geo-land { fill: rgba(255, 255, 255, 0.07); stroke: rgba(255, 255, 255, 0.12); }
.geo-bubble { cursor: help; }
.geo-bubble-halo { fill: rgba(var(--srt-primary-rgb), 0.18); }
.geo-bubble-core { fill: var(--theme-default); stroke: #fff; stroke-width: 2; }
.geo-bubble:hover .geo-bubble-core, .geo-bubble:focus .geo-bubble-core { fill: #f73164; }
.geo-map-legend { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12px; color: var(--srt-muted); }
.geo-map-legend-scale { display: flex; align-items: center; gap: 6px; }
.geo-map-legend-scale i { display: block; border-radius: 50%; background: var(--theme-default); border: 2px solid #fff; }
.geo-map-legend-scale i:nth-child(1) { width: 8px; height: 8px; opacity: 0.5; }
.geo-map-legend-scale i:nth-child(2) { width: 13px; height: 13px; opacity: 0.75; }
.geo-map-legend-scale i:nth-child(3) { width: 19px; height: 19px; }
.geo-list h6 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--srt-muted); margin-bottom: 14px; }
.geo-rank-list { max-height: 360px; overflow: auto; }
.geo-rank-list li { display: flex; align-items: center; gap: 12px; }
.geo-rank-main { flex: 1; min-width: 0; }
.country-chip {
  display: grid;
  place-items: center;
  width: 34px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 6px;
  font-family: Rubik, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--theme-default);
  background: rgba(var(--srt-primary-rgb), 0.1);
}
.country-chip.is-unknown { color: var(--srt-muted); background: var(--srt-track); }

/* Per-link header */
.link-hero .card-body { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.link-hero-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 16px;
  font-family: Rubik, sans-serif;
  font-size: 26px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #7366ff, #9a8fff);
  box-shadow: 0 10px 24px rgba(115, 102, 255, 0.3);
}
.link-hero-main { flex: 1 1 320px; min-width: 0; }
.link-hero-main h4 { margin: 0 0 4px; font-size: 22px; }
.link-hero-short { font-weight: 500; color: var(--theme-default); }
.link-hero-long { display: block; font-size: 13px; color: var(--srt-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.link-hero-actions .themed-select { width: 150px; }
.link-qr { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }

/* ---------- Link detail ---------- */
.link-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
@media (max-width: 991px) { .link-card-grid { grid-template-columns: 1fr; } }
.chart-area { min-height: 140px; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) 1.5fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  font-size: 13px;
}
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.bar-value { font-weight: 600; }
.timeline-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 180px;
  border-bottom: 1px dashed var(--chart-border);
}
.timeline-col {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.timeline-bar {
  width: 100%;
  max-width: 24px;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
  background: var(--theme-default);
}
.timeline-col span { font-size: 10px; color: var(--srt-muted); white-space: nowrap; }

/* ---------- Settings ---------- */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-bottom: 1px dashed var(--chart-border);
  font-size: 14px;
}
.settings-row:last-child { border-bottom: 0; }
.plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: var(--light-background);
}
.domain-dns {
  margin: 4px 0 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--light-background);
  font-size: 13px;
}
.domain-dns p { margin-bottom: 8px; }
.domain-dns-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.workspace-card {
  padding: 16px;
  margin-bottom: 14px;
  border-radius: 10px;
  border: 1px solid var(--chart-border);
}
.workspace-card .settings-row { padding-top: 0; }
.workspace-members { margin: 10px 0; }
.workspace-member {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 13px;
}
.workspace-member > span:first-child { flex: 1; }
.theme-choice { display: flex; gap: 12px; flex-wrap: wrap; }
.theme-choice-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--chart-border);
  background: var(--white);
  color: var(--body-font-color);
  font-weight: 500;
}
.theme-choice-btn.is-active { border-color: var(--theme-default); box-shadow: 0 0 0 3px rgba(var(--srt-primary-rgb), 0.15); }
.theme-choice-swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--chart-border); }
.theme-choice-swatch--dark { background: #262932; }
.theme-choice-swatch--light { background: #f5f7fb; }
.settings-nav { position: sticky; top: 100px; }
.settings-nav .nav-link { padding: 10px 16px; border-radius: 8px; color: var(--body-font-color); font-weight: 500; }
.settings-nav .nav-link:hover { background: rgba(var(--srt-primary-rgb), 0.08); color: var(--theme-default); }

/* ---------- Link-in-bio ---------- */
.bio-handle-row { display: flex; }
.bio-link-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto auto auto;
  gap: 8px;
  margin-bottom: 10px;
}
@media (max-width: 767px) { .bio-link-row { grid-template-columns: 1fr 1fr; } }
.bio-preview-wrap { position: sticky; top: 100px; }
.bio-preview {
  margin: 0 auto;
  max-width: 320px;
  min-height: 520px;
  padding: 40px 24px;
  border-radius: 36px;
  border: 8px solid #2f2f3b;
  background: linear-gradient(180deg, rgba(var(--srt-primary-rgb), 0.12), var(--white) 50%);
  text-align: center;
}
.bio-public-avatar {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--theme-default);
  color: #fff;
  font-size: 30px;
  font-weight: 600;
}
.bio-preview h1 { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.bio-public-desc { font-size: 13px; color: var(--srt-muted); margin-bottom: 4px; }
.bio-public-handle { font-size: 12px; color: var(--theme-default); margin-bottom: 20px; }
.bio-public-links { display: flex; flex-direction: column; gap: 10px; }
.bio-public-link {
  padding: 12px;
  border-radius: 10px;
  background: var(--white);
  border: 1px solid rgba(var(--srt-primary-rgb), 0.25);
  font-weight: 500;
  font-size: 14px;
}
.bio-public-empty { font-size: 13px; color: var(--srt-muted); }

/* ---------- Coming soon / stubs ---------- */
.coming-soon-card .card-body { padding: 60px 30px; text-align: center; }
.coming-soon-icon {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(var(--srt-primary-rgb), 0.1);
}
.coming-soon-icon svg { width: 36px; height: 36px; fill: var(--theme-default); stroke: var(--theme-default); }
.coming-soon-card p { max-width: 520px; margin: 0 auto 24px; color: var(--srt-muted); }

/* ---------- Auth boot overlay (injected by src/index.ts) ---------- */
.auth-boot-mark span { color: var(--theme-default); }

/* Dark-mode fixes for Cuba light alerts and the analytics promo button. */
body.dark-only .alert-light-primary {
  background-color: rgba(115, 102, 255, 0.15) !important;
  border-color: rgba(115, 102, 255, 0.3) !important;
  color: rgba(255, 255, 255, 0.8) !important;
}
body.dark-only .alert-light-danger { background-color: rgba(252, 86, 74, 0.15) !important; color: #ff8a80 !important; }
body.dark-only .analytics-promo .btn.btn-light,
body.dark-only .analytics-promo .btn.btn-light:hover { color: #7366ff !important; background-color: #fff !important; }

/* =====================================================================
   Page polish: shared bits, link library, settings, pricing, bio, stubs
   ===================================================================== */

/* Icon buttons (row actions) */
.btn-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--chart-border);
  border-radius: 8px;
  background: var(--white);
  color: var(--srt-muted);
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.btn-icon svg { width: 16px; height: 16px; }
.btn-icon:hover:not(:disabled) { color: var(--theme-default); border-color: rgba(var(--srt-primary-rgb), 0.4); background: rgba(var(--srt-primary-rgb), 0.06); }
.btn-icon:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-icon--primary { color: var(--theme-default); background: rgba(var(--srt-primary-rgb), 0.08); border-color: transparent; }
.btn-icon--danger:hover:not(:disabled) { color: #fc4438; border-color: rgba(252, 68, 56, 0.4); background: rgba(252, 68, 56, 0.06); }
.btn-icon--sm { width: 26px; height: 26px; border: 0; background: transparent; }
.btn-icon--sm svg { width: 14px; height: 14px; }

.settings-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 10px;
}
.settings-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; }
.bg-light-info { background-color: rgba(22, 199, 249, 0.1) !important; color: #16c7f9; }
.bg-light-secondary { background-color: rgba(247, 49, 100, 0.1) !important; color: #f73164; }

/* Toasts + dialog */
.srt-toasts {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.srt-toast {
  min-width: 240px;
  max-width: 360px;
  padding: 12px 16px 12px 44px;
  border-radius: 10px;
  background: var(--white);
  color: var(--body-font-color);
  box-shadow: 0 12px 30px rgba(46, 35, 94, 0.18);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  animation: toastIn 0.25s ease-out;
  transition: opacity 0.3s, transform 0.3s;
}
.srt-toast::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border-radius: 50%;
  background: var(--theme-default);
}
.srt-toast--success::before { background: #54ba4a; }
.srt-toast--danger::before { background: #fc4438; }
.srt-toast--warning::before { background: #ffaa05; }
.srt-toast.is-leaving { opacity: 0; transform: translateY(6px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
.srt-dialog-code {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--light-background);
}
.srt-dialog-code code { flex: 1; word-break: break-all; background: transparent; padding: 0; }

/* ---------- Link library ---------- */
.library-summary .card-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 100%;
}
.library-summary-main { display: flex; align-items: center; gap: 14px; }
.library-summary-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.library-summary-actions .btn.active { background: rgba(var(--srt-primary-rgb), 0.1); }
.library-usage .card-body { display: flex; flex-direction: column; justify-content: center; min-height: 100%; }
.library-usage .progress { height: 8px; }
.row > [class*="col-"] > .library-summary,
.row > [class*="col-"] > .library-usage { height: calc(100% - 30px); }
#bulk[hidden] { display: none; }

.links-filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.links-search { position: relative; flex: 1 1 260px; }
.links-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--srt-muted);
}
.links-search .form-control { padding-left: 40px; }
.links-filter-bar .toolbar-search { width: 140px; }
.links-filter-bar .themed-select { width: 170px; }
.links-date-range { display: flex; align-items: center; gap: 6px; }
.links-date-range .toolbar-date { width: 150px; }
.links-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--light-background);
}
.links-bulk-bar .form-check-label { font-size: 13px; font-weight: 500; }
.links-bulk-bar .btn:disabled { opacity: 0.5; }

.link-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px 12px;
  margin: 0 -12px;
  border-bottom: 1px solid var(--chart-border);
  border-radius: 10px;
  transition: background 0.15s;
}
.link-row:hover { background: var(--light-background); }
.link-row:has(.link-select:checked) { background: rgba(var(--srt-primary-rgb), 0.05); }
.link-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-family: Rubik, sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--theme-default);
  background: rgba(var(--srt-primary-rgb), 0.1);
}
.link-row:nth-child(3n + 2) .link-avatar { color: #f73164; background: rgba(247, 49, 100, 0.1); }
.link-row:nth-child(3n + 3) .link-avatar { color: #e89a00; background: rgba(255, 170, 5, 0.12); }
.link-title { font-size: 15px; margin-bottom: 2px; }
.short-line { display: flex; align-items: center; gap: 4px; }
.short-line .short { font-weight: 500; }
.link-main .long { max-width: 560px; }
.link-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; }
.link-meta .tag-chip { padding: 2px 8px; font-size: 11px; }
.link-side { flex-direction: row; align-items: center; gap: 18px; }
.link-clicks { display: flex; flex-direction: column; align-items: flex-end; min-width: 64px; }
.link-clicks strong { font-family: Rubik, sans-serif; font-size: 18px; font-weight: 600; line-height: 1.1; }
.link-clicks span { font-size: 12px; color: var(--srt-muted); }
.link-actions { gap: 6px; flex-wrap: nowrap; }
@media (max-width: 1199px) {
  .link-row { grid-template-columns: auto auto minmax(0, 1fr); }
  .link-side { grid-column: 2 / -1; justify-content: space-between; }
  .link-clicks { flex-direction: row; align-items: baseline; gap: 4px; }
}
@media (max-width: 575px) {
  .link-actions { flex-wrap: wrap; }
  .link-avatar { display: none; }
  .link-row { grid-template-columns: auto minmax(0, 1fr); }
}

/* ---------- Settings ---------- */
.settings-sidebar { position: sticky; top: 100px; }
.settings-profile .card-body { text-align: center; padding: 28px 20px; }
.settings-avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border-radius: 50%;
  font-family: Rubik, sans-serif;
  font-size: 28px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #7366ff, #9a8fff);
  box-shadow: 0 10px 24px rgba(115, 102, 255, 0.3);
}
.settings-profile h5 { margin-bottom: 2px; }
.settings-profile p { font-size: 13px; word-break: break-all; }
.settings-nav .card-body { padding: 12px; }
.settings-nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.settings-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--body-font-color);
  font-weight: 500;
  transition: background 0.15s;
}
.settings-nav-link .settings-icon { width: 34px; height: 34px; }
.settings-nav-link .settings-icon svg { width: 18px; height: 18px; }
.settings-nav-link:hover,
.settings-nav-link.active { background: rgba(var(--srt-primary-rgb), 0.08); color: var(--theme-default); }
.settings-section { scroll-margin-top: 100px; }
.settings-section-head { display: flex; align-items: center; gap: 14px; }
.settings-section-head h5 { margin: 0 0 2px; }
.settings-section-head p { font-size: 13px; }
.settings-inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.settings-inline-form .form-control { flex: 1 1 240px; width: auto; }
.settings-inline-form .themed-select { width: 200px; }
.settings-list { margin-top: 18px; }
.settings-list:empty { display: none; }
.settings-table tbody td { font-size: 14px; }
.settings-table code { font-size: 12px; }
.settings-url { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dns-row td { background: var(--light-background); }
.dns-table td { padding: 4px 10px 4px 0; vertical-align: middle; }
.dns-table code { word-break: break-all; }
.domain-dns { margin: 0; padding: 4px 0; background: transparent; }
.settings-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px dashed var(--chart-border);
  border-radius: 10px;
}
.settings-empty-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--light-background);
  color: var(--srt-muted);
}
.settings-empty-icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; }
.settings-empty strong { font-weight: 500; }
.settings-empty p { font-size: 13px; }

.theme-choice { gap: 16px; }
.theme-choice-btn {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 170px;
  padding: 10px;
  text-align: left;
}
.theme-preview {
  display: grid;
  grid-template-columns: 30% 1fr;
  grid-template-rows: 14px 1fr;
  gap: 5px;
  height: 84px;
  padding: 6px;
  border-radius: 8px;
}
.theme-preview i { border-radius: 4px; }
.theme-preview i:nth-child(1) { grid-row: 1 / 3; }
.theme-preview--light { background: #f5f7fb; }
.theme-preview--light i { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06); }
.theme-preview--light i:nth-child(3) { background: linear-gradient(90deg, #7366ff 30%, #fff 30%); }
.theme-preview--dark { background: #1d1e26; }
.theme-preview--dark i { background: #262932; }
.theme-preview--dark i:nth-child(3) { background: linear-gradient(90deg, #7366ff 30%, #262932 30%); }
.theme-choice-label { font-weight: 500; padding: 0 4px; }

.plan-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 28px; align-items: start; }
@media (max-width: 767px) { .plan-summary { grid-template-columns: 1fr; } }
.plan-summary-main {
  padding: 20px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(120deg, #7366ff 0%, #5a4ff0 100%);
}
.plan-summary-name { display: block; font-family: Rubik, sans-serif; font-size: 24px; font-weight: 600; }
.plan-summary-price { display: block; opacity: 0.85; margin-bottom: 12px; }
.plan-summary-facts { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.plan-summary-facts li { padding: 3px 0 3px 18px; position: relative; opacity: 0.95; }
.plan-summary-facts li::before { content: "✓"; position: absolute; left: 0; font-weight: 700; }
.usage-meter { margin-bottom: 16px; }
.usage-meter .progress { height: 8px; }

.workspace-card { padding: 18px; }
.workspace-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.workspace-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #16c7f9, #7366ff);
}
.workspace-member { border-top: 1px solid var(--chart-border); padding: 10px 0; }
.workspace-member-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.member-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  color: var(--theme-default);
  background: rgba(var(--srt-primary-rgb), 0.1);
}

/* ---------- Pricing ---------- */
.pricing-notice { display: flex; align-items: center; gap: 12px; }
.pricing-notice-icon { width: 20px; height: 20px; flex-shrink: 0; }
.srt-pricing > .analytics-loading { width: 100%; }
.srt-pricing .pricingtable {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 28px 22px 24px;
  border: 1px solid var(--chart-border);
  border-radius: 16px;
  background: var(--white);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.srt-pricing .pricingtable:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(46, 35, 94, 0.1); }
.srt-pricing .pricingtable.is-featured { border: 2px solid var(--theme-default); }
.srt-pricing .pricingtable.is-current { border: 2px solid #54ba4a; }
.srt-pricing .pricingtable-header .title { font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.srt-pricing .price-value { margin-bottom: 18px; }
.srt-pricing .price-value .currency { font-size: 18px; vertical-align: top; color: var(--srt-muted); }
.srt-pricing .price-value .amount { font-family: Rubik, sans-serif; font-size: 42px; font-weight: 700; color: var(--theme-default); line-height: 1; }
.srt-pricing .price-value .duration { color: var(--srt-muted); }
.srt-pricing .pricing-content { list-style: none; padding: 0; margin: 0 0 20px; text-align: left; flex: 1; }
.srt-pricing .pricing-content li {
  position: relative;
  padding: 6px 0 6px 26px;
  font-size: 13px;
  border-bottom: 1px dashed var(--chart-border);
}
.srt-pricing .pricing-content li:last-child { border-bottom: 0; }
.srt-pricing .pricing-content li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 6px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  color: #54ba4a;
  background: rgba(84, 186, 74, 0.12);
}
.srt-pricing .pricing-content li.is-extra::before { content: "★"; color: var(--theme-default); background: rgba(var(--srt-primary-rgb), 0.1); }
.srt-pricing .pricingtable-signup .btn { width: 100%; }
.srt-pricing .pricingtable-signup .btn.disabled { opacity: 0.85; pointer-events: none; }
.pricing-ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  color: #fff;
  background: var(--theme-default);
}
.pricing-ribbon--current { background: #54ba4a; }
.pricing-ribbon + .pricing-ribbon--current { top: auto; bottom: -12px; }
.compare-table td.is-current,
.compare-table th.is-current { background: rgba(84, 186, 74, 0.06); }
.compare-yes { color: #54ba4a; font-weight: 700; }
.compare-no { color: var(--srt-muted); }
.faq-list-app { display: flex; flex-direction: column; gap: 10px; }
.faq-list-app details {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--chart-border);
}
.faq-list-app details[open] { background: var(--light-background); }
.faq-list-app summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq-list-app summary::-webkit-details-marker { display: none; }
.faq-list-app summary::after { content: "+"; color: var(--theme-default); font-size: 18px; line-height: 1; }
.faq-list-app details[open] summary::after { content: "–"; }
.faq-list-app p { margin: 10px 0 0; font-size: 13px; color: var(--srt-muted); }

/* ---------- Link-in-bio ---------- */
.bio-link-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--chart-border);
  border-radius: 12px;
  background: var(--white);
}
.bio-link-num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--theme-default);
  background: rgba(var(--srt-primary-rgb), 0.1);
}
.bio-link-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 8px; }
@media (max-width: 767px) { .bio-link-fields { grid-template-columns: 1fr; } }
.bio-link-tools { display: flex; gap: 6px; }
.bio-add-link { width: 100%; border: 1px dashed rgba(var(--srt-primary-rgb), 0.4) !important; color: var(--theme-default) !important; background: rgba(var(--srt-primary-rgb), 0.04) !important; }
.bio-phone {
  position: relative;
  max-width: 320px;
  margin: 0 auto;
  padding: 12px 12px 18px;
  border-radius: 40px;
  background: #1f1d2b;
  box-shadow: 0 30px 60px rgba(46, 35, 94, 0.25), inset 0 0 0 2px #3a374f;
}
.bio-phone-bar { display: flex; justify-content: center; padding: 4px 0 8px; }
.bio-phone-notch { width: 90px; height: 22px; border-radius: 12px; background: #000; }
.bio-phone-url {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 10px 10px;
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.08);
}
.bio-phone-url svg { width: 12px; height: 12px; }
.bio-phone .bio-preview {
  max-width: none;
  min-height: 480px;
  border: 0;
  border-radius: 28px;
  padding: 36px 20px 24px;
}
.bio-preview .bio-public-brand { margin-top: 28px; font-family: Rubik, sans-serif; font-weight: 700; font-size: 13px; color: var(--srt-muted); }
.bio-preview .bio-public-brand span { color: var(--theme-default); }
.bio-preview .bio-public-link { border-radius: 30px; box-shadow: 0 6px 16px rgba(46, 35, 94, 0.08); }

/* ---------- Coming-soon pages ---------- */
.soon-hero { overflow: hidden; }
.soon-hero .card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 40px;
  background:
    radial-gradient(circle at 85% 30%, rgba(var(--srt-primary-rgb), 0.14), transparent 45%),
    linear-gradient(120deg, rgba(var(--srt-primary-rgb), 0.06), transparent 60%);
  border-radius: inherit;
}
.soon-hero-copy { max-width: 620px; }
.soon-hero-copy h2 { font-size: 30px; font-weight: 600; margin-bottom: 10px; }
.soon-hero-copy p { font-size: 16px; color: var(--srt-muted); margin-bottom: 22px; }
.soon-hero-art { position: relative; width: 180px; height: 180px; flex-shrink: 0; }
.soon-orb {
  position: absolute;
  inset: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #7366ff, #9a8fff);
  box-shadow: 0 16px 40px rgba(115, 102, 255, 0.35);
}
.soon-orb svg { width: 44px; height: 44px; stroke: #fff; fill: none; }
.soon-ring { position: absolute; inset: 14px; border-radius: 50%; border: 2px dashed rgba(var(--srt-primary-rgb), 0.3); animation: srtSpin 24s linear infinite; }
.soon-ring--2 { inset: 0; border-style: solid; border-color: rgba(var(--srt-primary-rgb), 0.12); animation-duration: 40s; }
@media (max-width: 767px) { .soon-hero-art { display: none; } .soon-hero .card-body { padding: 26px; } }
@media (prefers-reduced-motion: reduce) { .soon-ring { animation: none; } }
.soon-feature .card-body { padding: 24px; }
.soon-feature h6 { margin: 14px 0 6px; font-size: 16px; font-weight: 600; }
.row > .col-md-4 > .soon-feature { height: calc(100% - 30px); }
.soon-now-list { list-style: none; padding: 0; margin: 0; }
.soon-now-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px dashed var(--chart-border);
}
.soon-now-list li:last-child { border-bottom: 0; }
.soon-now-list a { font-weight: 500; min-width: 180px; }
.soon-now-list a::after { content: " →"; }
/* Work with Cuba's pricing-table circle: price text sits inside it. */
.srt-pricing .price-value .amount,
.srt-pricing .price-value .currency,
.srt-pricing .price-value .duration { color: #fff; }
.srt-pricing .price-value .duration { opacity: 0.8; }
.srt-pricing .pricingtable.is-current .price-value { background: #54ba4a; }
.pricing-ribbon {
  top: 14px;
  left: 14px;
  transform: none;
  z-index: 2;
}
.pricing-ribbon--current,
.pricing-ribbon + .pricing-ribbon--current { top: 14px; bottom: auto; left: auto; right: 14px; }
.srt-pricing .pricingtable-header { margin-top: 18px; }
/* Header plan note: shorten gracefully instead of clipping mid-word. */
@media (max-width: 1599px) {
  .page-wrapper .page-header .header-wrapper .left-header .notification-slider h6 .f-light { display: none; }
}
@media (max-width: 991px) {
  .page-wrapper .page-header .header-wrapper .left-header { display: none; }
}
/* Hide the usage card until the API reports plan usage. */
.col-xl-4:has(> .library-usage .usage-bar[hidden]) { display: none; }
.row:has(> .col-xl-4 > .library-usage .usage-bar[hidden]) > .col-xl-8 { flex: 0 0 100%; max-width: 100%; }
@media (max-width: 575px) {
  .links-filter-bar .toolbar-search,
  .links-filter-bar .themed-select,
  .links-date-range { width: 100%; }
  .links-date-range .toolbar-date { flex: 1; width: auto; min-width: 0; }
}

/* Zero states: same layout as real data, just muted. */
.chart-bar-col.is-zero .chart-bar { background: var(--srt-track); }
.chart-bar-col.is-zero em { color: var(--srt-muted); }
.top-links-row.is-zero .top-links-slug,
.top-links-row.is-zero .top-links-clicks { color: var(--srt-muted); }
.top-links-row.is-zero .top-links-rank,
.is-zero-row .rank-chip,
.is-zero-row .recent-link-icon { background: var(--srt-track); color: var(--srt-muted); }
.is-zero-row .link-cell strong { color: var(--srt-muted); }
.country-col.is-zero .country-col-label,
.country-col.is-zero .country-col-pct { color: var(--srt-muted); }
.analytics-bar-fill[style*="width:0%"],
.analytics-bar-fill[style*="width:0;"],
.top-links-fill[style*="width:0"] { min-width: 0; }
