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

:root {
    --primary: #2c3e50;
    --primary-light: #3498db;
    --primary-dark: #1a252f;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --gray: #95a5a6;
    --light-gray: #ecf0f1;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --radius: 12px;
    --spacing: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f6fa;
    color: var(--primary);
    line-height: 1.6;
    padding-bottom: env(safe-area-inset-bottom);
}

/* App Layout */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--white);
    display: flex;
    flex-direction: column;
    position: relative;
}

.app-header {
    background: var(--primary);
    color: var(--white);
    padding: var(--spacing);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

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

.logo h1 {
    font-size: 1.2rem;
    font-weight: 600;
}

.btn-logout {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
}

.app-main {
    flex: 1;
    padding: var(--spacing);
    padding-bottom: 80px;
}

.app-footer {
    background: var(--light-gray);
    padding: var(--spacing);
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray);
}

/* Auth Styles */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: var(--spacing);
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow);
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 8px;
}

.auth-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 24px;
}

.auth-form .form-group {
    margin-bottom: 16px;
}

.auth-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
}

.form-text {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--gray);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.btn:active {
    transform: scale(0.97);
}

.btn-block {
    width: 100%;
}

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

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

.btn-secondary {
    background: var(--light-gray);
    color: var(--primary);
}

.btn-secondary:hover {
    background: #d5dbdb;
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-lg {
    padding: 14px 24px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.auth-info {
    margin-top: 24px;
    text-align: center;
    color: var(--gray);
    font-size: 0.9rem;
}

.info-text {
    font-size: 0.8rem;
    margin-top: 4px;
}

/* Home Styles */
.home-container {
    padding: 8px 0;
}

.welcome-section {
    text-align: center;
    margin-bottom: 32px;
}

.welcome-text {
    color: var(--gray);
    margin-top: 4px;
}

.action-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

.action-card {
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    transition: all 0.3s;
}

.action-card:active {
    transform: scale(0.97);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.action-card h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.action-card p {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 12px;
}

.current-order-section {
    background: var(--light-gray);
    border-radius: var(--radius);
    padding: 16px;
}

.current-order-section h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.order-status {
    min-height: 60px;
}

.empty-state {
    color: var(--gray);
    text-align: center;
    padding: 20px 0;
}

/* Menu Styles */
.menu-container {
    padding: 4px 0;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.menu-header h2 {
    font-size: 1.3rem;
}

.cart-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    background: var(--light-gray);
    padding: 6px 12px;
    border-radius: 20px;
}

.menu-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    padding: var(--spacing);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    max-width: 480px;
    margin: 0 auto;
}

.menu-categories {
    margin-bottom: 80px;
}

.loading {
    text-align: center;
    padding: 40px 0;
    color: var(--gray);
}

/* Responsive */
@media (max-width: 480px) {
    .action-cards {
        grid-template-columns: 1fr;
    }
    
    .auth-card {
        padding: 24px 16px;
    }
}

/* Utility */
.hidden {
    display: none !important;
}

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

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

.mb-16 {
    margin-bottom: 16px;
}