/* Root Variables */
:root {
    --primary: #6366f1; /* Indigo 500 */
    --secondary: #8b5cf6; /* Violet 500 */
    --accent: #ec4899; /* Pink 500 */
    --bg: #f8fafc; /* Slate 50 */
    --surface: #ffffff; /* White */
    --text: #1e293b; /* Slate 800 */
    --muted: #64748b; /* Slate 500 */
    --radius: 0.75rem; /* 12px */
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.15), 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.6;
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: var(--text);
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary);
}

button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: var(--muted);
    color: var(--surface);
}

.btn-secondary:hover {
    background-color: #475569; /* Slate 700 */
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="url"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1; /* Slate 300 */
    border-radius: var(--radius);
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    color: var(--text);
    background-color: var(--surface);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-color: var(--primary);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--text);
}

.error-message {
    color: #ef4444; /* Red 500 */
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none; /* Hidden by default */
}

.error-message.active {
    display: block;
}

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

.hidden {
    display: none !important;
}

/* Header */
.site-header {
    background-color: var(--surface);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.main-nav .nav-list {
    display: flex;
    list-style: none;
}

.main-nav .nav-link {
    padding: 0.5rem 1rem;
    font-weight: 700;
    color: var(--text);
}

.main-nav .nav-link.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 20px;
    padding: 0;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://picsum.photos/seed/hotel-lobby/1920/1080') no-repeat center center/cover;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--surface);
    padding: 2rem;
}

.hero-content h1 {
    color: var(--surface);
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 2rem;
}

/* Sections */
section {
    padding: 4rem 0;
}

.rooms-section,
.contact-section {
    background-color: var(--surface);
    margin-bottom: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.rooms-section h2,
.contact-section h2 {
    text-align: center;
    margin-bottom: 2.5rem;
}

/* Room Grid */
.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.room-card {
    background-color: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.room-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.room-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.room-card-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.room-card-content p {
    font-size: 0.95rem;
    color: var(--muted);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.room-card-content .price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.room-card-content .btn {
    width: 100%;
}

/* Contact Section */
.contact-info {
    text-align: center;
    font-size: 1.1rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
    background-color: var(--text);
    color: var(--muted);
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--surface);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    max-width: 700px;
    width: 90%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
}

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

.modal-room-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.modal-body h3 {
    margin-top: 0;
    color: var(--primary);
}

.modal-body p {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.price-display {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 1rem;
}

.total-price-display {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.availability-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius);
    font-weight: 700;
}

.availability-message.available {
    background-color: #dcfce7; /* Green 100 */
    color: #16a34a; /* Green 600 */
}

.availability-message.unavailable {
    background-color: #fee2e2; /* Red 100 */
    color: #dc2626; /* Red 600 */
}

#book-now-button:disabled {
    background-color: var(--muted);
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}

/* Payment Success Page */
.payment-status-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    text-align: center;
}

.payment-success-section {
    background-color: var(--surface);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 600px;
    width: 100%;
}

.success-title {
    color: #16a34a; /* Green 600 */
    margin-bottom: 1rem;
}

.success-message {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 1.5rem;
}

#booking-reference {
    color: var(--primary);
}

/* Admin Panel Styles */
.admin-body {
    background-color: #0f172a; /* Slate 900 */
    color: var(--surface);
    display: flex;
    flex-direction: column;
}

.admin-login-card {
    background-color: #1e293b; /* Slate 800 */
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    max-width: 400px;
    margin: 10vh auto;
    text-align: center;
}

.admin-login-card h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.admin-login-card .form-group label {
    color: var(--surface);
}

.admin-login-card input {
    background-color: #334155; /* Slate 700 */
    border-color: #475569; /* Slate 600 */
    color: var(--surface);
}

.admin-login-card input:focus-visible {
    outline-color: var(--primary);
}

.admin-login-card .btn-primary {
    width: 100%;
    margin-top: 1.5rem;
}

.admin-dashboard {
    display: grid;
    grid-template-columns: 250px 1fr;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
}

.admin-header {
    grid-column: 1 / -1;
    background-color: #1e293b; /* Slate 800 */
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.admin-logo {
    color: var(--primary);
    font-size: 1.8rem;
    margin: 0;
}

.admin-sidebar {
    grid-row: 2 / 3;
    background-color: #1e293b; /* Slate 800 */
    padding: 2rem 0;
    border-right: 1px solid #334155; /* Slate 700 */
}

.admin-sidebar ul {
    list-style: none;
}

.admin-sidebar li a {
    display: block;
    padding: 1rem 2rem;
    color: var(--muted);
    font-weight: 700;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.admin-sidebar li a:hover {
    background-color: #334155; /* Slate 700 */
    color: var(--surface);
}

.admin-sidebar li a.active {
    background-color: var(--primary);
    color: var(--surface);
}

.admin-main-content {
    grid-row: 2 / 3;
    padding: 2rem;
    background-color: #0f172a; /* Slate 900 */
}

.admin-section h2 {
    color: var(--surface);
    margin-bottom: 2rem;
}

.admin-card {
    background-color: #1e293b; /* Slate 800 */
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.admin-card h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.admin-card .form-group label {
    color: var(--surface);
}

.admin-card input, .admin-card textarea {
    background-color: #334155; /* Slate 700 */
    border-color: #475569; /* Slate 600 */
    color: var(--surface);
}

.admin-card input:focus-visible, .admin-card textarea:focus-visible {
    outline-color: var(--primary);
}

.admin-card .btn-primary {
    margin-top: 1.5rem;
}

.data-table-container {
    overflow-x: auto;
}

.admin-data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

.admin-data-table th,
.admin-data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #334155; /* Slate 700 */
    color: var(--surface);
}

.admin-data-table th {
    background-color: #334155; /* Slate 700 */
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.admin-data-table tbody tr:hover {
    background-color: #334155; /* Slate 700 */
}

.status-badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: capitalize;
}

.status-badge.pending {
    background-color: #fcd34d; /* Amber 300 */
    color: #b45309; /* Amber 800 */
}

.status-badge.paid,
.status-badge.confirmed {
    background-color: #a7f3d0; /* Green 200 */
    color: #065f46; /* Green 800 */
}

.status-badge.cancelled,
.status-badge.failed {
    background-color: #fecaca; /* Red 200 */
    color: #991b1b; /* Red 800 */
}

.status-badge.completed {
    background-color: #bfdbfe; /* Blue 200 */
    color: #1e40af; /* Blue 800 */
}

.admin-actions button {
    margin-right: 0.5rem;
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 0.5rem;
}

.admin-actions .btn-edit {
    background-color: #3b82f6; /* Blue 500 */
    color: var(--surface);
}

.admin-actions .btn-delete {
    background-color: #ef4444; /* Red 500 */
    color: var(--surface);
}

.admin-actions .btn-confirm {
    background-color: #22c55e; /* Green 500 */
    color: var(--surface);
}

.admin-actions .btn-cancel {
    background-color: #f97316; /* Orange 500 */
    color: var(--surface);
}

.last-updated {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 1rem;
    text-align: right;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }

    .main-nav {
        order: 3;
        width: 100%;
        margin-top: 1rem;
        display: none; /* Hidden by default for mobile */
    }

    .main-nav.active {
        display: block;
    }

    .main-nav .nav-list {
        flex-direction: column;
        align-items: center;
    }

    .main-nav .nav-link {
        padding: 0.75rem 1rem;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #eee;
    }

    .hamburger-menu {
        display: flex;
    }

    .hero {
        min-height: 60vh;
    }

    .room-grid {
        grid-template-columns: 1fr;
    }

    .admin-dashboard {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr;
    }

    .admin-sidebar {
        grid-row: 2 / 3;
        display: flex;
        justify-content: center;
        border-right: none;
        border-bottom: 1px solid #334155;
    }

    .admin-sidebar ul {
        display: flex;
        width: 100%;
        justify-content: space-around;
    }

    .admin-sidebar li {
        flex: 1;
        text-align: center;
    }

    .admin-sidebar li a {
        padding: 0.75rem 1rem;
    }

    .admin-main-content {
        grid-row: 3 / 4;
        padding: 1rem;
    }

    .admin-header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .admin-logo {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    .modal-content {
        padding: 1rem;
    }

    .admin-login-card {
        padding: 1.5rem;
        margin: 5vh auto;
    }

    .admin-data-table th, .admin-data-table td {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .admin-actions button {
        margin-right: 0.25rem;
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
}
