﻿html {
    color-scheme: light dark;
}

:root {
    --color-black: #f2f2f2;
    --color-white: #0c0c0d;
    --color-grey: #a6a6a6;
    --color-red: #e43939;
    --color-red-dark: #b81010;
    --app-bg-img: url("/img/hex-bg-3.png");
    --grad-red-black: linear-gradient(180deg, #6D6D6D, #6D6D6D, #6D6D6D, #6D6D6D);
}





@media (prefers-color-scheme: dark) {
    :root {
        --color-black: #f2f2f2;
        --color-white: #0c0c0d;
        --color-grey: #a6a6a6;
        --color-red: #e43939;
        --color-red-dark: #b81010;
        --app-bg-img: url("/img/hex-bg-3.png");
        --grad-red-black: linear-gradient(180deg, #6D6D6D, #6D6D6D, #6D6D6D, #6D6D6D);
    }
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--color-black);
    background: #f0f9f4 !important;
    min-height: 100vh;
    width: 100%;
}

* {
    box-sizing: border-box;
}

#app {
    background: #f0f9f4;
    min-height: 100vh;
}

.btn-link {
    color: var(--color-white);
    text-decoration: solid;
    transition: color .2s;
    font-size: 40px;
    font-weight: bolder;
    margin: 0px 0px;
    box-shadow: 0 10px 25px rgba(0,0,0,.5);
}


.btn-primary {
    color: #fff;
    background-color: var(--color-red);
    border-color: var(--color-red-dark);
}

    .btn-primary:hover {
        background-color: var(--color-red-dark);
    }

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem var(--color-white), 0 0 0 0.25rem var(--color-red);
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid var(--color-red);
}

.validation-message {
    color: red;
}

.invite-intro {
    color: #000 !important;
}

.blazor-error-boundary {
    background: var(--grad-red-black);
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.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;
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.menu-bar,
.nav-scrollable {
    width: 100%;
    left: 0;
    right: 0;
    background: var(--grad-red-black);
}

    .nav-scrollable .menu-links {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        padding: 0.75rem 0;
        background: var(--grad-red-black);
    }

    .menu-bar .container-fluid {
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }

.navbar-toggler,
input[title="Navigation menu"] {
    display: none !important;
}

.menu-links {
    padding: 0.75rem 0;
    gap: 2rem;
}

.menu-link {
    color: #000 !important;
    background: #fff !important;
    padding: 0.6rem 1.6rem;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    transition: background .3s ease, transform .2s ease;
}

    .menu-link:hover {
        background: #666 !important;
        color: #fff !important;
        transform: translateY(-2px);
    }

    .menu-link.active {
        background: #f5f5f5 !important;
        color: #000000 !important;
    }

.home-hero {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.big-button {
    width: 220px;
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f5f5f5;
    color: #000000 !important;
    font-size: 1.6rem;
    font-weight: 800;
    border-radius: 16px;
    text-decoration: none !important;
    transition: transform .3s ease, box-shadow .3s ease;
    border: 3px solid #000;
    box-sizing: border-box;
    box-shadow: 0 0 20px 8px rgb(#000000);
}

    .big-button:hover {
        transform: scale(1.08);
        
        border-color: #000;
    }

@media (max-width: 640px) {
    .home-hero {
        gap: 1.5rem;
    }

    .big-button {
        width: 90vw;
        max-width: 360px;
    }
}

.page {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

.sidebar {
    display: none !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.page, .content, main, .container, .container-fluid, .body-content {
    background: transparent !important;
}

body {
    position: relative;
}

    body::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: -1;
        background: var(--app-bg-img) center / cover no-repeat, var(--grad-red-black);
        filter: blur(8px);
        transform: scale(1.04);
        will-change: filter, transform;
        pointer-events: none;
    }

.table td {
    color: #000000;
    background: whitesmoke;
    align-content: center;
    font-size: medium;
    height: 9vh;
}



    
   




/* Note: PersonTable td styling removed - now uses default-table */

.form-control {
    font-weight: bold;
    border-color: #6c757d !important;
    border-width: 2px;
}

.form-control:focus {
    border-color: #495057 !important;
}

.form-select {
    border-color: #6c757d !important;
    border-width: 2px;
}

.form-select:focus {
    border-color: #495057 !important;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
textarea,
select {
    border-color: #6c757d !important;
    border-width: 2px;
}

/* Note: PinpTable td styling removed - now uses default-table */

label {
    font-weight: bold;
    color: #868686;
}

input[type="date"].form-control {
    color-scheme: light;
}

/* ========================================
   UNIFIED BASE LAYOUT SYSTEM
   ======================================== */

/* Main container - flexible width with max-width constraint */
.main-container {
    width: 100%;
/*    max-width: 1200px;*/
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* Variant sizes for different page types */
.main-container-lg {
/*    max-width: 1400px;*/
}

.main-container-md {
/*    max-width: 900px;*/
}

.main-container-sm {
/*    max-width: 800px;*/
}

/* Legacy wrappers - kept for backward compatibility, now use main-container */
.page-wrap {
    width: 100%;
/*    max-width: 1200px;*/
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.page-wrap-medium {
    width: 100%;
/*    max-width: 900px;*/
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.page-wrap-small {
    width: 100%;
/*    max-width: 800px;*/
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* ========================================
   NAVIGATION & ACTION BUTTONS
   ======================================== */

.nav-action-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: transparent;
    color: #000;
    border: 2px solid #000;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    opacity: 1 !important;
    visibility: visible !important;
}

    .nav-action-btn:hover {
        background: #000;
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

/* ========================================
   CARD SYSTEM - Bootstrap Integrated
   ======================================== */

/* Standard content card - use for all grouped sections */
.content-card {
    background-color: #ffffff;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    color: #000;
    width: 100%;
}

/* Compact card for nested or secondary content */
.content-card-compact {
    background-color: #ffffff;
    padding: 20px;
    margin-top: 16px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: #000;
    width: 100%;
}

/* Card without bottom margin - use in tight layouts */
.content-card-flush {
    background-color: #ffffff;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 0;
    color: #000;
    width: 100%;
}

/* Base card styling (utility class) */
.card-base {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 24px;
    color: #000;
}

/* Auth cards (login, register, etc) */
.auth-card {
    width: 460px;
    max-width: 100%;
    background: #dbdbdb;
    color: #111;
    border-radius: 12px;
    box-shadow: 0px 0px 4px 0px rgb(0 0 0);
    padding: 24px;
}

.auth-page {
    display: flex;
    justify-content: center;
    padding: 80px 16px;
}

/* Bootstrap Grid Integration */
.main-container .row {
    margin-left: -15px;
    margin-right: -15px;
}

.main-container .row > [class*="col-"] {
    padding-left: 15px;
    padding-right: 15px;
}

/* Card inside Bootstrap columns */
.row > [class*="col-"] > .content-card,
.row > [class*="col-"] > .content-card-compact {
    height: 100%;
    margin-bottom: 0;
}

/* ========================================
   BUTTON SYSTEM
   ======================================== */

.btn-edit {
    background-color: #4cff00;
    color: #fff;
    border: 1px solid #B00008;
    border-radius: 8px;
    padding: 6px 10px;
    font-weight: 600;
    transition: background-color .15s ease, border-color .15s ease, transform .1s ease, box-shadow .15s ease;
    margin: 20px;
}

    .btn-edit:active {
        background-color: #7A0006;
        border-color: #520004;
    }

    .btn-edit:disabled, .btn-edit.disabled {
        background-color: #4cff00;
        border-color: #5A5A5A;
        color: #eaeaea;
    }

.btn-delete {
    background-color: #E3000B;
    color: #fff;
    border: 1px solid #B00008;
    border-radius: 8px;
    padding: 6px 10px;
    font-weight: 600;
    transition: background-color .15s ease, border-color .15s ease, transform .1s ease, box-shadow .15s ease;
    margin: 2px;
}

.btn-form {
    display: inline-block;
    padding: .7rem 1.4rem;
    border-radius: 9999px;
    background: #000;
    color: #fff;
    border: 0;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
    transition: background-color .2s, box-shadow .2s, transform .05s;
}

    .btn-form:hover {
        background: #111;
        box-shadow: 0 4px 14px rgba(0,0,0,.35);
    }

    .btn-form:active {
        transform: translateY(1px);
    }

    .btn-form:focus-visible {
        outline: 2px solid #fff;
        outline-offset: 2px;
    }

/* Action buttons in forms */
.form-actions .btn.btn-light {
    background: #000 !important;
    color: #fff !important;
    border: 1px solid #000 !important;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(0,0,0,.35);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s;
}

    .form-actions .btn.btn-light:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 24px rgba(0,0,0,.45);
    }

    .form-actions .btn.btn-light:active {
        transform: translateY(0);
        box-shadow: 0 4px 10px rgba(0,0,0,.4);
    }

.form-actions .btn.btn-outline-light {
    background: transparent;
    color: #000;
    border: 1px solid #fff;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 600;
    transition: background .15s ease, color .15s ease, transform .15s ease, border-color .15s;
}

    .form-actions .btn.btn-outline-light:hover {
        background: #000;
        color: #fff;
        border-color: #000;
        transform: translateY(-1px);
    }

    .form-actions .btn.btn-outline-light:active {
        transform: translateY(0);
    }

.form-actions a.btn.btn-outline-light {
    text-decoration: none;
}

.form-actions .btn:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ========================================
   TABLE SYSTEM
   ======================================== */

/* Note: PersonTable and PinpTable now use default-table styles */

/* Table action cells */
.cell-actions {
    text-align: right;
    white-space: nowrap;
    color: white;
}

    .cell-actions .btn + .btn {
        margin-left: 8px;
    }

.head-actions {
    width: 160px;
    min-width: 160px;
    text-align: right;
    white-space: nowrap;
    color: white;
}

.th-actions {
    width: 160px;
    text-align: center;
    min-width: 160px;
}

/* ========================================
   DEFAULT TABLE LAYOUT (GLOBAL STANDARD)
   ======================================== */

/* Base default table - replaces proj-table, EmployeeTable, PersonTable, PinpTable */
.default-table,
.proj-table,
.EmployeeTable,
.PersonTable,
.PinpTable {
    --proj-head-bg: #6B7280;
    --proj-head-fg: #fff;
    --proj-head-border: #444;
    --proj-row-bg: #f5f5f5;
    --proj-row-fg: #0c0b1f;
    --proj-zebra-bg: #fffbe6;
    --proj-border: #ddd;
    border-collapse: collapse !important;
    border-spacing: 0;
    table-layout: fixed;
}

.default-table thead th,
.proj-table thead th,
.EmployeeTable thead th,
.PersonTable thead th,
.PinpTable thead th {
    background-color: var(--proj-head-bg) !important;
    color: var(--proj-head-fg) !important;
    border-color: var(--proj-head-border) !important;
    padding: 6px 8px !important;
    vertical-align: middle !important;
    height: 36px !important;
    line-height: 1.2 !important;
}

.default-table tbody tr,
.proj-table tbody tr,
.EmployeeTable tbody tr,
.PersonTable tbody tr,
.PinpTable tbody tr {
    height: 38px !important;
    max-height: 38px !important;
    border-bottom: 1px solid var(--proj-border);
}

.default-table tbody tr:last-child,
.proj-table tbody tr:last-child,
.EmployeeTable tbody tr:last-child,
.PersonTable tbody tr:last-child,
.PinpTable tbody tr:last-child {
    border-bottom: none;
}

.default-table tbody td,
.proj-table tbody td,
.EmployeeTable tbody td,
.PersonTable tbody td,
.PinpTable tbody td {
    background-color: var(--proj-row-bg);
    color: var(--proj-row-fg);
    padding: 4px 8px !important;
    vertical-align: middle !important;
    border: none !important;
    line-height: 1.2 !important;
    height: 38px !important;
    max-height: 38px !important;
    overflow: hidden;
}

.default-table tbody td .d-flex,
.proj-table tbody td .d-flex,
.EmployeeTable tbody td .d-flex,
.PersonTable tbody td .d-flex,
.PinpTable tbody td .d-flex {
    height: 30px !important;
    max-height: 30px !important;
    min-height: 30px !important;
}

.default-table tbody td input[type="date"],
.default-table tbody td .date-input,
.proj-table tbody td input[type="date"],
.proj-table tbody td .date-input,
.EmployeeTable tbody td input[type="date"],
.EmployeeTable tbody td .date-input,
.PersonTable tbody td input[type="date"],
.PersonTable tbody td .date-input,
.PinpTable tbody td input[type="date"],
.PinpTable tbody td .date-input {
    height: 30px !important;
    max-height: 30px !important;
    min-height: 30px !important;
    padding: 2px 6px !important;
    line-height: 1.2 !important;
    font-size: 14px !important;
}

.default-table tbody tr:nth-child(even) td,
.proj-table tbody tr:nth-child(even) td,
.EmployeeTable tbody tr:nth-child(even) td,
.PersonTable tbody tr:nth-child(even) td,
.PinpTable tbody tr:nth-child(even) td {
    background-color: var(--proj-zebra-bg);
}

.default-table .cell-actions,
.proj-table .cell-actions,
.EmployeeTable .cell-actions,
.PersonTable .cell-actions,
.PinpTable .cell-actions {
    text-align: right;
    white-space: nowrap;
}

/* Global alternating row colors for OTHER tables (not using default-table) */
table:not(.default-table):not(.proj-table):not(.EmployeeTable):not(.PersonTable):not(.PinpTable) tbody tr:nth-child(odd) td {
    background-color: #f8f9fa !important;
}

table:not(.default-table):not(.proj-table):not(.EmployeeTable):not(.PersonTable):not(.PinpTable) tbody tr:nth-child(even) td {
    background-color: #ffffff !important;
}

table:not(.default-table):not(.proj-table):not(.EmployeeTable):not(.PersonTable):not(.PinpTable) tbody tr:hover td {
    background-color: #e9ecef !important;
    transition: background-color 0.2s ease;
}

/* ========================================
   FORM SYSTEM
   ======================================== */

.search-wrap {
    position: relative;
    max-width: 420px;
    flex: 1;
}

.suggestions {
    position: absolute;
    inset-inline: 0;
    font-size: 0.9rem;
    z-index: 10;
    max-height: 250px;
    overflow: auto;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

    .suggestions a.link-light {
        display: block;
        padding: 8px 12px;
        text-decoration: none;
        font-size: 16px;
        color: #000;
    }

        .suggestions a.link-light:hover {
            background-color: #f8f9fa;
        }

/* ========================================
   UTILITIES
   ======================================== */

.text-dark {
    color: #0C0B1F;
}

.sticky-80 {
    top: 80px;
}

/* ========================================
   RESPONSIVE LAYOUT
   ======================================== */

/* Tablet and small desktop (768px - 1400px) */
@media (min-width: 768px) and (max-width: 1400px) {
    .main-container,
    .page-wrap,
    .page-wrap-medium,
    .page-wrap-small {
        padding-left: 15px;
        padding-right: 15px;
    }

    .search-wrap {
        max-width: none;
        flex: 1;
    }

    .content-card,
    .content-card-compact {
        padding: 20px;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sticky-80 {
        position: static;
        margin-top: 20px;
    }

    .btn-edit,
    .btn-delete {
        padding: 8px 12px;
        margin: 2px;
    }

    .cell-actions {
        white-space: normal;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 5px;
    }

    .head-actions {
        width: auto;
        min-width: 140px;
    }
}

/* Large tablet (max-width: 991.98px) */
@media (max-width: 991.98px) {
    .content-card,
    .content-card-compact {
        overflow-x: auto;
    }

    /* Stack Bootstrap columns on tablet */
    .main-container .row > [class*="col-"] {
        width: 100%;
        margin-bottom: 20px;
    }
}

/* Mobile (max-width: 575.98px) */
@media (max-width: 575.98px) {
    .main-container,
    .page-wrap,
    .page-wrap-medium,
    .page-wrap-small {
        padding-left: 10px;
        padding-right: 10px;
    }

    .search-wrap {
        max-width: none;
        width: 100%;
    }

    .content-card,
    .content-card-compact {
        padding: 15px;
    }

    .form-check {
        display: block;
        min-height: 1.5rem;
        background-color: #F5F5F5;
        padding-left: 1.5em;
        margin-bottom: .125rem;
    }

    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .auth-card {
        padding: 1.5rem 1.25rem;
    }

    /* Full width columns on mobile */
    .main-container .row {
        margin-left: 0;
        margin-right: 0;
    }

    .main-container .row > [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
        width: 100%;
        margin-bottom: 15px;
    }
}
