/* Terra Brava — Light / Executive theme */

[data-theme="light"] {
  --bg: #ece8e0;
  --bg-sidebar: #f7f4ee;
  --surface: #ffffff;
  --surface-2: #f3efe7;
  --surface-elevated: #faf8f4;
  --border: rgba(20, 18, 14, 0.1);
  --border-light: rgba(20, 18, 14, 0.14);
  --text: #1a1814;
  --text-secondary: #4a453c;
  --text-muted: #7a7468;
  --gold: #9a7b42;
  --gold-light: #6b5428;
  --gold-deep: #5c4620;
  --gold-glow: rgba(154, 123, 66, 0.2);
  --champagne: rgba(154, 123, 66, 0.06);
  --ink: #ece8e0;
  --glass: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(20, 18, 14, 0.08);
  --accent: #9a7b42;
  --accent-hover: #7a6235;
  --accent-soft: rgba(154, 123, 66, 0.12);
  --accent-glow: rgba(154, 123, 66, 0.18);
}

[data-theme="light"] body {
  background: var(--bg);
}

[data-theme="light"] .sidebar {
  background: var(--bg-sidebar);
  border-right-color: var(--border);
  box-shadow: none;
}

[data-theme="light"] .topbar {
  background: var(--bg-sidebar);
  border-bottom-color: var(--border);
}

[data-theme="light"] main > section {
  background: var(--surface);
  box-shadow: none;
}

[data-theme="light"] .view-header {
  background: var(--surface);
}

[data-theme="light"] .view-header h1,
[data-theme="light"] .log-character,
[data-theme="light"] .log-headline,
[data-theme="light"] .welcome-panel h1 {
  color: var(--text);
}

[data-theme="light"] #breadcrumb-current {
  color: var(--text);
}

[data-theme="light"] .metric-card strong,
[data-theme="light"] .hub-live-count-row strong,
[data-theme="light"] .stats-total-card strong {
  color: var(--text);
}

[data-theme="light"] .welcome-view {
  background: var(--bg);
}

[data-theme="light"] .welcome-panel {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: none;
}

[data-theme="light"] .nav-item.active {
  color: var(--gold-deep);
  background: rgba(154, 123, 66, 0.12);
}

[data-theme="light"] .nav-item.active .nav-icon {
  color: var(--gold-deep);
}

[data-theme="light"] .data-table th {
  background: #f3efe7;
  color: var(--gold-deep);
}

[data-theme="light"] .data-table tbody tr:hover td,
[data-theme="light"] .log-row:hover td {
  background: rgba(154, 123, 66, 0.06) !important;
}

[data-theme="light"] .log-time-value {
  color: var(--gold-deep);
}

[data-theme="light"] .log-card {
  background: #fff;
  border-color: rgba(20, 18, 14, 0.1);
}

[data-theme="light"] .logs-feed-wrap {
  background: #f3efe6;
}

[data-theme="light"] .log-card-tag {
  background: #faf8f4;
}

[data-theme="light"] .btn-primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

[data-theme="light"] .filter-search,
[data-theme="light"] .filter-field input,
[data-theme="light"] .filter-field select,
[data-theme="light"] .filter-inline,
[data-theme="light"] .filters-toolbar select,
[data-theme="light"] .login-form input {
  background: #fff;
  border-color: rgba(20, 18, 14, 0.12);
  color: var(--text);
}

[data-theme="light"] .hub-live-online,
[data-theme="light"] .hub-live-panel,
[data-theme="light"] .metric-card,
[data-theme="light"] .stats-chart-card,
[data-theme="light"] .stats-total-card,
[data-theme="light"] .stats-inventory-card {
  background: #fff;
}

[data-theme="light"] .theme-toggle {
  background: rgba(154, 123, 66, 0.08);
  border-color: rgba(154, 123, 66, 0.2);
  color: var(--gold-deep);
}

[data-theme="light"] .ranch-filters-bar,
[data-theme="light"] #ranch-view .ranch-feed-wrap {
  background: #fff;
}

[data-theme="light"] .ranch-log-card {
  background: #faf8f4;
  border-color: rgba(20, 18, 14, 0.1);
}

[data-theme="light"] .ranch-log-card-top {
  border-bottom-color: rgba(20, 18, 14, 0.08);
}

[data-theme="light"] .ranch-log-row:hover .ranch-log-card {
  background: #fff;
  border-color: rgba(154, 123, 66, 0.25);
}

[data-theme="light"] .ranch-chip {
  background: #fff;
  border-color: rgba(20, 18, 14, 0.1);
}

[data-theme="light"] .ranch-chip.active {
  background: rgba(154, 123, 66, 0.12);
  border-color: rgba(154, 123, 66, 0.3);
}

/* Theme toggle button */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 38px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-secondary);
}

.theme-toggle:hover {
  background: var(--surface-elevated);
  border-color: var(--border-light);
  color: var(--text);
}

.theme-toggle-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.theme-toggle-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

@media (max-width: 720px) {
  .theme-toggle-label { display: none; }
}

/* Nav SVG icons */

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 160ms ease;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
  color: var(--text);
}

.nav-item::before {
  display: none !important;
}

.sidebar-toggle-icon {
  width: 20px;
  height: 20px;
}

/* Logo */

.brand-mark,
.welcome-panel .brand-mark {
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
}

.brand-logo,
.welcome-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.welcome-panel .brand-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border: none;
  background: transparent;
  box-shadow: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  box-shadow: none;
  flex-shrink: 0;
}
