/**
 * Shopify Dashboard — Trust Green
 * Soft pearl surfaces · Shopify #008060 · airy glass
 */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap");

:root,
[data-bs-theme="light"] {
  --sd-ink: #202223;
  --sd-ink-soft: #303030;
  --sd-fog: #f6f6f7;
  --sd-fog-2: #ebebec;
  --sd-surface: rgba(255, 255, 255, 0.9);
  --sd-green: #008060;
  --sd-green-deep: #004c3f;
  --sd-green-bright: #00a47c;
  --sd-lime: #95bf47;
  --sd-sky: #2c6ecb;
  --sd-amber: #b98900;
  --sd-radius: 1.25rem;
  --sd-radius-sm: 0.85rem;
  --sd-shadow: 0 8px 28px rgba(32, 34, 35, 0.06);
  --sd-shadow-hover: 0 14px 36px rgba(0, 128, 96, 0.14);

  --bs-primary: #008060;
  --bs-primary-rgb: 0, 128, 96;
  --bs-secondary: #6d7175;
  --bs-secondary-rgb: 109, 113, 117;
  --bs-success: #008060;
  --bs-success-rgb: 0, 128, 96;
  --bs-info: #2c6ecb;
  --bs-info-rgb: 44, 110, 203;
  --bs-warning: #b98900;
  --bs-warning-rgb: 185, 137, 0;
  --bs-danger: #d72c0d;
  --bs-danger-rgb: 215, 44, 13;
  --bs-body-bg: var(--sd-fog);
  --bs-body-color: #202223;
  --bs-border-color: rgba(32, 34, 35, 0.1);
  --bs-link-color: #008060;
  --bs-link-hover-color: #004c3f;
  --bs-font-sans-serif: "Plus Jakarta Sans", system-ui, sans-serif;
  --bs-body-font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  --bs-heading-font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}

[data-bs-theme="dark"] {
  --sd-fog: #1a1c1d;
  --sd-fog-2: #202223;
  --sd-surface: rgba(32, 34, 35, 0.92);
  --bs-body-bg: #1a1c1d;
  --bs-body-color: #e3e5e7;
  --bs-border-color: rgba(255, 255, 255, 0.1);
  --bs-primary: #00a47c;
  --bs-primary-rgb: 0, 164, 124;
}

html {
  font-family: var(--bs-font-sans-serif);
}

body {
  background:
    radial-gradient(ellipse 70% 45% at 8% -8%, rgba(0, 128, 96, 0.1), transparent 55%),
    radial-gradient(ellipse 50% 35% at 95% 5%, rgba(149, 191, 71, 0.1), transparent 50%),
    linear-gradient(180deg, #fafafa 0%, #f1f2f3 100%);
  background-attachment: fixed;
  color: var(--bs-body-color);
}

h1, h2, h3, h4, h5, h6,
.card-title,
.kpi-value {
  font-family: var(--bs-heading-font-family);
  letter-spacing: -0.025em;
  font-weight: 700;
}

html[data-menu-color="dark"] .main-nav,
html[data-bs-theme="dark"] .main-nav {
  background:
    linear-gradient(180deg, #1a1c1d 0%, #202223 45%, #004c3f 160%) !important;
  border-right: none !important;
  box-shadow: 6px 0 24px rgba(32, 34, 35, 0.12);
}

.main-nav .logo-box {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.main-nav .navbar-nav .nav-link {
  border-radius: 0.75rem;
  margin: 0.18rem 0.7rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.main-nav .navbar-nav .nav-link:hover,
.main-nav .navbar-nav .nav-link.active {
  background: rgba(0, 164, 124, 0.18) !important;
  color: #8ce0c8 !important;
}

.main-nav .navbar-nav .nav-link .nav-icon {
  color: #8c9196;
}

.main-nav .navbar-nav .nav-link:hover .nav-icon,
.main-nav .navbar-nav .nav-link.active .nav-icon {
  color: #00a47c;
}

.main-nav .menu-title {
  color: #6d7175 !important;
  letter-spacing: 0.08em;
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 650;
}

.topbar {
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(32, 34, 35, 0.08);
  box-shadow: none;
}

[data-bs-theme="dark"] .topbar {
  background: rgba(26, 28, 29, 0.9) !important;
}

.topbar .topbar-button {
  border-radius: 0.65rem;
}

.topbar .topbar-button:hover {
  background: rgba(0, 128, 96, 0.1);
  color: #008060;
}

.page-content {
  padding-top: 1.35rem;
}

.card {
  border: 1px solid rgba(32, 34, 35, 0.08);
  border-radius: var(--sd-radius);
  box-shadow: var(--sd-shadow);
  background: var(--sd-surface);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.card:hover {
  box-shadow: var(--sd-shadow-hover);
  transform: translateY(-2px);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid rgba(32, 34, 35, 0.08);
  border-radius: var(--sd-radius) var(--sd-radius) 0 0;
}

.card-title {
  color: var(--sd-ink);
  font-weight: 700;
}

.btn {
  border-radius: 0.7rem;
  font-weight: 650;
  border-width: 0;
  letter-spacing: 0.01em;
}

.btn-primary {
  --bs-btn-bg: #008060;
  --bs-btn-border-color: #008060;
  --bs-btn-hover-bg: #004c3f;
  --bs-btn-hover-border-color: #004c3f;
  box-shadow: 0 8px 20px rgba(0, 128, 96, 0.28);
}

.btn-success {
  --bs-btn-bg: #008060;
  --bs-btn-border-color: #008060;
  --bs-btn-hover-bg: #004c3f;
  box-shadow: 0 8px 18px rgba(0, 128, 96, 0.25);
}

.btn-warning {
  --bs-btn-color: #fff;
  --bs-btn-bg: #b98900;
  --bs-btn-border-color: #b98900;
  --bs-btn-hover-bg: #9a7200;
  --bs-btn-hover-color: #fff;
  box-shadow: 0 8px 18px rgba(185, 137, 0, 0.25);
}

.btn-soft-primary {
  background: rgba(0, 128, 96, 0.12);
  color: #004c3f;
}

.btn-soft-primary:hover {
  background: rgba(0, 128, 96, 0.2);
  color: #004c3f;
}

.btn-outline-primary {
  --bs-btn-color: #008060;
  --bs-btn-border-color: rgba(0, 128, 96, 0.4);
  --bs-btn-border-width: 1.5px;
  --bs-btn-hover-bg: #008060;
  --bs-btn-hover-border-color: #008060;
  border-width: 1.5px;
}

.form-control,
.form-select {
  border-radius: 0.7rem;
  border: 1px solid rgba(32, 34, 35, 0.14);
  background: #fff;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(0, 128, 96, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 128, 96, 0.16);
}

.alert {
  border: none;
  border-radius: var(--sd-radius-sm);
  box-shadow: 0 6px 18px rgba(32, 34, 35, 0.05);
}

.alert-info {
  background: rgba(44, 110, 203, 0.1);
  color: #1a3f7a;
}

.alert-success {
  background: rgba(0, 128, 96, 0.12);
  color: #004c3f;
}

.alert-warning {
  background: rgba(185, 137, 0, 0.12);
  color: #6b5000;
}

.alert-danger {
  background: rgba(215, 44, 13, 0.1);
  color: #8a1c08;
}

.table thead th {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6d7175;
  font-weight: 700;
  background: #f6f6f7;
  border-bottom: none !important;
}

.table-hover > tbody > tr:hover > * {
  --bs-table-bg-state: rgba(0, 128, 96, 0.05);
}

.badge {
  border-radius: 0.4rem;
  font-weight: 650;
  border: none;
}

.bg-primary:not(.bg-opacity-10):not(.bg-opacity-25):not(.bg-opacity-50) {
  background-color: #008060 !important;
}
.bg-success:not(.bg-opacity-10):not(.bg-opacity-25):not(.bg-opacity-50) {
  background-color: #008060 !important;
}
.bg-warning:not(.bg-opacity-10):not(.bg-opacity-25):not(.bg-opacity-50) {
  background-color: #b98900 !important;
}
.bg-info:not(.bg-opacity-10):not(.bg-opacity-25):not(.bg-opacity-50) {
  background-color: #2c6ecb !important;
}

.text-primary { color: #008060 !important; }
.text-success { color: #008060 !important; }
.text-info { color: #2c6ecb !important; }
.text-warning { color: #b98900 !important; }

.sd-hero {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--sd-radius) + 0.15rem);
  padding: 1.5rem 1.65rem;
  margin-bottom: 1.25rem;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.12) 0%, transparent 50%),
    linear-gradient(120deg, #004c3f 0%, #008060 50%, #00a47c 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px rgba(0, 128, 96, 0.22);
  animation: sd-float-in 0.55s ease both;
}

.sd-hero::before {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  right: -30px;
  top: -50px;
  background: rgba(149, 191, 71, 0.2);
  animation: sd-drift 10s ease-in-out infinite;
}

.sd-hero::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  right: 90px;
  bottom: -40px;
  background: rgba(255, 255, 255, 0.1);
}

.sd-hero h4 {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 750;
  position: relative;
  z-index: 1;
}

.sd-hero .sd-hero-sub {
  color: rgba(255, 255, 255, 0.88);
  position: relative;
  z-index: 1;
}

.sd-hero .form-select,
.sd-hero .btn {
  position: relative;
  z-index: 2;
}

.sd-hero .form-select {
  background: #fff;
  border: none;
  border-radius: 0.65rem;
  font-weight: 600;
  color: #202223;
}

.sd-hero .btn-light-hero {
  background: #fff;
  color: #004c3f;
  border: none;
  border-radius: 0.65rem;
  font-weight: 700;
}

.sd-hero .btn-light-hero:hover {
  background: #f1f8f5;
  color: #004c3f;
}

@keyframes sd-float-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes sd-drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-12px, 8px); }
}

.insights-kpi-card {
  border: 1px solid rgba(32, 34, 35, 0.08);
  overflow: hidden;
  animation: sd-float-in 0.5s ease both;
}

.row > .col-md-6:nth-child(1) .insights-kpi-card { animation-delay: 0.04s; }
.row > .col-md-6:nth-child(2) .insights-kpi-card { animation-delay: 0.1s; }
.row > .col-md-6:nth-child(3) .insights-kpi-card { animation-delay: 0.16s; }
.row > .col-md-6:nth-child(4) .insights-kpi-card { animation-delay: 0.22s; }

.insights-kpi-card.kpi-revenue {
  background: linear-gradient(160deg, #fff 0%, #e8f5f1 100%);
  --kpi-accent: #008060;
}

.insights-kpi-card.kpi-sold {
  background: linear-gradient(160deg, #fff 0%, #eaf1fb 100%);
  --kpi-accent: #2c6ecb;
}

.insights-kpi-card.kpi-costs {
  background: linear-gradient(160deg, #fff 0%, #faf4e5 100%);
  --kpi-accent: #b98900;
}

.insights-kpi-card.kpi-margin {
  background: linear-gradient(160deg, #fff 0%, #f3f8e9 100%);
  --kpi-accent: #95bf47;
}

.insights-kpi-card::before {
  display: none;
}

.insights-kpi-card .card-body {
  padding: 1.25rem;
}

.insights-kpi-card .kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: #fff;
  color: var(--kpi-accent, #008060);
  box-shadow: 0 4px 12px rgba(32, 34, 35, 0.08);
}

.insights-kpi-card .apex-charts {
  min-height: 72px;
  margin-top: 0.35rem;
}

.insights-kpi-card .kpi-value {
  font-size: 1.65rem;
  color: var(--sd-ink);
  font-weight: 800;
}

.insights-kpi-label {
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  color: #6d7175 !important;
  font-weight: 700 !important;
}

.insights-kpi-card .kpi-change {
  font-size: 0.78rem;
  padding: 0.22rem 0.55rem;
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.85);
  font-weight: 700;
  border: none;
}

.insights-kpi-card .kpi-change.text-success {
  background: rgba(0, 128, 96, 0.12);
  color: #004c3f !important;
}

.insights-kpi-card .kpi-change.text-danger {
  background: rgba(215, 44, 13, 0.1);
  color: #a8230a !important;
}

.page-content .card .avatar-md {
  border-radius: 0.9rem !important;
  border: none !important;
}

.modal-content {
  border: none;
  border-radius: var(--sd-radius);
  box-shadow: 0 24px 56px rgba(32, 34, 35, 0.16);
}

.modal-header,
.modal-footer {
  border-color: rgba(32, 34, 35, 0.08);
}

.page-link {
  border-radius: 0.5rem !important;
  margin: 0 0.12rem;
  border: none;
  color: #202223;
  font-weight: 650;
}

.page-item.active .page-link {
  background: #008060;
  box-shadow: 0 6px 14px rgba(0, 128, 96, 0.3);
}

.auth-modern {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 65% 40% at 0% 0%, rgba(0, 128, 96, 0.1), transparent 55%),
    radial-gradient(ellipse 50% 35% at 100% 100%, rgba(149, 191, 71, 0.1), transparent 50%),
    #fafafa;
}

.auth-modern .auth-panel {
  max-width: 420px;
}

.auth-modern .auth-side {
  border-radius: 1.5rem;
  overflow: hidden;
  border: none;
  background:
    linear-gradient(155deg, rgba(0, 76, 63, 0.94), rgba(0, 128, 96, 0.88) 50%, rgba(0, 164, 124, 0.82)),
    url("../images/small/img-10.jpg") center/cover;
  box-shadow: 0 24px 48px rgba(0, 128, 96, 0.25);
  position: relative;
}

.auth-modern .auth-side::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(26, 28, 29, 0.35));
}

.auth-modern .auth-side-content {
  position: relative;
  z-index: 1;
  color: #fff;
  padding: 2.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.auth-modern .auth-side-content h3 {
  font-weight: 750;
  font-size: 1.9rem;
  line-height: 1.2;
}

.auth-modern .btn-auth {
  padding: 0.8rem 1.2rem;
  border-radius: 0.7rem;
  box-shadow: 0 10px 24px rgba(0, 128, 96, 0.3);
}

.footer {
  color: #6d7175;
  border-top: 1px solid rgba(32, 34, 35, 0.08);
  background: transparent;
}

.sd-stat-card {
  position: relative;
  overflow: hidden;
}

.sd-stat-card::after {
  content: "";
  position: absolute;
  top: -28px;
  right: -28px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--stat-accent, #008060) 12%, transparent);
  pointer-events: none;
}

.sd-stat-card.sd-stat-teal { --stat-accent: #008060; }
.sd-stat-card.sd-stat-sky { --stat-accent: #2c6ecb; }
.sd-stat-card.sd-stat-emerald { --stat-accent: #95bf47; }
.sd-stat-card.sd-stat-coral,
.sd-stat-card.sd-stat-amber { --stat-accent: #b98900; }
.sd-stat-card.sd-stat-violet { --stat-accent: #2c6ecb; }

@media (max-width: 767.98px) {
  .sd-hero { padding: 1.2rem; }
  .insights-kpi-card .kpi-value { font-size: 1.4rem; }
}
