/* BCPA Admin - Custom Styles */

:root {
    /* Brand colours pulled from the marketing website */
    --bcpa-brand: #c27278;
    --bcpa-brand-dk: #a85d63;
    --bcpa-brand-lt: #f7e8e9;
    --bcpa-brand-rgb: 194, 114, 120;

    /* Supporting palette */
    --bcpa-teal: #0d9488;
    --bcpa-teal-lt: #ccfbf1;
    --bcpa-amber: #d97706;
    --bcpa-amber-lt: #fef3c7;
    --bcpa-rose: #c0404d;
    --bcpa-rose-lt: #fde8ea;
    --bcpa-ink: #172033;
    --bcpa-slate: #64748b;
    --bcpa-muted: #8b98aa;
    --bcpa-line: #e4e9f1;
    --bcpa-line-soft: #eef2f7;
    --bcpa-panel: #ffffff;
    --bcpa-panel-2: #fbfcfe;
    --bcpa-bg: #f3f5f9;
    --bcpa-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 20px rgba(15, 23, 42, 0.045);
    --bcpa-shadow-md: 0 20px 50px rgba(15, 23, 42, 0.1);
    --bcpa-radius-sm: 8px;
    --bcpa-radius-md: 10px;
    --bcpa-radius-lg: 12px;

    /* Sidebar */
    --sidebar-bg: #111722;
    --sidebar-width: 260px;
    --navbar-height: 64px;
}

/* Base */
body {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    background:
        radial-gradient(circle at top left, rgba(var(--bcpa-brand-rgb), 0.13), transparent 34rem),
        radial-gradient(circle at 84% 8%, rgba(13, 148, 136, 0.09), transparent 28rem),
        linear-gradient(180deg, #fbfcff 0%, var(--bcpa-bg) 22rem);
    color: var(--bcpa-ink);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--bcpa-brand-dk);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.16em;
}

a:hover {
    color: #8f4e55;
}

::selection {
    background: rgba(var(--bcpa-brand-rgb), 0.22);
    color: var(--bcpa-ink);
}

/* Layout */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

.layout-menu {
    width: var(--sidebar-width);
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 6%, rgba(var(--bcpa-brand-rgb), 0.2), transparent 13rem),
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0)),
        var(--sidebar-bg);
    flex-shrink: 0;
    transition: transform 0.25s ease;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 1030;
    border-right: 1px solid rgba(255,255,255,0.08);
    box-shadow: 8px 0 28px rgba(15, 23, 42, 0.12);
    display: flex;
    flex-direction: column;
}

.layout-page {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.layout-navbar {
    height: var(--navbar-height);
    background: rgba(255, 255, 255, 0.84);
    border-bottom: 1px solid rgba(226, 232, 240, 0.86);
    position: sticky;
    top: 0;
    z-index: 1020;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.content-wrapper {
    flex: 1;
    padding: 1.75rem;
}

.container-xxl {
    max-width: 1500px;
}

@media (max-width: 1199px) {
    .layout-menu {
        transform: translateX(-100%);
    }

    .layout-menu.show {
        transform: translateX(0);
    }

    .layout-page {
        margin-left: 0;
    }
}

/* Sidebar */
.app-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1rem 0.85rem;
}

.app-brand span {
    color: #fff;
}

.app-brand img {
    border-radius: 9px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.22);
}

.app-brand .brand-accent {
    color: var(--bcpa-brand);
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 0.72rem;
    min-width: 0;
    flex: 1;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 14px;
    background:
        radial-gradient(circle at 30% 20%, rgba(255,255,255,0.2), transparent 56%),
        rgba(255,255,255,0.08);
    box-shadow: 0 16px 28px rgba(0,0,0,0.22);
}

.brand-mark img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.brand-copy {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.brand-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 820;
    letter-spacing: 0.02em;
    line-height: 1;
}

.brand-subtitle {
    color: rgba(255,255,255,0.54) !important;
    font-size: 11px;
    font-weight: 740;
    letter-spacing: 0.08em;
    line-height: 1.15;
    text-transform: uppercase;
}

.sidebar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: rgba(255,255,255,0.72);
    text-decoration: none;
}

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

.sidebar-status-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0.35rem 0.75rem 0.85rem;
    padding: 0.85rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(var(--bcpa-brand-rgb), 0.2), rgba(13, 148, 136, 0.08)),
        rgba(255,255,255,0.055);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.sidebar-status-card strong {
    display: block;
    margin-top: 0.18rem;
    color: #fff;
    font-size: 13px;
    font-weight: 760;
    line-height: 1.25;
}

.sidebar-status-label {
    color: rgba(255,255,255,0.56) !important;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sidebar-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #64748b;
    box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.18);
    flex: 0 0 auto;
}

.sidebar-status-dot.is-live {
    background: #2dd4bf;
    box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.16), 0 0 18px rgba(45, 212, 191, 0.4);
}

.menu-inner {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.menu-inner > li {
    margin-bottom: 3px;
}

.menu-section {
    margin: 1rem 0.85rem 0.38rem;
    color: rgba(255,255,255,0.34);
    font-size: 10px;
    font-weight: 820;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    padding: 9px 12px;
    border-radius: 12px;
    color: rgba(255,255,255,0.64);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    transition: background 0.15s, color 0.15s, transform 0.15s;
    cursor: pointer;
    position: relative;
}

.menu-link:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.92);
    transform: translateX(1px);
}

.menu-item.active > .menu-link,
.menu-item.open > .menu-link {
    background:
        linear-gradient(135deg, rgba(var(--bcpa-brand-rgb), 0.28), rgba(var(--bcpa-brand-rgb), 0.12)),
        rgba(255,255,255,0.03);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.menu-item.active > .menu-link::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f0b6ba, var(--bcpa-brand));
    box-shadow: 0 0 18px rgba(var(--bcpa-brand-rgb), 0.64);
}

.menu-item.active > .menu-link .menu-icon {
    color: #f4bdc1;
}

.menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 10px;
    background: rgba(255,255,255,0.055);
    font-size: 17px;
    opacity: 0.75;
}

.menu-item.active > .menu-link .menu-icon,
.menu-item.open > .menu-link .menu-icon {
    background: rgba(255,255,255,0.12);
    opacity: 1;
}

.menu-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    margin-left: auto;
    padding: 0 0.42rem;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.menu-count--warning {
    background: rgba(217, 119, 6, 0.18);
    border-color: rgba(251, 191, 36, 0.28);
    color: #fde68a;
}

.menu-arrow {
    font-size: 14px;
    margin-left: auto;
    opacity: 0.5;
    transition: transform 0.2s ease;
}

.menu-item.open > .menu-link .menu-arrow {
    transform: rotate(90deg);
    opacity: 0.9;
}

.menu-sub {
    list-style: none;
    padding: 5px 0 5px 52px;
    margin: 1px 0 2px;
    display: none;
    position: relative;
}

.menu-sub::before {
    content: "";
    position: absolute;
    left: 30px;
    top: 7px;
    bottom: 10px;
    width: 1px;
    background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.035));
}

.menu-item.open > .menu-sub {
    display: block;
}

.menu-sub .menu-item {
    margin-bottom: 1px;
}

.menu-sub .menu-link {
    min-height: 33px;
    font-size: 13px;
    padding: 6px 10px 6px 12px;
    color: rgba(255,255,255,0.5);
    border-radius: 9px;
    background: transparent;
}

.menu-sub .menu-link:hover {
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.06);
}

.menu-sub .menu-item.active > .menu-link {
    color: #fff;
    background: rgba(var(--bcpa-brand-rgb), 0.14);
}

.menu-divider {
    border-top: 1px solid rgba(255,255,255,0.07);
    margin: 8px 14px;
}

.menu-link--external {
    color: rgba(255,255,255,0.42);
}

.sidebar-footer-card {
    display: flex;
    gap: 0.7rem;
    margin: 0.65rem 0.75rem 0.85rem;
    padding: 0.85rem;
    border: 1px solid rgba(255,255,255,0.085);
    border-radius: 16px;
    background: rgba(255,255,255,0.045);
}

.sidebar-footer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.72);
    flex: 0 0 auto;
    font-size: 18px;
}

.sidebar-footer-card strong {
    display: block;
    color: rgba(255,255,255,0.8);
    font-size: 12.5px;
    line-height: 1.25;
}

.sidebar-footer-card a {
    display: inline-flex;
    margin-top: 0.18rem;
    color: #f0b6ba;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}

.sidebar-footer-card a:hover {
    color: #fff;
}

/* Top Navbar */
.layout-navbar .container-xxl {
    min-height: var(--navbar-height);
}

.layout-navbar .navbar-nav .nav-link {
    color: var(--bcpa-ink);
    font-size: 14px;
}

.layout-navbar .dropdown-toggle::after {
    opacity: 0.45;
}

.avatar {
    box-shadow: inset 0 0 0 1px rgba(var(--bcpa-brand-rgb), 0.16);
}

.dropdown-menu {
    border: 1px solid var(--bcpa-line);
    border-radius: var(--bcpa-radius-md);
    box-shadow: var(--bcpa-shadow-md);
    padding: 0.45rem;
}

.dropdown-item {
    border-radius: 7px;
    font-size: 13.5px;
    font-weight: 500;
    padding: 0.55rem 0.65rem;
}

.dropdown-header {
    padding: 0.65rem;
}

/* Cards */
.card {
    border: 1px solid var(--bcpa-line);
    border-radius: var(--bcpa-radius-lg);
    box-shadow: var(--bcpa-shadow-sm);
    background: var(--bcpa-panel);
    overflow: hidden;
}

.card:hover {
    border-color: #dae1ec;
}

.card-header {
    background: linear-gradient(180deg, #fff 0%, var(--bcpa-panel-2) 100%);
    border-bottom: 1px solid var(--bcpa-line-soft);
    border-radius: var(--bcpa-radius-lg) var(--bcpa-radius-lg) 0 0 !important;
    padding: 1rem 1.25rem;
}

.card-header h6,
.card-header .fw-semibold {
    color: var(--bcpa-ink);
    font-size: 0.92rem;
}

.card-body {
    padding: 1.25rem;
}

.row.g-4 {
    --bs-gutter-x: 1.25rem;
    --bs-gutter-y: 1.25rem;
}

.gap-2 {
    gap: 0.6rem !important;
}

.gap-3 {
    gap: 0.85rem !important;
}

/* Action tabs */
.d-flex.gap-2.flex-wrap.mb-3 {
    gap: 0.5rem !important;
    margin-bottom: 1rem !important;
}

.d-flex.gap-2.flex-wrap.mb-3 .btn {
    border-radius: 999px;
    padding: 0.42rem 0.72rem;
    line-height: 1.2;
}

.d-flex.gap-2.flex-wrap.mb-3 .badge {
    border-radius: 999px;
    font-size: 10.5px;
    padding: 0.22rem 0.42rem;
}

/* Stat Cards */
.stat-card {
    position: relative;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, rgba(var(--bcpa-brand-rgb), 0.86), rgba(13, 148, 136, 0.72));
    opacity: 0.68;
}

.stat-card .stat-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--bcpa-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 46px;
    font-size: 22px;
}

.stat-card .stat-value {
    color: var(--bcpa-ink);
    font-size: 1.7rem;
    font-weight: 750;
    line-height: 1.08;
}

.stat-card .stat-label {
    color: var(--bcpa-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 700;
}

.bg-icon-brand {
    background: var(--bcpa-brand-lt);
    color: var(--bcpa-brand);
}

.bg-icon-teal {
    background: var(--bcpa-teal-lt);
    color: var(--bcpa-teal);
}

.bg-icon-amber {
    background: var(--bcpa-amber-lt);
    color: var(--bcpa-amber);
}

.bg-icon-rose {
    background: var(--bcpa-rose-lt);
    color: var(--bcpa-rose);
}

.bg-icon-purple {
    background: var(--bcpa-brand-lt);
    color: var(--bcpa-brand);
}

/* Tables */
.table {
    color: var(--bcpa-ink);
    --bs-table-border-color: var(--bcpa-line-soft);
    margin-bottom: 0;
}

.table th {
    color: var(--bcpa-muted);
    background: #f8fafc;
    border-bottom: 1px solid var(--bcpa-line);
    padding-top: 0.82rem;
    padding-bottom: 0.82rem;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.42px;
    text-transform: uppercase;
}

.table td {
    vertical-align: middle;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.table-hover tbody tr {
    transition: background 0.14s ease;
}

.table-hover tbody tr:hover {
    --bs-table-bg-state: rgba(var(--bcpa-brand-rgb), 0.045);
    background: rgba(var(--bcpa-brand-rgb), 0.045);
}

.table-responsive {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.table-responsive::-webkit-scrollbar {
    height: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border: 3px solid #fff;
    border-radius: 999px;
}

/* Badges */
.badge {
    border-radius: 7px;
    padding: 0.38em 0.55em;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15px;
    line-height: 1;
}

.payment-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 10.5px;
    line-height: 1;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    white-space: nowrap;
}

.payment-badge--bacs {
    background: #e7f9fd !important;
    border-color: #8fe3f3 !important;
    color: #087f98 !important;
}

.payment-badge--stripe {
    background: #f0ecff !important;
    border-color: #c8bbff !important;
    color: #5336d6 !important;
}

.payment-badge--free {
    background: #ecfdf3 !important;
    border-color: #9ae6b4 !important;
    color: #087443 !important;
}

.bg-primary,
.btn-primary,
.badge.bg-primary {
    background-color: var(--bcpa-brand) !important;
    border-color: var(--bcpa-brand) !important;
}

.text-primary {
    color: var(--bcpa-brand) !important;
}

.border-primary {
    border-color: var(--bcpa-brand) !important;
}

/* Forms */
.form-label {
    color: #344054;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 700;
}

.form-control,
.form-select {
    min-height: 40px;
    border-color: #d5dce7;
    border-radius: var(--bcpa-radius-sm);
    color: var(--bcpa-ink);
    font-size: 14px;
}

.form-control-sm,
.form-select-sm {
    min-height: 34px;
    font-size: 13px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--bcpa-brand);
    box-shadow: 0 0 0 3px rgba(var(--bcpa-brand-rgb), 0.18);
}

.input-group-text {
    border-color: #d5dce7;
    background: #f8fafc;
    color: var(--bcpa-muted);
    font-size: 13px;
    font-weight: 700;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    min-height: 38px;
    border-radius: var(--bcpa-radius-sm);
    box-shadow: none !important;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0;
}

.btn-sm {
    min-height: 32px;
    border-radius: 7px;
    font-size: 12.5px;
}

.btn-primary {
    background: var(--bcpa-brand);
    border-color: var(--bcpa-brand);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--bcpa-brand-dk);
    border-color: var(--bcpa-brand-dk);
    color: #fff;
}

.btn-success {
    background: var(--bcpa-teal);
    border-color: var(--bcpa-teal);
}

.btn-success:hover,
.btn-success:focus {
    background: #0f766e;
    border-color: #0f766e;
}

.btn-outline-primary {
    border-color: var(--bcpa-brand);
    color: var(--bcpa-brand);
}

.btn-outline-primary:hover {
    background: var(--bcpa-brand);
    border-color: var(--bcpa-brand);
    color: #fff;
}

.btn-outline-secondary {
    background: #fff;
    border-color: #cbd5e1;
    color: #475569;
}

.btn-outline-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: var(--bcpa-ink);
}

.btn-outline-warning {
    border-color: #f2c461;
    color: #a16207;
}

.btn-outline-warning:hover {
    background: #fef3c7;
    border-color: #d97706;
    color: #78350f;
}

.btn i {
    line-height: 1;
}

/* Alerts */
.alert {
    border-width: 1px;
    border-radius: var(--bcpa-radius-md);
    box-shadow: var(--bcpa-shadow-sm);
    font-size: 13.5px;
}

/* Page Header */
.page-header {
    position: relative;
    overflow: hidden;
    gap: 1rem;
    margin-bottom: 1.35rem;
    padding: 1.25rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 18px;
    background:
        radial-gradient(circle at 8% 0%, rgba(255,255,255,0.18), transparent 14rem),
        radial-gradient(circle at 90% 30%, rgba(13, 148, 136, 0.2), transparent 15rem),
        linear-gradient(135deg, #141a27 0%, #312334 62%, #9f5f67 100%);
    box-shadow: 0 20px 48px rgba(49, 34, 52, 0.18);
}

.page-header::after {
    content: "";
    position: absolute;
    inset: auto -8% -88% 46%;
    height: 14rem;
    background:
        linear-gradient(90deg, transparent 0 14px, rgba(255,255,255,0.07) 14px 15px, transparent 15px 34px),
        linear-gradient(0deg, transparent 0 14px, rgba(255,255,255,0.06) 14px 15px, transparent 15px 34px);
    opacity: 0.6;
    transform: rotate(-8deg);
}

.page-header > * {
    position: relative;
    z-index: 1;
}

.page-header h4 {
    color: #fff;
    margin-bottom: 4px;
    font-size: clamp(1.28rem, 1.08rem + 0.55vw, 1.65rem);
    font-weight: 780;
    line-height: 1.18;
}

.page-header p {
    color: rgba(255,255,255,0.72);
    margin: 0;
    font-size: 13.5px;
}

.page-header .badge {
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.12) !important;
    color: #fff !important;
}

.page-header .btn-primary,
.page-header .btn-success {
    border-color: rgba(255,255,255,0.78) !important;
    background: rgba(255,255,255,0.94) !important;
    color: #241a25 !important;
}

.page-header .btn-outline-secondary,
.page-header .btn-outline-primary {
    border-color: rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.page-header .btn-outline-secondary:hover,
.page-header .btn-outline-primary:hover {
    border-color: rgba(255,255,255,0.45);
    background: rgba(255,255,255,0.16);
    color: #fff;
}

.content-wrapper > .container-xxl > .card:not(.command-card) {
    border-color: rgba(218, 225, 236, 0.96);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
}

.content-wrapper > .container-xxl > .card.mb-3,
.content-wrapper > .container-xxl > .card.mb-4 {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(251,252,254,0.98)),
        #fff;
}

.content-wrapper > .container-xxl > .card.mb-3 .card-body form,
.content-wrapper > .container-xxl > .card.mb-4 .card-body form {
    position: relative;
}

.dataTables_empty,
td[colspan].text-center {
    padding: 2.25rem 1rem !important;
    color: var(--bcpa-muted) !important;
    font-size: 13.5px;
    font-weight: 650;
}

/* Login Page */
.login-wrapper {
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 15%, rgba(var(--bcpa-brand-rgb), 0.36), transparent 25rem),
        radial-gradient(circle at 82% 72%, rgba(13, 148, 136, 0.18), transparent 24rem),
        linear-gradient(150deg, #0e1117 0%, #1c2333 58%, #2b2435 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: var(--bcpa-radius-lg);
    padding: 2.5rem;
    box-shadow: 0 24px 64px rgba(0,0,0,0.45);
}

.login-logo {
    width: 56px;
    height: 56px;
    border-radius: var(--bcpa-radius-md);
}

.login-card .btn-primary {
    padding: 0.65rem 1rem;
    font-size: 15px;
}

/* Dashboard */
.dashboard-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 18px;
    background:
        radial-gradient(circle at 12% 8%, rgba(255,255,255,0.24), transparent 18rem),
        radial-gradient(circle at 90% 24%, rgba(13, 148, 136, 0.28), transparent 18rem),
        linear-gradient(135deg, #141a27 0%, #332234 58%, #9f5f67 100%);
    box-shadow: 0 28px 70px rgba(49, 34, 52, 0.26);
    color: #fff;
}

.dashboard-hero::after {
    content: "";
    position: absolute;
    inset: auto -12% -45% 42%;
    height: 19rem;
    background:
        linear-gradient(90deg, transparent 0 14px, rgba(255,255,255,0.08) 14px 15px, transparent 15px 34px),
        linear-gradient(0deg, transparent 0 14px, rgba(255,255,255,0.07) 14px 15px, transparent 15px 34px);
    mask-image: linear-gradient(90deg, transparent, #000 24%, #000 70%, transparent);
    opacity: 0.5;
    transform: rotate(-7deg);
}

.dashboard-hero__content,
.dashboard-metrics {
    position: relative;
    z-index: 1;
}

.dashboard-hero__content {
    padding: 1.6rem 1.65rem 1.25rem;
}

.dashboard-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    margin-bottom: 1rem;
    color: rgba(255,255,255,0.76);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-hero h1 {
    max-width: 720px;
    margin: 0 0 0.45rem;
    color: #fff;
    font-size: clamp(2rem, 1.35rem + 2vw, 3.55rem);
    font-weight: 820;
    letter-spacing: -0.02em;
    line-height: 0.98;
}

.dashboard-hero p {
    max-width: 640px;
    margin: 0;
    color: rgba(255,255,255,0.76);
    font-size: 0.98rem;
    line-height: 1.55;
}

.dashboard-hero__actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 0 0 auto;
}

.dashboard-hero .btn-light {
    border-color: rgba(255,255,255,0.72);
    background: rgba(255,255,255,0.92);
    color: #241a25;
}

.btn-hero-outline {
    border: 1px solid rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.btn-hero-outline:hover {
    border-color: rgba(255,255,255,0.42);
    background: rgba(255,255,255,0.16);
    color: #fff;
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: rgba(255,255,255,0.16);
    border-top: 1px solid rgba(255,255,255,0.16);
}

.metric-tile {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 0.25rem 0.75rem;
    min-height: 128px;
    padding: 1rem;
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
    transition: background 0.16s ease, transform 0.16s ease;
}

.metric-tile:hover {
    background: rgba(255,255,255,0.17);
    color: #fff;
}

.metric-icon {
    grid-row: span 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 12px;
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.9);
    font-size: 21px;
}

.metric-value {
    align-self: end;
    color: #fff;
    font-size: 2rem;
    font-weight: 820;
    letter-spacing: -0.03em;
    line-height: 0.95;
}

.metric-label {
    color: rgba(255,255,255,0.68);
    font-size: 11px;
    font-weight: 760;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.metric-tile--attention .metric-icon,
.metric-tile--attention .metric-value {
    color: #ffe3a3;
}

.metric-tile--danger .metric-icon,
.metric-tile--danger .metric-value {
    color: #fecdd3;
}

.metric-tile--healthy .metric-icon,
.metric-tile--healthy .metric-value,
.metric-tile--calm .metric-icon,
.metric-tile--calm .metric-value {
    color: #b6f4ea;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.35fr) minmax(280px, 0.75fr);
    gap: 1.25rem;
    align-items: stretch;
}

.command-card {
    border-color: rgba(218, 225, 236, 0.96);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
}

.command-card .card-header {
    min-height: 72px;
}

.command-card--chart .card-body {
    display: flex;
    align-items: center;
    justify-content: center;
}

#enrolmentChart {
    width: 100%;
}

.action-tile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.action-tile {
    display: flex;
    gap: 0.85rem;
    min-height: 116px;
    padding: 1rem;
    border: 1px solid #e7d9dc;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(var(--bcpa-brand-rgb), 0.1), rgba(var(--bcpa-brand-rgb), 0.02)),
        #fff;
    color: var(--bcpa-ink);
    text-decoration: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.action-tile:hover {
    border-color: rgba(var(--bcpa-brand-rgb), 0.38);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
    color: var(--bcpa-ink);
    transform: translateY(-2px);
}

.action-tile__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--bcpa-brand);
    color: #fff;
    font-size: 21px;
}

.action-tile strong,
.signal-row strong {
    display: block;
    margin-bottom: 0.18rem;
    font-size: 0.94rem;
}

.action-tile small,
.signal-row small {
    display: block;
    color: var(--bcpa-muted);
    font-size: 12.5px;
    line-height: 1.35;
}

.action-tile--warning {
    border-color: #f3dfaa;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.12), rgba(217, 119, 6, 0.02)), #fff;
}

.action-tile--warning .action-tile__icon {
    background: var(--bcpa-amber);
}

.action-tile--teal {
    border-color: #bee8df;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.12), rgba(13, 148, 136, 0.02)), #fff;
}

.action-tile--teal .action-tile__icon {
    background: var(--bcpa-teal);
}

.action-tile--neutral {
    border-color: #dce3ee;
    background: linear-gradient(135deg, rgba(71, 85, 105, 0.1), rgba(71, 85, 105, 0.02)), #fff;
}

.action-tile--neutral .action-tile__icon {
    background: #475569;
}

.signal-list {
    display: grid;
    gap: 0.65rem;
}

.signal-row {
    display: grid;
    grid-template-columns: 12px 1fr 18px;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem;
    border: 1px solid var(--bcpa-line-soft);
    border-radius: 12px;
    background: #fff;
    color: var(--bcpa-ink);
    text-decoration: none;
    transition: background 0.16s ease, border-color 0.16s ease;
}

.signal-row:hover {
    border-color: #d4dce9;
    background: #fafbfe;
    color: var(--bcpa-ink);
}

.signal-row > i {
    color: #a1aebe;
}

.signal-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #94a3b8;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.13);
}

.signal-dot--amber {
    background: var(--bcpa-amber);
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.14);
}

.signal-dot--green {
    background: var(--bcpa-teal);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.14);
}

.signal-dot--rose {
    background: var(--bcpa-rose);
    box-shadow: 0 0 0 4px rgba(192, 64, 77, 0.14);
}

.signal-dot--blue {
    background: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.13);
}

/* Breadcrumb */
.breadcrumb {
    --bs-breadcrumb-divider-color: var(--bcpa-muted);
    margin-bottom: 0;
    font-size: 13px;
}

.breadcrumb a {
    color: #667085;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--bcpa-brand-dk);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--bcpa-slate);
}

/* DataTables */
.dataTables_wrapper {
    padding: 1rem 1rem 0.8rem;
}

.dataTables_wrapper .row:first-child {
    align-items: center;
    margin-bottom: 0.6rem;
}

.dataTables_wrapper .row:last-child {
    align-items: center;
    margin-top: 0.8rem;
}

.dataTables_length label,
.dataTables_filter label,
.dataTables_info {
    color: var(--bcpa-muted);
    font-size: 12.5px;
    font-weight: 600;
}

.dataTables_filter input,
.dataTables_length select {
    min-height: 34px;
    border-color: #d5dce7;
    border-radius: var(--bcpa-radius-sm);
    font-size: 13px;
}

.page-link {
    border-color: var(--bcpa-line);
    color: var(--bcpa-brand-dk);
    font-size: 13px;
    font-weight: 700;
}

.active > .page-link,
.page-link.active {
    background: var(--bcpa-brand);
    border-color: var(--bcpa-brand);
}

/* Modals */
.modal-content {
    border: 1px solid var(--bcpa-line);
    border-radius: var(--bcpa-radius-lg);
    box-shadow: var(--bcpa-shadow-md);
}

.modal-header,
.modal-footer {
    border-color: var(--bcpa-line-soft);
}

.modal-title {
    color: var(--bcpa-ink);
    font-size: 1rem;
    font-weight: 780;
}

/* Misc helpers */
code {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 2px 6px;
    border-radius: 5px;
    color: var(--bcpa-brand-dk);
    font-size: 12px;
}

.text-muted {
    color: var(--bcpa-muted) !important;
}

.fw-medium {
    font-weight: 650 !important;
}

@media (max-width: 767px) {
    :root {
        --navbar-height: 58px;
    }

    .content-wrapper {
        padding: 1rem;
    }

    .page-header {
        align-items: flex-start !important;
        flex-direction: column;
    }

    .page-header .btn,
    .page-header > .badge {
        width: 100%;
    }

    .card-header {
        align-items: flex-start !important;
        flex-direction: column;
        gap: 0.6rem;
    }

    .card-header .btn {
        width: 100%;
    }

    .login-card {
        padding: 1.6rem;
    }

    .dataTables_wrapper {
        padding: 0.85rem;
    }

    .dataTables_wrapper .row > div {
        margin-bottom: 0.55rem;
    }
}

@media (max-width: 1399px) {
    .dashboard-grid {
        grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
    }

    .command-card--status {
        grid-column: 1 / -1;
    }

    .signal-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .dashboard-hero__headline {
        flex-direction: column;
    }

    .dashboard-hero__actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .dashboard-hero__actions .btn {
        flex: 1 1 180px;
    }

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

    .dashboard-grid,
    .signal-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .dashboard-hero {
        border-radius: 14px;
    }

    .dashboard-hero__content {
        padding: 1.2rem;
    }

    .dashboard-hero h1 {
        font-size: 2.1rem;
    }

    .dashboard-metrics,
    .action-tile-grid {
        grid-template-columns: 1fr;
    }

    .metric-tile {
        min-height: 102px;
    }
}
