/* ScrapConnect Demo — Visual System */
:root {
  --navy: #07354A;
  --navy-deep: #052536;
  --navy-soft: #0a3d5c;
  --green: #08A982;
  --green-dark: #06936F;
  --green-soft: rgba(8, 169, 130, 0.12);
  --bg: #F5F7F8;
  --card: #FFFFFF;
  --text: #102A3A;
  --muted: #64748B;
  --border: #E2E8F0;
  --danger: #E74C3C;
  --radius: 12px;
  --shadow: 0 4px 18px rgba(7, 53, 74, 0.06);
  --shadow-sm: 0 2px 8px rgba(7, 53, 74, 0.05);
  --sidebar-w: 250px;
  --font: "Inter", "Poppins", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }

/* ---------- Auth / Login ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  background: var(--bg);
}

.login-hero {
  flex: 0 0 48%;
  width: 48%;
  min-width: 0;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 3.25rem;
  position: relative;
  overflow: hidden;
}

.login-hero::before {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  right: -120px;
  bottom: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(8, 169, 130, 0.18), transparent 68%);
  pointer-events: none;
}

.login-hero-inner {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
}

.hero-brand-row {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 1.85rem;
}

.hero-brand-row .brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.login-brand {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1.15;
}

.login-brand span { color: #7dffcf; }

.hero-tagline {
  margin-top: 0.25rem;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.68);
}

.hero-headline {
  margin: 0 0 0.85rem;
  font-size: clamp(1.4rem, 2.3vw, 1.85rem);
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -0.025em;
  color: #fff;
}

.hero-pitch {
  margin: 0 0 1.6rem;
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  max-width: 420px;
}

.hero-workflow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.35rem;
  margin-bottom: 1.75rem;
}

.wf-step {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.4rem 0.7rem 0.4rem 0.4rem;
}

.wf-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wf-text {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
}

.wf-arrow {
  color: rgba(125, 255, 207, 0.85);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0 0.1rem;
}

.hero-stats-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.55rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.hero-stat {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.85rem 0.7rem;
  text-align: center;
}

.hero-stat strong {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  color: #7dffcf;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.hero-stat .stat-label {
  display: block;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
  line-height: 1.25;
}

.login-panel {
  flex: 1 1 52%;
  width: 52%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2.5rem 2.75rem;
  background: var(--bg);
  gap: 0.9rem;
}

.login-panel-top {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-align: center;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.85rem 1.9rem 1.6rem;
  box-shadow: 0 10px 30px rgba(16, 42, 58, 0.07);
}

.login-card h1 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 0 0 1.15rem;
  text-align: center;
}

.login-sell-block {
  margin-top: 1.15rem;
  text-align: center;
}

.login-sell-label {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.55rem;
}

.login-sell-block .sell-flash {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.78rem 1rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  color: #fff !important;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(8, 169, 130, 0.5);
  animation: sellFlash 1.5s ease-in-out infinite;
}

.login-sell-block .sell-flash:hover {
  color: #fff !important;
  background: var(--green-dark);
}

@keyframes sellFlash {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(8, 169, 130, 0.45);
    background: #08A982;
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 0 10px rgba(8, 169, 130, 0);
    background: #12C49A;
  }
}

.demo-cred {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 1.15rem;
  text-align: center;
}

/* ---------- Buyer Shell ---------- */
.buyer-shell {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  padding: 1.25rem 0.9rem;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.75rem 1.5rem;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--green);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 6px 16px rgba(0, 164, 122, 0.35);
}

.brand-text {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.brand-text small {
  display: block;
  font-weight: 500;
  font-size: 0.68rem;
  opacity: 0.65;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.nav-link-sc {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255,255,255,0.78);
  padding: 0.72rem 0.9rem;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.15s ease;
  position: relative;
}

.nav-link-sc:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.nav-link-sc.active {
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 164, 122, 0.28);
}

.nav-link-sc .nav-icon {
  width: 20px;
  text-align: center;
  opacity: 0.95;
}

.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-link-sc.active .nav-badge {
  background: #fff;
  color: var(--green);
}

.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1rem 0.75rem 0.5rem;
  margin-top: 1rem;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--green);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.user-meta { line-height: 1.25; }
.user-meta strong { display: block; font-size: 0.88rem; }
.user-meta span { font-size: 0.72rem; opacity: 0.65; }

.logout-link {
  display: inline-block;
  margin-top: 0.85rem;
  color: rgba(255,255,255,0.65);
  font-size: 0.82rem;
}
.logout-link:hover { color: #fff; }

.main-wrap {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.35rem 1.75rem 0.5rem;
}

.topbar h1 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.topbar .subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.2rem 0 0;
}

.content {
  padding: 1rem 1.75rem 2.5rem;
}

/* ---------- Cards / Metrics ---------- */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.metric-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.2rem;
  border: 1px solid rgba(255,255,255,0.6);
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--green);
}

.metric-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 0.45rem;
}

.metric-value {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy);
  line-height: 1;
}

.metric-icon {
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.card-sc {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.card-sc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.card-sc-header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.card-sc-body { padding: 0; }

/* ---------- Tables ---------- */
.table-sc {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.table-sc thead th {
  background: #FAFBFC;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table-sc tbody td {
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: 0.93rem;
}

.table-sc tbody tr:last-child td { border-bottom: none; }
.table-sc tbody tr:hover { background: #FAFCFB; }

.factory-cell {
  font-weight: 600;
  color: var(--navy);
}

.thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  object-position: center;
  background: #EEF2F4;
  border: 1px solid var(--border);
  display: block;
  flex-shrink: 0;
}

.thumb-frame {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  background: #EEF2F4;
  border: 1px solid var(--border);
}

.thumb-frame .thumb {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
}

.thumb-frame.thumb-placeholder {
  min-height: 0;
  font-size: 0.85rem;
}

.thumb-lg-wrap {
  width: 100%;
  min-height: 260px;
  max-height: 480px;
  border-radius: 14px;
  overflow: auto;
  background: #EEF2F4;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.thumb-lg {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 460px;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
  border: none;
  background: transparent;
  display: block;
}

.thumb-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.75rem;
  background: linear-gradient(135deg, #E8EEF1, #F5F7F8);
  width: 100%;
  height: 100%;
  min-height: 280px;
}

/* ---------- Buttons ---------- */
.btn-green {
  background: var(--green);
  color: #fff !important;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  transition: background 0.15s ease, transform 0.1s ease;
  box-shadow: 0 4px 12px rgba(0, 164, 122, 0.22);
}

.btn-green:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.btn-green:active { transform: translateY(0); }

.btn-green-lg {
  width: 100%;
  padding: 0.95rem 1rem;
  font-size: 1rem;
  border-radius: 12px;
  letter-spacing: 0.01em;
}

.btn-outline-soft {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--navy);
  border-radius: 10px;
  font-weight: 600;
  padding: 0.55rem 1rem;
}

.btn-sm-sc {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  border-radius: 8px;
}

/* ---------- Badges ---------- */
.badge-status {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge-new { background: #E8F8F2; color: var(--green); }
.badge-quoted { background: #EAF2FF; color: #2563EB; }
.badge-pickup { background: #FFF4E5; color: #C27803; }
.badge-completed { background: #EEF2F4; color: #52606D; }

.badge-new-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

/* ---------- Detail page ---------- */
.detail-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 1.5rem;
}

.detail-card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 1.35rem;
}

.gallery-thumbs {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.85rem;
  flex-wrap: wrap;
}

.gallery-thumbs img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: contain;
  object-position: center;
  border: 2px solid transparent;
  cursor: pointer;
  display: block;
  background: #EEF2F4;
}

.gallery-thumbs img.active,
.gallery-thumbs img:hover {
  border-color: var(--green);
}

.detail-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.detail-title h2 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.detail-qty {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.info-list {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.info-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.5rem;
  font-size: 0.93rem;
}

.info-row .label { color: var(--muted); font-weight: 500; }
.info-row .value { color: var(--text); font-weight: 600; }

.action-box {
  background: linear-gradient(180deg, #F8FBFA 0%, #F3F8F6 100%);
  border: 1px solid #D9EBE4;
  border-radius: 14px;
  padding: 1.15rem;
}

.action-box h3 {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
}

.action-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
  align-items: end;
  margin-bottom: 0.85rem;
}

.action-row:last-child { margin-bottom: 0; }

.form-label-sc {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.sc-input, .sc-textarea, .form-select.sc-input {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
  background: #fff;
  box-shadow: none;
}

.sc-input:focus, .sc-textarea:focus, .form-select.sc-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 164, 122, 0.15);
}

/* ---------- Sell page (public / mobile-first) ---------- */
.sell-page {
  min-height: 100vh;
  background: var(--bg);
}

.sell-header {
  background: linear-gradient(135deg, var(--navy) 0%, #0a4d42 70%, var(--green) 160%);
  color: #fff;
  padding: 1.5rem 1.25rem 1.75rem;
}

.sell-header .logo-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.sell-header h1 {
  margin: 0 0 0.4rem;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sell-header p {
  margin: 0;
  opacity: 0.88;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 520px;
}

.sell-shell {
  max-width: 640px;
  margin: -1.25rem auto 0;
  padding: 0 1rem 2.5rem;
  position: relative;
  z-index: 2;
}

.sell-card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 1.35rem 1.2rem 1.5rem;
}

.field-group { margin-bottom: 1rem; }

.field-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.qty-row {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr;
  gap: 0.65rem;
}

.upload-hint {
  margin: 0.55rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
}

.preview-grid .preview-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #EEF2F4;
}

.preview-grid img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #EEF2F4;
}

.preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(16, 42, 58, 0.75);
  color: #fff;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.add-photo-btn {
  aspect-ratio: 1;
  width: 100%;
  border: 1.5px dashed var(--green);
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.78rem;
  transition: background 0.15s ease, transform 0.1s ease;
}

.add-photo-btn i {
  font-size: 1.45rem;
  line-height: 1;
}

.add-photo-btn:hover {
  background: rgba(8, 169, 130, 0.2);
  transform: translateY(-1px);
}

.success-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: var(--bg);
}

.success-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 2.25rem 1.75rem;
  text-align: center;
  max-width: 440px;
  width: 100%;
}

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 2rem;
  margin: 0 auto 1.1rem;
}

.success-card h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 0.6rem;
}

.success-card p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 1.5rem;
}

.alert-sc {
  border-radius: 10px;
  border: none;
  font-size: 0.9rem;
}

.mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 90;
}

.mobile-topbar .brand {
  font-weight: 800;
  font-size: 1.05rem;
}

.menu-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6, 48, 74, 0.45);
  z-index: 95;
}

.sidebar-backdrop.show { display: block; }

.empty-state {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--muted);
}

.chart-row {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 1rem;
  margin-top: 1.25rem;
}

.mini-chart {
  padding: 1.15rem 1.25rem 1.35rem;
}

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 0.75rem;
}

.donut {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(
    var(--green) 0% 38%,
    #3DBE9A 38% 62%,
    #8ED9C4 62% 82%,
    #D3EDE5 82% 100%
  );
  position: relative;
  flex-shrink: 0;
}

.donut::after {
  content: "";
  position: absolute;
  inset: 28px;
  background: #fff;
  border-radius: 50%;
}

.legend { font-size: 0.82rem; color: var(--muted); }
.legend div { margin-bottom: 0.35rem; display: flex; align-items: center; gap: 0.45rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.trend-svg { width: 100%; height: 120px; margin-top: 0.5rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .chart-row { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .main-wrap { margin-left: 0; }
  .mobile-topbar { display: flex; }
  .info-row { grid-template-columns: 1fr; gap: 0.15rem; }
  .action-row { grid-template-columns: 1fr; }
  .login-page { flex-direction: column; }
  .login-hero,
  .login-panel {
    flex: none;
    width: 100%;
  }
  .login-hero { padding: 1.6rem 1.25rem 1.4rem; }
  .login-hero-inner { width: 100%; }
  .hero-workflow { margin-bottom: 1.15rem; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 0.45rem; }
  .hero-stat { padding: 0.65rem 0.4rem; }
  .hero-stat strong { font-size: 1.15rem; }
  .hero-headline { font-size: 1.25rem; }
  .hero-pitch { font-size: 0.92rem; margin-bottom: 1.15rem; }
  .login-panel { padding: 1.4rem 1rem 2rem; }
}

@media (max-width: 640px) {
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .metric-value { font-size: 1.45rem; }
  .content { padding: 0.85rem 1rem 2rem; }
  .topbar { padding: 1rem 1rem 0.25rem; }
  .table-responsive-sc { overflow-x: auto; }
  .preview-grid { grid-template-columns: repeat(3, 1fr); }
  .sell-header h1 { font-size: 1.4rem; }
  .sell-card { padding: 1.15rem 1rem 1.35rem; }
}
