/*
 * AutoSaloni Pro - Application Styles
 * EGSOFT SRLS
 */

/* CSS Variables for Theme Colors (will be overridden by inline styles from PHP) */
:root {
    --theme-primary: #667eea;
    --theme-secondary: #764ba2;
    --theme-gradient-start: #667eea;
    --theme-gradient-end: #764ba2;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--theme-gradient-start) 0%, var(--theme-gradient-end) 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Bootstrap Overrides */
.bg-primary {
    background-color: var(--theme-primary) !important;
}

.btn-primary {
    background-color: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--theme-secondary) !important;
    border-color: var(--theme-secondary) !important;
}

.text-primary {
    color: var(--theme-primary) !important;
}

/* Navbar */
.navbar-brand {
    font-weight: bold;
    font-size: 1.2rem;
}

.navbar-text {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* User Info Card */
.user-info-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.user-info-header {
    background: linear-gradient(135deg, var(--theme-gradient-start) 0%, var(--theme-gradient-end) 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
}

/* Module Cards Container */
.module-cards-container {
    background: white;
    border-radius: 15px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Module Cards */
.module-card {
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 10px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.module-card.veicoli {
    border-color: #28a745;
}

.module-card.veicoli:hover {
    border-color: #28a745;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.module-card.rent {
    border-color: #ffc107;
}

.module-card.rent:hover {
    border-color: #ffc107;
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: white;
}

.module-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
}

.module-card.veicoli .module-icon {
    color: #28a745;
}

.module-card.rent .module-icon {
    color: #ffc107;
}

.module-card:hover .module-icon {
    color: white;
}

.module-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.module-description {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.module-card:hover .module-description {
    color: rgba(255, 255, 255, 0.9);
}

.module-arrow {
    font-size: 2rem;
    margin-top: auto;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
}

/* Footer */
footer {
    background: transparent;
    color: white;
}

footer a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

footer a:hover {
    opacity: 0.8;
}

/* Utilities */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .module-card {
        min-height: 240px;
        padding: 2rem 1.5rem;
    }

    .module-icon {
        font-size: 4rem;
    }

    .module-title {
        font-size: 1.5rem;
    }

    .user-info-header {
        padding: 1rem;
    }

    .user-info-header .d-flex {
        flex-direction: column;
        text-align: center;
    }

    .user-info-header .text-end {
        text-align: center !important;
        margin-top: 1rem;
    }

    .module-cards-container {
        padding: 2rem 1rem;
    }
}

@media (max-width: 576px) {
    .module-card {
        min-height: 200px;
    }

    .module-icon {
        font-size: 3rem;
    }

    .module-title {
        font-size: 1.3rem;
    }

    .user-info-card {
        padding: 1rem;
        margin: 1rem 0;
    }
}

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Modal Customization */
.modal-content {
    border: none;
    border-radius: 15px;
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 15px 15px 0 0;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0 0 15px 15px;
}

/* Badge Styles */
.badge {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
}

/* Input Groups */
.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
}

/* Alert Styles */
.alert {
    border-radius: 10px;
    border: none;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}
