:root {
    --admin-navy: #063e75;
    --admin-navy-deep: #042e5d;
    --admin-blue: #0868c6;
    --admin-blue-bright: #248cf0;
    --admin-teal: #07aa9d;
    --admin-orange: #ff8519;
    --admin-purple: #7445df;
    --admin-red: #f3424f;
    --admin-ink: #082f5c;
    --admin-muted: #5d7691;
    --admin-canvas: #eef9ff;
    --admin-line: #d8e8f3;
    --admin-card: #fff;
    --admin-radius: 14px;
    --admin-shadow: 0 9px 28px rgba(8, 67, 112, .08);
    --sidebar-width: 258px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.esimbad-admin-body,
body.esimbad-login-page {
    margin: 0;
    color: var(--admin-ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.esimbad-admin-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 80% 8%, rgba(38, 169, 230, .1), transparent 26rem),
        linear-gradient(155deg, #f5fbff, #eaf7ff 65%, #edf9ff);
}

a {
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

:focus-visible {
    outline: 3px solid #ffc83d !important;
    outline-offset: 2px;
}

.admin-skip-link {
    position: fixed;
    z-index: 2000;
    top: 8px;
    left: 8px;
    padding: 10px 14px;
    color: #fff;
    background: var(--admin-navy-deep);
    border-radius: 8px;
    transform: translateY(-140%);
}

.admin-skip-link:focus {
    transform: translateY(0);
}

.admin-shell {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    position: fixed;
    z-index: 500;
    inset: 0 auto 0 0;
    display: flex;
    width: var(--sidebar-width);
    min-height: 100vh;
    flex-direction: column;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(150deg, rgba(18, 123, 202, .23), transparent 35%),
        linear-gradient(180deg, #075ca5, #053e78 52%, #06447e);
    box-shadow: 7px 0 26px rgba(4, 49, 89, .16);
}

.admin-sidebar::before,
.admin-sidebar::after {
    position: absolute;
    z-index: -1;
    content: "";
    pointer-events: none;
}

.admin-sidebar::before {
    inset: 90px -60px auto -80px;
    height: 380px;
    opacity: .12;
    transform: rotate(-38deg);
    background: repeating-linear-gradient(90deg, rgba(53, 168, 237, .75) 0 4px, transparent 4px 43px);
}

.admin-sidebar::after {
    right: -70px;
    bottom: 70px;
    width: 280px;
    height: 280px;
    opacity: .13;
    background: radial-gradient(circle, #43b8e9 0 3px, transparent 4px);
    background-size: 24px 24px;
    transform: rotate(16deg);
}

.sidebar-brand {
    flex: 0 0 auto;
    padding: 16px 18px 15px;
    border-bottom: 1px solid rgba(255,255,255,.13);
}

.sidebar-brand > a {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #fff;
}

.sidebar-brand img {
    width: 48px;
    height: 59px;
    object-fit: contain;
}

.sidebar-agency {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.08;
    text-transform: uppercase;
}

.sidebar-agency small {
    font-size: 10px;
    font-weight: 700;
}

.sidebar-agency strong {
    margin-top: 4px;
    font-size: 20px;
    letter-spacing: .02em;
}

.sidebar-product {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin-top: 13px;
    line-height: 1.05;
}

.sidebar-product strong {
    font-size: 26px;
    letter-spacing: .02em;
}

.sidebar-product span {
    margin-top: 4px;
    color: #cceaff;
    font-size: 12px;
}

.sidebar-navigation {
    flex: 1;
    min-height: 0;
    margin-bottom: 158px;
    padding: 10px 12px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-color: rgba(255,255,255,.25) transparent;
    scrollbar-width: thin;
}

.sidebar-section-label {
    display: block;
    padding: 10px 14px 6px;
    color: rgba(255,255,255,.57);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.sidebar-navigation ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar-navigation li {
    margin: 2px 0;
}

.sidebar-navigation a {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    min-height: 47px;
    padding: 7px 12px;
    color: rgba(255,255,255,.92);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    transition: background .18s ease, transform .18s ease, color .18s ease;
}

.sidebar-navigation a i {
    font-size: 18px;
    text-align: center;
}

.sidebar-navigation a em {
    padding: 3px 6px;
    color: #bce8ff;
    background: rgba(255,255,255,.1);
    border-radius: 999px;
    font-size: 7px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.sidebar-navigation a:hover,
.sidebar-navigation a.active {
    color: #fff;
    background: linear-gradient(120deg, #2b96ef, #1778d3);
    box-shadow: 0 8px 18px rgba(0, 36, 76, .22);
    transform: translateX(2px);
}

.sidebar-navigation a.coming-soon {
    opacity: .78;
}

.sidebar-slogan {
    position: absolute;
    right: 0;
    bottom: 58px;
    left: 0;
    display: flex;
    flex-direction: column;
    padding: 18px 27px 20px;
    color: rgba(255,255,255,.92);
    background: linear-gradient(0deg, rgba(2, 39, 73, .92), rgba(2, 55, 101, .12));
    font-family: "Segoe Script", "Bradley Hand", cursive;
    font-size: 15px;
    font-style: italic;
    line-height: 1.25;
    transform: rotate(-2deg);
}

.sidebar-slogan small {
    margin-top: 3px;
    font-size: 11px;
}

.sidebar-account {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 58px;
    padding: 10px 18px;
    background: rgba(2, 39, 73, .92);
    border-top: 1px solid rgba(255,255,255,.13);
}

.account-dot {
    width: 8px;
    height: 8px;
    background: #43db97;
    border: 2px solid #fff;
    border-radius: 50%;
}

.sidebar-account > span:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.sidebar-account strong,
.sidebar-account small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-account strong {
    font-size: 10px;
}

.sidebar-account small {
    color: rgba(255,255,255,.65);
    font-size: 8px;
}

.sidebar-backdrop {
    display: none;
}

/* Header */
.admin-main {
    display: flex;
    width: calc(100% - var(--sidebar-width));
    min-width: 0;
    min-height: 100vh;
    flex-direction: column;
    margin-left: var(--sidebar-width);
}

.admin-topbar {
    position: sticky;
    z-index: 300;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 76px;
    gap: 22px;
    padding: 10px 24px;
    background:
        radial-gradient(circle at 92% 10%, rgba(70, 166, 224, .15), transparent 18rem),
        rgba(250, 253, 255, .96);
    border-bottom: 1px solid #dbeaf3;
    box-shadow: 0 4px 18px rgba(7, 59, 99, .06);
    backdrop-filter: blur(15px);
}

.sidebar-mobile-toggle {
    display: none;
}

.admin-search {
    position: relative;
    display: flex;
    align-items: center;
    width: min(430px, 42vw);
    margin-right: auto;
    background: #fff;
    border: 1px solid #d5e6f1;
    border-radius: 12px;
    box-shadow: 0 7px 18px rgba(8, 71, 119, .07);
}

.admin-search > i {
    margin-left: 15px;
    color: #0a5897;
    font-size: 18px;
}

.admin-search input {
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 0 10px;
    color: var(--admin-ink);
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 11px;
}

.admin-search kbd {
    margin-right: 10px;
    padding: 3px 6px;
    color: #70879b;
    background: #edf5fa;
    border: 1px solid #dce9f1;
    border-radius: 5px;
    box-shadow: none;
    font: 8px/1.2 inherit;
}

.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-icon,
.new-data-button,
.user-menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 10px;
    cursor: pointer;
}

.topbar-icon {
    width: 42px;
    color: #095794;
    background: #fff;
    border: 1px solid #d8e7f1;
    font-size: 18px;
}

.new-data-button {
    gap: 9px;
    padding: 0 15px;
    color: #fff;
    background: linear-gradient(145deg, #0875d3, #0754a4);
    border: 0;
    box-shadow: 0 8px 17px rgba(5, 91, 164, .2);
    font-size: 11px;
    font-weight: 800;
}

.user-menu-button {
    gap: 10px;
    min-width: 188px;
    padding: 4px 12px 4px 6px;
    color: var(--admin-ink);
    background: #fff;
    border: 1px solid #d8e7f1;
    text-align: left;
}

.user-avatar {
    display: grid;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    color: #fff;
    background: linear-gradient(145deg, #0c65b0, #063b70);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
    place-items: center;
}

.user-copy {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.user-copy strong,
.user-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-copy strong {
    font-size: 10px;
}

.user-copy small {
    color: #647c92;
    font-size: 8px;
}

.admin-dropdown {
    min-width: 260px;
    margin-top: 8px !important;
    padding: 10px;
    color: var(--admin-ink);
    background: #fff;
    border: 1px solid #d9e8f2;
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(6, 54, 95, .16);
}

.notification-dropdown strong,
.dropdown-label {
    display: block;
    padding: 5px 8px;
    font-size: 11px;
}

.notification-dropdown p,
.dropdown-empty {
    display: block;
    margin: 5px 8px;
    color: #657c91;
    font-size: 10px;
}

.admin-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px;
    color: var(--admin-ink);
    border-radius: 8px;
    font-size: 10px;
}

.admin-dropdown .dropdown-item:hover {
    color: #075fa9;
    background: #edf7fd;
}

.new-data-menu .dropdown-item > i {
    display: grid;
    width: 31px;
    height: 31px;
    color: #0876c9;
    background: #e2f3fd;
    border-radius: 8px;
    font-size: 15px;
    place-items: center;
}

.new-data-menu .dropdown-item span,
.dropdown-user-summary div {
    display: flex;
    flex-direction: column;
}

.new-data-menu small,
.dropdown-user-summary small {
    color: #6b8195;
    font-size: 8px;
}

.dropdown-user-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 8px 11px;
}

.dropdown-user-summary strong {
    font-size: 10px;
}

.logout-item {
    width: 100%;
    color: #d73945 !important;
    background: transparent;
    border: 0;
}

/* Content */
.admin-content {
    flex: 1;
    width: 100%;
    padding: 16px 20px 20px;
}

.admin-page-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    margin-bottom: 10px;
}

.admin-page-intro h1 {
    margin: 0;
    color: var(--admin-ink);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.admin-page-intro nav {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 3px;
    color: #637d96;
    font-size: 9px;
}

.admin-page-intro nav a {
    color: #0969b6;
}

.filter-toggle-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 13px;
    color: #0866af;
    background: #fff;
    border: 1px solid #cfe2ee;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

.dashboard-filter {
    margin-bottom: 10px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--admin-line);
    border-radius: 12px;
    box-shadow: var(--admin-shadow);
}

.dashboard-filter form {
    display: grid;
    grid-template-columns: 180px minmax(240px, 1fr) auto auto;
    align-items: end;
    gap: 10px;
}

.dashboard-filter form > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dashboard-filter label {
    color: #45627e;
    font-size: 9px;
    font-weight: 800;
}

.dashboard-filter select {
    min-height: 38px;
    padding: 0 10px;
    color: var(--admin-ink);
    background: #f8fcff;
    border: 1px solid #d6e6f0;
    border-radius: 8px;
    font-size: 10px;
}

.dashboard-filter form > a,
.dashboard-filter form > button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
}

.dashboard-filter form > a {
    color: #60788e;
    border: 1px solid #d6e6f0;
}

.dashboard-filter form > button {
    gap: 6px;
    color: #fff;
    background: var(--admin-blue);
    border: 0;
}

.admin-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 10px;
}

.admin-alert-danger {
    color: #9a2731;
    background: #fff0f1;
    border: 1px solid #f7cdd1;
}

.admin-alert div {
    display: flex;
    flex-direction: column;
    font-size: 10px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.metric-card {
    display: grid;
    grid-template-columns: 55px minmax(0, 1fr);
    align-items: start;
    min-height: 126px;
    gap: 12px;
    padding: 14px 13px;
    overflow: hidden;
    color: var(--admin-ink);
    background: rgba(255,255,255,.96);
    border: 1px solid #dbe9f2;
    border-radius: 13px;
    box-shadow: var(--admin-shadow);
    transition: transform .18s ease, box-shadow .18s ease;
}

.metric-card:hover {
    color: var(--admin-ink);
    box-shadow: 0 13px 27px rgba(8, 67, 112, .13);
    transform: translateY(-2px);
}

.metric-icon {
    display: grid;
    width: 55px;
    height: 55px;
    color: #fff;
    border-radius: 12px;
    font-size: 25px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 8px 16px rgba(7, 77, 128, .15);
    place-items: center;
}

.metric-blue .metric-icon { background: linear-gradient(145deg, #309cf2, #146bd0); }
.metric-teal .metric-icon { background: linear-gradient(145deg, #22c7ba, #049a91); }
.metric-purple .metric-icon { background: linear-gradient(145deg, #9163f0, #7040df); }
.metric-orange .metric-icon { background: linear-gradient(145deg, #ffae29, #ff7812); }

.metric-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.metric-copy small {
    min-height: 28px;
    color: #254c75;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
}

.metric-copy strong {
    margin: 2px 0 7px;
    color: #07366a;
    font-size: 26px;
    line-height: 1;
}

.metric-copy em {
    color: #688198;
    font-size: 8px;
    font-style: normal;
}

.dashboard-primary-grid {
    display: grid;
    grid-template-columns: 1.6fr .9fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.dashboard-secondary-grid {
    display: grid;
    grid-template-columns: 1.75fr .9fr .95fr;
    gap: 10px;
    margin-top: 10px;
}

.admin-card {
    min-width: 0;
    overflow: hidden;
    background: rgba(255,255,255,.96);
    border: 1px solid #dbe9f2;
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
}

.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    gap: 12px;
    padding: 10px 13px;
    border-bottom: 1px solid #e1edf4;
}

.admin-card-header > div {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 9px;
}

.admin-card-header > div > span:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.card-title-icon {
    display: grid;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    color: #0872c2;
    background: #e2f3fd;
    border-radius: 8px;
    font-size: 16px;
    place-items: center;
}

.admin-card-header h2 {
    margin: 0;
    color: #0a3968;
    font-size: 13px;
    font-weight: 800;
}

.admin-card-header p {
    margin: 2px 0 0;
    color: #6a8093;
    font-size: 8px;
}

.admin-card-header > a {
    flex: 0 0 auto;
    color: #0871bf;
    font-size: 8px;
    font-weight: 800;
    text-decoration: underline;
}

.card-context {
    padding: 5px 9px;
    color: #426887;
    background: #f2f8fc;
    border: 1px solid #d9e7ef;
    border-radius: 7px;
    font-size: 8px;
    font-weight: 700;
}

.admin-chart {
    min-height: 260px;
    padding: 2px 7px 0;
}

.impact-content {
    display: grid;
    grid-template-columns: minmax(150px, 1.15fr) .85fr;
    align-items: center;
    min-height: 268px;
    padding: 8px;
}

.donut-chart {
    min-width: 0;
}

.impact-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0 3px;
    list-style: none;
}

.impact-legend li {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    gap: 7px;
}

.impact-legend li > span {
    display: flex;
    flex-direction: column;
}

.impact-legend strong {
    font-size: 9px;
}

.impact-legend small {
    color: #647b91;
    font-size: 8px;
}

.dot {
    width: 9px;
    height: 9px;
    margin-top: 3px;
    border-radius: 50%;
}

.dot-green { background: #08aa82; }
.dot-blue { background: #2388ec; }
.dot-orange { background: #ffad18; }
.dot-red { background: #f3424f; }

.activity-list {
    display: flex;
    min-height: 268px;
    flex-direction: column;
    padding: 4px 12px;
}

.activity-list > a {
    display: grid;
    grid-template-columns: 31px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 49px;
    color: var(--admin-ink);
    border-bottom: 1px solid #e2edf4;
}

.activity-list > a:last-child {
    border-bottom: 0;
}

.activity-icon {
    display: grid;
    width: 29px;
    height: 29px;
    color: #fff;
    background: linear-gradient(145deg, #8e62eb, #7440db);
    border-radius: 50%;
    font-size: 12px;
    place-items: center;
}

.activity-list > a > span:nth-child(2) {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.activity-list strong {
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-list small,
.activity-list time {
    color: #687f93;
    font-size: 7px;
}

.activity-list time {
    text-align: right;
    white-space: nowrap;
}

.responsive-table {
    width: 100%;
    overflow-x: auto;
}

.admin-data-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-data-table th,
.admin-data-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #e3edf4;
    font-size: 8px;
    text-align: left;
    vertical-align: middle;
}

.admin-data-table th {
    color: #4b6884;
    background: #f1f8fc;
    font-weight: 800;
}

.admin-data-table td {
    color: #274d70;
}

.admin-data-table td strong,
.admin-data-table td small {
    display: block;
}

.admin-data-table td strong {
    color: #0a3b69;
    font-size: 9px;
}

.admin-data-table td small {
    color: #73899c;
    font-size: 7px;
}

.incident-type {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.incident-type i {
    color: #ff8b1c;
}

.table-action {
    display: grid;
    width: 26px;
    height: 26px;
    color: #0b6eb9;
    background: #e5f3fc;
    border-radius: 50%;
    place-items: center;
}

.priority-list,
.reminder-list {
    display: flex;
    min-height: 250px;
    flex-direction: column;
    padding: 5px 11px;
}

.priority-list > a {
    display: grid;
    grid-template-columns: 20px 31px minmax(0, 1fr) auto;
    align-items: center;
    min-height: 47px;
    gap: 7px;
    color: var(--admin-ink);
    border-bottom: 1px solid #e3edf4;
}

.priority-list > a > b {
    display: grid;
    width: 19px;
    height: 19px;
    color: #fff;
    background: #1883d9;
    border-radius: 6px;
    font-size: 8px;
    place-items: center;
}

.priority-icon {
    display: grid;
    width: 29px;
    height: 29px;
    color: #fff;
    border-radius: 8px;
    font-size: 12px;
    place-items: center;
}

.priority-1 { background: #288ae2; }
.priority-2 { background: #ff871e; }
.priority-3 { background: #7b50e7; }
.priority-4 { background: #0eaaa0; }

.priority-list > a > span:nth-child(3) {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.priority-list strong {
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.priority-list small {
    color: #70869a;
    font-size: 7px;
}

.priority-list > a > i {
    color: #75a0bc;
}

.reminder-list > a {
    display: grid;
    grid-template-columns: 19px minmax(0, 1fr) auto;
    align-items: center;
    min-height: 58px;
    gap: 8px;
    color: var(--admin-ink);
    border-bottom: 1px solid #e3edf4;
}

.reminder-list > a > i {
    color: #147dd0;
    font-size: 15px;
}

.reminder-list > a > span {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.reminder-list strong {
    font-size: 8px;
}

.reminder-list small {
    margin-top: 2px;
    color: #6d8397;
    font-size: 7px;
}

.tag {
    padding: 4px 6px;
    border-radius: 999px;
    font-size: 7px;
    font-style: normal;
    white-space: nowrap;
}

.tag-blue { color: #0a6ab6; background: #dff1fc; }
.tag-orange { color: #b86a08; background: #fff1d9; }
.tag-red { color: #c63842; background: #ffe1e4; }

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    flex-direction: column;
    color: #7690a4;
    text-align: center;
}

.empty-state i {
    font-size: 25px;
}

.empty-state p {
    margin: 7px 0 0;
    font-size: 9px;
}

.quick-module-card {
    margin-top: 10px;
    padding: 9px 12px 12px;
    background: rgba(255,255,255,.96);
    border: 1px solid #dbe9f2;
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
}

.quick-module-card > header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}

.quick-module-card > header > i {
    color: #0873c2;
    font-size: 19px;
}

.quick-module-card > header span {
    display: flex;
    flex-direction: column;
}

.quick-module-card > header strong {
    font-size: 11px;
}

.quick-module-card > header small {
    color: #70879b;
    font-size: 7px;
}

.quick-module-card > div {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.quick-module {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    min-height: 55px;
    gap: 9px;
    padding: 6px 10px 6px 7px;
    border: 1px solid transparent;
    border-radius: 10px;
}

.quick-module > i:first-child {
    display: grid;
    width: 42px;
    height: 42px;
    color: #fff;
    border-radius: 9px;
    font-size: 18px;
    place-items: center;
}

.quick-module > span {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.quick-module strong {
    font-size: 9px;
}

.quick-module small {
    color: #627b91;
    font-size: 7px;
}

.quick-teal { color: #087b72; background: #e5f9f6; border-color: #cef0ea; }
.quick-teal > i:first-child { background: #0caf9f; }
.quick-blue { color: #0b6bb8; background: #e7f3fd; border-color: #d1e8f8; }
.quick-blue > i:first-child { background: #278be0; }
.quick-purple { color: #6f42d8; background: #f0ebff; border-color: #e3d9ff; }
.quick-purple > i:first-child { background: #7b4ce2; }
.quick-orange { color: #bb6507; background: #fff1e2; border-color: #f8dfc7; }
.quick-orange > i:first-child { background: #ff861a; }

.admin-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    min-height: 45px;
    padding: 10px 22px;
    color: #6f8599;
    background: rgba(255,255,255,.7);
    border-top: 1px solid #dbe8f1;
    font-size: 8px;
}

.admin-toast {
    position: fixed;
    z-index: 1500;
    right: 20px;
    bottom: 20px;
    max-width: 340px;
    padding: 12px 15px;
    color: #fff;
    background: #063f74;
    border-radius: 10px;
    box-shadow: 0 16px 32px rgba(2, 38, 70, .24);
    font-size: 10px;
}

.warehouse-metric-grid {
    grid-template-columns: repeat(2, minmax(220px, 280px));
    justify-content: start;
}

.warehouse-dashboard-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.warehouse-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 190px;
    padding: 26px;
    color: #fff;
    background: linear-gradient(135deg, #0877c8, #07508d);
}

.warehouse-welcome > div {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.warehouse-welcome .card-title-icon {
    color: #fff;
    background: rgba(255,255,255,.16);
}

.warehouse-welcome > div > span:last-child {
    display: flex;
    max-width: 540px;
    flex-direction: column;
}

.warehouse-welcome small {
    color: #bfe9ff;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.warehouse-welcome h2 {
    margin: 5px 0 8px;
    font-size: 23px;
    line-height: 1.2;
}

.warehouse-welcome p {
    margin: 0;
    color: rgba(255,255,255,.82);
    font-size: 11px;
}

.warehouse-welcome > a {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 8px;
    padding: 10px 13px;
    color: #07568f;
    background: #fff;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 800;
}

.warehouse-actions > div {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
    padding: 15px;
}

.warehouse-actions > div > a {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 9px;
    min-height: 105px;
    padding: 12px;
    color: var(--admin-ink);
    background: #f2f9fd;
    border: 1px solid #dceaf3;
    border-radius: 10px;
    text-align: center;
}

.warehouse-actions > div > a > i {
    display: grid;
    width: 39px;
    height: 39px;
    color: #fff;
    background: #1681d4;
    border-radius: 9px;
    font-size: 18px;
    place-items: center;
}

.warehouse-actions > div > a > span {
    display: flex;
    flex-direction: column;
}

.warehouse-actions strong {
    font-size: 9px;
}

.warehouse-actions small {
    color: #6d8397;
    font-size: 7px;
}

/* Existing module pages */
.admin-content > .container-fluid,
.admin-content > .row,
.admin-content > form {
    max-width: none;
}

.admin-content .card {
    border: 1px solid #dbe9f2;
    border-radius: 13px;
    box-shadow: var(--admin-shadow);
}

.admin-content .card-header,
.admin-content .card-footer {
    background: #f8fcff;
    border-color: #e0ecf3;
}

.admin-content .btn-primary {
    background: linear-gradient(145deg, #1177cf, #0755a2);
    border-color: #0867bb;
}

.admin-content .form-control,
.admin-content .form-select,
.admin-content .select2-container--default .select2-selection--single {
    border-color: #cfe1ed;
    border-radius: 8px;
}

.admin-content .table {
    color: #294e70;
}

.admin-content .table thead th {
    color: #365e80;
    background: #f0f7fb;
    border-color: #dce9f1;
}

/* Professional index tables shared by every backend module. */
.admin-content .module-index-card {
    overflow: visible;
    background: rgba(255, 255, 255, .98);
    border-color: #d6e7f2;
    border-radius: 16px;
    box-shadow: 0 12px 34px rgba(9, 67, 110, .09);
}

.admin-content .module-index-header {
    min-height: 76px;
    padding: 15px 18px;
    background:
        radial-gradient(circle at 88% 0, rgba(48, 160, 230, .1), transparent 17rem),
        linear-gradient(135deg, #ffffff, #f5fbff);
    border-bottom: 1px solid #dbeaf3;
    border-radius: 16px 16px 0 0;
}

.module-index-header > .d-flex,
.module-index-title {
    align-items: center !important;
}

.module-index-title {
    display: flex;
    min-width: 0;
    gap: 11px;
}

.module-index-title-icon {
    display: grid;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    color: #0871c5;
    background: linear-gradient(145deg, #e9f7ff, #d8effd);
    border: 1px solid #c9e5f7;
    border-radius: 11px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
    font-size: 19px;
    place-items: center;
}

.module-index-title-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.admin-content .module-index-title-copy h4 {
    margin: 0 !important;
    color: #083d72;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
}

.admin-content .module-index-title-copy small,
.admin-content .module-index-title-copy > span {
    margin-top: 3px;
    color: #6b8398 !important;
    font-size: 10px;
    line-height: 1.35;
}

.admin-content .module-toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 39px;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 9px;
    box-shadow: 0 6px 15px rgba(8, 82, 150, .1);
    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
}

.admin-content .module-toolbar-btn i {
    font-size: 13px;
}

.admin-content .module-index-body {
    padding: 15px 16px 17px;
}

.admin-content .module-table-frame {
    overflow: visible;
    border: 1px solid #dceaf3;
    border-radius: 12px;
    background: #fff;
}

.module-table-frame .dataTables_wrapper {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(240px, auto);
    align-items: center;
    width: 100%;
    color: #58748d;
}

.module-table-frame .dataTables_length,
.module-table-frame .dataTables_filter {
    min-height: 58px;
    margin: 0 !important;
    padding: 10px 14px !important;
    background: #fbfdff;
    border-bottom: 1px solid #e0ecf4;
}

.module-table-frame .dataTables_length {
    display: flex;
    align-items: center;
    border-radius: 12px 0 0;
}

.module-table-frame .dataTables_filter {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    border-radius: 0 12px 0 0;
}

.module-table-frame .dataTables_length label,
.module-table-frame .dataTables_filter label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #5d778f;
    font-size: 10px;
    font-weight: 650;
}

.module-table-frame .dataTables_length select {
    min-width: 66px;
    height: 36px;
    margin: 0 3px;
    padding: 0 28px 0 10px;
    color: #153f68;
    background-color: #fff;
    border: 1px solid #cddfea;
    border-radius: 8px;
    box-shadow: none;
    font-size: 11px;
}

.module-table-frame .dataTables_filter label::before {
    content: "\f52a";
    color: #0b70c2;
    font-family: "bootstrap-icons";
    font-size: 15px;
}

.module-table-frame .dataTables_filter input {
    width: min(290px, 28vw);
    height: 38px;
    margin-left: 0 !important;
    padding: 0 12px;
    color: #163e65;
    background: #fff;
    border: 1px solid #cbdde9;
    border-radius: 8px;
    outline: 0;
    font-size: 11px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.module-table-frame .dataTables_filter input:focus {
    border-color: #2589d5;
    box-shadow: 0 0 0 3px rgba(37, 137, 213, .12);
}

.module-table-frame .dataTables_scroll,
.module-table-frame > .module-data-table,
.module-table-frame .dataTables_wrapper > .module-data-table {
    grid-column: 1 / -1;
}

.module-table-frame .dataTables_scroll {
    width: 100%;
    overflow: hidden;
}

.module-table-frame .dataTables_scrollBody {
    scrollbar-color: #a9cde3 #f1f7fb;
    scrollbar-width: thin;
}

.admin-content table.module-data-table {
    width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0;
}

.admin-content table.module-data-table thead th {
    padding: 11px 13px !important;
    color: #164b78;
    background: linear-gradient(180deg, #eef8fe, #e6f3fb) !important;
    border: 0 !important;
    border-bottom: 1px solid #d2e4ef !important;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .01em;
    line-height: 1.3;
    text-transform: none;
    white-space: nowrap;
}

.admin-content table.module-data-table tbody td {
    padding: 11px 13px !important;
    color: #375b79;
    background: #fff;
    border: 0 !important;
    border-bottom: 1px solid #e6eef4 !important;
    font-size: 10px;
    line-height: 1.45;
    vertical-align: middle;
}

.admin-content table.module-data-table tbody tr:nth-child(even) td {
    background: #f9fcfe;
}

.admin-content table.module-data-table tbody tr:hover td {
    background: #eff8fe;
}

.admin-content table.module-data-table tbody td:nth-child(2) {
    color: #124a79;
    font-weight: 750;
}

.admin-content table.module-data-table tbody tr:last-child td {
    border-bottom: 0 !important;
}

.admin-content table.module-data-table th:last-child,
.admin-content table.module-data-table td:last-child {
    min-width: 92px;
    text-align: center !important;
}

.admin-content table.module-data-table td.d-flex:last-child {
    display: table-cell !important;
}

.admin-content table.module-data-table .badge,
.admin-content table.module-data-table .badge-info {
    display: inline-flex;
    align-items: center;
    margin: 2px;
    padding: 5px 8px;
    color: #087061 !important;
    background: #e4f8f2 !important;
    border: 1px solid #c3ecdf;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 750;
}

.index-action-list {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 5px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    white-space: nowrap;
}

.index-action-list > li,
.index-action-list form {
    display: inline-flex;
    margin: 0;
}

.admin-content .index-action-btn {
    display: inline-grid !important;
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0 !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 5px 12px rgba(17, 75, 120, .14);
    font-size: 0 !important;
    line-height: 1;
    place-items: center;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.admin-content .index-action-btn i {
    margin: 0 !important;
    font-size: 13px !important;
    line-height: 1;
}

.admin-content .index-action-btn:hover {
    filter: brightness(1.04);
    box-shadow: 0 7px 15px rgba(17, 75, 120, .21);
    transform: translateY(-1px);
}

.admin-content .index-action-view { background: linear-gradient(145deg, #1888e4, #0866c3) !important; }
.admin-content .index-action-edit { background: linear-gradient(145deg, #ff9a26, #ed7207) !important; }
.admin-content .index-action-delete { background: linear-gradient(145deg, #ff5964, #df2f40) !important; }
.admin-content .index-action-stock-in { background: linear-gradient(145deg, #19b9a6, #079583) !important; }
.admin-content .index-action-stock-out { background: linear-gradient(145deg, #9168ed, #7042d5) !important; }
.admin-content .index-action-history { background: linear-gradient(145deg, #7997b8, #587793) !important; }
.admin-content .index-action-verify { background: linear-gradient(145deg, #27bd7b, #079b5b) !important; }
.admin-content .index-action-more { background: linear-gradient(145deg, #7593b1, #55728e) !important; }

.module-table-frame .dataTables_info,
.module-table-frame .dataTables_paginate {
    min-height: 59px;
    margin: 0 !important;
    padding: 12px 14px !important;
    background: #fbfdff;
    border-top: 1px solid #e0ecf4;
}

.module-table-frame .dataTables_info {
    display: flex;
    align-items: center;
    color: #6a8297;
    border-radius: 0 0 0 12px;
    font-size: 9px;
}

.module-table-frame .dataTables_paginate {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    border-radius: 0 0 12px;
}

.module-table-frame .dataTables_paginate .paginate_button {
    display: inline-grid;
    min-width: 33px;
    height: 33px;
    margin: 0 2px !important;
    padding: 0 8px !important;
    color: #315d80 !important;
    background: #fff !important;
    border: 1px solid #d3e2ec !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    font-size: 9px;
    place-items: center;
}

.module-table-frame .dataTables_paginate .paginate_button.current,
.module-table-frame .dataTables_paginate .paginate_button.current:hover {
    color: #fff !important;
    background: linear-gradient(145deg, #1581db, #0960b7) !important;
    border-color: #0967bb !important;
}

.module-table-frame .dataTables_paginate .paginate_button:hover:not(.disabled) {
    color: #0a5fa9 !important;
    background: #e9f5fd !important;
    border-color: #a8d2ec !important;
}

.module-table-frame .dataTables_paginate .paginate_button.disabled {
    color: #a7b7c4 !important;
    background: #f4f8fb !important;
    opacity: .7;
}

.module-table-frame .dataTables_empty {
    height: 130px;
    color: #768da1 !important;
    text-align: center !important;
}

@media (max-width: 720px) {
    .admin-content .module-index-header,
    .module-index-header > .d-flex {
        align-items: stretch !important;
        flex-direction: column;
        gap: 12px;
    }

    .admin-content .module-index-header .module-toolbar-btn {
        width: 100%;
    }

    .admin-content .module-index-body {
        padding: 10px;
    }

    .module-index-card .module-index-body > form > .d-flex {
        flex-wrap: wrap;
        gap: 8px !important;
    }

    .module-index-card .module-index-body > form > .d-flex > select,
    .module-index-card .module-index-body > form > .d-flex > .select2-container {
        width: 100% !important;
        min-width: 0;
        flex: 1 1 100%;
    }

    .admin-content .module-index-card .module-index-body > form > .d-flex > .module-toolbar-btn {
        min-width: 0;
        flex: 1 1 145px;
        white-space: normal;
    }

    .module-table-frame .dataTables_wrapper {
        grid-template-columns: 1fr;
    }

    .module-table-frame .dataTables_length,
    .module-table-frame .dataTables_filter,
    .module-table-frame .dataTables_info,
    .module-table-frame .dataTables_paginate,
    .module-table-frame .dataTables_scroll,
    .module-table-frame > .module-data-table,
    .module-table-frame .dataTables_wrapper > .module-data-table {
        grid-column: 1;
    }

    .module-table-frame .dataTables_length,
    .module-table-frame .dataTables_filter {
        justify-content: flex-start;
        min-height: 51px;
        border-radius: 0;
    }

    .module-table-frame .dataTables_length {
        border-radius: 12px 12px 0 0;
    }

    .module-table-frame .dataTables_filter {
        border-top: 0;
    }

    .module-table-frame .dataTables_filter label,
    .module-table-frame .dataTables_filter input {
        width: 100%;
    }

    .module-table-frame .dataTables_info,
    .module-table-frame .dataTables_paginate {
        justify-content: center;
        min-height: 49px;
        text-align: center;
        border-radius: 0;
    }

    .module-table-frame .dataTables_paginate {
        flex-wrap: wrap;
        padding-top: 0 !important;
        border-top: 0;
        border-radius: 0 0 12px 12px;
    }

    .admin-content table.module-data-table thead th,
    .admin-content table.module-data-table tbody td {
        padding: 10px 11px !important;
        white-space: nowrap;
    }
}

/* Unified create and edit modal experience. */
.modal-backdrop.show {
    opacity: .68;
    backdrop-filter: blur(3px);
}

.module-form-modal.fade {
    transition: opacity .34s ease;
}

.module-form-modal.fade .modal-dialog {
    opacity: 0;
    transform: translateY(24px) scale(.965);
    transition: opacity .32s ease, transform .36s cubic-bezier(.2, .8, .2, 1);
}

.module-form-modal.show .modal-dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.module-form-modal .modal-dialog {
    max-width: min(980px, calc(100vw - 42px));
}

.module-form-modal .modal-content {
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(199, 220, 234, .95);
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(1, 39, 73, .3);
}

.module-form-modal .modal-header {
    min-height: 70px;
    padding: 14px 18px;
    background:
        radial-gradient(circle at 85% -30%, rgba(34, 159, 226, .15), transparent 18rem),
        linear-gradient(135deg, #ffffff, #edf8ff);
    border-bottom: 1px solid #d9e8f2;
}

.module-form-modal .modal-title {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #0a3d70;
    font-size: 17px;
    font-weight: 800;
}

.module-modal-title-icon {
    display: inline-grid;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    color: #0872c5;
    background: #e2f3fd;
    border: 1px solid #c9e5f5;
    border-radius: 10px;
    font-size: 17px;
    place-items: center;
}

.module-form-modal .btn-close {
    width: 34px;
    height: 34px;
    padding: 0;
    background-color: #f4f9fc;
    border: 1px solid #d4e4ee;
    border-radius: 9px;
    opacity: .8;
}

.module-form-modal .modal-body {
    max-height: min(72vh, 760px);
    padding: 20px 22px;
    overflow-y: auto;
    scrollbar-color: #afd0e4 #eef6fa;
    scrollbar-width: thin;
}

.module-form-modal .form-label,
.esimbad-modal-frame .form-label {
    margin-bottom: 6px;
    color: #234e73;
    font-size: 10px;
    font-weight: 750;
}

.module-form-modal .form-control,
.module-form-modal .form-select,
.esimbad-modal-frame .form-control,
.esimbad-modal-frame .form-select {
    min-height: 42px;
    color: #173f65;
    background-color: #fff;
    border-color: #cadeea;
    border-radius: 9px;
    font-size: 11px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.module-form-modal textarea.form-control,
.esimbad-modal-frame textarea.form-control {
    min-height: 92px;
}

.module-form-modal .form-control:focus,
.module-form-modal .form-select:focus,
.esimbad-modal-frame .form-control:focus,
.esimbad-modal-frame .form-select:focus {
    border-color: #2689d5;
    box-shadow: 0 0 0 3px rgba(38, 137, 213, .12);
}

.module-form-modal .modal-footer {
    padding: 12px 18px;
    background: #f8fcff;
    border-top: 1px solid #dce9f2;
}

.module-form-modal button[type="submit"],
.esimbad-modal-frame button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    gap: 8px;
    padding-right: 18px;
    padding-left: 18px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 800;
}

.module-form-modal.is-saving {
    opacity: 0 !important;
    pointer-events: none;
    transition: opacity .48s ease !important;
}

.module-form-modal.is-saving .modal-dialog,
.module-form-modal.is-saving-complete .modal-dialog {
    opacity: 0;
    transform: translateY(14px) scale(.95);
    transition: opacity .42s ease, transform .46s cubic-bezier(.4, 0, .2, 1);
}

.module-form-modal.is-saving-complete {
    opacity: 0;
    transition: opacity .42s ease;
}

.module-remote-modal .modal-dialog {
    width: min(1180px, calc(100vw - 36px));
    max-width: none;
    height: min(900px, calc(100vh - 38px));
    height: min(900px, calc(100dvh - 38px));
    margin: 19px auto;
}

.module-remote-modal .modal-content {
    height: 100%;
}

.module-remote-frame-wrap {
    position: relative;
    flex: 1;
    min-height: 0;
    background: #f3faff;
}

.module-remote-frame-wrap iframe {
    display: block;
    width: 100%;
    height: 100%;
    background: #f4fbff;
    border: 0;
    opacity: 1;
    transition: opacity .22s ease;
}

.module-remote-loading {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #1e577f;
    background: #f4fbff;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.module-remote-loading .spinner-border {
    width: 25px;
    height: 25px;
    color: #0875c9;
}

.module-remote-modal.is-loading .module-remote-loading {
    opacity: 1;
}

.module-remote-modal.is-loading iframe {
    opacity: 0;
}

body.esimbad-modal-frame {
    min-height: 0;
    overflow-x: hidden;
    background: #f4fbff;
}

.esimbad-modal-frame .admin-skip-link,
.esimbad-modal-frame .admin-sidebar,
.esimbad-modal-frame .admin-topbar,
.esimbad-modal-frame .admin-page-intro,
.esimbad-modal-frame .admin-footer {
    display: none !important;
}

.esimbad-modal-frame .admin-shell,
.esimbad-modal-frame .admin-main {
    width: 100%;
    min-height: 0;
    margin: 0;
}

.esimbad-modal-frame .admin-content {
    min-height: 0;
    padding: 14px;
    background: #f4fbff;
    transition: opacity .46s ease, transform .48s cubic-bezier(.4, 0, .2, 1), filter .46s ease;
}

.esimbad-modal-frame .admin-content > .row,
.esimbad-modal-frame .admin-content > .container-fluid {
    margin: 0;
    padding: 0;
}

.esimbad-modal-frame .admin-content .card {
    margin-bottom: 12px;
    border-radius: 13px;
    box-shadow: 0 8px 25px rgba(9, 65, 104, .07);
}

.esimbad-modal-frame.esimbad-form-saving .admin-content {
    opacity: 0;
    filter: blur(2px);
    transform: translateY(10px) scale(.985);
}

@media (max-width: 720px) {
    .module-form-modal .modal-dialog,
    .module-remote-modal .modal-dialog {
        width: calc(100vw - 16px);
        max-width: none;
        height: calc(100vh - 16px);
        height: calc(100dvh - 16px);
        margin: 8px;
    }

    .module-form-modal .modal-content {
        border-radius: 14px;
    }

    .module-form-modal .modal-header {
        min-height: 62px;
        padding: 11px 13px;
    }

    .module-form-modal .modal-title {
        font-size: 14px;
    }

    .module-modal-title-icon {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }

    .module-form-modal .modal-body {
        max-height: calc(100dvh - 80px);
        padding: 15px;
    }

    .esimbad-modal-frame .admin-content {
        padding: 8px;
    }
}

/* Login */
body.esimbad-login-page {
    min-height: 100vh;
    overflow-x: hidden;
    background: #eff9ff;
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(500px, .94fr);
    min-height: 100vh;
}

.login-help {
    position: fixed;
    z-index: 20;
    top: 26px;
    right: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0a4381;
    font-size: 13px;
    font-weight: 800;
}

.login-help i:first-child {
    font-size: 23px;
}

.login-story {
    position: relative;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    overflow: hidden;
    color: #fff;
    background-image: url('../img/login-field-uniform-v2.png');
    background-position: 55% center;
    background-size: cover;
}

.login-story::after {
    position: absolute;
    z-index: 1;
    inset: auto 0 0;
    height: 190px;
    content: "";
    background:
        linear-gradient(0deg, rgba(1, 57, 105, .98), rgba(1, 67, 119, .2)),
        radial-gradient(circle at 20% 120%, rgba(33, 167, 220, .4), transparent 18rem);
}

.login-story-overlay {
    position: absolute;
    z-index: 1;
    inset: 0;
    background:
        linear-gradient(100deg, rgba(1, 69, 124, .98) 0%, rgba(1, 73, 129, .86) 42%, rgba(2, 64, 112, .48) 69%, rgba(1, 45, 80, .2)),
        linear-gradient(0deg, rgba(1, 47, 85, .72), transparent 52%);
}

.login-story-overlay::after {
    position: absolute;
    top: -100px;
    bottom: -100px;
    left: -130px;
    width: 550px;
    content: "";
    opacity: .15;
    transform: rotate(-16deg);
    background: repeating-linear-gradient(90deg, rgba(39, 171, 229, .75) 0 4px, transparent 4px 50px);
}

.login-agency {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 42px 5.8%;
}

.login-agency img {
    width: 62px;
    height: auto;
}

.login-agency span {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
    text-transform: uppercase;
}

.login-agency small {
    font-size: 13px;
    font-weight: 700;
}

.login-agency strong {
    margin-top: 5px;
    font-size: 27px;
    letter-spacing: .02em;
}

.login-story-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex: 1;
    justify-content: space-between;
    flex-direction: column;
    padding: 16px 5.8% 9.5%;
}

.login-product strong {
    display: block;
    font-size: clamp(47px, 4.5vw, 70px);
    line-height: 1;
    letter-spacing: -.04em;
}

.login-product strong span {
    color: #69deef;
}

.login-product > i {
    display: block;
    width: 32px;
    height: 4px;
    margin: 16px 0 12px;
    background: #28d2ed;
    border-radius: 99px;
}

.login-product p {
    margin: 0;
    font-size: 16px;
    line-height: 1.45;
}

.login-message {
    max-width: 690px;
    margin-top: auto;
    padding-top: 45px;
}

.login-message h1 {
    margin: 0;
    font-size: clamp(35px, 3.4vw, 53px);
    line-height: 1.05;
    letter-spacing: -.03em;
}

.login-message h1 span {
    color: #4ad8eb;
}

.login-message > p {
    max-width: 625px;
    margin: 16px 0 0;
    font-size: 19px;
    line-height: 1.45;
}

.login-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.login-feature-grid article {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    min-height: 112px;
    gap: 13px;
    padding: 14px;
    background: rgba(4, 83, 145, .52);
    border: 1px solid rgba(113, 203, 244, .36);
    border-radius: 15px;
    box-shadow: 0 12px 28px rgba(0, 36, 69, .18);
    backdrop-filter: blur(8px);
}

.login-feature-grid article > i {
    display: grid;
    width: 55px;
    height: 55px;
    color: #fff;
    background: linear-gradient(145deg, #49b9f1, #1b77d4);
    border-radius: 12px;
    font-size: 26px;
    place-items: center;
}

.login-feature-grid article:nth-child(2) > i { background: linear-gradient(145deg, #2ad5c5, #00a592); }
.login-feature-grid article:nth-child(3) > i { background: linear-gradient(145deg, #a179f2, #6f41dc); }

.login-feature-grid article > span {
    display: flex;
    flex-direction: column;
}

.login-feature-grid strong {
    font-size: 15px;
}

.login-feature-grid small {
    margin-top: 4px;
    color: rgba(255,255,255,.84);
    font-size: 11px;
    line-height: 1.35;
}

.login-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 84px 6% 35px;
    background:
        radial-gradient(circle at 100% 18%, rgba(101, 202, 238, .16), transparent 20rem),
        linear-gradient(140deg, #f9fdff, #eaf8ff);
}

.login-panel {
    width: min(100%, 555px);
    padding: 30px 36px 23px;
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(214, 231, 242, .92);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(5, 65, 111, .14);
}

.login-panel-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 27px;
}

.login-user-icon {
    display: grid;
    flex: 0 0 auto;
    width: 66px;
    height: 66px;
    color: #096fd0;
    background: #e8f6fd;
    border: 1px solid #d4ebf7;
    border-radius: 50%;
    font-size: 32px;
    place-items: center;
}

.login-panel-header h2 {
    margin: 0;
    color: #0a3567;
    font-size: 28px;
    line-height: 1.1;
}

.login-panel-header p {
    margin: 5px 0 0;
    color: #57708c;
    font-size: 14px;
    line-height: 1.3;
}

.login-alert {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: -9px 0 16px;
    padding: 10px 12px;
    color: #a8323c;
    background: #fff0f1;
    border: 1px solid #f5cbd0;
    border-radius: 9px;
    font-size: 11px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-field label {
    display: block;
    margin-bottom: 6px;
    color: #294e72;
    font-size: 11px;
    font-weight: 800;
}

.input-wrap {
    display: flex;
    align-items: center;
    height: 51px;
    background: #fff;
    border: 1px solid #c9dbe8;
    border-radius: 9px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.input-wrap:focus-within {
    border-color: #2a89dc;
    box-shadow: 0 0 0 3px rgba(34, 139, 222, .12);
}

.input-wrap > i {
    display: grid;
    width: 55px;
    align-self: stretch;
    color: #486681;
    border-right: 1px solid #e0eaf1;
    font-size: 20px;
    place-items: center;
}

.input-wrap input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 13px;
    color: #173f66;
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 14px;
}

.password-toggle {
    display: grid;
    width: 48px;
    align-self: stretch;
    color: #4d6881;
    background: transparent;
    border: 0;
    cursor: pointer;
    place-items: center;
}

.access-role-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.access-role-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #234c73;
    font-size: 11px;
    font-weight: 800;
}

.access-role-heading small {
    color: #73899c;
    font-size: 9px;
    font-weight: 500;
}

.role-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.role-chips span {
    padding: 7px 11px;
    color: #365674;
    background: #f7fbfe;
    border: 1px solid #d8e6f0;
    border-radius: 8px;
    font-size: 10px;
}

.role-chips span:first-child {
    color: #0768b7;
    background: #ecf7fe;
    border-color: #95cdf1;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #345474;
    font-size: 11px;
}

.login-options label {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}

.login-options input {
    width: 17px;
    height: 17px;
    accent-color: #0870c9;
}

.login-options a {
    color: #0870ca;
}

.login-submit,
.access-guide {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    gap: 12px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 800;
}

.login-submit {
    color: #fff;
    background: linear-gradient(145deg, #0877d4, #06489b);
    border: 0;
    box-shadow: 0 10px 20px rgba(4, 82, 153, .2);
    cursor: pointer;
}

.login-submit i {
    font-size: 20px;
}

.access-guide {
    color: #075eae;
    background: #fff;
    border: 2px solid #0870c8;
}

.restricted-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    padding: 12px;
    color: #24517a;
    background: #eef7fd;
    border-radius: 8px;
    font-size: 10px;
}

.restricted-note i {
    color: #0873c8;
    font-size: 17px;
}

.login-contact {
    margin-top: 19px;
    padding-top: 14px;
    color: #60758a;
    border-top: 1px solid #d8e6ef;
    text-align: center;
}

.login-contact p {
    margin: 0 0 7px;
    font-size: 9px;
}

.login-contact div {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 10px;
}

.login-contact a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0b4f8e;
}

/* Keep the desktop login experience within one browser viewport. */
@media (min-width: 901px) {
    html:has(body.esimbad-login-page),
    body.esimbad-login-page {
        height: 100%;
        overflow: hidden;
    }

    .login-shell,
    .login-story,
    .login-form-side {
        height: 100vh;
        height: 100dvh;
        min-height: 0;
    }

    .login-form-side {
        overflow: hidden;
        padding: clamp(14px, 3vh, 34px) 6%;
    }

    .login-panel {
        max-height: calc(100vh - 28px);
        max-height: calc(100dvh - 28px);
        overflow: hidden;
    }
}

@media (min-width: 901px) and (max-height: 1000px) {
    .login-help {
        top: 18px;
        right: 30px;
    }

    .login-agency {
        gap: 10px;
        padding: 22px 5.8%;
    }

    .login-agency img {
        width: 52px;
    }

    .login-agency small {
        font-size: 11px;
    }

    .login-agency strong {
        font-size: 23px;
    }

    .login-story-content {
        padding: 0 5.8% 24px;
    }

    .login-product strong {
        font-size: clamp(44px, 4vw, 58px);
    }

    .login-product > i {
        margin: 11px 0 9px;
    }

    .login-product p {
        font-size: 14px;
        line-height: 1.35;
    }

    .login-message {
        padding-top: 14px;
    }

    .login-message h1 {
        font-size: clamp(31px, 3vw, 43px);
    }

    .login-message > p {
        margin-top: 9px;
        font-size: 14px;
        line-height: 1.35;
    }

    .login-feature-grid {
        gap: 9px;
        margin-top: 15px;
    }

    .login-feature-grid article {
        grid-template-columns: 45px minmax(0, 1fr);
        min-height: 76px;
        gap: 10px;
        padding: 10px;
    }

    .login-feature-grid article > i {
        width: 43px;
        height: 43px;
        font-size: 21px;
    }

    .login-feature-grid strong {
        font-size: 13px;
    }

    .login-feature-grid small {
        font-size: 9px;
    }

    .login-panel {
        padding: 20px 28px 17px;
    }

    .login-panel-header {
        gap: 13px;
        margin-bottom: 16px;
    }

    .login-user-icon {
        width: 54px;
        height: 54px;
        font-size: 27px;
    }

    .login-panel-header h2 {
        font-size: 25px;
    }

    .login-panel-header p {
        font-size: 12px;
    }

    .login-form {
        gap: 10px;
    }

    .login-field label {
        margin-bottom: 4px;
    }

    .input-wrap {
        height: 44px;
    }

    .access-role-info {
        gap: 7px;
    }

    .role-chips {
        gap: 5px;
    }

    .role-chips span {
        padding: 5px 8px;
        font-size: 9px;
    }

    .login-submit,
    .access-guide {
        min-height: 42px;
    }

    .restricted-note {
        margin-top: 10px;
        padding: 8px;
    }

    .login-contact {
        margin-top: 10px;
        padding-top: 8px;
    }

    .login-contact p {
        margin-bottom: 5px;
    }
}

@media (min-width: 901px) and (max-height: 720px) {
    .login-agency {
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .login-feature-grid article:nth-child(3),
    .login-contact p {
        display: none;
    }

    .login-contact {
        margin-top: 7px;
        padding-top: 7px;
    }
}

@media (max-width: 1420px) {
    :root { --sidebar-width: 235px; }
    .sidebar-navigation a { min-height: 43px; font-size: 11px; }
    .metric-card { grid-template-columns: 45px minmax(0, 1fr); padding: 12px 10px; }
    .metric-icon { width: 45px; height: 45px; font-size: 21px; }
    .metric-copy strong { font-size: 22px; }
    .dashboard-primary-grid { grid-template-columns: 1.45fr .9fr 1fr; }
    .login-panel { padding: 26px 29px 21px; }
    .login-feature-grid article { grid-template-columns: 48px minmax(0, 1fr); }
    .login-feature-grid article > i { width: 48px; height: 48px; }
}

@media (max-width: 1199px) {
    .admin-sidebar {
        width: 260px;
        visibility: hidden;
        transform: translateX(-105%);
        transition: transform .2s ease, visibility .2s ease;
    }

    .admin-sidebar.open {
        visibility: visible;
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        z-index: 450;
        inset: 0;
        display: block;
        visibility: hidden;
        background: rgba(2, 35, 63, .48);
        border: 0;
        opacity: 0;
        transition: opacity .2s ease, visibility .2s ease;
    }

    .sidebar-backdrop.open {
        visibility: visible;
        opacity: 1;
    }

    .admin-main {
        width: 100%;
        margin-left: 0;
    }

    .sidebar-mobile-toggle {
        display: grid;
        flex: 0 0 auto;
        width: 42px;
        height: 42px;
        color: #075891;
        background: #fff;
        border: 1px solid #d6e6f0;
        border-radius: 10px;
        font-size: 22px;
        cursor: pointer;
        place-items: center;
    }

    .admin-search {
        margin-right: 0;
    }

    .metric-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .dashboard-primary-grid {
        grid-template-columns: 1.35fr 1fr;
    }

    .activity-card {
        grid-column: 1 / -1;
    }

    .activity-list {
        min-height: 0;
    }

    .dashboard-secondary-grid {
        grid-template-columns: 1.3fr 1fr;
    }

    .incident-table-card {
        grid-column: 1 / -1;
    }

    .quick-module-card > div {
        grid-template-columns: repeat(3, 1fr);
    }

    .warehouse-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .login-shell {
        grid-template-columns: 1.15fr minmax(470px, .85fr);
    }

    .login-message h1 {
        font-size: 37px;
    }

    .login-message > p {
        font-size: 15px;
    }

    .login-feature-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .login-feature-grid article {
        min-height: 76px;
    }
}

@media (max-width: 900px) {
    html:has(body.esimbad-login-page),
    body.esimbad-login-page {
        height: auto;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .admin-search {
        width: auto;
        flex: 1;
    }

    .new-data-button span,
    .user-copy,
    .user-menu-button > i:last-child,
    .admin-search kbd {
        display: none;
    }

    .new-data-button {
        width: 42px;
        padding: 0;
    }

    .new-data-button i:last-child {
        display: none;
    }

    .user-menu-button {
        min-width: 0;
        padding: 3px;
        border: 0;
        background: transparent;
    }

    .login-shell {
        display: block;
        height: auto;
    }

    .login-story {
        height: auto;
        min-height: 510px;
    }

    .login-story-content {
        padding-bottom: 45px;
    }

    .login-feature-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .login-form-side {
        height: auto;
        overflow: visible;
        padding: 55px 22px;
    }

    .login-panel {
        max-height: none;
        overflow: visible;
    }

    .login-help {
        color: #fff;
    }
}

@media (max-width: 720px) {
    .admin-topbar {
        min-height: 65px;
        gap: 8px;
        padding: 8px 12px;
    }

    .admin-topbar-actions {
        gap: 5px;
    }

    .topbar-icon,
    .new-data-button,
    .sidebar-mobile-toggle {
        width: 38px;
        height: 38px;
        min-height: 38px;
    }

    .user-avatar {
        width: 34px;
        height: 34px;
    }

    .admin-search input {
        height: 38px;
        font-size: 9px;
    }

    .admin-search > i {
        margin-left: 11px;
    }

    .admin-content {
        padding: 12px;
    }

    .admin-page-intro h1 {
        font-size: 20px;
    }

    .filter-toggle-button span {
        display: none;
    }

    .dashboard-filter form,
    .metric-grid,
    .dashboard-primary-grid,
    .dashboard-secondary-grid,
    .quick-module-card > div {
        grid-template-columns: 1fr;
    }

    .metric-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .warehouse-metric-grid {
        grid-template-columns: 1fr 1fr;
    }

    .warehouse-welcome {
        align-items: flex-start;
        flex-direction: column;
    }

    .metric-card {
        min-height: 106px;
    }

    .impact-content {
        grid-template-columns: 1fr;
    }

    .impact-legend {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        padding: 0 16px 14px;
    }

    .admin-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .login-story {
        min-height: 630px;
    }

    .login-agency {
        padding: 28px 24px;
    }

    .login-agency img {
        width: 50px;
    }

    .login-agency small {
        font-size: 10px;
    }

    .login-agency strong {
        font-size: 21px;
    }

    .login-story-content {
        padding: 10px 24px 35px;
    }

    .login-product strong {
        font-size: 46px;
    }

    .login-product p {
        font-size: 13px;
    }

    .login-message {
        padding-top: 35px;
    }

    .login-message h1 {
        font-size: 32px;
    }

    .login-feature-grid {
        grid-template-columns: 1fr;
    }

    .login-feature-grid article:nth-child(n+3) {
        display: none;
    }

    .login-panel {
        padding: 26px 22px 20px;
    }

    .login-panel-header h2 {
        font-size: 24px;
    }

    .login-user-icon {
        width: 55px;
        height: 55px;
        font-size: 27px;
    }
}

@media (max-width: 430px) {
    .admin-search {
        display: none;
    }

    .sidebar-mobile-toggle {
        margin-right: auto;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .login-help {
        top: 18px;
        right: 20px;
        font-size: 11px;
    }

    .login-story {
        min-height: 660px;
    }

    .login-message h1 {
        font-size: 29px;
    }

    .login-form-side {
        padding: 35px 12px;
    }

    .login-panel {
        padding: 22px 17px 18px;
        border-radius: 15px;
    }

    .login-panel-header {
        gap: 11px;
    }

    .role-chips span {
        padding: 6px 8px;
        font-size: 9px;
    }

    .login-contact div {
        align-items: center;
        flex-direction: column;
        gap: 5px;
    }

    .login-contact div > span {
        display: none;
    }
}

/* Separated disaster, victim, and reporting modules */
.module-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.module-summary-card {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 118px;
    gap: 14px;
    padding: 18px;
    overflow: hidden;
    background: linear-gradient(145deg, #fff 20%, #f3faff 100%);
    border: 1px solid #dcebf5;
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(6, 63, 103, .07);
}

.module-summary-card::after {
    position: absolute;
    width: 86px;
    height: 86px;
    right: -26px;
    bottom: -36px;
    content: "";
    background: currentColor;
    border-radius: 50%;
    opacity: .06;
}

.module-summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    color: #fff;
    background: linear-gradient(145deg, #168be1, #0862b7);
    border-radius: 13px;
    box-shadow: 0 7px 16px rgba(13, 111, 186, .24);
    font-size: 23px;
}

.module-summary-card > div {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.module-summary-card small {
    color: #315b7b;
    font-size: 11px;
    font-weight: 750;
}

.module-summary-card strong {
    color: #0b3e72;
    font-size: clamp(24px, 2.1vw, 32px);
    line-height: 1.08;
}

.module-summary-card > div > span {
    overflow: hidden;
    color: #6b8499;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.module-summary-card.summary-teal .module-summary-icon { background: linear-gradient(145deg, #18c4b0, #009a91); }
.module-summary-card.summary-orange .module-summary-icon { background: linear-gradient(145deg, #ffad32, #f06b13); }
.module-summary-card.summary-purple .module-summary-icon { background: linear-gradient(145deg, #9065f2, #6341d4); }
.module-summary-card.summary-red .module-summary-icon { background: linear-gradient(145deg, #ff665e, #e6323d); }

.module-filter-card {
    margin-bottom: 16px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid #dcebf5;
    border-radius: 15px;
    box-shadow: 0 7px 22px rgba(6, 63, 103, .055);
}

.module-filter-heading {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 13px;
}

.module-filter-heading > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #0875c9;
    background: #eaf6ff;
    border-radius: 10px;
    font-size: 16px;
}

.module-filter-heading h2 {
    margin: 0;
    color: #123f69;
    font-size: 14px;
    font-weight: 850;
}

.module-filter-heading p {
    margin: 2px 0 0;
    color: #688196;
    font-size: 10px;
}

.module-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
    align-items: end;
    gap: 12px;
}

.module-filter-grid label {
    display: grid;
    gap: 6px;
    margin: 0;
}

.module-filter-grid label > span {
    color: #284f72;
    font-size: 10px;
    font-weight: 800;
}

.module-filter-grid .form-select {
    min-height: 40px;
    color: #234d71;
    border-color: #cfe0eb;
    border-radius: 9px;
    font-size: 11px;
}

.module-filter-actions,
.module-report-actions {
    display: flex;
    gap: 8px;
}

.module-filter-actions .btn,
.module-report-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    gap: 7px;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.module-data-count {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 11px;
    color: #366482;
    background: #edf7fd;
    border: 1px solid #d4e8f4;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 750;
}

.module-cell-meta {
    display: block;
    margin-top: 3px;
    color: #7890a3;
    font-size: 9px;
    white-space: nowrap;
}

.module-status-badge {
    display: inline-flex;
    align-items: center;
    min-width: 56px;
    min-height: 25px;
    justify-content: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
}

.module-status-badge.status-warning { color: #9a5900; background: #fff2cb; }
.module-status-badge.status-danger { color: #b5232d; background: #ffe0e2; }
.module-status-badge.status-muted { color: #557089; background: #eaf1f6; }

.module-needs-cell {
    max-width: 220px;
    color: #49677f;
    line-height: 1.45;
}

.module-empty-state {
    display: grid;
    justify-items: center;
    gap: 5px;
    padding: 34px 16px;
    color: #6f8799;
    text-align: center;
}

.module-empty-state i {
    margin-bottom: 3px;
    color: #9fc0d8;
    font-size: 32px;
}

.module-empty-state strong { color: #315c7d; font-size: 12px; }
.module-empty-state span { font-size: 10px; }

@media (max-width: 1100px) {
    .module-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .module-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    .module-summary-grid { grid-template-columns: 1fr; gap: 10px; }
    .module-summary-card { min-height: 96px; padding: 14px; }
    .module-filter-card { padding: 14px; }
    .module-filter-grid { grid-template-columns: 1fr; }
    .module-filter-actions .btn { flex: 1; }
    .module-report-actions { width: 100%; }
    .module-report-actions .btn { flex: 1; }
    .module-data-count { align-self: flex-start; }

    .admin-content .module-index-card,
    .module-filter-card,
    .module-summary-grid {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .admin-content .module-table-frame {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .module-table-frame .dataTables_wrapper {
        min-width: 760px;
    }
}

/* Dashboard readability: larger, calmer typography with room to breathe. */
.dashboard-page {
    --dashboard-text: #234c6e;
    --dashboard-muted: #657f96;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: normal;
}

.dashboard-page .metric-copy small,
.dashboard-page .metric-copy strong,
.dashboard-page .metric-copy em,
.dashboard-page .admin-card-header h2,
.dashboard-page .admin-card-header p,
.dashboard-page .admin-card-header > a,
.dashboard-page .card-context,
.dashboard-page .impact-legend strong,
.dashboard-page .impact-legend small,
.dashboard-page .activity-list strong,
.dashboard-page .activity-list small,
.dashboard-page .activity-list time,
.dashboard-page .admin-data-table th,
.dashboard-page .admin-data-table td,
.dashboard-page .priority-list strong,
.dashboard-page .priority-list small,
.dashboard-page .reminder-list strong,
.dashboard-page .reminder-list small,
.dashboard-page .tag,
.dashboard-page .quick-module-card strong,
.dashboard-page .quick-module-card small {
    letter-spacing: .01em;
}

.dashboard-page .metric-grid {
    gap: 14px;
}

.dashboard-page .metric-card {
    grid-template-columns: 58px minmax(0, 1fr);
    min-height: 142px;
    gap: 14px;
    padding: 18px 16px;
}

.dashboard-page .metric-icon {
    width: 58px;
    height: 58px;
    font-size: 25px;
}

.dashboard-page .metric-copy small {
    min-height: 38px;
    color: var(--dashboard-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.42;
}

.dashboard-page .metric-copy strong {
    margin: 4px 0 8px;
    font-size: 31px;
    font-weight: 650;
    line-height: 1.08;
}

.dashboard-page .metric-copy em {
    color: var(--dashboard-muted);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
}

.dashboard-page .dashboard-primary-grid,
.dashboard-page .dashboard-secondary-grid {
    gap: 14px;
    margin-top: 14px;
}

.dashboard-page .dashboard-primary-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(330px, .9fr) minmax(340px, .95fr);
}

.dashboard-page .dashboard-secondary-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(360px, 1fr) minmax(360px, 1fr);
}

.dashboard-page .admin-card-header {
    min-height: 76px;
    gap: 14px;
    padding: 14px 16px;
}

.dashboard-page .card-title-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 18px;
}

.dashboard-page .admin-card-header h2 {
    font-size: 16px;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: normal;
}

.dashboard-page .admin-card-header p {
    margin-top: 4px;
    color: var(--dashboard-muted);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.45;
}

.dashboard-page .admin-card-header > a {
    font-size: 11px;
    font-weight: 600;
}

.dashboard-page .card-context {
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 500;
}

.dashboard-page .admin-chart {
    min-height: 300px;
    padding: 4px 10px 2px;
}

.dashboard-page .impact-content {
    grid-template-columns: minmax(185px, 1.1fr) minmax(120px, .9fr);
    min-height: 308px;
    gap: 8px;
    padding: 10px 12px;
}

.dashboard-page .impact-legend {
    gap: 14px;
    padding-right: 6px;
}

.dashboard-page .impact-legend li {
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 9px;
}

.dashboard-page .impact-legend strong {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.dashboard-page .impact-legend small {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.35;
}

.dashboard-page .dot {
    width: 10px;
    height: 10px;
    margin-top: 4px;
}

.dashboard-page .activity-list {
    min-height: 308px;
    padding: 5px 15px;
}

.dashboard-page .activity-list > a {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    min-height: 59px;
    gap: 11px;
}

.dashboard-page .activity-icon {
    width: 34px;
    height: 34px;
    font-size: 14px;
}

.dashboard-page .activity-list strong {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.dashboard-page .activity-list small,
.dashboard-page .activity-list time {
    font-size: 10px;
    font-weight: 400;
    line-height: 1.4;
}

.dashboard-page .admin-data-table {
    min-width: 780px;
}

.dashboard-page .admin-data-table th,
.dashboard-page .admin-data-table td {
    padding: 12px 11px;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.42;
}

.dashboard-page .admin-data-table th {
    font-weight: 600;
}

.dashboard-page .admin-data-table td strong {
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.4;
}

.dashboard-page .admin-data-table td small {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.35;
}

.dashboard-page .incident-type {
    gap: 7px;
    line-height: 1.35;
}

.dashboard-page .table-action {
    width: 32px;
    height: 32px;
    font-size: 14px;
}

.dashboard-page .priority-list,
.dashboard-page .reminder-list {
    min-height: 292px;
    padding: 7px 14px;
}

.dashboard-page .priority-list > a {
    grid-template-columns: 24px 38px minmax(0, 1fr) auto;
    min-height: 56px;
    gap: 9px;
}

.dashboard-page .priority-list > a > b {
    width: 23px;
    height: 23px;
    font-size: 10px;
    font-weight: 600;
}

.dashboard-page .priority-icon {
    width: 35px;
    height: 35px;
    font-size: 14px;
}

.dashboard-page .priority-list strong {
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.35;
}

.dashboard-page .priority-list small {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.35;
}

.dashboard-page .reminder-list > a {
    grid-template-columns: 23px minmax(0, 1fr) auto;
    min-height: 72px;
    gap: 10px;
}

.dashboard-page .reminder-list > a > i {
    font-size: 18px;
}

.dashboard-page .reminder-list strong {
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.35;
}

.dashboard-page .reminder-list small {
    margin-top: 3px;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.35;
}

.dashboard-page .tag {
    padding: 5px 8px;
    font-size: 10px;
    font-weight: 500;
}

.dashboard-page .empty-state p {
    font-size: 11px;
    font-weight: 400;
}

.dashboard-page .quick-module-card {
    margin-top: 14px;
    padding: 13px 15px 15px;
}

.dashboard-page .quick-module-card > header {
    gap: 10px;
    margin-bottom: 11px;
}

.dashboard-page .quick-module-card > header > i {
    font-size: 22px;
}

.dashboard-page .quick-module-card > header strong {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.dashboard-page .quick-module-card > header small {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.35;
}

.dashboard-page .quick-module-card > div {
    gap: 12px;
}

.dashboard-page .quick-module {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    min-height: 72px;
    gap: 11px;
    padding: 9px 12px 9px 9px;
}

.dashboard-page .quick-module > i:first-child {
    width: 48px;
    height: 48px;
    font-size: 20px;
}

.dashboard-page .quick-module strong {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.dashboard-page .quick-module small {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.35;
}

@media (max-width: 1600px) {
    .dashboard-page .metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-page .dashboard-primary-grid {
        grid-template-columns: minmax(0, 1.35fr) minmax(310px, .9fr);
    }

    .dashboard-page .activity-card {
        grid-column: 1 / -1;
    }

    .dashboard-page .activity-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-height: 0;
        column-gap: 22px;
    }

    .dashboard-page .dashboard-secondary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-page .incident-table-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1199px) {
    .dashboard-page .dashboard-primary-grid,
    .dashboard-page .dashboard-secondary-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-page .activity-card,
    .dashboard-page .incident-table-card {
        grid-column: auto;
    }
}

@media (max-width: 720px) {
    .dashboard-page .metric-grid,
    .dashboard-page .activity-list,
    .dashboard-page .quick-module-card > div {
        grid-template-columns: 1fr;
    }

    .dashboard-page .metric-card {
        min-height: 118px;
        padding: 15px;
    }

    .dashboard-page .impact-content {
        grid-template-columns: 1fr;
    }

    .dashboard-page .impact-legend {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0 12px 16px;
    }

    .dashboard-page .admin-card-header {
        align-items: flex-start;
        min-height: 70px;
        padding: 13px;
    }

    .dashboard-page .admin-card-header h2 {
        font-size: 15px;
    }

    .dashboard-page .admin-data-table {
        min-width: 760px;
    }
}

/* Disaster workflow readability, BNBA navigation, and server pagination */
.module-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    padding: 6px;
    overflow-x: auto;
    background: rgba(255, 255, 255, .92);
    border: 1px solid #d7e8f3;
    border-radius: 13px;
    box-shadow: 0 6px 18px rgba(7, 68, 111, .06);
}

.module-tabs a,
.module-tabs span {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    gap: 8px;
    padding: 8px 14px;
    color: #315b7d;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
}

.module-tabs a:hover {
    color: #075aa5;
    background: #edf7ff;
}

.module-tabs .active {
    color: #fff;
    background: linear-gradient(135deg, #147fda, #075cb5);
    box-shadow: 0 6px 14px rgba(6, 94, 177, .2);
}

.module-summary-row {
    margin-bottom: 16px;
}

.bnba-stat-card {
    min-height: 112px;
    padding: 17px 19px;
    color: #133e62;
    border: 1px solid #d3e5f0;
    border-radius: 14px;
    box-shadow: 0 7px 20px rgba(6, 64, 105, .07);
}

.bnba-stat-card.stat-blue { background: linear-gradient(145deg, #eaf6ff, #dceeff); border-color: #bfdcf2; }
.bnba-stat-card.stat-slate { background: linear-gradient(145deg, #f3f7fa, #e4edf3); border-color: #cbdce7; }
.bnba-stat-card.stat-green { background: linear-gradient(145deg, #e7f8f1, #d3eee3); border-color: #b6decf; }
.bnba-stat-card.stat-amber { background: linear-gradient(145deg, #fff7e6, #ffedc7); border-color: #efd49c; }

.bnba-stat-card small {
    display: block;
    margin-bottom: 5px;
    color: #355f7b !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.bnba-stat-card h4 {
    margin: 0;
    color: #082f57;
    font-size: 25px;
    font-weight: 650;
    line-height: 1.2;
}

.bnba-stat-card > span {
    display: block;
    margin-top: 6px;
    color: #527088;
    font-size: 11.5px;
    font-weight: 400;
    line-height: 1.4;
}

.admin-content .module-index-title-copy h4 {
    font-size: 18px;
    font-weight: 650;
    line-height: 1.3;
}

.admin-content .module-index-title-copy small,
.admin-content .module-index-title-copy > span {
    color: #526f87 !important;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
}

.module-filter-heading strong {
    color: #123f69;
    font-size: 15px;
    font-weight: 650;
}

.module-filter-heading p {
    color: #526f87;
    font-size: 12px;
    line-height: 1.45;
}

.module-filter-card .form-label,
.admin-content .module-index-card .form-label {
    color: #254d70;
    font-size: 12.5px;
    font-weight: 600;
}

.module-filter-card .form-control,
.module-filter-card .form-select,
.admin-content .module-index-card .form-control,
.admin-content .module-index-card .form-select,
.admin-content .module-index-card .btn {
    font-size: 13px;
}

.admin-content table.module-data-table {
    min-width: 1120px;
}

.admin-content table.module-data-table thead th {
    padding: 13px 14px !important;
    color: #123f68;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.35;
}

.admin-content table.module-data-table tbody td {
    padding: 13px 14px !important;
    color: #284f70;
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.5;
}

.admin-content table.module-data-table tbody td:nth-child(2),
.admin-content table.module-data-table tbody td strong {
    color: #0c426f;
    font-weight: 600;
}

.module-summary-card small {
    color: #254e70;
    font-size: 12.5px;
    font-weight: 600;
}

.module-summary-card > div > span {
    color: #58758c;
    font-size: 11.5px;
    font-weight: 400;
}

.module-status-badge {
    min-height: 29px;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
}

.module-cell-meta {
    display: block;
    margin-top: 3px;
    color: #637f96 !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    line-height: 1.4;
}

.service-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 190px;
}

.service-chip-list > span {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 8px;
    color: #075b55;
    background: #e2f7f1;
    border: 1px solid #bce7dc;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 550;
    line-height: 1.25;
}

.service-chip-list > span.service-empty {
    color: #5c6f7e;
    background: #edf2f5;
    border-color: #d8e1e7;
}

.fulfillment-badge,
.validation-chip {
    display: inline-flex;
    align-items: center;
    min-height: 29px;
    gap: 6px;
    padding: 5px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
}

.fulfillment-terpenuhi,
.validation-chip.validated { color: #075d47; background: #dff5ec; border-color: #b9e5d5; }
.fulfillment-sebagian { color: #795106; background: #fff0c9; border-color: #efd797; }
.fulfillment-belum,
.validation-chip.pending { color: #6c3942; background: #fbe7ea; border-color: #efc9cf; }

.module-pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 16px;
    color: #506e87;
    font-size: 12px;
}

.module-pagination {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.module-pagination a,
.module-pagination span {
    display: inline-grid;
    min-width: 36px;
    height: 36px;
    padding: 0 9px;
    color: #1b527e;
    background: #fff;
    border: 1px solid #cfe0eb;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 550;
    line-height: 1;
    text-decoration: none;
    place-items: center;
}

.module-pagination a:hover { color: #075aa5; background: #edf7ff; border-color: #9fc9e5; }
.module-pagination .active { color: #fff; background: #0b6fc7; border-color: #0b6fc7; }
.module-pagination .disabled { color: #9aabba; background: #f3f7f9; }

@media (max-width: 767px) {
    .module-pagination-wrap { align-items: flex-start; flex-direction: column; }
    .module-pagination { max-width: 100%; overflow-x: auto; padding-bottom: 4px; }
    .bnba-stat-card { min-height: 98px; }
}

@media print {
    body.esimbad-report-print .admin-sidebar,
    body.esimbad-report-print .admin-topbar,
    body.esimbad-report-print .admin-page-intro,
    body.esimbad-report-print .admin-footer,
    body.esimbad-report-print .module-filter-card,
    body.esimbad-report-print .dataTables_length,
    body.esimbad-report-print .dataTables_filter,
    body.esimbad-report-print .dataTables_info,
    body.esimbad-report-print .dataTables_paginate {
        display: none !important;
    }

    body.esimbad-report-print .admin-main,
    body.esimbad-report-print .admin-content {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    body.esimbad-report-print .module-index-card,
    body.esimbad-report-print .module-summary-card {
        break-inside: avoid;
        box-shadow: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
