:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #f8f9fa;
    --text-dark: #343a40;
    --text-light: #6c757d;
    --success: #38b000;
    --warning: #ffaa00;
    --danger: #d90429;
    --light-gray: #e9ecef;
    --white: #ffffff;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f7fa;
    height: 100vh;
}

/* Login Page Styles */
.login-container {
    height: 100vh;
    background: #ffffff;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: #f8f9fa;
    backdrop-filter: blur(5px);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    transition: all 0.3s ease;
}

.login-card:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo img {
    height: 70px;
    margin-bottom: 1rem;
}

.login-form .form-control {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.login-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.15rem rgba(67, 97, 238, 0.25);
    background-color: var(--white);
}

.login-form .form-label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.login-btn {
    background-color: var(--primary);
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.login-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.first-time-btn {
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 8px;
    padding: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.first-time-btn:hover {
    background-color: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

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

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Alert Styles */
.alert {
    border-left: 4px solid transparent;
    font-weight: 500;
}

.alert-container {
    margin-bottom: 1.5rem;
    min-height: 10px; /* Ensures the container takes up space even when empty */
}

.alert-success {
    border-left-color: var(--success);
    background-color: rgba(56, 176, 0, 0.08);
    display: flex;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-radius: 0.375rem;
}

.alert-success i {
    color: var(--success);
    font-size: 1.25rem;
    margin-right: 0.75rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.alert-success div {
    color: #2a7d00;
    font-weight: 500;
}

.alert-danger {
    border-left-color: var(--danger);
    background-color: rgba(217, 4, 41, 0.08);
}

.alert-info {
    border-left-color: var(--primary);
    background-color: rgba(67, 97, 238, 0.08);
}

.alert-warning {
    border-left-color: var(--warning);
    background-color: rgba(255, 170, 0, 0.08);
}

/* Dashboard Styles */
.dashboard-container {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 250px;
    background-color: var(--white);
    border-right: 1px solid var(--light-gray);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}

.sidebar-collapsed {
    width: 70px;
}

.sidebar-header {
    padding: 1.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--light-gray);
}

.sidebar-logo {
    height: 40px;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
}

.nav-link {
    padding: 1rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary);
}

.nav-link i {
    font-size: 1.25rem;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    transition: all 0.3s ease;
}

.main-content-expanded {
    margin-left: 70px;
}

.top-navbar {
    background-color: var(--white);
    height: 70px;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--light-gray);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    font-weight: 600;
    color: var(--text-dark);
}

.dashboard-content {
    padding: 2rem;
}

.page-title {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.stats-card {
    background-color: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.stats-card .stats-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.stats-card .stats-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.stats-card .stats-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.table-container {
    background-color: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-top: 2rem;
}

.invoice-table {
    width: 100%;
}

.invoice-table th {
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--light-gray);
    padding: 1rem;
}

.invoice-table td {
    padding: 1rem;
    vertical-align: middle;
    color: var(--text-dark);
    border-bottom: 1px solid var(--light-gray);
}

.invoice-table tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

.badge {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.8rem;
}

.badge-success {
    background-color: rgba(56, 176, 0, 0.1);
    color: var(--success);
}

.badge-warning {
    background-color: rgba(255, 170, 0, 0.1);
    color: var(--warning);
}

.badge-danger {
    background-color: rgba(217, 4, 41, 0.1);
    color: var(--danger);
}

.search-filter {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-input {
    flex: 1;
    position: relative;
}

.search-input input {
    padding-left: 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--light-gray);
    height: 45px;
}

.search-input i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.filter-select {
    width: 150px;
    border-radius: 8px;
    border: 1px solid var(--light-gray);
    height: 45px;
    padding: 0 1rem;
    color: var(--text-dark);
}

.footer {
    background-color: var(--white);
    padding: 1.5rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    border-top: 1px solid var(--light-gray);
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .login-card {
        padding: 2rem;
    }
    
    .top-navbar {
        padding: 0 1rem;
    }
    
    .dashboard-content {
        padding: 1.5rem;
    }
    
    .table-container {
        padding: 1rem;
        overflow-x: auto;
    }
    
    .search-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-select {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .login-card {
        padding: 1.5rem;
        max-width: 90%;
    }
    
    .user-name {
        display: none;
    }
}