/* Custom CSS for Sistem Voucher Barcode */

/* General styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Card enhancements */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Enhanced Statistics Cards */
.stat-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-card .card-body {
    padding: 1.5rem 1rem;
    position: relative;
    z-index: 1;
}

.stat-card .stat-icon {
    font-size: 2rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.stat-card .stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-subtitle {
    font-size: 0.75rem;
    opacity: 0.8;
    font-style: italic;
    margin-top: 0.25rem;
}

/* Card Color Variations */
.stat-card.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.stat-card.bg-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%) !important;
}

.stat-card.bg-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
}

.stat-card.bg-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
}

.stat-card.bg-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%) !important;
}

/* Special styling for total used amount card */
.stat-card.bg-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.stat-card.bg-danger .stat-number {
    font-size: 1.8rem;
}

/* Form enhancements */
.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
}

/* Table enhancements */
.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Badge enhancements */
.badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
}

/* Modal enhancements */
.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
}

/* Toast enhancements */
.toast {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .stat-card .stat-number {
        font-size: 1.6rem;
    }
    
    .stat-card .stat-icon {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .stat-card .card-body {
        padding: 1.25rem 0.75rem;
    }
    
    .stat-card .stat-number {
        font-size: 1.4rem;
    }
    
    .stat-card .stat-icon {
        font-size: 1.6rem;
    }
    
    .stat-card .stat-label {
        font-size: 0.8rem;
    }
    
    .stat-card .stat-subtitle {
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .stat-card .stat-number {
        font-size: 1.2rem;
    }
    
    .stat-card .stat-icon {
        font-size: 1.4rem;
    }
    
    .stat-card .stat-label {
        font-size: 0.75rem;
    }
}

/* Animation for stats loading */
.stat-card.animate__animated {
    animation-duration: 0.6s;
}

/* Hover effects for interactive feel */
.stat-card:hover .stat-icon {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-number {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* Animation classes */
.animate__animated {
    animation-duration: 0.6s;
}

.animate__fadeInUp {
    animation-name: fadeInUp;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

/* Scanner Status Styling */
#scannerStatus {
    margin-top: 1rem;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#scannerStatus.alert-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
}

#scannerStatus.alert-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
}

#scannerStatus.alert-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

#scannerStatus.alert-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

/* Scanner Controls Enhancement */
#startScannerBtn, #stopScannerBtn, #resetScannerBtn {
    min-width: 120px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#startScannerBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

#stopScannerBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

#resetScannerBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

/* Scanner Container Enhancement */
#scannerContainer {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Enhanced Navbar Styling */
.navbar {
    padding: 0.75rem 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient Background */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* Brand Styling */
.navbar-brand {
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.brand-icon {
    font-size: 1.8rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.brand-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

/* Navigation Links */
.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-nav .nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.navbar-nav .nav-link i {
    font-size: 1.1rem;
}

/* User Info Styling */
#userInfo {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-right: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#userInfo .user-name {
    color: #fff;
    font-weight: 600;
    margin-right: 0.5rem;
}

#userInfo .user-role {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Action Buttons */
.nav-btn {
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-btn i {
    font-size: 1rem;
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
    .navbar {
        padding: 0.5rem 1rem;
    }
    
    .navbar-collapse {
        background: rgba(0, 0, 0, 0.1);
        border-radius: 12px;
        margin-top: 1rem;
        padding: 1rem;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-nav .nav-link {
        margin: 0.25rem 0;
        padding: 0.75rem 1rem;
        border-radius: 8px;
    }
    
    .navbar-nav .nav-link:hover {
        background: rgba(255, 255, 255, 0.15);
    }
    
    #userInfo {
        margin: 1rem 0;
        justify-content: center;
        text-align: center;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav-item.d-flex {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .nav-btn {
        width: 100%;
        justify-content: center;
    }
    
    .brand-text {
        text-align: left;
    }
    
    .brand-title {
        font-size: 1.1rem;
    }
    
    .brand-subtitle {
        font-size: 0.7rem;
    }
}

@media (max-width: 575.98px) {
    .navbar {
        padding: 0.5rem;
    }
    
    .brand-icon {
        font-size: 1.5rem;
    }
    
    .brand-title {
        font-size: 1rem;
    }
    
    .brand-subtitle {
        font-size: 0.65rem;
    }
    
    .navbar-brand {
        margin-right: 0;
    }
    
    .navbar-toggler {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* Navbar Toggler Enhancement */
.navbar-toggler {
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

/* Animation for navbar elements */
.navbar-nav .nav-link,
.nav-btn,
#userInfo {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
