:root {
    --primary-color: #475569;
    /* Slate 600 - Pastel Antrasit */
    --secondary-color: #334155;
    /* Slate 700 - Koyu Antrasit */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --light-color: #f1f5f9;
    /* Slate 100 */
    --dark-color: #0f172a;
    /* Slate 900 */
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #94a3b8 0%, #475569 100%);
    /* Slate 400 to Slate 600 */
    min-height: 100vh;
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.login-header h2 {
    color: var(--dark-color);
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: 500;
}

.form-group label i {
    margin-right: 8px;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 16px;
}

.login-footer {
    margin-top: 25px;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}

.language-switch {
    display: flex;
    gap: 8px;
    align-items: center;
}

.language-switch a {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.language-switch a.active {
    background: var(--primary-color);
    color: white;
}

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 600;
    font-size: 20px;
}

.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.sidebar .nav-link {
    color: var(--dark-color);
    padding: 12px 20px;
    border-left: 3px solid transparent;
    transition: var(--transition);
}

.sidebar .nav-link:hover {
    background: var(--light-color);
    border-left-color: var(--primary-color);
}

.sidebar .nav-link.active {
    background: var(--light-color);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

.sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
}

.sidebar-heading {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    color: #94a3b8;
    padding: 20px 20px 10px;
    border-top: 1px solid #e2e8f0;
    margin-top: 10px;
}

.sidebar-heading:first-of-type {
    border-top: none;
    margin-top: 0;
}

/* Accordion Styling */
.sidebar .nav-item .nav-link[data-bs-toggle="collapse"] {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar .nav-item .nav-link[data-bs-toggle="collapse"]::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    transition: transform 0.3s ease;
}

.sidebar .nav-item .nav-link[data-bs-toggle="collapse"]:not(.collapsed)::after {
    transform: rotate(180deg);
}

.sidebar .submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(241, 245, 249, 0.5);
}

.sidebar .submenu .nav-link {
    padding-left: 50px;
    font-size: 13px;
    border-left: none;
}

.sidebar .submenu .nav-link:hover,
.sidebar .submenu .nav-link.active {
    background: #f8fafc;
    color: var(--primary-color);
}

.sidebar .nav-settings {
    margin-top: auto;
    border-top: 1px solid #e2e8f0;
    padding-top: 10px;
}

main {
    padding-top: 20px;
    background: var(--light-color);
    min-height: calc(100vh - 56px);
}

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h1 {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 5px;
}

.stats-row {
    margin-bottom: 30px;
}

.stats-row>[class*="col-"] {
    display: flex;
}

.unified-stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    /* Softer shadow */
    border: 1px solid #e2e8f0;
    /* Subtle border */
    transition: var(--transition);
    cursor: pointer;
    height: 100%;
    width: 100%;
}

.unified-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.unified-stat-card i {
    font-size: 3rem;
    /* Good size for desktop */
    color: #475569;
    /* Soft Antrasit (Slate 600) */
    margin-bottom: 12px;
}

.unified-stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0 0 5px 0;
    line-height: 1;
}

.unified-stat-card p {
    font-size: 0.9rem;
    color: #64748b;
    /* Lighter Slate 500 */
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-header {
    background: white;
    border-bottom: 2px solid var(--light-color);
    padding: 20px;
    font-weight: 600;
}

.card-header h5 {
    margin: 0;
    color: var(--dark-color);
}

.card-header i {
    margin-right: 10px;
    color: var(--primary-color);
}

.table {
    margin: 0;
}

.table thead th {
    border-bottom: 2px solid var(--light-color);
    color: var(--dark-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: var(--light-color);
}

.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 11px;
}

.category-stat-item {
    padding: 10px 0;
}

.modal-content {
    border: none;
    border-radius: var(--border-radius);
}

.modal-header {
    border-bottom: 2px solid var(--light-color);
    background: var(--light-color);
}

.modal-footer {
    border-top: 2px solid var(--light-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

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

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

@media (max-width: 768px) {
    .sidebar {
        position: static;
        height: auto;
    }

    main {
        margin-left: 0 !important;
    }

    .stat-card {
        margin-bottom: 15px;
    }

    .login-card {
        padding: 30px 20px;
    }
}

.form-select {
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: var(--transition);
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-box input {
    padding-left: 40px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.filter-section {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.btn-close {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
}