@import url("/static/css/bootstrap-icons.css");

/* ==========================================================================
   Brand variables
   Bootswatch ships components with colors baked in at build time rather than
   referencing root custom properties everywhere, so utility classes
   (.text-primary, .bg-secondary, ...) are re-themed via the root vars below,
   while components with their own baked-in vars (.btn-*, .page-link, ...)
   are re-themed explicitly further down.
   ========================================================================== */
:root {
    --bs-primary: #00697a;
    --bs-primary-rgb: 0, 105, 122;
    --bs-primary-text-emphasis: #004650;
    --bs-primary-bg-subtle: #d9edf0;
    --bs-primary-border-subtle: #a9d3d9;
    --bs-link-color: #00697a;
    --bs-link-color-rgb: 0, 105, 122;
    --bs-link-hover-color: #004d5c;
    --bs-link-hover-color-rgb: 0, 77, 92;
    --bs-focus-ring-color: rgba(0, 105, 122, 0.25);

    /* Zephyr's stock "secondary" is white (meant as a pill on dark surfaces),
       which renders invisible on our white cards/backgrounds. Re-themed to a
       slate that holds AA contrast (7.6:1) as text-on-white AND as a fill
       under white text. */
    --bs-secondary: #475569;
    --bs-secondary-rgb: 71, 85, 105;

    /* Zephyr's stock success/info/warning fail WCAG AA as outline-button text
       on white (success 2.7:1, info 4.6:1, warning ~1.7:1) — darkened here so
       every .btn-outline-* and .text-* utility stays legible. Each new value
       also holds solid AA contrast as a fill under white text, so the same
       darker tone works for .btn-success/.text-bg-success/etc. too. */
    --bs-success: #187a52;
    --bs-success-rgb: 24, 122, 82;
    --bs-info: #1a5a80;
    --bs-info-rgb: 26, 90, 128;
    --bs-warning: #92620a;
    --bs-warning-rgb: 146, 98, 10;

    --rfp-accent: #eecf00;
    --rfp-accent-dark: #b89b00;
    --rfp-canvas: #f4f6f8;
    --rfp-surface: #ffffff;
    --rfp-border: #e2e6ea;
    --rfp-radius: 0.75rem;
}

/* ==========================================================================
   Component-level recoloring (baked-in custom properties)
   ========================================================================== */
.btn-primary {
    --bs-btn-bg: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-bg: #004d5c;
    --bs-btn-hover-border-color: #004150;
    --bs-btn-active-bg: #004150;
    --bs-btn-active-border-color: #003844;
    --bs-btn-focus-shadow-rgb: 0, 105, 122;
    --bs-btn-disabled-bg: var(--bs-primary);
    --bs-btn-disabled-border-color: var(--bs-primary);
}

.btn-outline-primary {
    --bs-btn-color: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-bg: var(--bs-primary);
    --bs-btn-hover-border-color: var(--bs-primary);
    --bs-btn-active-bg: var(--bs-primary);
    --bs-btn-active-border-color: var(--bs-primary);
    --bs-btn-focus-shadow-rgb: 0, 105, 122;
}

.btn-secondary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--bs-secondary);
    --bs-btn-border-color: var(--bs-secondary);
    --bs-btn-hover-bg: #556173;
    --bs-btn-hover-border-color: #4d5967;
    --bs-btn-active-bg: #4d5967;
    --bs-btn-active-border-color: #454f5c;
}

.btn-outline-secondary {
    --bs-btn-color: var(--bs-secondary);
    --bs-btn-border-color: var(--bs-secondary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--bs-secondary);
    --bs-btn-hover-border-color: var(--bs-secondary);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--bs-secondary);
    --bs-btn-active-border-color: var(--bs-secondary);
}

.btn-success {
    --bs-btn-bg: var(--bs-success);
    --bs-btn-border-color: var(--bs-success);
    --bs-btn-hover-bg: #125f40;
    --bs-btn-hover-border-color: #105539;
    --bs-btn-active-bg: #105539;
    --bs-btn-active-border-color: #0d4a31;
    --bs-btn-disabled-bg: var(--bs-success);
    --bs-btn-disabled-border-color: var(--bs-success);
}

.btn-outline-success {
    --bs-btn-color: var(--bs-success);
    --bs-btn-border-color: var(--bs-success);
    --bs-btn-hover-bg: var(--bs-success);
    --bs-btn-hover-border-color: var(--bs-success);
    --bs-btn-active-bg: var(--bs-success);
    --bs-btn-active-border-color: var(--bs-success);
}

.btn-info {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--bs-info);
    --bs-btn-border-color: var(--bs-info);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #164a68;
    --bs-btn-hover-border-color: #144160;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #144160;
    --bs-btn-active-border-color: #113857;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--bs-info);
    --bs-btn-disabled-border-color: var(--bs-info);
}

.btn-outline-info {
    --bs-btn-color: var(--bs-info);
    --bs-btn-border-color: var(--bs-info);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--bs-info);
    --bs-btn-hover-border-color: var(--bs-info);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--bs-info);
    --bs-btn-active-border-color: var(--bs-info);
}

.btn-warning {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--bs-warning);
    --bs-btn-border-color: var(--bs-warning);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #74500b;
    --bs-btn-hover-border-color: #6b490a;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #6b490a;
    --bs-btn-active-border-color: #614109;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--bs-warning);
    --bs-btn-disabled-border-color: var(--bs-warning);
}

.btn-outline-warning {
    --bs-btn-color: var(--bs-warning);
    --bs-btn-border-color: var(--bs-warning);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--bs-warning);
    --bs-btn-hover-border-color: var(--bs-warning);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--bs-warning);
    --bs-btn-active-border-color: var(--bs-warning);
}

.btn-link {
    --bs-btn-color: var(--bs-primary);
    --bs-btn-hover-color: #004d5c;
}

.nav-pills {
    --bs-nav-pills-link-active-bg: var(--bs-primary);
}

.nav-tabs {
    --bs-nav-tabs-link-active-border-color: transparent transparent var(--bs-primary);
}
.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
    color: var(--bs-primary);
    font-weight: 600;
    border-bottom-width: 2px;
}

.page-link {
    color: var(--bs-primary);
}
.page-item.active .page-link {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
}

.progress-bar {
    background-color: var(--bs-primary);
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--bs-primary);
}

.spinner-border.text-primary,
.spinner-grow.text-primary {
    color: var(--bs-primary) !important;
}

/* ==========================================================================
   Global layout & typography
   ========================================================================== */
body {
    background-color: var(--rfp-canvas);
    font-size: 1.0625rem;
}

/* Zephyr sets every .btn (including .btn-sm) to the same small 0.875rem
   font-size regardless of size variant — bump both for a command-center
   that needs to be read at a glance, not squinted at. */
.btn {
    --bs-btn-font-size: 1rem;
}

.btn-sm {
    --bs-btn-font-size: 0.9rem;
}

body > .container:first-of-type,
body > .container-fluid:first-of-type {
    margin-bottom: 140px;
}

h1, h2, h3 {
    font-weight: 700;
}

/* Logo sizing */
img#logo {
    height: 40px;
    max-height: 48px;
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
    background-color: var(--rfp-surface);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.05);
    position: sticky;
    top: 0;
    z-index: 1030;
}

/* The navbar's inner .container is what the account dropdown (ms-auto) is
   right-aligned within — let it span the full navbar so "right of the
   navbar" means the actual screen edge, not the content column's edge.
   !important is defensive: this must always win over the plain .container
   rules below at every breakpoint, with no exceptions. */
.navbar > .container,
.navbar .container {
    max-width: 100% !important;
    width: 100%;
}

.navbar-brand {
    color: var(--bs-primary) !important;
    font-weight: 700;
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: #495463;
    padding: 0.5rem 0.9rem !important;
    border-radius: 0.5rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: var(--bs-primary);
    background-color: var(--bs-primary-bg-subtle);
}

.navbar-nav .nav-link.active {
    color: var(--bs-primary);
    font-weight: 600;
}

/* ==========================================================================
   Cards & surfaces
   ========================================================================== */
.card {
    border: 1px solid var(--rfp-border);
    border-radius: var(--rfp-radius);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.04);
}

.card-title {
    font-weight: 600;
}

.dropdown-menu {
    border: 1px solid var(--rfp-border);
    border-radius: 0.65rem;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
}

/* ==========================================================================
   Overview / stat cards (dashboard summary row)
   ========================================================================== */
.overview-cards {
    white-space: nowrap;
    overflow-x: auto;
}

.overview-cards .card {
    min-width: 230px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.overview-cards .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 24, 40, 0.1);
}

.overview-cards .card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.05rem;
    color: #506070;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.overview-cards .badge {
    font-size: 1.25rem;
    font-weight: 700;
    padding: 0.4em 0.7em;
}

/* ==========================================================================
   Kanban / pipeline board
   ========================================================================== */
.kanban-board {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 0.5rem;
}

.kanban-column {
    min-width: 260px;
    flex-shrink: 0;
    background-color: #eef1f4;
    border: 1px solid var(--rfp-border);
    border-radius: var(--rfp-radius);
    padding: 1rem;
    min-height: 200px;
}

.kanban-column h5 {
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #33404d;
}

.kanban-items {
    min-height: 100px;
    padding-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.rfp-card {
    background-color: var(--rfp-surface);
    border: 1px solid var(--rfp-border);
    border-left: 3px solid var(--bs-primary);
    border-radius: 0.6rem;
    padding: 0.85rem 1rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    overflow-wrap: break-word;
}

.rfp-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(16, 24, 40, 0.12);
}

.rfp-card h5.text-primary {
    font-size: 1.05rem;
    font-weight: 600;
}

.rfp-card .btn {
    margin-top: 0.5rem;
}

/* Truncated title styling */
.rfp-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Deadline box */
.deadline-box {
    border: 2px solid var(--rfp-border);
    border-radius: 0.5rem;
    padding: 0.45rem 0.9rem;
    font-weight: 600;
    font-size: 1rem;
    display: inline-block;
}

/* Long-form opportunity text stays at a comfortable reading width even
   though the page shell itself is now full-bleed. */
.rfp-description {
    max-width: 80ch;
}

/* ==========================================================================
   Tables
   ========================================================================== */
.table {
    --bs-table-bg: var(--rfp-surface);
}

.table thead th {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #506070;
    border-bottom-width: 1px;
}

.table td, .table th {
    font-size: 1rem;
}

.table-responsive {
    border-radius: var(--rfp-radius);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--rfp-surface);
    color: #667085;
    padding: 0.75rem 1rem;
    text-align: center;
    border-top: 1px solid var(--rfp-border);
    font-size: 0.875rem;
}

.footer-link {
    color: var(--bs-primary);
    font-weight: 600;
    text-decoration: none;
}

.footer-link:hover {
    color: #004d5c;
    text-decoration: underline;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    #kanban-tab, #kanban {
        display: none !important;
    }

    .kanban-column {
        min-width: 220px;
    }
}

.container {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

/* Zephyr freezes .container at 1140px past 1200px viewports, wasting most of
   a laptop/desktop screen. Let it keep growing on larger monitors instead —
   a "command center" dashboard should use the room it has. */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

@media (min-width: 1600px) {
    .container {
        max-width: 1520px;
    }
}

@media (min-width: 1900px) {
    .container {
        max-width: 1800px;
    }
}

/* Slim, modern scrollbars for horizontally scrolling boards */
.kanban-board::-webkit-scrollbar,
.overview-cards::-webkit-scrollbar {
    height: 8px;
}

.kanban-board::-webkit-scrollbar-thumb,
.overview-cards::-webkit-scrollbar-thumb {
    background-color: #c7ccd3;
    border-radius: 4px;
}
