:root{
    --primary-color: #3A8EF6;
    --secondary-color: #f3f3fd;
    --primary-color-dark: #1678F2;
}
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 500;
    padding: 30px 70px;
    background-color: var(--secondary-color);
    font-size: large;
}

.section-title{
    margin:100px 0px;
    font-size: medium;
    font-weight: bold;
    letter-spacing: 3px;
    color: var(--primary-color-dark);
    text-transform: uppercase;
}

.button-hover:hover{
    background-color: var(--secondary-color)!important;
    border-color:var(--primary-color);
    color: var(--primary-color);
}

/*nav link hover: https://stackoverflow.com/questions/39495493/line-under-navbar-when-hovering*/
.nav-link {
    position: relative;
    text-decoration: none;
    padding: 0.5rem 1rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 3px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 0;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.form-group{
    margin: 20px 0px;
}

.table td, .table th {
    padding: 1rem;
}

label.required::after {
    content: " *";
    color: red;
}

.column-overflow {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.no-hover-button:hover{
    background-color: transparent!important;
    color: var(--primary-color-dark)!important;
    border-color: inherit!important;
}
thead .heading-table th{
    background-color: gray!important;
    color: white;
}
thead tr th a{
    color: white;
}


table.dataTable thead th.sorting:before,
table.dataTable thead th.sorting:after,
table.dataTable thead th.sorting_asc:before,
table.dataTable thead th.sorting_asc:after,
table.dataTable thead th.sorting_desc:before,
table.dataTable thead th.sorting_desc:after {
    display: none !important;
}

td {
    padding: 16px 18px !important;
}

th {
    padding: 14px 18px !important;
}

#custom-search .dataTables_filter label input{
    padding: 5px;
    width: 100%;
    border-radius: 10px;
    padding: 0.5rem 1rem;
    border: 1px solid #ced4da;
}

#custom-search .dataTables_filter {
    width: 100%;
}

#custom-search .dataTables_filter label {
    width: 100%;
}

select.form-select-sm {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Overwrite flatpickr style */
.flatpickr-calendar.inline {
    width: 100% !important; max-width: 100% !important; box-sizing: border-box;
}

.flatpickr-calendar {
    padding: 20px;
    border-radius: 10px;
}

.flatpickr-weekdays {
    padding: 10px 0;
}

.flatpickr-weekday {
    text-align: left!important;
}

.flatpickr-rContainer, .flatpickr-innerContainer, .flatpickr-days {
    width: 100% !important;
}
.dayContainer {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(7, 1fr); gap: 6px;
}

.flatpickr-day {
    max-width: none !important;
    height: 38px;
    line-height: 38px;
    border-radius: 10px;
}

.flatpickr-day.selected {
    border-radius: 10px;
}

.flatpickr-months .flatpickr-next-month{
    padding: 20px!important;
}

.flatpickr-months .flatpickr-prev-month{
    padding: 20px!important;
}

.flatpickr-current-month{
    padding: 0!important;
}

.flatpickr-days .dayContainer {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: space-between;
}

.flatpickr-day {
    flex: 0 0 calc(14.28% - 6px);
    max-width: calc(14.28% - 6px);
    height: 48px;
    line-height: 48px;

    margin: 3px 0;
    border-radius: 12px;
    text-align: center;

    transition: all 0.2s ease;
}

.flatpickr-day.day-complete {
    background: #22c55e !important;
    color: white !important;
    border-radius: 12px;
}

.flatpickr-day.day-partial {
    background: #f59e0b !important;
    color: white !important;
    border-radius: 12px;
}

.flatpickr-day.day-empty {
    background: #e5e7eb !important;
    color: #6b7280 !important;
    border-radius: 12px;
}

.flatpickr-day.selected {
    background: var(--primary-color-dark) !important;
    color: white !important;
    transform: scale(1.08);
    z-index: 10;
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.3);
    border-radius: 12px;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover
{
    color: rgb(57 57 57 / 50%);
}

.legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    display: inline-block;
}

/* Custom scales for daily measurements table */
.text-success { color: #28a745 !important; } /* Green - Healthy */
.text-warning { color: #ffc107 !important; } /* Yellow - Caution */
.text-danger { color: #fff3cd !important; }  /* Red - Alert */

/* Subtle background highlights */
.bg-alert-low { background-color: #fff3cd; }
.bg-alert-high { background-color: #f8d7da; }

