@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --coral: #E86C6C;
    --cream: #F7F1A9;
    --sage: #9AC2B9;
    --silver: #D9D4CD;
    --teal: #52B5B4;
    --white: #ffffff;
    --dark: #2C3E50;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--cream) 0%, var(--silver) 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* === ESTILOS DE LOGIN === */
.login-container {
    width: 100%;
    max-width: 450px;
    animation: fadeIn 0.6s ease;
    padding: 0;
}

.login-form {
    background: var(--white);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.login-form h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--teal), var(--sage));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.login-form > p {
    color: #7f8c8d;
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 2.5rem;
}

.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 2px solid var(--silver);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(82, 181, 180, 0.1);
}

.login-form button[type="submit"] {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--teal), var(--sage));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 1rem;
}

.login-form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(82, 181, 180, 0.3);
}

.login-form button[type="submit"]:active {
    transform: translateY(0);
}

.error-message {
    background: rgba(232, 108, 108, 0.1);
    color: var(--coral);
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border-left: 4px solid var(--coral);
}

/* === ESTILOS PANEL MAESTRO === */
.control-container {
    width: 100%;
    max-width: 400px;
    animation: slideUp 0.6s ease;
    background: var(--white);
    border-radius: 32px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.no-salon-message {
    text-align: center;
    padding: 2rem;
}

.no-salon-message h2 {
    color: var(--dark);
    margin-bottom: 1rem;
}

.control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.control-header span {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--silver);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: var(--sage);
    transform: scale(1.05);
}

#fav-btn {
    background: rgba(232, 108, 108, 0.2);
    color: var(--coral);
}

#fav-btn.saved {
    animation: heartbeat 0.6s ease;
    background: var(--coral);
    color: white;
}

.temp-display {
    width: 260px;
    height: 260px;
    margin: 2rem auto;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--silver) 0%, var(--cream) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 8px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

.temp-display.gradient-bg {
    background: linear-gradient(135deg, var(--cream) 0%, var(--teal) 100%);
    box-shadow: 0 10px 60px rgba(82, 181, 180, 0.4);
}

.temp-wrapper h1 {
    font-size: 5rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1;
    margin: 0;
}

.temp-wrapper span {
    font-size: 0.95rem;
    color: #7f8c8d;
    margin-top: 0.5rem;
    display: block;
}

.salon-name {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--teal), var(--sage));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.temp-controls {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.control-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.control-btn.minus {
    background: linear-gradient(135deg, var(--sage), var(--teal));
}

.control-btn.plus {
    background: linear-gradient(135deg, var(--coral), #d45d5d);
}

.control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.control-btn:active {
    transform: scale(1.05);
}

.light-btn {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 4px solid var(--silver);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #bdc3c7;
    margin: 2rem auto 0;
}

.light-btn:hover {
    border-color: var(--cream);
    transform: scale(1.05);
}

.light-btn.on {
    background: var(--cream);
    border-color: var(--cream);
    box-shadow: 0 0 40px rgba(247, 241, 169, 0.6);
    color: var(--dark);
}

.logout-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, var(--coral), #d45d5d);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.logout-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(232, 108, 108, 0.3);
}



/* === ESTILOS ADMIN === */
.admin-container {
    width: 100%;
    max-width: 1400px;
    background: var(--white);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.6s ease;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--silver);
    padding-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
    background: linear-gradient(135deg, var(--teal), var(--sage));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.admin-header nav {
    display: flex;
    gap: 1rem;
}

.admin-header nav a {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 12px;
    background: var(--silver);
    color: var(--dark);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.admin-header nav a:hover {
    background: var(--sage);
    color: white;
}

.admin-header nav a.active {
    background: linear-gradient(135deg, var(--teal), var(--sage));
    color: white;
}

/* Mapa Admin */
.single-salon-map-container {
    flex-grow: 1;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.floor-plan {
    flex: 1;
    min-width: 300px;
    background: linear-gradient(135deg, var(--cream) 0%, var(--silver) 100%);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.floor-plan h3 {
    color: var(--dark);
    margin-bottom: 1rem;
}

.status-panel {
    flex: 1;
    min-width: 300px;
    background: var(--white);
    border: 2px solid var(--silver);
    border-radius: 16px;
    padding: 2rem;
}

.status-panel h3 {
    color: var(--dark);
    margin-bottom: 2rem;
    font-size: 1.3rem;
    background: linear-gradient(135deg, var(--teal), var(--sage));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--cream) 0%, var(--silver) 100%);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.status-label {
    font-weight: 600;
    color: var(--dark);
}

.status-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
}

.status-value.on {
    color: var(--teal);
}

.status-value.off {
    color: #7f8c8d;
}

/* Horario Admin */
.schedule-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.day-btn {
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 12px;
    background: var(--silver);
    color: var(--dark);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.day-btn:hover {
    background: var(--sage);
    color: white;
}

.day-btn.active {
    background: linear-gradient(135deg, var(--teal), var(--sage));
    color: white;
}

.schedule-container {
    overflow-x: auto;
    flex-grow: 1;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
}

.schedule-table th,
.schedule-table td {
    border: 1px solid var(--silver);
    padding: 1rem;
    height: 70px;
}

.schedule-table th {
    background: linear-gradient(135deg, var(--sage), var(--teal));
    color: white;
    font-weight: 600;
}

.schedule-table tr.current-time-row > td:first-child {
    background: var(--coral);
    color: white;
    font-weight: bold;
}

.assignment {
    padding: 0.8rem;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--cream) 0%, var(--silver) 100%);
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 0.9em;
}

.assignment.luz-on {
    background: linear-gradient(135deg, var(--cream), var(--teal));
    box-shadow: 0 0 20px rgba(247, 241, 169, 0.4);
}

.assignment .temp {
    font-weight: bold;
    color: var(--dark);
    margin-top: 0.3rem;
}

.schedule-table td.empty-cell {
    cursor: pointer;
    background-color: #fafafa;
    transition: background-color 0.2s;
}

.schedule-table td.empty-cell:hover {
    background: linear-gradient(135deg, rgba(247, 241, 169, 0.3), rgba(82, 181, 180, 0.2));
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--silver);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    margin: 0;
    color: var(--dark);
    background: linear-gradient(135deg, var(--teal), var(--sage));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--coral);
}

.modal-body p {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.modal-body label {
    display: block;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.modal-body select {
    width: 100%;
    padding: 0.9rem;
    border-radius: 12px;
    border: 2px solid var(--silver);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.modal-body select:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(82, 181, 180, 0.1);
}

.modal-footer {
    text-align: right;
    margin-top: 2rem;
}

.btn-primary {
    padding: 0.9rem 2rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--teal), var(--sage));
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(82, 181, 180, 0.3);
}

/* === ANIMACIONES === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1); }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .login-form {
        padding: 2rem 1.5rem;
    }

    .login-form h2 {
        font-size: 1.6rem;
    }

    .control-container {
        padding: 1.5rem;
        max-width: 100%;
    }

    .temp-display {
        width: 220px;
        height: 220px;
    }

    .temp-wrapper h1 {
        font-size: 4rem;
    }

    .control-btn {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .light-btn {
        width: 80px;
        height: 80px;
    }

    .admin-container {
        padding: 1.5rem;
        min-height: auto;
    }

    .admin-header h1 {
        font-size: 1.4rem;
    }

    .admin-header nav {
        width: 100%;
        justify-content: center;
    }

    .logout-button {
        bottom: 20px;
        right: 20px;
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .single-salon-map-container {
        flex-direction: column;
    }

    .schedule-table th,
    .schedule-table td {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .login-form h2 {
        font-size: 1.4rem;
    }

    .temp-display {
        width: 200px;
        height: 200px;
    }

    .temp-wrapper h1 {
        font-size: 3.5rem;
    }

    .temp-controls {
        gap: 1.5rem;
    }

    .control-btn {
        width: 55px;
        height: 55px;
    }

    .day-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    .modal {
        padding: 1.5rem;
    }
}