/*
 * OneFlow — Memory Ventures brand theme
 * Loaded after MatDash styles.css so these overrides win.
 * Primary = Navy #222E3C · Accent = Orange #F0A459
 * Contrast rule: navy text on orange (7.6:1), never white on orange (1.8:1).
 */
:root {
    /* Brand tokens */
    --mv-navy: #222e3c;
    --mv-navy-400: #535c67;
    --mv-navy-600: #1e2835;
    --mv-navy-700: #19222c;
    --mv-orange: #f0a459;
    --mv-orange-600: #d8944f;
    --mv-orange-bg-subtle: #fdf3e8;

    /* Retarget Bootstrap's primary onto brand navy (drives our of- components too) */
    --bs-primary: #222e3c;
    --bs-primary-rgb: 34, 46, 60;
    --bs-primary-text-emphasis: #19222c;
    --bs-primary-bg-subtle: #edeeef;
    --bs-primary-border-subtle: #b4b8bd;
    --bs-link-color: #222e3c;
    --bs-link-color-rgb: 34, 46, 60;
    --bs-link-hover-color: #d8944f;

    /* Retarget secondary onto brand orange (MatDash's default secondary was teal) */
    --bs-secondary: #f0a459;
    --bs-secondary-rgb: 240, 164, 89;
    --bs-secondary-text-emphasis: #8a4b12;
    --bs-secondary-bg-subtle: #fcead8;
    --bs-secondary-border-subtle: #f5d4b3;
}

/* The html carries data-bs-theme; match that specificity so the override always wins. */
:root[data-bs-theme='light'],
:root[data-bs-theme='dark'] {
    --bs-primary: #222e3c;
    --bs-primary-rgb: 34, 46, 60;
    --bs-secondary: #f0a459;
    --bs-secondary-rgb: 240, 164, 89;
    --bs-secondary-bg-subtle: #fcead8;
    --bs-secondary-border-subtle: #f5d4b3;
    --bs-secondary-text-emphasis: #8a4b12;
}

/* Primary buttons → navy (white text, 13.8:1 AAA) */
.btn-primary {
    --bs-btn-bg: #222e3c;
    --bs-btn-border-color: #222e3c;
    --bs-btn-hover-bg: #19222c;
    --bs-btn-hover-border-color: #19222c;
    --bs-btn-active-bg: #141b23;
    --bs-btn-active-border-color: #141b23;
    --bs-btn-disabled-bg: #222e3c;
    --bs-btn-disabled-border-color: #222e3c;
}

.btn-outline-primary {
    --bs-btn-color: #222e3c;
    --bs-btn-border-color: #222e3c;
    --bs-btn-hover-bg: #222e3c;
    --bs-btn-hover-border-color: #222e3c;
    --bs-btn-active-bg: #222e3c;
}

/* Accent — orange, always with navy text (never white) */
.btn-accent {
    --bs-btn-color: #222e3c;
    --bs-btn-bg: #f0a459;
    --bs-btn-border-color: #f0a459;
    --bs-btn-hover-color: #222e3c;
    --bs-btn-hover-bg: #d8944f;
    --bs-btn-hover-border-color: #d8944f;
    --bs-btn-active-bg: #d8944f;
}

/* Primary badges / subtle pills follow the navy primary */
.text-bg-primary {
    background-color: #222e3c !important;
    color: #fff !important;
}
.bg-primary {
    background-color: #222e3c !important;
}
.text-primary {
    color: #222e3c !important;
}
.bg-primary-subtle {
    background-color: #edeeef !important;
}

/* App shell — dark sidebar with accent rail */
.of-brand-mark {
    background: #f0a459 !important;
    color: #222e3c !important;
}
.of-nav__link.is-active {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}
.of-nav__link.is-active::before {
    background: #f0a459 !important;
}
.of-nav__link:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
}
.of-avatar {
    background: #222e3c !important;
    color: #ffffff !important;
}

/* Inertia page-load progress bar → orange accent */
#nprogress .bar {
    background: #f0a459 !important;
}

/*
 * Secondary family.
 * MatDash's default secondary is teal and `.text-secondary` is used both for muted
 * text AND for accent badges. Split them: muted text → readable navy-grey; the
 * secondary *badges / surfaces* → orange accent (with navy text, never white).
 */

/* Muted text (subtitles, form labels, empty states) — navy-tinted grey, not teal */
.text-secondary {
    color: #5b6673 !important;
}

/* Secondary accent surfaces → orange */
.bg-secondary-subtle {
    background-color: #fcead8 !important;
}
/* Count / accent badges: orange chip with a dark, readable orange number */
.badge.bg-secondary-subtle {
    color: #8a4b12 !important;
}
.text-bg-secondary,
.bg-secondary {
    background-color: #f0a459 !important;
    color: #222e3c !important;
}
.text-bg-secondary {
    color: #222e3c !important;
}

/* Secondary buttons had teal hardcoded → orange with navy text */
.btn-secondary {
    --bs-btn-color: #222e3c;
    --bs-btn-bg: #f0a459;
    --bs-btn-border-color: #f0a459;
    --bs-btn-hover-color: #222e3c;
    --bs-btn-hover-bg: #d8944f;
    --bs-btn-hover-border-color: #d8944f;
    --bs-btn-active-color: #222e3c;
    --bs-btn-active-bg: #d8944f;
    --bs-btn-active-border-color: #d8944f;
    --bs-btn-disabled-color: #222e3c;
    --bs-btn-disabled-bg: #f0a459;
    --bs-btn-disabled-border-color: #f0a459;
}
.btn-outline-secondary {
    --bs-btn-color: #8a4b12;
    --bs-btn-border-color: #f0a459;
    --bs-btn-hover-color: #222e3c;
    --bs-btn-hover-bg: #f0a459;
    --bs-btn-hover-border-color: #f0a459;
    --bs-btn-active-color: #222e3c;
    --bs-btn-active-bg: #f0a459;
    --bs-btn-active-border-color: #f0a459;
}
