/* ============================================
   GOLD HOME & LIFE 360 – Base Theme
   ============================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--color-bg-deep);
  color: var(--color-text-primary);
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
  background: var(--color-gold-muted);
  color: var(--color-gold-light);
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--color-border-light);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray);
}

/* Links */
a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--color-gold-light);
}

/* Images */
img, svg {
  max-width: 100%;
  display: block;
}

/* Buttons reset */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* Inputs */
input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Utility classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-gold { color: var(--color-gold); }
.text-muted { color: var(--color-text-muted); }
.text-secondary { color: var(--color-text-secondary); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.text-warning { color: var(--color-warning); }

.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* —— Atmospheric backgrounds —— */
body {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  background-image:
    radial-gradient(ellipse 120% 80% at 100% -20%, rgba(224, 184, 58, 0.1), transparent 50%),
    radial-gradient(ellipse 80% 60% at -10% 100%, rgba(224, 184, 58, 0.06), transparent 45%);
  background-attachment: fixed;
  font-size: var(--text-base);
  line-height: var(--line-height-body);
}
[data-theme="light"] body {
  background-image:
    radial-gradient(ellipse 120% 80% at 100% -20%, rgba(212, 175, 55, 0.14), transparent 50%),
    radial-gradient(ellipse 80% 60% at -10% 100%, rgba(180, 140, 40, 0.08), transparent 45%),
    linear-gradient(180deg, #f7f5f0 0%, #efeae0 100%);
}

.app {
  background: transparent;
}

.sidebar {
  background: linear-gradient(180deg, rgba(12,12,14,0.96), rgba(18,18,22,0.98));
  backdrop-filter: blur(12px);
}
[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, rgba(255,253,248,0.95), rgba(250,246,238,0.98));
}

.topbar {
  background: linear-gradient(180deg, rgba(10,10,12,0.92), rgba(10,10,12,0.75));
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(212,175,55,0.12);
}
[data-theme="light"] .topbar {
  background: linear-gradient(180deg, rgba(255,253,248,0.92), rgba(255,253,248,0.8));
}

.main-content {
  background:
    radial-gradient(ellipse 50% 30% at 80% 0%, rgba(212,175,55,0.04), transparent),
    transparent;
}

.card, .metric-card {
  background: linear-gradient(145deg, rgba(28,28,32,0.9), rgba(22,22,26,0.95));
  backdrop-filter: blur(8px);
}
[data-theme="light"] .card,
[data-theme="light"] .metric-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(252,249,242,0.98));
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

/* Decorative gold line under page titles */
.page-header {
  position: relative;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}
.page-header::after {
  content: '';
  display: block;
  width: 64px;
  height: 3px;
  margin-top: 0.75rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--color-gold), transparent);
}
[dir="ltr"] .page-header::after {
  background: linear-gradient(90deg, var(--color-gold), transparent);
}
