@font-face {
    font-family: 'Open Sans', sans-serif;
    src: url(../../webfonts/OpenSans/OpenSans-Bold.ttf);
}

@font-face {
    font-family: 'Open Sans', sans-serif;
    src: url(../../webfonts/OpenSans/OpenSans-Light.ttf);
}

@font-face {
    font-family: 'Open Sans', sans-serif;
    src: url(../../webfonts/OpenSans/OpenSans-Regular.ttf);
}

@font-face {
    font-family: 'Open Sans', sans-serif;
    src: url(../../webfonts/OpenSans/OpenSans-SemiBold.ttf);
}

@font-face {
    font-family: 'Open Sans', sans-serif;
    src: url(../../webfonts/OpenSans/OpenSans-Italic.ttf);
}

@font-face {
    font-family: 'Lato', sans-serif;
    src: url(../../webfonts/Lato/Lato-Bold.ttf);
}

@font-face {
    font-family: 'Lato', sans-serif;
    src: url(../../webfonts/Lato/Lato-Regular.ttf);
}


/* Common css start*/

body {
    font-family: 'Open Sans', sans-serif;
    font-weight: 300 !important;
}

.py-100 {
    padding-top: 100px;
    padding-bottom: 100px;
}

.pt-100 {
    padding-top: 100px;
}

.pt-80 {
    padding-top: 80px;
}

.fw-600 {
    font-weight: 600 !important;
}

.fw-400i {
    font-weight: 400 !important;
    font-style: italic;
}

.fs-18 {
    font-size: 18px !important;
}

.fs-15 {
    font-size: 15px !important;
}

.fs-10 {
    font-size: 10px !important;
}

.fs-44 {
    font-size: 44px !important;
}

.fb {
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
}

.pt-20 {
    padding-top: 1.25rem !important;
}

.ps-50 {
    padding-left: 50px !important;
}

.mb4 {
    margin-bottom: 4px !important;
}
.bg-purple {
    background-color: #6f42c1;
}

.login-page{
    background-image:url(../../../Files/Images/LoginBG.jpg);
    background-repeat:no-repeat;
    background-size:cover;
    /* AdminLTE pins this to height:100vh, so any card even a pixel taller than
       the viewport spills out and raises a scrollbar. min-height keeps the
       flex centring while letting a genuinely tall form (ConnectionSetup) grow. */
    height:auto;
    min-height:100vh;
}
/* Centring happens here rather than via the body's flex rules, so it holds no
   matter what else AdminLTE's scripts put in <body>.
   Deliberately no overflow property: setting one axis to hidden makes the other
   compute to auto, which turns this into a scroll container and paints a
   scrollbar the moment anything inside bleeds a pixel past it. */
.cloginPage {
    display: flex;
    align-self: stretch;
    box-sizing: border-box;
    width: 100%;
    min-height: 100vh;
    padding: 12px;
}

/* auto margins centre the child on both axes and, unlike justify-content:center,
   leave the top edge reachable if a form is ever taller than the viewport */
.cloginPage > * {
    margin: auto;
}
.register-page {
    background-color: white;
     height: 70vh;
}
.dropdown {
    width: 100%;
}
.btnRowMs {
    margin-left: 5px;
}


/* ============================================================
   Modern Sidebar Navigation
   Layers over AdminLTE .sidebar-dark-primary for a cleaner,
   more user-friendly look. Applies to both admin & viewer menus.
   ============================================================ */

/* Sidebar shell: soft dark gradient + subtle depth */
.main-sidebar {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
}

/* Brand / logo header: full-bleed white plate, logo fills the sidebar width.
   --arngo-brand-h is the single source of truth for the header height: the
   plate, the menu offset and the sidebar height all derive from it. */
:root {
    --arngo-brand-h: 130px;
}

.main-sidebar .brand-link.brand-logo-only {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 10px 0;
    background-color: #fff !important;
    border-bottom: 0 !important;
    overflow: hidden;
}

/* Logo spans the full sidebar width; height follows its own aspect ratio, and
   sidebarBrandHeight() in _Layout feeds the measured height back into
   --arngo-brand-h so the menu offset stays in sync. */
.main-sidebar .brand-link.brand-logo-only .brand-image-full {
    display: block;
    width: 100%;
    height: 100px;
    transition: transform 0.4s ease;
}

.main-sidebar .brand-link.brand-logo-only:hover .brand-image-full {
    transform: scale(1.03);
}

/* With layout-navbar-fixed the brand is position:fixed and AdminLTE offsets the
   menu by a hardcoded 3.5rem, which the taller logo plate would overlap. */
.layout-navbar-fixed.layout-fixed .wrapper .brand-logo-only ~ .sidebar,
.layout-navbar-fixed.layout-fixed.text-sm .wrapper .brand-logo-only ~ .sidebar,
body:not(.layout-fixed).layout-navbar-fixed .wrapper .main-sidebar .brand-logo-only ~ .sidebar {
    margin-top: var(--arngo-brand-h);
}

/* Keep the scroll area inside the viewport now that the offset is bigger */
.layout-fixed .wrapper .brand-logo-only ~ .sidebar {
    height: calc(100vh - var(--arngo-brand-h));
}

/* Collapsed sidebar-mini: AdminLTE clamps the brand to a fixed 3.5rem, which
   would crop the logo. Let it shrink with the 4.6rem strip instead. */
.layout-navbar-fixed.sidebar-mini.sidebar-collapse .wrapper .brand-link.brand-logo-only,
.layout-navbar-fixed.sidebar-mini-md.sidebar-collapse .wrapper .brand-link.brand-logo-only,
.layout-navbar-fixed.sidebar-mini-xs.sidebar-collapse .wrapper .brand-link.brand-logo-only {
    height: auto;
}

/* Breathing room at the bottom so the last item is fully visible */
.main-sidebar .sidebar {
    padding-bottom: 7rem;
}

.nav-sidebar {
    padding-bottom: 2rem;
}

/* Top-level items get breathing room + rounded hit area */
.nav-sidebar > .nav-item {
    margin: 3px 10px;
}

.nav-sidebar .nav-link {
    color: #cbd5e1 !important;
    border-radius: 10px !important;
    padding: 0.62rem 0.8rem !important;
    transition: background-color 0.22s ease, color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.nav-sidebar .nav-link p {
    font-weight: 400;
}

/* Icons: consistent width, muted until active/hover */
.nav-sidebar .nav-link .nav-icon {
    width: 1.5rem;
    font-size: 1rem;
    color: #94a3b8;
    transition: color 0.22s ease, transform 0.22s ease;
}

/* Hover: gentle lift + brighten */
.nav-sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.07) !important;
    color: #ffffff !important;
    transform: translateX(3px);
}

.nav-sidebar .nav-link:hover .nav-icon {
    color: #ffffff;
    transform: scale(1.12);
}

/* Active / selected: accent gradient pill with soft glow */
.nav-sidebar .nav-link.active {
    background: linear-gradient(135deg, #4f6ef7 0%, #6d5cff 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(79, 110, 247, 0.35);
    transform: none;
}

.nav-sidebar .nav-link.active .nav-icon {
    color: #ffffff !important;
}

/* Keep Dashboard's purple accent on-theme as a rounded pill */
.nav-sidebar .nav-link.bg-purple {
    background: linear-gradient(135deg, #7c4dff 0%, #6f42c1 100%) !important;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(111, 66, 193, 0.32);
}

.nav-sidebar .nav-link.bg-purple .nav-icon {
    color: #fff !important;
}

/* Sub-menu: indented with a guide line */
.nav-sidebar .nav-treeview {
    margin: 2px 0 6px 26px;
    padding-left: 6px;
    border-left: 2px solid rgba(255, 255, 255, 0.09);
}

.nav-sidebar .nav-treeview .nav-item {
    margin: 2px 6px;
}

.nav-sidebar .nav-treeview .nav-link {
    font-size: 0.86rem;
    padding: 0.5rem 0.7rem !important;
}

.nav-sidebar .nav-treeview .nav-link .nav-icon {
    font-size: 0.9rem;
}

/* Caret rotates smoothly when a group opens */
.nav-sidebar .nav-link p > .right {
    transition: transform 0.3s ease;
}

.nav-sidebar .menu-open > .nav-link p > .right,
.nav-sidebar .menu-is-opening > .nav-link p > .right {
    transform: rotate(-90deg);
}

/* Count badges: soft pill */
.nav-sidebar .badge {
    border-radius: 20px;
    font-weight: 600;
    font-size: 11px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.nav-sidebar .nav-link.active .badge {
    background: rgba(255, 255, 255, 0.28);
}

/* Slim custom scrollbar */
.main-sidebar .sidebar::-webkit-scrollbar {
    width: 6px;
}

.main-sidebar .sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.main-sidebar .sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* Modern top header to match */
.main-header.navbar {
    background: linear-gradient(90deg, #1e293b 0%, #223049 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.main-header .nav-link {
    transition: background-color 0.2s ease, color 0.2s ease;
    border-radius: 8px;
}

.main-header .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
}


/* ============================================================
   ARNGO module UI kit  —  every class is prefixed .ar- so it
   layers on top of AdminLTE without touching legacy pages.
   Currently used by: Members (Index + Create/Edit).
   ============================================================ */

:root {
    --ar-primary: #4f6ef7;
    --ar-primary-2: #6d5cff;
    --ar-ink: #0f172a;
    --ar-body: #334155;
    --ar-muted: #64748b;
    --ar-line: #e6eaf2;
    --ar-surface: #ffffff;
    --ar-canvas: #f4f6fb;
    --ar-radius: 14px;
    --ar-shadow: 0 2px 4px rgba(15, 23, 42, 0.04), 0 12px 28px -12px rgba(15, 23, 42, 0.14);
    --ar-shadow-lg: 0 6px 12px rgba(15, 23, 42, 0.06), 0 22px 44px -18px rgba(15, 23, 42, 0.24);
}

.ar-page {
    padding: 1.1rem 1.25rem 2.5rem;
    color: var(--ar-body);
}

.content-wrapper:has(.ar-page) {
    background-color: var(--ar-canvas);
}

/* ---------- Hero header ---------------------------------- */

.ar-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--ar-radius);
    background: linear-gradient(120deg, #1e293b 0%, #2b3a5c 45%, #4f6ef7 130%);
    color: #fff;
    padding: 1.35rem 1.5rem;
    box-shadow: var(--ar-shadow-lg);
    margin-bottom: 1.15rem;
}

/* Decorative glow, purely presentational */
.ar-hero::after {
    content: "";
    position: absolute;
    top: -70px;
    right: -50px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(109, 92, 255, 0.55) 0%, rgba(109, 92, 255, 0) 70%);
    pointer-events: none;
}

.ar-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ar-hero-title {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.ar-hero-icon {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(4px);
}

.ar-hero h1 {
    font-size: 1.55rem;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
    letter-spacing: -0.01em;
}

.ar-hero p {
    margin: 0.15rem 0 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.72);
}

.ar-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.ar-crumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.65);
    margin-right: 0.35rem;
}

.ar-crumb a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.ar-crumb a:hover {
    color: #fff;
    text-decoration: underline;
}

/* ---------- Buttons -------------------------------------- */

.ar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0.5rem 0.95rem;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none !important;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.ar-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.32);
}

.ar-btn:active {
    transform: translateY(1px);
}

/* A button kept in place to hold the column's shape, but with nothing to do */
.ar-btn:disabled,
.ar-btn.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.ar-btn:disabled:active,
.ar-btn.is-disabled:active {
    transform: none;
}

/* Keeps an action cell on one line so its button is never split in two */
.ar-nowrap {
    white-space: nowrap;
}

.ar-btn-primary {
    background: linear-gradient(135deg, var(--ar-primary) 0%, var(--ar-primary-2) 100%);
    color: #fff;
    box-shadow: 0 8px 18px -6px rgba(79, 110, 247, 0.6);
}

.ar-btn-primary:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px -8px rgba(79, 110, 247, 0.7);
}

.ar-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 8px 18px -6px rgba(16, 185, 129, 0.55);
}

.ar-btn-success:hover {
    color: #fff;
    transform: translateY(-1px);
}

.ar-btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #ea8a04 100%);
    color: #fff;
    box-shadow: 0 8px 18px -6px rgba(245, 158, 11, 0.55);
}

.ar-btn-warning:hover {
    color: #fff;
    transform: translateY(-1px);
}

.ar-btn-ghost {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.24);
    color: #fff;
}

.ar-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-1px);
}

.ar-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 8px 18px -6px rgba(239, 68, 68, 0.55);
}

.ar-btn-danger:hover {
    color: #fff;
    transform: translateY(-1px);
}

/* For a heavy but not destructive action - locking a whole fiscal year, say - where
   red would read as "delete". */
.ar-btn-dark {
    background: linear-gradient(135deg, #4b5563 0%, #1f2937 100%);
    color: #fff;
    box-shadow: 0 8px 18px -6px rgba(31, 41, 55, 0.5);
}

.ar-btn-dark:hover {
    color: #fff;
    transform: translateY(-1px);
}

/* .ar-btn-ghost is styled for dark surfaces (the hero header); on the light
   actionbar it renders near-white-on-white, so give it light-surface colors
   there instead. */
.ar-actionbar-buttons .ar-btn-ghost {
    background: #fff;
    border-color: var(--ar-line);
    color: var(--ar-body);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.ar-actionbar-buttons .ar-btn-ghost:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--ar-ink);
}

.ar-btn-info {
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
    color: #fff;
    box-shadow: 0 8px 18px -6px rgba(14, 165, 233, 0.55);
}

.ar-btn-info:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px -8px rgba(14, 165, 233, 0.65);
}

.ar-btn-light {
    background: #fff;
    border-color: var(--ar-line);
    color: var(--ar-body);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.ar-btn-light:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--ar-ink);
}

/* ---------- Stat tiles ----------------------------------- */

.ar-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.9rem;
    margin-bottom: 1.15rem;
}

.ar-stat {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: var(--ar-surface);
    border: 1px solid var(--ar-line);
    border-radius: var(--ar-radius);
    padding: 1rem 1.1rem;
    box-shadow: var(--ar-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ar-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--ar-shadow-lg);
}

.ar-stat-icon {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: #fff;
}

/* Shared by every gradient icon chip: stat tiles and dashboard quick actions */
.ar-stat-icon.is-indigo,
.ar-quick-icon.is-indigo {
    background: linear-gradient(135deg, #4f6ef7 0%, #6d5cff 100%);
}

.ar-stat-icon.is-green,
.ar-quick-icon.is-green {
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
}

.ar-stat-icon.is-amber,
.ar-quick-icon.is-amber {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.ar-stat-icon.is-sky,
.ar-quick-icon.is-sky {
    background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
}

.ar-stat-body {
    min-width: 0;
}

.ar-stat-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ar-muted);
}

.ar-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--ar-ink);
    font-variant-numeric: tabular-nums;
}

/* ---------- Cards ---------------------------------------- */

/* Kept unclipped so pop-ups anchored to a field inside the card (the
   datetimepicker calendar, select2 menus) can escape the card box instead of
   being cut off by it. The head and the table wrap round/clip themselves. */
.ar-card {
    background: var(--ar-surface);
    border: 1px solid var(--ar-line);
    border-radius: var(--ar-radius);
    box-shadow: var(--ar-shadow);
    margin-bottom: 1.15rem;
    overflow: visible;
}

.ar-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.95rem 1.15rem;
    border-bottom: 1px solid var(--ar-line);
    border-radius: calc(var(--ar-radius) - 1px) calc(var(--ar-radius) - 1px) 0 0;
    background: linear-gradient(180deg, #fbfcfe 0%, #f7f9fd 100%);
}

.ar-card-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--ar-ink);
}

.ar-card-title i {
    color: var(--ar-primary);
    font-size: 0.95rem;
}

.ar-card-title small {
    font-weight: 400;
    color: var(--ar-muted);
    font-size: 0.78rem;
}

.ar-card-body {
    padding: 1.15rem;
}

/* Accent strip on form cards */
.ar-card.is-accent {
    border-top: 3px solid var(--ar-primary);
}

.ar-card.is-accent-amber {
    border-top: 3px solid #f59e0b;
}

.ar-card.is-accent-amber .ar-card-title i {
    color: #f59e0b;
}

/* ---------- Toolbar / filters ---------------------------- */

.ar-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.ar-search {
    position: relative;
    min-width: 230px;
}

.ar-search i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.82rem;
    pointer-events: none;
}

.ar-search input {
    width: 100%;
    height: 38px;
    border: 1px solid var(--ar-line);
    border-radius: 10px;
    background: #fff;
    padding: 0 0.85rem 0 2.1rem;
    font-size: 0.86rem;
    color: var(--ar-body);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.ar-search input::placeholder {
    color: #a3aec1;
}

.ar-search input:focus,
.ar-filter select:focus {
    outline: none;
    border-color: var(--ar-primary);
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.16);
}

.ar-filter select {
    height: 38px;
    border: 1px solid var(--ar-line);
    border-radius: 10px;
    background: #fff;
    padding: 0 2rem 0 0.75rem;
    font-size: 0.86rem;
    color: var(--ar-body);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8.5 1.5 4h9z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

/* ---------- Date range filter ---------------------------- */

/* Two datetimepicker inputs sitting in a toolbar, sized to match the filter
   selects beside them. */
.ar-daterange {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.ar-daterange .input-group {
    width: 142px;
    flex-wrap: nowrap;
}

.ar-daterange .form-control {
    height: 38px;
    border: 1px solid var(--ar-line);
    border-right: 0;
    border-radius: 10px 0 0 10px;
    background: #fff;
    padding: 0 0.6rem;
    font-size: 0.86rem;
    color: var(--ar-body);
    font-variant-numeric: tabular-nums;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.ar-daterange .form-control:focus {
    outline: none;
    border-color: var(--ar-primary);
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.16);
    z-index: 3;
}

.ar-daterange .form-control::placeholder {
    color: #9aa3b5;
}

.ar-daterange .input-group-text {
    height: 38px;
    border: 1px solid var(--ar-line);
    border-left: 0;
    border-radius: 0 10px 10px 0;
    background: #fff;
    color: var(--ar-muted);
    padding: 0 0.65rem;
    cursor: pointer;
    transition: color 0.16s ease;
}

.ar-daterange .input-group-append:hover .input-group-text {
    color: var(--ar-primary);
}

.ar-daterange-sep {
    color: var(--ar-muted);
    font-size: 0.7rem;
}

/* ---------- Datetimepicker calendar ---------------------- */

/* The plugin drops the calendar in as a sibling of the input, inside the
   .input-group. Give it the kit's surface treatment and keep it above the
   sticky action bar and any card that follows. */
.bootstrap-datetimepicker-widget.dropdown-menu {
    z-index: 1080;
    border: 1px solid var(--ar-line);
    border-radius: 12px;
    box-shadow: var(--ar-shadow-lg);
    padding: 0.4rem;
}

.bootstrap-datetimepicker-widget .datepicker-days th,
.bootstrap-datetimepicker-widget .datepicker-days td {
    font-size: 0.82rem;
}

.bootstrap-datetimepicker-widget .datepicker-days td.day.active,
.bootstrap-datetimepicker-widget .datepicker-days td.day.active:hover {
    background: var(--ar-primary);
    color: #fff;
}

.bootstrap-datetimepicker-widget .datepicker-days td.day.today:before {
    border-bottom-color: var(--ar-primary);
}

/* ---------- Data table ----------------------------------- */

.ar-table-wrap {
    padding: 0.4rem 0.9rem 0.9rem;
    /* The card no longer clips, so wide tables scroll here instead of spilling
       past the card edge. */
    overflow-x: auto;
}

table.ar-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0;
    margin: 0 !important;
}

table.ar-table thead th {
    background: transparent;
    border: none !important;
    border-bottom: 1px solid var(--ar-line) !important;
    padding: 0.75rem 0.7rem;
    font-size: 0.71rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--ar-muted);
    white-space: nowrap;
}

table.ar-table tbody td {
    border: none !important;
    border-bottom: 1px solid #f1f4f9 !important;
    padding: 0.7rem;
    vertical-align: middle;
    font-size: 0.86rem;
    color: var(--ar-body);
    background: transparent;
}

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

table.ar-table tbody tr:hover td {
    background-color: #f7f9ff;
}

table.ar-table.dataTable.table-striped tbody tr.odd td {
    background-color: transparent;
}

/* Member identity cell */
.ar-person {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.ar-person-avatar {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #eef2fb;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--ar-line);
}

/* Text stand-in for the avatar when a record has no photo to show, e.g. the
   bank / branch / account rows use the first letters of the name. */
.ar-initials {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #fff;
    background: linear-gradient(135deg, var(--ar-primary) 0%, var(--ar-primary-2) 100%);
    box-shadow: 0 4px 10px -4px rgba(79, 110, 247, 0.75);
}

.ar-initials.is-green {
    background: linear-gradient(135deg, #16a34a 0%, #34d399 100%);
    box-shadow: 0 4px 10px -4px rgba(22, 163, 74, 0.7);
}

.ar-initials.is-amber {
    background: linear-gradient(135deg, #d97706 0%, #fbbf24 100%);
    box-shadow: 0 4px 10px -4px rgba(217, 119, 6, 0.7);
}

.ar-person-name {
    display: block;
    font-weight: 600;
    color: var(--ar-ink);
    line-height: 1.25;
}

.ar-person-sub {
    display: block;
    font-size: 0.76rem;
    color: var(--ar-muted);
    line-height: 1.3;
}

.ar-cell-main {
    display: block;
    line-height: 1.3;
}

.ar-cell-sub {
    display: block;
    font-size: 0.76rem;
    color: var(--ar-muted);
    line-height: 1.35;
}

.ar-mono {
    font-variant-numeric: tabular-nums;
}

/* Status pills */
.ar-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    font-size: 0.73rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.ar-pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.ar-pill.is-open {
    background: #e7f8f0;
    color: #067a52;
}

.ar-pill.is-closed {
    background: #fdeaea;
    color: #b42318;
}

.ar-pill.is-hold {
    background: #fff5e5;
    color: #b45309;
}

.ar-pill.is-neutral {
    background: #eef1f6;
    color: #475569;
}

/* Row actions */
.ar-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.3rem;
}

.ar-act {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--ar-line);
    border-radius: 9px;
    background: #fff;
    color: var(--ar-muted);
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none !important;
    transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.ar-act:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px -6px rgba(15, 23, 42, 0.35);
}

.ar-act.is-edit:hover {
    background: var(--ar-primary);
    border-color: var(--ar-primary);
    color: #fff;
}

.ar-act.is-copy:hover {
    background: #6d5cff;
    border-color: #6d5cff;
    color: #fff;
}

.ar-act.is-mail:hover {
    background: #0284c7;
    border-color: #0284c7;
    color: #fff;
}

.ar-act.is-delete:hover {
    background: #e11d48;
    border-color: #e11d48;
    color: #fff;
}

/* Action a row cannot take (e.g. a category still in use) */
.ar-act.is-muted {
    background: var(--ar-soft, #f1f5f9);
    color: #94a3b8;
    cursor: not-allowed;
}

.ar-act.is-muted:hover {
    transform: none;
    box-shadow: none;
}

/* DataTables chrome */
.ar-table-wrap .dataTables_wrapper .dataTables_length,
.ar-table-wrap .dataTables_wrapper .dataTables_filter {
    padding: 0.4rem 0.15rem;
    font-size: 0.82rem;
    color: var(--ar-muted);
}

.ar-table-wrap .dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--ar-line);
    border-radius: 9px;
    padding: 0.28rem 0.6rem;
    font-size: 0.84rem;
}

/* The page-length select is a Bootstrap .custom-select, whose caret lives in a
   background image. It needs the right-hand padding kept clear, or the caret
   sits on top of the number. Own caret + appearance:none keeps it predictable. */
.ar-table-wrap .dataTables_wrapper .dataTables_length select {
    height: 34px;
    min-width: 78px;
    width: auto;
    border: 1px solid var(--ar-line);
    border-radius: 9px;
    padding: 0 1.9rem 0 0.7rem;
    font-size: 0.84rem;
    line-height: 32px;
    color: var(--ar-body);
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8.5 1.5 4h9z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 10px 10px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.ar-table-wrap .dataTables_wrapper .dataTables_length select:focus {
    outline: none;
    border-color: var(--ar-primary);
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.16);
}

.ar-table-wrap .dataTables_wrapper .dataTables_info {
    padding-top: 0.9rem;
    font-size: 0.8rem;
    color: var(--ar-muted);
}

.ar-table-wrap .dataTables_wrapper .dataTables_paginate {
    padding-top: 0.65rem;
}

.ar-table-wrap .pagination .page-link {
    border: 1px solid var(--ar-line);
    border-radius: 9px !important;
    margin: 0 2px;
    color: var(--ar-body);
    font-size: 0.83rem;
    min-width: 34px;
    text-align: center;
}

.ar-table-wrap .pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--ar-primary) 0%, var(--ar-primary-2) 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 14px -6px rgba(79, 110, 247, 0.7);
}

.ar-table-wrap .pagination .page-item.disabled .page-link {
    color: #cbd5e1;
}

.ar-table-wrap .dt-buttons .btn {
    border: 1px solid var(--ar-line);
    background: #fff;
    color: var(--ar-body);
    border-radius: 9px;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    margin-right: 0.3rem;
    box-shadow: none;
}

.ar-table-wrap .dt-buttons .btn:hover {
    background: #f1f5ff;
    border-color: #c7d2fe;
    color: var(--ar-primary);
}

/* Empty state */
.ar-empty {
    text-align: center;
    padding: 2.4rem 1rem;
    color: var(--ar-muted);
}

.ar-empty i {
    font-size: 2.1rem;
    color: #cbd5e1;
    display: block;
    margin-bottom: 0.6rem;
}

/* ---------- Sticky action bar ---------------------------- */

/* Offset by the fixed AdminLTE navbar (3.5rem) so the bar parks just under it
   instead of sliding behind it. */
.ar-actionbar {
    position: sticky;
    top: 3.9rem;
    z-index: 900;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid var(--ar-line);
    border-radius: var(--ar-radius);
    padding: 0.7rem 1rem;
    margin-bottom: 1.15rem;
    box-shadow: var(--ar-shadow);
}

.ar-actionbar-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--ar-muted);
}

.ar-actionbar-note i {
    color: var(--ar-primary);
}

.ar-actionbar-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ---------- Forms ---------------------------------------- */

.ar-form .form-group {
    margin-bottom: 1rem;
}

/* Field labels only — the photo/signature drop zones are labels too, and they
   carry their own layout. */
.ar-form label:not(.ar-avatar-frame):not(.ar-sign-frame):not(.ar-switch) {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.35rem;
    letter-spacing: 0.01em;
}

.ar-form .form-control,
.ar-form input[type="text"],
.ar-form input[type="number"],
.ar-form input[type="email"],
.ar-form textarea {
    height: auto;
    min-height: 40px;
    border: 1px solid var(--ar-line);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    font-size: 0.87rem;
    color: var(--ar-ink);
    background-color: #fdfdff;
    box-shadow: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.ar-form .form-control:focus {
    background-color: #fff;
    border-color: var(--ar-primary);
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.16);
}

.ar-form .form-control[readonly] {
    background-color: #f8fafc;
    cursor: pointer;
}

.ar-form .input-group-text {
    border: 1px solid var(--ar-line);
    border-left: none;
    border-radius: 0 10px 10px 0;
    background: #f4f6fb;
    color: var(--ar-muted);
    cursor: pointer;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.ar-form .input-group.date .form-control {
    border-radius: 10px 0 0 10px;
}

.ar-form .input-group-append:hover .input-group-text {
    background: #e8edfb;
    color: var(--ar-primary);
}

.ar-req {
    color: #e11d48;
    font-weight: 700;
}

.ar-hint {
    display: block;
    margin-top: 0.28rem;
    font-size: 0.73rem;
    color: #94a3b8;
}

/* select2 alignment with the rest of the form */
.ar-form .select2-container--bootstrap4 .select2-selection {
    min-height: 40px;
    border: 1px solid var(--ar-line);
    border-radius: 10px;
    background-color: #fdfdff;
}

.ar-form .select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
    line-height: 38px;
    font-size: 0.87rem;
    color: var(--ar-ink);
    padding-left: 0.75rem;
}

.ar-form .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
    height: 38px;
}

.ar-form .select2-container--bootstrap4.select2-container--focus .select2-selection,
.ar-form .select2-container--bootstrap4.select2-container--open .select2-selection {
    border-color: var(--ar-primary);
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.16);
}

/* Section divider inside a form card */
.ar-fieldset {
    border-top: 1px dashed var(--ar-line);
    margin-top: 0.4rem;
    padding-top: 1rem;
}

.ar-fieldset:first-of-type {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.ar-fieldset-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ar-muted);
    margin-bottom: 0.85rem;
}

.ar-fieldset-title i {
    color: var(--ar-primary);
    font-size: 0.82rem;
}

/* ---------- Avatar / signature uploaders ----------------- */

.ar-upload {
    text-align: center;
}

.ar-avatar-frame {
    position: relative;
    width: 132px;
    height: 132px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    overflow: hidden;
    background: #eef2fb;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px var(--ar-line), 0 12px 24px -12px rgba(15, 23, 42, 0.4);
    cursor: pointer;
}

.ar-avatar-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ar-avatar-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    background: rgba(15, 23, 42, 0.62);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.ar-avatar-overlay i {
    font-size: 1.1rem;
}

.ar-avatar-frame:hover .ar-avatar-overlay,
.ar-avatar-frame:focus-within .ar-avatar-overlay {
    opacity: 1;
}

.ar-sign-frame {
    position: relative;
    height: 96px;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: #fbfcfe;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.ar-sign-frame:hover {
    border-color: var(--ar-primary);
    background: #f6f8ff;
}

.ar-sign-frame img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ar-sign-placeholder {
    color: #94a3b8;
    font-size: 0.78rem;
    text-align: center;
    padding: 0.5rem;
}

.ar-sign-placeholder i {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.ar-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.ar-file-name {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.73rem;
    color: var(--ar-muted);
    word-break: break-all;
}

/* ---------- Multi-file attachments ----------------------- */

/* Click target for a hidden multiple-file input */
.ar-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    width: 100%;
    margin: 0;
    padding: 1.1rem 1rem;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: #fbfcfe;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.ar-drop:hover,
.ar-drop.is-over {
    border-color: var(--ar-primary);
    background: #f6f8ff;
}

.ar-drop > i {
    font-size: 1.3rem;
    color: var(--ar-primary);
    margin-bottom: 0.15rem;
}

.ar-drop-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ar-text, #1e293b);
}

.ar-drop-sub {
    font-size: 0.73rem;
    color: var(--ar-muted);
}

/* Upload button beside its explanation */
.ar-attach-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.6rem;
}

.ar-attach-bar .ar-hint {
    margin: 0;
}

.ar-attach-list {
    list-style: none;
    margin: 0.6rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ar-attach {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--ar-line);
    border-radius: 10px;
    background: #fff;
}

/* A file chosen but not yet saved reads as provisional */
.ar-attach.is-pending {
    border-style: dashed;
    background: #fbfcfe;
}

.ar-attach-icon {
    flex: 0 0 auto;
    color: var(--ar-primary);
    font-size: 0.95rem;
}

.ar-attach-body {
    flex: 1 1 auto;
    min-width: 0;
}

.ar-attach-name {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ar-text, #1e293b);
    word-break: break-all;
}

a.ar-attach-name:hover {
    color: var(--ar-primary);
}

.ar-attach-meta {
    display: block;
    font-size: 0.72rem;
    color: var(--ar-muted);
}

.ar-attach-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.ar-attach-actions .ar-act {
    padding: 0;
}

/* Count beside a card title */
.ar-count:empty {
    display: none;
}

.ar-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 0.35rem;
    margin-left: 0.35rem;
    border-radius: 999px;
    background: var(--ar-primary);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
}

/* Identity preview under the avatar */
.ar-identity {
    text-align: center;
    padding-top: 0.25rem;
}

.ar-identity-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ar-ink);
    line-height: 1.3;
    word-break: break-word;
}

.ar-identity-sub {
    font-size: 0.78rem;
    color: var(--ar-muted);
}

.ar-identity-meta {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.6rem;
}

/* ---------- Modal dialogs -------------------------------- */

/* Applied to the .modal-content inside a popup partial so the dialog reads as
   part of the same kit as the page behind it. */
.ar-modal {
    border: 0;
    border-radius: var(--ar-radius);
    overflow: hidden;
    box-shadow: var(--ar-shadow-lg);
}

/* A dialog holding a datepicker cannot clip its own box, or the calendar is cut off
   where it drops past the field. The corner rounding that "overflow: hidden" was
   buying is put back on the header and footer instead. */
.ar-modal.ar-modal-overflow {
    overflow: visible;
}

.ar-modal-overflow .modal-header {
    border-top-left-radius: var(--ar-radius);
    border-top-right-radius: var(--ar-radius);
}

.ar-modal-overflow .modal-footer {
    border-bottom-left-radius: var(--ar-radius);
    border-bottom-right-radius: var(--ar-radius);
}

/* The calendar is a child of the dialog, so it has to clear the modal's own layer. */
.ar-modal-overflow .bootstrap-datetimepicker-widget {
    z-index: 1060;
}

.ar-modal .modal-header {
    position: relative;
    overflow: hidden;
    align-items: center;
    gap: 0.85rem;
    border: 0;
    padding: 1.05rem 1.25rem;
    background: linear-gradient(120deg, #1e293b 0%, #2b3a5c 45%, #4f6ef7 150%);
    color: #fff;
}

.ar-modal .modal-header::after {
    content: "";
    position: absolute;
    top: -60px;
    right: -40px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(109, 92, 255, 0.5) 0%, rgba(109, 92, 255, 0) 70%);
    pointer-events: none;
}

.ar-modal-icon {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.ar-modal-heading {
    position: relative;
    z-index: 1;
    min-width: 0;
    flex: 1 1 auto;
}

.ar-modal-heading h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.ar-modal-heading p {
    margin: 0.1rem 0 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.72);
}

.ar-modal .close {
    position: relative;
    z-index: 1;
    color: #fff;
    opacity: 0.75;
    text-shadow: none;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    margin: 0;
}

.ar-modal .close:hover {
    opacity: 1;
    color: #fff;
}

.ar-modal .modal-body {
    padding: 1.25rem;
    background: var(--ar-surface);
}

.ar-modal .modal-footer {
    border-top: 1px solid var(--ar-line);
    background: #fafbfe;
    padding: 0.85rem 1.25rem;
    gap: 0.5rem;
}

/* ---------- Confirmation dialog (AskAlert / bootbox.confirm) --- */

.ar-confirm-modal .modal-dialog {
    max-width: 400px;
}

.ar-confirm-modal .modal-content {
    border: 0;
    border-radius: var(--ar-radius);
    overflow: hidden;
    box-shadow: var(--ar-shadow-lg);
}

.ar-confirm-modal .modal-header {
    position: relative;
    border: 0;
    padding: 1.75rem 1.5rem 0.5rem;
}

.ar-confirm-modal .modal-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    flex: 1 1 auto;
    text-align: center;
    margin: 0;
}

.ar-confirm-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    background: rgba(111, 66, 193, 0.12);
    background: color-mix(in srgb, var(--arngo-accent, #6f42c1) 12%, transparent);
    color: var(--arngo-accent, #6f42c1);
}

.ar-confirm-modal.ar-confirm-danger .ar-confirm-icon {
    background: rgba(217, 83, 79, 0.12);
    color: #d9534f;
}

.ar-confirm-modal.ar-confirm-warning .ar-confirm-icon {
    background: rgba(240, 173, 78, 0.16);
    color: #d9822b;
}

.ar-confirm-modal.ar-confirm-success .ar-confirm-icon {
    background: rgba(16, 185, 129, 0.14);
    color: #059669;
}

/* Credentials handed back after an action - readable, selectable, and clearly
   a value rather than prose. */
.ar-credentials {
    display: grid;
    gap: 0.5rem;
    margin: 0.9rem 0 0.25rem;
    text-align: left;
}

.ar-credential {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--ar-line);
    border-radius: 10px;
    background: #f8fafc;
}

.ar-credential-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ar-muted);
}

.ar-credential-value {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ar-ink);
    user-select: all;
}

.ar-confirm-heading {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--ar-ink);
}

.ar-confirm-modal .close {
    position: absolute;
    top: 0.9rem;
    right: 1.1rem;
    color: var(--ar-muted);
    opacity: 0.7;
    text-shadow: none;
    font-size: 1.25rem;
}

.ar-confirm-modal .close:hover {
    opacity: 1;
    color: var(--ar-body);
}

.ar-confirm-modal .modal-body {
    padding: 0 1.75rem 1.5rem;
    text-align: center;
}

.ar-confirm-message {
    margin: 0;
    color: var(--ar-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.ar-confirm-modal .modal-footer {
    border-top: 1px solid var(--ar-line);
    background: #fafbfe;
    padding: 1rem 1.5rem;
    gap: 0.6rem;
    justify-content: center;
}

.ar-confirm-modal .modal-footer .btn {
    flex: 1 1 0;
    max-width: 150px;
    border-radius: 999px;
    padding: 0.55rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    border: 0;
    box-shadow: none;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.ar-confirm-modal .ar-btn-cancel {
    background: #eef1f6;
    color: var(--ar-muted);
}

.ar-confirm-modal .ar-btn-cancel:hover {
    background: #e3e7ee;
    color: var(--ar-body);
}

.ar-confirm-modal .ar-btn-confirm {
    background: var(--arngo-accent, #6f42c1);
    color: #fff;
    box-shadow: 0 6px 14px -4px rgba(111, 66, 193, 0.55);
}

.ar-confirm-modal .ar-btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px -6px rgba(111, 66, 193, 0.6);
}

.ar-confirm-modal.ar-confirm-danger .ar-btn-confirm {
    background: #d9534f;
    box-shadow: 0 6px 14px -4px rgba(217, 83, 79, 0.55);
}

.ar-confirm-modal.ar-confirm-danger .ar-btn-confirm:hover {
    box-shadow: 0 10px 18px -6px rgba(217, 83, 79, 0.6);
}

.ar-confirm-modal.ar-confirm-warning .ar-btn-confirm {
    background: #d9822b;
    box-shadow: 0 6px 14px -4px rgba(217, 130, 43, 0.55);
}

.ar-confirm-modal.ar-confirm-warning .ar-btn-confirm:hover {
    box-shadow: 0 10px 18px -6px rgba(217, 130, 43, 0.6);
}

/* Read-only summary strip inside a dialog (e.g. the picked bank + branch) */
.ar-note {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.7rem 0.85rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    border: 1px solid #dbe3fb;
    background: #f2f5ff;
    color: var(--ar-body);
    font-size: 0.82rem;
    line-height: 1.45;
}

.ar-note i {
    color: var(--ar-primary);
    margin-top: 0.12rem;
}

/* ---------- Alert flavours of .ar-note -------------------- */

.ar-note.is-danger {
    border-color: #f6c9c9;
    background: #fdf2f2;
}

.ar-note.is-danger i {
    color: #d9534f;
}

.ar-note ul {
    margin: 0;
    padding-left: 1.1rem;
}

/* ---------- Narrow, centred form column ------------------- */

.ar-narrow {
    max-width: 560px;
    margin: 0 auto;
}

/* ---------- Password field ------------------------------- */

/* Wraps a single input so the leading icon and the reveal button can sit
   inside it without the AdminLTE input-group markup. */
.ar-pw {
    position: relative;
}

.ar-pw > i {
    position: absolute;
    top: 50%;
    left: 0.85rem;
    transform: translateY(-50%);
    color: var(--ar-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.ar-form .ar-pw .form-control {
    padding-left: 2.35rem;
    padding-right: 2.6rem;
}

.ar-pw-eye {
    position: absolute;
    top: 50%;
    right: 0.35rem;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--ar-muted);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.ar-pw-eye:hover {
    background: var(--ar-canvas);
    color: var(--ar-primary);
}

/* ---------- Strength meter ------------------------------- */

.ar-meter {
    display: flex;
    gap: 5px;
    margin-top: 0.55rem;
}

.ar-meter span {
    flex: 1 1 0;
    height: 5px;
    border-radius: 3px;
    background: var(--ar-line);
    transition: background-color 0.2s ease;
}

.ar-meter.is-weak span:nth-child(-n+1) {
    background: #ef4444;
}

.ar-meter.is-fair span:nth-child(-n+2) {
    background: #f59e0b;
}

.ar-meter.is-good span:nth-child(-n+3) {
    background: #3b82f6;
}

.ar-meter.is-strong span {
    background: #16a34a;
}

.ar-meter-label {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ar-muted);
}

/* ---------- Requirement checklist ------------------------ */

.ar-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.4rem 1rem;
}

.ar-checklist li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--ar-muted);
    transition: color 0.15s ease;
}

.ar-checklist li i {
    font-size: 0.75rem;
    width: 1rem;
    text-align: center;
}

.ar-checklist li.is-met {
    color: #15803d;
}

.ar-checklist li.is-met i::before {
    content: "\f058"; /* circle-check */
}

/* ---------- Money figures -------------------------------- */

/* The headline number in a table cell — transaction totals, instalments. */
.ar-amount {
    display: block;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--ar-ink);
}

.ar-amount.is-muted {
    font-weight: 600;
    color: var(--ar-muted);
}

/* ---------- Read-only fact grid -------------------------- */

/* Label/value pairs for information the page shows but cannot edit, e.g. the
   member a collection belongs to. Reads far better than disabled inputs. */
.ar-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.9rem 1.1rem;
}

.ar-fact {
    min-width: 0;
}

.ar-fact-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ar-muted);
    margin-bottom: 0.2rem;
}

.ar-fact-value {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ar-ink);
    word-break: break-word;
}

.ar-fact-value.is-empty {
    font-weight: 500;
    color: #94a3b8;
}

/* Full-width fact inside the grid (addresses, long names) */
.ar-fact.is-wide {
    grid-column: 1 / -1;
}

/* ---------- Live totals panel ---------------------------- */

/* Sits beside a transaction form and adds the entered figures up as they are
   typed, so the amount being saved is never a surprise. */
.ar-summary {
    border: 1px solid var(--ar-line);
    border-radius: 12px;
    background: #f8faff;
    padding: 0.9rem 1rem;
}

.ar-summary-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 0;
    font-size: 0.84rem;
    color: var(--ar-body);
}

.ar-summary-row .ar-summary-value {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--ar-ink);
}

.ar-summary-row.is-total {
    margin-top: 0.35rem;
    padding-top: 0.6rem;
    border-top: 1px dashed #c9d6f5;
}

.ar-summary-row.is-total .ar-summary-label {
    font-weight: 700;
    color: var(--ar-ink);
}

.ar-summary-row.is-total .ar-summary-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--ar-primary);
}

.ar-summary-hint {
    display: block;
    margin-top: 0.6rem;
    font-size: 0.75rem;
    color: var(--ar-muted);
}

/* ---------- Transaction screens -------------------------- */

/* Extra tile accents so each ledger can colour-code its own figures.
   Used by: FDR/Project, DPS/Mutual, Revenue, Income/Expanse. */
.ar-stat-icon.is-rose,
.ar-quick-icon.is-rose {
    background: linear-gradient(135deg, #fb7185 0%, #e11d48 100%);
}

.ar-stat-icon.is-violet,
.ar-quick-icon.is-violet {
    background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
}

.ar-stat-icon.is-slate,
.ar-quick-icon.is-slate {
    background: linear-gradient(135deg, #94a3b8 0%, #475569 100%);
}

/* Money that only ever moves one way — income against expense */
.ar-amount.is-in {
    color: #067a52;
}

.ar-amount.is-out {
    color: #b42318;
}

/* Informational pill: a transaction type or fiscal year, not a status */
.ar-pill.is-info {
    background: #e8eeff;
    color: #3550c9;
}

/* Numbered walkthrough for forms that are worked in a fixed order, e.g.
   Revenue Distribution: pick a year, calculate, then process. */
.ar-step-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 0.9rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ar-muted);
}

.ar-step-no {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.72rem;
    letter-spacing: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--ar-primary) 0%, var(--ar-primary-2) 100%);
}

/* A button that sits in the field grid and has to line up with the inputs
   beside it, so it needs the same height and the label's top spacing. */
.ar-form .ar-btn-field {
    width: 100%;
    justify-content: center;
    height: 38px;
}

.ar-form .ar-btn-field.has-label {
    margin-top: 1.55rem;
}

/* ---------- Dashboard ------------------------------------ */

/* Home only. Everything below is read-only presentation: the dashboard has no
   forms, so it leans on tiles, charts and feeds rather than the form widgets. */

/* Today's date under the greeting */
.ar-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.9rem;
    margin-top: 0.45rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
}

.ar-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Movement badge on a stat tile — "+12.4% vs last month" */
.ar-delta {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ar-muted);
}

.ar-delta.is-up {
    color: #067a52;
}

.ar-delta.is-down {
    color: #b42318;
}

/* A tile whose figure needs a sentence of context rather than a comparison */
.ar-stat-note {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.72rem;
    color: var(--ar-muted);
}

/* Chart / table view switch. The pressed state has to be obvious, because it is
   the only thing telling you which of the two views you are looking at. */
.ar-btn-light.is-active {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: var(--ar-primary);
}

/* ---------- Headline band -------------------------------- */

/* The one figure the dashboard leads with, with its own trend line and the two
   balances it is made of. Exactly one of these per page. */
.ar-headline {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(260px, 1.1fr);
    gap: 1.25rem;
    align-items: center;
    background: var(--ar-surface);
    border: 1px solid var(--ar-line);
    border-radius: var(--ar-radius);
    box-shadow: var(--ar-shadow);
    padding: 1.35rem 1.5rem;
    margin-bottom: 1.15rem;
    position: relative;
    overflow: hidden;
}

/* Tint bleeding in from the right, behind the sparkline */
.ar-headline::after {
    content: "";
    position: absolute;
    inset: 0 0 0 45%;
    background: linear-gradient(90deg, rgba(79, 110, 247, 0) 0%, rgba(79, 110, 247, 0.05) 100%);
    pointer-events: none;
}

.ar-headline-main {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.ar-headline-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ar-muted);
}

.ar-headline-label i {
    color: var(--ar-primary);
}

/* Proportional figures on purpose: tabular-nums makes a large number look loose */
.ar-headline-value {
    display: block;
    margin: 0.3rem 0 0.1rem;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--ar-ink);
}

.ar-headline-split {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.75rem;
}

/* One component of the headline figure — reads as a fact, not a button */
.ar-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--ar-line);
    background: #f8fafc;
    font-size: 0.78rem;
    color: var(--ar-body);
    text-decoration: none !important;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

a.ar-chip:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: var(--ar-ink);
}

.ar-chip b {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--ar-ink);
}

.ar-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.ar-headline-spark {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.ar-headline-spark-caption {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.72rem;
    color: var(--ar-muted);
    text-align: right;
}

/* ---------- Sparklines ----------------------------------- */

/* Inline SVG, drawn by Dashboard.js. Sized by its box so the same markup works
   in a stat tile and in the headline band. */
.ar-spark {
    display: block;
    width: 100%;
    height: 34px;
    overflow: visible;
}

.ar-spark.is-lg {
    height: 84px;
}

.ar-stat-spark {
    margin-top: 0.5rem;
}

/* ---------- Seasonality heatmap -------------------------- */

.ar-heat {
    display: grid;
    gap: 4px;
    /* One label column + twelve months */
    grid-template-columns: auto repeat(12, minmax(0, 1fr));
    align-items: center;
}

.ar-heat-head,
.ar-heat-year {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--ar-muted);
    text-align: center;
}

.ar-heat-year {
    text-align: right;
    padding-right: 0.5rem;
    font-variant-numeric: tabular-nums;
}

.ar-heat-cell {
    position: relative;
    aspect-ratio: 1 / 1;
    min-height: 22px;
    border-radius: 5px;
    background: #f1f5f9;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    cursor: default;
}

/* Scoped to the grid: the legend reuses .ar-heat-cell purely for its colour and
   must not grow on hover. */
.ar-heat .ar-heat-cell[data-level]:hover {
    transform: scale(1.18);
    box-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.4);
    z-index: 2;
}

/* Sequential single-hue ramp, light to dark, validated as an ordinal ramp
   against the white card surface. Level 0 keeps the empty-track grey so
   "nothing collected" never reads as a low value. */
.ar-heat-cell[data-level="1"] { background: #9fb0fa; }
.ar-heat-cell[data-level="2"] { background: #7b90f8; }
.ar-heat-cell[data-level="3"] { background: #5871f6; }
.ar-heat-cell[data-level="4"] { background: #3b4fd0; }
.ar-heat-cell[data-level="5"] { background: #2a3792; }

.ar-heat-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    margin-top: 0.9rem;
    font-size: 0.72rem;
    color: var(--ar-muted);
}

/* min-height/aspect-ratio come from .ar-heat-cell, which the grid needs but a
   fixed-size legend chip does not. */
.ar-heat-legend span.ar-heat-swatch {
    width: 14px;
    height: 14px;
    min-height: 0;
    aspect-ratio: auto;
    border-radius: 4px;
}

/* ---------- Contributor leaderboard ---------------------- */

.ar-board {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: board;
}

.ar-board li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-top: 1px solid var(--ar-line);
}

.ar-board li:first-child {
    border-top: none;
}

.ar-board-rank {
    flex: 0 0 auto;
    width: 22px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ar-muted);
    font-variant-numeric: tabular-nums;
    text-align: center;
}

/* The top contributor is the point of the panel, so it gets the accent */
.ar-board li:first-child .ar-board-rank {
    color: var(--ar-primary);
}

.ar-board-avatar {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--ar-line);
}

.ar-board-initials {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--ar-primary) 0%, var(--ar-primary-2) 100%);
}

.ar-board-body {
    flex: 1 1 auto;
    min-width: 0;
}

.ar-board-name {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ar-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ar-board-sub {
    display: block;
    font-size: 0.72rem;
    color: var(--ar-muted);
}

.ar-board-value {
    flex: 0 0 auto;
    text-align: right;
    font-size: 0.88rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--ar-ink);
}

/* Share of the top contributor's total, so the rows compare at a glance */
.ar-board-bar {
    height: 4px;
    border-radius: 999px;
    background: #eef1f6;
    margin-top: 0.3rem;
    overflow: hidden;
}

.ar-board-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--ar-primary) 0%, var(--ar-primary-2) 100%);
}

/* ---------- Segmented control ---------------------------- */

/* Range switch above the cash-flow chart. One control, one row, scoping one card. */
.ar-segment {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--ar-line);
    border-radius: 10px;
    background: #f6f8fc;
}

.ar-segment button {
    border: none;
    background: transparent;
    border-radius: 8px;
    padding: 0.32rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ar-muted);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ar-segment button:hover {
    color: var(--ar-ink);
}

.ar-segment button.is-active {
    background: #fff;
    color: var(--ar-primary);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

/* ---------- Entrance animation --------------------------- */

/* Cards settle in on load. Staggered by nth-child rather than JS so nothing
   depends on scripts having run, and skipped entirely for reduced-motion. */
@keyframes ar-rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.ar-page .ar-stat,
.ar-page .ar-card,
.ar-page .ar-headline {
    animation: ar-rise 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
}

.ar-page .ar-stats .ar-stat:nth-child(1) { animation-delay: 0.02s; }
.ar-page .ar-stats .ar-stat:nth-child(2) { animation-delay: 0.06s; }
.ar-page .ar-stats .ar-stat:nth-child(3) { animation-delay: 0.10s; }
.ar-page .ar-stats .ar-stat:nth-child(4) { animation-delay: 0.14s; }
.ar-page .ar-stats .ar-stat:nth-child(5) { animation-delay: 0.18s; }
.ar-page .ar-stats .ar-stat:nth-child(6) { animation-delay: 0.22s; }

@media (prefers-reduced-motion: reduce) {
    .ar-page .ar-stat,
    .ar-page .ar-card,
    .ar-page .ar-headline {
        animation: none;
    }

    .ar-heat-cell[data-level]:hover {
        transform: none;
    }
}

/* Chart canvases are sized here, never inline, so the aspect ratio stays
   consistent and Chart.js has a fixed box to lay out against. */
.ar-chart {
    position: relative;
    width: 100%;
    height: 300px;
}

.ar-chart.is-short {
    height: 236px;
}

/* Doughnut legend — the chart's own legend is switched off so the figures can
   line up in a column and stay readable at small sizes. */
.ar-legend {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
}

.ar-legend li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0;
    font-size: 0.82rem;
    border-top: 1px solid var(--ar-line);
}

.ar-legend li:first-child {
    border-top: none;
}

.ar-legend-dot {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.ar-legend-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ar-body);
}

.ar-legend-value {
    flex: 0 0 auto;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--ar-ink);
}

/* Progress bar for "how much of this has come back" */
.ar-bar {
    height: 6px;
    border-radius: 999px;
    background: #eef1f6;
    overflow: hidden;
}

.ar-bar-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--ar-primary) 0%, var(--ar-primary-2) 100%);
}

.ar-bar-fill.is-green {
    background: linear-gradient(90deg, #34d399 0%, #059669 100%);
}

/* Ranked list — projects by the capital they are holding */
.ar-rank {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ar-rank li {
    padding: 0.8rem 0;
    border-top: 1px solid var(--ar-line);
}

.ar-rank li:first-child {
    padding-top: 0;
    border-top: none;
}

.ar-rank li:last-child {
    padding-bottom: 0;
}

.ar-rank-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.ar-rank-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ar-ink);
}

.ar-rank-code {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--ar-muted);
}

.ar-rank-value {
    flex: 0 0 auto;
    text-align: right;
    font-size: 0.9rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--ar-ink);
}

.ar-rank-foot {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.35rem;
    font-size: 0.73rem;
    color: var(--ar-muted);
}

/* Activity feed — the latest rows from every ledger, newest first */
.ar-feed {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ar-feed li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.62rem 0;
    border-top: 1px solid var(--ar-line);
}

.ar-feed li:first-child {
    border-top: none;
}

.ar-feed-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
}

.ar-feed-icon.is-in {
    background: #e7f8f0;
    color: #067a52;
}

.ar-feed-icon.is-out {
    background: #fdeaea;
    color: #b42318;
}

.ar-feed-body {
    flex: 1 1 auto;
    min-width: 0;
}

.ar-feed-title {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--ar-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ar-feed-sub {
    display: block;
    font-size: 0.73rem;
    color: var(--ar-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ar-feed-amount {
    flex: 0 0 auto;
    text-align: right;
    font-size: 0.86rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.ar-feed-amount.is-in {
    color: #067a52;
}

.ar-feed-amount.is-out {
    color: #b42318;
}

.ar-feed-amount small {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    color: #b45309;
}

/* Drafts waiting to be posted. Amber rather than red: nothing is broken, there
   is just unfinished work, and each chip links straight to the list holding it. */
.ar-card.is-attention {
    border-top: 3px solid #f59e0b;
}

.ar-attention {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.6rem;
}

.ar-attention-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--ar-line);
    border-radius: 11px;
    background: #fff;
    color: var(--ar-body);
    text-decoration: none !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.ar-attention-item:hover {
    transform: translateY(-1px);
    border-color: #fcd34d;
    box-shadow: 0 8px 18px -10px rgba(245, 158, 11, 0.75);
    color: var(--ar-ink);
}

.ar-attention-count {
    flex: 0 0 auto;
    min-width: 30px;
    height: 30px;
    padding: 0 0.4rem;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.ar-attention-label {
    font-size: 0.82rem;
    font-weight: 600;
}

/* Shortcuts to the screens this app is opened for most */
.ar-quick {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.7rem;
}

.ar-quick-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--ar-line);
    border-radius: 12px;
    background: #fff;
    color: var(--ar-body);
    text-decoration: none !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.ar-quick-item:hover {
    transform: translateY(-2px);
    border-color: #c7d2fe;
    box-shadow: var(--ar-shadow-lg);
    color: var(--ar-ink);
}

.ar-quick-icon {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: #fff;
}

.ar-quick-name {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ar-ink);
}

.ar-quick-sub {
    display: block;
    font-size: 0.72rem;
    color: var(--ar-muted);
}

/* ---------- Inline setting editors (Settings / Master Settings / Prefix Codes) ---------- */

.ar-btn-sm {
    padding: 0.32rem 0.7rem;
    font-size: 0.78rem;
    border-radius: 8px;
}

.ar-kv-name {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--ar-ink);
}

.ar-save-btn {
    min-width: 92px;
}

.ar-save-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
    transform: none !important;
}

/* Amber dot shown next to a row's name while its value differs from what is saved */
.ar-dirty-dot {
    display: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f59e0b;
    margin-right: 0.5rem;
    flex: 0 0 auto;
}

.ar-edit-row.is-dirty .ar-dirty-dot {
    display: inline-block;
}

.ar-edit-row.is-dirty td {
    background-color: #fffbeb;
}

/* Brief green wash confirming a save landed, cleared a moment later by JS */
.ar-edit-row.is-saved td {
    background-color: #ecfdf5;
    transition: background-color 1.1s ease;
}

/* Prefix code editor */
.ar-prefix-input {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    text-align: center;
    max-width: 130px;
}

.ar-prefix-preview {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.76rem;
    color: var(--ar-muted);
    white-space: nowrap;
}

.ar-prefix-preview b {
    font-variant-numeric: tabular-nums;
    color: var(--ar-ink);
    background: #eef2ff;
    border: 1px solid #dbe3ff;
    border-radius: 6px;
    padding: 0.15rem 0.5rem;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
}

/* Master settings warning banner */
.ar-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
    margin: 0 0 1rem;
}

.ar-notice i {
    font-size: 1.05rem;
    margin-top: 0.1rem;
}

/* ============================================================
   Settings / Master Settings
   A settings screen is a form, not a data grid: every value gets
   a plain-language label, a line explaining what changing it
   does, and the control that suits its type. Edits are staged
   and written together from the bar at the bottom.
   ============================================================ */

/* Master Settings is owner-only and loosens controls, so its header is amber
   rather than the usual indigo - the colour is the warning. */
.ar-hero.is-master {
    background: linear-gradient(135deg, #b45309 0%, #f59e0b 100%);
}

/* ---------- Search + section jump links ------------------ */

.ar-settings-bar {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.ar-chipnav {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.ar-chipnav .ar-chip {
    cursor: pointer;
    font-weight: 600;
    background: var(--ar-surface);
}

.ar-chipnav .ar-chip i {
    color: var(--ar-muted);
    font-size: 0.78rem;
    transition: color 0.15s ease;
}

.ar-chipnav .ar-chip:hover {
    border-color: var(--ar-primary);
    color: var(--ar-ink);
}

.ar-chipnav .ar-chip:hover i,
.ar-chipnav .ar-chip.is-active i {
    color: var(--ar-primary);
}

.ar-chipnav .ar-chip.is-active {
    border-color: var(--ar-primary);
    background: #eef2ff;
    color: var(--ar-ink);
}

/* ---------- Section stack -------------------------------- */

.ar-settings-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Scroll target sits clear of the sticky top bar */
.ar-setting-group {
    scroll-margin-top: 80px;
}

.ar-setting-list {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

/* ---------- One setting ---------------------------------- */

.ar-setting {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 0.25rem;
    border-top: 1px solid var(--ar-line);
    border-radius: 10px;
    transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.ar-setting:first-child {
    border-top: none;
}

.ar-setting-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.ar-setting-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ar-ink);
}

.ar-setting-desc {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--ar-muted);
    max-width: 62ch;
}

/* The database key, kept visible but quiet - it is what support asks for */
.ar-setting-key {
    align-self: flex-start;
    margin-top: 0.15rem;
    padding: 0.08rem 0.4rem;
    border: 1px solid var(--ar-line);
    border-radius: 5px;
    background: #f8fafc;
    font-size: 0.68rem;
    color: #94a3b8;
    letter-spacing: 0.02em;
}

.ar-setting-control {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    justify-content: flex-end;
}

/* Dirty / saved / failed feedback -------------------------- */

.ar-setting.is-dirty {
    background-color: #fffbeb;
    box-shadow: inset 3px 0 0 #f59e0b;
}

.ar-setting.is-dirty .ar-dirty-dot {
    display: inline-block;
    margin-right: 0;
}

.ar-setting.is-saved {
    background-color: #ecfdf5;
    box-shadow: inset 3px 0 0 #10b981;
    transition: background-color 1.2s ease, box-shadow 1.2s ease;
}

.ar-setting.is-error {
    background-color: #fef2f2;
    box-shadow: inset 3px 0 0 #ef4444;
}

/* "Saved" tick, shown only for the moment the row carries is-saved */
.ar-setting-state {
    display: none;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.74rem;
    font-weight: 600;
    color: #059669;
    white-space: nowrap;
}

.ar-setting.is-saved .ar-setting-state {
    display: inline-flex;
}

/* ---------- Value inputs --------------------------------- */

.ar-field {
    position: relative;
    display: flex;
    align-items: center;
}

.ar-form .ar-field .form-control {
    width: 240px;
    height: 40px;
}

.ar-form .ar-field .ar-num {
    width: 150px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.ar-form .ar-field .ar-path {
    width: 320px;
    font-family: "Consolas", "SF Mono", "Menlo", monospace;
    font-size: 0.8rem;
}

/* Unit sitting inside the field, with padding reserved so text never runs under it */
.ar-field.has-affix .form-control {
    padding-right: 3.6rem;
}

.ar-affix {
    position: absolute;
    right: 0.75rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--ar-muted);
    pointer-events: none;
}

/* ---------- Switch --------------------------------------- */

.ar-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.ar-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ar-switch-track {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    flex: 0 0 auto;
}

.ar-switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.35);
    transition: transform 0.2s ease;
}

.ar-switch input:checked + .ar-switch-track {
    background: linear-gradient(135deg, var(--ar-primary) 0%, var(--ar-primary-2) 100%);
}

.ar-switch input:checked + .ar-switch-track .ar-switch-thumb {
    transform: translateX(20px);
}

.ar-switch input:focus-visible + .ar-switch-track {
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.32);
}

/* On a master setting an enabled switch means a safeguard is off - amber says so */
.ar-setting.is-sensitive .ar-switch input:checked + .ar-switch-track {
    background: linear-gradient(135deg, #f59e0b 0%, #ea8a04 100%);
}

.ar-setting.is-sensitive .ar-switch input:focus-visible + .ar-switch-track {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35);
}

.ar-switch-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ar-body);
    min-width: 108px;
}

/* ---------- Inline tag ----------------------------------- */

.ar-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ar-tag-amber {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
}

/* ---------- Save bar ------------------------------------- */

/* Docked at the bottom and only present while something is staged, so the
   count of pending edits is always in view without stealing space. */
.ar-savebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    padding: 0 1rem 1rem;
    display: flex;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transform: translateY(120%);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.ar-savebar.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.ar-savebar-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 720px;
    width: 100%;
    padding: 0.7rem 0.8rem 0.7rem 1.15rem;
    border-radius: 14px;
    background: var(--ar-ink);
    color: #fff;
    box-shadow: 0 18px 40px -12px rgba(15, 23, 42, 0.55);
}

.ar-savebar-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    margin-right: auto;
}

.ar-savebar-text i {
    color: #fbbf24;
}

.ar-savebar-text b {
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.ar-savebar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ar-savebar .ar-btn-light {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.ar-savebar .ar-btn-light:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* The bar floats over the end of the page, so the last card keeps clear of it */
.ar-settings .ar-settings-body {
    padding-bottom: 4.5rem;
}

/* ---------- Responsive ----------------------------------- */

@media (max-width: 767.98px) {
    .ar-page {
        padding: 0.85rem 0.75rem 2rem;
    }

    /* Charts get taller relative to their width on a narrow screen, or the
       12-month axis squeezes the plot into a strip. */
    .ar-chart {
        height: 250px;
    }

    .ar-chart.is-short {
        height: 210px;
    }

    /* Headline stacks: the sparkline goes under the figure rather than beside it */
    .ar-headline {
        grid-template-columns: 1fr;
        padding: 1.15rem;
    }

    .ar-headline::after {
        inset: 55% 0 0 0;
        background: linear-gradient(180deg, rgba(79, 110, 247, 0) 0%, rgba(79, 110, 247, 0.05) 100%);
    }

    .ar-headline-value {
        font-size: 2.3rem;
    }

    .ar-headline-spark-caption {
        text-align: left;
    }

    /* Thirteen columns will not fit; the grid scrolls as one block instead of
       shrinking the cells into unreadable slivers. */
    .ar-heat-wrap {
        overflow-x: auto;
    }

    .ar-heat {
        min-width: 460px;
    }

    .ar-hero {
        padding: 1.15rem;
    }

    .ar-hero h1 {
        font-size: 1.3rem;
    }

    .ar-hero-inner,
    .ar-actionbar {
        flex-direction: column;
        align-items: stretch;
    }

    .ar-hero-actions,
    .ar-actionbar-buttons {
        justify-content: stretch;
    }

    .ar-hero-actions .ar-btn,
    .ar-actionbar-buttons .ar-btn {
        flex: 1 1 auto;
    }

    .ar-search {
        min-width: 100%;
    }

    .ar-filter,
    .ar-filter select {
        width: 100%;
    }

    .ar-daterange {
        width: 100%;
    }

    .ar-daterange .input-group {
        flex: 1 1 0;
        width: auto;
    }

    .ar-stat-value {
        font-size: 1.3rem;
    }

    /* Stacked, the button no longer sits next to a labelled field */
    .ar-form .ar-btn-field.has-label {
        margin-top: 0;
    }

    /* Settings: the control drops under its label instead of being squeezed
       into a column too narrow to read the description beside it. */
    .ar-setting {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }

    .ar-setting-control {
        justify-content: flex-start;
    }

    .ar-form .ar-field .form-control,
    .ar-form .ar-field .ar-num,
    .ar-form .ar-field .ar-path {
        width: 100%;
    }

    .ar-field {
        width: 100%;
    }

    .ar-settings-bar {
        gap: 0.6rem;
    }

    /* Horizontal chip strip rather than four stacked rows of jump links */
    .ar-chipnav {
        flex-wrap: nowrap;
        overflow-x: auto;
        width: 100%;
        padding-bottom: 0.25rem;
    }

    .ar-savebar {
        padding: 0 0.6rem 0.6rem;
    }

    .ar-savebar-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
        padding: 0.8rem;
    }

    .ar-savebar-text {
        margin-right: 0;
        justify-content: center;
    }

    .ar-savebar-actions .ar-btn {
        flex: 1 1 0;
    }
}

/* ============================================================
   Modern Login Card
   Scoped to .arn-login-* classes (added alongside the existing
   login-box/card markup) so ResetPassword and ConnectionSetup,
   which reuse the plain login-box layout, are unaffected. The
   .login-page background image itself is untouched — everything
   here is layered on top of it.
   ============================================================ */
@keyframes arnLoginIn {
    from {
        opacity: 0;
        transform: translateY(22px) scale(.97);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes arnGlowDrift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-5px, 5px); }
}

.arn-login-box {
    position: relative;
    width: 420px;
    max-width: 100%;
    margin: 0 auto;
}

/* inset:0 keeps the glow's layout box inside the card's footprint so it adds no
   scrollable overflow; the blur still spreads past the edge visually, because
   filter ink-overflow does not count toward scroll extent the way a larger box
   or a transform: scale() would. */
.arn-login-glow {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(closest-side, rgba(96, 165, 250, 0.55), transparent) 15% 20% / 55% 55% no-repeat,
        radial-gradient(closest-side, rgba(37, 99, 235, 0.45), transparent) 85% 80% / 60% 60% no-repeat;
    filter: blur(30px);
    animation: arnGlowDrift 10s ease-in-out infinite;
}

.arn-login-card {
    position: relative;
    z-index: 1;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.45), 0 2px 8px rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    animation: arnLoginIn .55s cubic-bezier(.16, 1, .3, 1) both;
}

.arn-login-card::before {
    content: "";
    display: block;
    height: 5px;
    background: linear-gradient(90deg, #38bdf8 0%, #2563eb 50%, #4f46e5 100%);
}

.arn-login-brand {
    display: flex;
    justify-content: center;
    padding-top: 1.6rem;
}

.arn-login-logo-ring {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #38bdf8, #2563eb 55%, #4f46e5);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}

.arn-login-logo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    padding: 8px;
    background: #fff;
    display: block;
}

.arn-login-body {
    padding: 1.1rem 2.25rem 1.5rem;
}

.arn-login-title {
    font-family: 'Lato', sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    text-align: center;
    letter-spacing: .2px;
    margin-bottom: 0.3rem;
    background: linear-gradient(120deg, #1e293b 0%, #2563eb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.arn-login-subtitle {
    text-align: center;
    color: #64748b;
    font-size: 0.88rem;
    margin-bottom: 1.35rem;
}

.arn-input-group {
    position: relative;
    margin-bottom: 0.9rem;
}

.arn-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.95rem;
    pointer-events: none;
    transition: color .15s ease;
}

.arn-input {
    width: 100%;
    height: 48px;
    padding: 0 44px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background-color: #f8fafc;
    font-size: 0.95rem;
    color: #1e293b;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.arn-input:focus {
    outline: none;
    border-color: #2563eb;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.arn-input-group:focus-within .arn-input-icon {
    color: #2563eb;
}

.arn-input-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #94a3b8;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease;
}

.arn-input-toggle:hover {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
}

.arn-login-row {
    display: flex;
    align-items: center;
    margin-bottom: 1.1rem;
}

.arn-remember label {
    color: #475569;
    font-size: 0.88rem;
    margin-left: 6px;
    margin-bottom: 0;
    cursor: pointer;
}

.arn-login-btn {
    position: relative;
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #38bdf8 0%, #2563eb 55%, #4f46e5 100%);
    background-size: 180% 180%;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.35);
    transition: transform .15s ease, box-shadow .15s ease, background-position .3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
}

.arn-login-btn i {
    transition: transform .2s ease;
}

.arn-login-btn:hover,
.arn-login-btn:focus {
    color: #fff;
    background-position: 100% 0;
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.42);
}

.arn-login-btn:hover i {
    transform: translateX(4px);
}

.arn-login-btn:active {
    transform: translateY(0);
}

.arn-login-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0.9rem 0 0;
    color: #94a3b8;
    font-size: 0.78rem;
    letter-spacing: .2px;
}

.arn-login-secure i {
    color: #22c55e;
}



/* ============================================================
   Message settings form (.ar-msg)
   Shared by Mail Setting and SMS Setting: the account a message
   is sent through, and the message each document is sent with.
   Editing behaves exactly like the Settings screen - Settings.js
   drives all three - so the rows here are still .ar-setting;
   they are just laid out as a form instead of a label/control
   list.
   ============================================================ */

/* ---------- Alignment ------------------------------------ */

/* Every heading on this screen reads from the left whatever sits around it:
   the card heads are flex boxes and the document type rows are buttons, and
   both centre their text as soon as anything else says so. */
.ar-msg .ar-hero-title,
.ar-msg .ar-hero h1,
.ar-msg .ar-hero p,
.ar-msg .ar-card-head,
.ar-msg .ar-card-title,
.ar-msg .ar-card-title small,
.ar-msg .ar-msg-label,
.ar-msg .ar-msg-note,
.ar-msg .ar-msg-type-head,
.ar-msg .ar-msg-type-name,
.ar-msg .ar-msg-type-desc {
    text-align: left;
}

.ar-msg .ar-card-head,
.ar-msg .ar-card-title {
    justify-content: flex-start;
}

/* ---------- Field grid ----------------------------------- */

.ar-msg-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}

.ar-msg .ar-setting {
    display: flex;
    flex-direction: column;
    /* The settings list centres the items in each row; stacked as a column that
       same rule would centre every label, hint and switch over its field. */
    align-items: stretch;
    text-align: left;
    gap: 0.35rem;
    grid-column: span 12;
    padding: 0;
    border-top: 0;
    border-radius: 10px;
}

/* A long value - the SMS gateway URL - kept on one line with a short field beside it. */
.ar-msg-field.is-threequarter {
    grid-column: span 9;
}

.ar-msg-field.is-half {
    grid-column: span 6;
}

.ar-msg-field.is-quarter {
    grid-column: span 3;
}

@media (max-width: 1199.98px) {
    .ar-msg-field.is-threequarter {
        grid-column: span 12;
    }

    .ar-msg-field.is-quarter {
        grid-column: span 6;
    }
}

@media (max-width: 767.98px) {
    .ar-msg-field.is-threequarter,
    .ar-msg-field.is-half,
    .ar-msg-field.is-quarter {
        grid-column: span 12;
    }
}

/* Beats the generic .ar-form label rule so the saved chip can sit inline. */
.ar-form.ar-msg .ar-msg-field > label.ar-msg-label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 0.4rem;
    margin-bottom: 0.15rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
}

.ar-msg-hint {
    display: block;
    text-align: left;
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--ar-muted);
}

.ar-msg .ar-msg-body {
    min-height: 118px;
    resize: vertical;
    font-size: 0.85rem;
    line-height: 1.55;
}

.ar-msg .ar-switch {
    align-self: flex-start;
    margin: 0.15rem 0 0;
}

/* ---------- Staged / saved feedback ----------------------- */

/* Quieter than the settings list: the field itself carries the state, since a
   form this dense would flicker if whole rows changed colour. */
.ar-msg .ar-setting.is-dirty .form-control {
    border-color: #f59e0b;
    background-color: #fffbeb;
}

.ar-msg .ar-setting.is-error .form-control {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.ar-msg-state {
    display: none;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #15803d;
}

.ar-msg .ar-setting.is-saved .ar-msg-state {
    display: inline-flex;
}

/* ---------- Placeholder legend ---------------------------- */

.ar-msg-tokens {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px dashed var(--ar-line);
}

.ar-msg-tokens-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ar-muted);
}

.ar-msg-token {
    padding: 0.12rem 0.45rem;
    border: 1px solid #e0e7ff;
    border-radius: 6px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.75rem;
}

.ar-msg-tokens .ar-msg-hint {
    flex-basis: 100%;
}

/* ---------- Per document type ----------------------------- */

.ar-msg-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0 0 1rem;
    font-size: 0.85rem;
    color: var(--ar-muted);
}

.ar-msg-note i {
    margin-top: 0.15rem;
    color: var(--ar-primary);
}

.ar-msg-types {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ar-msg-type {
    border: 1px solid var(--ar-line);
    border-radius: 12px;
    background: var(--ar-surface);
    overflow: hidden;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.ar-msg-type.is-open {
    border-color: #c7d2fe;
    box-shadow: var(--ar-shadow);
}

.ar-msg-type-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 0;
    background: #f8fafc;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.16s ease;
}

.ar-msg-type-head:hover {
    background: #f1f5f9;
}

.ar-msg-type-head:focus-visible {
    outline: 0;
    box-shadow: inset 0 0 0 2px rgba(79, 110, 247, 0.5);
}

.ar-msg-type.is-open .ar-msg-type-head {
    background: var(--ar-surface);
    border-bottom: 1px solid var(--ar-line);
}

.ar-msg-caret {
    font-size: 0.72rem;
    color: var(--ar-muted);
    transition: transform 0.18s ease;
}

.ar-msg-type.is-open .ar-msg-caret {
    transform: rotate(90deg);
}

.ar-msg-type-icon {
    width: 1.1rem;
    text-align: center;
    color: var(--ar-primary);
}

.ar-msg-type-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ar-ink);
}

.ar-msg-type-desc {
    margin-left: auto;
    font-size: 0.78rem;
    color: var(--ar-muted);
}

.ar-msg-type-body {
    padding: 1rem 0.9rem 1.1rem;
}

.ar-msg-type .ar-tag {
    background: #eef2f7;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

.ar-msg-type .ar-tag.ar-tag-indigo {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4338ca;
}

@media (max-width: 767.98px) {
    .ar-msg-type-desc {
        display: none;
    }
}

/* ---------- Member portal -------------------------------- */

/* The member's own photo is shown, not uploaded, so the frame must not invite a click. */
.ar-avatar-frame.ar-avatar-static {
    cursor: default;
}

/* For a tile whose value is a date or a word rather than a figure. */
.ar-stat-value.ar-stat-value-sm {
    font-size: 1.1rem;
    letter-spacing: 0.01em;
}

/* ---------- Member portal: account switcher --------------- */

/* A strip of the member's accounts, shown only when they hold more than one. It is a
   single form of submit buttons, so it must not inherit any form layout of its own. */
.ar-accountbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0.6rem 0.85rem;
    background: #fff;
    border: 1px solid var(--ar-line);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.ar-accountbar-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ar-muted);
    margin-right: 0.25rem;
}

.ar-account-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--ar-line);
    border-radius: 10px;
    background: #f8fafc;
    color: var(--ar-body);
    cursor: pointer;
    transition: all .15s ease;
}

.ar-account-chip:hover {
    border-color: #cbd5e1;
    background: #fff;
    transform: translateY(-1px);
}

/* The account on screen is not a destination, so it reads as a state rather than a button. */
.ar-account-chip.is-current {
    border-color: var(--arngo-accent, #6f42c1);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(111, 66, 193, 0.14);
    cursor: default;
}

.ar-account-chip.is-current:hover {
    transform: none;
}

.ar-account-chip-no {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ar-ink);
}

.ar-account-chip-meta {
    font-size: 0.75rem;
    color: var(--ar-muted);
}

/* The row the rest of the page is describing, on the accounts table. */
table.ar-table tbody tr.is-current-account td {
    background: rgba(111, 66, 193, 0.05);
    background: color-mix(in srgb, var(--arngo-accent, #6f42c1) 5%, transparent);
}

@media (max-width: 575.98px) {
    .ar-account-chip-meta {
        display: none;
    }
}
