/* ========================== Global Module Responsive Styles ========================== */

/* Container and Layout */
.container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Cards and Panels */
.card {
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    /* margin-bottom: 1.5rem; */
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

/* Tables */
.table-responsive {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.table {
    margin-bottom: 0;
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
    padding: 0.75rem;
    vertical-align: middle;
}

.table td {
    padding: 0.75rem;
    vertical-align: middle;
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

.btn-group .btn:last-child {
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

/* Forms */
.form-control, .form-select {
    border-radius: 0.5rem;
    border: 1px solid #ced4da;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Modals */
.modal-content {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

/* Alerts */
.alert {
    border-radius: 0.75rem;
    border: none;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

/* Badges */
.badge {
    border-radius: 0.375rem;
    font-weight: 500;
    padding: 0.375em 0.75em;
}

/* Pagination */
.pagination .page-link {
    border-radius: 0.375rem;
    margin: 0 0.125rem;
    border: 1px solid #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* ========================== Mobile Responsive (≤ 767px) ========================== */
@media (max-width: 767.98px) {
    /* Container adjustments */
    .container, .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Card adjustments */
    .card {
        margin-bottom: 1rem;
        border-radius: 0.5rem;
    }
    
    .card-header, .card-body {
        padding: 0.75rem;
    }
    
    /* Table responsive */
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table th, .table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.875rem;
    }
    
    /* Hide less important columns on mobile */
    .table .d-none-mobile {
        display: none !important;
    }
    
    /* Button adjustments */
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        margin-bottom: 0.25rem;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        border-radius: 0.375rem !important;
        margin-bottom: 0.25rem;
    }
    
    /* Form adjustments */
    .form-control, .form-select {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 0.75rem;
    }
    
    .form-label {
        font-size: 0.875rem;
        font-weight: 600;
    }
    
    /* Modal adjustments */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-header, .modal-body, .modal-footer {
        padding: 1rem;
    }
    
    .modal-title {
        font-size: 1.1rem;
    }
    
    /* Alert adjustments */
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Pagination adjustments */
    .pagination {
        justify-content: center;
    }
    
    .pagination .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Action buttons in tables */
    .table .btn-group-vertical {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    /* Search and filter forms */
    .search-form .row > div {
        margin-bottom: 0.75rem;
    }
    
    /* Stats cards */
    .stats-card {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .stats-card .card-body {
        padding: 1rem 0.75rem;
    }
}

/* ========================== Tablet Responsive (768px - 991px) ========================== */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .table th, .table td {
        padding: 0.625rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.9rem;
    }
    
    .modal-dialog {
        max-width: 90%;
    }
}

/* ========================== Utility Classes ========================== */
.mobile-only {
    display: none;
}

.tablet-only {
    display: none;
}

.desktop-only {
    display: block;
}

@media (max-width: 767.98px) {
    .mobile-only {
        display: block;
    }
    
    .desktop-only {
        display: none;
    }
    
    .mobile-hide {
        display: none !important;
    }
    
    .mobile-center {
        text-align: center !important;
    }
    
    .mobile-full-width {
        width: 100% !important;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .tablet-only {
        display: block;
    }
    
    .tablet-hide {
        display: none !important;
    }
}

/* ========================== Component Specific Styles ========================== */

/* Dashboard Cards */
.dashboard-card {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Data Tables */
.datatable-wrapper {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

@media (max-width: 767.98px) {
    .datatable-wrapper {
        padding: 0.75rem;
        overflow-x: auto;
    }
    
    .datatable-wrapper table {
        min-width: 600px;
    }
}

/* Form Sections */
.form-section {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

@media (max-width: 767.98px) {
    .form-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
}

/* Status Indicators */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-active {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

/* ========================== Uniform Button Styles for Frontend ========================== */
/* Standardized button styles for all frontend modules */

/* Base button styling */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

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

/* Action button variants */
.btn-add, .btn-create {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-color: #28a745;
}

.btn-add:hover, .btn-create:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
    color: white;
}

.btn-edit, .btn-update {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #212529;
    border-color: #ffc107;
}

.btn-edit:hover, .btn-update:hover {
    background: linear-gradient(135deg, #e0a800 0%, #e8650e 100%);
    color: #212529;
}

.btn-delete, .btn-remove {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
    color: white;
    border-color: #dc3545;
}

.btn-delete:hover, .btn-remove:hover {
    background: linear-gradient(135deg, #c82333 0%, #d91a72 100%);
    color: white;
}

.btn-refresh, .btn-reload {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
    color: white;
    border-color: #17a2b8;
}

.btn-refresh:hover, .btn-reload:hover {
    background: linear-gradient(135deg, #138496 0%, #5a32a3 100%);
    color: white;
}

.btn-filter, .btn-search {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border-color: #6c757d;
}

.btn-filter:hover, .btn-search:hover {
    background: linear-gradient(135deg, #5a6268 0%, #3d4142 100%);
    color: white;
}

.btn-verify, .btn-approve {
    background: linear-gradient(135deg, #007bff 0%, #6610f2 100%);
    color: white;
    border-color: #007bff;
}

.btn-verify:hover, .btn-approve:hover {
    background: linear-gradient(135deg, #0056b3 0%, #520dc2 100%);
    color: white;
}

.btn-cancel, .btn-close {
    background: linear-gradient(135deg, #6c757d 0%, #adb5bd 100%);
    color: white;
    border-color: #6c757d;
}

.btn-cancel:hover, .btn-close:hover {
    background: linear-gradient(135deg, #5a6268 0%, #98a2ac 100%);
    color: white;
}

.btn-save, .btn-submit {
    background: linear-gradient(135deg, #28a745 0%, #17a2b8 100%);
    color: white;
    border-color: #28a745;
}

.btn-save:hover, .btn-submit:hover {
    background: linear-gradient(135deg, #218838 0%, #138496 100%);
    color: white;
}

/* Button sizes */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    gap: 0.375rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    gap: 0.625rem;
}

/* Button groups */
.btn-group {
    display: inline-flex;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.btn-group .btn {
    border-radius: 0;
    margin: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-group .btn:first-child {
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

.btn-group .btn:last-child {
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    border-right: none;
}

/* Action button toolbar */
.action-toolbar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.action-toolbar .btn {
    margin: 0;
}

/* Table action buttons */
.table-actions {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
}

.table-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    min-width: auto;
}

/* Mobile responsive buttons */
@media (max-width: 767.98px) {
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
        gap: 0.375rem;
    }
    
    .action-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-toolbar .btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 0.25rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        border-radius: 0.375rem !important;
        margin-bottom: 0.25rem;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .btn-group .btn:last-child {
        margin-bottom: 0;
        border-bottom: none;
    }
    
    .table-actions {
        flex-direction: column;
        gap: 0.125rem;
    }
    
    .table-actions .btn {
        width: 100%;
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Icon spacing in buttons */
.btn i {
    font-size: 0.875em;
}

.btn-sm i {
    font-size: 0.8125em;
}

.btn-lg i {
    font-size: 1em;
}

/* Loading state */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
/* Bottom tab navigation for frontend mobile */
.mobile-bottom-tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #dee2e6;
    display: none;
    z-index: 1050;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-bottom-tabs.active {
    display: flex;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0.25rem;
    text-decoration: none;
    color: #6c757d;
    transition: all 0.3s ease;
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
}

.tab-item:hover,
.tab-item.active {
    color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
}

.tab-item i {
    font-size: 1.1rem;
    margin-bottom: 0.125rem;
}

.tab-item span {
    font-size: 0.65rem;
    font-weight: 500;
    line-height: 1;
}

.tab-item .badge {
    position: absolute;
    top: 0.25rem;
    right: 50%;
    transform: translateX(50%);
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 0.2em 0.4em;
    font-size: 0.6rem;
    min-width: 14px;
    text-align: center;
}

@media (max-width: 767.98px) {
    .mobile-bottom-tabs {
        display: flex;
    }
    
    /* Add bottom padding to masthead for tab space */
    .masthead {
        padding-bottom: 60px !important;
    }
}

/* Hide bottom tabs on tablet and desktop */
@media (min-width: 768px) {
    .mobile-bottom-tabs {
        display: none !important;
    }
}
/* Mobile notification button positioned at far right */
.mobile-notification-btn {
    display: none;
    background: none;
    border: none;
    color: #333;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.3s ease;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.mobile-notification-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.mobile-notification-btn .badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 0.25em 0.5em;
    font-size: 0.75rem;
    min-width: 18px;
    text-align: center;
}

/* Mobile notification modal fullscreen */
.mobile-notification-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 1060;
    display: none;
    flex-direction: column;
}

.mobile-notification-modal.active {
    display: flex;
}

.mobile-notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
}

.mobile-notification-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

@media (max-width: 991.98px) {
    .mobile-notification-btn {
        display: block;
    }
}
/* ========================== MODAL AND CLOSE BUTTON FIXES ========================== */
/* Fix for close button icon display */
.btn-close {
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat !important;
    border: 0 !important;
    border-radius: 0.375rem !important;
    opacity: 0.5 !important;
    width: 1em !important;
    height: 1em !important;
    padding: 0.25em 0.25em !important;
    color: transparent !important;
    background-size: 0.75em !important;
    box-sizing: content-box !important;
    font-size: 1rem !important;
}

.btn-close:hover {
    opacity: 0.75 !important;
}

.btn-close:focus {
    opacity: 1 !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

/* White close button for dark backgrounds */
.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%) !important;
}

/* Alternative using Bootstrap Icons if SVG fails */
.btn-close-alt {
    background: none !important;
    border: none !important;
    font-size: 1.25rem !important;
    font-weight: bold !important;
    line-height: 1 !important;
    color: #000 !important;
    opacity: 0.5 !important;
    cursor: pointer !important;
    padding: 0.25rem !important;
    width: auto !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0.25rem !important;
    transition: opacity 0.15s ease-in-out !important;
}

.btn-close-alt:hover {
    opacity: 0.75 !important;
}

.btn-close-alt-white {
    color: white !important;
}

/* Fallback for mobile close buttons */
.close-btn {
    background: none !important;
    border: none !important;
    color: white !important;
    font-size: 1.5rem !important;
    cursor: pointer !important;
    padding: 0 !important;
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: background-color 0.3s ease !important;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* ========================== TAB NAVIGATION STYLING ========================== */
/* Enhanced tab navigation for kegiatan module */
.tab-navigation-wrapper {
    position: relative;
    z-index: 10;
}

.nav-pills {
    background: #f8f9fa;
    border-radius: 0.75rem;
    padding: 0.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid #dee2e6;
}

.nav-pills .nav-link {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin: 0.125rem;
    color: #6c757d;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.nav-pills .nav-link:hover {
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.1);
    transform: translateY(-1px);
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    color: white;
    box-shadow: 0 0.25rem 0.5rem rgba(13, 110, 253, 0.3);
    transform: translateY(-1px);
}

.nav-pills .nav-link i {
    font-size: 1rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.nav-pills .nav-link.active i {
    transform: scale(1.1);
}

.nav-pills .nav-link .tab-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tab content styling */
.tab-content {
    margin-top: 1.5rem;
}

.tab-pane {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Mobile tab navigation */
@media (max-width: 767.98px) {
    .nav-pills {
        flex-direction: column;
        background: white;
        border-radius: 0.5rem;
        padding: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .nav-pills .nav-item {
        width: 100%;
        margin-bottom: 0.25rem;
    }
    
    .nav-pills .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 1rem;
        margin: 0;
        border-radius: 0.375rem;
        font-size: 0.9rem;
        gap: 0.75rem;
    }
    
    .nav-pills .nav-link i {
        font-size: 1.1rem;
        width: 20px;
        text-align: center;
    }
    
    .nav-pills .nav-link .tab-text {
        white-space: normal;
        text-overflow: unset;
        overflow: visible;
    }
}

/* Small mobile screens */
@media (max-width: 575.98px) {
    .nav-pills .nav-link {
        padding: 0.875rem;
        font-size: 0.85rem;
    }
    
    .nav-pills .nav-link .tab-text {
        font-size: 0.85rem;
    }
}

/* Tablet optimization */
@media (min-width: 768px) and (max-width: 991.98px) {
    .nav-pills .nav-link {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
        gap: 0.375rem;
    }
    
    .nav-pills .nav-link i {
        font-size: 0.9rem;
    }
    
    .nav-pills .nav-link .tab-text {
        font-size: 0.8rem;
    }
}

/* Desktop enhancement */
@media (min-width: 992px) {
    .nav-pills {
        justify-content: center;
    }
    
    .nav-pills .nav-link {
        min-width: 180px;
        text-align: center;
    }
    
    .nav-pills .nav-link:hover {
        box-shadow: 0 0.125rem 0.25rem rgba(13, 110, 253, 0.2);
    }
}

/* Card styling for tab content */
.tab-pane .card {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tab-pane .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.15);
}

.tab-pane .card-body {
    padding: 2rem;
}

@media (max-width: 767.98px) {
    .tab-pane .card-body {
        padding: 1rem;
    }
    
    .tab-pane .card {
        border-radius: 0.75rem;
    }
}

/* ========================== BACKEND BUTTON SYSTEM ========================== */
/* Backend specific button styling - applies to admin pages */
body#page-top .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    min-width: auto;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Backend button variants */
body#page-top .btn-add, body#page-top .btn-create {
    background: linear-gradient(135deg, #28a745 0%, #1ea085 100%);
    color: white;
    border-color: #28a745;
}

body#page-top .btn-add:hover, body#page-top .btn-create:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(40, 167, 69, 0.3);
}

body#page-top .btn-edit, body#page-top .btn-update {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #212529;
    border-color: #ffc107;
}

body#page-top .btn-edit:hover, body#page-top .btn-update:hover {
    background: linear-gradient(135deg, #e0a800 0%, #e8650e 100%);
    color: #212529;
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(255, 193, 7, 0.3);
}

body#page-top .btn-delete, body#page-top .btn-remove {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
    color: white;
    border-color: #dc3545;
}

body#page-top .btn-delete:hover, body#page-top .btn-remove:hover {
    background: linear-gradient(135deg, #c82333 0%, #d91a72 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(220, 53, 69, 0.3);
}

body#page-top .btn-refresh, body#page-top .btn-reload {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
    color: white;
    border-color: #17a2b8;
}

body#page-top .btn-refresh:hover, body#page-top .btn-reload:hover {
    background: linear-gradient(135deg, #138496 0%, #5a32a3 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(23, 162, 184, 0.3);
}

body#page-top .btn-filter, body#page-top .btn-search {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border-color: #6c757d;
}

body#page-top .btn-filter:hover, body#page-top .btn-search:hover {
    background: linear-gradient(135deg, #5a6268 0%, #3d4142 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(108, 117, 125, 0.3);
}

body#page-top .btn-verify, body#page-top .btn-approve {
    background: linear-gradient(135deg, #007bff 0%, #6610f2 100%);
    color: white;
    border-color: #007bff;
}

body#page-top .btn-verify:hover, body#page-top .btn-approve:hover {
    background: linear-gradient(135deg, #0056b3 0%, #520dc2 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 123, 255, 0.3);
}

body#page-top .btn-cancel, body#page-top .btn-close {
    background: linear-gradient(135deg, #6c757d 0%, #adb5bd 100%);
    color: white;
    border-color: #6c757d;
}

body#page-top .btn-cancel:hover, body#page-top .btn-close:hover {
    background: linear-gradient(135deg, #5a6268 0%, #98a2ac 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(108, 117, 125, 0.3);
}

body#page-top .btn-save, body#page-top .btn-submit {
    background: linear-gradient(135deg, #28a745 0%, #17a2b8 100%);
    color: white;
    border-color: #28a745;
}

body#page-top .btn-save:hover, body#page-top .btn-submit:hover {
    background: linear-gradient(135deg, #218838 0%, #138496 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(40, 167, 69, 0.3);
}

/* Backend button sizes */
body#page-top .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    gap: 0.375rem;
}

body#page-top .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    gap: 0.625rem;
}

/* Backend table action buttons */
body#page-top .table-actions {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    flex-wrap: wrap;
}

body#page-top .table-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    min-width: auto;
    gap: 0.25rem;
}

/* Backend action toolbar */
body#page-top .action-toolbar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

body#page-top .action-toolbar .btn {
    margin: 0;
}

/* Backend mobile responsive buttons */
@media (max-width: 767.98px) {
    body#page-top .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
        gap: 0.375rem;
    }
    
    body#page-top .action-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    body#page-top .action-toolbar .btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 0.25rem;
    }
    
    body#page-top .table-actions {
        flex-direction: column;
        gap: 0.125rem;
    }
    
    body#page-top .table-actions .btn {
        width: 100%;
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
        justify-content: center;
    }
}

/* Backend icon spacing */
body#page-top .btn i {
    font-size: 0.875em;
}

body#page-top .btn-sm i {
    font-size: 0.8125em;
}

body#page-top .btn-lg i {
    font-size: 1em;
}

/* Backend loading state */
body#page-top .btn.loading {
    position: relative;
    color: transparent;
}

body#page-top .btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Force footer to be fixed in backend admin pages */
body#page-top footer {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1030 !important;
    margin: 0 !important;
    transform: none !important;
}

/* Ensure masthead has bottom padding for fixed footer */
body#page-top .masthead {
    padding-bottom: 80px !important;
}

/* ========================== Frontend Desktop Fix ========================== */
/* Ensure desktop frontend layout remains intact */
@media (min-width: 992px) {
    /* Reset mobile menu styles for desktop */
    .menu-toggle {
        display: none !important;
    }
    
    .navbar-collapse {
        display: flex !important;
    }
    
    .mobile-sidebar {
        display: none !important;
    }
    
    .mobile-overlay {
        display: none !important;
    }
    
    /* Ensure navbar brand positioning is correct */
    .navbar-brand {
        margin-left: 0 !important;
    }
    
    /* Ensure navbar container layout is proper */
    .navbar .container {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    /* Fix frontend navbar layout specifically */
    .navbar .container .d-flex {
        display: flex !important;
        align-items: center !important;
        width: auto !important;
    }
    
    .navbar .container .d-flex .flex-grow-1 {
        flex-grow: 0 !important;
    }
}
