/**
 * Main Stylesheet for Soudelec Solutions Forms
 * Sky-blue and white theme with exhibition design
 */

:root {
    --primary-color: #87CEEB;
    --primary-dark: #5BA0C3;
    --primary-light: #B0E0F3;
    --secondary-color: #4A90E2;
    --accent-color: #2E5F8A;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --gray: #6c757d;
    --dark: #343a40;
    --border-radius: 10px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: var(--dark);
    line-height: 1.6;
}

/* Header Styles */
.main-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 20px 0;
    box-shadow: var(--box-shadow);
}

.exhibition-banner {
    background: url('/assets/images/exhibition-bg.jpg') center/cover;
    position: relative;
    padding: 60px 0;
    color: var(--white);
    text-align: center;
}

.exhibition-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.8) 0%, rgba(74, 144, 226, 0.8) 100%);
}

.exhibition-banner .container {
    position: relative;
    z-index: 1;
}

/* Card Styles */
.custom-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    margin-bottom: 30px;
    transition: var(--transition);
}

.custom-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header-custom {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 20px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    margin: -30px -30px 30px -30px;
}

/* Form Styles */
.form-group-custom {
    margin-bottom: 25px;
}

.form-label-custom {
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 8px;
    display: block;
    font-size: 0.95rem;
}

.form-control-custom {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
}

.form-control-custom:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.1);
    outline: none;
}

.form-control-custom.is-invalid {
    border-color: var(--danger-color);
}

.invalid-feedback {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 5px;
}

/* Button Styles */
.btn-custom {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--accent-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.btn-secondary-custom {
    background: var(--gray);
    color: var(--white);
}

.btn-success-custom {
    background: var(--success-color);
    color: var(--white);
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.step {
    position: relative;
    z-index: 1;
    text-align: center;
    flex: 1;
}

.step-number {
    width: 50px;
    height: 50px;
    background: #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: bold;
    color: var(--gray);
    transition: var(--transition);
}

.step.active .step-number {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.step.completed .step-number {
    background: var(--success-color);
    color: var(--white);
}

.step-title {
    font-size: 0.9rem;
    color: var(--gray);
}

.step.active .step-title {
    color: var(--primary-color);
    font-weight: 600;
}

/* Phase Containers */
.phase-container {
    display: none;
    animation: fadeIn 0.5s ease;
}

.phase-container.active {
    display: block;
}

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

/* Color Picker Styles */
.color-picker-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.color-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: var(--transition);
}

.color-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.multi-color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    background: var(--light-gray);
    border-radius: 8px;
}

.color-chip {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.color-chip:hover {
    transform: scale(1.1);
}

.color-chip.selected {
    border-color: var(--primary-color);
}

.color-chip.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-weight: bold;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

/* Radio Button Styles */
.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-custom {
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    user-select: none;
}

.radio-custom input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    transition: var(--transition);
}

.radio-custom:hover input ~ .radio-checkmark {
    border-color: var(--primary-color);
}

.radio-custom input:checked ~ .radio-checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.radio-checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.radio-custom input:checked ~ .radio-checkmark:after {
    display: block;
}

.radio-custom .radio-checkmark:after {
    left: 6px;
    top: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
}

/* Dashboard Styles */
.dashboard-container {
    padding: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    color: var(--gray);
    margin-top: 10px;
    font-size: 0.95rem;
}

/* Table Styles */
.table-custom {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.table-custom thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
}

.table-custom th {
    padding: 15px;
    font-weight: 600;
    text-align: left;
    border: none;
}

.table-custom td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.table-custom tbody tr:hover {
    background: var(--light-gray);
}

.table-custom tbody tr:last-child td {
    border-bottom: none;
}

/* Status Badges */
.badge-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-new {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-progress {
    background: #fff3e0;
    color: #f57c00;
}

.badge-completed {
    background: #e8f5e9;
    color: #388e3c;
}

.badge-cancelled {
    background: #ffebee;
    color: #c62828;
}

/* Loading Spinner */
.spinner-custom {
    border: 3px solid var(--light-gray);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alert Styles */
.alert-custom {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    border-left: 4px solid;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert-success-custom {
    background: #e8f5e9;
    border-left-color: var(--success-color);
    color: #2e7d32;
}

.alert-error-custom {
    background: #ffebee;
    border-left-color: var(--danger-color);
    color: #c62828;
}

.alert-info-custom {
    background: #e3f2fd;
    border-left-color: var(--info-color);
    color: #0277bd;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .custom-card {
        padding: 20px;
    }
    
    .card-header-custom {
        margin: -20px -20px 20px -20px;
        padding: 15px;
    }
    
    .progress-steps {
        flex-direction: column;
        gap: 20px;
    }
    
    .progress-steps::before {
        display: none;
    }
    
    .radio-group {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .table-custom {
        font-size: 0.9rem;
    }
    
    .table-custom th,
    .table-custom td {
        padding: 10px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .btn-custom,
    .no-print {
        display: none !important;
    }
    
    .custom-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
