/*
 * Client branding override — روان سعد العمري للمحاماة والاستشارات القانونية.
 *
 * Loaded as an EXTRA stylesheet, after the shared app bundle, only on this
 * client's Nginx vhost (see ../demo-provisioning/README.md for how a tenant
 * vhost is generated). It must never be copied into frontend/src/styles.css
 * or frontend/dist — those are the one shared build served to every tenant
 * (see ../README.md, "one shared build"). Keeping this as a separate file
 * lets one client get a beige/brown identity, derived from their logo, while
 * every other tenant keeps the default navy/gold "Authority & Ledger" system.
 *
 * Palette source: client-supplied logo (crown emblem in warm camel/tan,
 * dark warm-brown wordmark). Semantic status colors (success/danger) are
 * left untouched — they're functional, not brand.
 */

:root {
  --bg: #f8f6f2;
  --bg-alt: #f1ece3;
  --panel: #ffffff;
  --panel-strong: #fffdfa;
  --line: #e2d9c9;
  --input-border: #cdbfa8;
  --text: #221d17;
  --muted: #5c5346;
  --faint: #7d7364;
  --primary: #2b2117;
  --primary-2: #3c2f22;
  --accent: #b99568;
  --accent-rgb: 185, 149, 104;
  --accent-hover: #cdae85;
  --warning: #a8672a;
  --warning-soft: #f5ead9;
  --info: #6b5c46;
  --info-soft: rgba(107, 92, 70, 0.14);
  --neutral-soft: rgba(107, 92, 70, 0.14);
}

:root[data-theme="dark"] {
  --bg: #14100b;
  --bg-alt: #1c1610;
  --panel: #241d15;
  --panel-strong: #241d15;
  --line: #3a2e21;
  --input-border: #55432f;
  --text: #f1ece2;
  --muted: #c7bba6;
  --faint: #a1937c;
  --accent: #cdae85;
  --accent-rgb: 205, 174, 133;
  --accent-hover: #dcc19d;
  --warning: #d3934f;
  --warning-soft: rgba(168, 103, 42, 0.22);
  --info: #c7bba6;
  --info-soft: rgba(107, 92, 70, 0.18);
  --neutral-soft: rgba(107, 92, 70, 0.22);
}

/* Frozen-palette Dashboard page (see styles.css .dashboard-legacy-theme) */
.dashboard-legacy-theme {
  --bg: #f7f2e6;
  --bg-alt: #efe6d3;
  --line: #e7ddc7;
  --text: #221d17;
  --muted: #5c5346;
  --faint: #8a7d68;
  --primary: #2b2117;
  --primary-2: #3c2f22;
  --accent: #b99568;
  --accent-rgb: 185, 149, 104;
  --accent-hover: #cdae85;
  --warning: #a8672a;
  --warning-soft: #f5ead9;
  --rail-text-strong: #f8f3ea;
}

/*
 * The Dashboard hero/summary/quick-action/card-record components paint navy
 * (#0f2d49 family) and gold (#ba924e family) directly as hex literals, not
 * via the CSS variables above — so none of the :root overrides above touch
 * them. These selectors mirror styles.css exactly; values were read back
 * from the built bundle to make sure every literal actually in use is
 * covered. Any FUTURE client's branding.css will need this same block if
 * the Dashboard's hardcoded design hasn't been migrated to variables by
 * then — see the .dashboard-legacy-theme comment in styles.css.
 */
.dashboard-hero::before {
  background:
    radial-gradient(circle at 16% 18%, rgba(185, 149, 104, 0.12), transparent 20%),
    radial-gradient(circle at 78% 32%, rgba(43, 33, 23, 0.08), transparent 24%),
    linear-gradient(rgba(255, 255, 255, 0.22), transparent 30%);
}
.dashboard-hero-art-frame::before {
  background:
    linear-gradient(90deg, rgba(43, 33, 23, 0.08), transparent 22%),
    linear-gradient(transparent 70%, rgba(185, 149, 104, 0.08));
}
.dashboard-hero-copy h2 {
  color: #2b2117;
}
.dashboard-hero-copy .hero-copy {
  color: rgba(43, 33, 23, 0.8);
}
.dashboard-summary-card strong {
  color: #2b2117;
}
.dashboard-summary-card-highlight {
  background:
    radial-gradient(circle at 100% 0, rgba(185, 149, 104, 0.2), transparent 24%),
    linear-gradient(135deg, #2b2117, #1c150e);
  border-color: rgba(185, 149, 104, 0.5);
}
.dashboard-quick-action-icon {
  color: #2b2117;
}
.dashboard-quick-action-label {
  color: #2b2117;
}
.dashboard-quick-action-hint {
  color: rgba(43, 33, 23, 0.68);
}
.dashboard-card-record h4 {
  color: #2b2117;
}
.dashboard-card-record .dashboard-card-description {
  color: rgba(43, 33, 23, 0.72);
}
.dashboard-card-record .dashboard-card-value {
  color: #2b2117;
}
.dashboard-card-record .dashboard-card-link {
  color: #2b2117;
}
.dashboard-card-record .dashboard-card-link::before {
  background: rgba(185, 149, 104, 0.86);
}

:root[data-theme="dark"] .dashboard-hero-art-frame,
:root[data-theme="dark"] .dashboard-summary-card,
:root[data-theme="dark"] .dashboard-quick-action,
:root[data-theme="dark"] .dashboard-card-record {
  background: linear-gradient(#241d15f5, #1c1610eb);
  border-color: rgba(205, 174, 133, 0.2);
}
:root[data-theme="dark"] .dashboard-summary-card-highlight {
  background:
    radial-gradient(circle at 100% 0, rgba(205, 174, 133, 0.18), transparent 24%),
    linear-gradient(135deg, #3c2f22, #241d15);
}

/*
 * The ACTUAL rendered Dashboard page (DashboardPage.tsx) uses a completely
 * separate stylesheet — frontend/src/pages/DashboardPage.css — with its own
 * `--dashboard-*` custom properties (navy/gold), independent of styles.css's
 * `--primary`/`--accent` system. The `.dashboard-hero*` block above targets
 * dead CSS from an unused/legacy component and has no visible effect; THIS
 * block is what actually recolors the welcome card, action tiles, and list
 * rows. Re-verify against DashboardPage.css if the Dashboard is redesigned.
 */
.wethaq-dashboard {
  --dashboard-navy: #2b2117;
  --dashboard-navy-deep: #1c150e;
  --dashboard-gold: #b99568;
  --dashboard-ink: #2b2117;
  --dashboard-muted: #7d7364;
  --dashboard-line: #e2d9c9;
  --dashboard-surface: rgba(255, 253, 250, 0.95);
}
[data-theme="dark"] .wethaq-dashboard {
  --dashboard-ink: #f1ece2;
  --dashboard-muted: #c7bba6;
  --dashboard-line: #3a2e21;
  --dashboard-surface: rgba(36, 29, 21, 0.96);
}
[data-theme="dark"] .wethaq-dashboard-action,
[data-theme="dark"] .wethaq-dashboard-list-row {
  border-color: #55432f;
  background: #241d15;
}
[data-theme="dark"] .wethaq-dashboard-summary-identity {
  background: linear-gradient(135deg, #3c2f22, #241d15);
}
[data-theme="dark"] .wethaq-dashboard-action-icon,
[data-theme="dark"] .wethaq-dashboard-summary-icon,
[data-theme="dark"] .wethaq-dashboard-list-icon,
[data-theme="dark"] .wethaq-dashboard-finance-icon {
  color: #dcc19d;
  background: #3a2e21;
}
[data-theme="dark"] .wethaq-dashboard-list-row:hover {
  border-color: #b99568;
  background: #2b2117;
}
