/* Habib Al Mulla Desk — high contrast + gold CTAs (injected; bypasses stale /assets/) */

:root,
[data-theme="dark"],
body.full-width {
  --ham-gold: #d1a47b;
  --ham-gold-btn: #c08a5a;
  --ham-gold-bright: #e4c09a;
  --primary: #c08a5a !important;
  --primary-color: #c08a5a !important;
  --btn-primary: #c08a5a !important;
  --dt-primary-color: #c08a5a !important;
  --blue-500: #c08a5a !important;
  --blue-600: #c08a5a !important;
  --heading-color: #f1f5f9 !important;
  --text-color: #e8edf5 !important;
  --text-muted: #94a3b8 !important;
  --text-light: #cbd5e1 !important;
}

/* Section heads — MUST be readable on dark (More Info / collapsible) */
.form-section .section-head,
.form-section .section-head .section-head-content,
.form-dashboard-section .section-head,
.section-head,
.form-section .section-head .uppercase,
.form-section .section-head span,
.form-section .section-head a,
.form-section .section-head .section-head-content .uppercase,
.collapsible-section .section-head,
div.section-head {
  color: #f1f5f9 !important;
  opacity: 1 !important;
  font-weight: 650 !important;
  letter-spacing: 0.02em !important;
}

.form-section .section-head svg,
.form-section .section-head use,
.section-head .icon,
.section-head svg.icon {
  stroke: #cbd5e1 !important;
  fill: transparent !important;
  opacity: 1 !important;
}

/* Soft gold rule under section heads (not neon) */
.form-section .section-head {
  border-bottom: 1px solid rgba(192, 138, 90, 0.35) !important;
  padding-bottom: 6px !important;
  margin-bottom: 10px !important;
}

/* Labels & tab links */
.control-label,
.frappe-control .control-label,
.form-group .clearfix,
.form-tabs .nav-link,
.form-tabs-list .nav-link {
  color: #cbd5e1 !important;
  opacity: 1 !important;
}
.form-tabs .nav-link.active,
.form-tabs-list .nav-link.active {
  color: #f8fafc !important;
  border-bottom-color: #c08a5a !important;
}

/* Primary / action buttons — gold, never blue */
.btn-primary,
.btn-primary:not(:disabled),
button.btn-primary,
.page-head .btn-primary,
.page-actions .btn-primary,
.standard-actions .btn-primary,
.modal-footer .btn-primary,
.grid-buttons .btn-primary,
.grid-add-row,
.grid-footer .btn-primary {
  background: #c08a5a !important;
  background-color: #c08a5a !important;
  border-color: #c08a5a !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:not(:disabled):hover {
  background: #e4c09a !important;
  background-color: #e4c09a !important;
  border-color: #e4c09a !important;
  color: #0b0c2e !important;
}

/* Secondary buttons readable */
.btn-default,
.btn-secondary {
  color: #e8edf5 !important;
  border-color: #3a3e5c !important;
  background: #16183a !important;
}

/* Links / indicators that default to blue */
a, .text-primary, .indicator-pill.blue, .indicator.blue {
  --icon-stroke: #d1a47b;
}
a.btn-link, .btn-link { color: #d1a47b !important; }

/* Onboarding widget accents */
.widget .widget-head .widget-title,
.onboarding-widget-box .widget-title {
  color: #f1f5f9 !important;
}

/* =============================================================================
   Habib Al Mulla workspace polish (Control Center + M365 Hub only)
   Scoped via [data-page-route="Workspaces"] — set in rk_desk_theme.js
   ============================================================================= */

[data-page-route="Workspaces"] {
  --ham-ws-gold: #d1a47b;
  --ham-ws-gold-dim: rgba(192, 138, 90, 0.35);
  --ham-ws-navy: #16183a;
}

/* Branded header block */
[data-page-route="Workspaces"] .rk-ws-brand,
[data-page-route="Workspaces"] .ham-ws-brand {
  padding: 0.25rem 0 1rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--ham-ws-gold-dim);
}

[data-page-route="Workspaces"] .rk-ws-brand--compact {
  padding-bottom: 0.75rem;
  margin-bottom: 0.25rem;
}

[data-page-route="Workspaces"] .rk-ws-brand__rule,
[data-page-route="Workspaces"] .ham-ws-brand__rule {
  width: 2.75rem;
  height: 3px;
  margin-bottom: 0.65rem;
  border-radius: 2px;
  background: linear-gradient(90deg, #c08a5a 0%, #e4c09a 100%);
}

[data-page-route="Workspaces"] .rk-ws-brand__firm,
[data-page-route="Workspaces"] .ham-ws-brand__firm {
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: 0.045em;
  color: #f1f5f9 !important;
  line-height: 1.35;
}

[data-page-route="Workspaces"] .rk-ws-brand__tagline,
[data-page-route="Workspaces"] .ham-ws-brand__tagline {
  margin-top: 0.3rem;
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  color: #94a3b8 !important;
}

/* Section headers (Practice, Intake, Finance, …) */
[data-page-route="Workspaces"] .ce-header .rk-ws-section,
[data-page-route="Workspaces"] .ce-header .ham-ws-section,
[data-page-route="Workspaces"] .ce-header .rk-ws-section *,
[data-page-route="Workspaces"] .ce-header .ham-ws-section * {
  font-size: 0.6875rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: var(--ham-ws-gold) !important;
  opacity: 1 !important;
}

[data-page-route="Workspaces"] .ce-header:not(:has(.rk-ws-brand)) {
  margin-top: 0.35rem;
}

/* Shortcut tiles */
[data-page-route="Workspaces"] .widget.shortcut-widget-box {
  border: 1px solid #3a3e5c !important;
  border-radius: 8px !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

[data-page-route="Workspaces"] .widget.shortcut-widget-box:hover,
body.rk-workspace-active .widget.shortcut-widget-box:hover {
  border-color: var(--ham-ws-gold) !important;
  box-shadow: 0 0 0 1px rgba(209, 164, 123, 0.22);
}

/* Priority intake shortcuts — slightly stronger hover cue */
[data-page-route="Workspaces"] [shortcut_name="Lead"] .widget.shortcut-widget-box:hover,
[data-page-route="Workspaces"] [shortcut_name="Client Request"] .widget.shortcut-widget-box:hover,
body.rk-workspace-active [shortcut_name="Lead"] .widget.shortcut-widget-box:hover,
body.rk-workspace-active [shortcut_name="Client Request"] .widget.shortcut-widget-box:hover {
  border-color: #d1a47b !important;
  box-shadow: 0 0 0 1px rgba(209, 164, 123, 0.38), 0 2px 10px rgba(192, 138, 90, 0.1);
}

[data-page-route="Workspaces"] .widget.shortcut-widget-box .widget-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

[data-page-route="Workspaces"] .widget.shortcut-widget-box .widget-head::before,
[data-page-route="Workspaces"] .rk-shortcut-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background-color: rgba(192, 138, 90, 0.14);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1rem;
  content: "";
}

[data-page-route="Workspaces"] [shortcut_name="Legal Matter"] .widget-head::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c7a35d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16'/%3E%3Crect width='20' height='14' x='2' y='6' rx='2'/%3E%3C/svg%3E");
}
[data-page-route="Workspaces"] [shortcut_name="Client Request"] .widget-head::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c7a35d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='M12 11h4'/%3E%3Cpath d='M12 16h4'/%3E%3Cpath d='M8 11h.01'/%3E%3Cpath d='M8 16h.01'/%3E%3C/svg%3E");
}
[data-page-route="Workspaces"] [shortcut_name="Task"] .widget-head::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c7a35d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 5h8'/%3E%3Cpath d='M13 12h8'/%3E%3Cpath d='M13 19h8'/%3E%3Cpath d='m3 5 2 2 4-4'/%3E%3Cpath d='m3 12 2 2 4-4'/%3E%3Cpath d='m3 19 2 2 4-4'/%3E%3C/svg%3E");
}
[data-page-route="Workspaces"] [shortcut_name="Customer"] .widget-head::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c7a35d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Cpath d='M16 3.128a4 4 0 0 1 0 7.744'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3C/svg%3E");
}
[data-page-route="Workspaces"] [shortcut_name="Lead"] .widget-head::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c7a35d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cline x1='19' x2='19' y1='8' y2='14'/%3E%3Cline x1='22' x2='16' y1='11' y2='11'/%3E%3C/svg%3E");
}
[data-page-route="Workspaces"] [shortcut_name="Opportunity"] .widget-head::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c7a35d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 7h6v6'/%3E%3Cpath d='m22 7-8.5 8.5-5-5L2 17'/%3E%3C/svg%3E");
}
[data-page-route="Workspaces"] [shortcut_name="Contact"] .widget-head::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c7a35d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 2v2'/%3E%3Cpath d='M7 22v-2a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2'/%3E%3Cpath d='M12 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8z'/%3E%3C/svg%3E");
}
[data-page-route="Workspaces"] [shortcut_name="Request Consultation"] .widget-head::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c7a35d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M16 2v4'/%3E%3Crect width='18' height='18' x='3' y='4' rx='2'/%3E%3Cpath d='M3 10h18'/%3E%3Cpath d='m9 16 2 2 4-4'/%3E%3C/svg%3E");
}
[data-page-route="Workspaces"] [shortcut_name="Sales Invoice"] .widget-head::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c7a35d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z'/%3E%3Cpath d='M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8'/%3E%3Cpath d='M12 17.5v-11'/%3E%3C/svg%3E");
}
[data-page-route="Workspaces"] [shortcut_name="Microsoft 365 Hub"] .widget-head::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c7a35d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='7' height='7' x='3' y='3' rx='1'/%3E%3Crect width='7' height='7' x='14' y='3' rx='1'/%3E%3Crect width='7' height='7' x='14' y='14' rx='1'/%3E%3Crect width='7' height='7' x='3' y='14' rx='1'/%3E%3C/svg%3E");
}
[data-page-route="Workspaces"] [shortcut_name="Outlook"] .widget-head::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c7a35d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7'/%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3C/svg%3E");
}
[data-page-route="Workspaces"] [shortcut_name="Teams"] .widget-head::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c7a35d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5'/%3E%3Crect x='2' y='6' width='14' height='12' rx='2'/%3E%3C/svg%3E");
}
[data-page-route="Workspaces"] [shortcut_name="OneDrive"] .widget-head::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c7a35d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='22' x2='2' y1='12' y2='12'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3Cline x1='6' x2='6.01' y1='16' y2='16'/%3E%3Cline x1='10' x2='10.01' y1='16' y2='16'/%3E%3C/svg%3E");
}
[data-page-route="Workspaces"] [shortcut_name="Word Online"] .widget-head::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c7a35d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M10 9H8'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3C/svg%3E");
}

/* When JS injects lucide icons, hide CSS fallback pseudo-element */
[data-page-route="Workspaces"] .widget.shortcut-widget-box .widget-head:has(.rk-shortcut-icon)::before {
  display: none;
}

[data-page-route="Workspaces"] .rk-shortcut-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: rgba(192, 138, 90, 0.14);
  color: var(--ham-ws-gold) !important;
}

[data-page-route="Workspaces"] .rk-shortcut-icon svg {
  width: 1rem;
  height: 1rem;
  stroke: var(--ham-ws-gold) !important;
}

[data-page-route="Workspaces"] .widget.shortcut-widget-box .widget-title,
body.rk-workspace-active .widget.shortcut-widget-box .widget-title {
  font-weight: 600 !important;
  letter-spacing: 0.01em;
}

/* Shortcut count badges — lift grey defaults; gold/amber for intake priorities */
[data-page-route="Workspaces"] .widget.shortcut-widget-box .widget-control .badge,
[data-page-route="Workspaces"] .widget.shortcut-widget-box .widget-control [class*="rounded-full"],
body.rk-workspace-active .widget.shortcut-widget-box .widget-control .badge,
body.rk-workspace-active .widget.shortcut-widget-box .widget-control [class*="rounded-full"] {
  font-weight: 650 !important;
  letter-spacing: 0.01em;
  border: 1px solid rgba(51, 65, 85, 0.55) !important;
}

[data-page-route="Workspaces"] [shortcut_name="Lead"] .widget.shortcut-widget-box .widget-control .badge,
[data-page-route="Workspaces"] [shortcut_name="Lead"] .widget.shortcut-widget-box .widget-control [class*="rounded-full"],
[data-page-route="Workspaces"] [shortcut_name="Client Request"] .widget.shortcut-widget-box .widget-control .badge,
[data-page-route="Workspaces"] [shortcut_name="Client Request"] .widget.shortcut-widget-box .widget-control [class*="rounded-full"],
body.rk-workspace-active [shortcut_name="Lead"] .widget.shortcut-widget-box .widget-control .badge,
body.rk-workspace-active [shortcut_name="Lead"] .widget.shortcut-widget-box .widget-control [class*="rounded-full"],
body.rk-workspace-active [shortcut_name="Client Request"] .widget.shortcut-widget-box .widget-control .badge,
body.rk-workspace-active [shortcut_name="Client Request"] .widget.shortcut-widget-box .widget-control [class*="rounded-full"] {
  background: rgba(192, 138, 90, 0.24) !important;
  color: #e8b86d !important;
  border-color: rgba(209, 164, 123, 0.45) !important;
  font-weight: 700 !important;
}

/* Number cards — hierarchy via left accent + restrained color cues */
[data-page-route="Workspaces"] .widget.number-widget-box,
[data-page-route="Workspaces"] .widget.number-card-widget,
body.rk-workspace-active .widget.number-widget-box,
body.rk-workspace-active .widget.number-card-widget {
  position: relative;
  border-radius: 8px !important;
  border: 1px solid rgba(51, 65, 85, 0.62) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

[data-page-route="Workspaces"] [number_card_name] .widget.number-widget-box::before,
[data-page-route="Workspaces"] [number_card_name] .widget.number-card-widget::before,
body.rk-workspace-active [number_card_name] .widget.number-widget-box::before,
body.rk-workspace-active [number_card_name] .widget.number-card-widget::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 8px 0 0 8px;
  pointer-events: none;
}

[data-page-route="Workspaces"] .widget.number-widget-box .widget-content .number,
[data-page-route="Workspaces"] .widget.number-card-widget .widget-content .number,
body.rk-workspace-active .widget.number-widget-box .widget-content .number,
body.rk-workspace-active .widget.number-card-widget .widget-content .number {
  font-weight: 700 !important;
  letter-spacing: -0.02em;
}

/* Open Matters — gold brand */
[data-page-route="Workspaces"] [number_card_name="Open Matters"] .widget.number-widget-box,
body.rk-workspace-active [number_card_name="Open Matters"] .widget.number-widget-box {
  border-color: rgba(209, 164, 123, 0.32) !important;
  background-color: #16183a !important;
}
[data-page-route="Workspaces"] [number_card_name="Open Matters"] .widget.number-widget-box::before,
body.rk-workspace-active [number_card_name="Open Matters"] .widget.number-widget-box::before {
  background: linear-gradient(180deg, #e4c09a 0%, #c08a5a 100%);
}
[data-page-route="Workspaces"] [number_card_name="Open Matters"] .widget-content .number,
body.rk-workspace-active [number_card_name="Open Matters"] .widget-content .number {
  color: #d1a47b !important;
}

/* Matters In Progress — calmer blue */
[data-page-route="Workspaces"] [number_card_name="Matters In Progress"] .widget.number-widget-box,
body.rk-workspace-active [number_card_name="Matters In Progress"] .widget.number-widget-box {
  border-color: rgba(125, 168, 212, 0.28) !important;
  background-color: #172030 !important;
}
[data-page-route="Workspaces"] [number_card_name="Matters In Progress"] .widget.number-widget-box::before,
body.rk-workspace-active [number_card_name="Matters In Progress"] .widget.number-widget-box::before {
  background: linear-gradient(180deg, #9ec5eb 0%, #6a94c4 100%);
}
[data-page-route="Workspaces"] [number_card_name="Matters In Progress"] .widget-content .number,
body.rk-workspace-active [number_card_name="Matters In Progress"] .widget-content .number {
  color: #8eb4e3 !important;
}

/* Pending Client Requests + Upcoming Deadlines — warmer amber attention */
[data-page-route="Workspaces"] [number_card_name="Pending Client Requests"] .widget.number-widget-box,
[data-page-route="Workspaces"] [number_card_name="Upcoming Deadlines"] .widget.number-widget-box,
body.rk-workspace-active [number_card_name="Pending Client Requests"] .widget.number-widget-box,
body.rk-workspace-active [number_card_name="Upcoming Deadlines"] .widget.number-widget-box {
  border-color: rgba(224, 152, 98, 0.34) !important;
  background: linear-gradient(135deg, rgba(35, 28, 20, 0.96) 0%, rgba(26, 36, 53, 0.9) 100%) !important;
}
[data-page-route="Workspaces"] [number_card_name="Pending Client Requests"] .widget.number-widget-box::before,
body.rk-workspace-active [number_card_name="Pending Client Requests"] .widget.number-widget-box::before {
  background: linear-gradient(180deg, #e8b86d 0%, #c9924a 100%);
}
[data-page-route="Workspaces"] [number_card_name="Upcoming Deadlines"] .widget.number-widget-box::before,
body.rk-workspace-active [number_card_name="Upcoming Deadlines"] .widget.number-widget-box::before {
  background: linear-gradient(180deg, #e09862 0%, #c97842 100%);
}
[data-page-route="Workspaces"] [number_card_name="Pending Client Requests"] .widget-content .number,
body.rk-workspace-active [number_card_name="Pending Client Requests"] .widget-content .number {
  color: #e8b86d !important;
}
[data-page-route="Workspaces"] [number_card_name="Upcoming Deadlines"] .widget-content .number,
body.rk-workspace-active [number_card_name="Upcoming Deadlines"] .widget-content .number {
  color: #e09862 !important;
}

[data-page-route="Workspaces"] .widget.number-widget-box:hover,
[data-page-route="Workspaces"] .widget.number-card-widget:hover,
body.rk-workspace-active .widget.number-widget-box:hover,
body.rk-workspace-active .widget.number-card-widget:hover {
  border-color: rgba(209, 164, 123, 0.42) !important;
}

/* No red/green percentage spam on metric cards */
[data-page-route="Workspaces"] .number-widget-box .green-stat,
[data-page-route="Workspaces"] .number-widget-box .red-stat,
body.rk-workspace-active .number-widget-box .green-stat,
body.rk-workspace-active .number-widget-box .red-stat {
  display: none !important;
}

/* Desk home — replace letter-H tile with the 40 mark */
.desktop-icon img.ham-app-icon,
.case-wrapper img.ham-app-icon,
.app-icon img.ham-app-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

/* =============================================================================
   Curated sidebar — gold selected state, hide Framework / vendor labels
   ============================================================================= */

body.ham-demo-desk .standard-sidebar-item.selected,
body.ham-demo-desk .desk-sidebar .selected,
body.ham-workspace-active .standard-sidebar-item.selected,
body.ham-workspace-active .desk-sidebar .selected {
  background-color: rgba(192, 138, 90, 0.18) !important;
  color: #f1f5f9 !important;
  border-left: 3px solid #c08a5a !important;
}

body.ham-demo-desk .standard-sidebar-item:hover,
body.ham-workspace-active .standard-sidebar-item:hover {
  background-color: rgba(192, 138, 90, 0.1) !important;
}

/* Hide ERPNext vendor tiles and help links (Framework stays — suite app) */
.desktop-icon[data-name="ERPNext"],
.desktop-icon[data-name="ERPNext Settings"],
[data-name="ERPNext"] .case-wrapper,
a[href*="frappe.io"],
a[href*="erpnext.com"],
.help-link[href*="frappe"],
.navbar .dropdown-help .dropdown-item[href*="frappe"] {
  display: none !important;
}

body.ham-demo-desk .desk-sidebar [data-label="ERPNext"],
body.ham-demo-desk .desk-sidebar [data-label="My Workspaces"] {
  display: none !important;
}

/* App switcher — remove vendor subtitles under each workspace (ERPNext / Frappe).
   Also apply before body.ham-demo-desk so first paint is clean. */
[class*="app-switcher"] .text-muted,
[class*="app-switcher"] [class*="subtitle"],
[class*="app-switcher"] [class*="description"],
.app-switcher-menu .text-muted,
.app-switcher-dropdown .text-muted,
.app-item .text-muted,
.apps-list .text-muted,
.app-switcher-button .text-muted,
button.app-switcher-button .text-muted,
.current-app .text-muted,
body.ham-demo-desk .sidebar-item-container .text-muted,
body.ham-demo-desk .desk-sidebar .text-muted {
  display: none !important;
}

/* Commercial KPI cards — HAM prefix */
[data-page-route="Workspaces"] [number_card_name="HAM Accepted Quotations"] .widget.number-widget-box,
body.ham-workspace-active [number_card_name="HAM Accepted Quotations"] .widget.number-widget-box {
  border-color: rgba(209, 164, 123, 0.32) !important;
  background-color: #16183a !important;
}
[data-page-route="Workspaces"] [number_card_name="HAM Accepted Quotations"] .widget.number-widget-box::before,
body.ham-workspace-active [number_card_name="HAM Accepted Quotations"] .widget.number-widget-box::before {
  background: linear-gradient(180deg, #e4c09a 0%, #c08a5a 100%);
}
[data-page-route="Workspaces"] [number_card_name="HAM Accepted Quotations"] .widget-content .number,
body.ham-workspace-active [number_card_name="HAM Accepted Quotations"] .widget-content .number {
  color: #d1a47b !important;
}

[data-page-route="Workspaces"] [number_card_name="HAM Sales Orders to Bill"] .widget.number-widget-box,
body.ham-workspace-active [number_card_name="HAM Sales Orders to Bill"] .widget.number-widget-box {
  border-color: rgba(224, 152, 98, 0.34) !important;
  background: linear-gradient(135deg, rgba(35, 28, 20, 0.96) 0%, rgba(26, 36, 53, 0.9) 100%) !important;
}
[data-page-route="Workspaces"] [number_card_name="HAM Sales Orders to Bill"] .widget.number-widget-box::before,
body.ham-workspace-active [number_card_name="HAM Sales Orders to Bill"] .widget.number-widget-box::before {
  background: linear-gradient(180deg, #e8b86d 0%, #c9924a 100%);
}
[data-page-route="Workspaces"] [number_card_name="HAM Sales Orders to Bill"] .widget-content .number,
body.ham-workspace-active [number_card_name="HAM Sales Orders to Bill"] .widget-content .number {
  color: #e8b86d !important;
}

[data-page-route="Workspaces"] [number_card_name="HAM Sales YTD"] .widget.number-widget-box,
body.ham-workspace-active [number_card_name="HAM Sales YTD"] .widget.number-widget-box {
  border-color: rgba(125, 168, 212, 0.28) !important;
  background-color: #172030 !important;
}
[data-page-route="Workspaces"] [number_card_name="HAM Sales YTD"] .widget.number-widget-box::before,
body.ham-workspace-active [number_card_name="HAM Sales YTD"] .widget.number-widget-box::before {
  background: linear-gradient(180deg, #9ec5eb 0%, #6a94c4 100%);
}
[data-page-route="Workspaces"] [number_card_name="HAM Sales YTD"] .widget-content .number,
body.ham-workspace-active [number_card_name="HAM Sales YTD"] .widget-content .number {
  color: #8eb4e3 !important;
}

[data-page-route="Workspaces"] [number_card_name="HAM Unpaid Invoices"] .widget.number-widget-box,
body.ham-workspace-active [number_card_name="HAM Unpaid Invoices"] .widget.number-widget-box {
  border-color: rgba(224, 152, 98, 0.34) !important;
  background: linear-gradient(135deg, rgba(35, 28, 20, 0.96) 0%, rgba(26, 36, 53, 0.9) 100%) !important;
}
[data-page-route="Workspaces"] [number_card_name="HAM Unpaid Invoices"] .widget.number-widget-box::before,
body.ham-workspace-active [number_card_name="HAM Unpaid Invoices"] .widget.number-widget-box::before {
  background: linear-gradient(180deg, #e09862 0%, #c97842 100%);
}
[data-page-route="Workspaces"] [number_card_name="HAM Unpaid Invoices"] .widget-content .number,
body.ham-workspace-active [number_card_name="HAM Unpaid Invoices"] .widget-content .number {
  color: #e09862 !important;
}

/* Dashboard charts */
[data-page-route="Workspaces"] .widget.chart-widget-box,
body.ham-workspace-active .widget.chart-widget-box {
  border: 1px solid rgba(51, 65, 85, 0.62) !important;
  border-radius: 8px !important;
  background: rgba(22, 24, 58, 0.55) !important;
}

[data-page-route="Workspaces"] .widget.chart-widget-box .widget-head .widget-title,
body.ham-workspace-active .widget.chart-widget-box .widget-head .widget-title {
  font-size: 0.8125rem !important;
  font-weight: 650 !important;
  letter-spacing: 0.04em !important;
  color: #d1a47b !important;
}

[data-page-route="Workspaces"] [shortcut_name="Quotation"] .widget-head::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c7a35d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M10 9H8'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3C/svg%3E");
}
[data-page-route="Workspaces"] [shortcut_name="Sales Order"] .widget-head::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c7a35d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='21' r='1'/%3E%3Ccircle cx='19' cy='21' r='1'/%3E%3Cpath d='M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12'/%3E%3C/svg%3E");
}
