/* Base Styles */
:root {
    --primary-color: #008751; /* ScanMenu Primary Green */
    --primary-hover: #007043;
    --secondary-gold: #F2B134;
    --accent-orange: #F97316;
    --text-color: #111827; /* Headings */
    --text-muted: #6B7280; /* Body text */
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --error-color: #ef4444;
    --border-color: #E5E7EB;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.bg-light {
    background-color: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--secondary-gold);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #e0a32d;
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-color);
}

.btn-outline:hover {
    background-color: var(--bg-light);
}

.btn-full {
    width: 100%;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-link {
    color: var(--primary-color);
    background: none;
    border: none;
    padding: 0.75rem 1rem;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links .btn {
    margin-left: 1rem;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 8rem 0;
    text-align: center;
    overflow: hidden;
    background-color: #f8fafc;
}

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.15;
}

.hero-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    max-width: 800px;
    margin: 0 auto 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* How It Works Section */
.steps-section {
    padding: 6rem 0;
}

.steps-section h2 {
    text-align: center;
}

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

.step-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

.step-green::before { background-color: var(--primary-color); }
.step-orange::before { background-color: var(--accent-orange); }
.step-gold::before { background-color: var(--secondary-gold); }

.step-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: var(--bg-light);
    border-radius: 50%;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* Benefits Section */
.benefits-section {
    padding: 6rem 0;
    background-color: var(--bg-light);
}

.benefits-section h2 {
    text-align: center;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.benefit-card {
    padding: 1.5rem;
    background: white;
    border-radius: 0.75rem;
    display: flex;
    gap: 1rem;
}

.benefit-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background-color: rgba(0, 135, 81, 0.1);
    color: var(--primary-color);
}

/* See It In Action (Demo) */
.demo-section {
    padding: 6rem 0;
    text-align: center;
}

.demo-content {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

.qr-placeholder {
    width: 200px;
    height: 200px;
    margin: 2rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-light);
    border-radius: 1rem;
}

.qr-placeholder img {
    max-width: 100%;
    height: auto;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-light);
    padding: 2rem;
}

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

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    ring: 2px solid rgba(0, 135, 81, 0.2);
}

.form-group textarea {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1rem;
    resize: vertical;
}

.form-group select {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1rem;
    background-color: white;
}

.checkbox-group {
    margin-bottom: 1rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}

.checkbox-group input {
    margin-right: 0.5rem;
    width: auto;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.auth-switch {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.back-home {
    margin-top: 2rem;
    text-align: center;
}

.back-home a {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: none;
}

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

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.modal-header h3 {
    margin-bottom: 0;
}

.close-modal {
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-muted);
}

.close-modal:hover {
    color: var(--text-color);
}

/* Menu Items */
.menu-items-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.menu-item-card {
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    background: white;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.menu-item-card:hover {
    box-shadow: var(--card-shadow);
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.menu-item-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-color);
}

.menu-item-price {
    font-weight: 700;
    color: var(--primary-color);
}

.menu-item-category {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.menu-item-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.menu-item-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-weight: 600;
}

.badge-available {
    background-color: #dcfce7;
    color: #166534;
}

.badge-unavailable {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-featured {
    background-color: #fef9c3;
    color: #854d0e;
}

.menu-item-actions {
    display: flex;
    gap: 0.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

/* Dashboard */
.dashboard-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.dashboard-content {
    max-width: 600px;
    margin: 0 auto;
}

.welcome-card {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
}

.account-details {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--card-shadow);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--bg-light);
}

.detail-item:last-child {
    border-bottom: none;
}

.label {
    font-weight: 600;
    color: var(--text-muted);
}

.value {
    color: var(--text-color);
    word-break: break-all;
}

/* Utility */
.error-box {
    background-color: #fee2e2;
    color: var(--error-color);
    padding: 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.hidden {
    display: none !important;
}

.loader {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(0, 135, 81, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#password-hint {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Public Menu Styles */
.public-menu {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.restaurant-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--bg-light);
}

.restaurant-name {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.restaurant-info {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.whatsapp-link {
    display: inline-flex;
    align-items: center;
    margin-top: 1rem;
    color: #25d366;
    text-decoration: none;
    font-weight: 600;
    gap: 0.5rem;
}

.category-section {
    margin-bottom: 3rem;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.public-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--border-color);
}

.public-menu-item:last-child {
    border-bottom: none;
}

.item-main {
    flex: 1;
    padding-right: 1.5rem;
}

.item-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.item-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
}

.item-description {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.item-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-color);
    white-space: nowrap;
}

.item-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-popular {
    background-color: #fef9c3;
    color: #854d0e;
}

.unavailable-text {
    color: var(--error-color);
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
}

/* QR Code Section */
.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1.5rem;
}

.qr-preview-box {
    width: 320px;
    height: 320px;
    border: 2px dashed var(--border-color);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-light);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.qr-placeholder-text {
    color: var(--text-muted);
    text-align: center;
}

.qr-preview-box canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

.qr-details {
    width: 100%;
    margin-bottom: 1.5rem;
}

.qr-actions {
    width: 100%;
}

#qr-download-actions:not(.hidden) {
    display: flex;
}

/* Footer */
footer {
    background-color: #111827;
    color: #9CA3AF;
    padding: 5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand h4 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: #9CA3AF;
}

.footer-links h5 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #9CA3AF;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid #374151;
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.footer-bottom p {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .steps-grid, .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.75rem; }
    h2 { font-size: 2rem; }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .cta-group {
        flex-direction: column;
    }

    .btn-large {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .steps-grid, .benefits-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 6rem 0;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .restaurant-name {
        font-size: 2rem;
    }

    .public-menu-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .item-main {
        padding-right: 0;
    }
}

/* Utilities */
.text-primary { color: var(--primary-color); }
.text-gold { color: var(--secondary-gold); }
.text-orange { color: var(--accent-orange); }

/* Admin Dashboard Enhancements */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--card-shadow);
    text-align: center;
    border-top: 4px solid var(--primary-color);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.admin-section {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

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

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-family: inherit;
}

.table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

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

th {
    text-align: left;
    padding: 1rem;
    border-bottom: 2px solid var(--bg-light);
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--bg-light);
    vertical-align: middle;
}

tr:hover {
    background-color: var(--bg-light);
}

.tab-buttons {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 1rem 0.5rem;
    cursor: pointer;
    border: none;
    background: none;
    font-weight: 600;
    color: var(--text-muted);
    position: relative;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

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

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: auto;
    }
}

/* WhatsApp Ordering System Styles */
.btn-add-order {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.875rem;
    transition: var(--transition);
    margin-top: 0.5rem;
}

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

.cart-panel {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 800px;
    background: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 1rem 1rem 0 0;
    padding: 1.5rem;
    z-index: 1000;
    max-height: 80vh;
    overflow-y: auto;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.cart-header h3 {
    margin-bottom: 0;
    font-size: 1.25rem;
}

.cart-items {
    margin-bottom: 1.5rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--bg-light);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    display: block;
}

.cart-item-price {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.qty-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    transition: var(--transition);
}

.qty-btn:hover {
    background-color: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 800;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--bg-light);
}

.btn-whatsapp-order {
    background-color: #25d366;
    color: white;
    width: 100%;
    margin-top: 1.5rem;
    font-size: 1.125rem;
    padding: 1rem;
}

.btn-whatsapp-order:hover {
    background-color: #128c7e;
}

/* Adjust public menu item for the button */
.public-menu-item {
    align-items: center;
}

@media (max-width: 640px) {
    .cart-panel {
        max-width: 100%;
        border-radius: 0;
    }
}
