﻿:root {
    --primary-color: #3498db;
    --primary-light: #e3f2fd;
    --primary-light2: #e7e9eb;
    --primary-dark: #2980b9;
    --secondary-color: #64b5f6;
    --accent-color: #0d47a1;
    --text-dark: #212529;
    --text-light: #6c757d;
    --border-color: #dee2e6;
    --topbar-height: 80px;
    --dark-gray: #585858;
    --light-gray: #f5f5f5;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Top Navigation - Fixed Height */
.navbar {
    background-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 1rem;
    height: var(--topbar-height);
}

.navbar-brand {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
}

    .navbar-brand i {
        color: var(--accent-color);
        margin-right: 8px;
    }

/* User Info - Fixed UI */
.user-dropdown {
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
    cursor: pointer;
}

.user-info:hover {
    background-color: var(--primary-dark);
    opacity: .8
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-right: 10px;
    font-size: 0.9rem;
}

.user-details {
    line-height: 1.2;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-light);
}

.user-dropdown .dropdown-toggle::after {
    margin-left: 8px;
    color: white;
}

.user-dropdown .dropdown-menu {
    margin-top: 8px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
}

.user-dropdown .dropdown-item {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

    .user-dropdown .dropdown-item:hover {
        background-color: var(--primary-light);
        color: var(--primary-color);
    }

    .user-dropdown .dropdown-item i {
        width: 20px;
        margin-right: 8px;
    }

.user-dropdown .dropdown-divider {
    margin: 0.5rem 0;
}

/* Sidebar */
.sidebar {
    background: linear-gradient(180deg, white 0%, #f8fbff 100%);
    min-height: calc(100vh - var(--topbar-height));
    width: 260px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    z-index: 100;
    overflow-y: auto;
    border-top: 5px solid var(--primary-color);
    border-top-left-radius: 0.5rem;
    border-top-right-radius: .5rem;
    margin-top: 1rem;
}

.sidebar-header {
    padding: 1.5rem 1rem 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
}

.sidebar-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar .nav-link {
    color: var(--text-dark);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin: 0.15rem 0.5rem;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    font-weight: 500;
}

    .sidebar .nav-link i {
        margin-right: 12px;
        width: 20px;
        text-align: center;
        font-size: 1.1rem;
    }

    .sidebar .nav-link:hover, .sidebar .nav-link.active {
        background-color: var(--primary-light);
        color: var(--primary-color);
        transform: translateX(3px);
    }

    .sidebar .nav-link.active {
        font-weight: 600;
        box-shadow: 0 2px 5px rgba(30, 136, 229, 0.2);
    }

    .sidebar .nav-link[data-bs-toggle="collapse"]::after {
        content: '\f107';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        margin-left: auto;
        transition: transform 0.3s;
        color: var(--text-light);
    }

    .sidebar .nav-link[data-bs-toggle="collapse"][aria-expanded="true"]::after {
        transform: rotate(-180deg);
        color: var(--primary-color);
    }

.sidebar .sub-menu {
    padding-left: 1.5rem;
}

.sidebar .sub-menu .nav-link {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    margin: 0.1rem 0;
}        

.sidebar .sub-menu .nav-link:hover::before,
.sidebar .sub-menu .nav-link.active::before {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

/* Main Content */
.main-content {
    padding: 1.5rem;
    background-color: #f8f9fa;
    min-height: calc(100vh - var(--topbar-height));
    margin-left: 260px;
    transition: margin-left 0.3s;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
}

.card-header {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

/* Tables */
.table th {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

/* Forms */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
}

    .form-control:focus, .form-select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.25rem rgba(30, 136, 229, 0.25);
    }

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);   
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    /*transform: translateY(-2px);*/
}

.btn-outline-primary {
    color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-success {
    border-color: #28AFB0 !important;
    color: #28AFB0 !important
}

.btn-outline-success:hover {
    background-color: #28afb0;
    color: white !important
}

/* Service Cards */
.service-card {
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.service-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

    .back-to-top.show {
        opacity: 1;
    }

    .back-to-top:hover {
        background-color: var(--accent-color);
        transform: translateY(-2px);
    }

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.spinner {
    width: 70px;
    height: 70px;
    border: 7px solid var(--primary-light);
    border-top: 7px solid var(--primary-dark);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Stats Cards */
.stats-card {
    border-left: 4px solid var(--primary-color);
}

    .stats-card .card-body {
        padding: 1.25rem;
    }

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stats-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Stepper */

.stepper-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    gap: 1rem;
    text-align: center;
}

.stepper-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
}

.stepper-line {
    position: absolute;
    top: 24px;
    left: 1%;
    right: 1%;
    height: 3px;
    background-color: #dee2e6;
    z-index: 0;
}

.step-counter {
    width: 40px;
    height: 40px;
    background-color: #dee2e6;
    color: #6c757d;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    z-index: 1;
    transition: all 0.3s ease-in-out;
}

.step-name {
    margin-top: 8px;
    font-weight: 500;
}

.stepper-item.active .step-counter {
    background-color: #0d6efd;
    color: #fff;
    box-shadow: 0 0 10px rgba(13, 110, 253, 0.4);
}

.stepper-item.completed .step-counter {
    background-color: var(--primary-dark);
    color: #fff;
}

.stepper-item.active .step-name {
    color: #0d6efd;
    font-weight: 600;
}

.stepper-item.completed .step-name {
    color: #198754;
}

@media (max-width: 576px) {
    .stepper-line {
        top: 20px;
    }

    .step-counter {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 99;
        display: none;
    }

        .sidebar-overlay.show {
            display: block;
        }
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    /*background: none;*/
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
}

@media (max-width: 992px) {
    .mobile-menu-btn {
        display: block;
    }
}
