/* FormService Custom Styles */

:root {
    --primary-color: #2563eb;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --bs-primary: #2563eb;
    --bs-primary-rgb: 37, 99, 235;
}

/* Override Bootstrap primary to match Tailwind */
.bg-primary { background-color: #2563eb !important; }
.btn-primary { background-color: #2563eb !important; border-color: #2563eb !important; }
.btn-primary:hover { background-color: #1d4ed8 !important; border-color: #1d4ed8 !important; }
.btn-outline-primary { color: #2563eb !important; border-color: #2563eb !important; }
.btn-outline-primary:hover { background-color: #2563eb !important; border-color: #2563eb !important; color: #fff !important; }
.text-primary { color: #2563eb !important; }
.border-primary { border-color: #2563eb !important; }
.card-header.bg-primary { background-color: #2563eb !important; }

/* General */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

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

/* Cards */
.card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Course Cards */
.course-card .card-img-top {
    height: 180px;
    object-fit: cover;
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
}

.btn-primary {
    background-color: #2563eb;
    border-color: #2563eb;
}
.btn-primary:focus {
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.5);
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Badges */
.badge {
    font-weight: 500;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%);
    color: white;
    padding: 4rem 0;
}

/* Footer */
footer {
    margin-top: auto;
}

footer a {
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Dashboard */
.dashboard-stat-card {
    border-left: 4px solid #2563eb;
}

.dashboard-stat-card.success {
    border-left-color: var(--success-color);
}

.dashboard-stat-card.warning {
    border-left-color: var(--warning-color);
}

.dashboard-stat-card.danger {
    border-left-color: var(--danger-color);
}

/* Progress Bar */
.progress {
    height: 0.5rem;
    border-radius: 0.25rem;
}

/* Certificate Card */
.certificate-card {
    border: 2px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.certificate-card.valid {
    border-color: var(--success-color);
}

.certificate-card.expired {
    border-color: var(--danger-color);
}

/* Tables */
.table th {
    font-weight: 600;
    background-color: #f8f9fa;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }

    .hero-section {
        padding: 2rem 0;
    }

    .display-4 {
        font-size: 2rem;
    }
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Alerts */
.alert {
    border-radius: 0.375rem;
}

/* Category Icons */
.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.category-icon.sicurezza {
    background-color: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.category-icon.antincendio {
    background-color: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.category-icon.primo-soccorso {
    background-color: rgba(25, 135, 84, 0.2);
    color: #198754;
}

.category-icon.rspp {
    background-color: rgba(37, 99, 235, 0.2);
    color: #2563eb;
}
