/* ==================== Global Styles ==================== */
:root {
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 70px;
    --topbar-height: 60px;
    --primary-color: #4e73df;
    --success-color: #1cc88a;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --dark-color: #212529;
    --light-color: #f8f9fc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html,
h1, h2, h3, h4, h5, h6,
p, span, a, button, input, textarea, select,
.btn, .form-control, .form-select, .card, .table,
.nav-link, .navbar, .sidebar, .modal {
    font-family: 'Merriweather';
}

body {
    font-family: 'Merriweather';
    background-color: #f4f6f9;
    overflow-x: hidden;
}

/* ==================== Sidebar ==================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    transition: all 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    background-color: #002B4B !important; 
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-text {
    display: none;
}

.sidebar-header {
    padding: 1.5rem 1rem;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    
}

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

.sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
    background-color: #CE9335;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

/* ==================== Main Content ==================== */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: var(--topbar-height);
    transition: margin-left 0.3s ease;
    min-height: 100vh;
}
.bg-primary {
    background-color: #CE9335 !important;
}
.btn-primary {
    background-color: #CE9335;
    border: 1px solid #CE9335;
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed-width);
}

.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    z-index: 999;
    transition: left 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.topbar.expanded {
    left: var(--sidebar-collapsed-width);
}

.content-wrapper {
    padding: 2rem;
}

/* ==================== Cards ==================== */
.stat-card {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.stat-card .card-body {
    padding: 1.5rem;
}

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

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.stat-label {
    color: #858796;
    font-size: 0.875rem;
    text-transform: uppercase;
    font-weight: 600;
}

/* ==================== Tables ==================== */
.table-responsive {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fc;
    border-bottom: 2px solid #e3e6f0;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #858796;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fc;
}

/* ==================== Badges ==================== */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 600;
}

.status-badge {
    font-size: 0.75rem;
}

/* ==================== Buttons ==================== */
.btn {
    border-radius: 0.375rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-action {
    margin: 0 0.125rem;
}

/* ==================== Progress Bars ==================== */
.progress {
    height: 1.5rem;
    border-radius: 0.5rem;
    background-color: #e9ecef;
}

.progress-bar {
    font-weight: 600;
    transition: width 0.6s ease;
}

/* ==================== Modal ==================== */
.modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    background-color: var(--primary-color);
    color: white;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* ==================== Console Terminal ==================== */
.console-terminal {
    background-color: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Courier New', monospace !important;
    font-size: 0.875rem;
    padding: 1rem;
    border-radius: 0.375rem;
    height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.console-terminal .log-info { color: #4ec9b0; }
.console-terminal .log-success { color: #6a9955; }
.console-terminal .log-warning { color: #dcdcaa; }
.console-terminal .log-error { color: #f48771; }
.console-terminal .log-debug { color: #858585; }

/* Scrollbar styling for console */
.console-terminal::-webkit-scrollbar {
    width: 8px;
}

.console-terminal::-webkit-scrollbar-track {
    background: #2d2d30;
}

.console-terminal::-webkit-scrollbar-thumb {
    background: #464647;
    border-radius: 4px;
}

.console-terminal::-webkit-scrollbar-thumb:hover {
    background: #5a5a5a;
}

/* ==================== Charts ==================== */
.chart-container {
    position: relative;
    height: 300px;
}

/* ==================== Login Page ==================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
}

.login-card {
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3);
    border: none;
    max-width: 500px;
    width: 100%;
}

.login-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
}

.login-header h2 {
    color: #333;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-body {
    padding: 1rem 2rem 2rem;
}

.google-btn {
    background-color: #fff;
    border: 1px solid #ddd;
    color: #333;
    font-weight: 600;
}

.google-btn:hover {
    background-color: #f8f9fa;
    border-color: #ccc;
}

/* ==================== Forms ==================== */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border-radius: 0.375rem;
    border: 1px solid #d1d3e2;
    padding: 0.65rem 1rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

/* ==================== Toggle Switch ==================== */
.form-switch .form-check-input {
    width: 3rem;
    height: 1.5rem;
    cursor: pointer;
}

.form-switch .form-check-input:checked {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

/* ==================== Animations ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .topbar {
        left: 0;
    }

    .stat-card {
        margin-bottom: 1rem;
    }
}

/* ==================== Utilities ==================== */
.cursor-pointer {
    cursor: pointer;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-sm-hover:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}
