/* assets/css/style.css - Custom CSS for K-Structure CMS */

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 56px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: .5rem 1rem;
}

.sidebar .nav-link.active {
    color: #0d6efd;
}

.sidebar .nav-link:hover {
    background-color: #f8f9fa;
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 56px);
    padding-top: .5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Main content */
main {
    padding-top: 56px;
}

@media (min-width: 768px) {
    main {
        padding-top: 0;
    }
}

/* Card styling */
.card {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
    border: 0;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

/* Dashboard stat cards */
.stat-card {
    border-left: 4px solid;
    border-radius: 4px;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card-users {
    border-left-color: #4e73df;
}

.stat-card-courses {
    border-left-color: #1cc88a;
}

.stat-card-enrollments {
    border-left-color: #36b9cc;
}

.stat-card-revenue {
    border-left-color: #f6c23e;
}

.stat-card .icon {
    font-size: 2rem;
    opacity: 0.3;
}

/* Data tables */
.table-actions {
    white-space: nowrap;
}

/* Forms */
.form-required:after {
    content: " *";
    color: #dc3545;
}

/* File upload */
.custom-file-upload {
    border: 1px solid #ccc;
    display: inline-block;
    padding: 6px 12px;
    cursor: pointer;
}

.file-preview {
    max-width: 100%;
    max-height: 200px;
    margin-top: 10px;
}

/* Login page */
.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
}

/* Pagination */
.pagination {
    margin-bottom: 0;
}

/* Profile page */
.profile-header {
    background-color: #f8f9fa;
    border-radius: 0.25rem;
    padding: 2rem 0;
}

.profile-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Custom buttons */
.btn-icon {
    padding: 0.25rem 0.5rem;
}

/* Status badges */
.badge.badge-active {
    background-color: #1cc88a;
    color: white;
}

.badge.badge-inactive {
    background-color: #e74a3b;
    color: white;
}

/* Loading spinner */
.loading {
    position: fixed;
    z-index: 9999;
    height: 2em;
    width: 2em;
    overflow: show;
    margin: auto;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

.loading:before {
    content: '';
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.5);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}