/* =====================================================
   ADMIN CUSTOM STYLES - TOMAHAWKBATS
   Consistent styling for all admin modules
   ===================================================== */

/* ===== GENERAL FIXES ===== */
/* #sidebar {
    overflow: unset;
} */

.navbar {
    z-index: 1000 !important;
}

#toast-container {
    z-index: 1080 !important;
}

#toast-container.toast-top-right {
    top: 78px !important;
    right: 16px !important;
}

#toast-container>div {
    width: 320px;
    max-width: calc(100vw - 32px);
    opacity: 1 !important;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    word-break: break-word;
}

@media (max-width: 1200px) {
    #toast-container.toast-top-right {
        top: auto !important;
        bottom: 16px !important;
        right: 12px !important;
    }

    #toast-container>div {
        width: 300px;
        max-width: calc(100vw - 24px);
    }
}

/* ===== CARD STYLES ===== */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out;
}

.card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-header {
    border-bottom: none;
    padding: 18px 24px;
}

.card-header-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 16px 16px 0 0 !important;
}

.card-header h6,
.card-header .dt-heading {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.card-body {
    padding: 24px;
    background: #ffffff;
}

/* ===== FORM STYLES ===== */
.form-control {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #f8fafc;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    background-color: #ffffff;
    outline: none;
}

.form-control:hover:not(:focus) {
    border-color: #cbd5e1;
}

.form-control::placeholder {
    color: #94a3b8;
}

/* Form Labels */
.form-label,
label:not(.btn) {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
    display: inline-block;
}

/* Form Groups */
.form-group,
.mb-3,
.mb-4 {
    margin-bottom: 20px;
}

/* Select Dropdowns */
select.form-control,
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

/* Textarea */
textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* File Inputs */
input[type="file"].form-control {
    padding: 10px 16px;
}

/* Validation States */
.form-control.is-invalid {
    border-color: #ef4444;
    background-image: none;
}

.form-control.is-invalid:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.invalid-feedback {
    color: #ef4444;
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
}

.form-control.is-valid {
    border-color: #10b981;
}

.form-control.is-valid:focus {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

/* ===== BUTTON STYLES ===== */
.btn {
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #64748b;
    color: #ffffff;
}

.btn-secondary:hover {
    background: #475569;
    box-shadow: 0 6px 20px rgba(100, 116, 139, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
}

.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
}

.btn-light {
    background: #f1f5f9;
    color: #374151;
    border: 1px solid #e2e8f0;
}

.btn-light:hover {
    background: #e2e8f0;
}

/* Small Buttons */
.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 8px;
}

/* Listing page action buttons */
.admin-list-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-add-module {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    border: 1px solid #166534;
    color: #ffffff;
    font-weight: 700;
}

.btn-add-module:hover,
.btn-add-module:focus {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
    border-color: #14532d;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.35);
}

.btn-import-module {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: 1px solid #b45309;
    color: #111827;
    font-weight: 700;
}

.btn-import-module:hover,
.btn-import-module:focus {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    border-color: #92400e;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.35);
}

/* ===== TABLE STYLES ===== */
.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin-bottom: 0;
}

.table thead th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #374151;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 20px;
    border: none;
    border-bottom: 2px solid #e2e8f0;
}

.table thead th:first-child {
    border-radius: 12px 0 0 0;
}

.table thead th:last-child {
    border-radius: 0 12px 0 0;
}

.table tbody td {
    padding: 16px 20px;
    vertical-align: middle;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    color: #4b5563;
    font-size: 14px;
    transition: background 0.2s ease;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.table tbody tr:hover td {
    color: #1f2937;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:last-child td:first-child {
    border-radius: 0 0 0 12px;
}

.table tbody tr:last-child td:last-child {
    border-radius: 0 0 12px 0;
}

/* DataTables Specific */
.dataTables_wrapper {
    padding: 0;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 20px;
}

.dataTables_wrapper .dataTables_length select {
    padding: 8px 32px 8px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    margin: 0 8px;
}

.dataTables_wrapper .dataTables_filter input {
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    transition: all 0.3s ease;
    min-width: 250px;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    outline: none;
}

.dataTables_wrapper .dataTables_info {
    color: #6b7280;
    font-size: 14px;
    padding-top: 16px;
}

.dataTables_wrapper .dataTables_paginate {
    padding-top: 16px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 8px 14px;
    margin: 0 3px;
    border-radius: 8px;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    color: #374151 !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== ACTION BUTTONS IN TABLES ===== */
.js-reject-cancel,
.js-approve-cancel, .dt-show, .dt-trash {
    padding: 8px 12px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.js-reject-cancel:hover,
.js-approve-cancel:hover,
.dt-show:hover,
.dt-trash:hover {
    transform: scale(1.1);
}

.border-edit {
    border-color: #667eea !important;
    background: rgba(102, 126, 234, 0.1);
}

.border-edit:hover {
    background: rgba(102, 126, 234, 0.2);
}

.pencil-edit-color {
    color: #667eea !important;
}

.border-danger {
    background: rgba(239, 68, 68, 0.1);
}

.border-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ===== TOGGLE SWITCH ===== */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    border-radius: 50%;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

input:focus+.slider {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

/* ===== MODAL STYLES ===== */
.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    padding: 20px 24px;
}

.modal-title {
    font-weight: 600;
    color: #1f2937;
}

.modal-body {
    padding: 24px;
    color: #4b5563;
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
    padding: 16px 24px;
    background: #f8fafc;
}

.btn-close {
    opacity: 0.5;
    transition: all 0.3s ease;
}

.btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

/* ===== ALERT STYLES ===== */
.alert {
    border: none;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    color: #059669;
    border-left: 4px solid #10b981;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    color: #dc2626;
    border-left: 4px solid #ef4444;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
    color: #d97706;
    border-left: 4px solid #f59e0b;
}

.alert-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    color: #2563eb;
    border-left: 4px solid #3b82f6;
}

/* ===== TAB STYLES ===== */
.nav-tabs {
    border-bottom: 2px solid #e2e8f0;
    gap: 4px;
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 10px 10px 0 0;
    padding: 12px 20px;
    color: #64748b;
    font-weight: 500;
    transition: all 0.3s ease;
    background: transparent;
}

.nav-tabs .nav-link:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.nav-tabs .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff !important;
    border: none;
}

/* ===== BADGE STYLES ===== */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.3px;
}

.badge.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

/* ===== IMAGE THUMBNAILS ===== */
.img-thumbnail {
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    padding: 4px;
    transition: all 0.3s ease;
}

.img-thumbnail:hover {
    border-color: #667eea;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

/* ===== CUSTOM FILE INPUT ===== */
.custom-file .btn {
    cursor: pointer;
}

.custom-file label.btn {
    margin-bottom: 0;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Apply animations to elements */
.card {
    animation: fadeInUp 0.5s ease-out;
}

.table tbody tr {
    animation: fadeIn 0.3s ease-out;
    animation-fill-mode: both;
}

.table tbody tr:nth-child(1) {
    animation-delay: 0.05s;
}

.table tbody tr:nth-child(2) {
    animation-delay: 0.1s;
}

.table tbody tr:nth-child(3) {
    animation-delay: 0.15s;
}

.table tbody tr:nth-child(4) {
    animation-delay: 0.2s;
}

.table tbody tr:nth-child(5) {
    animation-delay: 0.25s;
}

.table tbody tr:nth-child(6) {
    animation-delay: 0.3s;
}

.table tbody tr:nth-child(7) {
    animation-delay: 0.35s;
}

.table tbody tr:nth-child(8) {
    animation-delay: 0.4s;
}

.table tbody tr:nth-child(9) {
    animation-delay: 0.45s;
}

.table tbody tr:nth-child(10) {
    animation-delay: 0.5s;
}

.modal.show .modal-dialog {
    animation: fadeInUp 0.3s ease-out;
}

/* ===== DROPDOWN STYLES ===== */
.dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 8px;
    animation: fadeInUp 0.2s ease-out;
}

.dropdown-item {
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea;
}

.dropdown-divider {
    margin: 8px 0;
    border-color: #e2e8f0;
}

/* ===== NAVBAR STYLES ===== */
.navbar {
    background: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* ===== SCROLLBAR STYLES (Content Area) ===== */
#content::-webkit-scrollbar {
    width: 8px;
}

#content::-webkit-scrollbar-track {
    background: #f1f5f9;
}

#content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

#content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ===== TOASTR CUSTOM STYLES ===== */
.toast,
#toast-container>.toast,
#toast-container>div {
    background-repeat: no-repeat !important;
    background-position: 16px 16px !important;
}

#toast-container>.toast-success,
#toast-container>div.toast-success {
    background-image: none !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
}

#toast-container>.toast-error,
#toast-container>div.toast-error {
    background-image: none !important;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
}

#toast-container>.toast-warning,
#toast-container>div.toast-warning {
    background-image: none !important;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #ffffff !important;
}

#toast-container>.toast-info,
#toast-container>div.toast-info {
    background-image: none !important;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #ffffff !important;
}

#toast-container .toast-title,
#toast-container .toast-message {
    color: #ffffff !important;
}

.toast-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.toast-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

.toast-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.toast-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

/* ===== CKEDITOR STYLES ===== */
.ck-editor__editable {
    min-height: 150px;
    border-radius: 0 0 10px 10px !important;
}

.ck.ck-editor__main>.ck-editor__editable:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15) !important;
}
.login-header .logo img {
    max-width: 160px;
    height: auto;
}

button.btn.toggle-password {
  position: absolute;
  top: 70%;
  transform: translateY(-50%);
  right: 5px;
  z-index: 111 !important;
}

button.btn.toggle-password:focus-within,
button.btn.toggle-password:focus-visible,
button.btn.toggle-password:active,
button.btn.toggle-password:focus {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}


/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    #toast-container.toast-top-right {
        top: auto !important;
        bottom: 12px !important;
        right: 10px !important;
    }

    #toast-container>div {
        width: auto;
        max-width: calc(100vw - 20px);
    }

    .card-body {
        padding: 16px;
    }

    .table thead th,
    .table tbody td {
        padding: 12px;
        font-size: 13px;
    }

    .btn {
        padding: 8px 16px;
    }

    .form-control {
        padding: 10px 14px;
    }
}