/* Main Styles */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Card Styling */
.card {
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
    font-weight: bold;
    background-color: #f8f9fa;
}

/* Dashboard Stats Cards */
.stats-card {
    border-left: 5px solid;
    transition: all 0.3s;
}

.stats-card.primary {
    border-left-color: #0d6efd;
}

.stats-card.success {
    border-left-color: #198754;
}

.stats-card.warning {
    border-left-color: #ffc107;
}

.stats-card.danger {
    border-left-color: #dc3545;
}

.stats-card:hover {
    background-color: #f8f9fa;
}

.stats-card .card-body {
    padding: 1rem;
}

.stats-card .icon {
    font-size: 2.5rem;
    opacity: 0.7;
}

/* Navbar Styling */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: bold;
}

.nav-item {
    margin-right: 5px;
}

.nav-link {
    border-radius: 5px;
    transition: all 0.3s;
    padding: 8px 12px !important;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-item {
    padding: 8px 16px;
}

.dropdown-item:hover {
    background-color: #f1f1f1;
}

/* Forms */
.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 500;
}

.form-control, .form-select, .btn {
    border-radius: 6px;
}

.input-group-text {
    border-radius: 6px 0 0 6px;
}

/* Tables */
.table-container {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.table-hover tbody tr:hover {
    background-color: #f1f1f1;
}

/* DataTables Customization */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 5px 12px;
    margin: 0 2px;
    border-radius: 5px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #0d6efd;
    color: white !important;
    border: none;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #e9ecef;
    color: #0d6efd !important;
    border: 1px solid #dee2e6;
}

.dataTables_filter input {
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 6px 12px;
}

/* Buttons */
.btn {
    border-radius: 6px;
    padding: 0.375rem 1rem;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.btn-action {
    margin-right: 5px;
    padding: 0.25rem 0.5rem;
}

.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
}

/* Badges */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
}

/* Login Page */
.login-container {
    max-width: 400px;
    margin: 100px auto;
}

.login-container .card {
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.login-container .card-header {
    background-color: #0d6efd;
    color: white;
    text-align: center;
    border-radius: 15px 15px 0 0 !important;
    padding: 25px 20px;
}

.login-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

/* QR Code Display */
.qr-code-container {
    text-align: center;
    padding: 20px;
}

.qr-code-container img {
    max-width: 200px;
}

.qr-code-print {
    width: 100%;
    height: 250px;
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
    margin-bottom: 20px;
}

/* Password Modal */
.password-modal .modal-content {
    border-radius: 15px;
}

.password-modal .modal-header {
    background-color: #0d6efd;
    color: white;
    border-radius: 15px 15px 0 0;
}

/* Print Styling */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
    }
    
    body {
        background-color: white;
    }
    
    .card, .table-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .table th, .table td {
        text-align: left !important;
    }
}

/* Responsive QR Code Label */
.qr-label {
    display: inline-block;
    width: 200px;
    height: 100px;
    border: 1px solid #ddd;
    margin: 5px;
    padding: 5px;
    text-align: center;
    font-size: 10px;
}

.qr-label img {
    height: 70px;
    width: 70px;
}

.qr-label .device-name {
    font-weight: bold;
    margin-bottom: 2px;
}

.qr-label .branch-dept {
    font-size: 8px;
}

/* Modal Customization */
.modal-content {
    border-radius: 10px;
    border: none;
}

.modal-header {
    background-color: #f8f9fa;
    border-radius: 10px 10px 0 0;
}

.modal-footer {
    background-color: #f8f9fa;
    border-radius: 0 0 10px 10px;
}

/* Alert Customization */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
}

.alert-info {
    background-color: #cff4fc;
    color: #055160;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
}

/* Page Title Styling */
h1 {
    color: #333;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* Custom Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .card:hover {
        transform: none;
    }
    
    .btn-group {
        display: flex;
        flex-wrap: wrap;
    }
    
    .btn-group .btn {
        flex: 1 0 auto;
        margin-bottom: 5px;
    }
    
    .stats-card {
        margin-bottom: 15px;
    }
}