@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Lato:wght@300;400;700&display=swap');

:root {
    --primary-color: #D4AF37; /* Gold */
    --primary-hover: #b5952f;
    --bg-color: #f9f9f9;
    --text-color: #333;
    --accent-color: #2c3e50; /* Deep Navy */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.6);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Lato', sans-serif;
    background-color: #fdfbf7;
    background-image: radial-gradient(#e8e0c5 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.subtitle {
    text-align: center;
    color: #666;
    font-style: italic;
    margin-bottom: 2rem;
}

/* Glassmorphism Container */
.app-container {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 600px; /* Reduced width for elegance */
    padding: 40px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.step {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

input[type="text"],
input[type="number"],
input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: rgba(255,255,255,0.9);
}

input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

/* Buttons */
.btn-primary {
    display: block;
    width: 100%;
    background-color: var(--accent-color); /* Chic contrast */
    color: white;
    border: none;
    padding: 15px;
    font-size: 1.1rem;
    font-family: 'Playfair Display', serif; /* Consistent font on buttons */
    border-radius: 50px; /* Pill shape */
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    margin-top: 1rem;
}

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

.btn-secondary {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 10px;
    width: auto;
    display: inline-block;
}

/* Options Grid for Presence */
.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.option-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.option-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.option-card.selected {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.hidden {
    display: none !important;
}

/* Admin Specific */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

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

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    font-family: 'Playfair Display', serif;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    font-size: 0.9rem;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: var(--accent-color);
    color: white;
    font-weight: 500;
}

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

.admin-footer {
    margin-top: 20px;
    text-align: center;
}

.admin-dashboard-container {
    max-width: 1000px; /* Wider for admin */
}

/* Footer Link */
.footer-link {
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 0.8rem;
    color: #ccc;
    text-decoration: none;
}

.footer-link:hover {
    color: #aaa;
}
/* Modal */
.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;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Table Plan */
.plan-container {
    display: flex;
    gap: 20px;
    height: 600px;
}

.plan-sidebar {
    width: 250px;
    background: white;
    border-radius: 10px;
    padding: 15px;
    overflow-y: auto;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.unseated-list {
    flex-grow: 1;
}

.guest-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    font-size: 0.9rem;
}

.guest-item:hover {
    background: #f9f9f9;
}

.guest-item.selected {
    background: var(--primary-color);
    color: white;
}

.plan-main {
    flex-grow: 1;
    background: white;
    border-radius: 10px;
    border: 1px solid #eee;
    position: relative;
    overflow: hidden;
    /* For now, later panning maybe */
    display: flex;
    justify-content: center;
    align-items: center;
}

.table-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.oval-table {
    width: 400px;
    height: 200px;
    background: #e8e0c5;
    border: 10px solid #d4af37;
    border-radius: 50%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.table-label {
    font-family: 'Playfair Display', serif;
    font-weight: bold;
    color: #555;
    text-align: center;
}

.seat {
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid #ccc;
    border-radius: 50%;
    position: absolute;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0;
    /* Hide text inside if any */
    display: flex;
    justify-content: center;
    align-items: center;
}

.seat:hover {
    transform: scale(1.2);
    border-color: var(--primary-color);
    z-index: 10;
}

.seat.occupied {
    background-color: #e74c3c;
    border-color: #c0392b;
}

.seat.occupied:hover::after {
    content: attr(data-guest);
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 100;
}

.seat.selected {
    background-color: var(--primary-color);
    border-color: #b5952f;
}

@media (max-width: 768px) {
    .plan-container {
        flex-direction: column;
        height: auto;
    }

    .plan-sidebar {
        width: 100%;
        max-height: 200px;
    }

    .plan-main {
        height: 400px;
    }

    .oval-table {
        width: 250px;
        height: 120px;
    }
}/* Admin Panel Full Screen Overrides */
.admin-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #fdfbf7;
    z-index: 500;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.admin-panel.hidden {
    display: none;
}

.admin-header {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.admin-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--accent-color);
}

.admin-nav {
    display: flex;
    gap: 15px;
}

.nav-btn {
    background: transparent;
    border: none;
    color: #666;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 5px;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: #eee;
    color: var(--accent-color);
}

.nav-btn.logout {
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.nav-btn.logout:hover {
    background: #e74c3c;
    color: white;
}

.admin-content {
    flex-grow: 1;
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.table-wrapper {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

/* Fix Modal for Full Screen */
.modal {
    z-index: 2000;
    /* Higher than admin panel */
}

.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}/* Table Grid */
.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
    width: 100%;
}

.dinner-table {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.dinner-table:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.dinner-table.full {
    border-color: #e74c3c;
    background: #fff5f5;
}

.dinner-table h4 {
    margin: 0;
    font-family: 'Playfair Display', serif;
    color: #333;
}

.table-count {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

/* Visual Seats as dots */
.table-seats-viz {
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
    max-width: 120px;
    margin: 0 auto;
}

.seat-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1px solid #ccc;
    background: #fff;
}

.seat-dot.filled {
    background: var(--primary-color);
    border-color: #b5952f;
}

.dinner-table.full .seat-dot.filled {
    background: #e74c3c;
    border-color: #c0392b;
}

/* Tooltip inside table */
.table-tooltip {
    margin-top: 10px;
    font-size: 0.75rem;
    color: #555;
    text-align: left;
    border-top: 1px dashed #eee;
    padding-top: 5px;
}