:root {
  --sg-ink: #12202a;
  --sg-muted: #5a6b76;
  --sg-line: rgba(18, 32, 42, 0.1);
  --sg-surface: rgba(255, 255, 255, 0.78);
  --sg-surface-solid: #ffffff;
  --sg-accent: #0f8f7b;
  --sg-accent-deep: #0a6b5c;
  --sg-accent-soft: rgba(15, 143, 123, 0.12);
  --sg-warn: #c47a1a;
  --sg-danger: #c0392b;
  --sg-success: #1f8a4c;
  --sg-radius: 14px;
  --sg-radius-sm: 10px;
  --sg-shadow: 0 10px 30px rgba(18, 32, 42, 0.08);
  --sg-font: "Sen", "Segoe UI", sans-serif;
  --sg-display: var(--sg-font);

  --sg-text-xs: 0.75rem;
  --sg-text-sm: 0.875rem;
  --sg-text-md: 1rem;
  --sg-text-lg: 1.125rem;
  --sg-text-xl: 1.375rem;
  --sg-text-2xl: 1.75rem;
  --sg-text-display: clamp(2rem, 4.5vw, 3.25rem);

  --sg-lh-tight: 1.1;
  --sg-lh-snug: 1.25;
  --sg-lh-body: 1.55;
  --sg-track-tight: -0.03em;
  --sg-track-display: -0.045em;
  --sg-track-wide: 0.12em;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  position: relative;
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sg-font);
  font-size: var(--sg-text-md);
  font-weight: 400;
  line-height: var(--sg-lh-body);
  color: var(--sg-ink);
  font-feature-settings: "kern" 1;
  background:
    radial-gradient(1000px 500px at 10% -10%, rgba(15, 143, 123, 0.18), transparent 55%),
    radial-gradient(800px 420px at 95% 5%, rgba(196, 122, 26, 0.12), transparent 50%),
    linear-gradient(180deg, #f3f7f6 0%, #e8eef1 45%, #f7f4ef 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(18, 32, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 32, 42, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  z-index: 0;
}

.sg-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.sg-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid var(--sg-line);
}

.sg-nav .navbar-brand {
  font-family: var(--sg-display);
  font-weight: 800;
  letter-spacing: var(--sg-track-tight);
  color: var(--sg-ink) !important;
  font-size: 1.25rem;
  line-height: var(--sg-lh-snug);
}

.sg-nav .navbar-toggler {
  border-color: rgba(18, 32, 42, 0.2);
}

.sg-nav .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(18, 32, 42, 0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.sg-brand-mark {
  display: inline-flex;
  width: 1.65rem;
  height: 1.65rem;
  margin-right: 0.45rem;
  border-radius: 6px;
  background:
    linear-gradient(135deg, var(--sg-accent) 0 50%, transparent 50%),
    linear-gradient(315deg, var(--sg-warn) 0 50%, #12202a 50%);
  vertical-align: -0.25rem;
}

.sg-nav .nav-link {
  color: var(--sg-muted) !important;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.4rem 0.85rem !important;
  transition: color 0.2s ease, background 0.2s ease;
}

.sg-nav .nav-link:hover,
.sg-nav .nav-link:focus {
  color: var(--sg-ink) !important;
  background: var(--sg-accent-soft);
}

.sg-nav .navbar-text {
  color: var(--sg-muted) !important;
  font-weight: 600;
}

.sg-main {
  flex: 1;
  padding: 1.75rem 0 3rem;
}

.sg-footer {
  border-top: 1px solid var(--sg-line);
  color: var(--sg-muted);
  padding: 2.75rem 0 1.35rem;
  background: #fff;
}

.sg-footer-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, minmax(0, 1fr)) 1.15fr;
  gap: 1.75rem 1.5rem;
  padding-bottom: 2rem;
}

.sg-footer-brand p {
  margin: 0.85rem 0 0;
  max-width: 28ch;
  font-size: var(--sg-text-sm);
  line-height: var(--sg-lh-body);
  color: #7a8794;
}

.sg-footer-logo {
  display: inline-flex;
  align-items: center;
  font-family: var(--sg-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: var(--sg-track-tight);
  color: var(--sg-ink);
  text-decoration: none;
}

.sg-footer-logo:hover {
  color: var(--sg-ink);
}

.sg-footer-col h3,
.sg-footer-help h3 {
  margin: 0 0 0.85rem;
  font-family: var(--sg-display);
  font-size: var(--sg-text-md);
  font-weight: 700;
  color: #1a2744;
  letter-spacing: var(--sg-track-tight);
  line-height: var(--sg-lh-snug);
}

.sg-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.sg-footer-col a {
  color: #6b7a88;
  text-decoration: none;
  font-size: var(--sg-text-sm);
  font-weight: 500;
  transition: color 0.15s ease;
}

.sg-footer-col a:hover {
  color: var(--sg-accent-deep);
}

.sg-footer-help {
  padding: 1.15rem 1.2rem;
  border-radius: 16px;
  background: rgba(124, 108, 240, 0.08);
  border: 1px solid rgba(124, 108, 240, 0.14);
}

.sg-footer-help p {
  margin: 0 0 0.95rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #6b7a88;
}

.sg-footer-help-link,
.sg-footer-help-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.sg-footer-help-link {
  color: #5b4fd6;
  text-decoration: none;
  margin-bottom: 0.55rem;
}

.sg-footer-help-link:hover {
  color: #4338ca;
}

.sg-footer-help-meta {
  color: #7a8794;
  font-weight: 500;
}

.sg-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(18, 32, 42, 0.08);
  font-size: 0.84rem;
  color: #8b97a8;
}

.sg-cta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  border-radius: var(--sg-radius);
  border: 1px solid var(--sg-line);
  background: #fff;
  box-shadow: var(--sg-shadow);
  animation: sg-rise 0.55s ease both;
}

.sg-cta-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.45rem 1.35rem 1.35rem;
  border-radius: 18px;
  border: 1px solid rgba(18, 32, 42, 0.08);
  background: #fff;
  box-shadow: none;
}

.sg-cta-card h3 {
  margin: 0;
  font-size: var(--sg-text-lg);
  font-weight: 700;
  line-height: var(--sg-lh-snug);
  letter-spacing: var(--sg-track-tight);
  color: #1a2744;
}

.sg-cta-card p {
  margin: 0;
  flex: 1;
  font-size: var(--sg-text-sm);
  line-height: var(--sg-lh-body);
  color: #6b7a88;
}

.sg-cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #fff;
  font-size: 1.2rem;
}

.sg-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
  padding: 0.7rem 1.05rem;
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(18, 32, 42, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.sg-cta-btn:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(18, 32, 42, 0.16);
  filter: brightness(1.04);
}

.sg-cta-violet {
  border-color: rgba(124, 108, 240, 0.22);
}

.sg-cta-violet .sg-cta-icon { background: #7c6cf0; }
.sg-cta-violet .sg-cta-btn { background: #7c6cf0; }

.sg-cta-green {
  border-color: rgba(34, 177, 112, 0.22);
}

.sg-cta-green .sg-cta-icon { background: #22b170; }
.sg-cta-green .sg-cta-btn { background: #22b170; }

.sg-cta-amber {
  border-color: rgba(232, 149, 42, 0.24);
}

.sg-cta-amber .sg-cta-icon { background: #e8952a; }
.sg-cta-amber .sg-cta-btn { background: #e8952a; }

@media (max-width: 1100px) {
  .sg-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sg-footer-brand,
  .sg-footer-help {
    grid-column: 1 / -1;
  }
}

@media (max-width: 992px) {
  .sg-cta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .sg-footer-grid {
    grid-template-columns: 1fr;
  }

  .sg-footer-bottom {
    flex-direction: column;
  }
}

h1, h2, h3, .display-5, .sg-title {
  font-family: var(--sg-display);
  letter-spacing: var(--sg-track-tight);
  line-height: var(--sg-lh-snug);
}

h1, .sg-title {
  font-size: var(--sg-text-2xl);
  font-weight: 800;
}

h2 {
  font-size: var(--sg-text-xl);
  font-weight: 700;
}

h3 {
  font-size: var(--sg-text-lg);
  font-weight: 600;
}

.sg-hero {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.5fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 1.25rem;
  overflow: visible;
  border-radius: calc(var(--sg-radius) + 8px);
  padding: clamp(2rem, 4.5vw, 3.25rem) clamp(1rem, 2vw, 1.5rem);
  margin-bottom: 2rem;
  color: var(--sg-ink);
  background:
    radial-gradient(520px 280px at 50% 0%, rgba(15, 143, 123, 0.14), transparent 70%),
    radial-gradient(420px 220px at 85% 80%, rgba(196, 122, 26, 0.1), transparent 65%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.42) 100%);
  border: 1px solid var(--sg-line);
  box-shadow: var(--sg-shadow);
  animation: sg-hero-in 0.7s ease both;
}

.sg-hero-center {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 40rem;
  margin: 0 auto;
  width: 100%;
  min-width: 0;
}

.sg-hero-eyebrow {
  margin: 0 0 0.55rem;
  font-size: var(--sg-text-xs);
  font-weight: 700;
  letter-spacing: var(--sg-track-wide);
  text-transform: uppercase;
  color: var(--sg-accent-deep);
}

.sg-hero h1 {
  font-family: var(--sg-display);
  font-size: var(--sg-text-display);
  font-weight: 800;
  letter-spacing: var(--sg-track-display);
  line-height: var(--sg-lh-tight);
  margin: 0 0 0.65rem;
  color: var(--sg-ink);
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sg-hero-lead {
  margin: 0 auto 1.35rem;
  max-width: 32rem;
  color: var(--sg-muted);
  font-size: var(--sg-text-lg);
  line-height: var(--sg-lh-body);
  font-weight: 400;
}

.sg-hero-search {
  position: relative;
  z-index: 40;
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
}

.sg-hero-search-shell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.4rem 0.4rem 1rem;
  background: var(--sg-surface-solid);
  border: 1px solid var(--sg-line);
  border-radius: 999px;
  box-shadow: 0 14px 36px rgba(18, 32, 42, 0.1);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sg-hero-search-shell:focus-within {
  border-color: rgba(15, 143, 123, 0.45);
  box-shadow: 0 14px 36px rgba(15, 143, 123, 0.16);
}

.sg-hero-search-icon {
  flex: 0 0 auto;
  color: var(--sg-muted);
  font-size: 1.05rem;
  opacity: 0.75;
}

.sg-hero-search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--sg-ink);
  font: inherit;
  font-size: 0.98rem;
  padding: 0.55rem 0.35rem;
}

.sg-hero-search-input::placeholder {
  color: #8a9aa5;
}

.sg-hero-search-btn {
  flex: 0 0 auto;
  border-radius: 999px !important;
  padding: 0.55rem 1.25rem !important;
  font-weight: 700;
}

.sg-hero-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.45rem);
  z-index: 50;
  max-height: min(22rem, 60vh);
  overflow: auto;
  text-align: left;
  background: var(--sg-surface-solid);
  border: 1px solid var(--sg-line);
  border-radius: var(--sg-radius);
  box-shadow: 0 18px 40px rgba(18, 32, 42, 0.14);
  padding: 0.45rem;
}

.sg-hero-suggest-group + .sg-hero-suggest-group {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--sg-line);
}

.sg-hero-suggest-heading {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sg-muted);
  padding: 0.35rem 0.65rem 0.25rem;
}

.sg-hero-suggest-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--sg-radius-sm);
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease;
}

.sg-hero-suggest-item:hover,
.sg-hero-suggest-item.is-active {
  background: var(--sg-accent-soft);
}

.sg-hero-suggest-icon {
  flex: 0 0 auto;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sg-accent-soft);
  color: var(--sg-accent-deep);
  font-size: 1rem;
  overflow: hidden;
}

.sg-hero-suggest-logo {
  background: #eef3f5;
  color: var(--sg-ink);
  font-weight: 700;
}

.sg-hero-suggest-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sg-hero-suggest-initial {
  font-size: 0.85rem;
}

.sg-hero-suggest-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.sg-hero-suggest-title {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sg-hero-suggest-meta {
  font-size: 0.8rem;
  color: var(--sg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sg-hero-suggest-badge {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--sg-accent-deep);
  background: var(--sg-accent-soft);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
}

.sg-hero-suggest-empty {
  padding: 0.9rem 0.75rem;
  text-align: center;
  color: var(--sg-muted);
  font-size: 0.9rem;
}

.sg-hero-popular {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.75rem;
  margin-top: 0.95rem;
  font-size: 0.88rem;
}

.sg-hero-popular-label {
  color: var(--sg-muted);
}

.sg-hero-popular a {
  color: var(--sg-accent-deep);
  font-weight: 600;
  text-decoration: none;
}

.sg-hero-popular a:hover,
.sg-hero-popular a:focus {
  text-decoration: underline;
}

.sg-hero-side {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  z-index: 1;
  min-width: 0;
}

.sg-hero-side-left {
  align-items: flex-end;
  padding-right: 0.25rem;
}

.sg-hero-side-right {
  align-items: flex-start;
  padding-left: 0.25rem;
}

.sg-hero-float-card {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  max-width: 15rem;
  padding: 0.7rem 0.95rem 0.7rem 0.7rem;
  background: var(--sg-surface-solid);
  border: 1px solid var(--sg-line);
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(18, 32, 42, 0.08);
  color: inherit;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: sg-hero-card-float 6s ease-in-out infinite;
}

.sg-hero-side-left .sg-hero-float-card:nth-child(2),
.sg-hero-side-right .sg-hero-float-card:nth-child(2) {
  animation-delay: -2s;
}

.sg-hero-side-left .sg-hero-float-card:nth-child(3),
.sg-hero-side-right .sg-hero-float-card:nth-child(3) {
  animation-delay: -4s;
}

.sg-hero-float-icon {
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  background: var(--sg-cat-bg, var(--sg-accent-soft));
  color: var(--sg-cat-fg, var(--sg-accent-deep));
}

.sg-hero-float-label {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.25;
  text-align: left;
}

.sg-hero-float-card:hover {
  animation-play-state: paused;
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(18, 32, 42, 0.12);
  color: inherit;
}

@media (max-width: 991.98px) {
  .sg-hero {
    grid-template-columns: 1fr;
    padding: clamp(1.75rem, 4vw, 2.5rem) 1.15rem;
  }

  .sg-hero-side {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .sg-hero-search-shell {
    padding-left: 0.85rem;
  }

  .sg-hero-search-btn {
    padding-inline: 1rem !important;
  }

  .sg-hero-popular {
    justify-content: flex-start;
  }
}

.sg-panel {
  background: #fff;
  border: 1px solid var(--sg-line);
  border-radius: var(--sg-radius);
  box-shadow: var(--sg-shadow);
  padding: 1.25rem 1.35rem;
  animation: sg-rise 0.55s ease both;
  overflow: hidden;
  max-width: 100%;
}

@media (max-width: 576px) {
  .sg-panel {
    padding: 0.9rem 0.75rem;
  }

  .sg-home-block,
  .sg-cta-grid {
    padding: 0.9rem 0.75rem;
  }

  .sg-section-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

.pw-wall-panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
}

.pw-wall-cost {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  text-align: right;
  margin-left: auto;
}

.pw-wall-cost strong {
  font-family: var(--sg-display);
  color: var(--sg-accent-deep);
  font-size: 1.05rem;
}

.pw-wall-balance {
  font-size: 0.85rem;
  color: var(--sg-muted);
}

.pw-wall-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

@media (max-width: 576px) {
  .pw-wall-panel-head {
    flex-direction: column;
  }

  .pw-wall-cost {
    align-items: flex-start;
    text-align: left;
    margin-left: 0;
  }
}

.sg-panel + .sg-panel {
  margin-top: 1.25rem;
}

.sg-home-categories {
  margin-top: 0;
}

.sg-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.sg-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 168px;
  padding: 1.35rem 1.1rem 1.25rem;
  border-radius: 18px;
  border: 1px solid rgba(18, 32, 42, 0.06);
  background: #fff;
  box-shadow: 0 10px 28px rgba(18, 32, 42, 0.07);
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.sg-category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(18, 32, 42, 0.11);
  border-color: rgba(18, 32, 42, 0.1);
  color: inherit;
}

.sg-category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: var(--sg-cat-bg, rgba(15, 143, 123, 0.12));
  color: var(--sg-cat-fg, var(--sg-accent-deep));
}

.sg-category-icon i {
  font-size: 1.45rem;
  line-height: 1;
}

.sg-category-name {
  font-family: var(--sg-display);
  font-weight: 700;
  font-size: var(--sg-text-lg);
  line-height: var(--sg-lh-snug);
  letter-spacing: var(--sg-track-tight);
  color: #1a2744;
  max-width: 16ch;
}

.sg-category-count {
  font-size: 0.9rem;
  color: #8b97a8;
  font-weight: 500;
}

.sg-cat-tone-1 { --sg-cat-bg: rgba(59, 130, 246, 0.12); --sg-cat-fg: #2563eb; }
.sg-cat-tone-2 { --sg-cat-bg: rgba(239, 68, 68, 0.12); --sg-cat-fg: #dc2626; }
.sg-cat-tone-3 { --sg-cat-bg: rgba(139, 92, 246, 0.12); --sg-cat-fg: #7c3aed; }
.sg-cat-tone-4 { --sg-cat-bg: rgba(20, 184, 166, 0.14); --sg-cat-fg: #0f766e; }
.sg-cat-tone-5 { --sg-cat-bg: rgba(245, 158, 11, 0.14); --sg-cat-fg: #d97706; }
.sg-cat-tone-6 { --sg-cat-bg: rgba(14, 165, 233, 0.14); --sg-cat-fg: #0284c7; }

@media (max-width: 992px) {
  .sg-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .sg-category-grid {
    grid-template-columns: 1fr;
  }

  .sg-category-card {
    min-height: 148px;
  }
}

.sg-section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sg-section-head h2 {
  margin: 0;
  font-size: var(--sg-text-xl);
  font-weight: 700;
  letter-spacing: var(--sg-track-tight);
  line-height: var(--sg-lh-snug);
}

.sg-card {
  display: block;
  height: 100%;
  padding: 1.15rem 1.2rem;
  border-radius: var(--sg-radius);
  border: 1px solid var(--sg-line);
  background: var(--sg-surface-solid);
  box-shadow: var(--sg-shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.sg-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 143, 123, 0.35);
  box-shadow: 0 16px 36px rgba(18, 32, 42, 0.12);
  color: inherit;
}

.sg-card h3 {
  font-size: var(--sg-text-lg);
  font-weight: 600;
  letter-spacing: var(--sg-track-tight);
  margin-bottom: 0.4rem;
}

.sg-company-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.sg-dir-search {
  position: relative;
  z-index: 25;
  max-width: 44rem;
  margin-inline: auto;
}

.sg-dir-search .sg-hero-search {
  max-width: none;
}

.sg-dir-cats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.95rem;
}

.sg-dir-cat {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--sg-line);
  background: var(--sg-surface-solid);
  color: var(--sg-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.sg-dir-cat:hover,
.sg-dir-cat:focus {
  color: var(--sg-ink);
  border-color: rgba(15, 143, 123, 0.35);
  background: var(--sg-accent-soft);
}

.sg-dir-cat.is-active {
  color: #fff;
  border-color: var(--sg-accent);
  background: var(--sg-accent);
}

.sg-dir-result-meta {
  margin: 0.85rem 0 0;
  text-align: center;
  color: var(--sg-muted);
  font-size: 0.9rem;
}

.sg-company-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 100%;
  padding: 1.15rem 1.15rem 1rem;
  border-radius: var(--sg-radius);
  border: 1px solid var(--sg-line);
  background: var(--sg-surface-solid);
  box-shadow: var(--sg-shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.sg-company-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 143, 123, 0.35);
  box-shadow: 0 16px 36px rgba(18, 32, 42, 0.12);
  color: inherit;
}

.sg-company-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.sg-company-card-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--sg-line);
  background: #f4f7f8;
  overflow: hidden;
  flex-shrink: 0;
}

.sg-company-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sg-company-card-initial {
  font-family: var(--sg-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--sg-accent-deep);
}

.sg-company-card-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.sg-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
}

.sg-badge-verified {
  color: var(--sg-success);
  background: rgba(31, 138, 76, 0.12);
}

.sg-badge-sponsored {
  color: #b45309;
  background: rgba(196, 122, 26, 0.14);
}

.sg-badge-featured {
  color: var(--sg-accent-deep);
  background: var(--sg-accent-soft);
}

.sg-company-card-name {
  margin: 0;
  font-family: var(--sg-display);
  font-size: var(--sg-text-lg);
  font-weight: 700;
  letter-spacing: var(--sg-track-tight);
  line-height: var(--sg-lh-snug);
  color: #1a2744;
}

.sg-company-card-desc {
  margin: 0;
  flex: 1 1 auto;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--sg-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sg-company-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-top: 0.15rem;
}

.sg-company-card-country {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: #8b97a8;
}

.sg-company-card-cat {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #2563eb;
  background: rgba(59, 130, 246, 0.12);
}

.sg-company-card-cta {
  display: block;
  margin-top: 0.35rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1.5px solid rgba(15, 143, 123, 0.45);
  color: var(--sg-accent-deep);
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sg-company-card:hover .sg-company-card-cta {
  background: var(--sg-accent-soft);
  border-color: var(--sg-accent);
}

@media (max-width: 992px) {
  .sg-company-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .sg-company-grid {
    grid-template-columns: 1fr;
  }
}

.sg-home-block {
  padding: 1.25rem 1.35rem;
  border-radius: var(--sg-radius);
  border: 1px solid var(--sg-line);
  background: #fff;
  box-shadow: var(--sg-shadow);
  animation: sg-rise 0.55s ease both;
}

.sg-home-block-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sg-home-block-head h2 {
  margin: 0;
  font-family: var(--sg-display);
  font-size: var(--sg-text-xl);
  font-weight: 700;
  letter-spacing: var(--sg-track-tight);
  line-height: var(--sg-lh-snug);
  color: #1a2744;
}

.sg-home-eyebrow {
  margin: 0 0 0.3rem;
  font-size: var(--sg-text-xs);
  font-weight: 700;
  letter-spacing: var(--sg-track-wide);
  text-transform: uppercase;
}

.sg-home-eyebrow-coral {
  color: #e26a5a;
}

.sg-home-eyebrow-violet {
  color: #7c6cf0;
}

.sg-home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #4f6ef7;
  text-decoration: none;
  white-space: nowrap;
}

.sg-home-link:hover {
  color: #3554d4;
}

.sg-sponsored-strip {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  border: 1px solid rgba(18, 32, 42, 0.1);
  border-radius: 16px;
  background: #fff;
}

.sg-sponsored-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 0;
  min-width: 168px;
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: inherit;
  border-right: 1px solid rgba(18, 32, 42, 0.08);
  transition: background 0.15s ease;
}

.sg-sponsored-item:last-child {
  border-right: 0;
}

.sg-sponsored-item:hover {
  background: rgba(79, 110, 247, 0.04);
  color: inherit;
}

.sg-sponsored-logo {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #f3f5f8;
  border: 1px solid rgba(18, 32, 42, 0.06);
  overflow: hidden;
  font-family: var(--sg-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: #4a5a6a;
}

.sg-sponsored-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sg-sponsored-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.sg-sponsored-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1a2744;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sg-sponsored-cat {
  font-size: 0.8rem;
  color: #8b97a8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sg-recent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.sg-recent-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-height: 200px;
  padding: 1.25rem 1.3rem;
  border-radius: 16px;
  border: 1px solid rgba(18, 32, 42, 0.1);
  background: #fff;
  box-shadow: 0 8px 22px rgba(18, 32, 42, 0.05);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.sg-recent-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(18, 32, 42, 0.09);
  border-color: rgba(79, 110, 247, 0.28);
  color: inherit;
}

.sg-recent-card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.sg-recent-logo {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #f3f5f8;
  border: 1px solid rgba(18, 32, 42, 0.06);
  overflow: hidden;
  font-family: var(--sg-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: #4a5a6a;
}

.sg-recent-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sg-recent-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.sg-recent-name {
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.3;
  color: #1a2744;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sg-recent-cat {
  display: inline-flex;
  align-self: flex-start;
  max-width: 100%;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(79, 110, 247, 0.1);
  color: #3554d4;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sg-recent-country {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: #8b97a8;
}

.sg-recent-country i {
  font-size: 0.85rem;
}

.sg-recent-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #4f6ef7;
}

.sg-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--sg-line);
  border-radius: var(--sg-radius);
  background: #fff;
  box-shadow: var(--sg-shadow);
  overflow: hidden;
  animation: sg-rise 0.55s ease both;
}

.sg-stats-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.15rem 1.25rem;
  border-right: 1px solid rgba(18, 32, 42, 0.08);
}

.sg-stats-item:last-child {
  border-right: 0;
}

.sg-stats-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  font-size: 1.1rem;
}

.sg-stats-icon-violet { background: #8b7cf8; }
.sg-stats-icon-blue { background: #5b9cf5; }
.sg-stats-icon-green { background: #3ecf8e; }
.sg-stats-icon-amber { background: #f0b429; }

.sg-stats-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.sg-stats-copy strong {
  font-family: var(--sg-display);
  font-size: var(--sg-text-xl);
  font-weight: 700;
  line-height: var(--sg-lh-tight);
  letter-spacing: var(--sg-track-tight);
  color: #1a2744;
}

.sg-stats-copy span {
  font-size: 0.88rem;
  color: #8b97a8;
  font-weight: 500;
}

@media (max-width: 1200px) {
  .sg-recent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .sg-stats-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sg-stats-item:nth-child(2) {
    border-right: 0;
  }

  .sg-stats-item:nth-child(1),
  .sg-stats-item:nth-child(2) {
    border-bottom: 1px solid rgba(18, 32, 42, 0.08);
  }
}

@media (max-width: 768px) {
  .sg-home-block-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .sg-recent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .sg-recent-grid {
    grid-template-columns: 1fr;
  }

  .sg-stats-bar {
    grid-template-columns: 1fr;
  }

  .sg-stats-item {
    border-right: 0;
    border-bottom: 1px solid rgba(18, 32, 42, 0.08);
  }

  .sg-stats-item:nth-child(1),
  .sg-stats-item:nth-child(2) {
    border-bottom: 1px solid rgba(18, 32, 42, 0.08);
  }

  .sg-stats-item:last-child {
    border-bottom: 0;
  }
}

.sg-auth {
  max-width: 440px;
  margin: 1.5rem auto;
}

.sg-auth .sg-panel {
  padding: 1.75rem;
}

.sg-balance {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--sg-radius-sm);
  background: linear-gradient(135deg, var(--sg-accent-soft), rgba(196, 122, 26, 0.1));
  border: 1px solid rgba(15, 143, 123, 0.2);
  font-family: var(--sg-display);
  font-weight: 700;
  font-size: 1.45rem;
}

#depositModal .font-monospace {
  font-size: 0.8rem;
}

#depositCountdown {
  font-size: 1.25rem;
  letter-spacing: 0.04em;
}

/* Modal body'de; backdrop diyalogun altında kalsın */
body > .modal {
  z-index: 1055;
}
body > .modal-backdrop {
  z-index: 1050;
  background-color: rgba(18, 32, 42, 0.35);
}

.pixel-wall-wrap {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.85rem;
  border-radius: calc(var(--sg-radius) + 8px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.28)),
    radial-gradient(120% 80% at 50% 0%, rgba(15, 143, 123, 0.1), transparent 55%);
  border: 1px solid rgba(18, 32, 42, 0.08);
  box-shadow: 0 10px 28px rgba(18, 32, 42, 0.05);
}

.pixel-wall-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
  align-items: center;
  width: min(100%, var(--pw-max, 640px));
}

.pixel-wall-hint {
  color: var(--sg-muted);
  font-size: 0.92rem;
  flex: 1 1 12rem;
  min-width: 0;
}

.pixel-wall-quote {
  font-family: var(--sg-display);
  color: var(--sg-accent-deep);
  font-size: 0.95rem;
  white-space: nowrap;
}

.pixel-wall {
  --pw-cell: calc(100% * var(--pw-min, 10) / var(--pw-grid-w, 1000));
  --pw-bezel: #1a2a33;
  width: min(100%, var(--pw-max, 600px));
  max-width: 100%;
  height: auto;
  border-radius: calc(var(--sg-radius) + 2px);
  border: 1px solid rgba(18, 32, 42, 0.18);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(15, 143, 123, 0.22), transparent 55%),
    radial-gradient(80% 70% at 100% 100%, rgba(196, 122, 26, 0.12), transparent 50%),
    linear-gradient(160deg, #243742 0%, #1a2a33 42%, #15232b 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 0 0 1px rgba(15, 143, 123, 0.12),
    0 18px 48px rgba(18, 32, 42, 0.16),
    0 6px 16px rgba(18, 32, 42, 0.08);
  overflow: hidden;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
  isolation: isolate;
}

.pixel-wall::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.07), transparent 28%),
    radial-gradient(circle at 82% 78%, rgba(15, 143, 123, 0.14), transparent 32%);
}

.pixel-wall::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 0 40px rgba(18, 32, 42, 0.28);
  mix-blend-mode: soft-light;
}

.pixel-wall-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.9;
  background-color: transparent;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.16) 0.7px, transparent 0.8px),
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(15, 143, 123, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 143, 123, 0.16) 1px, transparent 1px);
  background-size:
    calc(var(--pw-cell) / 2) calc(var(--pw-cell) / 2),
    var(--pw-cell) var(--pw-cell),
    var(--pw-cell) var(--pw-cell),
    calc(var(--pw-cell) * 5) calc(var(--pw-cell) * 5),
    calc(var(--pw-cell) * 5) calc(var(--pw-cell) * 5);
  mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, #000 35%, transparent 100%);
}

@media (max-width: 576px) {
  .pixel-wall-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .pixel-wall-quote {
    white-space: normal;
    font-size: 0.88rem;
  }

  .pixel-wall {
    width: 100%;
  }

  .pixel-block.is-active:hover {
    transform: none;
  }
}

.pixel-block {
  position: absolute;
  display: block;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(18, 32, 42, 0.08);
  z-index: 2;
  cursor: pointer;
  transition: outline 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  background-color: #0f766e;
}

.pixel-wall-wrap[data-mode="select"] .pixel-block {
  pointer-events: none;
}

.pixel-block.is-active:hover {
  outline: 2px solid rgba(15, 143, 123, 0.95);
  outline-offset: -1px;
  /* Keep stack order: do not jump above newer overlapping blocks. */
  filter: brightness(1.1) saturate(1.05);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    0 0 0 1px rgba(15, 143, 123, 0.35);
}

.pixel-block.is-pending {
  cursor: not-allowed;
  opacity: 0.85;
}

.pixel-selection {
  position: absolute;
  z-index: 10000;
  pointer-events: none;
  border: 2px solid rgba(90, 230, 200, 0.95);
  background: rgba(15, 143, 123, 0.22);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35) inset,
    0 0 18px rgba(15, 143, 123, 0.35);
  border-radius: 3px;
}

.pixel-selection.has-preview {
  background-color: transparent;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.pw-editor-canvas-wrap {
  border: 1px solid var(--sg-line);
  border-radius: var(--sg-radius);
  background:
    linear-gradient(135deg, rgba(15, 143, 123, 0.08), transparent 55%),
    #e8eef0;
  overflow: hidden;
  max-width: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.pw-editor-canvas-wrap canvas {
  display: block;
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.list-group-item {
  border-color: var(--sg-line) !important;
  background: var(--sg-surface-solid);
}

.list-group-item-action:hover {
  background: var(--sg-accent-soft);
}

.table {
  --bs-table-bg: transparent;
}

.table > :not(caption) > * > * {
  border-bottom-color: var(--sg-line);
}

.table thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sg-muted);
  font-weight: 700;
}

.form-control,
.form-select {
  border-radius: var(--sg-radius-sm);
  border-color: rgba(18, 32, 42, 0.16);
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.9);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--sg-accent);
  box-shadow: 0 0 0 0.2rem var(--sg-accent-soft);
}

.btn {
  border-radius: 999px;
  font-weight: 700;
  padding: 0.55rem 1.15rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--sg-accent);
  --bs-btn-border-color: var(--sg-accent);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--sg-accent-deep);
  --bs-btn-hover-border-color: var(--sg-accent-deep);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--sg-accent-deep);
  --bs-btn-active-border-color: var(--sg-accent-deep);
  background-color: var(--sg-accent) !important;
  border-color: var(--sg-accent) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(15, 143, 123, 0.25);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--sg-accent-deep) !important;
  border-color: var(--sg-accent-deep) !important;
  color: #fff !important;
}

.btn-outline-primary {
  --bs-btn-color: var(--sg-accent-deep);
  --bs-btn-border-color: var(--sg-accent);
  --bs-btn-hover-bg: var(--sg-accent);
  --bs-btn-hover-border-color: var(--sg-accent);
}

.btn-outline-secondary,
.btn-outline-light {
  --bs-btn-color: var(--sg-ink);
  --bs-btn-border-color: rgba(18, 32, 42, 0.2);
  --bs-btn-hover-bg: var(--sg-ink);
  --bs-btn-hover-border-color: var(--sg-ink);
  --bs-btn-hover-color: #fff;
}

.btn-sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
}

.alert {
  border: none;
  border-radius: var(--sg-radius-sm);
  border-left: 4px solid transparent;
}

.alert-success {
  background: rgba(31, 138, 76, 0.12);
  color: #145c33;
  border-left-color: var(--sg-success);
}

.alert-danger {
  background: rgba(192, 57, 43, 0.12);
  color: #8a241b;
  border-left-color: var(--sg-danger);
}

.alert-warning {
  background: rgba(196, 122, 26, 0.14);
  color: #7a4a0d;
  border-left-color: var(--sg-warn);
}

.alert-info {
  background: var(--sg-accent-soft);
  color: var(--sg-accent-deep);
  border-left-color: var(--sg-accent);
}

.badge {
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge.bg-success { background: var(--sg-success) !important; }
.badge.bg-primary { background: var(--sg-accent) !important; }
.badge.bg-warning { background: #e8b15a !important; }

.sg-empty {
  color: var(--sg-muted);
  padding: 1.5rem;
  text-align: center;
  border: 1px dashed var(--sg-line);
  border-radius: var(--sg-radius);
  background: rgba(255, 255, 255, 0.5);
}

@keyframes sg-hero-in {
  from { opacity: 0; transform: translateY(12px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

@keyframes sg-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes sg-float {
  0%, 100% { transform: rotate(18deg) translateY(0); }
  50% { transform: rotate(18deg) translateY(-12px); }
}

@keyframes sg-hero-card-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 767.98px) {
  .sg-section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .sg-nav .nav-link {
    margin: 0.15rem 0;
  }
}

/* ── Account workspace ─────────────────────────────── */

.sg-ws-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.sg-ws-eyebrow {
  margin: 0 0 0.35rem;
  font-size: var(--sg-text-xs);
  font-weight: 700;
  letter-spacing: var(--sg-track-wide);
  text-transform: uppercase;
  color: var(--sg-accent-deep);
}

.sg-ws-hero h1 {
  margin: 0 0 0.4rem;
  font-family: var(--sg-display);
  font-size: clamp(1.6rem, 3vw, var(--sg-text-2xl));
  font-weight: 800;
  letter-spacing: var(--sg-track-tight);
  line-height: var(--sg-lh-tight);
}

.sg-ws-lead {
  margin: 0;
  color: var(--sg-muted);
  max-width: 42rem;
  font-size: var(--sg-text-md);
  line-height: var(--sg-lh-body);
}

.sg-ws-layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.sg-ws-sidebar {
  background: #fff;
  border: 1px solid var(--sg-line);
  border-radius: 18px;
  box-shadow: var(--sg-shadow);
  padding: 1.15rem 1rem;
}

.sg-ws-profile {
  text-align: center;
  padding: 0.35rem 0.5rem 1rem;
  border-bottom: 1px solid var(--sg-line);
  margin-bottom: 0.85rem;
}

.sg-ws-avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--sg-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: #fff;
  background: linear-gradient(135deg, #1d9b86, #0a6b5c);
}

.sg-ws-profile-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.sg-ws-profile-email {
  font-size: 0.8rem;
  color: var(--sg-muted);
  word-break: break-all;
  margin-top: 0.15rem;
}

.sg-ws-badge {
  display: inline-block;
  margin-top: 0.55rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(18, 32, 42, 0.06);
  color: var(--sg-muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sg-ws-balance-chip {
  margin-top: 0.85rem;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  background: var(--sg-accent-soft);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.82rem;
}

.sg-ws-balance-chip strong {
  color: var(--sg-accent-deep);
  font-family: var(--sg-display);
}

.sg-ws-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sg-ws-nav a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--sg-ink);
  font-weight: 600;
  font-size: 0.92rem;
}

.sg-ws-nav a i {
  color: var(--sg-muted);
  width: 1.1rem;
  text-align: center;
}

.sg-ws-nav a:hover {
  background: rgba(15, 143, 123, 0.08);
  color: var(--sg-ink);
}

.sg-ws-nav a.active {
  background: rgba(15, 143, 123, 0.14);
  color: var(--sg-accent-deep);
}

.sg-ws-nav a.active i {
  color: var(--sg-accent-deep);
}

.sg-ws-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sg-ws-panel {
  background: #fff;
  border: 1px solid var(--sg-line);
  border-radius: 18px;
  box-shadow: var(--sg-shadow);
  padding: 1.15rem 1.25rem;
}

.sg-ws-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.sg-ws-panel-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-family: var(--sg-display);
  font-weight: 700;
}

.sg-ws-panel-head p {
  margin: 0.2rem 0 0;
  color: var(--sg-muted);
  font-size: 0.9rem;
}

.sg-ws-empty {
  padding: 0.95rem 1rem;
  border-radius: 12px;
  background: rgba(15, 143, 123, 0.07);
  color: var(--sg-muted);
  font-size: 0.92rem;
}

.sg-ws-empty a {
  color: var(--sg-accent-deep);
  font-weight: 600;
}

.sg-ws-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sg-ws-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--sg-line);
}

.sg-ws-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sg-ws-list-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.sg-ws-status {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(18, 32, 42, 0.06);
  color: var(--sg-muted);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.sg-ws-product {
  height: 100%;
  padding: 1rem;
  border: 1px solid var(--sg-line);
  border-radius: 14px;
  background: #fbfcfc;
}

.sg-nav-user {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  color: var(--sg-ink);
  text-decoration: none;
}

.sg-nav-user:hover {
  color: var(--sg-accent-deep);
}

.sg-nav-balance {
  font-family: var(--sg-display);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--sg-accent-deep);
  background: var(--sg-accent-soft);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}

.sg-nav-name {
  font-weight: 600;
}

@media (max-width: 991.98px) {
  .sg-ws-layout {
    grid-template-columns: 1fr;
  }
}

/* ── Company create form ───────────────────────────── */

.sg-company-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 820px;
}

.sg-company-form-panel {
  padding: 1.35rem 1.4rem 1.45rem;
}

.sg-company-form-section-head {
  margin-bottom: 1.15rem;
}

.sg-company-form-section-head h2 {
  margin: 0;
  font-family: var(--sg-display);
  font-size: var(--sg-text-xl);
  font-weight: 700;
  letter-spacing: var(--sg-track-tight);
  line-height: var(--sg-lh-snug);
}

.sg-company-form-section-head p {
  margin: 0.3rem 0 0;
  color: var(--sg-muted);
  font-size: var(--sg-text-sm);
  line-height: var(--sg-lh-body);
}

.sg-company-form-subsection {
  margin-top: 0.35rem;
  padding-top: 1rem;
  border-top: 1px solid var(--sg-line);
}

.sg-company-form-subsection h3 {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.sg-cat-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sg-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--sg-line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.sg-cat-chip:hover {
  border-color: rgba(15, 143, 123, 0.45);
}

.sg-cat-chip:has(input:checked) {
  border-color: var(--sg-accent);
  background: var(--sg-accent-soft);
  color: var(--sg-accent-deep);
}

.sg-cat-chip input {
  margin: 0;
}

.sg-company-form-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem;
  padding: 0.25rem 0.15rem 0.5rem;
}

.sg-company-form-note {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--sg-muted);
  font-size: 0.88rem;
  max-width: 28rem;
}

.sg-company-form-note i {
  color: var(--sg-accent-deep);
  font-size: 1.05rem;
}

.sg-company-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--sg-line);
  background: #fff;
  flex-shrink: 0;
}

/* —— Ads —— */
.sg-ad-slot {
  width: 100%;
}

.sg-ad-banner {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--sg-line);
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.sg-ad-banner img {
  display: block;
  width: 100%;
  max-height: 140px;
  object-fit: cover;
}

.sg-fixed-ad {
  position: relative;
  z-index: 1040;
  width: min(960px, calc(100% - 1.5rem));
  margin-inline: auto;
  background: transparent;
  text-align: center;
}

.sg-fixed-ad-top {
  position: sticky;
  top: 0.5rem;
}

.sg-fixed-ad-bottom {
  position: fixed;
  bottom: 0.75rem;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.sg-fixed-ad a {
  display: block;
  line-height: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.28);
}

.sg-fixed-ad img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 72px;
  object-fit: contain;
  object-position: center;
}

.sg-fixed-ad-close {
  position: absolute;
  right: 0.4rem;
  top: 0.4rem;
  z-index: 1;
  border: 0;
  background: rgba(15, 23, 42, 0.65);
  color: #fff;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  line-height: 1;
  font-size: 1.1rem;
}

body.has-sg-fixed-bottom {
  padding-bottom: 88px;
}

.sg-ad-popup {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: grid;
  place-items: center;
}

.sg-ad-popup[hidden] {
  display: none !important;
}

.sg-ad-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.sg-ad-popup-dialog {
  position: relative;
  z-index: 1;
  max-width: min(520px, calc(100vw - 2rem));
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.sg-ad-popup-dialog img {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: #f8fafc;
}

.sg-ad-popup-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  border: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
}

@media (max-width: 575.98px) {
  .sg-company-form-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .sg-fixed-ad {
    width: min(960px, calc(100% - 1rem));
  }

  .sg-fixed-ad img {
    max-height: 56px;
  }

  body.has-sg-fixed-bottom {
    padding-bottom: 72px;
  }
}
