﻿/* ================= CORE UTILITIES ================= */
.text-center {
    text-align: center !important;
}

.text-bold {
    font-weight: 600 !important;
}

.text-muted {
    color: #6c757d !important;
}

.text-white {
    color: #fff !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.mt-1 {
    margin-top: 0.25rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.err-page {
    list-style-type: circle;
    width: 250px;
    margin-left: auto;
    margin-right: auto;
}

.w100 {
    width: 100%;
}

.err-page > li {
    margin-left: auto;
    margin-right: auto;
    color: red;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mr-1 {
    margin-right: 0.25rem !important;
}

.mr-2 {
    margin-right: 0.5rem !important;
}

.ml-auto {
    margin-left: auto !important;
}

.w-100 {
    width: 100% !important;
}

.wd100 {
    width: 100% !important;
}

.w-95 {
    width: 90% !important;
}

.wd95 {
    width: 90% !important;
}

.wd450px {
    width: 350px !important;
    margin-left: auto;
    margin-right: auto;
}

.saved-file {
    color: #c6c4c4;
    font-size: 8px;
}


.d-flex {
    display: flex !important;
}

.flex-column {
    flex-direction: column !important;
}

.align-center {
    align-items: center !important;
}

.justify-center {
    justify-content: center !important;
}

.justify-end {
    justify-content: flex-end !important;
}

.flex-wrap {
    flex-wrap: wrap !important;
}

/* ================= REUSABLE COMPONENTS ================= */
.report-container {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: 8px;
}

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    margin: 1rem;
}

.empty-state-icon {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.table-container {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    width: 100%;
    overflow-x: auto;
}

/* ================= COMPACT HEADER ================= */
.report-header {
    color: white;
    padding: 4px 16px !important;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 45px !important;
    width: 100%;
    box-sizing: border-box;
}

.report-header-primary {
    background: linear-gradient(90deg, var(--mud-palette-primary) 0%, var(--mud-palette-primary-darken) 100%);
}

.header-center-wrapper {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    padding: 0 12px;
    box-sizing: border-box;
}

.report-header-title {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
    line-height: 1.1 !important;
    color: white !important;
    word-wrap: break-word;
}

.report-header-subtitle {
    font-size: 0.65rem !important;
    opacity: 0.9;
    margin-top: 1px !important;
    line-height: 1.1 !important;
    color: white !important;
    word-wrap: break-word;
}

.report-header-icon {
    font-size: 0.85rem !important;
    margin-right: 5px !important;
    color: white !important;
}

/* ================= CONTROLS SECTION ================= */
.controls-section {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-top: none;
    padding: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.search-controls-container {
    background: #fff;
    border-radius: 6px;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    width: 100%;
}

.height650 {
    max-height: 650px;
    overflow-y: auto;
    padding:3px 6px;
}
/* ================= TABLE COMPONENTS ================= */
.table-search-field {
    min-width: 200px;
    width: 100%;
}

/* Status Text Styles */
.status-chip {
    display: inline-block !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    font-weight: 500 !important;
    font-size: 0.7rem !important;
    line-height: 1.3 !important;
    white-space: nowrap;
}

.status-approved {
    background-color: #d4edda !important;
    color: #155724 !important;
    border: 1px solid #c3e6cb !important;
}

.status-pending {
    background-color: #fff3cd !important;
    color: #856404 !important;
    border: 1px solid #ffeaa7 !important;
}

/* ================= RESPONSIVE FIXES ================= */
/* Tablet and below */
@media (max-width: 960px) {
    .report-header {
        padding: 3px 12px !important;
        min-height: 40px !important;
    }

    .report-header-title {
        font-size: 0.85rem !important;
    }

    .report-header-subtitle {
        font-size: 0.6rem !important;
    }

    .report-header-icon {
        font-size: 0.8rem !important;
    }

    .controls-section {
        padding: 0.75rem;
    }

    .table-search-field {
        min-width: 150px;
    }
}

/* Mobile devices */
@media (max-width: 600px) {
    .report-header {
        padding: 2px 10px !important;
        min-height: 35px !important;
    }

    .header-center-wrapper {
        padding: 0 8px;
    }

    .report-header-title {
        font-size: 0.8rem !important;
    }

    .report-header-subtitle {
        font-size: 0.55rem !important;
    }

    .report-header-icon {
        font-size: 0.75rem !important;
        margin-right: 4px !important;
    }

    .table-search-field {
        min-width: 100% !important;
        margin-bottom: 0.5rem;
    }

    .status-chip {
        font-size: 0.65rem !important;
        padding: 1px 4px !important;
    }

    /* Stack controls vertically on mobile */
    .controls-section .mud-grid-container {
        flex-direction: column;
    }

    /* Mobile specific table fixes */
    .mud-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mud-table th,
    .mud-table td {
        font-size: 0.75rem !important;
        padding: 8px !important;
        min-width: 100px;
    }
}

/* Extra small devices (phones, less than 400px) */
@media (max-width: 400px) {
    .report-header-title {
        font-size: 0.75rem !important;
    }

    .report-header-subtitle {
        font-size: 0.5rem !important;
    }

    .empty-state {
        padding: 1.5rem 1rem;
    }

    .empty-state-icon {
        font-size: 2rem;
    }

    /* Stack radio buttons vertically */
    .mud-radio-group {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .mud-radio {
        margin-bottom: 0.25rem;
    }

    /* Compact table for very small screens */
    .mud-table th,
    .mud-table td {
        font-size: 0.7rem !important;
        padding: 6px !important;
        min-width: 90px;
    }
}

/* Mobile table column priority */
@media (max-width: 480px) {
    .mobile-priority-1 {
        min-width: 100px !important;
    }

    .mobile-priority-2 {
        min-width: 90px !important;
    }

    .mobile-priority-3 {
        min-width: 80px !important;
    }
}

/* Print styles */
@media print {
    .controls-section,
    .mud-button,
    .table-search-field {
        display: none !important;
    }

    .report-container {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }

    .report-header {
        background: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Fix for MudBlazor components on mobile */
.mud-picker.mud-picker-inline {
    width: 100% !important;
}
/* ================= GLOBAL REQUIRED ASTERISK COLOR ================= */

/* Force all MudBlazor required asterisk (*) to red */
/* Responsive button group */
.responsive-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

    .responsive-button-group .mud-button {
        flex: 1;
        min-width: 100px;
    }

/* Mobile optimization for grid items */
@media (max-width: 768px) {
    .mobile-full-width {
        width: 100% !important;
        max-width: 100% !important;
        flex-basis: 100% !important;
    }

    .mobile-stack {
        flex-direction: column !important;
    }

    .mobile-mb-1 {
        margin-bottom: 0.25rem !important;
    }

    .custom-box {
        border: 3px solid #ccc; /* light grey border */
        border-radius: 8px; /* rounded corners */
        padding: 16px;
        /* box-shadow: 0px 2px 3px 0px; */ /* inner spacing */
    }


    .member-img-container {
        display: flex;
        padding-top: 25px;
        justify-content: flex-end;
        align-items: center; /* ✅ image center vertically */
    }

    .member-img {
        width: 110px !important ;
        height: 110px;
        object-fit: cover;
        border-radius: 8px;
        border: 1px solid #ccc;
        margin-left: 10px;
    }

    .member-photo {
        width: 120px !important;
    }
    /*=============Spinelabel css===========*/
    .custom-btn {
        background-color: #1f8aa6 !important;
        color: white !important;
        min-width: 60px;
        height: 40px;
        border-radius: 8px;
        font-weight: bold;
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }
        .custom-btn.small-btn {
            min-width: 45px;
            height: 35px;
            font-size: 18px;
        }
}

.member-table {
    table-layout: fixed;
    width: 100%;
}

    .member-table .col-select {
        width: 70px;
    }

    .member-table .col-memberid {
        width: 140px;
    }

    .member-table .col-name {
        width: 260px;
    }

    .member-table .col-hourly {
        width: 180px;
    }

    .member-table .col-group {
        width: 170px;
    }

    .member-table .col-phone {
        width: 140px;
    }

    .member-table .col-address {
        width: auto;
    }
