:root {
    --primary: #2563eb;
    --primary-light: #60a5fa;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --bg-main: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 4rem;
    padding-top: 2rem;
}

header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #1e40af, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.025em;
}

header p {
    color: var(--text-muted);
    font-size: 1.25rem;
    font-weight: 400;
}

/* Grid Wrapper */
.day-wrapper {
    margin-bottom: 4rem;
    animation: fadeIn 0.8s ease-out;
}

.day-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.day-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, #e2e8f0, transparent);
}

/* Table Design */
.volunteer-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 2px;
    table-layout: fixed;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
}

.volunteer-grid th {
    background: rgba(255, 255, 255, 0.5);
    padding: 1rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.volunteer-grid td {
    height: 60px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

.lieu-cell {
    width: 180px;
    background: rgba(255, 255, 255, 0.8) !important;
    font-weight: 600;
    padding: 0 1rem;
    color: #334155;
    position: sticky;
    left: 0;
    z-index: 10;
}

.slot {
    cursor: pointer;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.slot.libre {
    background: #ecfdf5;
    color: #059669;
}

.slot.libre:hover {
    background: #d1fae5;
    transform: scale(1.02);
    z-index: 5;
}

.slot.in-progress {
    background: #fffbeb;
    color: #d97706;
}

.slot.in-progress:hover {
    background: #fef3c7;
}

.slot.complet {
    background: #f8fafc;
    color: #94a3b8;
    cursor: default;
    opacity: 0.7;
}

/* Modal Styling */
#modal-container {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    margin: 5vh auto;
    padding: 0;
    width: 90%;
    max-width: 600px;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: modalSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
    background: #f8fafc;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#form-loader {
    padding: 2rem;
    max-height: 80vh;
    overflow-y: auto;
}

/* Form Elements */
.form-header {
    margin-bottom: 2rem;
}

.form-header h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

input,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-family: inherit;
    transition: all 0.2s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.v-line {
    border-left: 3px solid var(--primary-light);
    padding-left: 1.5rem;
    margin-bottom: 2rem;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 0 12px 12px 0;
}

.btn-submit {
    background: var(--primary);
    color: white;
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}