/* ============================================
   ADMIN AREA STYLES
   ============================================ */

/* Admin Header */
.admin-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #0d6efd;
}

.admin-header h1 {
    color: #0d6efd;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.admin-header h1 i {
    margin-right: 0.5rem;
}

/* Admin Cards */
.admin-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.admin-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-card-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1.25rem;
}

.admin-card-header h5 i {
    margin-right: 0.5rem;
}

.admin-card-header .badge {
    margin-left: 0.5rem;
    font-size: 0.85rem;
}

.admin-card-body {
    padding: 1.5rem;
}

/* Master Detail Primary Header - VAT Lookup Button */
.master-detail-primary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.master-detail-primary-header .btn {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.master-detail-primary-header .btn i {
    font-size: 0.9rem;
}

/* Section Titles */
.section-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.section-title i {
    margin-right: 0.5rem;
    color: #0d6efd;
}

/* User Table Styles */
.user-inactive {
    opacity: 0.6;
    background-color: #f8f9fa;
}

.user-inactive td {
    color: #6c757d;
}

#usersTable tbody tr:hover:not(.user-inactive) {
    background-color: #f0f8ff;
    transition: background-color 0.3s ease;
}

/* Role Cards for Assignment */
.roles-container {
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.role-card {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.role-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
    transform: translateY(-2px);
}

.role-card.role-assigned {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

.role-card.role-assigned label {
    color: white;
}

.role-card .form-check-input {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.75rem;
    cursor: pointer;
}

.role-card label {
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin: 0;
    display: flex;
    align-items: center;
}

.role-card label i {
    margin-right: 0.5rem;
}

/* Badge Styles */
.badge {
    padding: 0.5rem 0.75rem;
    font-weight: 500;
}

/* Button Group Styles */
.btn-group .btn {
    margin: 0 2px;
}

/* DataTables Custom Styling */
.dataTables_wrapper {
    padding: 0;
}

.dataTables_wrapper .dataTables_length select {
    padding: 0.375rem 2rem 0.375rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.dataTables_wrapper .dataTables_filter input {
    padding: 0.375rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.dataTables_wrapper .dataTables_info {
    padding-top: 1rem;
    color: #6c757d;
}

.dataTables_wrapper .dataTables_paginate {
    padding-top: 1rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.375rem 0.75rem;
    margin: 0 2px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    background: white;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #0d6efd;
    color: white !important;
    border-color: #0d6efd;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #0d6efd;
    color: white !important;
    border-color: #0d6efd;
}

/* Form Styles */
.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.form-switch .form-check-input {
    width: 3rem;
    height: 1.5rem;
}

/* Alert Styles */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-info {
    background-color: #e7f3ff;
    color: #004085;
}

.alert-info .alert-link {
    color: #002752;
    font-weight: 600;
}

/* Validation Styles */
.text-danger {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.validation-summary-errors {
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.validation-summary-errors ul {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .admin-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-card-header .btn {
        margin-top: 1rem;
        width: 100%;
    }

    .master-detail-primary-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .master-detail-primary-header .btn {
        width: 100%;
        justify-content: center;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .role-card {
        margin-bottom: 1rem;
    }
}

/* Animation for status toggle */
@keyframes statusChange {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.badge.bg-success,
.badge.bg-secondary {
    animation: statusChange 0.3s ease-in-out;
}

/* Table icons */
.table i.fa-check-circle {
    margin-left: 0.5rem;
}

/* Custom scrollbar for tables */
.admin-card-body::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.admin-card-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.admin-card-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.admin-card-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}
