/* ===== DESIGN SYSTEM ===== */
:root {
    /* Color Palette - Vibrant & Premium */
    --primary-hue: 25;
    --primary-sat: 95%;
    --primary-light: 55%;

    --primary-color: hsl(var(--primary-hue), var(--primary-sat), var(--primary-light));
    --primary-dark: hsl(var(--primary-hue), var(--primary-sat), 45%);
    --primary-light-bg: hsl(var(--primary-hue), var(--primary-sat), 95%);

    --secondary-color: hsl(340, 82%, 52%);
    --accent-color: hsl(160, 70%, 50%);

    --bg-dark: hsl(230, 25%, 8%);
    --bg-darker: hsl(230, 25%, 5%);
    --surface: hsl(230, 20%, 12%);
    --surface-light: hsl(230, 15%, 18%);

    --text-primary: hsl(0, 0%, 98%);
    --text-secondary: hsl(0, 0%, 75%);
    --text-muted: hsl(0, 0%, 55%);

    --success: hsl(142, 71%, 45%);
    --warning: hsl(38, 92%, 50%);
    --danger: hsl(0, 72%, 51%);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --gradient-surface: linear-gradient(135deg, var(--surface) 0%, var(--surface-light) 100%);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(255, 100, 50, 0.3);

    /* Typography */
    --font-primary: 'Poppins', sans-serif;
    --font-logo: 'Pacifico', cursive;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 100, 50, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(234, 32, 109, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(72, 187, 120, 0.05) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundShift 20s ease infinite;
}

@keyframes backgroundShift {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* ===== UTILITY CLASSES ===== */
.glass-effect {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 100, 50, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 100, 50, 0.6);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: var(--surface-light);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    width: 100%;
}

/* ===== LOGIN SCREEN ===== */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--spacing-md);
}

.login-card {
    width: 100%;
    max-width: 450px;
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-section {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.brand-logo {
    font-family: var(--font-logo);
    font-size: 3.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-xs);
    letter-spacing: 2px;
}

.brand-tagline {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.login-tabs {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    background: var(--surface);
    padding: 0.5rem;
    border-radius: var(--radius-md);
}

.tab-btn {
    flex: 1;
    padding: 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-primary);
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: var(--gradient-primary);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.tab-content h2 {
    margin-bottom: var(--spacing-xs);
    font-size: 1.8rem;
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.875rem;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 100, 50, 0.1);
}

.hint {
    margin-top: var(--spacing-md);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== CUSTOMER SCREEN ===== */
.customer-header {
    background: var(--gradient-surface);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.customer-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.customer-header .brand-logo {
    font-size: 2rem;
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.cart-btn {
    position: relative;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-btn:hover {
    background: var(--surface-light);
    transform: scale(1.05);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--gradient-primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.customer-main {
    padding: var(--spacing-xl) 0;
}

.hero-section {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.hero-section h2 {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.hero-section p {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.menu-item {
    background: var(--gradient-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    cursor: pointer;
}

.menu-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--primary-color);
}

.menu-item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.menu-item-content {
    padding: var(--spacing-md);
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: var(--spacing-sm);
}

.menu-item-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
}

.menu-item-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.menu-item-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    font-size: 0.95rem;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    font-size: 1.8rem;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: var(--surface);
    transform: rotate(90deg);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-md);
}

.empty-cart {
    text-align: center;
    color: var(--text-secondary);
    padding: var(--spacing-xl);
}

.cart-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--surface);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 600;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xs);
}

.quantity-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    transform: scale(1.1);
}

.modal-footer {
    padding: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    font-size: 1.3rem;
    font-weight: 600;
}

.total-amount {
    color: var(--primary-color);
    font-size: 1.8rem;
}

/* ===== ADMIN SCREEN ===== */
#admin-screen {
    display: none;
}

#admin-screen.active {
    display: flex;
}

.admin-sidebar {
    width: 260px;
    background: var(--gradient-surface);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
}

.sidebar-header {
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.sidebar-header .brand-logo {
    font-size: 2rem;
    margin-bottom: var(--spacing-xs);
}

.sidebar-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.sidebar-menu {
    list-style: none;
    flex: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-item:hover {
    background: var(--surface);
    color: var(--text-primary);
}

.menu-item.active {
    background: var(--gradient-primary);
    color: white;
}

.logout-btn {
    width: 100%;
}

.admin-main {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-dark);
}

.admin-content {
    padding: var(--spacing-xl);
}

/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.stat-card {
    background: var(--gradient-surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: var(--spacing-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Tables */
.data-table {
    width: 100%;
    background: var(--gradient-surface);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin-bottom: var(--spacing-lg);
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--surface);
}

.data-table th {
    padding: var(--spacing-md);
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table tbody tr {
    transition: all 0.3s ease;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.status-pending {
    background: rgba(251, 191, 36, 0.2);
    color: var(--warning);
}

.status-completed {
    background: rgba(72, 187, 120, 0.2);
    color: var(--success);
}

.status-cancelled {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* Forms in Admin */
.admin-form {
    background: var(--gradient-surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

/* Section Headers */
.section-header {
    margin-bottom: var(--spacing-lg);
}

.section-header h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-xs);
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 80px;
        padding: var(--spacing-sm);
    }

    .sidebar-header p,
    .menu-item span {
        display: none;
    }

    .brand-logo {
        font-size: 1.5rem !important;
    }

    .menu-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .hero-section h2 {
        font-size: 2rem;
    }
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 0.6s linear infinite;
}

/* ===== NUEVOS ESTILOS PARA MEMBRESÍA ===== */
.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
}

.btn-icon:hover {
    color: var(--primary-color);
    background: rgba(255, 100, 50, 0.1);
    transform: scale(1.1);
}

.notice-info {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin: 1rem 0;
}