/* 
    Admin Dashboard - Theme Skin over Bootstrap 5
    Brand Colors: Yellow (#fec017) & Black (#000000)
*/

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&family=Epilogue:wght@400;500;600;700&family=Lexend:wght@400;500;600;700&display=swap');

:root {
    --theme-yellow: #fec017;
    --theme-black: #000000;
    --theme-dark-bg: #1a1a1a;
    --theme-light-bg: #f8f9fa;
    --theme-card-shadow: 0 10px 30px rgba(0,0,0,0.05);
    --theme-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Bootstrap Overrides */
    --bs-primary: var(--theme-yellow);
    --bs-primary-rgb: 254, 192, 23;
}

body {
    font-family: 'Epilogue', sans-serif;
    background-color: var(--theme-light-bg);
    color: #333;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Lexend', sans-serif;
    color: var(--theme-black);
}

/* Layout */
.admin-wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* Sidebar Styling */
#sidebar {
    min-width: 240px;
    max-width: 240px;
    background: var(--theme-black);
    color: #fff;
    transition: var(--theme-transition);
    height: calc(100vh - 40px); /* Constrain height for scrolling */
    position: fixed;
    z-index: 1000;
    margin: 20px;
    border-radius: 20px;
    overflow-y: auto; /* Enable vertical scroll */
    overflow-x: hidden;
}

/* Custom Scrollbar for Sidebar */
#sidebar::-webkit-scrollbar {
    width: 6px;
}
#sidebar::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
}
#sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}
#sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--theme-yellow);
}

#sidebar.active {
    margin-left: -280px;
}

#sidebar .sidebar-header {
    padding: 25px;
    background: var(--theme-black);
    border-radius: 20px;
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul li a {
    padding: 12px 25px;
    font-size: 1.1em;
    display: block;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: var(--theme-transition);
    font-family: 'Lexend', sans-serif;
    font-size: 15px;
}

#sidebar ul li a i {
    margin-right: 15px;
    font-size: 18px;
}

#sidebar ul li a:hover {
    color: var(--theme-yellow);
    background: rgba(255,255,255,0.05);
}

#sidebar ul li.active > a {
    color: var(--theme-yellow);
    background: rgba(254, 192, 23, 0.1);
    border-left: 4px solid var(--theme-yellow);
}

/* Main Content area */
#content {
    width: calc(100% - 280px);
    padding: 0;
    min-height: 100vh;
    transition: var(--theme-transition);
    position: absolute;
    top: 0;
    right: 0;
}

#content.active {
    width: 100%;
}

/* Navbar Enhancement */
.navbar {
    padding: 5px 20px;
    background: #fec017;
    border: none;
    margin: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.navbar-btn {
    box-shadow: none;
    outline: none !important;
    border: none;
}

.bi-list{
  font-size: 30px;
  font-weight: bold;
  padding: 0;
}

#sidebarCollapse{
  padding:2px;
  border: none;
}

#sidebarCollapse:hover{
  background-color: transparent !important;
  border:none;
}

/* Card Enhancements */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: var(--theme-card-shadow);
    transition: var(--theme-transition);
    margin-bottom: 25px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 20px 25px;
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    background-color: var(--theme-yellow);
    border-color: var(--theme-yellow);
    color: var(--theme-black);
    font-weight: 800;
    font-size: 16px;
    border-radius: 10px;
    padding: 4px 12px;
    transition: var(--theme-transition);
}

.btn-primary:hover {
    background-color: var(--theme-black);
    border-color: var(--theme-black);
    color: #fff;
    transform: scale(1.05);
}

/* Tables */
.table {
    border-radius: 15px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    color: #888;
    padding: 15px 20px;
}

.table tbody td {
    padding: 15px 20px;
    vertical-align: middle;
}

/* Modals */
.modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 25px;
}

.modal-footer {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 20px 25px;
}

.form-control {
    border-radius: 10px;
    padding: 12px 15px;
    border: 1px solid #eee;
    background: #f8f9fa;
}

.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(254, 192, 23, 0.25);
    border-color: var(--theme-yellow);
}

/* Status Badges */
.badge {
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
}

/* Animations */
.animate-up {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Responsive */
@media (max-width: 991px) {
    #sidebar {
        margin-left: -280px;
    }
    #sidebar.active {
        margin-left: 0;
    }
    #content {
        width: 100%;
    }
    #content.active {
        width: 100%;
    }
    .overlay {
        display: none;
        position: fixed;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.7);
        z-index: 998;
        opacity: 0;
        transition: all 0.5s ease-in-out;
    }
    .overlay.active {
        display: block;
        opacity: 1;
    }
}

/* Utility Classes */
.smaller {
    font-size: 0.75rem;
}

/* Login Page Overrides */
.login-page {
    background: var(--theme-black);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    overflow-y: auto;
}

.login-card {
    background: #fff;
    border: 4px solid var(--theme-yellow);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    color: #fff;
}
