* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f7fb;
    color: #2b2b2b;
}

a {
    text-decoration: none;
    color: inherit;
}

.topbar {
    background: #114b8a;
    color: #fff;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.brand a {
    font-weight: 700;
    color: #fff;
    font-size: 1.15rem;
}

.topnav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.topnav a {
    color: #f2f8ff;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.topnav a:hover,
.topnav a:focus {
    background: rgba(255,255,255,0.15);
}

.page-body {
    padding: 18px;
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-header {
    margin-bottom: 20px;
}

.dashboard-header h1 {
    margin: 0 0 6px;
    font-size: 1.9rem;
}

.dashboard-header p {
    margin: 0;
    color: #5b6b7c;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 14px;
}

.card {
    background: #fff;
    padding: 18px;
    border-radius: 18px;
    box-shadow: 0 6px 16px rgba(17,75,138,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(17,75,138,0.12);
}

.card h2 {
    margin: 0 0 10px;
    font-size: 1.15rem;
}

.card p {
    margin: 0;
    color: #5b6b7c;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.section-title h2 {
    margin: 0;
    font-size: 1.4rem;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.button,
.button-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    background: #114b8a;
    color: #fff;
    cursor: pointer;
    padding: 10px 16px;
    font-weight: 600;
}

.button:hover,
.button-small:hover {
    background: #0d3864;
}

.button-small {
    padding: 6px 10px;
    font-size: 0.95rem;
}

.flash-notice {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
}

.flash-notice.success {
    background: #e6f2ff;
    border-left: 4px solid #114b8a;
    color: #1758a0;
}

.flash-notice.error {
    background: #ffe6e6;
    border-left: 4px solid #d93f3f;
    color: #a82d2d;
}

.card-panel,
.form-panel {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(17,75,138,0.06);
    padding: 20px;
    margin-bottom: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
    color: #24323f;
}

.form-grid input,
.form-grid textarea,
.form-grid select {
    border: 1px solid #d8e0eb;
    border-radius: 12px;
    padding: 12px 14px;
    background: #fbfdff;
    font-size: 0.98rem;
    color: #2b2b2b;
}

.form-grid textarea {
    resize: vertical;
    min-height: 120px;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

thead {
    background: #f2f7ff;
}

thead th,
tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #e8edf4;
    text-align: left;
    vertical-align: middle;
    font-size: 0.95rem;
}

thead th {
    color: #0f305f;
    font-weight: 700;
}

tbody tr:hover {
    background: #fbfbfb;
}

.badge {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    background: #e8f1ff;
    color: #1a4f9c;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
}

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.danger {
    background: #d93f3f;
}

.danger:hover {
    background: #a82d2d;
}

.note {
    margin-top: 6px;
    color: #5f6e7c;
    font-size: 0.95rem;
}

.image-preview {
    max-width: 100%;
    height: auto;
    margin-top: 10px;
    border-radius: 12px;
    border: 1px solid #d8e0eb;
}

.map-frame {
    width: 100%;
    min-height: 240px;
    border: 0;
    border-radius: 16px;
    margin-top: 12px;
}

@media (max-width: 900px) {
    .card-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .topbar {
        flex-direction: column;
        align-items: stretch;
    }
    .topnav {
        justify-content: center;
    }
    .card-grid {
        grid-template-columns: 1fr;
    }
    thead th,
    tbody td {
        padding: 10px 8px;
    }
}
