/* ================= RESET ================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f7fb;
    color: #1f2937;
}


/* ================= NAVBAR ================= */

.navbar {
    width: 100%;
    padding: 18px 6%;
    background: white;

    display: flex;
    align-items: center;
    justify-content: space-between;

    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);

    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 22px;
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: #374151;
    font-weight: 600;
    transition: 0.2s;
}

.nav-links a:hover {
    color: #2563eb;
}


/* ================= PAGE HEADER ================= */

.page-header {
    text-align: center;
    padding: 55px 20px 35px;
    background: linear-gradient(
        135deg,
        #2563eb,
        #7c3aed
    );

    color: white;
}

.page-header h1 {
    font-size: 38px;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 17px;
    opacity: 0.9;
}


/* ================= CONTAINER ================= */

.container {
    width: 90%;
    max-width: 1200px;
    margin: 40px auto;
}


/* ================= SECTIONS ================= */

.trips-section,
.requests-section {
    background: white;
    padding: 25px;
    border-radius: 18px;
    margin-bottom: 30px;

    box-shadow:
        0 5px 25px rgba(0, 0, 0, 0.07);
}


/* ================= SECTION HEADER ================= */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 24px;
}


/* ================= CREATE BUTTON ================= */

.create-btn {
    text-decoration: none;

    background: #2563eb;
    color: white;

    padding: 11px 18px;
    border-radius: 10px;

    font-weight: 600;

    transition: 0.2s;
}

.create-btn:hover {
    background: #1d4ed8;
}


/* ================= TRIPS ================= */

.trips-container {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(280px, 1fr));

    gap: 22px;
}

.trip-card {
    border: 1px solid #e5e7eb;
    border-radius: 16px;

    overflow: hidden;

    background: white;

    transition: 0.25s;
}

.trip-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.1);
}

.trip-image {
    width: 100%;
    height: 180px;

    object-fit: cover;
}

.trip-content {
    padding: 20px;
}

.trip-content h3 {
    margin-bottom: 12px;
    font-size: 21px;
}

.trip-info {
    display: grid;
    gap: 8px;

    color: #4b5563;

    margin-bottom: 15px;
}


/* ================= REQUESTS ================= */

.requests-container {
    display: grid;
    gap: 15px;
}

.request-card {
    border: 1px solid #e5e7eb;

    padding: 20px;

    border-radius: 14px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.request-info h3 {
    margin-bottom: 7px;
}

.request-info p {
    color: #6b7280;
    margin: 4px 0;
}


/* ================= ACTIONS ================= */

.request-actions {
    display: flex;
    gap: 10px;
}

.accept-btn,
.reject-btn {
    border: none;

    padding: 10px 16px;

    border-radius: 9px;

    cursor: pointer;

    font-weight: 600;
}

.accept-btn {
    background: #16a34a;
    color: white;
}

.reject-btn {
    background: #dc2626;
    color: white;
}

.accept-btn:hover {
    background: #15803d;
}

.reject-btn:hover {
    background: #b91c1c;
}


/* ================= COUNT ================= */

.request-count {
    min-width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #2563eb;
    color: white;

    font-weight: 700;
}


/* ================= LOADING ================= */

.loading {
    text-align: center;

    padding: 35px;

    color: #6b7280;
}


/* ================= EMPTY STATE ================= */

.empty-state {
    text-align: center;

    padding: 45px 20px;

    color: #6b7280;
}

.empty-state .empty-icon {
    font-size: 45px;
    margin-bottom: 12px;
}

.empty-state h3 {
    color: #374151;
    margin-bottom: 8px;
}


/* ================= MOBILE ================= */

@media (max-width: 768px) {

    .navbar {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 14px;
    }

    .page-header h1 {
        font-size: 30px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .request-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .request-actions {
        width: 100%;
    }

    .accept-btn,
    .reject-btn {
        flex: 1;
    }

}
/* ================= TRIP MEMBERS MODAL ================= */

.members-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.members-modal.show {
    display: flex;
}

.members-modal-content {
    width: 100%;
    max-width: 550px;
    max-height: 80vh;
    overflow-y: auto;
    background: white;
    border-radius: 20px;
    padding: 28px;
    position: relative;
}

.members-modal-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

.close-members {
    position: absolute;
    right: 18px;
    top: 15px;
    border: none;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
}

.member-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 14px;
}

.member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.member-info {
    flex: 1;
}

.member-info h3 {
    margin: 0 0 4px;
}

.member-info p {
    margin: 0 0 5px;
    color: #666;
    font-size: 14px;
}

.member-info span {
    font-size: 12px;
    color: #555;
}

.member-card button {
    border: none;
    border-radius: 10px;
    padding: 9px 13px;
    cursor: pointer;
}