/* Proxmox Accounting - Emmanuel Forgues CSS */

/* Root variables */
:root {
    --sidebar-width: 250px;
    --header-height: 56px;
}

/* Body */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 50px; /* Espace pour le footer fixe */
}

main {
    flex: 1;
}

/* Footer fixe en bas */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* Navbar customization */
.navbar-brand {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Cards */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
}

/* Tables */
.table > thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.table-hover tbody tr:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

/* Buttons */
.btn {
    font-weight: 500;
}

/* Badges */
.badge {
    font-weight: 500;
}

/* Form controls */
.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.15);
}

/* Alerts container */
#alerts-container .alert {
    min-width: 300px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Status indicators */
#connection-status {
    cursor: default;
}

#status-icon {
    font-size: 0.6rem;
    vertical-align: middle;
}

/* Code blocks */
code {
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
}

pre code {
    padding: 0;
    background-color: transparent;
    color: inherit;
}

/* Footer */
.footer {
    font-size: 0.875rem;
}

/* Modal customization */
.modal-content {
    border: none;
    border-radius: 0.75rem;
}

.modal-header {
    border-radius: 0.75rem 0.75rem 0 0;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    h1.h3 {
        font-size: 1.5rem;
    }
}

/* Dark theme enhancements */
[data-bs-theme="dark"] {
    --bs-body-bg: #1a1d21;
    --bs-body-color: #e9ecef;
}

[data-bs-theme="dark"] .card {
    background-color: #212529;
}

[data-bs-theme="dark"] .table-light {
    --bs-table-bg: #2c3034;
    --bs-table-border-color: #373b3e;
}

[data-bs-theme="dark"] code {
    background-color: rgba(255, 255, 255, 0.1);
    color: #7dd3fc;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #2c3034;
    border-color: #495057;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bs-body-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--bs-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-primary);
}

/* Utility classes */
.cursor-pointer {
    cursor: pointer;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
