﻿/* Workhaus ERP Theme */

/* Typography: Inter for UI and data (high legibility at small sizes, tabular
   numerals for aligned figures), Plus Jakarta Sans for headings. Both are
   self-hosted variable fonts under lib/fonts. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../lib/fonts/inter/inter-latin-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../lib/fonts/inter/inter-latin-ext-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('../lib/fonts/plus-jakarta-sans/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('../lib/fonts/plus-jakarta-sans/plus-jakarta-sans-latin-ext-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --workhaus-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --workhaus-font-display: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --workhaus-dark: #1c1c1c;
    --workhaus-gold: #fdde4d;
    --workhaus-gold-dark: #e5c73e;
    --workhaus-white: #ffffff;
    --workhaus-gray-light: #f8f9fa;
    --workhaus-gray: #6c757d;
    --workhaus-text: #212529;
    --status-retention: #17a2b8;
    --status-draft: #007bff;
    --status-active: #28a745;
    --status-pending: #ffc107;
    --status-closed: #6c757d;

    /* Material Design 3 system tokens, derived from the Workhaus brand.
       Single source of truth for both the Razor shell and the Angular apps
       (Angular pages are hosted inside layouts that load this stylesheet;
       AdminApp's styles.scss maps --mat-sys-* onto these). */

    /* Colour roles */
    --wh-primary: #1c1c1c;
    --wh-on-primary: #ffffff;
    --wh-primary-hover: #343a40;
    --wh-tertiary: #fdde4d;
    --wh-on-tertiary: #1c1c1c;
    --wh-tertiary-hover: #e5c73e;
    --wh-surface: #ffffff;                  /* cards, dialogs, tables */
    --wh-surface-container: #f8f9fa;        /* page background */
    --wh-surface-container-high: #f1f3f5;   /* hover fills, inset panels */
    --wh-surface-container-highest: #e9ecef;
    --wh-on-surface: #212529;
    --wh-on-surface-variant: #6c757d;
    --wh-outline: #dee2e6;
    --wh-outline-variant: #e9ecef;

    /* Semantic roles (colour + tonal container pairs) */
    --wh-error: #dc3545;
    --wh-on-error: #ffffff;
    --wh-error-container: #f8d7da;
    --wh-on-error-container: #842029;
    --wh-success: #198754;
    --wh-success-container: #d4edda;
    --wh-on-success-container: #155724;
    --wh-warning: #ffc107;
    --wh-warning-container: #fff3cd;
    --wh-on-warning-container: #856404;
    --wh-info: #0dcaf0;
    --wh-info-container: #d1ecf1;
    --wh-on-info-container: #0c5460;

    /* State layers: hover 8%, focus/pressed 12% of the on-colour */
    --wh-state-hover: rgba(28, 28, 28, 0.08);
    --wh-state-focus: rgba(28, 28, 28, 0.12);
    --wh-state-hover-on-dark: rgba(255, 255, 255, 0.08);
    --wh-state-focus-on-dark: rgba(255, 255, 255, 0.12);

    /* Shape scale */
    --wh-shape-xs: 4px;    /* menus, text fields */
    --wh-shape-sm: 8px;    /* chips, badges, menu surfaces */
    --wh-shape-md: 12px;   /* cards, table containers */
    --wh-shape-lg: 16px;   /* large panels, wide form dialogs, FAB */
    --wh-shape-xl: 28px;   /* dialogs */
    --wh-shape-full: 999px; /* buttons */

    /* Elevation (M3 shadow levels) */
    --wh-elevation-1: 0 1px 2px rgba(0, 0, 0, 0.30), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
    --wh-elevation-2: 0 1px 2px rgba(0, 0, 0, 0.30), 0 2px 6px 2px rgba(0, 0, 0, 0.15);
    --wh-elevation-3: 0 1px 3px rgba(0, 0, 0, 0.30), 0 4px 8px 3px rgba(0, 0, 0, 0.15);

    /* Keyboard focus ring (gold, offset on white) */
    --wh-focus-ring: 0 0 0 2px var(--wh-surface), 0 0 0 4px var(--wh-tertiary);
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--workhaus-gray-light);
    font-family: var(--workhaus-font-body);
}

/* Headings carry the display face; numbers in tables align via tabular figures */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--workhaus-font-display);
}

table, .mat-mdc-table {
    font-variant-numeric: tabular-nums;
}

main{
    min-height:80vh;
}

/* Header Styles */
.workhaus-header {
    background-color: var(--workhaus-dark) !important;
    padding: 0.5rem 0;
}

.workhaus-header .navbar-brand img {
    max-height: 40px;
}

.workhaus-header .nav-link {
    color: var(--workhaus-white) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    margin: 0.25rem 0.125rem;
    border-radius: var(--wh-shape-full);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.workhaus-header .nav-link:hover {
    color: var(--workhaus-gold) !important;
    background-color: var(--wh-state-hover-on-dark);
}

.workhaus-header .nav-link:focus-visible {
    outline: none;
    background-color: var(--wh-state-focus-on-dark);
}

/* Active item: M3 pill indicator in brand gold */
.workhaus-header .nav-link.active {
    color: var(--workhaus-dark) !important;
    background-color: var(--workhaus-gold);
}

/* Dropdowns as M3 menus: elevated surface, rounded items, state layers */
.workhaus-header .dropdown-menu {
    background-color: var(--wh-surface);
    border: none;
    border-radius: var(--wh-shape-sm);
    box-shadow: var(--wh-elevation-2);
    padding: 0.5rem;
    margin-top: 0.375rem;
}

.workhaus-header .dropdown-item {
    color: var(--wh-on-surface);
    padding: 0.5rem 0.75rem;
    border-radius: var(--wh-shape-xs);
}

.workhaus-header .dropdown-item:hover {
    background-color: var(--wh-state-hover);
    color: var(--workhaus-dark);
}

.workhaus-header .dropdown-item:focus-visible {
    outline: none;
    background-color: var(--wh-state-focus);
}

.workhaus-header .dropdown-item i {
    color: var(--workhaus-gray);
    width: 16px;
    text-align: center;
}

.workhaus-header .dropdown-item:hover i {
    color: var(--workhaus-dark);
}

.workhaus-header .dropdown-divider {
    margin: 0.375rem 0;
}

/* Section labels inside a menu (e.g. Admin: Users & access, Configuration, History) */
.workhaus-header .dropdown-header {
    padding: 0.5rem 0.75rem 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--wh-on-surface-variant);
}

/* The page you are on, inside an open menu: brand gold instead of Bootstrap blue */
.workhaus-header .dropdown-item.active,
.workhaus-header .dropdown-item:active {
    background-color: rgba(253, 222, 77, 0.45);
    color: var(--workhaus-dark);
    font-weight: 600;
}

.workhaus-header .dropdown-item.active:hover {
    background-color: rgba(253, 222, 77, 0.65);
}

.workhaus-header .dropdown-item.active i,
.workhaus-header .dropdown-item:active i {
    color: var(--workhaus-dark);
}

/* Help: a round icon button beside the user menu on wide screens, a plain link in the collapsed menu */
@media (min-width: 1200px) {
    .workhaus-header .nav-link.nav-help {
        width: 36px;
        height: 36px;
        padding: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.125rem;
    }
}

/* User Avatar */
.user-avatar {
    width: 32px;
    height: 32px;
    background-color: var(--workhaus-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar i {
    color: var(--workhaus-dark);
    font-size: 0.875rem;
}

/* Global search (navbar) */
.search-form {
    margin: 0 1rem 0 0.5rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: stretch;
}

.search-input {
    width: 220px;
    border: 1px solid transparent;
    border-radius: var(--wh-shape-full) 0 0 var(--wh-shape-full) !important;
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
    background-color: rgba(255, 255, 255, 0.12);
    color: var(--workhaus-white);
    transition: background-color 0.2s ease, width 0.2s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.search-input:focus {
    outline: none;
    box-shadow: none;
    width: 280px;
    background-color: var(--workhaus-white);
    color: var(--workhaus-dark);
}

.search-input:focus::placeholder {
    color: var(--workhaus-gray);
}

.btn-search {
    background-color: var(--workhaus-gold);
    color: var(--workhaus-dark);
    border: none;
    border-radius: 0 var(--wh-shape-full) var(--wh-shape-full) 0 !important;
    padding: 0.4rem 0.9rem;
    font-weight: 500;
}

.btn-search:hover,
.btn-search:focus-visible {
    background-color: var(--workhaus-gold-dark);
    color: var(--workhaus-dark);
    outline: none;
}

/* Typeahead dropdown under the search box */
.search-typeahead {
    position: absolute;
    top: calc(100% + 0.375rem);
    left: 0;
    right: 0;
    min-width: 360px;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 1060;
    padding: 0.375rem;
    background-color: var(--wh-surface);
    border-radius: var(--wh-shape-sm);
    box-shadow: var(--wh-elevation-2);
}

.search-typeahead[hidden] {
    display: none;
}

.search-typeahead-group {
    padding: 0.5rem 0.75rem 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--wh-on-surface-variant);
}

.search-typeahead-group i {
    width: 14px;
    margin-right: 0.35rem;
    text-align: center;
}

.search-typeahead-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.45rem 0.75rem;
    border-radius: var(--wh-shape-xs);
    color: var(--wh-on-surface);
    text-decoration: none;
}

.search-typeahead-item:hover,
.search-typeahead-item.is-active {
    background-color: var(--wh-state-hover);
    color: var(--workhaus-dark);
    text-decoration: none;
}

.search-typeahead-title {
    font-size: 0.875rem;
    font-weight: 500;
}

.search-typeahead-sub {
    font-size: 0.75rem;
    color: var(--wh-on-surface-variant);
}

.search-typeahead-empty {
    padding: 0.6rem 0.75rem;
    font-size: 0.8125rem;
    color: var(--wh-on-surface-variant);
}

.search-typeahead-more {
    display: block;
    margin-top: 0.25rem;
    padding: 0.6rem 0.75rem;
    border-top: 1px solid var(--wh-outline-variant);
    border-radius: 0 0 var(--wh-shape-xs) var(--wh-shape-xs);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--workhaus-dark);
    text-decoration: none;
}

.search-typeahead-more:hover,
.search-typeahead-more.is-active {
    background-color: var(--wh-state-hover);
    text-decoration: none;
}

@media (max-width: 1199.98px) {
    .search-form {
        margin: 0.5rem 0;
    }

    .search-box {
        width: 100%;
    }

    .search-input,
    .search-input:focus {
        width: 100%;
    }

    .search-typeahead {
        min-width: 0;
    }
}

/* Between 1200px and 1400px the bar is tight: slimmer menu pills and a narrower
   search box (it still widens on focus). Kept after the search rules so it wins. */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .workhaus-header .nav-link {
        padding: 0.5rem 0.75rem !important;
    }

    .search-input {
        width: 180px;
    }
}

/* Breadcrumb Bar */
.breadcrumb-bar {
    background-color: var(--workhaus-gold);
    padding: 0.5rem 0;
    color: var(--workhaus-dark);
    font-weight: 500;
    font-size: 0.875rem;
}

/* Test System Banner
   Shown at the top of every page when appsettings "IsTestSystem" is true. Red on
   purpose, so it cannot be mistaken for the gold breadcrumb bar or the dark header. */
.test-system-banner {
    background: repeating-linear-gradient(-45deg, #b71c1c 0, #b71c1c 16px, #c62828 16px, #c62828 32px);
    color: #fff;
    text-align: center;
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
}

.test-system-banner i {
    margin-right: 0.35rem;
}

.test-system-banner strong {
    font-weight: 700;
    letter-spacing: 0.08em;
}

/* On the sign-in pages the body centres its content, so the strip is pinned to the
   top instead (as .login-footer is pinned to the bottom) and the body makes room for it. */
.login-body .test-system-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    padding: 0.6rem 1rem;
    font-size: 1rem;
}

.login-body:has(.test-system-banner) {
    padding-top: 4rem;
}

@media (max-width: 576px) {
    .test-system-banner-detail {
        display: none;
    }
}

/* Main Content Area */
main {
    background-color: var(--workhaus-gray-light);
    min-height: 80vh;
}

/* Page Titles */
.page-title {
    font-family: var(--workhaus-font-display);
    font-size: 2rem;
    font-weight: 300;
    color: var(--workhaus-text);
    margin-bottom: 1.5rem;
}

.section-title {
    font-family: var(--workhaus-font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--workhaus-text);
    margin-bottom: 1rem;
}

/* Project Cards */
.project-card {
    background-color: var(--wh-surface);
    border: none;
    border-radius: var(--wh-shape-md);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--wh-elevation-1);
    transition: box-shadow 0.2s ease;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    box-shadow: var(--wh-elevation-2);
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.project-number {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--workhaus-text);
    margin: 0;
    flex: 1;
    padding-right: 0.5rem;
}

.project-number a {
    color: inherit;
    text-decoration: none;
}

.project-client {
    font-size: 0.9rem;
    color: var(--workhaus-gray);
    margin-bottom: 0.25rem;
}

.project-date {
    font-size: 0.85rem;
    color: var(--workhaus-gray);
    margin-bottom: 0;
}

.project-card-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: auto;
    padding-top: 0.75rem;
}

.project-view-btn {
    color: var(--workhaus-gray);
    font-size: 1.25rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.project-view-btn:hover {
    color: var(--workhaus-dark);
}

/* Status Badges */
/* Status badges: M3 tonal chips (container colour, no border) */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--wh-shape-sm);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
    border: none;
    white-space: nowrap;
}

.status-retention {
    color: var(--status-retention);
    border-color: var(--status-retention);
    background-color: rgba(23, 162, 184, 0.1);
}

.status-draft {
    color: var(--status-draft);
    border-color: var(--status-draft);
    background-color: rgba(0, 123, 255, 0.1);
}

.status-active {
    color: var(--status-active);
    border-color: var(--status-active);
    background-color: rgba(40, 167, 69, 0.1);
}

.status-pending {
    color: #856404;
    border-color: var(--status-pending);
    background-color: rgba(255, 193, 7, 0.1);
}

.status-closed {
    color: var(--status-closed);
    border-color: var(--status-closed);
    background-color: rgba(108, 117, 125, 0.1);
}

/* Red: dead, cancelled, rejected, lost, overdue */
.status-danger {
    color: #b02a37;
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

/* Indigo: converted, completed, closed out */
.status-info {
    color: #59359a;
    border-color: #6f42c1;
    background-color: rgba(111, 66, 193, 0.1);
}

/* Project Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

@media (min-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 576px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* Footer */
.footer {
    background-color: var(--workhaus-dark);
    padding: 0.75rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-left,
.footer-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-brand {
    color: var(--workhaus-gold);
    font-weight: 600;
    font-size: 0.85rem;
}

.footer-module {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

.footer-separator {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

.footer-version {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    font-family: 'Consolas', 'Monaco', monospace;
}

@media (max-width: 576px) {
    .footer-content {
        justify-content: center;
        text-align: center;
    }
}

/* Button Styles (M3: pill shape, label-large type, state layers) */
.btn-primary,
.btn-workhaus,
.btn-login {
    border-radius: var(--wh-shape-full);
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background-color: var(--wh-primary);
    border-color: var(--wh-primary);
}

.btn-primary:hover {
    background-color: var(--wh-primary-hover);
    border-color: var(--wh-primary-hover);
}

.btn-workhaus {
    background-color: var(--workhaus-gold);
    border-color: var(--workhaus-gold);
    color: var(--workhaus-dark);
}

.btn-workhaus:hover {
    background-color: var(--workhaus-gold-dark);
    border-color: var(--workhaus-gold-dark);
    color: var(--workhaus-dark);
}

/* Focus states: gold ring for keyboard focus, M3 primary outline for fields */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus {
    box-shadow: var(--wh-focus-ring);
}

.form-control:focus,
.form-check-input:focus {
    border-color: var(--wh-primary);
    box-shadow: 0 0 0 1px var(--wh-primary), 0 0 0 4px rgba(253, 222, 77, 0.25);
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--workhaus-gray);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Loading State */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

/* Utility Classes */
.text-workhaus {
    color: var(--workhaus-dark);
}

.text-gold {
    color: var(--workhaus-gold);
}

.bg-workhaus {
    background-color: var(--workhaus-dark);
}

.bg-gold {
    background-color: var(--workhaus-gold);
}

/* ========================================
   Login Page Styles
   ======================================== */

.login-body {
    background: linear-gradient(135deg, var(--workhaus-dark) 0%, #2d2d2d 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.login-container {
    width: 100%;
    max-width: 420px;
    margin: auto;
}

.login-card {
    background-color: var(--wh-surface);
    border-radius: var(--wh-shape-xl);
    box-shadow: var(--wh-elevation-3), 0 1rem 3rem rgba(0, 0, 0, 0.3);
    padding: 2.5rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

.login-title {
    font-family: var(--workhaus-font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--workhaus-dark);
    margin: 0;
}

.login-subtitle {
    font-size: 0.875rem;
    color: var(--workhaus-gray);
    margin: 0.25rem 0 0 0;
}

.login-form .form-label {
    font-weight: 500;
    color: var(--workhaus-text);
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
}

/* Input groups restyled as M3 outlined text fields: a single outline wraps
   icon + input + trailing button; primary border + gold ring on focus */
.login-form .input-group {
    border: 1px solid var(--wh-outline);
    border-radius: var(--wh-shape-sm);
    background-color: var(--wh-surface);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-form .input-group:focus-within {
    border-color: var(--wh-primary);
    box-shadow: inset 0 0 0 1px var(--wh-primary), 0 0 0 4px rgba(253, 222, 77, 0.25);
}

.login-form .input-group:has(.is-invalid) {
    border-color: var(--wh-error);
}

.login-form .input-group-text {
    background-color: transparent;
    border: none;
    color: var(--workhaus-gray);
}

.login-form .form-control {
    border-color: var(--wh-outline);
    border-radius: var(--wh-shape-sm);
    padding: 0.625rem 0.875rem;
}

.login-form .input-group .form-control {
    border: none;
    background-color: transparent;
}

.login-form .input-group .form-control:focus {
    border: none;
    box-shadow: none;
}

.toggle-password,
.login-form .input-group .btn {
    border: none;
    background-color: transparent;
    color: var(--workhaus-gray);
}

.toggle-password:hover {
    background-color: var(--wh-state-hover);
    color: var(--workhaus-dark);
}

.toggle-password:focus,
.toggle-password:active:focus {
    box-shadow: none;
    color: var(--workhaus-dark);
}

.form-check-input:checked {
    background-color: var(--workhaus-dark);
    border-color: var(--workhaus-dark);
}

.forgot-password-link {
    font-size: 0.875rem;
    color: var(--workhaus-gray);
    text-decoration: none;
}

.forgot-password-link:hover {
    color: var(--workhaus-dark);
    text-decoration: underline;
}

.btn-login {
    background-color: var(--workhaus-dark);
    border-color: var(--workhaus-dark);
    color: var(--workhaus-white);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.btn-login:hover {
    background-color: var(--workhaus-gold);
    border-color: var(--workhaus-gold);
    color: var(--workhaus-dark);
}

.btn-login:focus {
    box-shadow: 0 0 0 0.2rem rgba(253, 222, 77, 0.5);
}

.login-help {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--wh-outline-variant);
}

.login-help p {
    font-size: 0.8rem;
    color: var(--workhaus-gray);
    margin: 0;
}

.login-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.login-footer .footer-copyright,
.login-footer .footer-version {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

.login-footer .footer-separator {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
}

.login-footer .footer-version {
    font-family: 'Consolas', 'Monaco', monospace;
}

/* Login validation styles */
.login-form .alert-danger {
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.login-form .text-danger {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

/* ========================================
   Two-Factor Authentication Styles
   ======================================== */

.twofa-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--workhaus-gold) 0%, #e5c73e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.twofa-icon i {
    font-size: 1.75rem;
    color: var(--workhaus-dark);
}

.twofa-info {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--wh-surface-container-high);
    border-radius: var(--wh-shape-md);
}

.twofa-info p {
    margin: 0;
    color: var(--workhaus-gray);
    font-size: 0.875rem;
}

.twofa-email {
    font-weight: 600;
    color: var(--workhaus-dark) !important;
    margin: 0.5rem 0 !important;
    font-size: 1rem !important;
}

.twofa-expiry {
    font-size: 0.75rem !important;
    color: var(--status-retention) !important;
}

.code-input-container {
    display: flex;
    justify-content: center;
}

.code-input {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: 0.5rem;
    padding: 0.75rem 1rem;
    max-width: 200px;
    font-family: 'Consolas', 'Monaco', monospace;
    border-radius: var(--wh-shape-sm);
}

.code-input::placeholder {
    color: var(--wh-outline);
    letter-spacing: 0.5rem;
}

.code-input:focus {
    border-color: var(--wh-primary);
    box-shadow: 0 0 0 1px var(--wh-primary), 0 0 0 4px rgba(253, 222, 77, 0.25);
}

.twofa-actions {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--wh-outline-variant);
}

.twofa-actions p {
    font-size: 0.875rem;
    color: var(--workhaus-gray);
    margin-bottom: 0.5rem;
}

.resend-link {
    color: var(--workhaus-dark);
    font-weight: 500;
    text-decoration: none;
    padding: 0;
}

.resend-link:hover {
    color: var(--workhaus-gold);
    text-decoration: underline;
}

.back-to-login {
    font-size: 0.875rem;
    color: var(--workhaus-gray);
    text-decoration: none;
}

.back-to-login:hover {
    color: var(--workhaus-dark);
}

.login-form .alert-success {
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

/* ========================================
   Password Reset & Confirmation Styles
   ======================================== */

.success-icon {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

.success-icon i {
    color: white !important;
}

.confirmation-message {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--wh-surface-container-high);
    border-radius: var(--wh-shape-md);
    margin-bottom: 1.5rem;
}

.confirmation-message p {
    margin: 0;
    color: var(--workhaus-text);
    font-size: 0.9375rem;
}

.confirmation-message p.text-muted {
    margin-top: 0.75rem;
}

.confirmation-tips {
    padding: 1rem;
    border: 1px solid var(--wh-outline-variant);
    border-radius: var(--wh-shape-md);
    margin-bottom: 1rem;
}

.confirmation-tips .tips-title {
    font-weight: 600;
    color: var(--workhaus-dark);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.confirmation-tips ul {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.8125rem;
    color: var(--workhaus-gray);
}

.confirmation-tips li {
    margin-bottom: 0.25rem;
}

.password-requirements {
    padding: 1rem;
    background-color: var(--wh-surface-container-high);
    border-radius: var(--wh-shape-md);
    border-left: 3px solid var(--workhaus-gold);
}

.password-requirements .requirements-title {
    font-weight: 600;
    color: var(--workhaus-dark);
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
}

.password-requirements ul {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.75rem;
    color: var(--workhaus-gray);
}

.password-requirements li {
    margin-bottom: 0.125rem;
}

/* ========================================
   KPI cards (Reports page). The Dashboard's own styles live in AdminApp.
   ======================================== */


/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

@media (max-width: 992px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
}

.kpi-card {
    background-color: var(--wh-surface);
    border: none;
    border-left: 4px solid var(--workhaus-gold);
    border-radius: var(--wh-shape-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--wh-elevation-1);
    transition: box-shadow 0.2s ease;
}

.kpi-card:hover {
    box-shadow: var(--wh-elevation-2);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    background-color: var(--wh-surface-container-high);
    border-radius: var(--wh-shape-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-icon i {
    font-size: 1.25rem;
    color: var(--workhaus-dark);
}

.kpi-content {
    flex: 1;
    min-width: 0;
}

.kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--workhaus-dark);
    line-height: 1.2;
}

.kpi-label {
    font-size: 0.8125rem;
    color: var(--workhaus-gray);
    margin-top: 0.125rem;
}

/* Enhanced Project Cards */
.project-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--workhaus-dark);
    margin-bottom: 0.5rem;
}

.project-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.progress-bar-container {
    flex: 1;
    height: 6px;
    background-color: var(--wh-surface-container-highest);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--workhaus-gold);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.75rem;
    color: var(--workhaus-gray);
    white-space: nowrap;
}

.project-last-activity {
    font-size: 0.75rem;
    color: var(--workhaus-gray);
    font-style: italic;
}

/* Status Summary Bar */
.status-summary {
    background-color: var(--wh-surface);
    border: none;
    border-radius: var(--wh-shape-md);
    padding: 1.25rem;
    margin-top: 2rem;
    box-shadow: var(--wh-elevation-1);
}

.status-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.status-summary-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--workhaus-text);
    margin: 0;
}

.status-summary-total {
    font-size: 0.875rem;
    color: var(--workhaus-gray);
}

.status-bar {
    display: flex;
    height: 32px;
    border-radius: var(--wh-shape-sm);
    overflow: hidden;
    background-color: var(--wh-surface-container-highest);
}

.status-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--workhaus-white);
    font-size: 0.75rem;
    font-weight: 500;
    transition: flex 0.3s ease;
    min-width: 60px;
}

.status-segment.segment-active {
    background-color: var(--status-active);
}

.status-segment.segment-draft {
    background-color: var(--status-draft);
}

.status-segment.segment-retention {
    background-color: var(--status-retention);
}

.status-segment.segment-pending {
    background-color: var(--status-pending);
    color: var(--workhaus-dark);
}

.status-segment.segment-closed {
    background-color: var(--status-closed);
}

.status-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--workhaus-gray);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.dot-active {
    background-color: var(--status-active);
}

.legend-dot.dot-draft {
    background-color: var(--status-draft);
}

.legend-dot.dot-retention {
    background-color: var(--status-retention);
}

.legend-dot.dot-pending {
    background-color: var(--status-pending);
}

.legend-dot.dot-closed {
    background-color: var(--status-closed);
}

/* Scroll to Top Button (M3 FAB: gold container, 16px shape, elevation 3) */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: var(--wh-shape-lg);
    background-color: var(--workhaus-gold);
    color: var(--workhaus-dark);
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, background-color 0.2s ease;
    z-index: 1000;
    box-shadow: var(--wh-elevation-3);
}

.scroll-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-to-top:hover {
    background-color: var(--workhaus-gold-dark);
    color: var(--workhaus-dark);
}

@media (max-width: 576px) {
    .scroll-to-top {
        width: 38px;
        height: 38px;
        bottom: 1.25rem;
        right: 1.25rem;
        font-size: 1rem;
    }
}

