/* D'More Loyalty Club - Professional Hotel Management System Stylesheet */
:root {
    --dlc-sidebar-bg: #11222C;
    --dlc-sidebar-hover: #1B3545;
    --dlc-sidebar-active: #224256;
    --dlc-sidebar-text: #BAC9D4;
    --dlc-sidebar-text-active: #FFFFFF;
    
    --dlc-primary: #1B3A4B;
    --dlc-primary-hover: #142C39;
    --dlc-gold: #C5A059;
    --dlc-gold-hover: #B08C45;
    --dlc-gold-light: #F9F5EC;
    
    --dlc-body-bg: #F4F6F9;
    --dlc-card-bg: #FFFFFF;
    --dlc-border-color: #E2E8F0;
    
    /* Subtle status badge colors */
    --dlc-status-green-bg: #E8F5E9;
    --dlc-status-green-text: #2E7D32;
    --dlc-status-amber-bg: #FFF8E1;
    --dlc-status-amber-text: #F57F17;
    --dlc-status-red-bg: #FFEBEE;
    --dlc-status-red-text: #C62828;
    --dlc-status-blue-bg: #E3F2FD;
    --dlc-status-blue-text: #1565C0;
    
    --sidebar-width: 260px;
    --header-height: 64px;
}

body {
    background-color: var(--dlc-body-bg);
    color: #334155;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.925rem;
    overflow-x: hidden;
}

/* App Wrapper Layout */
#app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
#sidebar {
    width: var(--sidebar-width);
    background-color: var(--dlc-sidebar-bg);
    color: var(--dlc-sidebar-text);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    transition: transform 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    background-color: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-gold {
    color: var(--dlc-gold);
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: 1.15rem;
}

.sidebar-menu {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem 0.75rem;
}

.nav-category {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94A3B8;
    padding: 0.75rem 0.75rem 0.25rem 0.75rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.85rem;
    color: var(--dlc-sidebar-text);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 0.2rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-link i {
    font-size: 1.15rem;
    margin-right: 0.75rem;
    width: 24px;
    text-align: center;
    color: #94A3B8;
}

.sidebar-link:hover {
    background-color: var(--dlc-sidebar-hover);
    color: #FFFFFF;
}

.sidebar-link:hover i {
    color: var(--dlc-gold);
}

.sidebar-link.active {
    background-color: var(--dlc-sidebar-active);
    color: var(--dlc-sidebar-text-active);
    font-weight: 600;
}

.sidebar-link.active i {
    color: var(--dlc-gold);
}

.badge-pending {
    background-color: #EF4444;
    color: #FFFFFF;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
}

/* Main Content Area */
#main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: margin-left 0.3s ease;
}

/* Header */
#top-header {
    height: var(--header-height);
    background-color: #FFFFFF;
    border-bottom: 1px solid var(--dlc-border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.content-body {
    padding: 1.75rem;
    flex-grow: 1;
}

/* Cards & Components */
.card-dlc {
    background: #FFFFFF;
    border: 1px solid var(--dlc-border-color);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.stat-card {
    border-radius: 12px;
    border: 1px solid var(--dlc-border-color);
    background: #FFFFFF;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

/* Buttons */
.btn-dlc-primary {
    background-color: var(--dlc-primary);
    color: #FFFFFF;
    border: none;
    font-weight: 500;
}

.btn-dlc-primary:hover {
    background-color: var(--dlc-primary-hover);
    color: #FFFFFF;
}

.btn-dlc-gold {
    background-color: var(--dlc-gold);
    color: #11222C;
    border: none;
    font-weight: 600;
}

.btn-dlc-gold:hover {
    background-color: var(--dlc-gold-hover);
    color: #11222C;
}

/* Tables */
.table-dlc th {
    background-color: #F8FAFC;
    color: #475569;
    font-weight: 600;
    font-size: 0.825rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--dlc-border-color);
    padding: 0.85rem 1rem;
}

.table-dlc td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--dlc-border-color);
}

/* VOUCHER MATRIX SPREADSHEET */
.voucher-matrix-wrapper {
    overflow: auto;
    max-height: calc(100vh - 280px);
    min-height: 380px;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    background: #FFFFFF;
    position: relative;
}

.table-voucher-matrix {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.table-voucher-matrix th,
.table-voucher-matrix td {
    border-right: 1px solid #E2E8F0;
    border-bottom: 1px solid #E2E8F0;
    text-align: center;
    white-space: nowrap;
}

/* Sticky Voucher Table Header */
.table-voucher-matrix thead th {
    position: sticky;
    top: 0;
    background-color: #1B3A4B;
    color: #FFFFFF;
    z-index: 20;
    font-size: 0.8rem;
    padding: 0.55rem 0.35rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.table-voucher-matrix thead th.voucher-th {
    min-width: 78px;
    max-width: 88px;
}

.table-voucher-matrix thead th .voucher-hdr-code {
    color: #FFFFFF !important;
    font-weight: 700;
    font-size: 0.875rem;
    line-height: 1.15;
    letter-spacing: 0.3px;
}

.table-voucher-matrix thead th .voucher-hdr-desc {
    color: rgba(255, 255, 255, 0.75) !important;
    font-size: 10.5px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    margin-top: 2px !important;
    max-width: 80px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 0.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sticky First Column (Member Info) */
.table-voucher-matrix th.sticky-col,
.table-voucher-matrix td.sticky-col {
    position: sticky;
    left: 0;
    background-color: #FFFFFF;
    z-index: 10;
    text-align: left;
    min-width: 220px;
    max-width: 260px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
    padding: 0.6rem 0.85rem;
}

.table-voucher-matrix thead th.sticky-col {
    z-index: 30;
    background-color: #11222C;
    color: #FFFFFF !important;
    font-weight: 600;
}

/* Voucher Cell States */
.voucher-cell {
    min-width: 78px;
    max-width: 88px;
    height: 52px;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.3rem 0.2rem;
    transition: all 0.15s ease-in-out;
    user-select: none;
    vertical-align: middle;
}

.voucher-cell.unused {
    background-color: #E8F5E9;
    color: #2E7D32;
    font-weight: 600;
}

.voucher-cell.unused:hover {
    background-color: #C8E6C9;
    box-shadow: inset 0 0 0 2px #388E3C;
    transform: scale(1.02);
}

.voucher-cell.used {
    background-color: #FFEBEE;
    color: #C62828;
    line-height: 1.15;
}

.voucher-cell.used:hover {
    background-color: #FFCDD2;
    box-shadow: inset 0 0 0 2px #D32F2F;
    transform: scale(1.02);
}

.voucher-cell.used .used-prop {
    font-weight: 600;
    font-size: 0.7rem;
    display: block;
}

.voucher-cell.used .used-date {
    font-size: 0.65rem;
    color: #64748B;
    display: block;
}

/* SCREENSHOT MODE (Daily Call Report) */
body.screenshot-mode #sidebar,
body.screenshot-mode #top-header,
body.screenshot-mode .hide-on-screenshot {
    display: none !important;
}

body.screenshot-mode #main-content {
    margin-left: 0 !important;
    background: #FFFFFF;
}

body.screenshot-mode .content-body {
    padding: 1.5rem !important;
}

.screenshot-header {
    border-bottom: 2px solid var(--dlc-primary);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

/* Mobile Responsiveness & Touch Optimization */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.65);
    z-index: 1055;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
}

body.sidebar-open {
    overflow: hidden;
}

/* 5-Column Grid Support for Call Reports */
@media (min-width: 1200px) {
    .col-xl-2-4 {
        flex: 0 0 20% !important;
        max-width: 20% !important;
    }
}
@media (max-width: 1199.98px) and (min-width: 768px) {
    .col-xl-2-4 {
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
    }
}
@media (max-width: 767.98px) {
    .col-xl-2-4 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}
@media (max-width: 479.98px) {
    .col-xl-2-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* Mobile Data Card Component System */
.mobile-card-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.mobile-data-card {
    background: #FFFFFF;
    border: 1px solid var(--dlc-border-color);
    border-radius: 12px;
    padding: 1rem 1.15rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mobile-data-card:active {
    transform: scale(0.995);
}

.mobile-data-card .card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 0.65rem;
    margin-bottom: 0.65rem;
    border-bottom: 1px solid #F1F5F9;
    gap: 0.5rem;
}

.mobile-data-card .data-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem 0.85rem;
    margin-bottom: 0.75rem;
}

.mobile-data-card .data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    font-size: 0.85rem;
}

.mobile-data-card .data-item {
    min-width: 0;
}

.mobile-data-card .data-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.15rem;
}

.mobile-data-card .data-value {
    font-size: 0.875rem;
    color: #1E293B;
    font-weight: 500;
    word-break: break-word;
}

.mobile-data-card .card-actions-flex {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.65rem;
    border-top: 1px solid #F1F5F9;
}

/* Mobile Voucher Card & Accordion System */
.mobile-voucher-card {
    background: #FFFFFF;
    border: 1px solid var(--dlc-border-color);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.mobile-voucher-card .member-head {
    padding: 1rem 1.15rem;
    background: #FFFFFF;
    border-bottom: 1px solid var(--dlc-border-color);
}

.mobile-voucher-card .voucher-cat-group {
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid #F1F5F9;
}

.mobile-voucher-card .voucher-cat-group:last-child {
    border-bottom: none;
}

.mobile-voucher-card .voucher-cat-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #475569;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-voucher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
    gap: 0.45rem;
}

.mobile-v-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.25rem;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 0.72rem;
    text-align: center;
    cursor: pointer;
    min-height: 48px;
    user-select: none;
    transition: all 0.15s ease;
}

.mobile-v-btn.unused {
    background-color: #E8F5E9;
    border-color: #A5D6A7;
    color: #1B5E20;
}

.mobile-v-btn.unused:active {
    background-color: #C8E6C9;
    transform: scale(0.96);
}

.mobile-v-btn.used {
    background-color: #FFEBEE;
    border-color: #FFCDD2;
    color: #B71C1C;
}

.mobile-v-btn.used:active {
    background-color: #FFCDD2;
    transform: scale(0.96);
}

.mobile-v-btn .v-code {
    font-weight: 800;
    font-size: 0.8rem;
    line-height: 1.1;
}

.mobile-v-btn .v-sub {
    font-size: 0.62rem;
    line-height: 1.1;
    margin-top: 2px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Modals on Mobile Viewports */
@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
    }
    
    .modal-content {
        border-radius: 12px;
        max-height: calc(100vh - 1rem);
    }
    
    .modal-body {
        padding: 1rem !important;
        overflow-y: auto;
        max-height: calc(100vh - 140px);
    }
    
    .modal-header, .modal-footer {
        padding: 0.75rem 1rem !important;
    }
    
    .modal-footer {
        flex-direction: column-reverse;
        gap: 0.5rem;
    }
    
    .modal-footer > * {
        width: 100% !important;
        margin: 0 !important;
    }
    
    .content-body {
        padding: 1rem 0.85rem !important;
    }

    #top-header {
        padding: 0 0.85rem !important;
        height: 58px !important;
    }

    .stat-card {
        padding: 0.85rem 1rem !important;
    }
    
    .stat-card .fs-3,
    .stat-card .fs-4 {
        font-size: 1.35rem !important;
    }
}

/* Tablet & Mobile Breakpoints */
@media (max-width: 991.98px) {
    #sidebar {
        transform: translateX(-100%);
        width: 280px;
        z-index: 1060;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
    }
    
    #sidebar.show {
        transform: translateX(0);
    }
    
    #main-content {
        margin-left: 0 !important;
    }

    .sidebar-close-btn {
        display: block !important;
    }

    /* Form controls touch minimum */
    .form-control, .form-select, .btn {
        min-height: 40px;
    }
    
    .btn-sm, .form-control-sm, .form-select-sm {
        min-height: 34px;
    }
}

@media (min-width: 992px) {
    .sidebar-close-btn {
        display: none !important;
    }
}

