:root {
    --primary: #1b5e20;
    --secondary: #2e7d32;
    --accent: #43a047;
    --danger: #d32f2f;
    --bg: #f0f4f1;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: var(--bg); }

/* ── HEADER ── */
.main-header {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
    color: white;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 62px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.logo {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.logo i { font-size: 1.2rem; }

#main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

#main-nav a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 0.83rem;
    font-weight: 600;
    padding: 6px 13px;
    border-radius: 20px;
    transition: all 0.2s;
}

#main-nav a:hover {
    background: rgba(255,255,255,0.18);
    color: white;
}

.btn-admin {
    background: white !important;
    color: #1b5e20 !important;
    padding: 7px 15px !important;
    border-radius: 20px !important;
    font-weight: 700 !important;
    font-size: 0.83rem !important;
    box-shadow: 0 3px 8px rgba(0,0,0,0.18) !important;
    transition: all 0.2s !important;
}

.btn-admin:hover {
    background: #e8f5e9 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 5px 12px rgba(0,0,0,0.2) !important;
}

/* ── CONTAINER ── */
.app-container { max-width: 680px; margin: 28px auto; padding: 0 15px; }

/* ── CALENDAR CARD 3D ── */
.calendar-card {
    background: linear-gradient(160deg, #ffffff 0%, #f5faf5 100%);
    border-radius: 20px;
    padding: 22px;
    box-shadow:
        0 10px 30px rgba(27,94,32,0.15),
        0 4px 8px rgba(0,0,0,0.08),
        inset 0 1px 0 rgba(255,255,255,0.9);
    border: 1px solid rgba(46,125,50,0.1);
    transform: perspective(1000px) rotateX(1deg);
    transition: transform 0.3s;
}

.calendar-card:hover {
    transform: perspective(1000px) rotateX(0deg) translateY(-2px);
}

/* ── NAV MESES ── */
.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-nav button {
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(27,94,32,0.35), 0 2px 4px rgba(0,0,0,0.1);
}

.calendar-nav button:hover {
    transform: scale(1.1) translateY(-1px);
    box-shadow: 0 6px 14px rgba(27,94,32,0.45);
}

.calendar-nav button:active {
    transform: scale(0.95);
    box-shadow: 0 2px 6px rgba(27,94,32,0.3);
}

.calendar-nav span {
    font-weight: 700;
    font-size: 1.2rem;
    color: #1a1a1a;
    letter-spacing: 0.3px;
}

/* ── GRID ── */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 7px;
    text-align: center;
}

.day-name {
    font-weight: 700;
    color: #999;
    font-size: 0.72rem;
    text-transform: uppercase;
    padding-bottom: 8px;
    letter-spacing: 0.6px;
}

.dia {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.88rem;
    color: #222;
    background: linear-gradient(145deg, #eaf5eb, #d4edda);
    box-shadow: 3px 3px 6px rgba(0,0,0,0.08), -1px -1px 3px rgba(255,255,255,0.9);
    transition: all 0.15s;
    border: 1px solid rgba(46,125,50,0.08);
}

.dia:hover {
    background: linear-gradient(145deg, #c8e6c9, #a5d6a7);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 4px 6px 12px rgba(27,94,32,0.2), -1px -1px 3px rgba(255,255,255,0.9);
}

.dia:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.dia.pasada {
    background: linear-gradient(145deg, #f0f0f0, #e5e5e5);
    color: #bbb;
    cursor: not-allowed;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.05);
    border-color: transparent;
}
.dia.pasada:hover { transform: none; background: linear-gradient(145deg, #f0f0f0, #e5e5e5); }

.dia.ocupado {
    background: linear-gradient(145deg, #ffebee, #ffcdd2);
    color: #c62828;
    cursor: not-allowed;
    font-weight: 700;
    box-shadow: 3px 3px 6px rgba(198,40,40,0.12), -1px -1px 3px rgba(255,255,255,0.9);
    border-color: rgba(198,40,40,0.1);
}
.dia.ocupado:hover { transform: none; }

.dia.selected {
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
    color: white;
    box-shadow: 4px 6px 14px rgba(27,94,32,0.4), -1px -1px 3px rgba(255,255,255,0.2);
    transform: translateY(-2px) scale(1.08);
    border-color: transparent;
}

.dia-vacio { background: transparent; box-shadow: none; border: none; }

/* ── LEYENDA ── */
.legend {
    display: flex;
    gap: 18px;
    justify-content: center;
    margin-top: 18px;
    font-size: 0.8rem;
    color: #666;
    font-weight: 600;
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 4px;
    margin-right: 5px;
    vertical-align: middle;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.12);
}

.dot.pasada { background: #e5e5e5; }
.dot.ocupado { background: #ffcdd2; }
.dot.libre { background: #d4edda; }

/* ── FORMULARIO ── */
.form-section { margin-top: 22px; }

.form-card {
    background: linear-gradient(160deg, #ffffff 0%, #f5faf5 100%);
    padding: 26px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(27,94,32,0.12), 0 4px 8px rgba(0,0,0,0.06);
    border: 1px solid rgba(46,125,50,0.1);
}

.form-header {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8f5e9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row { display: flex; gap: 12px; }

.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 14px;
}

.input-group label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input, select {
    padding: 11px 13px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    width: 100%;
    font-size: 0.93rem;
    color: #222;
    background: #fafafa;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    font-family: 'Segoe UI', Arial, sans-serif;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--secondary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(46,125,50,0.12), inset 0 1px 3px rgba(0,0,0,0.04);
}

select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23555' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-color: #fafafa;
    cursor: pointer;
    padding-right: 32px;
}

.btn-submit {
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
    color: white;
    border: none;
    padding: 14px;
    width: 100%;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 6px;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    font-family: 'Segoe UI', Arial, sans-serif;
    box-shadow: 0 4px 12px rgba(27,94,32,0.35), 0 2px 4px rgba(0,0,0,0.1);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 18px rgba(27,94,32,0.4);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(27,94,32,0.3);
}

@media (max-width: 600px) {
    .form-row { flex-direction: column; }
    .calendar-grid { gap: 5px; }
    .dia { font-size: 0.82rem; border-radius: 8px; }
    .main-header { padding: 0 12px; height: 56px; }
    .logo { font-size: 0.92rem; }
    .calendar-card { transform: none; }
    .calendar-card:hover { transform: none; }
}
