/* ARMS theme — approved purple + teal design (Reference Data/ARMS_Design_Package spec). All colours live here as tokens. */
:root {
    --arms-primary: #6F42C1;
    --arms-primary-dark: #59339D;
    --arms-primary-soft: #F0EAF8;
    --arms-teal: #0F766E;
    --arms-teal-dark: #0B5E58;
    --arms-teal-soft: #E0F2F0;
    --arms-sidebar-bg: #F8F9FC;
    --arms-page-bg: #F7F8FC;
    --arms-surface: #FFFFFF;
    --arms-text: #20243A;
    --arms-text-muted: #667085;
    --arms-border: #E4E7EF;
    --arms-input-border: #D0D5DD;
    --arms-table-head-bg: #EDE7F8;
    --arms-table-head-text: #493078;
    --arms-table-stripe: #F5F3FA;
    --arms-table-hover: #E8F3F1;
    --arms-soft-button-border: #A78BDA;
    --arms-sidebar-width: 270px;
    --arms-sidebar-collapsed: 72px;
    --arms-navbar-height: 64px;

    --bs-primary: #6F42C1;
    --bs-primary-rgb: 111, 66, 193;
    --bs-link-color: #0F766E;
    --bs-link-hover-color: #0B5E58;
    --bs-body-color: #20243A;
    --bs-body-bg: #F7F8FC;
    --bs-border-color: #E4E7EF;
    --bs-body-font-size: .9375rem;
    --bs-body-font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --lte-sidebar-width: var(--arms-sidebar-width);
}

body { color: var(--arms-text); background: var(--arms-page-bg); }
.text-muted, .text-body-secondary { color: var(--arms-text-muted) !important; }
a:focus-visible, button:focus-visible, .form-control:focus-visible, .form-select:focus-visible { outline: 2px solid var(--arms-primary); outline-offset: 2px; }

/* Buttons and inputs */
.btn { border-radius: 7px; min-height: 40px; font-weight: 500; }
.btn-sm { min-height: 32px; }
.btn-primary { --bs-btn-bg: var(--arms-primary); --bs-btn-border-color: var(--arms-primary); --bs-btn-hover-bg: var(--arms-primary-dark); --bs-btn-hover-border-color: var(--arms-primary-dark); --bs-btn-active-bg: var(--arms-primary-dark); --bs-btn-active-border-color: var(--arms-primary-dark); --bs-btn-disabled-bg: var(--arms-primary); --bs-btn-disabled-border-color: var(--arms-primary); }
.btn-teal { --bs-btn-color: #fff; --bs-btn-bg: var(--arms-teal); --bs-btn-border-color: var(--arms-teal); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--arms-teal-dark); --bs-btn-hover-border-color: var(--arms-teal-dark); --bs-btn-active-bg: var(--arms-teal-dark); --bs-btn-active-color: #fff; }
.btn-outline-primary { --bs-btn-color: var(--arms-primary); --bs-btn-border-color: var(--arms-primary); --bs-btn-hover-bg: var(--arms-primary); --bs-btn-hover-border-color: var(--arms-primary); --bs-btn-active-bg: var(--arms-primary-dark); }
.btn-outline-teal { --bs-btn-color: var(--arms-teal); --bs-btn-border-color: var(--arms-teal); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--arms-teal); --bs-btn-hover-border-color: var(--arms-teal); --bs-btn-active-bg: var(--arms-teal-dark); --bs-btn-active-border-color: var(--arms-teal-dark); --bs-btn-active-color: #fff; }
.btn-outline-secondary { --bs-btn-color: var(--arms-text); --bs-btn-border-color: var(--arms-input-border); --bs-btn-hover-bg: var(--arms-teal-soft); --bs-btn-hover-color: var(--arms-teal-dark); --bs-btn-hover-border-color: var(--arms-teal); }
.form-label { font-weight: 600; font-size: .875rem; margin-bottom: .3rem; }
.form-control, .form-select { min-height: 42px; border-color: var(--arms-input-border); border-radius: 7px; }
.form-control:focus, .form-select:focus { border-color: var(--arms-primary); box-shadow: 0 0 0 .2rem rgba(111, 66, 193, .2); }
.form-check-input:checked { background-color: var(--arms-teal); border-color: var(--arms-teal); }

/* Cards and tables */
.card { border: 1px solid var(--arms-border); border-radius: 9px; box-shadow: none; background: var(--arms-surface); }
.card-header { background: var(--arms-surface); font-weight: 600; font-size: 1rem; border-bottom: 1px solid var(--arms-border); }
.card-body { padding: 1.1rem 1.25rem; }
.table { font-size: .875rem; --bs-table-bg: transparent; }
.table > thead th { font-size: .8rem; font-weight: 600; color: var(--arms-table-head-text); background: var(--arms-table-head-bg); border-bottom: 1px solid var(--arms-input-border); white-space: normal; overflow-wrap: break-word; vertical-align: bottom; }   /* long headings wrap; add .text-nowrap to a heading to keep it on one line */
/* Zebra rows and hover use Bootstrap's own row-colour variables, so badges, links and buttons keep their colours. */
.table > tbody > tr:nth-of-type(odd) > * { --bs-table-bg-type: #FFFFFF; }
.table > tbody > tr:nth-of-type(even) > * { --bs-table-bg-type: var(--arms-table-stripe); }
.table > tbody > tr:hover > * { --bs-table-bg-state: var(--arms-table-hover); }
.table > :not(caption) > * > * { padding: .65rem .85rem; vertical-align: middle; }
.table-responsive { border: 1px solid var(--arms-border); border-radius: 9px; background: var(--arms-surface); }
.table-responsive > .table { min-width: 36rem; }   /* wide tables scroll inside their own container; the page itself never scrolls sideways */
.table-responsive > .table td { white-space: nowrap; }   /* one line per row keeps row heights even when the table is wider than the screen */
.arms-card-title { font-weight: 600; }
.arms-date-box { background: var(--arms-teal-soft); color: var(--arms-teal-dark); border-radius: 7px; padding: .4rem .8rem; font-weight: 600; font-size: .875rem; display: inline-flex; align-items: center; gap: .5rem; line-height: 1; }
.arms-date-box .bi { display: block; font-size: 1rem; line-height: 1; }
.arms-date-box .bi::before { display: block; vertical-align: 0; }   /* Bootstrap Icons lowers the glyph by .125em; that offset made the icon sit low */
.arms-date-text { display: block; line-height: 1.25; position: relative; top: 1px; }   /* Source Sans caps sit above the line-box centre; 1px lines them up with the icon */
.arms-simulated-banner { background: #FEF3C7; color: #78350F; border-bottom: 2px solid #D97706; padding: .4rem 1rem; font-weight: 600; text-align: center; }

/* Top navbar */
.arms-navbar { height: var(--arms-navbar-height); background: #FFFFFF; border-bottom: 1px solid #DDE3ED; box-shadow: 0 2px 8px rgba(30, 41, 59, .06); padding: 0; }
.arms-navbar .nav-link { color: var(--arms-text); }
.arms-toggle { font-size: 1.4rem; min-width: 40px; min-height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 6px; }
.arms-toggle:hover { background: var(--arms-teal-soft); color: var(--arms-teal-dark); }
.arms-identity { display: flex; flex-direction: column; line-height: 1.2; margin-left: .5rem; }
.arms-identity-title { font-size: 1.0625rem; font-weight: 600; color: var(--arms-text); }
.arms-identity-slogan { font-size: .75rem; color: var(--arms-text-muted); }
.arms-bell, .arms-user { font-size: 1.15rem; }
.arms-user { font-size: .9375rem; font-weight: 600; }
.arms-user .bi { font-size: 1.6rem; vertical-align: middle; color: var(--arms-primary); }

/* Sidebar (light) */
.arms-sidebar { background: var(--arms-sidebar-bg); border-right: 1px solid var(--arms-border); --lte-sidebar-width: var(--arms-sidebar-width);
    --lte-sidebar-color: var(--arms-text); --lte-sidebar-hover-color: var(--arms-teal-dark); --lte-sidebar-hover-bg: var(--arms-teal-soft);
    --lte-sidebar-menu-active-color: var(--arms-primary-dark); --lte-sidebar-menu-active-bg: var(--arms-primary-soft);
    --lte-sidebar-submenu-color: var(--arms-text); --lte-sidebar-submenu-hover-color: var(--arms-teal-dark); --lte-sidebar-submenu-hover-bg: var(--arms-teal-soft);
    --lte-sidebar-submenu-active-color: var(--arms-primary-dark); --lte-sidebar-submenu-active-bg: var(--arms-primary-soft); }
.arms-sidebar .sidebar-brand { height: 96px; border-bottom: 1px solid var(--arms-border); padding: .75rem 1.1rem; justify-content: flex-start; white-space: normal; }
.arms-brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; color: var(--arms-text); line-height: 1.2; }
.arms-brand-logo { height: 68px; width: auto; flex: 0 0 auto; object-fit: contain; }
.arms-brand-text { display: flex; flex-direction: column; }
.arms-brand-title { font-weight: 600; font-size: .9375rem; color: var(--arms-text); }
.arms-brand-sub { font-size: .75rem; color: var(--arms-text-muted); margin-top: .15rem; }
.arms-sidebar .sidebar-wrapper { padding: .5rem .75rem 1rem; scrollbar-width: thin; scrollbar-gutter: stable; }
.arms-sidebar .sidebar-wrapper::-webkit-scrollbar { width: 6px; }
.arms-sidebar .sidebar-wrapper::-webkit-scrollbar-thumb { background: var(--arms-border); border-radius: 3px; }
.arms-sidebar .nav-link { border-radius: 7px; padding: .55rem .8rem; line-height: 1.25; border-left: 3px solid transparent; align-items: center; white-space: normal; }
.arms-sidebar .nav-link p { margin: 0; font-size: .9rem; font-weight: 500; white-space: normal; }
.arms-sidebar .nav-link .nav-icon { color: var(--arms-teal); font-size: 1.1rem; width: 1.5rem; flex: 0 0 auto; }
.arms-sidebar .nav-link .nav-arrow { color: var(--arms-text-muted); }
.arms-sidebar .nav-link:hover, .arms-sidebar .nav-link:focus { border-left-color: var(--arms-teal); }
.arms-sidebar .nav-link:hover .nav-icon { color: var(--arms-teal-dark); }
.arms-sidebar .nav-link.active { border-left-color: var(--arms-primary); }
.arms-sidebar .nav-link.active p { font-weight: 600; }
.arms-sidebar .nav-link.active .nav-icon { color: var(--arms-primary); }
/* An opened group (e.g. Settings) is not a hover: only a hovered or active row is tinted */
.sidebar-wrapper .sidebar-menu > .nav-item.menu-open > .nav-link:not(.active):not(:hover):not(:focus) { background-color: transparent; color: var(--arms-text); }
.arms-sidebar .nav-link.arms-link-button { width: 100%; text-align: left; background: none; border: 0; border-left: 3px solid transparent; display: flex; }
.arms-sidebar .nav-treeview { padding-left: .6rem; }
.arms-sidebar .nav-treeview .nav-link p { font-size: .84rem; font-weight: 400; }
.arms-category { margin-top: .6rem; }
.arms-category-label { display: flex; align-items: center; gap: .5rem; background: var(--arms-primary-soft); color: var(--arms-primary-dark); font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; padding: .5rem .8rem; border-radius: 7px; margin-bottom: .2rem; min-height: 34px; }
.arms-category-items { padding-left: .25rem; }
.arms-category-items .nav-link p { font-size: .875rem; }

/* Collapsed (72 px): icons only, flyout never needed because titles + expand-on-toggle keep access */
.sidebar-mini.sidebar-collapse .arms-sidebar { min-width: var(--arms-sidebar-collapsed); max-width: var(--arms-sidebar-collapsed); }
.sidebar-mini.sidebar-collapse .arms-sidebar .sidebar-wrapper { padding-left: .5rem; padding-right: .5rem; }
.sidebar-mini.sidebar-collapse .arms-sidebar .sidebar-brand { padding: .6rem 0; justify-content: center; }
.sidebar-mini.sidebar-collapse .arms-brand-text { display: none; }
.sidebar-mini.sidebar-collapse .arms-brand-logo { height: 44px; }
.sidebar-mini.sidebar-collapse .arms-category-label { justify-content: center; padding: .4rem 0; background: transparent; border-bottom: 1px solid var(--arms-border); border-radius: 0; min-height: 0; margin: 0 .5rem .2rem; }
.sidebar-mini.sidebar-collapse .arms-category-label span { display: none; }
.sidebar-mini.sidebar-collapse .arms-sidebar .nav-link { width: 100%; justify-content: center; padding-left: 0; padding-right: 0; }
.sidebar-mini.sidebar-collapse .arms-sidebar .nav-link p { display: none; }
.sidebar-mini.sidebar-collapse .arms-sidebar .nav-treeview { display: block; padding-left: 0; }

/* Content area. AdminLTE styles these as ".app-main .app-content-header" (specificity 0,2,0), so the same selectors are used here;
   header and content share one horizontal gutter so the title lines up with the content below it. */
.app-main { background: var(--arms-page-bg); }
.app-main.arms-main-dashboard { background: #EEF2F8; }  /* dashboard only: clearer separation from the navbar */
.app-main .app-content-header { padding: .9rem 0 0; }
.app-main .app-content { padding: .25rem 0 1.25rem; }
.app-main .app-content-header .container-fluid, .app-main .app-content .container-fluid { padding-left: 1.4rem; padding-right: 1.4rem; }
.arms-page-title { font-size: 1.75rem; font-weight: 600; line-height: 1.15; margin: 0; color: var(--arms-text); }
.app-main .app-content-header .arms-breadcrumb { font-size: .8125rem; line-height: 1.25; margin: 0; }  /* AdminLTE sets line-height: 2.5rem, a 40 px box */
.arms-breadcrumb .breadcrumb-item, .arms-breadcrumb .breadcrumb-item a, .arms-breadcrumb .breadcrumb-item.active { color: var(--arms-text-muted); }
.arms-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem .75rem; margin-bottom: .75rem; }
.arms-toolbar p { margin: 0; }
.arms-toolbar > .btn, .arms-toolbar > .arms-toolbar-actions { margin-left: auto; }  /* action stays on the right, also when it wraps below the description */
.arms-section-heading { display: flex; align-items: center; gap: .5rem; font-size: 1.15rem; font-weight: 600; }
.arms-section-heading .bi { color: var(--arms-primary); }
.badge-status { font-weight: 600; }

/* Mobile: AdminLTE turns the sidebar into an off-canvas drawer with an overlay below 992 px */
@media (max-width: 991.98px) {
    .arms-sidebar { min-width: var(--arms-sidebar-width); max-width: var(--arms-sidebar-width); }
    .arms-identity-title { font-size: .9375rem; }
    .arms-page-title { font-size: 1.4rem; }
}
@media (max-width: 575.98px) {
    .app-main .app-content-header .container-fluid, .app-main .app-content .container-fluid { padding-left: .85rem; padding-right: .85rem; }
}

/* ---- Error pages (compact centred card) ---- */
.arms-guest { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--arms-page-bg); padding: 1rem; }
.arms-guest-card { width: 100%; max-width: 26rem; }
.arms-guest-head { display: flex; align-items: center; gap: .8rem; background: var(--arms-surface); border: 1px solid var(--arms-border); border-bottom: 0; padding: 1rem 1.25rem; border-radius: 9px 9px 0 0; }
.arms-guest-head img { height: 64px; width: auto; }
.arms-guest-head .arms-brand-title { display: block; }
.arms-guest-head small { color: var(--arms-text-muted); display: block; }
.arms-guest-card .card { border-radius: 0 0 9px 9px; }

/* ---- Login page (split) ---- */
.arms-login { min-height: 100vh; display: flex; background: #FFFFFF url('../images/login-background.webp') no-repeat right bottom / cover; }  /* approved artwork, local, never stretched */
.arms-login-art { flex: 0 0 60%; max-width: 60%; position: relative; display: flex; flex-direction: column; padding: 3.6rem 3rem 2rem; color: var(--arms-text); }
.arms-login-logos { display: flex; align-items: center; gap: 1.1rem; }
.arms-login-emblem { height: 118px; width: auto; }
.arms-login-logo { height: 130px; width: auto; }
.arms-login-title { font-size: clamp(2.8rem, 5vw, 3.5rem); font-weight: 700; color: var(--arms-teal-dark); line-height: 1; margin: 1.6rem 0 .4rem; letter-spacing: .01em; }
.arms-login-system { font-size: clamp(1.1rem, 1.8vw, 1.4rem); font-weight: 600; margin: 0 0 1rem; }
.arms-login-slogan { display: inline-block; align-self: flex-start; background: var(--arms-primary); color: #fff; font-style: italic; font-weight: 600; font-size: clamp(1rem, 1.5vw, 1.25rem); padding: .5rem 1.6rem .5rem 1.2rem; border-radius: 6px 24px 6px 6px; }
.arms-login-features { display: flex; gap: 1rem .4rem; margin-top: 2.5rem; flex-wrap: nowrap; justify-content: flex-start; }
.arms-login-feature { display: flex; flex-direction: column; align-items: center; text-align: center; width: 5.6rem; font-size: .8125rem; font-weight: 600; line-height: 1.25; }
.arms-login-feature .bi { font-size: 1.9rem; color: var(--arms-primary); margin-bottom: .35rem; }
.arms-login-ack { margin-top: auto; align-self: flex-start; display: flex; align-items: center; gap: .95rem; background: var(--arms-teal-dark); color: #fff; border-radius: 12px; padding: .65rem 1.5rem .65rem .75rem; box-shadow: 0 6px 16px rgba(11, 94, 88, .28); }
.arms-login-ack .bi { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; flex: none; font-size: 1.4rem; background: rgba(255, 255, 255, .16); border-radius: 9px; }
.arms-login-ack > div { display: flex; flex-direction: column; justify-content: center; gap: .1rem; }
.arms-login-ack strong { display: block; font-size: 1rem; font-weight: 700; line-height: 1.2; }
.arms-login-ack span { font-size: .8rem; line-height: 1.2; opacity: .92; }
.arms-login-panel { flex: 1 1 40%; display: flex; align-items: center; justify-content: flex-end; padding: 2rem 4.5rem 2rem 1.25rem; }  /* card sits right, leaving the map and building clear */
.arms-login-card { width: 100%; max-width: 390px; padding: 1.75rem; border: 1px solid var(--arms-border); border-radius: 18px; background: #FFFFFF; box-shadow: 0 12px 36px rgba(32, 36, 58, .18); }
.arms-login-card h1 { font-size: 1.6rem; font-weight: 700; text-align: center; margin: 0 0 .3rem; color: var(--arms-text); }
.arms-login-card .lead-text { text-align: center; color: var(--arms-text-muted); font-size: .875rem; margin-bottom: 1.25rem; }
.arms-login-card .form-control { min-height: 44px; border-radius: 8px; }
.arms-login-card .btn-signin { min-height: 46px; width: 100%; background: var(--arms-teal); border-color: var(--arms-teal); color: #fff; font-weight: 600; border-radius: 8px; }
.arms-login-card .btn-signin:hover { background: var(--arms-teal-dark); border-color: var(--arms-teal-dark); }
@media (max-width: 991.98px) {
    .arms-login { flex-direction: column; background: #FFFFFF; }
    .arms-login-art { flex: none; max-width: 100%; padding: 1.75rem 1.5rem 1.5rem; align-items: center; text-align: center; }
    .arms-login-logos { justify-content: center; }
    .arms-login-emblem { height: 92px; }
    .arms-login-logo { height: 100px; }
    .arms-login-title { margin-top: 1.1rem; }
    .arms-login-slogan { align-self: center; }
    .arms-login-features { display: grid; grid-template-columns: repeat(2, 7.5rem); justify-content: center; gap: 1rem 1.5rem; margin-top: 1.5rem; flex-wrap: wrap; }
    .arms-login-ack { margin-top: 1.5rem; align-self: center; text-align: left; }
    .arms-login-panel { flex: 1 0 auto; justify-content: center; padding: 2rem 1.25rem; min-height: 34rem; background: url('../images/login-background.webp') no-repeat 68% bottom / cover; }
}

/* Clickable district counts open a read-only modal; modal styling follows the card styling. */
.arms-count-link { font-weight: 600; color: var(--arms-primary-dark); text-decoration: underline; text-underline-offset: 3px; vertical-align: baseline; }
.arms-count-link:hover { color: var(--arms-primary); }
.modal-content { border: 1px solid var(--arms-border); border-radius: 9px; }
.modal-header, .modal-footer { border-color: var(--arms-border); }
.modal-title { font-size: 1.1rem; font-weight: 600; margin: 0; }
/* Dismiss button of every ARMS modal: soft purple, clearly visible but quieter than a primary action. */
.modal-footer .btn[data-bs-dismiss="modal"] { background: var(--arms-table-head-bg); color: var(--arms-table-head-text); border: 1px solid var(--arms-soft-button-border); border-radius: 7px; padding: .4rem 1.1rem; font-weight: 600; }
.modal-footer .btn[data-bs-dismiss="modal"]:hover, .modal-footer .btn[data-bs-dismiss="modal"]:focus-visible { background: #DFD4F3; color: var(--arms-primary-dark); border-color: var(--arms-primary); }

/* ---- Visual prototypes of later-module pages (review aid; local development only) ---- */
.arms-proto-banner { display: flex; gap: .75rem; align-items: flex-start; background: var(--arms-primary-soft); border: 1px dashed var(--arms-primary); color: var(--arms-primary-dark); border-radius: 9px; padding: .75rem 1rem; margin-bottom: 1rem; font-size: .875rem; }
.arms-proto-banner .bi { font-size: 1.25rem; line-height: 1.2; }
.arms-proto-purpose { display: block; margin-top: .25rem; color: var(--arms-text); }
.arms-proto-tabs .nav-link { color: var(--arms-text-muted); cursor: default; }
.arms-proto-tabs .nav-link.active { color: var(--arms-primary-dark); font-weight: 600; border-bottom-color: var(--arms-primary); }
.arms-proto-card { display: flex; align-items: center; gap: .85rem; background: var(--arms-surface); border: 1px solid var(--arms-border); border-left: 4px solid var(--arms-border); border-radius: 9px; padding: .85rem 1rem; height: 100%; }
.arms-proto-card .bi { font-size: 1.6rem; }
.arms-proto-card-value { font-size: 1.4rem; font-weight: 700; line-height: 1.1; color: var(--arms-text-muted); }
.arms-proto-card-label { font-size: .8125rem; color: var(--arms-text); }
.arms-proto-card-primary { border-left-color: var(--arms-primary); } .arms-proto-card-primary .bi { color: var(--arms-primary); }
.arms-proto-card-teal { border-left-color: var(--arms-teal); } .arms-proto-card-teal .bi { color: var(--arms-teal); }
.arms-proto-card-success { border-left-color: #198754; } .arms-proto-card-success .bi { color: #198754; }
.arms-proto-card-warning { border-left-color: #E8A317; } .arms-proto-card-warning .bi { color: #B7791F; }
.arms-proto-card-danger { border-left-color: #DC3545; } .arms-proto-card-danger .bi { color: #DC3545; }
.arms-proto-card-purple { border-left-color: var(--arms-primary); } .arms-proto-card-purple .bi { color: var(--arms-primary); }
.arms-proto-card-secondary .bi { color: var(--arms-text-muted); }
.arms-badge-purple { background: var(--arms-primary); color: #fff; }
.arms-badge-teal { background: var(--arms-teal); color: #fff; }
.arms-proto-kv dt { font-weight: 600; color: var(--arms-text-muted); font-size: .875rem; }
.arms-proto-timeline li { padding: .35rem 0; border-bottom: 1px solid var(--arms-border); font-size: .875rem; }
.arms-proto-timeline li:last-child { border-bottom: 0; }
.arms-proto-timeline .bi { color: var(--arms-primary); margin-right: .35rem; }
.arms-proto-dialog { position: relative; background: var(--arms-surface); border: 1px solid var(--arms-border); border-radius: 9px; box-shadow: 0 8px 24px rgba(32, 36, 58, .1); padding: 1.1rem 1.25rem; max-width: 36rem; }
.arms-proto-dialog-tag { position: absolute; top: -.7rem; left: 1rem; background: var(--arms-primary-soft); color: var(--arms-primary-dark); font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-radius: 5px; padding: .1rem .5rem; }

.arms-skip-link { position: absolute; z-index: 2000; left: .5rem; top: .5rem; background: var(--arms-primary); color: #fff; padding: .4rem .8rem; border-radius: 6px; }
.arms-skip-link:focus { color: #fff; }
.app-main:focus { outline: none; }

/* Calendar Activities: vertically scrollable one-row-per-record tables */
.arms-scroll-table { max-height: 68vh; overflow: auto; background: #fff; border: 1px solid var(--arms-border, #DDE3ED); border-radius: .5rem; }
.arms-scroll-table > .table { margin-bottom: 0; }
.arms-scroll-table thead th { position: sticky; top: 0; z-index: 2; white-space: normal; min-width: 5.5rem; }   /* headings wrap; rows grow with their content */
.arms-scroll-table thead th.text-end { min-width: 6rem; }
.arms-cell-text { min-width: 8.5rem; max-width: 15rem; white-space: pre-line; overflow-wrap: anywhere; }
/* Reusable table helpers (all tables): wrapped long text, safe URLs, never-split short values and button groups. */
.arms-wrap-table > .table td, .table-responsive.arms-wrap-table > .table td { white-space: normal; }
.arms-wrap-table td.text-nowrap, .arms-wrap-table .text-nowrap { white-space: nowrap !important; }
.arms-cell-links { min-width: 14rem; max-width: 22rem; overflow-wrap: anywhere; word-break: break-word; }
.arms-cell-links a { overflow-wrap: anywhere; word-break: break-all; }
.arms-cell-links div + div { margin-top: .15rem; }
.arms-actions { white-space: nowrap; }
.arms-actions .btn { white-space: nowrap; }
/* Synchronised horizontal scrollbar: a thin proxy bar kept at the bottom of the screen for a wide table (public/js/arms.js). */
.arms-hscroll-proxy { position: sticky; bottom: 0; z-index: 6; overflow-x: auto; overflow-y: hidden; height: 17px; background: #fff; border: 1px solid var(--arms-border); border-radius: .35rem; margin-bottom: 1rem; }
.arms-hscroll-proxy[hidden] { display: none; }
.arms-hscroll-proxy > div { height: 1px; }
.arms-row-archived td { color: #6b7280; background: #f3f4f6; }

/* Generate Reports */
.arms-report-head { background: #fff; border: 1px solid var(--arms-border); border-radius: .5rem; padding: .75rem 1rem; margin-bottom: 1rem; }
.arms-activity-bar { background: #0F766E; color: #fff; font-size: 1.05rem; font-weight: 600; padding: .5rem .75rem; border-radius: .4rem; margin: 0 0 .75rem; }
.arms-activity-bar-purple { background: #59339D; }
.arms-sub-heading { font-size: .95rem; font-weight: 700; color: #493078; margin: .75rem 0 .35rem; }
.arms-kv th { width: 26%; background: #F5F3FA; font-weight: 600; }
.arms-panel { border: 1px solid; border-radius: .5rem; padding: .6rem .75rem; height: 100%; font-size: .9rem; }
.arms-panel-title { font-weight: 700; margin-bottom: .35rem; }
.arms-panel-count { float: right; font-size: 1.15rem; }
.arms-panel-green { background: #ECF8F1; border-color: #9AD5B4; }
.arms-panel-amber { background: #FFF6E8; border-color: #F0C887; }
.arms-panel-red { background: #FDEEEE; border-color: #EBA3A3; }
.arms-decision-accepted { color: #157347; }
.arms-decision-rejected { color: #B42318; }
.arms-decision-pending { color: #946200; }
.arms-kpi { background: #fff; border: 1px solid var(--arms-border); border-radius: .5rem; padding: .6rem .75rem; height: 100%; }
.arms-kpi-label { font-size: .8rem; color: #5b6475; }
.arms-kpi-value { font-size: 1.25rem; font-weight: 700; color: #1f2a44; }
.arms-kpi-note { font-size: .78rem; color: #5b6475; }
@media print {
    @page { size: A4 landscape; margin: 10mm; }
    .app-sidebar, .app-header, .arms-skip-link, .arms-no-print, .arms-simulated-banner, .breadcrumb, .arms-page-title, .alert { display: none !important; }
    .app-wrapper, .app-main, .app-content { margin: 0 !important; padding: 0 !important; background: #fff !important; }
    .arms-hscroll-proxy { display: none !important; }
    .arms-scroll-table { max-height: none !important; overflow: visible !important; border: 0; }
    .arms-scroll-table thead th { position: static; }
    thead { display: table-header-group; }
    tr, .arms-kpi, .arms-panel { break-inside: avoid; }
    .arms-activity-block { break-inside: auto; }
    .arms-activity-bar { break-after: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .arms-panel, .arms-kpi, .table thead th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    body { font-size: 9pt; }
    a { color: #0b5cad; }
}

/* The Actions / Status column of the Calendar Activities tables stays visible while the table scrolls sideways. */
.arms-scroll-table.arms-sticky-last th:last-child,
.arms-scroll-table.arms-sticky-last td:last-child { position: sticky; right: 0; background: #fff; box-shadow: -6px 0 6px -6px rgba(30,41,59,.25); }
.arms-scroll-table.arms-sticky-last thead th:last-child { background: var(--arms-table-head-bg, #EDE7F8); z-index: 3; }

/* Notification bell (document 13 section 12) */
.arms-bell-count { position: absolute; top: .1rem; right: -.1rem; font-size: .65rem; padding: .2em .45em; }
.arms-bell-menu { min-width: 22rem; max-width: 92vw; max-height: 70vh; overflow-y: auto; }
.arms-bell-item { white-space: normal; }
.arms-bell-dot { font-size: .5rem; vertical-align: middle; }

/* General Activities > Generate Reports (document 13 section 6): the 16-column table reuses the Calendar Activities table styles above. */
.arms-ga-table .table { min-width: 118rem; }
/* Compact, even cells: headings and data both vertically centred; text left, numbers right, S. No. centred. */
.arms-ga-table .table > :not(caption) > * > * { padding: .45rem .6rem; vertical-align: middle; }
.arms-ga-table .table > thead th { vertical-align: middle; line-height: 1.25; }
.arms-ga-table .table > thead th:not(.text-end):not(.text-center) { text-align: left; }
.arms-ga-table .table > tbody td { line-height: 1.35; }
/* Fixed columns: S. No. and District / Office. The separator is one thin line (an inset shadow, so it travels with the sticky cell). */
.arms-ga-table thead th:nth-child(1), .arms-ga-table tbody td:nth-child(1) { position: sticky; left: 0; width: 4rem; min-width: 4rem; max-width: 4rem; z-index: 1; text-align: center; }
.arms-ga-table thead th:nth-child(2), .arms-ga-table tbody td:nth-child(2) { position: sticky; left: 4rem; width: 9rem; min-width: 9rem; z-index: 1; text-align: left; }
.arms-ga-table thead th:nth-child(1), .arms-ga-table thead th:nth-child(2) { z-index: 4; }
/* The fixed columns end in a faint 1px line, the same colour as the row borders (an inset shadow, so it travels with the sticky cell and keeps the stripe colour). */
.arms-ga-table thead th:nth-child(2) { box-shadow: inset -1px 0 0 var(--bs-table-border-color, #E4E7EF); }
.arms-ga-table tbody td:nth-child(2) { box-shadow: inset -1px 0 0 var(--bs-table-border-color, #E4E7EF), inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg-type, var(--bs-table-accent-bg))); }
.arms-ga-table tbody tr[data-arms-row-href] { cursor: pointer; }
.arms-ga-table .arms-ga-title-link { color: inherit; text-decoration: none; font-weight: 600; }
.arms-ga-table .arms-ga-title-link:hover, .arms-ga-table .arms-ga-title-link:focus { text-decoration: underline; }
.arms-ga-table .arms-ga-detailed { padding: .1rem .4rem; font-size: .72rem; white-space: nowrap; }
.arms-ga-table .arms-ga-desc { min-width: 16rem; }
.arms-ga-table .arms-clamp { max-height: 6.6em; overflow: hidden; white-space: pre-line; overflow-wrap: anywhere; }
.arms-ga-table .arms-clamp.is-open { max-height: none; }
.arms-cell-text-full { overflow-wrap: anywhere; }
/* A second horizontal scrollbar ABOVE the report table, kept in step with the table's own (public/js/arms.js, data-arms-hscroll-top): reachable without scrolling down through the rows. */
.arms-hscroll-top { overflow-x: auto; overflow-y: hidden; height: 17px; margin-bottom: .3rem; background: #fff; border: 1px solid var(--arms-border, #DDE3ED); border-radius: .35rem; }
.arms-hscroll-top[hidden] { display: none; }
.arms-hscroll-top > div { height: 1px; }
@media print { .arms-hscroll-top { display: none !important; } }
@media print {
    @page arms-portrait { size: A4 portrait; margin: 12mm; }
    .arms-detailed { page: arms-portrait; }
    .arms-ga-table .table { min-width: 0; font-size: 6.5pt; }
    .arms-ga-table thead th:nth-child(-n+2), .arms-ga-table tbody td:nth-child(-n+2) { position: static; }
    .arms-ga-table .arms-ga-detailed { display: none; }
    .arms-ga-table .arms-clamp { max-height: none !important; }
}

/* Dashboard: General Activities cards and graphs (document 13 section 11): plain HTML/SVG bars, no chart package. */
.arms-bar-row { display: flex; align-items: center; gap: .6rem; padding: .22rem 0; }
.arms-bar-label { flex: 0 0 9.5rem; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arms-bar-track { flex: 1 1 auto; height: .85rem; background: #EEF0F6; border-radius: .45rem; overflow: hidden; }
.arms-bar-fill { height: 100%; min-width: 0; background: var(--arms-primary, #59339D); border-radius: .45rem; }
.arms-bar-teal { background: var(--arms-teal, #0F766E); }
.arms-bar-amber { background: #E8A317; }
.arms-bar-value { flex: 0 0 5.5rem; text-align: right; font-size: .85rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.arms-bar-zero .arms-bar-label, .arms-bar-zero .arms-bar-value { color: #8a92a6; font-weight: 400; }
.arms-bar-scroll { max-height: 24rem; overflow-y: auto; }
.arms-donut { width: 9.5rem; height: 9.5rem; flex: 0 0 auto; }
.arms-donut-total { font-size: 5px; font-weight: 700; fill: #1f2a44; }
.arms-swatch { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; margin-right: .45rem; }
@media (max-width: 575.98px) { .arms-bar-label { flex-basis: 6.5rem; } .arms-bar-value { flex-basis: 4.5rem; } }
