/**
 * Admin CSS
 * Hiraya Digital Analytics Dashboard
 */

body {
    font-size: 0.95rem;
    background-color: #f8f9fa;
}

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100; /* Behind the navbar */
    padding: 48px 0 0; /* Height of navbar */
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.1);
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: 0.5rem;
    overflow-x: hidden;
    overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
}

.sidebar .nav-link {
    font-weight: 500;
    color: #adb5bd;
    padding: 0.5rem 1rem;
    margin: 0.2rem 0;
    border-radius: 0.25rem;
}

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

.sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
}

.sidebar .nav-link .bi {
    margin-right: 0.5rem;
    color: #adb5bd;
}

.sidebar .nav-link:hover .bi,
.sidebar .nav-link.active .bi {
    color: #fff;
}

.navbar-brand {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    font-size: 1rem;
    background-color: rgba(0, 0, 0, 0.25);
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.25);
}

.navbar .navbar-toggler {
    top: 0.25rem;
    right: 1rem;
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
    border: none;
    border-radius: 0.5rem;
}

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

.card-title {
    margin-bottom: 0;
    color: #333;
    font-weight: 600;
}

.list-group-item {
    border-left: none;
    border-right: none;
}

.list-group-item:first-child {
    border-top: none;
}

.list-group-item:last-child {
    border-bottom: none;
}

/* Forms */
.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.form-control-color {
    width: 5rem;
}

/* Tables */
.table th {
    font-weight: 600;
    color: #495057;
}

.table td {
    vertical-align: middle;
}

/* Custom Card Styles */
.bg-primary, .btn-primary {
    background-color: #0d6efd !important;
}

.bg-secondary, .btn-secondary {
    background-color: #6c757d !important;
}

.bg-success, .btn-success {
    background-color: #198754 !important;
}

.bg-danger, .btn-danger {
    background-color: #dc3545 !important;
}

.bg-warning, .btn-warning {
    background-color: #ffc107 !important;
}

.bg-info, .btn-info {
    background-color: #0dcaf0 !important;
}

/* Footer */
footer {
    color: #6c757d;
}

/* Media Queries */
@media (max-width: 767.98px) {
    .sidebar {
        position: static;
        height: auto;
        padding-top: 0;
    }
    
    main {
        margin-top: 1rem;
    }
}
