:root {
    --primary: #002860;       /* Azul Bíblico */
    --primary-hover: #0066B3; /* Azul Rey */
    --bg-gradient: linear-gradient(135deg, #002860 0%, #69B3E3 100%);
    --text-primary: #1F2937;
    --text-secondary: #748A96; /* Gris Plomo */
    --white: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

body {
    margin: 0;
    padding: 1rem;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    color: var(--text-primary);
}

.glass-container {
    background: var(--white);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    width: 95%;
    max-width: 480px;
    margin: auto;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: max-width 0.4s ease;
}

.glass-container.wider-layout {
    max-width: 900px;
}

header {
    text-align: center;
}

header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--primary);
}

header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.logo {
    max-width: 250px;
    height: auto;
    margin-bottom: 1rem;
    display: inline-block;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.input-group input {
    padding: 1rem;
    border-radius: 12px;
    border: 2px solid rgba(0,0,0,0.1);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.meal-btn {
    background: white;
    border: none;
    border-radius: 16px;
    padding: 1.25rem 1rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.meal-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
    background: var(--primary);
    color: white;
}

.meal-btn:hover .icon, .meal-btn:hover .label {
    transform: scale(1.05);
    color: white;
}

.icon {
    font-size: 3rem;
    transition: transform 0.2s ease;
}

.label {
    font-weight: 600;
    font-size: 1.2rem;
    transition: color 0.2s ease;
}

.status-message {
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
    font-size: 0.9rem;
    opacity: 1;
    transition: opacity 0.3s;
}

.status-message.hidden {
    opacity: 0;
    pointer-events: none;
    height: 0;
    padding: 0;
    margin: 0;
}

.status-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #DC2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.primary-btn {
    background: var(--primary);
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.primary-btn:hover {
    background: var(--primary-hover);
}

.primary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.text-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    margin-top: 0.5rem;
}

/* Hard Hiding for screen transitions */
.hidden {
    display: none !important;
}

.meal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Pulse animation for loading state */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.95); }
}

.loading {
    animation: pulse 1s infinite alternate;
}

/* Admin Styles */
.admin-nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
}

.nav-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.nav-btn.active {
    background: var(--primary);
    color: white;
}

.nav-btn:hover:not(.active) {
    background: rgba(0, 0, 0, 0.1);
}

.table-responsive {
    overflow-x: auto;
    margin-top: 1rem;
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

th {
    background: #F9FAFB;
    text-align: left;
    padding: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid #F3F4F6;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #F3F4F6;
    color: var(--text-primary);
}

tr:last-child td {
    border-bottom: none;
}

.action-btn {
    padding: 0.4rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    margin-right: 0.3rem;
    transition: opacity 0.2s;
}

.btn-edit { background: #EEF2FF; color: #4F46E5; }
.btn-delete { background: #FEF2F2; color: #DC2626; }

.admin-section header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.admin-section header h1 {
    font-size: 1.4rem;
    margin: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.section-header h2 {
    font-size: 1.2rem;
    color: var(--primary);
    margin: 0;
}


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

.modal-content {
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

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

.input-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

select {
    padding: 1rem;
    border-radius: 12px;
    border: 2px solid rgba(0,0,0,0.1);
    font-size: 0.95rem;
    background: white;
}

@media (max-width: 600px) {
    .input-grid {
        grid-template-columns: 1fr;
    }
}


