html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* ================================
   COMMON STYLES FOR ALL VIEWS
   No HTML changes required!
   ================================ */

/* ====================
   1. GLOBAL STYLES
   ==================== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* ====================
   2. CONTAINER & CARD STYLES
   ==================== */
.container-fluid {
    padding-left: 20px;
    padding-right: 20px;
}

/* Card styles used in all views */
.card {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

    .card.border-0 {
        border: none;
    }

    .card.shadow-sm {
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
    }

.card-header {
    background-color: #fff;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.5rem;
}

    .card-header.bg-white {
        background-color: #fff !important;
    }

.card-body {
    padding: 1.5rem;
}

/* ====================
   3. TABLE STYLES
   ==================== */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

    .table thead th {
        background-color: #f8f9fa;
        border-bottom: 2px solid #dee2e6;
        padding: 1rem;
        font-weight: 600;
        color: #495057;
    }

    .table tbody td {
        padding: 1rem;
        vertical-align: middle;
        border-top: 1px solid #e9ecef;
    }

    .table tbody tr:hover {
        background-color: rgba(0, 123, 255, 0.05) !important;
        transition: background-color 0.2s;
    }

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.table.align-middle td {
    vertical-align: middle;
}

/* ====================
   4. BUTTON STYLES
   ==================== */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-lg {
    padding: 10px 24px;
    font-size: 1rem;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

    .btn-primary:hover {
        background-color: #0b5ed7;
        border-color: #0a58ca;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(13, 110, 253, 0.2);
    }

.btn-outline-primary {
    color: #0d6efd;
    border-color: #0d6efd;
}

    .btn-outline-primary:hover {
        background-color: #0d6efd;
        border-color: #0d6efd;
        transform: translateY(-1px);
    }

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
}

    .btn-outline-secondary:hover {
        background-color: #6c757d;
        border-color: #6c757d;
        color: white;
        transform: translateY(-1px);
    }

.btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
}

    .btn-outline-danger:hover {
        background-color: #dc3545;
        border-color: #dc3545;
        color: white;
        transform: translateY(-1px);
    }

.btn-success {
    background-color: #198754;
    border-color: #198754;
}

    .btn-success:hover {
        background-color: #157347;
        border-color: #146c43;
        transform: translateY(-1px);
    }

.btn-group .btn {
    border-radius: 4px;
}

/* ====================
   5. BADGE STYLES
   ==================== */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
    border-radius: 6px;
}

    .badge.bg-primary {
        background-color: #0d6efd !important;
    }

    .badge.bg-secondary {
        background-color: #6c757d !important;
    }

    .badge.bg-success {
        background-color: #198754 !important;
    }

    .badge.bg-danger {
        background-color: #dc3545 !important;
    }

    .badge.bg-warning {
        background-color: #ffc107 !important;
        color: #000 !important;
    }

    .badge.bg-info {
        background-color: #0dcaf0 !important;
    }

/* ====================
   6. FORM STYLES
   ==================== */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 0.75rem 1rem;
    transition: all 0.2s;
}

.form-control-lg {
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
    outline: none;
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
}

    .form-label.small.text-muted {
        font-size: 0.875rem;
        font-weight: 400;
    }

.form-text.text-muted {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ====================
   7. ALERT STYLES
   ==================== */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.25rem;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

    .alert-info .fas.fa-info-circle {
        color: #0dcaf0;
    }

/* ====================
   8. NAVIGATION & HEADER
   ==================== */
.breadcrumb {
    background: transparent;
    padding: 0.5rem 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-item a {
    color: #0d6efd;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #6c757d;
}

.text-muted {
    color: #6c757d !important;
}

.text-primary {
    color: #0d6efd !important;
}

/* ====================
   9. FLEX & GRID UTILITIES
   ==================== */
.d-flex.align-items-center {
    align-items: center;
}

.gap-2 {
    gap: 0.5rem !important;
}

.row.g-3 {
    margin-right: -0.75rem;
    margin-left: -0.75rem;
}

    .row.g-3 > .col,
    .row.g-3 > [class*="col-"] {
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }

/* ====================
   10. SPECIFIC VIEW COMPONENTS
   ==================== */

/* User avatar circle */
.bg-secondary.bg-opacity-10.rounded-circle {
    background-color: rgba(108, 117, 125, 0.1) !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Search/Filter card */
.card.border-0.shadow-sm.mb-3 .card-body {
    padding: 1.5rem;
}

/* Action buttons in table */
.text-end.px-4.py-3 {
    text-align: right !important;
    padding-right: 1.5rem !important;
}

/* Empty state styling */
.text-center.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

    .text-center.py-5 .fas {
        opacity: 0.3;
    }

/* ====================
   11. ICON STYLES
   ==================== */
.fas {
    vertical-align: middle;
}

.me-1,
.me-2 {
    display: inline-flex;
    align-items: center;
}

/* ====================
   12. DETAILS VIEW SPECIFICS
   ==================== */

/* Details card layout */
.card-body.p-4 {
    padding: 1.5rem !important;
}

.card-body .row.g-4 {
    margin-top: -0.5rem;
}

/* Permissions badges */
.d-flex.flex-wrap.gap-2 {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Activity table in details */
.table.mb-0 {
    margin-bottom: 0 !important;
}

/* ====================
   13. CREATE/EDIT FORM SPECIFICS
   ==================== */
hr.my-4 {
    margin: 1.5rem 0;
    border: 0;
    border-top: 2px solid #e9ecef;
}

/* Form headings */
h5.text-primary.mb-3 {
    font-weight: 600;
    margin-bottom: 1rem !important;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

/* Form validation */
.text-danger.small {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* ====================
   14. RESPONSIVE ADJUSTMENTS
   ==================== */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }

    .card-body {
        padding: 1rem;
    }

    .table-responsive {
        margin: 0 -1rem;
        width: calc(100% + 2rem);
    }

    .btn-group {
        display: flex;
        flex-wrap: nowrap;
    }

        .btn-group .btn {
            padding: 0.375rem 0.5rem;
            font-size: 0.875rem;
        }

    .d-flex.justify-content-center.gap-2 {
        flex-direction: column;
        gap: 0.5rem !important;
    }

        .d-flex.justify-content-center.gap-2 .btn {
            width: 100%;
            margin-bottom: 0.5rem;
        }
}

@media (max-width: 576px) {
    .row.g-3 {
        margin-right: -0.5rem;
        margin-left: -0.5rem;
    }

        .row.g-3 > .col,
        .row.g-3 > [class*="col-"] {
            padding-right: 0.5rem;
            padding-left: 0.5rem;
        }

    .form-control-lg {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
}

/* ====================
   15. ANIMATIONS & TRANSITIONS
   ==================== */
.table tbody tr,
.card,
.btn {
    transition: all 0.3s ease;
}

/* ====================
   16. UTILITY OVERRIDES
   ==================== */
.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.px-4 {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

.py-3 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

/* ====================
   17. CUSTOM SCROLLBAR (Optional)
   ==================== */
.table-responsive::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

    .table-responsive::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }
html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}