﻿html, body {
    height: 100%;
    font-family: 'Segoe UI', 'Open Sans', sans-serif;
    background-color: #f4f6f9;
}

.wrapper {
    height: 100%;
    position: relative;
}

.content-wrapper {
    margin-left: 250px;
    padding-top: 20px;    
    min-height: calc(100vh - 100px);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .content-wrapper {
        margin-left: 0;
    }
}

/* Loading Overlay */
#loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Login Page */
.login-page {
    background: #f4f6f9;
}

.login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    width: 400px;
}

.login-logo {
    text-align: center;
    margin-bottom: 20px;
}

    .login-logo img {
        max-height: 80px;
    }

/* Cards */
.card-header .card-title {
    font-weight: 600;
}

.card-tools .btn {
    margin-left: 5px;
}

/* Tables */
.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

.table-hover tbody tr:hover {
    background-color: #f5f5f5;
}

.table-bordered {
    border: 1px solid #dee2e6;
}

/* Forms */
.form-group label {
    font-weight: 500;
    margin-bottom: 5px;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 80%;
    color: #dc3545;
}

/* Badges */
.badge {
    padding: 5px 10px;
    font-weight: 500;
    border-radius: 4px;
}

.badge-success {
    background-color: #28a745;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-danger {
    background-color: #dc3545;
}

.badge-info {
    background-color: #17a2b8;
}

.badge-secondary {
    background-color: #6c757d;
}

.badge-primary {
    background-color: #007bff;
}

/* Small Box Stats */
.small-box {
    border-radius: 0.25rem;
    box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
    display: block;
    margin-bottom: 20px;
    position: relative;
}

    .small-box .inner {
        padding: 10px;
    }

        .small-box .inner h3 {
            font-size: 2.2rem;
            font-weight: bold;
            margin: 0 0 10px 0;
        }

        .small-box .inner p {
            font-size: 1rem;
        }

    .small-box .icon {
        position: absolute;
        right: 10px;
        top: 10px;
        font-size: 70px;
        color: rgba(0,0,0,0.15);
    }

    .small-box .small-box-footer {
        background-color: rgba(0,0,0,0.1);
        color: rgba(255,255,255,0.8);
        display: block;
        padding: 3px 0;
        text-align: center;
        text-decoration: none;
    }

/* Info Box */
.info-box {
    display: flex;
    width: 100%;
    background: #fff;
    border-radius: 0.25rem;
    box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
    margin-bottom: 1rem;
}

.info-box-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    text-align: center;
    font-size: 30px;
    border-radius: 0.25rem 0 0 0.25rem;
}

.info-box-content {
    padding: 10px;
    flex: 1;
}

.info-box-number {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Print Styles */
@media print {
    .main-sidebar, .main-header, .card-tools, .btn, .no-print {
        display: none !important;
    }

    .content-wrapper {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .card {
        border: none !important;
        box-shadow: none !important;
    }
}

/* Progress Bar */
.progress {
    height: 20px;
    margin-bottom: 10px;
    border-radius: 4px;
    background-color: #e9ecef;
}

.progress-bar {
    background-color: #007bff;
    line-height: 20px;
    color: white;
    text-align: center;
}

/* Tabs */
.nav-tabs .nav-link {
    border: none;
    padding: 10px 20px;
    color: #495057;
}

    .nav-tabs .nav-link.active {
        border-bottom: 2px solid #007bff;
        color: #007bff;
    }

/* Modal */
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Dropdown */
.dropdown-menu {
    border-radius: 4px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}
