* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 3vw;
    color: #2c3e50;
    font-size: 16px;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 5vw;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 2vw;
    box-shadow: 0 1vw 5vw rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.header {
    text-align: center;
    padding: 4vw;
    background: linear-gradient(45deg, #1e3c72, #2a5298);
    color: white;
    border-radius: 2vw 2vw 0 0;
    margin: -5vw -5vw 5vw -5vw;
}

.header h1 {
    font-size: 6vw;
    margin: 0;
    font-family: 'Arial Black', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5vw;
}

.header p {
    font-size: 3.5vw;
    margin: 1vw 0 0;
    opacity: 0.9;
}

#current-date {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 4vw;
    font-size: 3.5vw;
    font-style: italic;
}

#calendar {
    margin: 4vw 0;
    border-radius: 2vw;
    overflow: hidden;
    box-shadow: 0 1vw 3vw rgba(0, 0, 0, 0.1);
}

.fc {
    background: white;
    border: none;
}

.fc-daygrid-day-number {
    font-size: 3.5vw;
    color: #2c3e50;
    font-weight: bold;
}

.fc-daygrid-day:hover {
    background: #f1f3f5;
    cursor: pointer;
    border-radius: 1vw;
}

.time-slots {
    display: none;
    margin: 4vw 0;
    padding: 4vw;
    border-radius: 2vw;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    box-shadow: 0 1vw 3vw rgba(0, 0, 0, 0.05);
}

.time-slots h2 {
    color: #1e3c72;
    font-size: 4.5vw;
    margin-bottom: 3vw;
    text-align: center;
}

#time-slot-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2vw;
}

.time-slot {
    padding: 3vw;
    border-radius: 2vw;
    cursor: pointer;
    text-align: center;
    font-size: 3.5vw;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #28a745;
    color: white;
    border: 1px solid #218838;
    box-shadow: 0 0.5vw 1vw rgba(0, 0, 0, 0.1);
}

.time-slot.taken {
    background: #dc3545;
    border-color: #c82333;
    cursor: not-allowed;
    opacity: 0.7;
}

.time-slot.selected {
    background: #ffeb3b !important;
    color: #2c3e50;
    border-color: #f1c40f;
    transform: scale(1.05);
}

.time-slot.available:hover {
    background: #218838;
    transform: scale(1.05);
    box-shadow: 0 1vw 2vw rgba(0, 0, 0, 0.2);
}

.form-container {
    display: none;
    padding: 5vw;
    border-radius: 2vw;
    background: white;
    box-shadow: 0 1vw 3vw rgba(0, 0, 0, 0.1);
}

.form-container h2 {
    color: #1e3c72;
    font-size: 4.5vw;
    margin-bottom: 4vw;
    text-align: center;
}

.form-container label {
    display: block;
    margin: 3vw 0 2vw;
    font-weight: 600;
    color: #34495e;
    font-size: 3.5vw;
}

.form-container input {
    width: 100%;
    padding: 3vw;
    margin-bottom: 3vw;
    border: 1px solid #e0e0e0;
    border-radius: 1.5vw;
    font-size: 3.5vw;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.form-container input:focus {
    border-color: #2a5298;
    outline: none;
}

.add-appointment {
    width: 100%;
    padding: 4vw;
    background: linear-gradient(45deg, #2a5298, #1e3c72);
    color: white;
    border: none;
    border-radius: 2vw;
    font-size: 3.5vw;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.add-appointment:hover {
    background: linear-gradient(45deg, #1e3c72, #2a5298);
    transform: translateY(-0.5vw);
    box-shadow: 0 1vw 3vw rgba(42, 82, 152, 0.4);
}

.add-appointment:active {
    transform: translateY(0);
}

.stats-container {
    display: none;
    margin-top: 4vw;
    padding: 4vw;
    border-radius: 2vw;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    box-shadow: 0 1vw 3vw rgba(0, 0, 0, 0.05);
}

.stats-container h2 {
    color: #1e3c72;
    font-size: 4.5vw;
    margin-bottom: 3vw;
    text-align: center;
}

.stats-container p {
    margin: 2vw 0;
    font-size: 3.5vw;
    color: #34495e;
}

.appointments {
    margin-top: 4vw;
}

.appointments h2 {
    color: #1e3c72;
    font-size: 4.5vw;
    margin-bottom: 3vw;
    text-align: center;
}

.appointment-item {
    padding: 4vw;
    border-radius: 2vw;
    margin-bottom: 3vw;
    background: white;
    box-shadow: 0 1vw 3vw rgba(0, 0, 0, 0.05);
    position: relative;
    transition: all 0.3s ease;
}

.appointment-item.en-ruta {
    background: #e7f3ff;
    border-left: 1vw solid #007bff;
}

.appointment-item:hover {
    transform: translateY(-0.5vw);
    box-shadow: 0 1.5vw 4vw rgba(0, 0, 0, 0.1);
}

.status {
    position: absolute;
    top: 4vw;
    right: 4vw;
    font-weight: 600;
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
    padding: 1vw 2vw;
    border-radius: 1vw;
    font-size: 3vw;
}

.action-buttons {
    margin-top: 2vw;
    display: flex;
    flex-wrap: wrap;
    gap: 2vw;
}

.action-buttons button {
    padding: 3vw 4vw;
    border: none;
    border-radius: 1.5vw;
    color: white;
    cursor: pointer;
    font-size: 3.5vw;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 25vw;
}

.action-buttons .en-ruta {
    background: #007bff;
}

.action-buttons .en-ruta:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.action-buttons .cancel {
    background: #dc3545;
}

.action-buttons .cancel:hover {
    background: #c82333;
    transform: scale(1.05);
}

.action-buttons .completed {
    background: #28a745;
}

.action-buttons .completed:hover {
    background: #218838;
    transform: scale(1.05);
}

.copy-button {
    padding: 3vw 4vw;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 1.5vw;
    cursor: pointer;
    margin-top: 2vw;
    transition: all 0.3s ease;
    font-size: 3.5vw;
    width: 100%;
}

.copy-button:hover {
    background: #5a6268;
    transform: scale(1.05);
}

.login-container {
    position: absolute;
    top: 3vw;
    right: 3vw;
}

.login-form {
    display: none;
    position: absolute;
    top: 10vw;
    right: 0;
    background: white;
    padding: 4vw;
    border-radius: 2vw;
    box-shadow: 0 1vw 3vw rgba(0, 0, 0, 0.1);
    z-index: 1000;
    width: 60vw;
}

.login-form input {
    display: block;
    width: 100%;
    margin-bottom: 3vw;
    padding: 3vw;
    border: 1px solid #e0e0e0;
    border-radius: 1.5vw;
    font-size: 3.5vw;
}

.login-form button {
    width: 100%;
    padding: 3vw;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 1.5vw;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 3.5vw;
}

.login-form button:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.map {
    height: 50vw;
    width: 100%;
    margin-top: 2vw;
    border-radius: 2vw;
    display: none;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1vw 3vw rgba(0, 0, 0, 0.05);
}

.map-search {
    margin-top: 2vw;
    display: flex;
    gap: 2vw;
}

.map-search input {
    flex: 1;
    padding: 3vw;
    border: 1px solid #e0e0e0;
    border-radius: 1.5vw;
    font-size: 3.5vw;
}

.map-search button {
    padding: 3vw;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 1.5vw;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 3.5vw;
}

.map-search button:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.route-info {
    margin-top: 2vw;
    font-size: 3.5vw;
    color: #2c3e50;
    background: #f1f3f5;
    padding: 2vw;
    border-radius: 1.5vw;
}

.loader {
    border: 1vw solid #f3f3f3;
    border-top: 1vw solid #2a5298;
    border-radius: 50%;
    width: 6vw;
    height: 6vw;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 2000;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.notification {
    position: fixed;
    top: 3vw;
    right: 3vw;
    padding: 4vw;
    border-radius: 2vw;
    color: white;
    font-size: 3.5vw;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.5s;
    box-shadow: 0 1vw 3vw rgba(0, 0, 0, 0.2);
}

.notification.success {
    background: #28a745;
}

.notification.en-ruta {
    background: #007bff;
}

/* Tablet Adjustments (max-width: 768px) */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        padding: 4vw;
    }

    .container {
        padding: 6vw;
    }

    .header h1 {
        font-size: 7vw;
    }

    .header p {
        font-size: 4vw;
    }

    #current-date {
        font-size: 4vw;
    }

    .fc-daygrid-day-number {
        font-size: 4vw;
    }

    .time-slots h2,
    .form-container h2,
    .stats-container h2,
    .appointments h2 {
        font-size: 5vw;
    }

    #time-slot-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 3vw;
    }

    .time-slot,
    .form-container label,
    .form-container input,
    .add-appointment,
    .stats-container p,
    .action-buttons button,
    .copy-button,
    .map-search input,
    .map-search button,
    .route-info {
        font-size: 4vw;
    }

    .time-slot {
        padding: 3.5vw;
    }

    .login-form {
        width: 80vw;
    }

    .map {
        height: 60vw;
    }
}

/* Mobile Adjustments (max-width: 480px) */
@media (max-width: 480px) {
    body {
        font-size: 12px;
        padding: 5vw;
    }

    .container {
        padding: 8vw;
        border-radius: 3vw;
    }

    .header {
        padding: 6vw;
        margin: -8vw -8vw 6vw -8vw;
    }

    .header h1 {
        font-size: 8vw;
        letter-spacing: 0.3vw;
    }

    .header p {
        font-size: 4.5vw;
    }

    #current-date {
        font-size: 4.5vw;
    }

    #calendar {
        margin: 6vw 0;
    }

    .fc-daygrid-day-number {
        font-size: 4.5vw;
    }

    .time-slots {
        padding: 6vw;
    }

    .time-slots h2 {
        font-size: 5.5vw;
    }

    #time-slot-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 4vw;
    }

    .time-slot {
        padding: 4vw;
        font-size: 4.5vw;
    }

    .form-container {
        padding: 6vw;
    }

    .form-container h2 {
        font-size: 5.5vw;
    }

    .form-container label {
        font-size: 4.5vw;
        margin: 4vw 0 3vw;
    }

    .form-container input {
        padding: 4vw;
        font-size: 4.5vw;
    }

    .add-appointment {
        padding: 5vw;
        font-size: 4.5vw;
    }

    .stats-container {
        padding: 6vw;
    }

    .stats-container h2 {
        font-size: 5.5vw;
    }

    .stats-container p {
        font-size: 4.5vw;
    }

    .appointments h2 {
        font-size: 5.5vw;
    }

    .appointment-item {
        padding: 6vw;
        margin-bottom: 4vw;
    }

    .status {
        top: 6vw;
        right: 6vw;
        padding: 1.5vw 3vw;
        font-size: 3.5vw;
    }

    .action-buttons {
        flex-direction: column;
        gap: 3vw;
    }

    .action-buttons button {
        padding: 4vw;
        font-size: 4.5vw;
        min-width: 100%;
    }

    .copy-button {
        padding: 4vw;
        font-size: 4.5vw;
    }

    .login-container {
        top: 5vw;
        right: 5vw;
    }

    .login-form {
        width: 90vw;
        padding: 6vw;
        top: 12vw;
    }

    .login-form input,
    .login-form button {
        padding: 4vw;
        font-size: 4.5vw;
    }

    .map {
        height: 70vw;
    }

    .map-search input,
    .map-search button {
        padding: 4vw;
        font-size: 4.5vw;
    }

    .route-info {
        font-size: 4.5vw;
        padding: 3vw;
    }

    .loader {
        width: 8vw;
        height: 8vw;
        border-width: 1.5vw;
    }

    .notification {
        top: 5vw;
        right: 5vw;
        padding: 5vw;
        font-size: 4.5vw;
    }
}