:root {
  --canvas: #DFE2E7;
  --frame-bg: rgba(244, 245, 248, 0.88);
  --card-white: #FFFFFF;
  --card-subtle: #F4F5F7;
  --card-dark: #18191C;
  --card-dark-2: #23252A;
  --text: #141518;
  --text-muted: #6E717A;
  --text-on-dark: #F9FAFB;
  --border: #E5E7EC;
  --border-dark: rgba(255, 255, 255, 0.1);
  --brand-red: #E53924;
  --brand-yellow: #FFC400;
  --brand-blue: #0088E8;
  --success: #16A34A;
  --warning: #EA580C;
  --danger: #DC2626;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow-soft: 0 12px 32px -8px rgba(20, 21, 24, 0.07), 0 2px 6px rgba(20, 21, 24, 0.04);
  --shadow-float: 0 24px 48px -12px rgba(20, 21, 24, 0.16);
}

html {
  scrollbar-gutter: stable;
  overflow-y: scroll;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.38) transparent;
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.38);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: background-color 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(100, 116, 139, 0.65);
}

::-webkit-scrollbar-thumb:active {
  background-color: rgba(71, 85, 105, 0.85);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #DDE1E8;
  background-image: 
    url('/assets/body-doodles-faint.png'),
    radial-gradient(circle at 15% 15%, #ECEEF2 0%, #D8DCE3 55%, #CFD4DC 100%);
  background-size: 520px 520px, auto;
  background-repeat: repeat, no-repeat;
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.45;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

code {
  background: #ECEEF2;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

/* Chalk Doodle Overlay on Dark Bento Cards (Phone Accessories & Mascot Line Art) */
.doodle-overlay {
  position: absolute;
  inset: 0;
  background-image: url('/assets/doodles-white-transparent.png');
  background-size: 380px;
  background-position: center;
  opacity: 0.14;
  pointer-events: none;
  z-index: 0;
}

/* ============================================================================
   1. LOGIN SCREEN (Split Bento: Chalk Doodle Mascot Showcase + Clean White Form)
   ============================================================================ */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-shell {
  width: 100%;
  max-width: 940px;
  background: var(--frame-bg);
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 34px;
  padding: 14px;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 14px;
  box-shadow: var(--shadow-float);
}

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

.login-showcase {
  position: relative;
  overflow: hidden;
  background: var(--card-dark);
  color: var(--text-on-dark);
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 460px;
}

.login-showcase > *:not(.doodle-overlay) {
  position: relative;
  z-index: 1;
}

.showcase-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.showcase-center {
  margin: 24px 0;
}

.showcase-mascot {
  width: 118px;
  height: 118px;
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.45));
  margin-bottom: 16px;
}

.showcase-center h2 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.showcase-center p {
  font-size: 13.5px;
  color: #A1A5B2;
  max-width: 340px;
}

.showcase-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.sc-stat {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  border-radius: 16px;
  padding: 12px;
  text-align: center;
}

.sc-stat strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sc-stat span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.login-card {
  background: var(--card-white);
  border-radius: 24px;
  padding: 38px 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.brand-mascot-sm {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand-logo h1 {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-tag {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.login-heading {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 22px;
}

/* ============================================================================
   2. FORMS & BUTTONS (Tactile Monochrome Pill Style)
   ============================================================================ */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

input, select, textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--card-subtle);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.15s ease;
}

input:focus, select:focus, textarea:focus {
  background: #fff;
  border-color: var(--card-dark);
  box-shadow: 0 0 0 3px rgba(24, 25, 28, 0.08);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.16s ease;
  color: #fff;
  background: var(--card-dark);
}

.btn:hover {
  transform: translateY(-1px);
  background: #2C2E35;
}

.btn-dark {
  background: var(--card-dark);
  color: #fff;
}

.btn-brand {
  background: var(--brand-red);
  color: #fff;
}

.btn-brand:hover {
  background: #c82d1a;
}

.btn-secondary {
  background: var(--card-subtle);
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: #E7E9EF;
}

.btn-light {
  background: #FFFFFF;
  color: var(--card-dark);
}

.btn-light:hover {
  background: #F3F4F6;
}

.btn-light-outline {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
  color: #FFFFFF;
}

.btn-light-outline:hover {
  background: rgba(255, 255, 255, 0.18);
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-warning {
  background: var(--brand-yellow);
  color: var(--card-dark);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-pill {
  border-radius: 999px;
  padding-left: 20px;
  padding-right: 20px;
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 13px 20px;
  font-size: 14.5px;
  border-radius: 14px;
}

.btn-sm {
  padding: 7px 13px;
  font-size: 12.5px;
  border-radius: 10px;
}

.error-msg {
  background: #FEF2F2;
  border: 1.5px solid #FCA5A5;
  color: #B91C1C;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* ============================================================================
   3. iDRAFT BENTO SHELL & LEFT SIDEBAR
   ============================================================================ */
.app-outer {
  min-height: 100vh;
  padding: 18px;
}

.app-frame {
  max-width: 1440px;
  min-height: calc(100vh - 36px);
  margin: 0 auto;
  background: var(--frame-bg);
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 34px;
  padding: 18px;
  display: grid;
  grid-template-columns: 236px 1fr;
  gap: 22px;
  box-shadow: var(--shadow-float);
  backdrop-filter: blur(16px);
}

@media (max-width: 1040px) {
  .app-frame {
    grid-template-columns: 1fr;
  }
}

.sidebar {
  background: var(--card-white);
  border-radius: 26px;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-soft);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 8px 16px 8px;
  cursor: pointer;
}

.sidebar-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.sidebar-brand:hover .sidebar-logo {
  transform: rotate(-6deg) scale(1.06);
}

.sidebar-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.sidebar-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: auto;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.nav-item:hover {
  background: var(--card-subtle);
}

.nav-item.active {
  background: var(--card-dark);
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(24, 25, 28, 0.18);
}

.nav-item-muted {
  color: var(--text-muted);
}

.nav-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.badge-counter {
  margin-left: auto;
  background: var(--brand-red);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 800;
}

.sidebar-section {
  margin: 22px 0;
  padding: 16px 12px 0 12px;
  border-top: 1px solid var(--border);
}

.sidebar-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.team-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  padding: 6px 0;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.dot-case { background: var(--card-dark); }
.dot-screen { background: var(--brand-blue); }
.dot-camera { background: var(--brand-red); }

.sidebar-footer {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ============================================================================
   4. WORKSPACE & TOPBAR (iDraft Clean Layout)
   ============================================================================ */
.workspace {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 52px;
  padding: 0 2px;
}

.search-section {
  flex: 1;
  max-width: 960px;
  height: 52px;
  position: relative;
}

.search-box-wrap {
  position: relative;
  display: flex;
  align-items: center;
  height: 52px;
}

.search-icon {
  position: absolute;
  left: 18px;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 52px;
  padding: 0 48px 0 50px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #FFFFFF;
  color: var(--text);
  font-size: 14.5px;
  box-shadow: var(--shadow-soft);
  outline: none;
  box-sizing: border-box;
  transition: all 0.16s ease;
}

.search-input:focus {
  border-color: var(--card-dark);
  box-shadow: 0 0 0 4px rgba(24, 25, 28, 0.08);
}

.search-clear {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
}

.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  max-height: 440px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: var(--shadow-float);
  padding: 8px;
}

.ac-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.12s;
}

.ac-item:hover, .ac-item.active {
  background: var(--card-subtle);
}

.ac-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ac-info-title {
  font-weight: 700;
  font-size: 14px;
}

.ac-info-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.ac-counts {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.mini-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--card-subtle);
  border: 1px solid var(--border);
}

.mini-pill.case { color: var(--card-dark); }
.mini-pill.screen { color: var(--brand-blue); }
.mini-pill.camera { color: var(--brand-red); }
.mini-pill.zero { color: #9CA3AF; opacity: 0.7; }

.ac-empty {
  padding: 16px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.ac-empty-text {
  font-size: 13.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-ac-add-gsm {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--card-dark);
  color: #FFFFFF;
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-ac-add-gsm:hover {
  background: #33363F;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

.btn-ac-add-gsm:active {
  transform: translateY(0);
}

.ac-empty-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 4px;
}

.btn-ac-add-manual {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-ac-add-manual:hover {
  border-color: var(--brand-accent);
  color: var(--brand-accent);
  background: #F8FAFC;
  transform: translateY(-1px);
}

.btn-ac-add-manual:active {
  transform: translateY(0);
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.form-label-row label {
  margin-bottom: 0 !important;
}

.btn-field-add-dev {
  background: none;
  border: none;
  color: var(--brand-accent);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-field-add-dev:hover {
  background: rgba(37, 99, 235, 0.08);
  text-decoration: underline;
}

/* GSM ARENA SEARCH & ADD MODAL */
.gsm-modal-box {
  max-width: 680px;
  width: 95%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.modal-catalog-pill {
  font-size: 11px;
  font-weight: 700;
  color: #10B981;
  background: #ECFDF5;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.2px;
}

.gsm-search-bar {
  position: relative;
  display: flex;
  align-items: center;
  margin: 12px 0 8px 0;
}

.gsm-search-bar .search-input {
  width: 100%;
  padding-left: 42px;
}

.gsm-status-line {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
  min-height: 18px;
}

.gsm-results-scroll {
  overflow-y: auto;
  max-height: 440px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.gsm-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: all 0.12s ease;
}

.gsm-card-item:hover {
  border-color: #CBD5E1;
  background: #F8FAFC;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.gsm-card-item.in-db {
  background: #F8FAFC;
  border-color: #E2E8F0;
}

.gsm-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.gsm-thumb-box {
  width: 44px;
  height: 52px;
  border-radius: 8px;
  background: var(--card-subtle);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.gsm-thumb-box img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.gsm-item-info {
  min-width: 0;
}

.gsm-item-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gsm-item-specs {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  flex-wrap: wrap;
}

.gsm-item-actions {
  flex-shrink: 0;
}

.btn-gsm-import {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card-dark);
  color: #FFFFFF;
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-gsm-import:hover {
  background: #33363F;
  transform: translateY(-1px);
}

.btn-gsm-import.loading {
  opacity: 0.6;
  pointer-events: none;
}

.btn-gsm-open {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--card-subtle);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.btn-gsm-open:hover {
  background: #E5E7EB;
}

.gsm-not-found-box {
  text-align: center;
  padding: 32px 18px;
  background: #F8FAFC;
  border: 1.5px dashed var(--border);
  border-radius: 16px;
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gsm-modal-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.btn-link-underline {
  background: none;
  border: none;
  color: var(--brand-accent);
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  transition: color 0.15s ease;
}

.btn-link-underline:hover {
  color: #1D4ED8;
}

/* CUSTOM MANUAL DEVICE MODAL */
.modal-device-box {
  max-width: 600px;
  width: 95%;
}

.form-two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 600px) {
  .form-two-cols {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.label-opt {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 4px;
}

.canonical-preview-box {
  padding: 10px 14px;
  background: #F8FAFC;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
  font-style: italic;
  min-height: 42px;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

.canonical-preview-box.active {
  background: #EFF6FF;
  border-color: #93C5FD;
  border-style: solid;
  color: #1E40AF;
  font-weight: 700;
  font-style: normal;
}

#modal-gsm-search,
#modal-create-device {
  z-index: 1050;
}

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

.circle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  box-shadow: var(--shadow-soft);
  color: var(--text);
  transition: all 0.15s ease;
}

.circle-btn:hover {
  background: var(--card-subtle);
  transform: translateY(-1px);
}

.bell-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  background: var(--brand-red);
  border-radius: 50%;
  border: 2px solid #FFFFFF;
}

.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-circle img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

/* User Settings Dropdown */
.user-menu-wrap {
  position: relative;
}

.user-profile-btn {
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 3px 12px 3px 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-soft);
}

.user-profile-btn:hover {
  background: var(--card-subtle);
  transform: translateY(-1px);
}

.user-profile-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chevron-icon {
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.user-settings-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-float);
  width: 230px;
  padding: 8px;
  z-index: 200;
  animation: dropIn 0.16s ease-out;
}

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

.user-settings-header {
  padding: 8px 10px 10px 10px;
}

.ush-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.ush-sub {
  display: flex;
  align-items: center;
}

.user-settings-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0 6px 0;
}

.user-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease;
}

.user-menu-item:hover {
  background: var(--card-subtle);
}

.user-menu-item-danger {
  color: var(--danger);
}

.user-menu-item-danger:hover {
  background: #FEE2E2;
}

.menu-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

/* ============================================================================
   5. BENTO MAIN & WELCOME DASHBOARD
   ============================================================================ */
.bento-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.welcome-bento {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bento-top-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
}

@media (max-width: 960px) {
  .bento-top-row {
    grid-template-columns: 1fr;
  }
}

.bento-card {
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.bento-dark {
  background: var(--card-dark);
  color: var(--text-on-dark);
  box-shadow: var(--shadow-soft);
}

.bento-dark > *:not(.doodle-overlay) {
  position: relative;
  z-index: 1;
}

.bento-white {
  background: var(--card-white);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.bento-dashed {
  background: transparent;
  border: 2px dashed #B8BCC6;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.16s ease;
}

.bento-dashed:hover {
  border-color: var(--card-dark);
  background: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}

.dashed-inner {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.dashed-plus {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 300;
  margin-bottom: 4px;
  box-shadow: var(--shadow-soft);
}

.dashed-inner h4 {
  font-size: 15px;
  font-weight: 800;
}

.dashed-inner p {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 220px;
}

.bento-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #A1A5B2;
}

.live-chip {
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  padding: 4px 10px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6B7280;
}

.status-dot.live {
  background: #22C55E;
  box-shadow: 0 0 8px #22C55E;
}

.big-metrics-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}

.big-metric strong {
  display: block;
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.big-metric span {
  font-size: 12px;
  color: #9CA3AF;
  line-height: 1.3;
}

.big-metric-divider {
  width: 1px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
}

.sub-tiles-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.sub-tile {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sub-tile strong {
  display: block;
  font-size: 19px;
  font-weight: 800;
}

.sub-tile span {
  font-size: 11px;
  color: #9CA3AF;
}

.sub-tile-icon {
  margin-bottom: 4px;
  color: #E5E7EC;
}

.mascot-welcome-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mascot-welcome-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}

.mascot-welcome-top h3 {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 6px;
}

.mascot-welcome-top p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

.welcome-mascot-img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  flex-shrink: 0;
}

.quick-steps {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.q-step {
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.q-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #DCFCE7;
  color: #15803D;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.section-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 10px;
}

.section-bar h3 {
  font-size: 18px;
  font-weight: 800;
}

.muted {
  font-size: 12.5px;
  color: var(--text-muted);
}

.popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.popular-item {
  background: var(--card-white);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-soft);
}

.popular-item:hover {
  transform: translateY(-2px);
  border-color: var(--card-dark);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.popular-item .t {
  font-weight: 700;
  font-size: 13.5px;
}

.popular-item .s {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================================
   6. SELECTED DEVICE HERO HEADER (Dark Bento + Radial)
   ============================================================================ */
.device-hero {
  border-radius: var(--radius-lg);
  min-height: 200px;
  padding: 26px 30px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  flex-wrap: wrap;
}

.device-hero > *:not(.doodle-overlay) {
  position: relative;
  z-index: 1;
}

.device-hero-left {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  min-width: 280px;
}

.device-photo-column {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.device-photo-box {
  width: 110px;
  height: 148px;
  border-radius: 18px;
  background: #0A0A0C;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.device-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  background: #ffffff;
  border-radius: 14px;
}

.photo-attr {
  font-size: 10px;
  color: #9CA3AF;
  margin-top: 6px;
  max-width: 200px;
  text-align: center;
}

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

.brand-pill {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  text-transform: uppercase;
}

.back-link {
  background: none;
  border: none;
  color: #9CA3AF;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.back-link:hover {
  color: #fff;
  text-decoration: underline;
}

.device-meta h2 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.spec-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.spec-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #E5E7EB;
}

.aliases-line {
  font-size: 12px;
  color: #9CA3AF;
}

.device-hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.hero-mini-stats {
  display: flex;
  gap: 8px;
}

.hero-stat-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 8px 14px;
  text-align: center;
}

.hero-stat-pill .hs-num {
  display: block;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
}

.hero-stat-pill .hs-lbl {
  font-size: 11px;
  font-weight: 600;
  color: #9CA3AF;
}



/* ============================================================================
   7. 3 COMPATIBILITY BENTO CARDS
   ============================================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: start;
}

@media (max-width: 1040px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

.comp-card {
  background: var(--card-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-soft);
}

.comp-card-header {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid var(--border);
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #FFFFFF;
  color: #0F172A;
  border: 1.5px solid #E2E8F0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-icon-badge:hover {
  background: #0F172A;
  color: #FFFFFF;
  border-color: #0F172A;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

.badge-case,
.badge-screen,
.badge-camera {
  background: #FFFFFF;
  color: #0F172A;
}

.card-title-group h3 {
  font-size: 16px;
  font-weight: 800;
}

.card-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.counter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: var(--card-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all 0.16s ease;
}

/* Category-coded modern colors */
.case-card .counter-badge.has-items {
  background: #18191C;
  color: #FFFFFF;
  border: 1px solid #18191C;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.screen-card .counter-badge.has-items {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1.5px solid #BFDBFE;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08);
}

.camera-card .counter-badge.has-items {
  background: #FFF1F2;
  color: #E11D48;
  border: 1.5px solid #FECDD3;
  box-shadow: 0 1px 3px rgba(225, 29, 72, 0.08);
}

.counter-badge.zero-items {
  background: transparent;
  color: #94A3B8;
  border: 1px dashed #CBD5E1;
  opacity: 0.65;
}

.btn-header-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  width: 28px;
  padding: 0;
  background: #0F172A;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
  transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              padding 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.2s ease,
              transform 0.16s ease,
              box-shadow 0.2s ease;
}

.btn-header-add .btn-add-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.btn-header-add .btn-add-label {
  display: inline-block;
  max-width: 0;
  opacity: 0;
  margin-left: 0;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: max-width 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.2s ease,
              margin-left 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-header-add:hover,
.btn-header-add:focus-visible {
  width: 90px;
  padding: 0 10px;
  background: #1E293B;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.22);
  transform: translateY(-1px);
}

.btn-header-add:hover .btn-add-icon,
.btn-header-add:focus-visible .btn-add-icon {
  transform: rotate(90deg);
}

.btn-header-add:hover .btn-add-label,
.btn-header-add:focus-visible .btn-add-label {
  max-width: 60px;
  opacity: 1;
  margin-left: 4px;
}

.btn-header-add:active {
  transform: translateY(0) scale(0.96);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
}

.comp-card-actions {
  padding: 10px 14px;
  background: #FFFFFF;
  border-top: 1px solid var(--border);
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
}

.comp-card-actions .btn-secondary {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  color: #475569;
  transition: all 0.16s ease;
}

.comp-card-actions .btn-secondary:hover {
  background: #EFF6FF;
  border-color: #93C5FD;
  color: #1D4ED8;
  transform: translateY(-1px);
}

.comp-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 620px;
  overflow-y: auto;
  background: #F6F7F9;
  scrollbar-width: thin;
  scrollbar-color: #D5D9E0 transparent;
}

/* ---------- Compatibility card ---------- */
.comp-item {
  position: relative;
  background: #FFFFFF;
  border: 1px solid #E8EAEE;
  border-radius: 16px;
  padding: 12px;
  transition: border-color .18s ease, box-shadow .22s ease, transform .22s ease;
}

.comp-item:hover {
  border-color: #D6DAE1;
  box-shadow: 0 10px 28px -14px rgba(20, 21, 24, .22), 0 2px 6px -2px rgba(20, 21, 24, .06);
  transform: translateY(-1px);
}

.ci-main {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

/* Photo stage: soft spotlight, no outline */
.ci-photo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  min-height: 100px;
  border-radius: 12px;
  background:
    radial-gradient(120% 80% at 50% 28%, #FFFFFF 0%, #F2F4F7 62%, #E9ECF1 100%);
  overflow: hidden;
  text-decoration: none;
}

.ci-photo::after {
  /* floor shadow under the phone */
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 7px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(20, 21, 24, .18), transparent);
  pointer-events: none;
}

.ci-photo .thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 6px 12px;
}

.ci-photo .thumb img,
.ci-photo .thumb svg {
  max-width: 100%;
  max-height: 84px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}

.comp-item:hover .ci-photo .thumb img,
.comp-item:hover .ci-photo .thumb svg {
  transform: translateY(-2px) scale(1.04);
}

/* Body */
.ci-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ci-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.ci-brand {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8B909A;
}

.comp-item .tag-reverse,
.comp-item .tag-warn {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 1px 6px;
  border-radius: 999px;
  border: none;
  line-height: 1.5;
}

.comp-item .tag-reverse { background: #F1F3F6; color: #5B606B; }
.comp-item .tag-warn { background: #FFF4DB; color: #8A5A00; }

.ci-name {
  margin-top: 2px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.012em;
  line-height: 1.25;
  color: var(--text);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ci-name:hover { color: var(--brand-blue); }

.ci-meta {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

.ci-meta i {
  font-style: normal;
  color: #C3C7CE;
}

.ci-subtypes {
  margin-top: 2px;
  font-size: 11.5px;
  color: #8B909A;
}

.ci-via {
  margin-top: 8px;
  min-width: 0;
}

.comp-item .tag-transitive {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  border: none;
  background: #EEF3FF;
  color: #3056C9;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
}

.comp-item .tag-transitive svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.ci-via-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Footer: rating + actions */
.ci-footer {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.star-rating-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: none;
  border: none;
}

.star-group {
  display: inline-flex;
  gap: 1px;
}

.star-btn {
  width: 18px;
  height: 18px;
  padding: 1px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #DDE0E5;
  line-height: 0;
  transition: transform .14s ease, color .14s ease;
}

.star-btn svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.star-btn.active { color: #F5A524; }
.star-btn:hover { transform: scale(1.18); color: #F5A524; }

/* Hover preview: dim stars after the hovered one */
.star-group:hover .star-btn { color: #F5A524; }
.star-group .star-btn:hover ~ .star-btn { color: #DDE0E5; }

.star-btn.user-voted {
  filter: drop-shadow(0 1px 2px rgba(245, 165, 36, .45));
}

.rating-count {
  font-size: 11.5px;
  font-weight: 600;
  color: #9A9EA7;
  font-variant-numeric: tabular-nums;
}

.ci-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.btn-comments,
.btn-report {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  min-width: 30px;
  padding: 0 8px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #8B909A;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.btn-comments svg,
.btn-report svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-comments .comments-badge {
  background: none;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: inherit;
  font-variant-numeric: tabular-nums;
}

.btn-comments.has-comments { color: #3F444D; }

.btn-comments:hover,
.btn-comments.active {
  background: #F1F3F6;
  color: var(--text);
}

.btn-report:hover {
  background: #FFF0EF;
  color: #D93A2B;
}

.btn-report.reported,
.btn-report:disabled {
  color: #D93A2B;
  background: #FFF0EF;
  cursor: default;
}

.btn-report.reported svg { fill: currentColor; fill-opacity: .2; }

/* Notes & status */
.comp-note-bubble {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #FFF8E6;
  color: #7A5300;
  font-size: 12px;
  line-height: 1.4;
}

.comp-item .badge-in-review {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #FFF4DB;
  color: #8A5A00;
  font-size: 11.5px;
  font-weight: 600;
}

.comp-item .badge-in-review::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #E5A100;
}

.comp-comments-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #F0F1F4;
  animation: fadeInComments 0.2s ease;
}

@keyframes fadeInComments {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: 10px;
  padding-right: 4px;
}

.comment-bubble {
  background: #F6F7F9;
  border: none;
  border-radius: 12px;
  padding: 9px 12px;
  position: relative;
}

.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.comment-author {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 5px;
}

.comment-role-tag {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: #F3F4F6;
  color: #4B5563;
}

.comment-role-tag.admin {
  background: #FEF3C7;
  color: #B45309;
}

.comment-time {
  font-size: 10.5px;
  color: var(--text-muted);
}

.comment-text {
  font-size: 12px;
  color: var(--text);
  line-height: 1.4;
  word-break: break-word;
}

.btn-del-comment {
  background: transparent;
  border: none;
  color: #9CA3AF;
  font-size: 13px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s ease;
}

.btn-del-comment:hover {
  color: #DC2626;
}

.comment-input-row {
  display: flex;
  gap: 6px;
}

.comment-input {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  background: #FFFFFF;
  outline: none;
  transition: border-color 0.15s ease;
}

.comment-input:focus {
  border-color: var(--card-dark);
}

.btn-send-comment {
  background: var(--card-dark);
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

.btn-send-comment:hover {
  opacity: 0.9;
}

/* Star selector in Add Compatibility Modal */
.star-selector-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.star-select-opt {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #FFFFFF;
}

.star-select-opt:hover {
  border-color: var(--card-dark);
}

.star-select-opt.selected {
  border-color: #F59E0B;
  background: #FFFBEB;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.18);
}

.star-select-stars {
  font-size: 18px;
  color: #F59E0B;
  margin-bottom: 2px;
}

.star-select-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}

.star-select-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Admin Tabs and Reports List */
.admin-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 16px;
}

.admin-tab-btn {
  padding: 8px 16px;
  border: none;
  background: transparent;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.admin-tab-btn:hover {
  color: var(--text);
}

.admin-tab-btn.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

.admin-tab-badge {
  background: #EF4444;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
}

.admin-report-card {
  background: var(--card-subtle);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}

.admin-report-card.pending {
  border-color: #FCA5A5;
  background: #FFFBFB;
}

.admin-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-report-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.admin-report-reason {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #FFFFFF;
  border: 1px solid #FECACA;
  font-size: 12.5px;
  color: #991B1B;
  font-weight: 600;
}

.admin-report-meta {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.admin-report-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  justify-content: flex-end;
}

.btn-danger-sm {
  background: #DC2626;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-danger-sm:hover {
  background: #B91C1C;
}

.tag-reverse {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: #E5E7EB;
  color: #374151;
  margin-left: 6px;
}

.tag-transitive {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.transitive-note {
  background: #F8FAFC;
  border-left: 3px solid #3B82F6;
  color: #1E293B;
  font-size: 11px;
  padding: 5px 8px;
  border-radius: 0 6px 6px 0;
  margin: 6px 0 2px 0;
}

.open-req-banner {
  margin: 12px 14px 0 14px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  background: #FEF3C7;
  border: 1.5px solid #FCD34D;
  color: #92400E;
}

.empty-card-state {
  text-align: center;
  padding: 32px 16px;
}

.empty-card-state p {
  color: var(--text-muted);
  font-size: 13px;
  margin: 10px 0 14px 0;
}

/* ============================================================================
   8. MODALS & FORMS
   ============================================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 21, 24, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-box {
  background: var(--card-white);
  border-radius: 26px;
  border: 2px solid var(--border);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px;
  box-shadow: var(--shadow-float);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--border);
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 800;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
}

.modal-close:hover {
  color: var(--text);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.modal-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.45;
}

.checkbox-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.check-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  background: var(--card-subtle);
  border: 1.5px solid var(--border);
  padding: 7px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.check-pill input {
  width: auto;
  margin: 0;
}

.admin-create-box {
  background: var(--card-subtle);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 20px;
}

.admin-create-box h4 {
  font-size: 14.5px;
  font-weight: 800;
  margin-bottom: 12px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.table-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table-list th, .table-list td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table-list th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.req-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  margin-bottom: 8px;
  background: var(--card-subtle);
}

.status-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
}

.status-open { background: #FEF3C7; color: #B45309; }
.status-resolved { background: #DCFCE7; color: #15803D; }

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.tab-btn.active {
  background: var(--card-dark);
  border-color: var(--card-dark);
  color: #fff;
}

.wm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.wm-item {
  border: 2px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
}

.wm-item:hover {
  border-color: var(--card-dark);
}

.wm-item img {
  width: 100%;
  height: 110px;
  object-fit: contain;
  background: #fff;
}

.wm-item .cap {
  font-size: 10px;
  color: var(--text-muted);
  padding: 4px 6px;
  background: var(--card-subtle);
}

/* ============================================================================
   9. TOASTS & THUMBNAILS
   ============================================================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
}

.toast {
  background: var(--card-dark);
  color: #fff;
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: var(--shadow-float);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  animation: toastIn 0.25s ease-out;
}

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

.toast-title {
  font-weight: 800;
  font-size: 13.5px;
  margin-bottom: 3px;
}

.toast-msg {
  font-size: 12.5px;
  color: #D1D5DB;
}

.toast.t-request {
  border-left: 5px solid var(--brand-red);
}

.toast.t-added {
  border-left: 5px solid var(--success);
}

.toast .toast-actions {
  margin-top: 8px;
  display: flex;
  gap: 6px;
}

.thumb {
  width: 34px;
  height: 46px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #F3F4F6;
  border: 1px solid var(--border);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.thumb svg, .device-photo-box svg {
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   SEARCH FILTER BAR & STOCK INDICATORS
   ========================================================================== */

.search-filter-bar {
  margin-bottom: 16px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  padding: 10px 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.filter-bar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.filter-left {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748B;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.filter-icon {
  display: flex;
  align-items: center;
  color: #64748B;
}

.filter-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1.5px solid #E2E8F0;
  background: #F8FAFC;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(.2, .8, .2, 1);
  user-select: none;
}

.filter-chip:hover {
  border-color: #CBD5E1;
  background: #F1F5F9;
  color: #1E293B;
  transform: translateY(-1px);
}

.filter-chip.active {
  background: #EFF6FF;
  border-color: #3B82F6;
  color: #1D4ED8;
  box-shadow: 0 2px 6px -1px rgba(59, 130, 246, 0.15);
}

.chip-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.filter-chip.active .chip-check {
  background: #3B82F6;
  color: #FFFFFF;
}

.filter-chip:not(.active) .chip-check {
  background: #E2E8F0;
  color: #94A3B8;
}

/* Stock Indicator Button on Compatibility Cards */
.btn-stock-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  color: #475569;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  transition: all 0.16s ease;
}

.btn-stock-check:hover {
  background: #EFF6FF;
  border-color: #93C5FD;
  color: #1D4ED8;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.12);
}

.stock-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #F59E0B;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-stock-check:hover .stock-dot {
  transform: scale(1.2);
  background: #3B82F6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

/* Search Landing Section */
.search-landing-card {
  border-radius: var(--radius-lg);
  min-height: 200px;
  padding: 26px 30px;
  box-sizing: border-box;
  margin-bottom: 0;
  display: flex;
  align-items: center;
}

.search-landing-card.bento-dark {
  background: var(--card-dark);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.search-landing-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 900px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.search-landing-card.bento-dark .sl-icon-box {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: rgba(59, 130, 246, 0.16);
  border: 1.5px solid rgba(96, 165, 250, 0.35);
  color: #60A5FA;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.22);
}

.search-landing-card.bento-dark .sl-content h3 {
  margin: 0 0 6px 0;
  font-size: 20px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -.02em;
}

.search-landing-card.bento-dark .sl-content p {
  margin: 0 0 14px 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: #94A3B8;
}

.sl-chips-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-landing-card.bento-dark .sl-chips-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748B;
}

.sl-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search-landing-card.bento-dark .sl-chip-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #E2E8F0;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
  backdrop-filter: blur(4px);
}

.search-landing-card.bento-dark .sl-chip-btn:hover {
  background: rgba(59, 130, 246, 0.25);
  color: #93C5FD;
  border-color: rgba(96, 165, 250, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.search-landing-card.bento-dark .sl-chip-btn:active {
  transform: translateY(0);
}

/* Stock Modal Styling */
.modal-stock-box {
  max-width: 480px;
}

.stock-alert-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 12px;
  margin-top: 12px;
  margin-bottom: 18px;
}

.stock-alert-icon {
  font-size: 24px;
  line-height: 1;
}

.stock-alert-info h4 {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 700;
  color: #92400E;
}

.stock-alert-info p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: #B45309;
}

.stock-details-list {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stock-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.stock-status-row .ssr-label {
  color: #64748B;
  font-weight: 500;
}

.badge-disconnected {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #FEE2E2;
  color: #DC2626;
  font-size: 11.5px;
  font-weight: 600;
}

.status-dot.offline {
  background: #EF4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

/* ==========================================================================
   HOME DASHBOARD: TOPBAR BRANDING & GREETING
   ========================================================================== */

/* Topbar Greeting (Shown on Home and Leaderboard views, matches search bar container) */
.topbar-greeting-wrap {
  flex: 1;
  max-width: 960px;
  height: 52px;
  position: relative;
}

.topbar-greeting-pill-box {
  width: 100%;
  height: 52px;
  padding: 0 18px 0 20px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #FFFFFF;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

.topbar-greeting-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}

.topbar-greeting-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #0F172A;
  white-space: nowrap;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1;
}

.topbar-greeting-sep {
  color: #CBD5E1;
  font-size: 13px;
  font-weight: 700;
}

.topbar-greeting-sub {
  font-size: 12.5px;
  color: #64748B;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-greeting-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.topbar-greeting-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F8FAFC;
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #475569;
  white-space: nowrap;
}

/* ==========================================================================
   USER CONTRIBUTION & REPUTATION (HOME VIEW - DARK BENTO)
   ========================================================================== */

.home-dark-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 18px;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .home-dark-grid {
    grid-template-columns: 1fr;
  }
}

.user-hero-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.user-hero-long {
  width: 100%;
  min-height: 200px;
  padding: 26px 30px;
  box-sizing: border-box;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.user-hero-long .bento-card-head {
  margin-bottom: 0;
}

.user-hero-long .hero-head-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.user-hero-long .hero-head-title {
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.user-hero-long .hero-head-subtitle {
  font-size: 12.5px;
  color: #94A3B8;
  font-weight: 500;
}

.user-hero-long .user-hero-body {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 0;
}

@media (max-width: 960px) {
  .user-hero-long {
    padding: 20px;
  }
  .user-hero-long .user-hero-body {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .user-hero-long .hero-head-left {
    flex-direction: column;
    gap: 2px;
  }
}

.user-hero-long .user-big-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0;
}

.user-hero-long .big-metric {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-hero-long .big-metric strong {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
}

.user-hero-long .big-metric .metric-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-hero-long .big-metric .metric-label {
  font-size: 13px;
  font-weight: 700;
  color: #F1F5F9;
  line-height: 1.2;
}

.user-hero-long .big-metric .metric-hint {
  font-size: 11px;
  color: #94A3B8;
  line-height: 1.2;
  white-space: nowrap;
}

.user-hero-long .big-metric-divider {
  width: 1px;
  height: 38px;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.user-hero-long .user-sub-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 0;
}

.user-hero-long .sub-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
}

.user-hero-long .sub-tile-icon {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  color: #94A3B8;
  flex-shrink: 0;
}

.user-hero-long .sub-tile-text {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.user-hero-long .sub-tile-text strong {
  font-size: 17px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1;
}

.user-hero-long .sub-tile-text span {
  font-size: 12px;
  color: #94A3B8;
  font-weight: 500;
  white-space: nowrap;
}

.user-big-metrics {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.user-sub-tiles {
  margin-bottom: 18px;
}

.user-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-hero-hint {
  font-size: 11.5px;
  color: #9CA3AF;
  width: 100%;
  margin-top: 4px;
}

.user-hero-hint strong {
  color: #FBBF24;
}

.btn-pill {
  border-radius: 999px !important;
  font-weight: 700 !important;
}

.btn-text-gold {
  background: transparent;
  border: none;
  color: #F59E0B;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s ease;
}

.btn-text-gold:hover {
  color: #FBBF24;
  text-decoration: underline;
}

.btn-dark-outline {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #E2E8F0;
  font-weight: 700;
  transition: all 0.15s ease;
}

.btn-dark-outline:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}

/* Leaderboard Preview Card on Home */
.leaderboard-preview-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.lb-preview-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  margin-bottom: 14px;
}

.lb-preview-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.15s ease;
}

.lb-preview-item:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.12);
}

.lb-preview-item.current-user {
  background: rgba(37, 99, 235, 0.16);
  border-color: rgba(59, 130, 246, 0.4);
}

.lb-preview-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lb-rank-badge {
  font-size: 14px;
  font-weight: 800;
  width: 26px;
  text-align: center;
}

.lb-rank-1 { color: #F59E0B; }
.lb-rank-2 { color: #CBD5E1; }
.lb-rank-3 { color: #D97706; }

.lb-user-meta {
  display: flex;
  flex-direction: column;
}

.lb-user-name {
  font-size: 13px;
  font-weight: 700;
  color: #F1F5F9;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lb-user-you-tag {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  background: #2563EB;
  color: #fff;
  text-transform: uppercase;
}

.lb-user-sub {
  font-size: 11px;
  color: #9CA3AF;
}

.lb-preview-score {
  font-size: 14px;
  font-weight: 900;
  color: #F59E0B;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 3px 8px;
  border-radius: 8px;
  white-space: nowrap;
}

.lb-preview-footer {
  margin-top: auto;
}

/* Dark Recent Contributions on Home */
.user-recent-card-dark {
  padding: 22px;
}

.urh-badge-dark {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 11.5px;
  font-weight: 700;
  color: #D1D5DB;
}

.user-recent-list-dark {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-recent-item-dark {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  transition: all 0.15s ease;
}

.user-recent-item-dark:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.urid-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.urid-devices {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
}

.urid-source {
  color: #FFFFFF;
  font-weight: 700;
}

.urid-arrow {
  color: #9CA3AF;
  font-size: 12px;
}

.urid-target {
  color: #60A5FA;
  font-weight: 700;
}

.urid-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.urid-stars {
  font-size: 13px;
  font-weight: 800;
  color: #F59E0B;
}

.urid-date {
  font-size: 11px;
  color: #9CA3AF;
}

.user-empty-recent-dark {
  padding: 30px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  border: 1.5px dashed rgba(255, 255, 255, 0.15);
}

.user-empty-recent-dark p {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: #F3F4F6;
}

.user-empty-recent-dark .user-empty-tip {
  font-size: 12.5px;
  color: #9CA3AF;
  max-width: 460px;
}

/* ==========================================================================
   LEADERBOARD VIEW
   ========================================================================== */

.leaderboard-bento {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lb-hero-banner {
  min-height: 200px;
  padding: 26px 30px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.lb-hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  flex-wrap: wrap;
}

.lb-hero-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 280px;
}

.lb-trophy-badge {
  font-size: 44px;
  line-height: 1;
}

.lb-hero-left h2 {
  margin: 0 0 6px 0;
  font-size: 24px;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: -.02em;
}

.lb-hero-left p {
  margin: 0;
  font-size: 13.5px;
  color: #9CA3AF;
  max-width: 600px;
  line-height: 1.45;
}

.lb-hero-left p strong {
  color: #FBBF24;
}

.lb-table-card {
  padding: 24px;
}

.lb-table-card.bento-white {
  background: var(--card-white);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-soft);
  color: var(--text);
}

.lb-table-card.bento-white .bento-card-head {
  margin-bottom: 16px;
}

.lb-table-card.bento-white .lb-head-title {
  font-size: 15px;
  font-weight: 800;
  color: #111827;
}

.lb-table-card.bento-white .live-chip {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

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

.lb-table-card.bento-white .lb-table th {
  color: #64748B;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
  background: #F8FAFC;
}

.lb-table-card.bento-white .lb-table td {
  border-bottom: 1px solid var(--border);
  color: #1E293B;
  font-size: 13.5px;
  padding: 14px;
}

.lb-table-card.bento-white .lb-table tr.current-user-row td {
  background: #EFF6FF;
  color: #1D4ED8;
}

.lb-table-card.bento-white .lb-table tr.current-user-row td strong {
  color: #1E40AF;
}

.lb-table-card.bento-white .lb-table tr:hover td {
  background: #F8FAFC;
}

.lb-table-card.bento-white .lb-table tr.current-user-row:hover td {
  background: #E0E7FF;
}

/* ==========================================================================
   USB AUTO-DETECT VIEW (Plug & Detect Phone Stand)
   ========================================================================== */

.usb-detect-bento {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.usb-hero-banner {
  min-height: 200px;
  padding: 26px 30px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.usb-hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.usb-hero-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 280px;
}

.usb-pulse-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.05));
  border: 1px solid rgba(245, 158, 11, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FBBF24;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
  flex-shrink: 0;
}

.usb-hero-left h2 {
  margin: 0 0 6px 0;
  font-size: 24px;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: -.02em;
}

.usb-hero-left p {
  margin: 0;
  font-size: 13.5px;
  color: #9CA3AF;
  max-width: 600px;
  line-height: 1.45;
}

.usb-hero-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.usb-stage-card {
  padding: 40px 30px;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.usb-stage-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 760px;
}

/* Radar Pulse Animation */
.usb-radar-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 10px auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.usb-radar-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(245, 158, 11, 0.4);
  pointer-events: none;
  animation: usbPulse 2.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.usb-radar-pulse.pulse-1 {
  width: 90px;
  height: 90px;
  animation-delay: 0s;
}

.usb-radar-pulse.pulse-2 {
  width: 120px;
  height: 120px;
  animation-delay: 0.9s;
}

.usb-radar-pulse.pulse-3 {
  width: 150px;
  height: 150px;
  animation-delay: 1.8s;
}

@keyframes usbPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0.9;
  }
  70% {
    opacity: 0.3;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.6);
    opacity: 0;
  }
}

.usb-radar-center {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #111827 0%, #1F2937 100%);
  border: 2px solid rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.3), inset 0 0 12px rgba(245, 158, 11, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FBBF24;
  position: relative;
  z-index: 2;
}

.usb-waiting-info h3 {
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  margin: 0 0 6px;
}

.usb-waiting-sub {
  font-size: 14.5px;
  color: #6B7280;
  margin: 0 0 24px;
}

.usb-features-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.usb-feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 9999px;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  font-size: 12.5px;
  font-weight: 600;
  color: #374151;
}

.usb-feature-chip .uf-icon {
  font-size: 14px;
}

.usb-sim-box {
  width: 100%;
  background: #F8FAFC;
  border: 1px dashed #CBD5E1;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  text-align: left;
}

.usb-sim-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.usb-sim-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-usb-sim {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 9999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #1E293B;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-usb-sim:hover {
  border-color: #3B82F6;
  background: #EFF6FF;
  color: #1D4ED8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.btn-usb-sim .sim-badge {
  font-size: 10.5px;
  font-weight: 800;
  background: #F1F5F9;
  color: #64748B;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
}

/* STATE 2: DETECTED */
.usb-stage-detected {
  width: 100%;
  max-width: 760px;
  text-align: left;
}

.usb-success-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 24px;
}

.usb-success-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 800;
  color: #065F46;
  letter-spacing: .02em;
}

.usb-live-pill {
  font-size: 12px;
  font-weight: 700;
  color: #047857;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.usb-detected-body {
  display: flex;
  gap: 28px;
  align-items: center;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.usb-detected-photo-wrap {
  width: 120px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
}

.usb-detected-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.usb-detected-photo-wrap svg {
  max-width: 80%;
  max-height: 80%;
}

.usb-detected-details {
  flex: 1;
  min-width: 0;
}

.usb-detected-brand {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: #3B82F6;
  letter-spacing: .05em;
  margin-bottom: 4px;
}

.usb-detected-name {
  font-size: 26px;
  font-weight: 900;
  color: #111827;
  letter-spacing: -.02em;
  margin: 0 0 10px;
}

.usb-detected-hardware {
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #6B7280;
  background: #F3F4F6;
  padding: 6px 12px;
  border-radius: 6px;
  display: inline-block;
  margin-top: 10px;
  margin-bottom: 22px;
}

.usb-detected-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}



