﻿/* ========== GLOBAL BASE ========== */
*, *::before, *::after {
    box-sizing: border-box;
}

/* ========== GLOBAL LAYOUTS ========== */
.scroll-fixed {
    max-height: 600px;
    overflow-y: auto;
    position: relative;
}

    .scroll-fixed table {
        width: 100%;
        font-size: 0.85rem;
        border-collapse: separate;
        border-spacing: 0;
    }

    .scroll-fixed thead th {
        position: sticky;
        top: 0;
        background-color: #f8f9fa;
        z-index: 2;
        text-align: center;
    }

    .scroll-fixed tfoot td {
        position: sticky;
        bottom: 0;
        background-color: #f8f9fa;
        z-index: 1;
        font-weight: bold;
        text-align: right;
    }

    .scroll-fixed td,
    .scroll-fixed th {
        padding-top: 0.35rem !important;
        padding-bottom: 0.35rem !important;
        vertical-align: middle;
    }

        .scroll-fixed td.text-start {
            text-align: left !important;
        }

        .scroll-fixed td.text-center {
            text-align: center !important;
        }

        .scroll-fixed td.text-end {
            text-align: right !important;
        }

.sticky-button {
    position: sticky;
    bottom: 0;
    background-color: #ffffff;
    padding: 1rem 0 0.5rem;
    z-index: 3;
    text-align: center;
}

.mobile-layout {
    display: none;
}

.desktop-layout {
    display: block;
}

@@media (max-width: 576px) {
    .tile-card {
        padding: 1rem 0.75rem;
    }

    .tile-label {
        font-size: 0.7rem;
    }

    .tile-value {
        font-size: 1.1rem;
    }
}

@media (max-width: 767.98px) {
    .mobile-layout {
        display: block;
    }

    .desktop-layout {
        display: none;
    }
}

/* ========== BADGES ========== */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    border-radius: 0.375rem;
}

.badge-status {
    text-transform: uppercase;
}

.badge-success {
    background-color: #198754;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: black;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}

.badge-secondary {
    background-color: #6c757d;
    color: white;
}

.badge-primary {
    background-color: #0d6efd;
    color: white;
}

.badge-light {
    background-color: #f8f9fa;
    color: black;
}

.badge-dark {
    background-color: #212529;
    color: white;
}

.badge-info {
    background-color: #0dcaf0;
    color: white;
}

.bg-purple {
    background-color: #6f42c1 !important;
    color: white !important;
}

/* ========== THEAD STYLING ========== */
.thead-gradient {
    background: linear-gradient(to right, #e3f2fd, #d1c4e9) !important;
    color: #000;
}

    .thead-gradient th {
        background-color: transparent !important;
    }

/* ========== TEXT STYLES ========== */
.text-gradient {
    background: linear-gradient(90deg, #0d6efd, #6610f2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ========== FORM CONTROLS ========== */
.form-control,
.form-select {
    font-size: 0.95rem;
}

.form-control-sm,
.form-select-sm {
    font-size: 0.85rem;
}

.table-filters input,
.table-filters select {
    font-size: 0.75rem;
    padding: 3px 6px;
}

.font-xs {
    font-size: 0.55rem;
}

/* ========== MOBILE SEARCH INPUT ========== */
#mobileSearchInput,
#mobileMessageSearch,
#mobileChargeSearch {
    display: block;
    margin-bottom: 1rem;
    width: 60%;
    padding: 6px 10px;
    font-size: 0.9rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

/* ========== SUMMARY TILE ========== */
.summary-tile {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 0.4rem 0.6rem;
    min-width: 130px;
    max-width: 130px;
    text-align: center;
    flex: 1 1 auto;
    font-size: 0.4rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.summary-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.summary-label {
    font-size: 0.6rem;
    color: #6c757d;
    margin-bottom: 0.1rem;
}

.summary-value {
    font-size: 0.65rem;
    font-weight: 600;
    color: #212529;
    line-height: 1.2;
    word-break: break-word;
    text-align: center;
}

/* ========== NOTIFICATION CARDS ========== */
.notification-card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    background-color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
}

    .notification-card .label {
        font-weight: 600;
        color: #6c757d;
        font-size: 0.8rem;
        margin-bottom: 0.1rem;
        text-align: center;
    }

    .notification-card .value {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
        color: #212529;
        text-align: center;
    }

@media (max-width: 767.98px) {
    .tile-label {
        font-size: 0.75rem;
    }

    .tile-value {
        font-size: 1.25rem;
    }

    .notification-card {
        padding: 0.75rem;
        margin-bottom: 1rem;
        border-radius: 0.5rem;
    }

    .mobile-layout .d-flex.gap-2 input {
        flex-grow: 1;
    }

    .notification-card .label {
        font-size: 0.65rem;
        margin-bottom: 0.15rem;
    }

    .notification-card .value {
        font-size: 0.8rem;
        margin-bottom: 0.35rem;
    }

    .notification-card .badge {
        font-size: 0.7rem;
        padding: 0.35em 0.5em;
    }

    .notification-card .btn {
        font-size: 0.7rem;
        padding: 0.25rem 0.6rem;
        min-width: 65px;
    }

    .notification-card .button-group {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 0.5rem;
        flex-wrap: wrap;
    }

    #messagesTable {
        width: 100% !important;
    }

        #messagesTable thead {
            display: none;
        }

        #messagesTable tr {
            display: block;
            margin-bottom: 1rem;
            border: 1px solid #dee2e6;
            border-radius: 0.5rem;
            padding: 0.75rem;
            background: white;
        }

        #messagesTable td {
            display: flex;
            justify-content: space-between;
            padding: 0.5rem;
            font-size: 0.85rem;
            border: none;
            border-bottom: 1px solid #eee;
        }

            #messagesTable td:last-child {
                border-bottom: none;
            }

            #messagesTable td::before {
                content: attr(data-label);
                font-weight: bold;
                flex: 1;
                margin-right: 10px;
                margin-right: 10px;
                color: #0d6efd;
            }

    .notification-table {
        table-layout: fixed;
        width: 100%;
    }

        .notification-table td,
        .notification-table th {
            white-space: normal !important;
            word-break: break-word;
            padding: 0.3rem 0.5rem !important; /* More compact vertical space */
        }

    #mobileMessageSearch {
        display: block;
        margin-bottom: 1rem;
        width: 100%;
        padding: 6px 10px;
        font-size: 0.9rem;
        border: 1px solid #ced4da;
        border-radius: 4px;
    }
}

/* ========== SCROLLBAR (OPTIONAL POLISH) ========== */
.scroll-fixed::-webkit-scrollbar {
    width: 6px;
}

.scroll-fixed::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.circle-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}

.circle-same-day {
    background-color: #198754;
}

.circle-one-day {
    background-color: #ffc107;
}

.nav-tabs .nav-link.active {
    background: linear-gradient(90deg, #0d6efd, #6610f2);
    color: white !important;
    font-weight: bold;
}

.nav-tabs .nav-link {
    color: #0d6efd;
}

.tab-description {
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #6c757d;
    text-align: center;
}

.notification-table {
    border-collapse: collapse;
    width: 100%;
}

    .notification-table thead,
    #messagesTable thead {
        position: sticky;
        top: 0;
        z-index: 1;
        background: linear-gradient(to right, #e3f2fd, #d1c4e9);
    }

/* Smaller Tile Styles */
.summary-tile, .tile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 110px;
    border-radius: 0.75rem;
    padding: 0.75rem;
    background-color: #fff;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease-in-out;
    height: 100%;
    font-size: 0.75rem;
}

.summary-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tile-label {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    letter-spacing: 0.02em;
}

.tile-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.tile-indigo {
    background: linear-gradient(135deg, #6366f1, #818cf8);
}

.tile-emerald {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.tile-violet {
    background: linear-gradient(135deg, #a855f7, #d8b4fe);
}

.tile-red {
    background: linear-gradient(135deg, #ef4444, #f87171);
}

.tile-orange {
    background: linear-gradient(135deg, #f59e0b, #fcd34d);
}

@media (max-width: 767.98px) {
    h6.text-gradient {
        font-size: 1rem;
    }

    .list-unstyled li {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .btn-sm {
        font-size: 0.75rem;
        padding: 0.35rem 0.75rem;
    }

    .ratio iframe {
        height: 200px;
    }
}

