:root {
  --mg-brown: #1c1410;
  --mg-brown-soft: #2a211c;
  --mg-gold: #c6a15b;
  --mg-gold-light: #e0c58a;
  --mg-cream: #f7f3ec;
  --mg-ink: #2b241f;
  --mg-muted: #6f655c;
  --mg-line: rgba(198, 161, 91, 0.35);
  --mg-serif: "Cormorant Garamond", Georgia, serif;
  --mg-sans: "Manrope", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--mg-sans);
  color: var(--mg-ink);
  background:
    radial-gradient(circle at top right, rgba(198, 161, 91, 0.12), transparent 40%),
    linear-gradient(180deg, #fbf8f2 0%, var(--mg-cream) 45%, #efe8dc 100%);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.mg-serif {
  font-family: var(--mg-serif);
}

.mg-navbar {
  background: rgba(28, 20, 16, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--mg-line);
}

.mg-navbar .nav-link {
  color: rgba(247, 243, 236, 0.82) !important;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.55rem 0.8rem !important;
}

.mg-navbar .nav-link:hover,
.mg-navbar .nav-link.active {
  color: var(--mg-gold-light) !important;
}

.mg-brand-mark {
  height: 48px;
  width: auto;
}

.mg-btn-gold {
  background: linear-gradient(135deg, var(--mg-gold), #a9853f);
  border: none;
  color: #1c1410;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.mg-btn-gold:hover {
  color: #1c1410;
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(166, 129, 55, 0.28);
}

.mg-btn-outline {
  border: 1px solid var(--mg-gold);
  color: var(--mg-gold-light);
  background: transparent;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
}

.mg-btn-outline:hover {
  background: rgba(198, 161, 91, 0.12);
  color: #fff;
}

.mg-hero {
  position: relative;
  min-height: clamp(540px, 88vh, 760px);
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--mg-cream);
  background:
    linear-gradient(120deg, rgba(16, 11, 8, 0.88), rgba(28, 20, 16, 0.72)),
    url("/images/logo_1.png") center / cover no-repeat;
}

.mg-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 120px;
  background: linear-gradient(to top, var(--mg-cream), transparent);
}

.mg-hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  animation: mgRise 0.9s ease both;
}

.mg-kicker {
  color: var(--mg-gold);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.mg-hero h1 {
  font-family: var(--mg-serif);
  font-weight: 600;
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  line-height: 0.95;
  margin-bottom: 1rem;
}

.mg-hero p {
  font-size: 1.05rem;
  color: rgba(247, 243, 236, 0.84);
  max-width: 34rem;
}

.mg-section {
  padding: 4.5rem 0;
}

.mg-section-title {
  font-family: var(--mg-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.5rem;
}

.mg-section-lead {
  color: var(--mg-muted);
  max-width: 36rem;
}

.mg-cat-link {
  display: block;
  padding: 1.4rem 1.2rem;
  border-top: 1px solid rgba(43, 36, 31, 0.12);
  border-bottom: 1px solid rgba(43, 36, 31, 0.12);
  transition: background 0.25s ease, transform 0.25s ease, color 0.25s ease;
}

.mg-cat-link:hover {
  background: rgba(198, 161, 91, 0.1);
  transform: translateY(-2px);
  color: var(--mg-brown);
}

.mg-cat-link strong {
  display: block;
  font-family: var(--mg-serif);
  font-size: 1.55rem;
  color: #8f6d32;
}

.mg-cat-link span {
  color: var(--mg-muted);
  font-size: 0.92rem;
}

.mg-footer {
  background: var(--mg-brown);
  color: rgba(247, 243, 236, 0.78);
  padding: 2.5rem 0;
  border-top: 1px solid var(--mg-line);
}

.mg-auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background:
    linear-gradient(145deg, rgba(28, 20, 16, 0.92), rgba(28, 20, 16, 0.78)),
    url("/images/logo_1.png") center / cover no-repeat;
}

.mg-auth-panel {
  width: min(100%, 440px);
  background: rgba(247, 243, 236, 0.96);
  border: 1px solid rgba(198, 161, 91, 0.35);
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  animation: mgRise 0.7s ease both;
}

.mg-auth-panel h1 {
  font-family: var(--mg-serif);
  font-size: 2rem;
}

.mg-panel-shell {
  min-height: 100vh;
  background: #f4efe7;
}

.mg-panel-sidebar {
  background: var(--mg-brown);
  color: var(--mg-cream);
  min-height: 100vh;
  border-right: 1px solid var(--mg-line);
}

.mg-panel-nav .nav-link {
  color: rgba(247, 243, 236, 0.78);
  border-radius: 0.7rem;
  margin-bottom: 0.15rem;
  padding: 0.45rem 0.75rem;
  display: block;
  text-decoration: none;
}

.mg-panel-nav .nav-link:hover,
.mg-panel-nav .nav-link.active {
  background: rgba(198, 161, 91, 0.16);
  color: var(--mg-gold-light);
}

.mg-nav-group {
  margin: 0.55rem 0 0.2rem;
}

.mg-nav-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: transparent;
  border: 0;
  color: #c6a15b;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45rem 0.65rem;
  border-radius: 0.55rem;
  cursor: pointer;
}

.mg-nav-toggle::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  opacity: 0.85;
}

.mg-nav-toggle[aria-expanded="true"]::after {
  transform: rotate(-135deg);
  margin-top: 0.2rem;
}

.mg-nav-toggle:hover {
  background: rgba(198, 161, 91, 0.1);
  color: var(--mg-gold-light);
}

.mg-nav-group .collapse .nav-link {
  padding-left: 1rem;
  font-size: 0.92rem;
}

.mg-panel-sidebar .nav-link {
  color: rgba(247, 243, 236, 0.78);
  border-radius: 0.7rem;
  margin-bottom: 0.25rem;
}

.mg-panel-sidebar .nav-link:hover,
.mg-panel-sidebar .nav-link.active {
  background: rgba(198, 161, 91, 0.16);
  color: var(--mg-gold-light);
}

.mg-stat {
  background: #fff;
  border: 1px solid rgba(43, 36, 31, 0.08);
  border-radius: 1rem;
  padding: 1.25rem 1.4rem;
  height: 100%;
}

.mg-stat .label {
  color: var(--mg-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mg-stat .value {
  font-family: var(--mg-serif);
  font-size: 2rem;
  color: var(--mg-brown);
}

.mg-stat .hint {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #6b5a45;
}

.mg-stat-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.mg-stat-link:hover {
  transform: translateY(-3px);
  border-color: rgba(198, 161, 91, 0.55);
  box-shadow: 0 12px 24px rgba(28, 20, 16, 0.08);
  color: inherit;
}

.mg-stat-accent {
  background: linear-gradient(165deg, #1c1410 0%, #3a2a1c 100%);
  border-color: rgba(198, 161, 91, 0.35);
}

.mg-stat-accent .label,
.mg-stat-accent .hint {
  color: #c6a15b;
}

.mg-stat-accent .value {
  color: #fffdf8;
}

.mg-table-wrap {
  background: #fff;
  border: 1px solid rgba(43, 36, 31, 0.08);
  border-radius: 1rem;
  overflow: hidden;
}

.mg-listing {
  display: block;
  background: #fff;
  border: 1px solid rgba(43, 36, 31, 0.08);
  border-radius: 1.1rem;
  overflow: hidden;
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mg-listing:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(28, 20, 16, 0.12);
  color: inherit;
}

.mg-listing-media,
.mg-listing-media-lg {
  position: relative;
  aspect-ratio: 4 / 5;
  background:
    linear-gradient(160deg, rgba(28, 20, 16, 0.15), rgba(28, 20, 16, 0.55)),
    linear-gradient(145deg, #2a211c, #1c1410);
}

.mg-listing-media-lg {
  aspect-ratio: 16 / 11;
  border-radius: 1.1rem;
  overflow: hidden;
}

.mg-listing-badge {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  color: var(--mg-gold-light);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mg-listing-body {
  padding: 1.1rem 1.2rem 1.3rem;
}

.mg-listing-body h3 {
  font-family: var(--mg-serif);
  font-size: 1.35rem;
  margin: 0 0 0.35rem;
}

.mg-listing-price {
  color: #8f6d32;
  font-weight: 700;
}

.mg-name-brand {
  color: #8f6d32;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mg-name-unit {
  color: #1c1410;
  font-weight: 700;
}

.mg-name-preview {
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(198, 161, 91, 0.08);
  border: 1px solid rgba(198, 161, 91, 0.25);
  font-size: 1.15rem;
  font-family: var(--mg-serif);
}


.mg-advisor-card {
  display: block;
  height: 100%;
  padding: 1.15rem 1.25rem;
  border-radius: 1rem;
  background: linear-gradient(165deg, #fffdf8 0%, #f7f1e6 100%);
  border: 1px solid rgba(143, 109, 50, 0.18);
  color: inherit;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.mg-advisor-card:hover {
  transform: translateY(-3px);
  border-color: rgba(198, 161, 91, 0.55);
  box-shadow: 0 14px 28px rgba(28, 20, 16, 0.08);
  color: inherit;
}

.mg-advisor-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #1c1410;
  color: #c6a15b;
  font-weight: 700;
  font-size: 0.95rem;
}

.mg-advisor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mg-advisor-avatar-lg {
  width: 112px;
  height: 112px;
  font-size: 1.75rem;
}

.mg-ext-links {
  padding: 1.1rem 1.25rem;
  border-radius: 1rem;
  background: linear-gradient(165deg, #fffdf8 0%, #f7f1e6 100%);
  border: 1px solid rgba(143, 109, 50, 0.18);
}

.mg-ext-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: 0.65rem;
  background: #1c1410;
  color: #c6a15b;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.mg-ext-link:hover {
  background: #8f6d32;
  color: #fffdf8;
  transform: translateY(-1px);
}

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

@media (max-width: 991.98px) {
  .mg-panel-sidebar {
    min-height: auto;
  }

  .mg-hero {
    min-height: 78vh;
  }
}
