/* ===================== Shared ===================== */
.sx-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 18px;
  margin-top: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.sx-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sx-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f0f0f;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sx-card-sub {
  font-size: 13px;
  color: #606060;
  margin: 2px 0 14px;
  line-height: 1.4;
}

.sx-subhead {
  font-size: 15px;
  font-weight: 700;
  color: #0f0f0f;
  margin: 18px 0 10px;
}

.sx-muted {
  font-size: 12.5px;
  color: #606060;
  line-height: 1.4;
}

.sx-big {
  font-size: 24px;
  font-weight: 800;
  color: #0f0f0f;
  line-height: 1.15;
}

.sx-axis {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #888888;
  margin-top: 4px;
}

.sx-ai {
  display: inline-flex;
  color: #065fd4;
}

.sx-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f0f0f;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.sx-icon-btn:active {
  background: #f2f2f2;
}

.sx-link-btn {
  font-size: 14px;
  font-weight: 500;
  color: #065fd4;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0;
  flex-shrink: 0;
}

.sx-pill {
  height: 40px;
  padding: 0 18px;
  border-radius: 20px;
  border: none;
  background: #f2f2f2;
  color: #0f0f0f;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.sx-pill-dark {
  background: #0f0f0f;
  color: #ffffff;
}

.sx-empty {
  text-align: center;
  font-size: 14px;
  color: #606060;
  padding: 28px 0;
}

.sx-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #e5e5e5;
  flex-shrink: 0;
}

.sx-avatar-xs {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: #e5e5e5;
  flex-shrink: 0;
}

.sx-live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e53935;
  margin-right: 6px;
  animation: sx-pulse 1.6s ease-in-out infinite;
}

@keyframes sx-pulse {
  50% { opacity: 0.35; }
}

/* Bars */
.sx-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sx-bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #0f0f0f;
  margin-bottom: 6px;
}

.sx-bar-val {
  font-weight: 700;
}

.sx-bar-track {
  height: 6px;
  border-radius: 3px;
  background: #e5e5e5;
  overflow: hidden;
}

.sx-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: #065fd4;
  transition: width 0.3s ease;
}

/* Chips */
.sx-chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 14px -16px 0;
  padding: 0 16px 2px;
}

.sx-chip-row::-webkit-scrollbar {
  display: none;
}

.sx-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: none;
  background: #f2f2f2;
  color: #0f0f0f;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
}

.sx-chip.active {
  background: #0f0f0f;
  color: #ffffff;
}

.sx-chip-sm {
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
}

.sx-chip-sm svg {
  width: 16px;
  height: 16px;
}

.sx-chip-count {
  font-size: 12px;
  opacity: 0.7;
}

/* ===================== Subpage ===================== */
.sx-page {
  background: #ffffff;
  min-height: calc(100dvh - var(--nav-h, 60px));
}

.sx-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 56px;
  padding: 0 8px;
  background: #ffffff;
}

.sx-back {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: #0f0f0f;
  cursor: pointer;
}

.sx-topbar-title {
  flex: 1;
  font-size: 20px;
  font-weight: 700;
  color: #0f0f0f;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sx-page-body {
  padding: 4px 16px 24px;
}

/* ===================== Bottom sheet ===================== */
.sx-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: background 0.2s ease;
}

.sx-sheet-overlay.open {
  background: rgba(0, 0, 0, 0.4);
}

.sx-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 16px 16px 0 0;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.22s ease;
}

.sx-sheet-overlay.open .sx-sheet {
  transform: translateY(0);
}

.sx-sheet-tall {
  min-height: 60vh;
}

.sx-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: #d9d9d9;
  margin: 0 auto 8px;
}

.sx-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.sx-sheet-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f0f0f;
}

.sx-sheet-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 52px;
  padding: 8px 4px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  color: #0f0f0f;
}

.sx-sheet-row.danger {
  color: #cc0000;
}

.sx-sheet-row-icon {
  width: 24px;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.sx-sheet-row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sx-sheet-row-label {
  font-size: 15px;
}

.sx-sheet-row-sub {
  font-size: 12.5px;
  color: #606060;
}

.sx-sheet-note {
  font-size: 13px;
  color: #606060;
  line-height: 1.45;
  margin: 4px 0 12px;
}

.sx-sheet-text {
  font-size: 15px;
  color: #0f0f0f;
  line-height: 1.45;
  margin: 4px 0 8px;
}

.sx-sheet-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

/* Form fields */
.sx-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.sx-field > span {
  font-size: 12.5px;
  color: #606060;
  font-weight: 500;
}

.sx-field input,
.sx-field select,
.sx-input,
.sx-textarea {
  width: 100%;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 15px;
  color: #0f0f0f;
  background: #ffffff;
  font-family: inherit;
}

.sx-input {
  margin-bottom: 8px;
}

.sx-textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.4;
}

.sx-field input:focus,
.sx-field select:focus,
.sx-input:focus,
.sx-textarea:focus {
  outline: none;
  border-color: #065fd4;
}

/* ===================== Header bell ===================== */
.sx-bell {
  position: relative;
}

.sx-bell-dot {
  display: none;
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cc0000;
  border: 2px solid #ffffff;
  box-sizing: content-box;
}

/* ===================== Analytics ===================== */
.sx-range-row {
  margin: 4px 0 14px;
}

.sx-range-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 17px;
  border: 1px solid #d9d9d9;
  background: #ffffff;
  font-size: 14px;
  font-weight: 500;
  color: #0f0f0f;
  cursor: pointer;
}

.sx-metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.sx-metric-grid .analytics-card {
  margin: 0;
}

.sx-rt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 4px;
}

.sx-rt-bars {
  margin-top: 14px;
}

.sx-rt-bars svg {
  width: 100%;
  height: 44px;
}

.sx-stack {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 12px;
}

.sx-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: #0f0f0f;
}

.sx-legend > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sx-legend b {
  margin-left: auto;
}

.sx-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.sx-heat {
  display: grid;
  grid-template-columns: 34px repeat(6, 1fr);
  gap: 4px;
  align-items: center;
}

.sx-heat-label {
  font-size: 10.5px;
  color: #888888;
  text-align: center;
}

.sx-heat-day {
  text-align: left;
}

.sx-heat-cell {
  height: 22px;
  border-radius: 4px;
}

.sx-gender {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.sx-gender div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sx-gender b {
  font-size: 18px;
  color: #0f0f0f;
}

.sx-gender span {
  font-size: 12.5px;
  color: #606060;
}

/* ===================== Community ===================== */
.sx-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sx-summary-row {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: #f7f7f7;
  border-radius: 12px;
  padding: 12px 14px;
}

.sx-summary-top {
  display: flex;
  justify-content: space-between;
  font-size: 14.5px;
  color: #0f0f0f;
}

.sx-summary-top span {
  font-size: 12.5px;
  color: #606060;
}

.sx-summary-desc {
  font-size: 13px;
  color: #606060;
  margin-top: 2px;
}

.sx-summary-quote {
  font-size: 13px;
  color: #0f0f0f;
  margin-top: 6px;
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sx-heart-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sx-heart-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sx-heart-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  font-size: 13.5px;
  color: #0f0f0f;
}

.sx-heart-text b {
  font-size: 12.5px;
  font-weight: 500;
  color: #606060;
}

.sx-heart-text span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sx-comment-list {
  margin: 14px 0 24px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 0 16px;
}

.sx-comment {
  padding: 16px 0;
}

.sx-comment + .sx-comment {
  border-top: 1px solid #f0f0f0;
}

.sx-pinned {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #606060;
  margin-bottom: 8px;
}

.sx-pinned svg {
  width: 14px;
  height: 14px;
}

.sx-comment-video {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
  cursor: pointer;
}

.sx-comment-video-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #0f0f0f;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sx-comment-video img {
  width: 64px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  background: #f2f2f2;
  flex-shrink: 0;
}

.sx-comment-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sx-comment-meta {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: #606060;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sx-comment-text {
  font-size: 14px;
  color: #0f0f0f;
  line-height: 1.4;
  margin: 4px 0 10px 42px;
  word-break: break-word;
}

.sx-comment-actions {
  display: flex;
  gap: 22px;
  align-items: center;
  padding-left: 42px;
}

.sx-comment-actions button {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #0f0f0f;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 0;
}

.sx-comment-actions button.on {
  color: #065fd4;
}

.sx-comment-actions button.on svg {
  fill: currentColor;
}

.sx-review-actions {
  display: flex;
  gap: 8px;
  padding-left: 42px;
}

.sx-review-actions .sx-pill {
  height: 34px;
  font-size: 13px;
}

.sx-reply {
  display: flex;
  gap: 8px;
  margin: 12px 0 0 42px;
}

.sx-reply-text {
  font-size: 14px;
  color: #0f0f0f;
  line-height: 1.35;
  word-break: break-word;
}

.sx-reply-box {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 0 42px;
}

.sx-reply-box input {
  flex: 1;
  min-width: 0;
  border: none;
  border-bottom: 1px solid #0f0f0f;
  padding: 8px 2px;
  font-size: 14px;
  outline: none;
  background: none;
}

.sx-send {
  color: #065fd4;
}

/* ===================== Notifications ===================== */
.sx-notif {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 12px 4px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  border-radius: 10px;
}

.sx-notif.unread {
  background: #f2f8ff;
}

.sx-notif-lead {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  display: flex;
  justify-content: center;
}

.sx-notif-lead .sx-avatar-sm {
  width: 40px;
  height: 40px;
}

.sx-notif.unread .sx-notif-lead::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 16px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #065fd4;
}

.sx-notif-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f0f0f;
}

.sx-notif-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sx-notif-title {
  font-size: 14px;
  color: #0f0f0f;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.sx-notif-time {
  font-size: 12px;
  color: #606060;
}

.sx-notif-thumb {
  width: 72px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  background: #f2f2f2;
  flex-shrink: 0;
}

/* ===================== Upload checks ===================== */
.sx-checks {
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 4px 0 14px;
}

.sx-checks-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f0f0f;
  margin-bottom: 8px;
}

.sx-check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 0;
}

.sx-check-row div {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: #606060;
  line-height: 1.4;
}

.sx-check-row b {
  font-size: 14px;
  color: #0f0f0f;
}

.sx-check-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sx-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #e5e5e5;
  border-top-color: #065fd4;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ===================== Video details ===================== */
.sx-retention {
  width: 100%;
  height: 100px;
  display: block;
}

/* ===================== Earn ===================== */
.sx-pay-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #0f0f0f;
  padding: 10px 0;
  border-top: 1px solid #f0f0f0;
}

.sx-tool-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 0;
  border: none;
  background: none;
  text-align: left;
  color: #0f0f0f;
  cursor: pointer;
}

.sx-tool-row + .sx-tool-row {
  border-top: 1px solid #f0f0f0;
}

.sx-tool-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sx-tool-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sx-tool-text b {
  font-size: 15px;
  font-weight: 500;
}

.sx-tool-text span {
  font-size: 13px;
  color: #606060;
}

.sx-tool-row > svg {
  color: #909090;
  flex-shrink: 0;
}

/* ===================== Profile subpages ===================== */
.sx-set-group {
  font-size: 13px;
  font-weight: 700;
  color: #606060;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 22px 0 6px;
}

.sx-set-group:first-child {
  margin-top: 8px;
}

.sx-set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.sx-set-row div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sx-set-row b {
  font-size: 15px;
  font-weight: 400;
  color: #0f0f0f;
}

.sx-set-row span {
  font-size: 12.5px;
  color: #606060;
  line-height: 1.35;
}

.sx-set-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 0;
  border: none;
  background: none;
  font-size: 15px;
  color: #0f0f0f;
  cursor: pointer;
}

.sx-set-link.danger {
  color: #cc0000;
}

.sx-toggle {
  position: relative;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}

.sx-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.sx-toggle span {
  position: absolute;
  inset: 0;
  border-radius: 13px;
  background: #c4c4c4;
  transition: background 0.2s ease;
  cursor: pointer;
}

.sx-toggle span::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.sx-toggle input:checked + span {
  background: #065fd4;
}

.sx-toggle input:checked + span::after {
  transform: translateX(18px);
}

.sx-custom-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 10px;
}

.sx-custom-head div {
  display: flex;
  flex-direction: column;
}

.sx-custom-head b {
  font-size: 17px;
  color: #0f0f0f;
}

.sx-custom-head span {
  font-size: 13px;
  color: #606060;
}

.sx-custom-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: #e5e5e5;
}

.sx-status-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}

.sx-status-row div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sx-status-row b {
  font-size: 15px;
  font-weight: 500;
  color: #0f0f0f;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sx-status-row div span {
  font-size: 13px;
  color: #606060;
  line-height: 1.35;
}

.sx-status-row > span {
  width: 32px;
  display: flex;
  justify-content: center;
  color: #0f0f0f;
  flex-shrink: 0;
}

/* ===================== Dark theme ===================== */
html.sx-dark {
  filter: invert(1) hue-rotate(180deg);
  background: #fff;
}

html.sx-dark img,
html.sx-dark video,
html.sx-dark iframe {
  filter: invert(1) hue-rotate(180deg);
}

html.sx-dark img.yt-studio-brand-logo {
  filter: none;
}
