/* LMS Admin - Base Styles */

/* Reset & Base */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

#app {
    min-height: 100vh;
}

/* Admin Layout */
.admin-layout {
    min-height: 100vh;
}

/* Sidebar */
.sidebar-inner {
    width: 100%;
    height: 100%;
}

.sidebar-nav {
    overflow-y: auto;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.sidebar-nav .nav-link {
    border-radius: 6px;
    margin: 2px 8px;
    transition: all 0.2s ease;
}

.sidebar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

.sidebar-nav .nav-link.active {
    background-color: var(--bs-primary);
    color: #fff !important;
}

/* Sidebar Accordion */
.sidebar-nav .accordion-button {
    color: rgba(255, 255, 255, 0.5) !important;
    background-color: transparent !important;
    border-radius: 6px;
    margin: 2px 8px;
    padding: 0.5rem 1.5rem 0.5rem 0.75rem;
    border: 0;
    font-size: 1rem;
    text-align: left;
}

.sidebar-nav .accordion-button:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

.sidebar-nav .accordion-button:focus {
    box-shadow: none !important;
    border-color: transparent !important;
    background-color: transparent !important;
}

.sidebar-nav .accordion-button:not(.collapsed) {
    color: rgba(255, 255, 255, 0.5) !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

.sidebar-nav .accordion-button::after {
    filter: brightness(0) invert(1);
    margin-left: auto;
    width: 1rem;
    height: 1rem;
    background-size: 1rem;
}

/* Main Content */
.main-content {
    transition: margin-left 0.3s ease;
}

.content-header {
    z-index: 1030;
}

.content-body {
    min-height: calc(100vh - 65px);
}

/* Cards */
.card {
    border-radius: 12px;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
}

/* Tables */
.table th {
    font-weight: 600;
    font-size: 0.875rem;
    color: #6c757d;
    border-bottom-width: 1px;
}

.table td {
    vertical-align: middle;
    padding: 0.875rem 0.75rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.04);
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.4);
    transform: translateY(-1px);
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 8px;
    border-color: #dee2e6;
    padding: 0.5rem 0.875rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

/* Input Group */
.input-group .form-control {
    border-radius: 0 8px 8px 0;
}

.input-group .input-group-text {
    border-radius: 8px 0 0 8px;
    border-color: #dee2e6;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 6px;
}

/* Pagination */
.pagination {
    gap: 4px;
}

.page-link {
    border-radius: 6px;
    border: none;
    color: #6c757d;
    padding: 0.375rem 0.75rem;
}

.page-item.active .page-link {
    background-color: var(--bs-primary);
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.3);
}

/* Dropdown */
.dropdown-menu {
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 6px;
    padding: 0.5rem 0.875rem;
}

.dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.1);
}

/* Modal */
.modal-content {
    border-radius: 16px;
    border: none;
}

.modal-header {
    border-radius: 16px 16px 0 0;
}

/* Nav Tabs */
.nav-tabs {
    border-bottom-color: #e9ecef;
}

.nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    padding: 0.75rem 1rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    border-radius: 0;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: var(--bs-primary);
}

.nav-tabs .nav-link.active {
    color: var(--bs-primary);
    border-bottom-color: var(--bs-primary);
    background: transparent;
}

/* Progress Bar */
.progress {
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.875rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 3px;
}

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

/* Utility Classes */
.hover-bg-light:hover {
    background-color: #f8f9fa !important;
}

.status-active { color: #198754; }
.status-inactive { color: #6c757d; }
.status-pending { color: #ffc107; }
.status-error { color: #dc3545; }

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0 !important;
    }

    .content-body {
        padding: 1rem;
    }
}
