.dashboard-body {
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 100% 0, rgba(244, 163, 0, 0.055), transparent 28rem),
        #f3f5f9;
    font-family: var(--font-body);
}

.dashboard-body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.22;
    background-image: radial-gradient(rgba(16, 27, 54, 0.16) 0.65px, transparent 0.65px);
    background-size: 17px 17px;
    mask-image: linear-gradient(to bottom, black, transparent 65%);
}

.dashboard-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    width: 262px;
    color: #fff;
    background:
        radial-gradient(circle at 10% 12%, rgba(244, 163, 0, 0.12), transparent 13rem),
        linear-gradient(170deg, #101b36 0%, #0c152b 62%, #0a1122 100%);
    box-shadow: 16px 0 44px rgba(10, 17, 34, 0.09);
    transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 85px;
    padding: 19px 21px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.sidebar-logo {
    display: grid;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    color: var(--navy);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.45), transparent 52%),
        linear-gradient(135deg, var(--saffron-bright), var(--saffron));
    box-shadow: 0 7px 16px rgba(244, 163, 0, 0.18);
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.02em;
    transform: rotate(-2deg);
}

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

.sidebar-brand-copy strong {
    color: #fff;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.sidebar-brand-copy small {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.44);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 23px 14px 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.sidebar-label {
    margin: 0 10px 8px;
    color: rgba(255, 255, 255, 0.32);
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.sidebar-label-spaced {
    margin-top: 26px;
}

.sidebar-nav {
    display: grid;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 9px 11px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 11.5px;
    font-weight: 700;
    transition: color 0.18s ease, background 0.18s ease;
}

.sidebar-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.065);
}

.sidebar-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.095);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.045);
}

.sidebar-icon {
    display: grid;
    flex: 0 0 auto;
    width: 27px;
    height: 27px;
    place-items: center;
    border-radius: 7px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    transition: color 0.18s ease, background 0.18s ease;
}

.sidebar-link.active .sidebar-icon {
    color: var(--saffron-bright);
    background: rgba(244, 163, 0, 0.11);
}

.sidebar-link:hover .sidebar-icon {
    color: #fff;
}

.sidebar-active-dot {
    width: 5px;
    height: 5px;
    margin-left: auto;
    border-radius: 50%;
    background: var(--saffron);
    box-shadow: 0 0 0 3px rgba(244, 163, 0, 0.14);
}

.sidebar-footer {
    padding: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.075);
    background: rgba(0, 0, 0, 0.1);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.04);
}

.user-avatar {
    display: grid;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 9px;
    color: var(--navy);
    background: linear-gradient(135deg, #ffd16a, var(--saffron));
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 800;
}

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

.sidebar-user-copy strong {
    overflow: hidden;
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-copy small {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.38);
    font-size: 8.5px;
    font-weight: 600;
}

.sidebar-logout {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 0;
    border-radius: 7px;
    color: rgba(255, 255, 255, 0.44);
    background: transparent;
    font-size: 13px;
    transition: color 0.18s ease, background 0.18s ease;
}

.sidebar-logout:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-fineprint {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.25);
    font-size: 8.5px;
    text-align: center;
}

.sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 1035;
    display: none;
    background: rgba(8, 14, 27, 0.52);
    backdrop-filter: blur(2px);
}

.dashboard-main {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-left: 262px;
}

.dashboard-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 78px;
    padding: 12px 32px;
    border-bottom: 1px solid rgba(16, 27, 54, 0.075);
    background: rgba(253, 253, 255, 0.88);
    backdrop-filter: blur(16px);
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 13px;
}

.topbar-left {
    min-width: 0;
}

.sidebar-toggle {
    display: none;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--navy);
    background: #fff;
    font-size: 20px;
}

.topbar-title {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar-title span {
    color: var(--muted-light);
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.topbar-title h1 {
    margin: 2px 0 0;
    color: var(--navy);
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.topbar-date {
    align-items: center;
    gap: 7px;
    padding-right: 17px;
    border-right: 1px solid var(--line);
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.topbar-date i {
    color: var(--muted-light);
}

.topbar-form-link {
    align-items: center;
    gap: 6px;
    color: var(--navy);
    font-size: 10.5px;
    font-weight: 800;
}

.topbar-form-link:hover {
    color: var(--green);
}

.topbar-avatar {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(16, 27, 54, 0.1);
    border-radius: 10px;
    color: var(--navy);
    background: linear-gradient(135deg, #fff2ce, #ffd77a);
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 800;
}

.dashboard-content {
    flex: 1;
    width: 100%;
    max-width: 1640px;
    margin: 0 auto;
    padding: 28px 32px 38px;
}

.dashboard-messages {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
}

.dashboard-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: 1px solid rgba(11, 122, 83, 0.18);
    border-radius: 11px;
    color: #096144;
    background: #effaf5;
    font-size: 11.5px;
    font-weight: 700;
}

.dashboard-alert i {
    font-size: 14px;
}

.alert-close {
    display: grid;
    width: 24px;
    height: 24px;
    margin-left: auto;
    place-items: center;
    border: 0;
    border-radius: 6px;
    color: inherit;
    background: transparent;
    font-size: 10px;
    opacity: 0.6;
}

.alert-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.04);
}

.dashboard-heading,
.edit-page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.dashboard-eyebrow {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 7px;
    color: var(--green);
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.dashboard-eyebrow span {
    width: 16px;
    height: 1.5px;
    background: var(--saffron);
}

.dashboard-heading h2,
.edit-page-heading h2 {
    margin: 0;
    color: var(--navy);
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.2vw, 1.72rem);
    font-weight: 700;
    letter-spacing: -0.035em;
}

.dashboard-subtitle {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.55;
}

.dashboard-heading-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
    flex-wrap: wrap;
}

.btn-dashboard-primary,
.btn-dashboard-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 39px;
    padding: 9px 14px;
    border-radius: 9px;
    font-size: 10.5px;
    font-weight: 800;
    white-space: nowrap;
    transition: transform 0.17s ease, box-shadow 0.17s ease, border-color 0.17s ease;
}

.btn-dashboard-primary {
    border: 1px solid rgba(16, 27, 54, 0.2);
    color: var(--navy);
    background: linear-gradient(135deg, var(--saffron-bright), var(--saffron));
    box-shadow: 0 6px 16px rgba(244, 163, 0, 0.19);
}

.btn-dashboard-primary:hover {
    color: var(--navy);
    box-shadow: 0 9px 20px rgba(244, 163, 0, 0.23);
    transform: translateY(-1px);
}

.btn-dashboard-secondary {
    border: 1px solid var(--line-strong);
    color: var(--navy-muted);
    background: #fff;
}

.btn-dashboard-secondary:hover {
    border-color: #b8c2d1;
    color: var(--navy);
    box-shadow: 0 5px 14px rgba(16, 27, 54, 0.06);
}

.public-edit-control {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    min-height: 39px;
    padding: 4px 4px 4px 11px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    background: #fff;
}

.public-edit-state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--green);
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    white-space: nowrap;
}

.public-edit-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(11, 122, 83, 0.1);
}

.public-edit-state.is-locked {
    color: #8a5a00;
}

.public-edit-state.is-locked .public-edit-dot {
    background: var(--saffron);
    box-shadow: 0 0 0 3px rgba(244, 163, 0, 0.16);
}

.public-edit-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 29px;
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--navy-muted);
    background: #f7f9fc;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.public-edit-toggle:hover {
    border-color: var(--navy);
    color: var(--navy);
    background: #fff;
}

.public-edit-control.is-locked .public-edit-toggle {
    border-color: rgba(11, 122, 83, 0.25);
    color: var(--green);
    background: var(--green-soft);
}

.public-edit-control.is-locked .public-edit-toggle:hover {
    border-color: var(--green);
    color: var(--green-dark);
    background: #fff;
}

.quick-find {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 14px;
    padding: 14px 16px 14px 18px;
    border: 1px solid rgba(11, 122, 83, 0.16);
    border-left: 3px solid var(--green);
    border-radius: 14px;
    background:
        linear-gradient(90deg, var(--green-soft), rgba(234, 248, 242, 0.45) 55%, #fff);
    box-shadow: 0 6px 18px rgba(16, 27, 54, 0.03);
}

.quick-find-copy {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.quick-find-icon {
    display: grid;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(11, 122, 83, 0.14);
    border-radius: 10px;
    color: var(--green);
    background: #fff;
    font-size: 14px;
}

.quick-find-copy h2 {
    margin: 0;
    color: var(--navy);
    font-family: var(--font-display);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.quick-find-copy p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 600;
}

.quick-find-form {
    display: flex;
    flex: 0 1 495px;
    align-items: center;
    gap: 8px;
    width: min(100%, 495px);
}

.quick-find-field {
    position: relative;
    flex: 1;
    min-width: 0;
}

.quick-find-field > i {
    position: absolute;
    top: 50%;
    left: 12px;
    color: var(--muted-light);
    font-size: 12px;
    transform: translateY(-50%);
    pointer-events: none;
}

.quick-find-input {
    width: 100%;
    min-height: 41px;
    padding: 9px 12px 9px 33px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    color: var(--navy);
    background-color: #fff;
    font-family: var(--font-body);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.035em;
    transition: border-color 0.17s ease, box-shadow 0.17s ease;
}

.quick-find-input::placeholder {
    color: #a3acbb;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.quick-find-input:focus {
    border-color: var(--green);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(11, 122, 83, 0.12);
}

.btn-quick-find {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 41px;
    padding: 9px 13px;
    border: 1px solid var(--green);
    border-radius: 9px;
    color: #fff;
    background: var(--green);
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
    transition: background 0.17s ease, transform 0.17s ease;
}

.btn-quick-find:hover {
    color: #fff;
    background: var(--green-dark);
    transform: translateY(-1px);
}

.filter-card {
    padding: 20px 21px 18px;
    border: 1px solid rgba(16, 27, 54, 0.075);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(16, 27, 54, 0.035);
}

.filter-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 16px;
}

.filter-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-heading-icon {
    display: grid;
    flex: 0 0 auto;
    width: 35px;
    height: 35px;
    place-items: center;
    border-radius: 9px;
    color: var(--navy);
    background: #f0f3f8;
    font-size: 14px;
}

.filter-heading h2 {
    margin: 0;
    color: var(--navy);
    font-family: var(--font-display);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.filter-heading p {
    margin: 2px 0 0;
    color: var(--muted-light);
    font-size: 9.5px;
    font-weight: 600;
}

.filter-loading {
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border-radius: 999px;
    color: var(--green);
    background: var(--green-soft);
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.filter-loading.htmx-request {
    display: inline-flex;
}

.filter-spinner {
    width: 10px;
    height: 10px;
    border: 1.5px solid rgba(11, 122, 83, 0.25);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: dashboard-spin 0.65s linear infinite;
}

@keyframes dashboard-spin {
    to {
        transform: rotate(360deg);
    }
}

.filter-label {
    display: block;
    margin: 0 0 6px;
    color: var(--navy-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.filter-control {
    min-height: 41px;
    padding: 9px 11px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    color: var(--ink);
    background-color: #fcfdff;
    font-family: var(--font-body);
    font-size: 10.5px;
    font-weight: 600;
    transition: border-color 0.17s ease, box-shadow 0.17s ease, background 0.17s ease;
}

.filter-control::placeholder {
    color: #a3acbb;
}

.filter-control:focus {
    border-color: var(--saffron);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(244, 163, 0, 0.12);
}

select.filter-control {
    background-image: var(--bs-form-select-bg-img);
    cursor: pointer;
}

.filter-search-wrap {
    position: relative;
}

.filter-search-wrap > i {
    position: absolute;
    top: 50%;
    left: 12px;
    z-index: 2;
    color: var(--muted-light);
    font-size: 13px;
    transform: translateY(-50%);
    pointer-events: none;
}

.filter-search-wrap .filter-control {
    padding-left: 34px;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 41px;
}

.btn-filter-apply {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 41px;
    padding: 9px 13px;
    border: 1px solid var(--navy);
    border-radius: 9px;
    color: #fff;
    background: var(--navy);
    font-size: 10px;
    font-weight: 800;
    transition: background 0.17s ease;
}

.btn-filter-apply:hover {
    background: var(--navy-soft);
}

.btn-filter-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 41px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--muted);
    background: #fff;
    font-size: 10px;
    font-weight: 700;
}

.btn-filter-reset:hover {
    color: var(--navy);
    border-color: var(--line-strong);
}

.filter-auto-note {
    margin-left: 3px;
    color: var(--muted-light);
    font-size: 8.5px;
    font-weight: 600;
    white-space: nowrap;
}

#dashboard-results {
    transition: opacity 0.15s ease;
}

#dashboard-results.htmx-request {
    opacity: 0.6;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
    margin-top: 18px;
}

.stat-card {
    position: relative;
    overflow: hidden;
    min-height: 151px;
    padding: 16px 17px 14px;
    border: 1px solid rgba(16, 27, 54, 0.075);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(16, 27, 54, 0.03);
}

.stat-card::after {
    content: "";
    position: absolute;
    top: -22px;
    right: -23px;
    width: 92px;
    height: 92px;
    border: 1px solid rgba(16, 27, 54, 0.045);
    border-radius: 50%;
    pointer-events: none;
}

.stat-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.stat-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 9px;
    color: #31599d;
    background: #eff4ff;
    font-size: 14px;
}

.stat-card-pmshri .stat-icon {
    color: #9a6700;
    background: var(--saffron-soft);
}

.stat-card-state .stat-icon {
    color: var(--green);
    background: var(--green-soft);
}

.stat-card-national .stat-icon {
    color: #7746a6;
    background: #f4effb;
}

.stat-context {
    color: var(--muted-light);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-align: right;
}

.stat-label {
    margin: 0;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 700;
}

.stat-value {
    margin: 1px 0 0;
    color: var(--navy);
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.18;
}

.stat-meta {
    margin: 3px 0 0;
    overflow: hidden;
    color: var(--muted-light);
    font-size: 8.5px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.insights-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
    gap: 13px;
    margin-top: 13px;
}

.insight-card {
    padding: 19px 20px 16px;
    border: 1px solid rgba(16, 27, 54, 0.075);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(16, 27, 54, 0.03);
}

.insight-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.insight-kicker {
    display: block;
    margin-bottom: 2px;
    color: var(--green);
    font-size: 7.5px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.insight-header h2 {
    margin: 0;
    color: var(--navy);
    font-family: var(--font-display);
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.insight-badge {
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--green);
    background: var(--green-soft);
    font-size: 7.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.meter-list {
    display: grid;
    gap: 11px;
    margin-top: 16px;
}

.meter-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
}

.meter-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meter-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.dot-amber {
    background: var(--saffron);
}

.dot-green {
    background: var(--green);
}

.dot-blue {
    background: #4c76c9;
}

.dot-violet {
    background: #7a5bc7;
}

.meter-meta strong {
    color: var(--navy);
    font-size: 9.5px;
    font-weight: 800;
}

.meter-meta small {
    color: var(--muted-light);
    font-size: 8px;
    font-weight: 600;
}

.meter-track {
    height: 5px;
    overflow: hidden;
    border-radius: 99px;
    background: #edf0f5;
}

.meter-fill {
    display: block;
    height: 100%;
    min-width: 2px;
    border-radius: inherit;
    transition: width 0.4s ease;
}

.fill-amber {
    background: linear-gradient(90deg, #ffc14d, var(--saffron));
}

.fill-green {
    background: linear-gradient(90deg, #27a87c, var(--green));
}

.fill-blue {
    background: linear-gradient(90deg, #7399e1, #3b67bb);
}

.fill-violet {
    background: linear-gradient(90deg, #a08ae0, #7a5bc7);
}

.designation-split {
    margin-top: 16px;
    padding-top: 13px;
    border-top: 1px solid var(--line);
}

.designation-split-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 8.5px;
    font-weight: 700;
}

.designation-split-head span:last-child {
    color: var(--navy);
    font-weight: 800;
}

.split-bar {
    display: flex;
    gap: 2px;
    height: 7px;
    overflow: hidden;
    border-radius: 99px;
    background: #edf0f5;
}

.split-bar span {
    display: block;
    min-width: 2px;
    height: 100%;
    border-radius: 99px;
}

.split-pd {
    background: #4169b2;
}

.split-pet {
    background: var(--saffron);
}

.split-empty {
    width: 100%;
    background: #edf0f5 !important;
}

.split-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 7px;
    color: var(--muted-light);
    font-size: 8px;
    font-weight: 600;
}

.split-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.legend-swatch {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 2px;
}

.swatch-pd {
    background: #4169b2;
}

.swatch-pet {
    background: var(--saffron);
}

.activity-total {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    color: var(--navy);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
}

.activity-total small {
    color: var(--muted-light);
    font-family: var(--font-body);
    font-size: 8px;
    font-weight: 700;
}

.trend-chart {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    align-items: end;
    height: 113px;
    margin-top: 14px;
}

.trend-column {
    display: flex;
    align-items: center;
    flex-direction: column;
    height: 100%;
    min-width: 0;
}

.trend-value {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 800;
}

.trend-track {
    display: flex;
    align-items: flex-end;
    width: 100%;
    max-width: 23px;
    height: 69px;
    border-radius: 5px;
    background: #f2f4f8;
}

.trend-bar {
    display: block;
    width: 100%;
    min-height: 4px;
    border-radius: 5px;
    background: linear-gradient(180deg, #ffc34d, var(--saffron));
    box-shadow: 0 3px 8px rgba(244, 163, 0, 0.16);
}

.trend-bar.is-empty {
    background: #dfe5ee;
    box-shadow: none;
}

.trend-label {
    margin-top: 5px;
    color: var(--navy-muted);
    font-size: 8px;
    font-weight: 800;
}

.trend-date {
    margin-top: 1px;
    color: var(--muted-light);
    font-size: 6.8px;
    font-weight: 600;
    white-space: nowrap;
}

.activity-footer {
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid var(--line);
    color: var(--muted-light);
    font-size: 8px;
    font-weight: 600;
}

.activity-footer i {
    margin-right: 3px;
    color: var(--green);
}

.panel {
    border: 1px solid rgba(16, 27, 54, 0.075);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(16, 27, 54, 0.03);
}

.registry-panel {
    margin-top: 13px;
    overflow: hidden;
}

.registry-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 20px 14px;
    border-bottom: 1px solid var(--line);
}

.registry-title-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.registry-title-line h2 {
    margin: 0;
    color: var(--navy);
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.result-count {
    display: inline-grid;
    min-width: 23px;
    height: 19px;
    padding: 0 6px;
    place-items: center;
    border-radius: 999px;
    color: var(--green);
    background: var(--green-soft);
    font-size: 8px;
    font-weight: 800;
}

.registry-title-block p {
    margin: 3px 0 0;
    color: var(--muted-light);
    font-size: 9px;
    font-weight: 600;
}

.export-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 33px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-size: 9px;
    font-weight: 800;
    transition: border-color 0.17s ease, background 0.17s ease;
}

.export-btn i {
    font-size: 13px;
}

.export-excel {
    color: #147a4b;
}

.export-excel:hover {
    border-color: rgba(20, 122, 75, 0.28);
    color: #0b6a3f;
    background: #f4fbf7;
}

.export-pdf {
    color: #b43b3b;
}

.export-pdf:hover {
    border-color: rgba(180, 59, 59, 0.25);
    color: #9c2929;
    background: #fff7f7;
}

.export-btn-disabled {
    color: #aab2bf;
    cursor: not-allowed;
    background: #fafbfc;
}

.applied-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 9px 20px;
    border-bottom: 1px solid var(--line);
    background: #fbfcfe;
}

.applied-filters-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 2px;
    color: var(--muted-light);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.applied-chip {
    padding: 4px 8px;
    border: 1px solid #e5e9f0;
    border-radius: 6px;
    color: var(--muted);
    background: #fff;
    font-size: 8.5px;
    font-weight: 600;
}

.applied-chip strong {
    color: var(--navy-muted);
    font-weight: 800;
}

.applied-clear {
    margin-left: 2px;
    color: var(--danger);
    font-size: 8.5px;
    font-weight: 800;
}

.applied-clear:hover {
    color: #9d2c2c;
    text-decoration: underline;
}

.registry-table-wrap {
    scrollbar-width: thin;
    scrollbar-color: #d7dee8 #f8fafc;
}

.registry-table {
    min-width: 940px;
    margin: 0;
    --bs-table-bg: transparent;
}

.registry-table thead th {
    padding: 10px 15px;
    border-bottom: 1px solid var(--line);
    color: var(--muted-light);
    background: #fbfcfe;
    font-size: 7.8px;
    font-weight: 800;
    letter-spacing: 0.075em;
    text-transform: uppercase;
    white-space: nowrap;
}

.registry-table thead th:first-child,
.registry-table tbody td:first-child {
    padding-left: 20px;
}

.registry-table thead th:last-child,
.registry-table tbody td:last-child {
    padding-right: 20px;
}

.registry-table tbody td {
    padding: 11px 15px;
    border-bottom: 1px solid #f0f2f6;
    vertical-align: middle;
}

.registry-table tbody tr {
    transition: background 0.15s ease;
}

.registry-table tbody tr:hover {
    background: #fcfdff;
}

.registry-table tbody tr:last-child td {
    border-bottom: 0;
}

.referee-cell {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 170px;
}

.referee-avatar,
.record-avatar {
    display: grid;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 9px;
    font-family: var(--font-display);
    font-size: 9.5px;
    font-weight: 800;
}

.avatar-saffron {
    color: #8c5d00;
    background: #fff1d4;
}

.avatar-green {
    color: #08714d;
    background: #e8f8f1;
}

.avatar-blue {
    color: #31599d;
    background: #edf3ff;
}

.avatar-violet {
    color: #72449c;
    background: #f4eefb;
}

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

.referee-copy strong {
    overflow: hidden;
    max-width: 180px;
    color: var(--navy);
    font-size: 10.8px;
    font-weight: 800;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.referee-copy span {
    margin-top: 2px;
    color: var(--muted-light);
    font-family: var(--font-display);
    font-size: 7px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    min-height: 21px;
    padding: 4px 7px;
    border-radius: 5px;
    font-size: 7.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.role-pd {
    color: #31599d;
    background: #edf3ff;
}

.role-pet {
    color: #926000;
    background: #fff4dc;
}

.school-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    max-width: 235px;
}

.district-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border: 1px solid rgba(16, 27, 54, 0.07);
    border-radius: 6px;
    color: var(--navy-muted);
    background: #f3f6fb;
    font-size: 8.5px;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
}

.district-tag i {
    color: var(--saffron);
    font-size: 9px;
}

.school-name {
    overflow: hidden;
    max-width: 230px;
    color: var(--navy-muted);
    font-size: 9.5px;
    font-weight: 600;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pmshri-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--green);
    font-size: 7.5px;
    font-weight: 800;
}

.school-type {
    color: var(--muted-light);
    font-size: 7.5px;
    font-weight: 600;
}

.mobile-link {
    color: var(--navy-muted);
    font-size: 9.5px;
    font-weight: 700;
    white-space: nowrap;
}

.mobile-link:hover {
    color: var(--green);
}

.qualification-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.qual-badge {
    display: inline-flex;
    align-items: center;
    min-height: 19px;
    padding: 3px 6px;
    border-radius: 5px;
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 0.035em;
}

.qual-state {
    color: #31599d;
    background: #eef3ff;
}

.qual-national {
    color: #906200;
    background: #fff3d8;
}

.registered-date {
    display: block;
    color: var(--navy-muted);
    font-size: 9.2px;
    font-weight: 700;
    white-space: nowrap;
}

.registered-time {
    display: block;
    margin-top: 1px;
    color: var(--muted-light);
    font-size: 7.8px;
    font-weight: 600;
}

.row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
}

.row-action-btn {
    display: inline-grid;
    width: 29px;
    height: 29px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--muted);
    background: #fff;
    font-size: 11px;
    transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.row-action-btn:hover {
    border-color: #cbd4e1;
    color: var(--navy);
    background: #f8fafc;
}

.registry-panel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 20px;
    border-top: 1px solid var(--line);
    background: #fbfcfe;
}

.footer-range {
    color: var(--muted-light);
    font-size: 8.5px;
    font-weight: 600;
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 3px;
}

.page-btn {
    display: inline-grid;
    min-width: 27px;
    height: 27px;
    padding: 0 6px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--muted);
    background: transparent;
    font-size: 8.5px;
    font-weight: 800;
}

.page-btn:hover {
    border-color: var(--line);
    color: var(--navy);
    background: #fff;
}

.page-btn.active {
    border-color: var(--navy);
    color: #fff;
    background: var(--navy);
}

.page-btn.is-disabled {
    color: #c4cbd6;
    pointer-events: none;
}

.page-arrow {
    border-color: var(--line);
    background: #fff;
}

.empty-state {
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: 48px 24px 52px;
    text-align: center;
}

.empty-icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin-bottom: 15px;
    place-items: center;
    border-radius: 16px;
    color: var(--green);
    background: var(--green-soft);
    font-size: 24px;
}

.empty-state h3 {
    margin: 0;
    color: var(--navy);
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.empty-state p {
    max-width: 370px;
    margin: 6px 0 16px;
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.6;
}

.dashboard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 32px 21px;
    color: var(--muted-light);
    font-size: 8.5px;
    font-weight: 600;
}

/* Registry modal */
.registry-modal {
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 32px 80px rgba(16, 27, 54, 0.22);
}

.modal-loading {
    display: flex;
    min-height: 220px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 11px;
    color: var(--muted);
    font-size: 10.5px;
}

.modal-loading .spinner-border {
    width: 21px;
    height: 21px;
    color: var(--saffron) !important;
}

.registry-modal-header {
    align-items: flex-start;
    padding: 21px 23px 18px;
    border-bottom: 1px solid var(--line);
}

.modal-kicker {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
    color: var(--green);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.modal-title {
    margin: 0;
    color: var(--navy);
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.modal-reference {
    display: block;
    margin-top: 3px;
    color: var(--muted-light);
    font-family: var(--font-display);
    font-size: 8px;
    font-weight: 600;
}

.modal-close {
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: #fff;
    font-size: 11px;
}

.modal-close:hover {
    color: var(--navy);
    background: #f8fafc;
}

.registry-modal-body {
    padding: 20px 23px 17px;
}

.record-profile {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 15px;
}

.record-avatar {
    width: 46px;
    height: 46px;
    font-size: 12px;
}

.record-profile-copy {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.record-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.record-detail-card {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fcfdff;
}

.record-detail-full {
    grid-column: 1 / -1;
}

.record-detail-icon {
    display: grid;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 7px;
    color: var(--navy-muted);
    background: #eef2f8;
    font-size: 11px;
}

.record-detail-icon.qualification-icon {
    color: #946400;
    background: var(--saffron-soft);
}

.record-detail-card > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.record-detail-label {
    margin-bottom: 3px;
    color: var(--muted-light);
    font-size: 7.5px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.record-detail-value {
    color: var(--navy);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.45;
    word-break: break-word;
}

a.record-detail-value:hover {
    color: var(--green);
}

.record-qualification {
    margin-top: 2px;
}

.record-timeline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: var(--muted-light);
    font-size: 8px;
    font-weight: 600;
}

.record-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--green);
    font-weight: 800;
}

.record-status span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
}

.registry-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 23px;
    border-top: 1px solid var(--line);
    background: #fbfcfe;
}

.record-delete-form {
    margin: 0;
}

.btn-record-delete {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid rgba(198, 66, 66, 0.18);
    border-radius: 7px;
    color: var(--danger);
    background: #fff8f7;
    font-size: 9px;
    font-weight: 800;
}

.btn-record-delete:hover {
    background: #fff1ef;
}

.record-footer-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.btn-record-cancel {
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--muted);
    background: #fff;
    font-size: 9px;
    font-weight: 700;
}

.btn-record-edit {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid var(--navy);
    border-radius: 7px;
    color: #fff;
    background: var(--navy);
    font-size: 9px;
    font-weight: 800;
}

.btn-record-edit:hover {
    color: #fff;
    background: var(--navy-soft);
}

/* Edit view */
.edit-page-heading {
    align-items: flex-end;
}

.edit-back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 700;
}

.edit-back-link:hover {
    color: var(--navy);
}

.edit-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    align-items: start;
    gap: 15px;
}

.edit-form-card {
    border-radius: 16px;
    box-shadow: 0 7px 22px rgba(16, 27, 54, 0.035);
}

.edit-form-card .registration-card-header {
    padding: 21px 23px;
    border-radius: 16px 16px 0 0;
}

.edit-form-card .registration-header-copy h2 {
    font-size: 18px;
}

.edit-form-card .registration-card-body {
    padding: 23px;
}

.edit-form-card .form-section-heading h3 {
    font-size: 13px;
}

.edit-form-card .form-section-heading p {
    font-size: 10px;
}

.edit-form-card .field-label {
    font-size: 10px;
}

.edit-form-card .field-control {
    min-height: 42px;
    font-size: 11.5px;
}

.edit-form-card .role-choice-inner,
.edit-form-card .qualification-inner {
    min-height: 64px;
}

.edit-form-card .binary-choice-inner {
    min-height: 57px;
}

.edit-form-card .role-copy strong,
.edit-form-card .qualification-copy strong,
.edit-form-card .binary-choice-inner strong {
    font-size: 10.5px;
}

.edit-form-card .role-copy small,
.edit-form-card .qualification-copy small,
.edit-form-card .binary-choice-inner small,
.edit-form-card .field-hint {
    font-size: 9px;
}

.edit-form-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.edit-side-column {
    display: grid;
    gap: 11px;
}

.edit-side-card {
    padding: 17px;
    border: 1px solid rgba(16, 27, 54, 0.075);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(16, 27, 54, 0.03);
}

.edit-side-kicker {
    display: block;
    margin-bottom: 12px;
    color: var(--green);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.edit-side-profile {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--line);
}

.edit-side-profile > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.edit-side-profile strong {
    color: var(--navy);
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.35;
}

.edit-side-profile span:not(.record-avatar) {
    margin-top: 2px;
    color: var(--muted-light);
    font-family: var(--font-display);
    font-size: 7px;
    font-weight: 600;
}

.edit-side-list {
    display: grid;
    gap: 0;
    margin-top: 3px;
}

.edit-side-list > div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f7;
}

.edit-side-list > div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.edit-side-list span {
    color: var(--muted-light);
    font-size: 8.5px;
    font-weight: 600;
}

.edit-side-list strong {
    max-width: 155px;
    color: var(--navy);
    font-size: 8.5px;
    font-weight: 800;
    text-align: right;
}

.edit-tip-card {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 13px;
    border: 1px solid rgba(11, 122, 83, 0.12);
    border-radius: 12px;
    background: #f8fdfb;
}

.edit-tip-icon {
    display: grid;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 7px;
    color: var(--green);
    background: #fff;
    font-size: 12px;
}

.edit-tip-card strong {
    display: block;
    color: var(--navy);
    font-size: 9px;
    font-weight: 800;
}

.edit-tip-card p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 8px;
    line-height: 1.55;
}

.edit-tip-danger {
    border-color: rgba(198, 66, 66, 0.12);
    background: #fffafa;
}

.edit-tip-danger .edit-tip-icon {
    color: var(--danger);
}

.form-submit .edit-form-actions .btn-akfi-secondary {
    min-height: 42px;
    padding: 10px 14px;
    font-size: 10.5px;
}

.form-submit .edit-form-actions .btn-akfi {
    min-height: 42px;
    padding: 10px 16px;
    font-size: 10.5px;
}

/* Authentication */
.auth-page {
    min-height: 100vh;
    padding: 24px;
    color: var(--ink);
    background:
        radial-gradient(circle at 15% 15%, rgba(244, 163, 0, 0.12), transparent 25rem),
        radial-gradient(circle at 90% 85%, rgba(11, 122, 83, 0.12), transparent 28rem),
        #0b1327;
    font-family: var(--font-body);
    overflow-x: hidden;
}

.auth-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.18;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(circle at center, black, transparent 72%);
}

.auth-backdrop {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.auth-orbit {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 50%;
}

.auth-orbit-one {
    width: 690px;
    height: 690px;
    top: -350px;
    right: -210px;
}

.auth-orbit-two {
    width: 430px;
    height: 430px;
    bottom: -230px;
    left: -120px;
}

.auth-orbit-three {
    width: 240px;
    height: 240px;
    right: 8%;
    bottom: -140px;
    border-color: rgba(244, 163, 0, 0.13);
}

.auth-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(430px, 0.94fr);
    width: min(1120px, 100%);
    min-height: min(740px, calc(100vh - 48px));
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 27px;
    background: #fff;
    box-shadow: 0 35px 100px rgba(0, 0, 0, 0.35);
}

.auth-brand-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 35px 39px 25px;
    color: #fff;
    background:
        radial-gradient(circle at 85% 25%, rgba(244, 163, 0, 0.23), transparent 20rem),
        radial-gradient(circle at 10% 85%, rgba(11, 122, 83, 0.18), transparent 20rem),
        linear-gradient(145deg, #101b36, #0c1529 77%, #0a1121);
    position: relative;
    overflow: hidden;
}

.auth-brand-panel::after {
    content: "";
    position: absolute;
    right: -170px;
    bottom: -170px;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    box-shadow: 0 0 0 55px rgba(255, 255, 255, 0.025), 0 0 0 110px rgba(255, 255, 255, 0.018);
}

.auth-brand-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 11px;
}

.auth-emblem {
    width: 47px;
    height: 47px;
    border-radius: 14px;
}

.auth-emblem-small {
    width: 39px;
    height: 39px;
    border-radius: 11px;
}

.auth-emblem-small .brand-emblem-ring {
    inset: 6px;
    border-radius: 7px;
}

.auth-emblem-small .brand-emblem-text {
    font-size: 8.5px;
}

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

.auth-brand-copy strong {
    color: #fff;
    font-family: var(--font-display);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.auth-brand-copy small {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    max-width: 440px;
    padding: 38px 0 32px;
}

.auth-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--saffron-bright);
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.auth-kicker-line {
    width: 19px;
    height: 1.5px;
    background: var(--saffron);
}

.auth-brand-content h1 {
    margin: 18px 0 16px;
    color: #fff;
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 4vw, 3.7rem);
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 1.03;
}

.auth-brand-content > p {
    max-width: 390px;
    margin: 0;
    color: rgba(255, 255, 255, 0.56);
    font-size: 12.5px;
    line-height: 1.75;
}

.auth-feature-list {
    display: grid;
    gap: 13px;
    margin-top: 34px;
}

.auth-feature {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.auth-feature > span {
    display: grid;
    flex: 0 0 auto;
    width: 29px;
    height: 29px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    color: var(--saffron-bright);
    background: rgba(255, 255, 255, 0.055);
    font-size: 12px;
}

.auth-feature strong {
    display: block;
    color: rgba(255, 255, 255, 0.88);
    font-size: 9.8px;
    font-weight: 800;
}

.auth-feature small {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.37);
    font-size: 8.5px;
    line-height: 1.45;
}

.auth-brand-footer {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.075);
    color: rgba(255, 255, 255, 0.28);
    font-size: 8px;
    font-weight: 600;
}

.auth-form-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 24px 35px 20px;
    background: #fff;
}

.auth-form-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.auth-mobile-brand {
    display: none;
    align-items: center;
    gap: 8px;
    color: var(--navy);
    font-family: var(--font-display);
    font-size: 10.5px;
    font-weight: 700;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
}

.auth-back-link:hover {
    color: var(--navy);
}

.auth-form-wrap {
    width: min(355px, 100%);
    margin: auto;
    padding: 26px 0 20px;
}

.auth-form-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border-radius: 999px;
    color: var(--green);
    background: var(--green-soft);
    font-size: 7.5px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.auth-form-wrap h2 {
    margin: 16px 0 7px;
    color: var(--navy);
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.045em;
}

.auth-lead {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.65;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-bottom: 14px;
    padding: 10px 11px;
    border: 1px solid rgba(198, 66, 66, 0.18);
    border-radius: 9px;
    color: #9d2c2c;
    background: var(--danger-soft);
    font-size: 9.5px;
    font-weight: 600;
    line-height: 1.5;
}

.auth-form {
    display: grid;
    gap: 13px;
}

.auth-field label {
    display: block;
    margin-bottom: 6px;
    color: var(--navy);
    font-size: 9.5px;
    font-weight: 800;
}

.auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.auth-label-note {
    color: var(--muted-light);
    font-size: 7.5px;
    font-weight: 600;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap > i {
    position: absolute;
    top: 50%;
    left: 12px;
    z-index: 2;
    color: var(--muted-light);
    font-size: 13px;
    transform: translateY(-50%);
    pointer-events: none;
}

.auth-control {
    min-height: 43px;
    padding: 10px 12px 10px 35px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    color: var(--ink);
    background: #fcfdff;
    font-size: 11px;
    font-weight: 600;
    transition: border-color 0.17s ease, box-shadow 0.17s ease;
}

.auth-control:focus {
    border-color: var(--saffron);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(244, 163, 0, 0.12);
}

.auth-password-wrap .auth-control {
    padding-right: 38px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 0;
    border-radius: 6px;
    color: var(--muted-light);
    background: transparent;
    font-size: 12px;
    transform: translateY(-50%);
}

.password-toggle:hover {
    color: var(--navy);
    background: #f2f5f9;
}

.auth-field-error {
    margin: 4px 0 0;
    color: var(--danger);
    font-size: 8.5px;
    font-weight: 700;
}

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 44px;
    margin-top: 3px;
    padding: 11px 15px;
    border: 0;
    border-radius: 9px;
    color: var(--navy);
    background: linear-gradient(135deg, var(--saffron-bright), var(--saffron));
    box-shadow: 0 9px 18px rgba(244, 163, 0, 0.2);
    font-size: 10.5px;
    font-weight: 800;
    transition: filter 0.17s ease, transform 0.17s ease;
}

.auth-submit:hover {
    filter: saturate(1.06);
    transform: translateY(-1px);
}

.auth-security-note {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 17px;
    padding: 9px 10px;
    border-radius: 8px;
    color: var(--muted-light);
    background: #f8fafc;
    font-size: 8px;
    font-weight: 600;
    line-height: 1.5;
}

.auth-security-note i {
    margin-top: 1px;
    color: var(--green);
}

.auth-footer {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--muted-light);
    font-size: 7.5px;
    font-weight: 600;
}

@media (max-width: 1399.98px) {
    .stats-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .insights-grid {
        grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    }
}

@media (max-width: 1199.98px) {
    .dashboard-sidebar {
        transform: translateX(-100%);
    }

    .dashboard-main {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: grid;
    }

    .dashboard-body.sidebar-open .dashboard-sidebar {
        transform: translateX(0);
    }

    .dashboard-body.sidebar-open .sidebar-scrim {
        display: block;
    }

    .auth-shell {
        grid-template-columns: minmax(0, 1fr) minmax(390px, 0.9fr);
    }

    .auth-brand-panel {
        padding: 30px;
    }

    .auth-feature-list {
        margin-top: 26px;
    }

    .edit-layout {
        grid-template-columns: minmax(0, 1fr) 265px;
    }
}

@media (max-width: 991.98px) {
    .dashboard-content {
        padding: 24px 22px 32px;
    }

    .dashboard-topbar {
        padding: 12px 22px;
    }

    .dashboard-footer {
        padding: 14px 22px 20px;
    }

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

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

    .edit-layout {
        grid-template-columns: 1fr;
    }

    .edit-side-column {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .edit-side-card {
        grid-row: span 2;
    }

    .auth-page {
        padding: 14px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        width: min(540px, 100%);
        min-height: calc(100vh - 28px);
    }

    .auth-brand-panel {
        display: none;
    }

    .auth-mobile-brand {
        display: inline-flex;
    }

    .auth-form-panel {
        min-height: calc(100vh - 28px);
        padding: 22px 26px 18px;
    }

    .auth-form-wrap {
        padding-top: 35px;
    }
}

@media (max-width: 767.98px) {
    .dashboard-topbar {
        min-height: 68px;
        padding: 10px 15px;
    }

    .topbar-title h1 {
        font-size: 14px;
    }

    .topbar-title span {
        font-size: 7.5px;
    }

    .dashboard-content {
        padding: 20px 14px 28px;
    }

    .dashboard-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
        padding: 13px 14px 19px;
    }

    .dashboard-heading,
    .edit-page-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
        margin-bottom: 17px;
    }

    .dashboard-heading h2,
    .edit-page-heading h2 {
        font-size: 1.35rem;
    }

    .dashboard-heading-actions {
        width: 100%;
    }

    .dashboard-heading-actions .btn-dashboard-primary,
    .dashboard-heading-actions .btn-dashboard-secondary {
        flex: 1;
    }

    .public-edit-control {
        width: 100%;
        justify-content: space-between;
    }

    .quick-find {
        align-items: flex-start;
        flex-direction: column;
        gap: 11px;
        padding: 14px 15px;
    }

    .quick-find-form {
        flex: 1 1 auto;
        width: 100%;
    }

    .filter-card {
        padding: 16px;
    }

    .filter-card-header {
        margin-bottom: 14px;
    }

    .filter-actions {
        flex-wrap: wrap;
    }

    .filter-auto-note {
        width: 100%;
        margin: 1px 0 0;
    }

    .stats-grid {
        gap: 9px;
        margin-top: 12px;
    }

    .stat-card {
        min-height: 140px;
        padding: 13px 13px 12px;
    }

    .stat-icon {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .stat-value {
        font-size: 23px;
    }

    .stat-context {
        display: none;
    }

    .insights-grid {
        gap: 9px;
        margin-top: 9px;
    }

    .insight-card {
        padding: 16px;
    }

    .registry-panel {
        margin-top: 9px;
    }

    .registry-panel-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 11px;
        padding: 15px 16px;
    }

    .export-actions {
        width: 100%;
    }

    .export-btn {
        flex: 1;
        justify-content: center;
    }

    .applied-filters {
        padding: 8px 16px;
    }

    .registry-panel-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
        padding: 11px 16px;
    }

    .pagination-nav {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .record-details-grid {
        grid-template-columns: 1fr;
    }

    .registry-modal-footer {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .record-footer-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .record-footer-actions .btn-record-cancel,
    .record-footer-actions .btn-record-edit {
        justify-content: center;
    }

    .record-delete-form .btn-record-delete {
        width: 100%;
        justify-content: center;
    }

    .record-timeline {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .edit-side-column {
        grid-template-columns: 1fr;
    }

    .edit-side-card {
        grid-row: auto;
    }

    .edit-form-card .registration-card-body {
        padding: 18px 15px;
    }

    .edit-form-card .registration-card-header {
        padding: 18px 16px;
    }

    .form-submit .edit-form-actions {
        width: 100%;
    }

    .form-submit .edit-form-actions .btn-akfi,
    .form-submit .edit-form-actions .btn-akfi-secondary {
        flex: 1;
        justify-content: center;
    }

    .auth-page {
        padding: 0;
    }

    .auth-shell {
        min-height: 100vh;
        border-radius: 0;
        border: 0;
        box-shadow: none;
    }

    .auth-form-panel {
        min-height: 100vh;
        padding: 20px 20px 16px;
    }

    .auth-form-wrap {
        padding: 28px 0 20px;
    }

    .auth-form-wrap h2 {
        font-size: 25px;
    }

    .auth-footer {
        flex-direction: column;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-find-form {
        flex-wrap: wrap;
    }

    .btn-quick-find {
        width: 100%;
    }

    .stat-card {
        min-height: auto;
    }

    .stat-context {
        display: inline;
    }

    .topbar-date,
    .topbar-form-link {
        display: none !important;
    }

    .filter-loading {
        font-size: 7.5px;
    }

    .trend-chart {
        gap: 3px;
    }

    .trend-date {
        font-size: 6px;
    }

    .record-details-grid {
        grid-template-columns: 1fr;
    }

    .record-profile {
        align-items: flex-start;
        flex-direction: column;
    }

    .registry-modal-body {
        padding: 16px;
    }

    .registry-modal-header {
        padding: 17px 16px 14px;
    }

    .registry-modal-footer {
        padding: 12px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-sidebar,
    .stat-card,
    .meter-fill,
    .row-action-btn,
    .auth-submit,
    .trend-bar {
        transition: none !important;
        animation: none !important;
    }
}
