:root {
    --bg-color: #FFF9FA;
    --card-bg: #FFFFFF;
    --primary-color: #FFD1DC;
    --secondary-color: #FFB7C5;
    --text-color: #6D6D6D;
    --accent-color: #FFB7C5;
    --radius: 20px;
    --shadow: 0 10px 30px rgba(255, 183, 197, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    padding-bottom: 40px;
}

#app {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    padding: 30px 0;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.flower-icon {
    width: 24px;
    height: 24px;
    color: var(--secondary-color);
}

.brand-name {
    font-size: 2rem;
    font-weight: 600;
    color: var(--secondary-color);
    letter-spacing: -0.5px;
}

.tagline {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 209, 220, 0.3);
    transition: var(--transition);
    animation: fadeIn 0.8s ease-out;
}

.relative-card {
    position: relative;
    overflow: hidden;
}

.corner-icon {
    position: absolute;
    opacity: 0.05;
    width: 60px;
    height: 60px;
    pointer-events: none;
    z-index: 0;
}

.top-right { top: -5px; right: -5px; transform: rotate(15deg); }
.bottom-left { bottom: -5px; left: -5px; transform: rotate(-15deg); }
.top-left { top: -5px; left: -5px; transform: rotate(-10deg); }

.card > h2, .card > div {
    position: relative;
    z-index: 1;
}

h2 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
}

.icon {
    font-size: 1.1rem;
}

/* Zones Grid */
.zones-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.zones-category-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.category-header {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-top: 5px;
    margin-bottom: 5px;
    border-bottom: 1px dashed var(--primary-color);
    padding-bottom: 5px;
}

.zone-item, .combo-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #F0F0F0;
    cursor: pointer;
    transition: var(--transition);
}

.zone-item:hover, .combo-item:hover {
    background-color: var(--bg-color);
}

.zone-item.selected, .combo-item.selected {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.zone-item input, .combo-item input {
    margin-right: 15px;
    accent-color: var(--secondary-color);
}

.zone-info, .combo-info {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.combo-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.combo-name {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
}

.combo-prices {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-color);
}

.zone-price {
    font-weight: 600;
    color: var(--secondary-color);
    white-space: nowrap;
}

.zone-info {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
}

.zone-price {
    font-weight: 600;
    color: var(--secondary-color);
}

.total-container {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px dashed var(--primary-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-weight: 600;
}

.total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
}

.deposit-line {
    color: #48bb78;
    font-size: 1.1rem;
    background: rgba(72, 187, 120, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: 5px;
}

#total-amount, #deposit-amount {
    font-size: 1.4rem;
}

#total-amount {
    color: var(--secondary-color);
}

/* Agenda */
.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

input[type="date"], 
input[type="text"], 
input[type="password"] {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #EEE;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(255, 183, 197, 0.1);
}

.slots-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.slots-sub-header {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 12px;
    border: 1px solid #EEE;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
    background-color: var(--bg-color);
}

.search-input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(255, 183, 197, 0.1);
}

.slots-grid-sub {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
}

.slot {
    padding: 12px;
    text-align: center;
    border-radius: 10px;
    border: 1px solid #EEE;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.slot.available:hover {
    border-color: var(--secondary-color);
    background-color: var(--bg-color);
}

.slot.selected {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.slot.occupied {
    background-color: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* File Upload */
.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border: 2px dashed var(--primary-color);
    border-radius: 15px;
    cursor: pointer;
    background: var(--bg-color);
}

.upload-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.file-status {
    font-size: 0.8rem;
    text-align: center;
    margin-top: 5px;
    color: var(--secondary-color);
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 18px;
    border-radius: 15px;
    border: none;
    background-color: var(--secondary-color);
    color: white;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 183, 197, 0.3);
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 183, 197, 0.4);
}

.btn-danger {
    background-color: #ff4d4d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
}

.btn-secondary {
    background-color: #E2E8F0;
    color: #4A5568;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

.btn-group {
    display: flex;
    gap: 10px;
}

.mt-15 {
    margin-top: 15px;
}

/* Admin Panel */
.admin-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.btn-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-color);
}

.admin-actions {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.appointments-list {
    display: grid;
    gap: 15px;
}

.appointment-card {
    background: white;
    padding: 15px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--secondary-color);
}

.appointment-card h4 {
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.view-receipt-btn {
    margin-top: 10px;
    background: var(--bg-color);
    border: 1px solid var(--primary-color);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 350px;
    text-align: center;
}

.modal-content h3 {
    margin-bottom: 20px;
}

.hidden-animate {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
}

.hidden-animate.visible {
    max-height: 100px; /* Suficiente para un input */
    opacity: 1;
    margin-bottom: 20px;
}

.text-center {
    text-align: center;
}

.income-amount {
    font-size: 2.2rem;
    font-weight: 600;
    color: #48bb78;
    margin-top: 10px;
}

.hidden {
    display: none !important;
}

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

/* Footer & Gear */
.footer {
    display: flex;
    justify-content: center;
    padding: 20px;
    margin-top: 20px;
    border-top: 1px solid #FFE4E8;
    color: var(--text-color);
    font-size: 0.9rem;
}

.footer-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    opacity: 0.6;
    transition: var(--transition);
}

.btn-icon:hover {
    opacity: 1;
    color: var(--secondary-color);
}

.gear-icon {
    width: 18px;
    height: 18px;
}

/* Admin Styling */
.admin-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.admin-card h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--text-color);
}

.admin-list {
    display: grid;
    gap: 10px;
}

.admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: var(--bg-color);
    border-radius: 10px;
}

.admin-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-combo-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}

.admin-combo-group .admin-input-group {
    font-size: 0.8rem;
}

.admin-price-input {
    width: 70px !important;
    padding: 6px !important;
    text-align: right;
}

/* Promo Amigos */
.promo-amigos-container {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background-color: #FFF0F5;
    border-radius: 12px;
    border: 1px dashed var(--secondary-color);
    margin-bottom: 20px;
}

.promo-text {
    font-weight: 600;
    color: var(--secondary-color);
}

.section-subtitle {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--secondary-color);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Toasts */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}

.toast {
    background: white;
    border-left: 5px solid var(--secondary-color);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    color: var(--text-color);
    font-weight: 600;
    min-width: 250px;
    transform: translateY(100px);
    opacity: 0;
    animation: slideUpToast 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast.hiding {
    animation: fadeOutToast 0.4s ease forwards;
}

@keyframes slideUpToast {
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeOutToast {
    to { transform: translateY(20px); opacity: 0; }
}

/* Responsive */
@media (max-width: 480px) {
    #app {
        padding: 15px;
    }
    .brand-name {
        font-size: 1.75rem;
    }
}

/* PWA Install Button */
.btn-install {
    background: white;
    color: #FFB7C5; /* Use variable value directly for safety or var(--secondary-color) */
    border: 2px solid #FFB7C5;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    margin: 15px auto 0;
    display: block;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
    font-family: inherit;
}

.btn-install:hover {
    background: #FFB7C5;
    color: white;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-5px);}
    60% {transform: translateY(-3px);}
}
