* { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f3f6f8;
    color: #1f2933;
}
a { color: #1d4e89; text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
    background: #12344d;
    color: #fff;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topbar h1 { font-size: 18px; margin: 0; font-weight: 600; }
.topbar .sub { display: block; font-size: 12px; opacity: 0.8; font-weight: 400; margin-top: 2px; }
.topbar .meta { font-size: 13px; text-align: right; }
.topbar .meta a { color: #fff; }
.meta-profile { margin-top: 4px; }

.nav {
    background: #1d4e89;
    padding: 0 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}
.nav a, .nav .nav-drop > span {
    color: #fff;
    display: inline-block;
    padding: 11px 16px;
    text-decoration: none;
    font-size: 14px;
}
.nav a:hover, .nav a.active,
.nav .nav-drop:hover > span,
.nav .nav-drop.active > span { background: #12344d; }
.nav-drop { position: relative; }
.nav-drop > span { cursor: pointer; }
.nav-drop > span:after { content: " \25BE"; font-size: 10px; }
.nav-drop-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: #12344d;
    z-index: 40;
    box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}
.nav-drop:hover > .nav-drop-menu,
.nav-drop:focus-within > .nav-drop-menu { display: block; }
.nav-drop-menu a { display: block; padding: 10px 14px; color: #fff; }
.nav-drop-menu a:hover, .nav-drop-menu a.active { background: #1d4e89; }

.page { padding: 20px 24px 40px; max-width: 1280px; margin: 0 auto; }
.card {
    background: #fff;
    border: 1px solid #d5dee6;
    padding: 16px 18px;
    margin-bottom: 16px;
}
h2 { margin: 0 0 12px; font-size: 20px; color: #12344d; }
h3 { margin: 0 0 12px; font-size: 16px; color: #12344d; }
.filters { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; }
.field { display: flex; flex-direction: column; min-width: 160px; }
.field label { font-size: 12px; margin-bottom: 4px; color: #52606d; }
input[type=text], input[type=password], input[type=date], select, textarea {
    border: 1px solid #cbd5e1;
    padding: 7px 8px;
    font-size: 14px;
    min-width: 160px;
    font-family: "Segoe UI", Arial, sans-serif;
}
input[type=date] {
    padding: 8px;
    font-size: 15px;
    width: 100%;
}
textarea { min-height: 72px; width: 100%; }
.btn {
    background: #1d4e89;
    color: #fff;
    border: 0;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
}
.btn:hover { background: #12344d; }
.btn-light { background: #64748b; }
.msg { color: #b91c1c; margin: 8px 0; font-size: 14px; display: block; }
.ok { color: #166534; }
.count { font-size: 13px; color: #52606d; margin: 8px 0; }
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px 16px;
}
.form-grid .wide { grid-column: 1 / -1; }
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px 24px;
}
.profile-grid .label { display: block; font-size: 12px; color: #52606d; margin-bottom: 4px; }
.profile-grid .value { display: block; font-size: 15px; font-weight: 600; color: #12344d; }
.form-actions { margin-top: 14px; }
.form-actions .btn { margin-right: 8px; }
.hint { display: block; font-size: 11px; color: #64748b; margin-top: 4px; }
input[readonly], select[disabled], textarea[readonly] { background: #f1f5f9; color: #334155; }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td {
    border-bottom: 1px solid #e5edf3;
    padding: 7px 8px;
    text-align: left;
    vertical-align: top;
}
table.data th { background: #e8f0f7; color: #12344d; font-weight: 600; }
table.data tr:hover td { background: #f8fafc; }
.grid-wrap { overflow-x: auto; }
.pager-bar { margin-top: 12px; }
.page-btn {
    min-width: 36px;
    margin: 0 4px 6px 0;
    padding: 6px 10px;
    border: 1px solid #1d4e89;
    background: #fff;
    color: #1d4e89;
    font-weight: 600;
    cursor: pointer;
}
.page-btn:hover { background: #e8f0f7; }
.page-btn.current,
input.page-btn:disabled {
    background: #1d4e89;
    color: #fff;
    border-color: #1d4e89;
    opacity: 1;
    cursor: default;
}
.action-btn {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 4px 4px 0;
    border: 0;
    background: #1d4e89;
    color: #fff !important;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none !important;
}
.action-btn:hover { background: #12344d; color: #fff !important; }
.action-btn.danger { background: #b91c1c; }
.action-btn.danger:hover { background: #991b1b; }
.action-btn.view { background: #0f766e; }
.count-link { font-weight: 700; }

.login-wrap {
    max-width: 420px;
    margin: 70px auto;
    background: #fff;
    border: 1px solid #d5dee6;
    padding: 28px;
    text-align: center;
}
.login-wrap h1 { margin: 0 0 6px; font-size: 22px; color: #12344d; }
.login-wrap p { margin: 0 0 18px; color: #334155; font-weight: 600; }
.login-wrap .field { margin-bottom: 12px; text-align: left; }
.login-wrap input { width: 100%; }
.login-wrap .otp-row { text-align: left; margin: 0 0 12px; }
.login-logo {
    display: block;
    width: 110px;
    height: auto;
    margin: 0 auto 14px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 8px 0 18px;
}
.kpi {
    background: #fff;
    border: 1px solid #d5dee6;
    padding: 16px 18px;
}
.kpi .label { display: block; font-size: 13px; color: #52606d; margin-bottom: 6px; }
.kpi .value { display: block; font-size: 26px; font-weight: 700; color: #1d4e89; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.home-grid a {
    display: block;
    background: #fff;
    border: 1px solid #d5dee6;
    padding: 16px;
    color: #12344d;
}
.home-grid a:hover { border-color: #1d4e89; text-decoration: none; }
.home-grid strong { display: block; margin-bottom: 4px; }
.home-grid span { font-size: 13px; color: #52606d; }
