/* =========================================
   RESET
========================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f1e8;
    min-height: 100vh;
}


/* =========================================
   ADMIN LOGIN
========================================= */

body:not(:has(.admin-layout)) {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-box {
    width: 400px;
    max-width: 100%;
    background: #ffffff;
    padding: 45px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10);
}

.login-box h1 {
    color: #24513d;
    font-size: 30px;
    letter-spacing: 2px;
    line-height: 1.2;
    margin-bottom: 8px;
}

.login-box h2 {
    color: #777;
    font-size: 17px;
    letter-spacing: 2px;
    margin-bottom: 30px;
}

.login-box input {
    width: 100%;
    padding: 14px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
}

.login-box input:focus {
    border-color: #24513d;
}

.login-box button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: #24513d;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.login-box button:hover {
    background: #1b3f2f;
}

.login-box p {
    margin-top: 15px;
    color: #c0392b;
}


/* =========================================
   ADMIN DASHBOARD
========================================= */

.admin-layout {
    width: 100%;
    min-height: 100vh;
    display: flex;
    background: #f4f1e8;
}


/* =========================================
   SIDEBAR
========================================= */

.sidebar {
    width: 260px;
    min-width: 260px;
    min-height: 100vh;
    background: #24513d;
    color: white;
    padding: 35px 24px;
}

.sidebar h2 {
    text-align: center;
    color: white;
    font-size: 28px;
    letter-spacing: 2px;
    line-height: 1.3;
    margin-bottom: 45px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar nav a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 16px;
    transition: 0.2s;
}

.sidebar nav a:hover {
    background: rgba(255, 255, 255, 0.12);
}

.sidebar nav a.active {
    background: rgba(255, 255, 255, 0.18);
    font-weight: bold;
}


/* =========================================
   MAIN CONTENT
========================================= */

.admin-main {
    flex: 1;
    min-width: 0;
    padding: 45px 55px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
}

.topbar h1 {
    color: #24513d;
    font-size: 42px;
    margin: 0;
}

.topbar span {
    color: #555;
    font-weight: bold;
    font-size: 16px;
}


/* =========================================
   STAT CARDS
========================================= */

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    width: 100%;
}

.stat-card {
    background: #ffffff;
    padding: 25px;
    border-radius: 17px;
    min-height: 145px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.stat-card small {
    display: block;
    color: #777;
    font-size: 13px;
    margin-bottom: 10px;
}

.stat-card h2 {
    color: #24513d;
    font-size: 32px;
    margin-bottom: 12px;
}

.stat-card p {
    color: #777;
    font-size: 13px;
}


/* =========================================
   RECENT BOOKINGS
========================================= */

.dashboard-section {
    margin-top: 35px;
    background: #ffffff;
    padding: 32px;
    border-radius: 17px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.dashboard-section h2 {
    color: #24513d;
    font-size: 28px;
    margin-bottom: 22px;
}

.empty-dashboard {
    padding: 45px;
    text-align: center;
    background: #f7f6f1;
    border-radius: 12px;
    color: #777;
    font-size: 16px;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1000px) {

    .sidebar {
        width: 220px;
        min-width: 220px;
    }

    .admin-main {
        padding: 35px;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media (max-width: 650px) {

    .admin-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: 100%;
        min-height: auto;
        padding: 25px 20px;
    }

    .sidebar h2 {
        margin-bottom: 25px;
    }

    .admin-main {
        padding: 25px 20px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .stats {
        grid-template-columns: 1fr;
    }
}

/* =========================
   BOOKINGS TABLE
========================= */

.booking-table {
    width: 100%;
    overflow-x: auto;
}

.booking-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.booking-table th {
    background: #24513d;
    color: white;
    padding: 14px 16px;
    text-align: left;
    font-size: 14px;
}

.booking-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    color: #444;
    font-size: 14px;
    white-space: nowrap;
}

.booking-table tr:hover {
    background: #f7f6f1;
}

.booking-table th:first-child {
    border-radius: 8px 0 0 8px;
}

.booking-table th:last-child {
    border-radius: 0 8px 8px 0;
}

.no-bookings {
    text-align: center;
    padding: 35px !important;
    color: #777 !important;
}

/* =========================
   EDIT PACKAGE FORM
========================= */

.dashboard-section form {
    max-width: 700px;
}

.dashboard-section form label {
    display: block;
    margin-top: 20px;
    margin-bottom: 8px;
    font-weight: bold;
    color: #24513d;
}

.dashboard-section form input,
.dashboard-section form textarea {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    font-family: Arial, sans-serif;
}

.dashboard-section form textarea {
    resize: vertical;
}

.dashboard-section form button {
    margin-top: 25px;
    padding: 13px 25px;
    border: none;
    border-radius: 10px;
    background: #24513d;
    color: white;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

.dashboard-section form button:hover {
    background: #1b3f2f;
}

/* BOOKINGS TABLE */

.table-container {
    width: 100%;
    overflow-x: auto;
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.table-container th {
    background: #24513d;
    color: white;
    padding: 15px;
    text-align: left;
    white-space: nowrap;
}

.table-container td {
    padding: 15px;
    border-bottom: 1px solid #e5e5e5;
    white-space: nowrap;
}

.table-container tr:hover {
    background: #f7f6f1;
}

.payment-status {
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
}

.payment-status.pending {
    background: #fff3cd;
    color: #856404;
}

.payment-status.paid {
    background: #d4edda;
    color: #155724;
}

.payment-status.failed {
    background: #f8d7da;
    color: #721c24;
}

/* =========================================
   MOBILE RESPONSIVE - ADMIN PANEL
========================================= */

@media (max-width: 650px) {

    /* BODY */
    body {
        display: block;
        overflow-x: hidden;
    }

    /* ADMIN LAYOUT */
    .admin-layout {
        display: flex;
        flex-direction: column;
        width: 100%;
        min-height: 100vh;
    }

    /* SIDEBAR */
    .sidebar {
        width: 100%;
        min-height: auto;
        padding: 18px 15px;
    }

    .sidebar h2 {
        font-size: 20px;
        margin-bottom: 15px;
        letter-spacing: 1.5px;
    }

    .sidebar nav {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 7px;
    }

    .sidebar nav a {
        padding: 10px 8px;
        font-size: 12px;
        text-align: center;
        border-radius: 8px;
    }

    /* MAIN CONTENT */
    .admin-main {
        width: 100%;
        max-width: none;
        padding: 22px 15px;
        margin: 0;
    }

    /* TOP BAR */
    .topbar {
        margin-bottom: 22px;
        gap: 10px;
        align-items: center;
    }

    .topbar h1 {
        font-size: 27px;
    }

    .topbar span {
        font-size: 12px;
        white-space: nowrap;
    }

    /* DASHBOARD STAT CARDS */
    .stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-card {
        min-height: 110px;
        padding: 17px 14px;
        border-radius: 13px;
    }

    .stat-card small {
        font-size: 11px;
    }

    .stat-card h2 {
        font-size: 24px;
        margin: 8px 0;
    }

    .stat-card p {
        font-size: 11px;
    }

    /* SECTION */
    .dashboard-section {
        margin-top: 22px;
        padding: 18px 14px;
        border-radius: 13px;
        overflow: hidden;
    }

    .dashboard-section h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    /* TABLE CONTAINER */
    .table-container,
    .booking-table {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 10px;
    }

    /* TABLE */
    table {
        width: 100%;
        min-width: 750px;
        border-collapse: collapse;
    }

    table th,
    table td {
        padding: 10px 9px;
        font-size: 12px;
        white-space: nowrap;
    }

    table th {
        font-size: 11px;
    }

    /* ACTION BUTTONS */
    table button,
    table a {
        font-size: 11px;
    }

    /* STATUS DROPDOWN */
    table select {
        font-size: 11px;
        padding: 6px 8px;
        max-width: 120px;
    }

    /* PAYMENT STATUS */
    .payment-status {
        font-size: 11px;
        padding: 5px 9px;
    }

    /* EMPTY DASHBOARD */
    .empty-dashboard {
        padding: 25px 15px;
        font-size: 13px;
    }

}


/* =========================================
   SMALL PHONE
========================================= */

@media (max-width: 400px) {

    .sidebar {
        padding: 15px 10px;
    }

    .sidebar h2 {
        font-size: 18px;
    }

    .sidebar nav {
        gap: 5px;
    }

    .sidebar nav a {
        padding: 9px 5px;
        font-size: 11px;
    }

    .admin-main {
        padding: 18px 10px;
    }

    .topbar h1 {
        font-size: 24px;
    }

    .topbar span {
        font-size: 11px;
    }

    .stats {
        gap: 9px;
    }

    .stat-card {
        padding: 14px 11px;
        min-height: 100px;
    }

    .stat-card h2 {
        font-size: 21px;
    }

    .dashboard-section {
        padding: 15px 10px;
    }

}

/* =========================================
   BETTER MOBILE ADMIN BOOKINGS
========================================= */

@media (max-width: 650px) {

    /* Main area */
    .admin-main {
        padding: 20px 12px;
        width: 100%;
    }

    /* Page title */
    .topbar {
        margin-bottom: 18px;
    }

    .topbar h1 {
        font-size: 28px;
    }

    /* Content card */
    .dashboard-section {
        padding: 18px 12px;
        margin-top: 15px;
        border-radius: 14px;
    }

    .dashboard-section h2 {
        font-size: 19px;
        margin-bottom: 16px;
    }

    /* Booking table */
    .table-container {
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        border-radius: 10px;
    }

    .table-container table {
        min-width: 1050px;
        width: 1050px;
        table-layout: auto;
    }

    .table-container th {
        padding: 12px 14px;
        font-size: 12px;
        white-space: nowrap;
    }

    .table-container td {
        padding: 13px 14px;
        font-size: 13px;
        white-space: nowrap;
    }

    /* Make important columns easier to read */
    .table-container th:nth-child(2),
    .table-container td:nth-child(2) {
        min-width: 120px;
    }

    .table-container th:nth-child(3),
    .table-container td:nth-child(3) {
        min-width: 120px;
    }

    .table-container th:nth-child(4),
    .table-container td:nth-child(4) {
        min-width: 190px;
    }

    .table-container th:nth-child(5),
    .table-container td:nth-child(5) {
        min-width: 150px;
    }

    /* Dropdowns */
    .table-container select {
        font-size: 12px;
        padding: 7px 10px;
    }

    /* Delete/action */
    .table-container button {
        padding: 7px 10px;
        font-size: 12px;
    }
}