﻿/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Segoe UI", Arial, sans-serif; background: #f4f6fa; color: #222; min-height: 100vh; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== NAVBAR ===== */
.navbar {
    background: #1e3a5f;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 60px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.navbar .brand { font-size: 1.4rem; font-weight: 700; color: #fff; }
.navbar nav a { color: #d1e4ff; margin-left: 20px; font-size: 0.95rem; }
.navbar nav a:hover { color: #fff; text-decoration: none; }

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    color: #fff;
    padding: 60px 32px 40px;
    text-align: center;
}
.hero h1 { font-size: 2.2rem; margin-bottom: 10px; }
.hero p  { font-size: 1.1rem; opacity: .85; }

/* ===== SEARCH BOX ===== */
.search-box {
    max-width: 540px;
    margin: 32px auto 0;
    position: relative;
}
.search-box input {
    width: 100%;
    padding: 14px 20px;
    border-radius: 40px;
    border: none;
    font-size: 1rem;
    outline: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.search-box button {
    position: absolute;
    right: 6px; top: 6px;
    padding: 8px 22px;
    border-radius: 30px;
    border: none;
    background: #1e3a5f;
    color: #fff;
    cursor: pointer;
    font-size: 0.95rem;
}
.search-box button:hover { background: #2563eb; }
#suggestions {
    position: absolute; left: 0; right: 0; top: 52px;
    background: #fff; border: 1px solid #ddd;
    border-radius: 8px; z-index: 100;
    color: #1f2937;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    max-height: 260px; overflow-y: auto;
}
#suggestions .suggestion-item {
    padding: 10px 20px; cursor: pointer; font-size: 0.95rem;
    color: #1f2937;
    border-bottom: 1px solid #f0f0f0;
}
#suggestions .suggestion-item:last-child { border-bottom: none; }
#suggestions .suggestion-item:hover { background: #f0f6ff; }

/* ===== CONTAINER ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 32px 16px; }

/* ===== CARDS ===== */
.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    padding: 24px;
    margin-bottom: 20px;
}
.card h2 { font-size: 1.15rem; margin-bottom: 12px; color: #1e3a5f; }

/* ===== ADDRESS FORM ===== */
.address-selects select {
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-right: 8px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    background: #fff;
}
.address-selects select:focus { outline: 2px solid #2563eb; }

/* ===== POINTS LIST ===== */
.point-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.07);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.point-card .point-info h3 { font-size: 1rem; color: #1e3a5f; }
.point-card .point-info p  { font-size: 0.88rem; color: #666; margin-top: 3px; }
.point-card .badge {
    background: #2563eb; color: #fff;
    padding: 4px 12px; border-radius: 20px;
    font-size: 0.82rem;
}

/* ===== FORMS ===== */
.form-card {
    max-width: 440px; margin: 60px auto;
    background: #fff; border-radius: 12px;
    padding: 36px 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}
.form-card h2 { text-align: center; margin-bottom: 24px; color: #1e3a5f; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.9rem; margin-bottom: 4px; color: #444; }
.form-group input,
.form-group select {
    width: 100%; padding: 10px 12px;
    border: 1px solid #ccc; border-radius: 6px;
    font-size: 0.95rem;
}
.form-group { position: relative; }
.product-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 2px);
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    z-index: 50;
    max-height: 220px;
    overflow-y: auto;
    display: none;
}
.product-suggestions .suggestion-item {
    padding: 10px 12px;
    font-size: 0.93rem;
    color: #1f2937;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
}
.product-suggestions .suggestion-item:last-child { border-bottom: none; }
.product-suggestions .suggestion-item:hover { background: #eff6ff; }
.form-group input:focus,
.form-group select:focus { outline: 2px solid #2563eb; border-color: transparent; }
.btn {
    display: inline-block;
    padding: 11px 28px; border-radius: 6px;
    border: none; cursor: pointer;
    font-size: 0.97rem; font-weight: 600;
}
.btn-primary  { background: #2563eb; color: #fff; }
.btn-primary:hover  { background: #1d4ed8; }
.btn-danger   { background: #dc2626; color: #fff; }
.btn-danger:hover   { background: #b91c1c; }
.btn-sm { padding: 5px 14px; font-size: 0.85rem; }
.btn-full { width: 100%; text-align: center; }
.error-msg { color: #dc2626; font-size: 0.9rem; margin-top: 8px; }
.success-msg { color: #16a34a; font-size: 0.9rem; margin-top: 8px; }

/* ===== MEMBERSHIP CARDS ===== */
.membership-grid { display: flex; gap: 20px; flex-wrap: wrap; margin: 24px 0; }
.membership-option {
    flex: 1; min-width: 160px;
    border: 2px solid #e5e7eb; border-radius: 10px;
    padding: 20px 16px; text-align: center; cursor: pointer;
    transition: border-color .2s;
}
.membership-option:hover,
.membership-option.selected { border-color: #2563eb; background: #eff6ff; }
.membership-option h3 { font-size: 1rem; color: #1e3a5f; }
.membership-option .price { font-size: 1.4rem; font-weight: 700; color: #2563eb; margin: 8px 0; }
.membership-option p { font-size: 0.82rem; color: #666; }

/* ===== ADMIN ===== */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 220px; background: #1e3a5f; color: #fff;
    padding: 20px 0; flex-shrink: 0;
}
.admin-sidebar .brand {
    font-size: 1.1rem; font-weight: 700;
    padding: 10px 24px 24px; display: block; color: #fff;
}
.admin-sidebar a {
    display: block; padding: 11px 24px;
    color: #9bbde6; font-size: 0.95rem;
    border-left: 3px solid transparent;
}
.admin-sidebar a:hover,
.admin-sidebar a.active {
    color: #fff; background: #16325c;
    border-left-color: #2563eb; text-decoration: none;
}
.admin-content { flex: 1; padding: 32px; background: #f4f6fa; }
.admin-content h1 { font-size: 1.5rem; margin-bottom: 24px; color: #1e3a5f; }

/* ===== TABLE ===== */
.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 6px rgba(0,0,0,0.07); }
.data-table th { background: #1e3a5f; color: #fff; padding: 12px 16px; text-align: left; font-size: 0.9rem; }
.data-table td { padding: 11px 16px; border-bottom: 1px solid #f0f0f0; font-size: 0.92rem; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f8faff; }

/* ===== ALERT ===== */
.alert { padding: 12px 18px; border-radius: 6px; margin-bottom: 16px; font-size: 0.92rem; }
.alert-danger  { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.alert-success { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }

/* ===== FOOTER ===== */
footer { text-align: center; padding: 24px; font-size: 0.85rem; color: #888; margin-top: 40px; border-top: 1px solid #e5e7eb; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .admin-content { padding: 20px; }
    .container { padding: 20px 14px; }
}

@media (max-width: 860px) {
    .navbar {
        height: auto;
        padding: 12px 16px;
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    .navbar nav a { margin-left: 0; margin-right: 14px; }

    .hero { padding: 40px 18px 28px; }
    .hero h1 { font-size: 1.55rem; }
    .hero p { font-size: 0.95rem; }

    .search-box { margin-top: 18px; }
    .search-box input { padding: 12px 14px; }
    .search-box button { position: static; margin-top: 8px; width: 100%; }

    .point-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .admin-layout { flex-direction: column; }
    .admin-sidebar {
        width: 100%;
        display: flex;
        overflow-x: auto;
        flex-wrap: wrap;
        padding: 10px;
        gap: 6px;
    }
    .admin-sidebar .brand { padding: 8px 10px; margin-right: 8px; }
    .admin-sidebar a {
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
        padding: 8px 10px;
    }
    .admin-sidebar a.active,
    .admin-sidebar a:hover {
        border-left: none;
        border-bottom-color: #2563eb;
    }

    .data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .membership-grid { flex-direction: column; }
    .form-card { margin: 24px auto; padding: 24px 18px; }
}