/* ==========================================================================
   Pinggan x Kunyek - Booking System Styles
   Updated with share buttons, capacity warning, status dropdowns
   ========================================================================== */

/* CSS Variables */
:root {
    --brown-dark: #3D2510;
    --brown: #5D3A1A;
    --brown-light: #7D5A3A;
    --gold: #D4A84B;
    --gold-light: #E8C878;
    --gold-pale: #FDF6E8;
    --cream: #FFFBF5;
    --white: #FFFFFF;
    --gray: #6B7280;
    --gray-light: #9CA3AF;
    --green: #38A169;
    --green-light: #48BB78;
    --red: #E53E3E;
    --blue: #3182CE;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-gold: 0 4px 15px rgba(212, 168, 75, 0.35);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(180deg, var(--gold-pale) 0%, var(--cream) 100%);
    min-height: 100vh;
    color: var(--brown-dark);
    line-height: 1.6;
}

/* Page Wrapper */
.page-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

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

.logo {
    max-width: 280px;
    width: 100%;
    height: auto;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--brown) 0%, var(--brown-dark) 100%);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    text-align: center;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(212, 168, 75, 0.15) 0%, transparent 70%);
}

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

.badge {
    display: inline-block;
    background: rgba(212, 168, 75, 0.2);
    color: var(--gold);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 28px;
    color: var(--gold);
    margin-bottom: 8px;
}

.location {
    color: var(--gold-light);
    font-size: 14px;
}

.location small {
    opacity: 0.8;
}

/* Buffet Dates */
.buffet-dates {
    color: var(--gold-light);
    font-size: 15px;
    font-weight: 600;
    margin-top: 12px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: inline-block;
}

/* Hero Actions - Stacked Layout */
.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

/* Early Bird Box */
.early-bird {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    padding: 16px 28px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-gold);
}

.early-bird-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--brown);
    text-transform: uppercase;
}

.early-bird-price {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--brown-dark);
    line-height: 1.2;
}

.early-bird-until {
    font-size: 11px;
    color: var(--brown);
}

/* Menu Button in Hero */
.btn-menu-hero {
    display: inline-block;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.15);
    color: var(--gold-light);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(212, 168, 75, 0.3);
}

.btn-menu-hero:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Pricing Section */
.pricing {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.pricing h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 20px;
    color: var(--brown);
    text-align: center;
    margin-bottom: 16px;
}

.price-table {
    display: grid;
    gap: 10px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--gold-pale);
    border-radius: var(--radius-sm);
}

.price-row .category {
    font-size: 14px;
    color: var(--brown);
}

.price-row .price {
    font-weight: 700;
    color: var(--brown-dark);
}

.price-row.free {
    background: #E8F5E9;
}

.price-row.free .price {
    color: var(--green);
}

/* Booking Section */
.booking-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.booking-section h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 20px;
    color: var(--brown);
    text-align: center;
    margin-bottom: 20px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--brown);
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group select {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    border: 2px solid #E5E7EB;
    border-radius: var(--radius-sm);
    transition: border-color 0.3s ease;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--gold);
}

.form-group .required {
    color: var(--red);
}

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

/* Early Bird Notice */
.early-bird-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #E8F4FD;
    border: 1px solid #90CDF4;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.early-bird-notice .notice-icon {
    font-size: 18px;
}

.early-bird-notice .notice-text {
    font-size: 13px;
    color: #2B6CB0;
    line-height: 1.5;
}

/* Date Warning Notice */
.date-warning-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #FEF3C7;
    border: 1px solid #F59E0B;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.date-warning-notice .notice-icon {
    font-size: 18px;
}

.date-warning-notice .notice-text {
    font-size: 13px;
    color: #92400E;
    line-height: 1.5;
}

/* Capacity Warning */
.capacity-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #FEF3C7;
    border: 1px solid #F59E0B;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.capacity-warning .warning-icon {
    font-size: 18px;
}

.capacity-warning .warning-text {
    font-size: 13px;
    color: #92400E;
    line-height: 1.5;
}

.capacity-warning a {
    color: #92400E;
    font-weight: 600;
}

/* Guest Inputs */
.guest-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.guest-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--gold-pale);
    border-radius: var(--radius-sm);
}

.guest-row.free-row {
    background: #E8F5E9;
}

.guest-label {
    font-size: 13px;
    color: var(--brown);
    flex: 1;
}

.guest-price {
    font-size: 13px;
    font-weight: 600;
    color: var(--brown-dark);
    margin-right: 12px;
    min-width: 70px;
    text-align: right;
}

.guest-price.free {
    color: var(--green);
}

.guest-counter {
    display: flex;
    align-items: center;
    gap: 4px;
}

.guest-counter button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--white);
    color: var(--brown);
}

.guest-counter button:hover {
    background: var(--gold);
    color: var(--brown-dark);
}

.guest-counter input {
    width: 40px;
    height: 32px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    border: none;
    background: var(--white);
    border-radius: 6px;
}

/* Booking Summary */
.booking-summary {
    background: var(--gold-pale);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 24px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: var(--brown);
}

.summary-row.total {
    border-top: 2px solid var(--gold);
    margin-top: 8px;
    padding-top: 12px;
    font-weight: 700;
    font-size: 16px;
    color: var(--brown-dark);
}

.summary-row.deposit {
    font-size: 12px;
    color: var(--gray);
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    color: var(--brown-dark);
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-gold);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(212, 168, 75, 0.5);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Share Section */
.share-section {
    text-align: center;
    margin: 30px 0 20px;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.share-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--brown);
    margin-bottom: 14px;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
}

.share-btn.whatsapp {
    background: #25D366;
    color: white;
}

.share-btn.facebook {
    background: #1877F2;
    color: white;
}

.share-btn.twitter {
    background: #000;
    color: white;
}

.share-btn.copy {
    background: var(--gold);
    color: var(--brown-dark);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Footer */
.footer {
    text-align: center;
    padding: 24px 0 10px;
    color: var(--brown-light);
    font-size: 13px;
}

.footer .copyright {
    margin-top: 8px;
    font-size: 11px;
    color: var(--gray);
}

.footer .developer {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 400;
    color: var(--brown-dark);
}

.footer .developer a {
    color: var(--brown-dark);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ==========================================================================
   Admin Styles
   ========================================================================== */

.admin-page {
    background: #F3F4F6;
}

.admin-page .page-wrapper {
    max-width: 1200px;
    padding: 0;
}

/* Admin Header */
.admin-header {
    background: linear-gradient(135deg, var(--brown) 0%, var(--brown-dark) 100%);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header .logo {
    max-width: 180px;
    background: var(--white);
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gold-light);
    font-size: 14px;
}

.admin-user img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.btn-logout {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--gold-light);
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Admin Navigation */
.admin-nav {
    background: var(--white);
    padding: 0 24px;
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #E5E7EB;
}

.admin-nav a {
    padding: 16px 20px;
    color: var(--gray);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.admin-nav a:hover {
    color: var(--brown);
}

.admin-nav a.active {
    color: var(--brown);
    border-bottom-color: var(--gold);
}

/* Admin Content */
.admin-content {
    padding: 24px;
}

/* Stats Cards */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.stat-card h4 {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--brown-dark);
}

/* Admin Filters */
.admin-filters {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    box-shadow: var(--shadow-sm);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray);
}

.filter-group input,
.filter-group select {
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: var(--white);
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--gold);
}

.btn-filter {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: var(--brown-dark);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-filter:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.btn-export {
    padding: 10px 20px;
    background: var(--brown);
    color: var(--gold-light);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

/* Bookings Table */
.bookings-table {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.bookings-table table {
    width: 100%;
    border-collapse: collapse;
}

.bookings-table th {
    background: var(--gold-pale);
    padding: 14px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--brown);
    text-align: left;
    white-space: nowrap;
}

.bookings-table td {
    padding: 14px 12px;
    font-size: 13px;
    border-bottom: 1px solid #F3F4F6;
    vertical-align: middle;
}

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

.bookings-table tr:hover {
    background: #FAFAFA;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge.pending {
    background: #FEF3C7;
    color: #92400E;
}

.status-badge.paid {
    background: #D1FAE5;
    color: #065F46;
}

.status-badge.refunded {
    background: #DBEAFE;
    color: #1E40AF;
}

.status-badge.cancelled {
    background: #FEE2E2;
    color: #991B1B;
}

/* Delete Button */
.btn-delete {
    padding: 6px 10px;
    background: #FEE2E2;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    background: #FECACA;
    transform: scale(1.1);
}

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #E5E7EB;
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

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

/* Payment Section */
.payment-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
}

/* Responsive */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }
    
    .admin-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group input,
    .filter-group select {
        width: 100%;
    }
    
    .bookings-table {
        overflow-x: auto;
    }
    
    .bookings-table table {
        min-width: 800px;
    }
}

@media (max-width: 500px) {
    .page-wrapper {
        padding: 16px 12px 30px;
    }
    
    .hero {
        padding: 24px 16px;
    }
    
    .hero h1 {
        font-size: 24px;
    }
    
    .early-bird-price {
        font-size: 28px;
    }
    
    .guest-row {
        flex-wrap: wrap;
    }
    
    .guest-label {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        width: 100%;
        justify-content: center;
    }
}
