/* ==========================================
   eLibro Master CSS
   Dashboard | Utilization | View Resource
   Sidebar | Navbar | Analytics
========================================== */

/* =========================
   GLOBAL
========================= */

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Google Sans', 'Roboto', sans-serif !important;
    overflow-x: hidden !important;
}

body {
    background: url('../images/bg.jpg') no-repeat center center fixed;
    background-size: cover;
    overflow-y: auto;
}

/* =========================
   MAIN LAYOUT
========================= */

.main-dashboard-container {
    margin-top: 58px;
    padding: 18px 25px;
    width: 100%;
}

.dashboard-content-scroll {
    width: 100%;
}

.content-table-card {
    background: rgba(255, 255, 255, .94);
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .08);
}

/* =========================
   BANNERS / CARDS
========================= */

.welcome-banner-card {
    background: rgba(255, 255, 255, .94);
    border-radius: 12px;
    padding: 18px 25px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.resource-card,
.subject-card {
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .05);
}

/* =========================
   RESOURCE CARDS
========================= */

.resource-card {
    background: rgba(255, 255, 255, .94);
    border: none;
    position: relative;
    overflow: hidden;
    padding: 16px 20px !important;
    transition: .2s ease;
}

.resource-card:hover {
    transform: translateY(-2px);
}

.resource-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
}

/* Accent Colors */

.accent-blue::before {
    background: #0d6efd;
}

.accent-green::before {
    background: #198754;
}

.accent-purple::before {
    background: #6f42c1;
}

.accent-orange::before {
    background: #fd7e14;
}

.accent-red::before {
    background: #dc3545;
}

.accent-teal::before {
    background: #20c997;
}

.accent-cyan::before {
    background: #0dcaf0;
}

.accent-blue .card-icon {
    color: #0d6efd !important;
}

.accent-green .card-icon {
    color: #198754 !important;
}

.accent-purple .card-icon {
    color: #6f42c1 !important;
}

.accent-orange .card-icon {
    color: #fd7e14 !important;
}

.accent-red .card-icon {
    color: #dc3545 !important;
}

.accent-teal .card-icon {
    color: #20c997 !important;
}

.accent-cyan .card-icon {
    color: #0dcaf0 !important;
}

.resource-title {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #6c757d;
}

.resource-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 4px;
}

.resource-count {
    font-size: 1.3rem;
    font-weight: 700;
}

.card-actions-top {
    position: absolute;
    right: 10px;
    top: 10px;
    display: flex;
    gap: 6px;
    align-items: center;
    z-index: 5;
}

/* =========================
   SUMMARY CARDS
========================= */

.subject-card {
    background: rgba(255, 255, 255, .94);
    border-radius: 12px;
    color: #fff;
    padding: 16px 20px;
    position: relative;
    overflow: hidden;
    min-width: 210px;
    flex: 1 1 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .05);
}

.card-title-text {
    font-size: .70rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.card-count-val {
    font-size: 1.3rem;
    font-weight: 700;
}

.card-icon-bg {
    position: absolute;
    right: 12px;
    bottom: 8px;
    font-size: 1.8rem;
    opacity: .3;
}

/* =========================
   CAROUSEL
========================= */

.cards-carousel-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.cards-scroll-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 5px 2px;
    scrollbar-width: none;
}

.cards-scroll-container::-webkit-scrollbar {
    display: none;
}

.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, .6);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: .25s;
}

.cards-carousel-wrapper:hover .carousel-nav-btn {
    opacity: 1;
}

.carousel-prev {
    left: -14px;
}

.carousel-next {
    right: -14px;
}

/* =========================
   CHARTS
========================= */

.chart-container-main {
    position: relative;
    height: 340px;
}

.chart-container {
    position: relative;
    height: 220px;
}

/* =========================
   TABLE
========================= */

.table-responsive {
    overflow: auto;
}

.table-responsive th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 5;
}

.table-cover-img {
    width: 55px;
    height: 75px;
    object-fit: cover;
    border-radius: 6px;
}

/* =========================
   SIDEBAR
========================= */

.sidebar-card {
    min-height: calc(100vh - 6rem);
}

.sidebar-profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
}

.sidebar-menu-btn {
    font-size: .85rem;
    border: 0;
}

/* =========================
   FORMS
========================= */

.form-control,
.form-select {
    border-radius: 8px;
}

/* =========================
   MODALS
========================= */

.modal-content {
    border-radius: 14px;
    border: none;
}

/* =========================
   BOOTSTRAP CARD FIXES
========================= */

.card.border-0.bg-light.shadow-sm {
    border-radius: 12px !important;
}

/* =========================
   TABLET
========================= */

@media (max-width: 1199px) {

    .main-dashboard-container {
        padding: 15px;
    }

    .chart-container-main {
        height: 320px;
    }

    .chart-container {
        height: 210px;
    }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 991.98px) {

    .main-dashboard-container {
        padding: 12px;
    }

    .subject-card {
        min-width: 150px;
    }

    .chart-container-main {
        height: 280px;
    }

    .chart-container {
        height: 200px;
    }

    .carousel-prev,
    .carousel-next {
        display: none;
    }

    .sidebar-card {
        height: auto !important;
        min-height: auto !important;
    }

    .sidebar-card .card-body {
        height: auto !important;
        min-height: auto !important;
    }
}

/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 576px) {

    .main-dashboard-container {
        padding: 10px;
    }

    .content-table-card {
        padding: 12px;
    }

    .subject-card {
        min-width: 140px;
    }

    .chart-container-main {
        height: 240px;
    }

    .chart-container {
        height: 180px;
    }
}