html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    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;
}

.task-card {
    cursor: grab;
    transition: 0.2s;
}

    .task-card:active {
        cursor: grabbing;
    }

    .task-card:hover {
        border-color: #0d6efd;
        background-color: #f0f7ff;
    }
.bg-light:active, .bg-light:hover {
    background-color: #e9ecef !important;
    border: 2px dashed #0d6efd !important;
}
/* Custom Orange for Overdue */
.table-warning {
    background-color: #ffe5b4 !important; /* Light Orange */
}

/* Custom Light Blue for upcoming week */
.table-primary {
    background-color: #e3f2fd !important; /* Very Light Blue */
}

/* Custom Gray for distant future */
.bg-light.text-muted {
    background-color: #f2f2f2 !important;
}

/* Ensure hover still looks good */
.table-hover tbody tr:hover {
    filter: brightness(95%);
}

/* Overdue: Light Orange */
.row-overdue {
    background-color: #ffcc80 !important;
}

/* Upcoming: Light Blue */
.row-upcoming {
    background-color: #e3f2fd !important;
}

/* Future: Light Gray */
.row-future {
    background-color: #f8f9fa !important;
    color: #6c757d;
}

/* Group Header */
.table-secondary {
    background-color: #ececec !important;
}

.kanban-column {
    /* This ensures the drop zone takes up the full available height */
    min-height: 80vh;
    /* Adds a visual cue when dragging over */
    transition: background-color 0.3s;
}

    /* Optional: Subtle dash border to show the drop area when empty */
    .kanban-column:empty::after {
        content: "Drop tasks here";
        display: block;
        text-align: center;
        color: #ccc;
        padding-top: 20px;
        border: 2px dashed #ddd;
        border-radius: 10px;
    }

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr); /* 7 equal columns */
    border: 1px solid #dee2e6;
}

.grid-cell {
    position: relative;
    overflow-y: auto;
}

.today-highlight {
    background-color: #0d6efd;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Calendar Task Item - Better Readability */
.calendar-task-item {
    border-left: 3px solid rgba(0,0,0,0.2);
    margin-bottom: 3px;
    padding-left: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    transition: transform 0.1s ease;
}



/* 2. Remove Scrollbars & Handle Long Text */
.calendar-task-item {
    display: block;
    width: 100%;
    white-space: nowrap;      /* Keep text on one line */
    overflow: hidden;         /* Hide anything that sticks out */
    text-overflow: ellipsis;  /* Add '...' at the end of long text */
    padding: 2px 6px;
    margin-bottom: 2px;
    font-size: 0.75rem;
    border-radius: 4px;
    box-sizing: border-box;   /* Ensures padding doesn't add to width */
}

/* 3. Ensure the Day Cell doesn't scroll horizontally */
.grid-cell {
    overflow-x: hidden !important; /* Forces horizontal scroll to disappear */
    overflow-y: auto;              /* Allows vertical scroll if many tasks exist */
}

    /* Reusing your industry standard colors for consistency */
    .calendar-task-item.bg-success {
        background-color: #198754 !important;
    }

    .calendar-task-item.bg-warning {
        background-color: #ffc107 !important;
        color: black !important;
    }

    .calendar-task-item.bg-danger {
        background-color: #dc3545 !important;
    }
/* Navigation Buttons */
.btn-outline-primary {
    border-radius: 20px; /* Rounded pill shape */
    padding: 0.25rem 0.75rem;
}



    .calendar-task-item:hover {
        transform: scale(1.02);
        filter: brightness(90%);
    }

.badge {
    font-weight: 500;
    padding: 0.5em 0.8em;
    border-radius: 50rem; /* Pill shape */
}

/* Customizing the Urgent look to be more aggressive */
.bg-danger {
    background-color: #ff4d4d !important;
    box-shadow: 0 0 8px rgba(255, 77, 77, 0.4);
}

/* Customizing High to be clear but not "Stop" red */
.bg-warning {
    background-color: #ffcc00 !important;
}

.btn-link .bi-trash {
    font-size: 1rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.btn-link:hover .bi-trash {
    transform: scale(1.2);
    color: #dc3545 !important; /* Bootstrap Danger Red */
}

/* Ensure the table cell doesn't jump when the button appears */
td.ps-4 {
    display: flex;
    align-items: center;
}

.task-card {
    transition: all 0.2s ease;
    border: 1px solid rgba(0,0,0,0.05); /* Soften the default card border */
}

    .task-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
        cursor: grab;
    }

    .task-card:active {
        cursor: grabbing;
    }

/* Container for the whole app */
.page {
    display: flex;
    flex-direction: column;
}

/* Sidebar behavior */
.sidebar {
    width: 250px;
    height: 100vh;
    position: sticky;
    top: 0;
}

/* Mobile Adjustments */
@media (max-width: 767.98px) {
    .page {
        flex-direction: column; /* Stack sidebar and main content */
    }

   .main-content {
        padding: 10px; /* Reduce padding so data fits */
        width: 100%;
    }

    /* Top row adjustment */
    .top-row {
        flex-direction: column;
        height: auto !important;
        padding: 10px !important;
        text-align: center;
    }
}

/* Desktop View (Standard) 
@media (min-width: 641px) {
    .sidebar {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }
    .nav-scrollable {
        display: block !important;
    }
}
*/

/* Desktop Sidebar  */
@media (min-width: 641px) {
    .sidebar {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
        display: block !important; /* Ensure it shows on desktop [cite: 7] */
    }

    .nav-scrollable {
        display: block !important;
    }
}

/* Mobile View (The Fix) */
@media (max-width: 640.98px) {
    .sidebar {
        width: 100%; /* Take full width only when open */
        position: fixed; /* Sit ON TOP of the content, not beside it */
        z-index: 2000;
        height: auto;
    }
    /* 1. Hide the scrollable area by default when it has the 'collapse' class */
    .nav-scrollable.collapse {
        display: none !important;
    }

    /* 2. Show it when 'collapse' is removed (when ToggleNavMenu runs) */
    .nav-scrollable:not(.collapse) {
        display: block !important;
        background-color: #212529;
        position: fixed;
        top: 56px; /* Below the top-row */
        bottom: 0;
        width: 100%;
        z-index: 2001;
        overflow-y: auto;
    }
    /* Push main content down so it's not buried under the fixed header */
    main {
        margin-top: 56px;
    }
        
}

/* Mobile Sidebar [cite: 16] */
/*@@media (max-width: 640.98px) {
    .sidebar {
        width: 100%;
        position: fixed;
        z-index: 2000;*/ /* Ensure it is above the header [cite: 7] */
    /*}*/
        /* Hide the container when the NavMenu says to collapse  */
        /*.sidebar:has(.collapse) {
            height: 56px;*/ /* Only show the top-row height */
            /*overflow: hidden;
        }
}

.page {
    display: flex;
    flex-direction: row;*/ /* Default to row for desktop [cite: 8] */
/*}

@@media (max-width: 640.98px) {
    .page {
        flex-direction: column;*/ /* Stack for mobile [cite: 4] */
    /*}
}*/

/* Mobile Specific Calendar Enhancements */
@media (max-width: 640.98px) {
    .calendar-task-item {
        font-size: 0.9rem !important; /* Increase from 0.75rem */
        padding: 4px 8px !important;
        white-space: normal !important; /* Allow text to wrap if it's too long */
        word-break: break-word;
        line-height: 1.1;
        min-height: 40px; /* Give it enough height to be tappable */
        display: flex;
        align-items: center;
        margin-bottom: 4px !important;
    }

    /* Adjust the grid cell to accommodate larger items */
    .grid-cell {
        min-height: 100px; /* Ensure the day box is tall enough */
    }

    /* Optional: Hide the time on mobile to save horizontal space for the name */
    .calendar-task-item .task-time {
        display: none;
    }
}

@media (max-width: 576px) {
    .modal-dialog {
        margin-top: 4rem; /* Adjust this value based on your header height */
    }
}

.modal {
    padding-top: 50px; /* Force the entire modal down */
}

/* Target only the unselected nav buttons in this component */
.nav-pills .nav-link:not(.active) {
    color: #495057 !important; /* Premium dark grey slate color */
    font-weight: 500; /* Makes text slightly sharper to read */
}

/* Subtle hover state to make the UI feel reactive */
.nav-pills .nav-link:not(.active):hover {
    color: #212529 !important; /* Near pure black on hover */
    background-color: #f8f9fa; /* Light grey backdrop highlight */
}