/* Dark Gold — royal gold + near-black (envato/v6) */
:root {
  --rg-bg: #121008;
  --rg-surface: #1e1a0f;
  --rg-surface-alt: #2a2412;
  --rg-gold: #c9a227;
  --rg-gold-light: #e4c767;
  --rg-gold-dark: #8a6d1b;
  --rg-text: #f5e9c8;
  --rg-text-muted: #a9986b;
  --rg-border: #3a331e;
  --rg-danger: #b5442e;
  --rg-success: #7a8a3a;
  --rg-gold-10: rgba(201, 162, 39, 0.1);
  --rg-gold-20: rgba(201, 162, 39, 0.2);
  --rg-gold-30: rgba(201, 162, 39, 0.3);
  --rg-gold-50: rgba(201, 162, 39, 0.5);
}

html,
body,
.page,
.page__canvas,
.content-main,
.box--no-padding {
  background-color: var(--rg-bg) !important;
  color: var(--rg-text) !important;
}

a,
.t-link,
.e-icon {
  color: var(--rg-gold) !important;
}

a:hover,
.t-link:hover {
  color: var(--rg-gold-light) !important;
}

/* ThemeForest green → royal gold */
.-color-themeforest,
.off-canvas-left__current-site.-color-themeforest,
.off-canvas-left__current-site-toggle.-color-themeforest,
.site-header__sites .-color-themeforest,
[class*="-color-themeforest"] {
  background-color: var(--rg-gold) !important;
  background: var(--rg-gold) !important;
  color: var(--rg-bg) !important;
  border-color: var(--rg-gold-dark) !important;
}

/* Envato greens */
.t-button--primary,
.t-button.-color-green,
.btn-primary,
.button--primary,
.purchase-form__submit,
.purchase-button,
.js-purchase-button,
.btn-icon--cart,
[class*="purchase"] .t-button,
.live-preview,
.live-preview-btn--blue .live-preview,
.item-header__actions .t-button,
.header-search__submit {
  background: linear-gradient(
    135deg,
    var(--rg-gold-dark) 0%,
    var(--rg-gold) 50%,
    var(--rg-gold-light) 100%
  ) !important;
  background-color: var(--rg-gold) !important;
  color: var(--rg-bg) !important;
  border-color: var(--rg-gold-dark) !important;
}

.t-button--primary:hover,
.live-preview:hover,
.live-preview:focus,
.live-preview-btn--blue .live-preview:hover,
.live-preview-btn--blue .live-preview:focus,
.purchase-form__submit:hover,
.js-purchase-button:hover {
  background: linear-gradient(
    135deg,
    var(--rg-gold) 0%,
    var(--rg-gold-light) 100%
  ) !important;
  background-color: var(--rg-gold-light) !important;
  color: var(--rg-bg) !important;
}

/* Envato blues / links */
.t-button--secondary,
.t-link--blue,
a.t-link.-color-blue,
.pagination a:hover,
.tabs__item.is-active,
.page-tabs a.is-active,
.nav-tabs .active > a {
  color: var(--rg-gold) !important;
  border-color: var(--rg-gold) !important;
}

/* Surfaces */
.site-header,
.global-header,
.context-header,
.site-header__sites,
.site-header__categories,
.off-canvas-left,
.off-canvas-left__top,
.footer,
.page-footer,
.sidebar,
.aside,
.box,
.panel,
.item-preview,
.purchase-panel,
.user-nav,
.dropdown-menu,
.modal,
.popup {
  background-color: var(--rg-surface) !important;
  background: var(--rg-surface) !important;
  color: var(--rg-text) !important;
  border-color: var(--rg-border) !important;
}

.site-header,
.global-header,
.context-header {
  background: linear-gradient(
    180deg,
    var(--rg-surface) 0%,
    var(--rg-bg) 100%
  ) !important;
  border-bottom: 1px solid var(--rg-border) !important;
}

/* Text hierarchy */
h1,
h2,
h3,
h4,
h5,
h6,
.item-header__title,
.heading {
  color: var(--rg-gold-light) !important;
}

p,
li,
td,
.label,
.meta,
.t-body,
.item-header__subtitle {
  color: var(--rg-text) !important;
}

.t-body--muted,
.meta,
.aside .h-text-secondary,
.text-muted {
  color: var(--rg-text-muted) !important;
}

/* Borders / dividers */
hr,
.border,
.box,
.table th,
.table td,
.item-header,
.page-tabs,
.sidebar__section {
  border-color: var(--rg-border) !important;
}

/* Tables */
table,
.responsive-table table {
  background-color: var(--rg-surface) !important;
  color: var(--rg-text) !important;
}

table th,
.responsive-table th {
  background: linear-gradient(
    135deg,
    var(--rg-surface-alt),
    var(--rg-bg)
  ) !important;
  color: var(--rg-gold-light) !important;
  border-color: var(--rg-border) !important;
}

table td,
.responsive-table td {
  border-color: var(--rg-border) !important;
  color: var(--rg-text) !important;
}

/* Success / warning (desaturated in-family) */
.text-success,
.status-active,
[style*="#4caf50"] {
  color: var(--rg-success) !important;
}

.text-danger,
.error {
  color: var(--rg-danger) !important;
}

/* Forms */
input,
textarea,
select,
.form-control {
  background-color: var(--rg-surface-alt) !important;
  color: var(--rg-text) !important;
  border-color: var(--rg-border) !important;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--rg-gold) !important;
  outline-color: var(--rg-gold) !important;
  box-shadow: 0 0 0 2px var(--rg-gold-20) !important;
}

/* Override common Envato hard greens/blues via attribute filters where possible */
[style*="background-color: #82b541"],
[style*="background-color:#82b541"],
[style*="background: #82b541"],
[style*="background:#82b541"] {
  background-color: var(--rg-gold) !important;
  background: var(--rg-gold) !important;
}

/* Soft gold glow utility replacements */
.efek-goyang-kilau img {
  box-shadow:
    0 0 10px var(--rg-gold-30),
    0 0 20px var(--rg-gold-20),
    0 0 30px var(--rg-gold-10) !important;
}

.login,
.login-button {
  background: linear-gradient(
    to bottom,
    var(--rg-gold) 0%,
    var(--rg-gold-dark) 50%,
    #5c4810 100%
  ) !important;
  border-color: var(--rg-gold-dark) !important;
  color: var(--rg-text) !important;
}

.register,
.register-button {
  background: linear-gradient(
    to bottom,
    var(--rg-surface-alt) 0%,
    var(--rg-surface) 50%,
    var(--rg-bg) 100%
  ) !important;
  border: 1px solid var(--rg-gold) !important;
  color: var(--rg-gold) !important;
}

.login:hover {
  background: linear-gradient(
    to bottom,
    var(--rg-gold-light) 0%,
    var(--rg-gold) 50%,
    var(--rg-gold-dark) 100%
  ) !important;
}

.register:hover {
  border-color: var(--rg-gold-light) !important;
  color: var(--rg-gold-light) !important;
}

/* marketplace-glyphs font is missing locally; PUA icons render as empty boxes */
.breadcrumbs a:after {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif !important;
  content: "\203a" !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--rg-gold) !important;
  margin: 0 6px 0 8px;
  width: auto;
}

.e-icon.-icon-star:before,
.e-icon.-icon-star-full:before {
  font-family: "Segoe UI Symbol", "Segoe UI", Arial, sans-serif !important;
  content: "\2605" !important;
  color: var(--rg-gold) !important;
}

.e-icon.-icon-star-empty:before {
  font-family: "Segoe UI Symbol", "Segoe UI", Arial, sans-serif !important;
  content: "\2606" !important;
  color: var(--rg-gold) !important;
}

.e-icon.-icon-search {
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

.e-icon.-icon-search:before {
  content: "" !important;
  display: block;
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
