/* Admin Panel Styles for Kumbh Mela */

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Sidebar Styles */
#sidebar {
    min-height: 100vh;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    z-index: 100;
}

#sidebar .nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, .75);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

#sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, .1);
}

#sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, .2);
}

#sidebar .nav-link i {
    margin-right: 10px;
}

/* Card Styles */
.card {
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e3e6f0;
    padding: 0.75rem 1.25rem;
}

.border-left-primary {
    border-left: 0.25rem solid #4e73df !important;
}

.border-left-success {
    border-left: 0.25rem solid #1cc88a !important;
}

.border-left-info {
    border-left: 0.25rem solid #36b9cc !important;
}

.border-left-warning {
    border-left: 0.25rem solid #f6c23e !important;
}

.border-left-danger {
    border-left: 0.25rem solid #e74a3b !important;
}

/* Table Styles */
.table th {
    background-color: #f8f9fa;
    border-top: none;
}

.table-bordered td, .table-bordered th {
    border: 1px solid #e3e6f0;
}

:root {
  --title-color: #0e3a59;
}

/* Form Styles */
.form-control:focus {
    border-color: #bac8f3;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: #4e73df;
}

/* Global Title Color */
h1, h2, h3, h4, h5, h6, .card-title, .card-header h6 {
    color: var(--title-color);
}

/* Login Page Styles */
.bg-login-image {
    background: url("../img/login-bg.jpg");
    background-position: center;
    background-size: cover;
}

/* Dashboard Stats */
.text-xs {
    font-size: .7rem;
}

.text-gray-300 {
    color: #dddfeb !important;
}

.text-gray-800 {
    color: #5a5c69 !important;
}

/* Button Styles */
.btn-primary {
    background-color: #4e73df;
    border-color: #4e73df;
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
}

.btn-success {
    background-color: #1cc88a;
    border-color: #1cc88a;
}

.btn-success:hover {
    background-color: #17a673;
    border-color: #169b6b;
}

.btn-info {
    background-color: #36b9cc;
    border-color: #36b9cc;
}

.btn-info:hover {
    background-color: #2c9faf;
    border-color: #2a96a5;
}

.btn-warning {
    background-color: #f6c23e;
    border-color: #f6c23e;
}

.btn-warning:hover {
    background-color: #f4b619;
    border-color: #f4b30d;
}

.btn-danger {
    background-color: #e74a3b;
    border-color: #e74a3b;
}

.btn-danger:hover {
    background-color: #e02d1b;
    border-color: #d52a1a;
}

/* File Upload Styles */
.custom-file-input:focus ~ .custom-file-label {
    border-color: #bac8f3;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.custom-file-label::after {
    background-color: #4e73df;
    color: #fff;
}

/* Rich Text Editor */
.ck-editor__editable {
    min-height: 300px;
}

/* Image Preview */
.img-preview {
    max-width: 200px;
    max-height: 200px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #ddd;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #sidebar {
        min-height: auto;
    }
    
    .sidebar .nav-item .nav-link span {
        font-size: 0.85rem;
    }
    
    .sidebar .nav-item .nav-link i {
        font-size: 0.85rem;
    }
    
    .card-header h6 {
        font-size: 1rem;
    }
}

/* Badge Styles */
.badge-success {
    background-color: #1cc88a;
}

.badge-warning {
    background-color: #f6c23e;
    color: #fff;
}

.badge-danger {
    background-color: #e74a3b;
}

/* Pagination Styles */
.page-item.active .page-link {
    background-color: #4e73df;
    border-color: #4e73df;
}

.page-link {
    color: #4e73df;
}

.page-link:hover {
    color: #224abe;
}

/* Dropdown Styles */
.dropdown-menu {
    font-size: 0.85rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.dropdown-item:active {
    background-color: #4e73df;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 0.35rem;
}

/* Mobile Admin Sidebar (Offcanvas) */
@media (max-width: 991.98px) {
  #sidebar {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1050;
    overflow-y: auto;
  }
  #sidebar.is-open {
    transform: translateX(0);
  }
  .sidebar-backdrop {
    display: none;
  }
  .sidebar-backdrop.show {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.35);
    z-index: 1040;
  }
  /* Ensure content uses full width while sidebar is closed */
  .container-fluid .row > main {
    margin-left: 0 !important;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}