/* ========== RESET & GLOBAL ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #e9f0f5;
    padding: 0;
    color: #1e2a3a;
    line-height: 1.5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* ========== CARD STYLE ========== */
.card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    padding: 1.8rem 2rem;
    margin-bottom: 2rem;
    transition: all 0.2s ease;
}

.card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.75rem;
}

.card-header h2 {
    font-size: 1.6rem;
    font-weight: 600;
    color: #0f3b5c;
}

.badge-info {
    background: #d9eaf5;
    color: #1e5f8e;
    padding: 0.25rem 1rem;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ========== FILTER BAR ========== */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1.8rem;
    background: #f8fafc;
    padding: 1rem 1.2rem;
    border-radius: 28px;
    border: 1px solid #e2edf2;
}

.filter-group {
    flex: 1;
    min-width: 140px;
}

.filter-group label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #2c5a7a;
    margin-bottom: 0.25rem;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border-radius: 20px;
    border: 1px solid #cbd5e1;
    background: white;
    font-size: 0.85rem;
}

.btn-filter-reset {
    background: #e2e8f0;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-weight: 600;
    color: #1e4663;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.8rem;
}

.btn-export {
    background: #2c7da0;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-export:hover {
    background: #1f5e7a;
}
.btn-excel {
    background: #1f6e43;
}
.btn-excel:hover {
    background: #0f5a38;
}

.filter-stats {
    font-size: 0.75rem;
    color: #4b6e8a;
    margin-left: auto;
    align-self: center;
    white-space: nowrap;
}

/* ========== FORM ========== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.2rem 1.8rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-field label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #2c5a7a;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-field label span.required {
    color: #d9534f;
    font-size: 1rem;
}

input, select, textarea {
    padding: 0.7rem 0.9rem;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    font-size: 0.9rem;
    font-family: inherit;
    background-color: #fefefe;
    transition: 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #2c7da0;
    box-shadow: 0 0 0 3px rgba(44,125,160,0.2);
}

.size-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.size-item {
    flex: 1;
    min-width: 90px;
}

.btn-submit {
    background: #1f6e43;
    color: white;
    border: none;
    padding: 0.9rem 1.8rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 40px;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 1rem;
    width: 100%;
    max-width: 260px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.btn-submit:hover {
    background: #0f5a38;
    transform: scale(0.98);
}

.btn-reset {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
}

/* ========== TABEL ========== */
.table-wrapper {
    overflow-x: auto;
    border-radius: 20px;
    border: 1px solid #e2edf2;
    background: white;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    min-width: 1000px;
}

th {
    background-color: #f1f7fc;
    padding: 14px 8px;
    font-weight: 700;
    color: #1e4663;
    border-bottom: 1px solid #cbdbe0;
    text-align: center;
}

td {
    padding: 12px 6px;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
    vertical-align: middle;
}

tr:hover {
    background-color: #f8fafc;
}

.empty-row td {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
    font-style: italic;
}

/* ========== BUTTONS (EDIT/DELETE) ========== */
.btn-edit, .btn-delete {
    border: none;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    margin: 0 2px;
}
.btn-edit {
    background: #2c7da0;
    color: white;
}
.btn-edit:hover {
    background: #1f5e7a;
}
.btn-delete {
    background: #e74c3c;
    color: white;
}
.btn-delete:hover {
    background: #c0392b;
}

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}
.modal-content {
    background-color: #fefefe;
    margin: 2rem auto;
    padding: 1.5rem;
    border-radius: 28px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 35px rgba(0,0,0,0.2);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.75rem;
    margin-bottom: 1.2rem;
}
.close-modal {
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    color: #7f8c8d;
}
.close-modal:hover {
    color: #e74c3c;
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 1.8rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}
.btn-save {
    background: #1f6e43;
    color: white;
    border: none;
    padding: 0.6rem 1.4rem;
    border-radius: 30px;
    cursor: pointer;
}
.btn-cancel {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 0.6rem 1.4rem;
    border-radius: 30px;
    cursor: pointer;
}

/* ========== PAGINATION ========== */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 0.5rem;
}
.pagination-container button {
    background: #2c7da0;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}
.pagination-container button:hover:not(:disabled) {
    background: #1f5e7a;
}
.pagination-container button:disabled {
    background: #b0c4de;
    cursor: not-allowed;
}
#pageInfo {
    font-size: 0.9rem;
    color: #1e4663;
}

/* ========== NAVBAR ========== */
.navbar {
    background: linear-gradient(135deg, #0f3b5c 0%, #1a5a7a 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}
.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.nav-brand a {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.2s;
}
.nav-brand a:hover {
    opacity: 0.9;
}
.nav-menu-wrapper {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}
.nav-menu {
    display: flex;
    gap: 0.2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    background: rgba(255,255,255,0.05);
    border-radius: 50px;
    padding: 0.2rem;
}
.nav-item {
    margin: 0;
}
.nav-item a {
    display: block;
    padding: 0.6rem 1.2rem;
    color: #e0f0fa;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 40px;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.nav-item a:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}
.nav-item.active a {
    background: #ffc107;
    color: #0f3b5c;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* ========== PENEMPATAN (LOKASI CARD) ========== */
.lokasi-card {
    background: #f9fafc;
    border-radius: 20px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
}
.lokasi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #cbd5e1;
}
.lokasi-header h3 {
    font-size: 1.2rem;
    color: #0f3b5c;
}
.lokasi-stats {
    font-size: 0.75rem;
    background: #e2e8f0;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
}
.lokasi-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}
.lokasi-table th,
.lokasi-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #e9ecef;
    text-align: left;
}
.lokasi-table th {
    background: #eef2f6;
}
.btn-sm {
    padding: 3px 8px;
    font-size: 0.7rem;
    border-radius: 20px;
    background: #2c7da0;
    color: white;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}
.btn-sm:hover {
    background: #1f5e7a;
}
.btn-danger-sm {
    background: #e74c3c;
}
.btn-danger-sm:hover {
    background: #c0392b;
}

/* ========== FOOTER ========== */
footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.75rem;
    color: #5b7f95;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    body {
        padding: 0;
    }
    .container {
        padding: 1rem;
    }
    .card {
        padding: 1.2rem;
    }
    .btn-submit {
        max-width: 100%;
    }
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-stats {
        white-space: normal;
        margin-left: 0;
    }
    .nav-container {
        flex-direction: column;
        align-items: stretch;
        padding: 0.8rem 1rem;
    }
    .nav-brand {
        text-align: center;
    }
    .nav-menu-wrapper {
        justify-content: center;
    }
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        border-radius: 30px;
        gap: 0.1rem;
    }
    .nav-item a {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    .lokasi-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .lokasi-stats {
        align-self: flex-start;
    }
}