/* =============================================================================
   CORTICO-X BRAND THEME - now layered on top of self-hosted Bootstrap 5
   =============================================================================
   Load order (see _Layout.cshtml): bootstrap.min.css, then this file - so
   these rules win the cascade without needing !important anywhere.

   Colors are exact, pulled directly from the brand SVG (wwwroot/img/logo.svg):
   navy #0F1D41, teal #35BFAE, slate gray #5E6783.

   Bootstrap's CSS variables (--bs-primary, --bs-link-color, etc.) are
   remapped below to those brand colors, so Bootstrap's own components
   (buttons, forms, tables, alerts) pick up the Cortico-X palette automatically
   without us having to override every component's rules by hand.
   ============================================================================= */
:root {
    --color-navy: #0f1d41;
    --color-navy-dark: #0a1530;
    --color-slate-dark: #2d323c;
    --color-teal: #35bfae;
    --color-teal-dark: #279e90;
    --color-teal-light: #6fd4c7;
    --color-bg: #ffffff;
    --color-bg-muted: #f4f7f8;
    --color-border: #e1e6e8;
    --color-text: #1a2733;
    --color-text-muted: #5e6783;
    --font-family-base: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* --- Bootstrap variable remap --- */
    --bs-body-font-family: var(--font-family-base);
    --bs-body-color: var(--color-text);
    --bs-primary: var(--color-teal);
    --bs-primary-rgb: 53, 191, 174;
    --bs-link-color: var(--color-teal-dark);
    --bs-link-hover-color: var(--color-navy);
    --bs-border-color: var(--color-border);
    --bs-border-radius: 0.5rem;
}

body {
    font-family: var(--font-family-base);
}

h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--color-navy);
}


.col-w-10 {
    width: 10%;
}

.col-w-15 {
    width: 15%;
}

.col-w-20 {
    width: 20%;
}

.col-w-25 {
    width: 25%;
}

.col-w-30 {
    width: 30%;
}

.col-w-35 {
    width: 35%;
}

.col-w-40 {
    width: 40%;
}

.col-w-45 {
    width: 45%;
}

.col-w-50 {
    width: 50%;
}

/* Bootstrap's default heading sizes are fine; we only need brand color/weight. */

/* --- Buttons: brand colors layered on Bootstrap's own default shape/sizing
   (no more pill/uppercase override - matches the standard Bootstrap button
   look, just in Cortico-X teal) --- */
.btn-primary {
    --bs-btn-bg: var(--color-teal);
    --bs-btn-border-color: var(--color-teal);
    --bs-btn-hover-bg: var(--color-teal-dark);
    --bs-btn-hover-border-color: var(--color-teal-dark);
    --bs-btn-active-bg: var(--color-teal-dark);
    --bs-btn-active-border-color: var(--color-teal-dark);
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    color: #fff !important;
}

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

.btn-outline-primary:hover,
.btn-outline-primary:active {
    color: #fff !important;
}

/* --- Header: dark navy, using the white/teal logo variant (the navy-text
   SVG would disappear here) --- */
.site-header {
    background: var(--color-navy);
}

.site-header__inner {
    padding: 1rem 1.5rem;
}

.site-header__brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.site-header__brand img {
    display: block;
}

.site-header__wordmark {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.site-nav-link {
    color: #fff !important;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-nav-link:hover {
    color: var(--color-teal-light) !important;
}

.site-user-menu__trigger {
    color: #fff !important;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none !important;
}

.site-user-menu__trigger:hover {
    color: var(--color-teal-light) !important;
}

html, body {
    height: 100%;
}

.page-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    padding: 2rem 1.5rem;
    flex: 1 0 auto;
}

/* --- Footer: dark slate (distinct from the navy header), text right-justified --- */
.site-footer {
    background: var(--color-slate-dark);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.8rem;
    flex-shrink: 0;
}

.site-footer__inner {
    padding: 1.25rem 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: right;
}

/* --- Page width: most pages fill the screen edge-to-edge. Account/login
   pages (ViewData["NarrowLayout"] = true) keep their header/footer at the
   medium (1200px) width and only narrow the actual form content (main). --- */
.layout-width--wide {
    width: 100%;
    max-width: none;
    margin: 0;
}

.layout-width--medium {
    max-width: 1200px;
    margin: 0 auto;
}

.layout-width--narrow {
    max-width: 480px;
    margin: 0 auto;
}

/* --- Plain table wrapper: border/radius container, no sticky header or
   columns (removed - position:sticky on table cells was interfering with
   the colgroup-driven column widths in some browsers, and wasn't worth
   fighting). Just a normal table that scrolls with the page. --- */
.table-wrap {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.table-wrap > table {
    width: 100%;
    table-layout: fixed;
    margin-bottom: 0;
}

/* --- Tables: brand-color header row on top of Bootstrap's .table --- */
.table thead th {
    background: var(--color-bg-muted);
    color: var(--color-navy);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-bottom-width: 1px;
}

/* asp-validation-summary/asp-validation-for always render an empty <ul><li>
   placeholder even when there are no errors, tagged with these "-valid"
   classes - hide them, or you get a stray empty bullet on every page. This
   is an ASP.NET Core tag helper behavior, unrelated to Bootstrap. */
.validation-summary-valid,
.field-validation-valid {
    display: none;
}

/* --- Project detail --- */
.project-header {
    margin-bottom: 1.5rem;
}

.project-header__switcher {
    display: inline-block;
    width: auto;
    max-width: 420px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-navy);
    border-color: var(--color-border);
}

.project-header__meta {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.3rem 1rem;
    margin: 0;
}

.project-header__meta dt {
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.project-header__meta dd {
    margin: 0;
}

.project-header__contact-icon {
    color: var(--color-teal-dark);
    margin-left: 0.5rem;
    display: inline-flex;
    vertical-align: middle;
}

.project-header__contact-icon:hover {
    color: var(--color-navy);
}

.project-tabs .nav-link {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
}

.project-tabs .nav-link.active {
    color: var(--color-navy);
    background: transparent;
    border-bottom-color: var(--color-teal);
}

.quota-group {
    margin-bottom: 1.75rem;
}

.quota-group h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
}

.quota-group__totals {
    font-weight: 400;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* --- Totals row (Daily Status / Dispositions / Quotas tables) --- */
.table-total-row td,
.table-total-row th {
    background: var(--color-bg-muted) !important;
    font-weight: 700;
    color: var(--color-navy);
    border-top: 2px solid var(--color-border);
}

/* --- Whole-row clickable tables: put data-href="..." on the <tr> (class
   clickable-row) plus a real <a> in one cell for keyboard access - see the
   click handler in site.js for how the rest of the row becomes clickable. --- */
.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background: var(--color-bg-muted);
}

/* --- Users admin forms --- */
fieldset.card {
    padding: 0.85rem 1.1rem;
}

fieldset legend {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-navy);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    width: auto;
    padding: 0 0.4rem;
}

.registration-link-notice {
    background: var(--color-bg-muted);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.85rem 1.1rem;
    word-break: break-all;
}

/* --- Cookie consent banner + floating "manage preferences" trigger ---
   Our app doesn't currently set any non-essential/tracking cookies, so this
   consent choice doesn't gate anything yet - it's here to match the
   cortico-x.com UX pattern and give a compliant place to plug real
   analytics/marketing scripts into later, behind the Accept/Reject choice. */
.cookie-consent__trigger {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--color-teal);
    color: #06231f;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.cookie-consent__trigger.is-visible {
    display: inline-flex;
}

.cookie-consent__trigger:hover {
    background: var(--color-teal-dark);
}

.cookie-consent__banner {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 20px rgba(15, 29, 65, 0.12);
    padding: 1.25rem 1.5rem;
}

.cookie-consent__banner.is-visible {
    display: block;
}

.cookie-consent__inner {
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-consent__inner h2 {
    margin-bottom: 0.5rem;
}

.cookie-consent__inner p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.cookie-consent__customize {
    display: none;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 0.75rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.cookie-consent__customize.is-visible {
    display: flex;
}

.cookie-consent__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

#cookie-consent-save {
    display: none;
}

#cookie-consent-save.is-visible {
    display: inline-block;
}


