/* ============================================================
   Bizing design tokens (Bizing brand v1.0, approved 2026-11-11)

   Loaded only when BRAND=bizing (brand.css_tokens in
   freelancer_dashboard/brand.py), after brand.css, components.css and
   darkmode.css. It keeps every --fd-* token NAME and gives it the Bizing
   value, so no component rule changes.

   Source of truth: ~/Code/bizing-brand/tokens.css. Change a value there
   first, then here, in the same pass.

     Banknote #14693F   primary, buttons, links
     Bee yellow #F2C230 accent fills only, primary button on dark
     Ink #141414, Paper #F6F3EA, Surface #FFFDF7, Rule #D9D3C3
     Archivo 800 headings, Source Sans 3 body, 6px radius (8px cards)
   ============================================================ */

:root {
  /* Fonts */
  --fd-font-sans:    "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fd-font-display: "Archivo", "Arial Narrow", Arial, sans-serif;

  /* The FD raw purple scale, re-valued as Banknote greens so any rule that
     still reads a raw step lands on the Bizing palette. */
  --fd-purple-50:  #EAF3EE;
  --fd-purple-100: #D3E6DA;
  --fd-purple-200: #B5D4C0;
  --fd-purple-400: #4E9A6D;
  --fd-purple-500: #2B8052;
  --fd-purple-600: #1B7548;
  --fd-purple-700: #14693F;
  --fd-purple-800: #0F5231;
  --fd-purple-900: #0B3D24;

  /* Roles: brand */
  --fd-primary:            #14693F;
  --fd-primary-rgb:        20, 105, 63;
  --fd-primary-hover:      #0F5231;
  --fd-primary-fill:       #14693F;
  --fd-primary-fill-hover: #0F5231;
  --fd-link:               #14693F;
  --fd-link-rgb:           20, 105, 63;
  --fd-link-hover:         #0F5231;
  --fd-link-hover-rgb:     15, 82, 49;
  --bz-accent:             #F2C230;
  --bz-accent-hover:       #DDAE1A;

  /* Roles: status */
  --fd-success:       #2F6B3A;
  --fd-success-rgb:   47, 107, 58;
  --fd-success-text:  #2F6B3A;
  --fd-success-fill:  #2F6B3A;
  --fd-warning:       #8A5A00;
  --fd-warning-rgb:   138, 90, 0;
  --fd-warning-text:  #8A5A00;
  --fd-warning-fill:  #F2C230;
  --fd-danger:        #A8322A;
  --fd-danger-rgb:    168, 50, 42;
  --fd-danger-text:   #A8322A;
  --fd-danger-fill:   #A8322A;

  /* Roles: surfaces and text */
  --fd-bg-page:      #F6F3EA;
  --fd-bg-surface:   #FFFDF7;
  --fd-bg-alt:       #EFEBDF;
  --fd-border:       #D9D3C3;
  --fd-text:         #141414;
  --fd-text-muted:   #55615E;
  --fd-head-bg:      #1A201B;
  --fd-head-fg:      #FFFDF7;
  --fd-input-bg:     #FFFDF7;
  --fd-input-border: #C9C2AE;
  --fd-focus-ring:   rgba(20, 105, 63, 0.25);
  --fd-page-rgb:     246, 243, 234;
  --fd-surface-rgb:  255, 253, 247;
  --fd-alt-rgb:      239, 235, 223;
  --fd-border-rgb:   217, 211, 195;
  --fd-text-rgb:     20, 20, 20;
  --fd-muted-rgb:    85, 97, 94;

  /* Radii: 6px on buttons, inputs, tiles and pills, 8px on cards. */
  --fd-radius-md: 6px;
  --fd-radius-lg: 8px;

  /* Bootstrap values brand.css sets as literals. */
  --bs-secondary-rgb: 85, 97, 94;
  --bs-dark-rgb: 26, 32, 27;
  --bs-border-radius: 6px;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Money reads in tabular figures. */
body {
  font-variant-numeric: tabular-nums;
}

/* Dark: Bee yellow takes over as the primary fill, with ink text on it. */
html[data-theme="dark"] {
  --fd-purple-400: #F2C230;
  --fd-purple-500: #F2C230;

  --fd-primary:            #F2C230;
  --fd-primary-rgb:        242, 194, 48;
  --fd-primary-hover:      #DDAE1A;
  --fd-primary-fill:       #F2C230;
  --fd-primary-fill-hover: #DDAE1A;
  --fd-link:               #F2C230;
  --fd-link-rgb:           242, 194, 48;
  --fd-link-hover:         #F6D466;
  --fd-link-hover-rgb:     246, 212, 102;

  --fd-success:      #6FBF7E;
  --fd-success-rgb:  111, 191, 126;
  --fd-success-text: #8FD19C;
  --fd-success-fill: #2F6B3A;
  --fd-warning:      #F2C230;
  --fd-warning-rgb:  242, 194, 48;
  --fd-warning-text: #F2C230;
  --fd-warning-fill: #F2C230;
  --fd-danger:       #E0645A;
  --fd-danger-rgb:   224, 100, 90;
  --fd-danger-text:  #EE8A81;
  --fd-danger-fill:  #A8322A;

  --fd-bg-page:      #101410;
  --fd-bg-surface:   #1A201B;
  --fd-bg-alt:       #141914;
  --fd-border:       #2E372F;
  --fd-text:         #F1F2EC;
  --fd-text-muted:   #A6AFA6;
  --fd-head-bg:      #141914;
  --fd-head-fg:      #F1F2EC;
  --fd-input-bg:     #141914;
  --fd-input-border: #3A453B;
  --fd-focus-ring:   rgba(242, 194, 48, 0.35);
  --fd-page-rgb:     16, 20, 16;
  --fd-surface-rgb:  26, 32, 27;
  --fd-alt-rgb:      20, 25, 20;
  --fd-border-rgb:   46, 55, 47;
  --fd-text-rgb:     241, 242, 236;
  --fd-muted-rgb:    166, 175, 166;

  --bs-dark-rgb: 20, 25, 20;
}

html[data-theme="dark"] .btn-purple,
html[data-theme="dark"] .btn-primary {
  --bs-btn-color: #141414;
  --bs-btn-hover-color: #141414;
  --bs-btn-active-color: #141414;
  --bs-btn-disabled-color: #141414;
}

html[data-theme="dark"] .assignments-page .btn-primary-solid,
html[data-theme="dark"] .assignments-page .btn-primary-solid:hover,
html[data-theme="dark"] .btn-primary-solid,
html[data-theme="dark"] .btn-primary-solid:hover {
  color: #141414;
}

html[data-theme="dark"] .btn-outline-purple,
html[data-theme="dark"] .btn-outline-primary,
html[data-theme="dark"] .btn-outline-secondary,
html[data-theme="dark"] .btn-outline-success,
html[data-theme="dark"] .btn-outline-warning,
html[data-theme="dark"] .btn-outline-info,
html[data-theme="dark"] .btn-outline-dark,
html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .btn-warning,
html[data-theme="dark"] .btn-info,
html[data-theme="dark"] .btn-dark {
  --bs-btn-hover-color: #141414;
  --bs-btn-active-color: #141414;
}

html[data-theme="dark"] .text-bg-primary,
html[data-theme="dark"] .bg-purple {
  color: #141414 !important;
}

/* Wordmark next to the tile in the sidebar: Archivo 800, tracking -0.03em,
   as the brand kit's README sets it. */
#sidebar-header .logo-link .logo-text {
  font-family: var(--fd-font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* Dark: every component that puts white text on --fd-primary-fill gets ink
   instead, since that fill is Bee yellow here. White on #F2C230 is 1.6:1,
   ink is 11.0:1. Seen in the browser on 2026-11-11: the sidebar header,
   its menu button and the cookie banner's Accept All all read white on
   yellow. The home page's call-to-action button and the pricing
   page's featured plan header did too. */
html[data-theme="dark"] #sidebar-header,
html[data-theme="dark"] #sidebar-header .logo-link,
html[data-theme="dark"] #sidebarToggle,
html[data-theme="dark"] .cookie-banner-actions .btn-cookie-all,
html[data-theme="dark"] .cookie-banner-actions .btn-cookie-all:hover,
html[data-theme="dark"] .btn-cta,
html[data-theme="dark"] .btn-cta:hover,
html[data-theme="dark"] .btn-cta:focus,
html[data-theme="dark"] .pricing-featured-header,
html[data-theme="dark"] .pricing-featured-header h2,
html[data-theme="dark"] .pricing-featured-header p,
html[data-theme="dark"] .pricing-featured-header .badge,
html[data-theme="dark"] .purple-nav-wrapper .nav-link,
html[data-theme="dark"] .purple-nav-wrapper .nav-link:hover {
  color: #141414 !important;
}

html[data-theme="dark"] .pricing-featured-header .badge {
  background: rgba(20, 20, 20, 0.12) !important;
}

html[data-theme="dark"] .purple-nav-wrapper .nav-link:hover {
  background-color: rgba(20, 20, 20, 0.12);
}

html[data-theme="dark"] .nav-pills {
  --bs-nav-pills-link-active-color: #141414;
}

html[data-theme="dark"] .dropdown-menu {
  --bs-dropdown-link-active-color: #141414;
}

html[data-theme="dark"] .list-group {
  --bs-list-group-active-color: #141414;
}

/* Ticked boxes and picked radios fill Bee yellow in dark, so the mark is ink too. Bootstrap draws it
   white, which all but vanished on the New invoice screen's finished-job boxes (2026-11-12). */
html[data-theme="dark"] .form-check-input:checked[type="checkbox"] {
  --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23141414' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

html[data-theme="dark"] .form-check-input:checked[type="radio"] {
  --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23141414'/%3e%3c/svg%3e");
}

html[data-theme="dark"] .form-check-input[type="checkbox"]:indeterminate {
  --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23141414' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
}

html[data-theme="dark"] .form-switch .form-check-input:checked {
  --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23141414'/%3e%3c/svg%3e");
}

/* Sidebar: the plan a locked link needs ("Expenses  Books"). The sidebar is
   dark in both themes, so the tag reads the sidebar's own foreground. */
#left-nav .nav-plan-tag {
  margin-left: 0.35rem;
  padding: 0 0.35rem;
  border: 1px solid var(--sidebar-switcher-border);
  border-radius: 999px;
  font-size: 0.7rem;
  opacity: 0.8;
}

/* Dashboard earnings row with "Finished, not invoiced yet": the three figures wrap at phone
   width, so each one starts at the left edge instead of hanging off to the right. */
@media (max-width: 575.98px) {
  .earnings-row-wrap > .text-end {
    text-align: left !important;
  }
}
