/**
 * Main stylesheet for CRM-MSME system
 */

/* Global styles */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Sidebar styles */
.sidebar {
    min-height: 100vh;
    background-color: #343a40;
    color: #fff;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    width: 250px;
}
.fix-font-color {
    color: #ffffff; /* Replace with your desired color code */
}

.sidebar-sticky {
    position: sticky;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: 1rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, .75);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

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

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

.sidebar .nav-link i {
    margin-right: 0.5rem;
}

.navbar-brand {
    padding: 1rem;
    background-color: rgba(0, 0, 0, .25);
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25);
    font-weight: 600;
    font-size: 1.25rem;
    width: 100%;
}

/* Main content area */
.main-content {
    margin-left: 250px;
    padding: 2rem;
}

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

.card-header {
    background-color: rgba(0, 0, 0, .03);
    border-bottom: 1px solid rgba(0, 0, 0, .125);
    padding: 1rem;
}

.card-header:first-child {
    border-radius: calc(0.5rem - 1px) calc(0.5rem - 1px) 0 0;
}

.card-body {
    padding: 1.25rem;
}

/* Table styles */
.table-responsive {
    overflow-x: auto;
}

.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
}

.table td {
    vertical-align: middle;
}

/* Form styles */
.form-control:focus, .form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Button styles */
.btn {
    font-weight: 500;
    padding: 0.375rem 1rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease-in-out;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* Login page specific styles */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #f8f9fa;
}

.login-card {
    width: 100%;
    max-width: 400px;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, .15);
    overflow: hidden;
}

.login-header {
    background-color: #343a40;
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.login-body {
    padding: 2rem;
}

/* Dashboard specific styles */
.stat-card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, .075);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

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

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

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

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Activity log styles */
.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.activity-icon.login { background-color: #d1e7dd; color: #0f5132; }
.activity-icon.logout { background-color: #f8d7da; color: #842029; }
.activity-icon.view { background-color: #cfe2ff; color: #084298; }
.activity-icon.update { background-color: #fff3cd; color: #664d03; }
.activity-icon.add { background-color: #d1e7dd; color: #0f5132; }
.activity-icon.delete { background-color: #f8d7da; color: #842029; }
.activity-icon.reset { background-color: #e2e3e5; color: #41464b; }

/* Employee styles */
.employee-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

/* Profile page styles */
.profile-header {
    background-color: #f8f9fa;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 3rem;
    margin: 0 auto 1rem;
}

/* Submissions page styles */
.status-badge {
    padding: 0.5rem 0.75rem;
    border-radius: 50rem;
    font-weight: 500;
    text-transform: capitalize;
}

.status-new { background-color: #cfe2ff; color: #084298; }
.status-in-progress { background-color: #fff3cd; color: #664d03; }
.status-completed { background-color: #d1e7dd; color: #0f5132; }
.status-rejected { background-color: #f8d7da; color: #842029; }

/* Pagination styles */
.pagination {
    margin-top: 1.5rem;
    margin-bottom: 0;
}

.page-link {
    color: #0d6efd;
    background-color: #fff;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease-in-out;
}

.page-link:hover {
    z-index: 2;
    color: #0a58ca;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .sidebar {
        position: static;
        width: 100%;
        min-height: auto;
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .navbar-brand {
        width: auto;
    }
    
    .sidebar-sticky {
        height: auto;
    }
    
    .login-card {
        margin: 1rem;
    }
}

/* Fix for dropdown forms */
.dropdown-item-form {
    display: block;
    width: 100%;
    padding: 0;
}

.dropdown-item-form .dropdown-item {
    display: block;
    width: 100%;
    padding: 0.25rem 1rem;
    clear: both;
    font-weight: 400;
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
}

.dropdown-item-form .dropdown-item:hover,
.dropdown-item-form .dropdown-item:focus {
    color: #1e2125;
    background-color: #f8f9fa;
}

/* Alert styles */
.alert {
    border: none;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.alert-dismissible .btn-close {
    padding: 1.25rem;
}