/* Modern Premium CSS System - Shift Payment Management */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --border-glow: rgba(99, 102, 241, 0.15);
    --border-glow-hover: rgba(99, 102, 241, 0.4);
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.3);
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.2);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.2);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-outfit: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
    color: var(--text-main);
    font-family: var(--font-outfit);
    min-height: 100vh;
    margin: 0;
    padding-bottom: 80px;
    position: relative;
    overflow-x: hidden;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glow);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: var(--transition);
}

.glass-card:hover {
    border-color: var(--border-glow-hover);
    box-shadow: 0 12px 40px 0 rgba(99, 102, 241, 0.15);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.text-gradient {
    background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navbar */
.navbar-custom {
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glow);
    padding: 16px 0;
}

.navbar-custom .navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-main) !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-custom .navbar-brand span {
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Stat Widgets */
.stat-widget {
    position: relative;
    overflow: hidden;
}

.stat-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.stat-widget.total::before { background: var(--primary); }
.stat-widget.shifts::before { background: #eab308; }
.stat-widget.transferred::before { background: var(--success); }
.stat-widget.untransferred::before { background: var(--danger); }

.stat-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
}

/* Input Fields */
.form-group-custom {
    margin-bottom: 20px;
}

.form-label-custom {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}

.form-input-custom {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-glow);
    border-radius: 10px;
    color: var(--text-main);
    padding: 12px 16px;
    width: 100%;
    transition: var(--transition);
    font-family: var(--font-outfit);
}

.form-input-custom:focus {
    background: rgba(15, 23, 42, 0.8);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    outline: none;
    color: var(--text-main);
}

.form-input-custom::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
    opacity: 0.85;
    transition: var(--transition);
}

.form-input-custom::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}


.form-input-custom option {
    background: #0f172a;
    color: var(--text-main);
}

select.form-input-custom {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 18px;
    padding-right: 40px;
    cursor: pointer;
}

/* Custom Tabs for Reports */
.custom-tabs {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-glow);
    padding: 4px;
    border-radius: 30px;
}

.custom-tabs .nav-link {
    color: var(--text-muted);
    border-radius: 25px;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    border: none !important;
    background: transparent;
    transition: var(--transition);
}

.custom-tabs .nav-link:hover {
    color: var(--text-main);
}

.custom-tabs .nav-link.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px var(--primary-glow);
}




/* Realtime Money Indicator */
.money-container {
    background: rgba(99, 102, 241, 0.08);
    border: 1px dashed var(--primary);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.money-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.money-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #a5b4fc;
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

/* Buttons */
.btn-primary-custom {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    width: 100%;
    transition: var(--transition);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
}

.btn-primary-custom:active {
    transform: translateY(0);
}

/* Custom Table */
.table-responsive-custom {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-glow);
}

.custom-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card);
    color: var(--text-main);
    margin: 0;
}

.custom-table th {
    background: rgba(15, 23, 42, 0.8);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-glow);
}

.custom-table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
    transition: var(--transition);
}

.custom-table tr:last-child td {
    border-bottom: none;
}

.custom-table tbody tr {
    transition: var(--transition);
}

.custom-table tbody tr:hover td {
    background: rgba(99, 102, 241, 0.05);
}

/* Glowing Badges */
.badge-custom {
    padding: 8px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    background: transparent;
}

.badge-custom.transferred {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}

.badge-custom.transferred:hover {
    background: rgba(16, 185, 129, 0.2);
    box-shadow: 0 0 12px var(--success-glow);
}

.badge-custom.untransferred {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}

.badge-custom.untransferred:hover {
    background: rgba(239, 68, 68, 0.2);
    box-shadow: 0 0 12px var(--danger-glow);
}

/* Form switch toggle */
.toggle-form {
    display: inline;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
}

.btn-icon:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* Footer style */
.footer-custom {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 60px;
    line-height: 60px;
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid var(--border-glow);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Animation classes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animated-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* Custom Stats Grid System */
.stats-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -8px;
    margin-left: -8px;
}

.stats-col {
    flex: 0 0 50%;
    max-width: 50%;
    padding-right: 8px;
    padding-left: 8px;
    margin-bottom: 16px;
}

@media (min-width: 992px) {
    .stats-col {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* Mobile & Tablet Responsive Optimizations */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 120px; /* Leave space for sticky footer */
    }
}

@media (max-width: 767.98px) {
    .glass-card {
        padding: 16px;
    }
    
    /* Table to card layout */
    .table-responsive-custom {
        border: none;
        overflow: visible;
    }
    
    .custom-table, 
    .custom-table thead, 
    .custom-table tbody, 
    .custom-table th, 
    .custom-table td, 
    .custom-table tr {
        display: block;
    }
    
    .custom-table thead {
        display: none; /* Hide standard headers */
    }
    
    .custom-table tr {
        margin-bottom: 16px;
        background: rgba(30, 41, 59, 0.4);
        border: 1px solid var(--border-glow);
        border-radius: 12px;
        padding: 12px 16px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .custom-table td {
        border: none;
        padding: 10px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
    }
    
    .custom-table td:last-child {
        border-bottom: none;
        padding-bottom: 4px;
    }
    
    .custom-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        text-transform: uppercase;
        font-size: 0.72rem;
        letter-spacing: 0.05em;
        text-align: left;
    }
    
    .custom-table td.text-end, 
    .custom-table td.text-center {
        text-align: right;
        justify-content: space-between;
        width: 100%;
    }

    .badge-custom {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
}

@media (max-width: 575.98px) {
    body {
        padding-bottom: 140px;
    }
    
    .stat-widget {
        padding: 12px;
    }
    
    .stat-title {
        font-size: 0.7rem;
        letter-spacing: 0.02em;
        margin-bottom: 4px;
    }
    
    .stat-value {
        font-size: 1.15rem;
        font-weight: 700;
    }
    
    .money-container {
        padding: 12px;
    }
    
    .money-title {
        font-size: 0.85rem;
    }
    
    .money-value {
        font-size: 1.25rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem !important;
    }
    
    h3 {
        font-size: 1.4rem;
    }
}

/* Prevent accidental value changes in number inputs on mobile */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
}

/* VietQR Integration & Styling */
.bg-info-glow {
    background: rgba(99, 102, 241, 0.1) !important;
}
.border-info-glow {
    border-color: rgba(99, 102, 241, 0.3) !important;
}
.btn-qr-trigger:hover {
    background: rgba(99, 102, 241, 0.25) !important;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
    transform: scale(1.05);
}

.qr-container-custom {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-glow);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.qr-image-wrapper {
    overflow: hidden;
    border-radius: 12px;
    background: #ffffff;
    padding: 8px;
    display: inline-block;
    transition: var(--transition);
}

.qr-image-wrapper:hover {
    transform: scale(1.03);
    box-shadow: 0 0 15px var(--primary-glow);
}

.qr-image {
    transition: var(--transition);
}