* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f7fb;
    color: #222;
}

.navbar {
    background: #087eae;
    color: #fff;
    padding: 16px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar h2 {
    font-size: 22px;
}

.navbar a {
    color: #fff;
    text-decoration: none;
    margin-left: 20px;
    font-size: 15px;
}

.navbar a:hover {
    opacity: 0.8;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 35px auto;
}

.container h1 {
    margin-bottom: 25px;
}

/* LOGIN */

.login-container {
    width: 90%;
    max-width: 420px;
    margin: 100px auto;
    background: #fff;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
}

.login-container h2 {
    margin-bottom: 25px;
}

/* FORM */

.form-card {
    max-width: 750px;
    margin: auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.06);
}

.form-card h2 {
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label,
.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 7px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d8dde5;
    border-radius: 7px;
    font-size: 15px;
    outline: none;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #087eae;
}

.form-group input[readonly] {
    background: #f1f3f5;
}

/* BUTTONS */

.btn {
    display: inline-block;
    background: #087eae;
    color: #fff;
    border: none;
    padding: 11px 20px;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
}

.btn:hover {
    opacity: 0.9;
}

.btn.secondary {
    background: #555;
}

.export-btn {
    background: #198754;
}

/* MESSAGES */

.error {
    background: #f8d7da;
    color: #842029;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 18px;
}

.success {
    background: #d1e7dd;
    color: #0f5132;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 18px;
}

/* DASHBOARD */

.dashboard-cards,
.stats {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.card {
    flex: 1;
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.card h3,
.card span {
    color: #666;
}

.card h1,
.card strong {
    display: block;
    margin-top: 10px;
    font-size: 32px;
}

.dashboard-buttons,
.actions {
    display: flex;
    gap: 10px;
}

/* RECORD FILTER */

.records-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.records-header h1 {
    margin-bottom: 5px;
}

.filter-form {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    display: flex;
    align-items: flex-end;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group input,
.filter-group select {
    padding: 11px 14px;
    border: 1px solid #d8dde5;
    border-radius: 6px;
    min-width: 190px;
}

.custom-date-fields {
    display: flex;
    gap: 15px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

/* TABLE */

.table-responsive {
    width: 100%;
    overflow-x: auto;
    background: #fff;
    border-radius: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 13px 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

table th {
    background: #087eae;
    color: #fff;
}

table tr:hover {
    background: #f7f9fc;
}

.action-buttons {
    white-space: nowrap;
}

.small-btn {
    display: inline-block;
    padding: 7px 10px;
    background: #087eae;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    margin: 2px;
}

.small-btn.edit {
    background: #f0ad4e;
}

.small-btn.print {
    background: #198754;
}

/* VIEW OPD */

.opd-view-table {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.opd-row {
    display: flex;
    border-bottom: 1px solid #eee;
}

.opd-row:last-child {
    border-bottom: none;
}

.opd-label {
    width: 35%;
    padding: 15px;
    background: #f5f7fa;
    font-weight: bold;
}

.opd-value {
    width: 65%;
    padding: 15px;
}

.opd-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

/* RESPONSIVE */

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .navbar a {
        display: inline-block;
        margin: 5px 10px 5px 0;
    }

    .dashboard-cards,
    .stats {
        flex-direction: column;
    }

    .records-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .filter-form,
    .custom-date-fields {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group input,
    .filter-group select {
        width: 100%;
    }

    .opd-row {
        flex-direction: column;
    }

    .opd-label,
    .opd-value {
        width: 100%;
    }
}