:root {
    --primary: #3157d5;
    --primary-dark: #243fa6;
    --primary-soft: #eef2ff;
    --sidebar-bg: #111827;
    --sidebar-secondary: #1f2937;
    --body-bg: #f3f5f9;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --success: #16803c;
    --warning: #d97706;
    --danger: #dc2626;
    --sidebar-width: 280px;
    --topbar-height: 72px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--text-primary);
    background: var(--body-bg);
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

/* Login */

.login-page {
    min-height: 100vh;
    overflow-x: hidden;
    background: #ffffff;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 1.1fr) minmax(420px, 0.9fr);
}

.login-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 70px clamp(45px, 8vw, 130px);
    color: #ffffff;
    overflow: hidden;
    background:
        linear-gradient(
            145deg,
            rgba(29, 51, 137, 0.97),
            rgba(49, 87, 213, 0.92)
        );
}

.login-brand-panel::before,
.login-brand-panel::after {
    position: absolute;
    content: "";
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.login-brand-panel::before {
    top: -120px;
    right: -130px;
    width: 380px;
    height: 380px;
}

.login-brand-panel::after {
    bottom: -160px;
    left: -100px;
    width: 430px;
    height: 430px;
}

.brand-mark {
    position: relative;
    z-index: 1;
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    margin-bottom: 25px;
    border-radius: 22px;
    font-size: 34px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

.login-brand-panel h1 {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: clamp(2.2rem, 4vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.05em;
}

.brand-subtitle {
    position: relative;
    z-index: 1;
    max-width: 620px;
    margin: 18px 0 35px;
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.82);
}

.login-feature-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 16px;
    max-width: 650px;
}

.login-feature-list div {
    display: flex;
    gap: 14px;
    align-items: center;
    color: rgba(255, 255, 255, 0.92);
}

.login-feature-list i {
    width: 24px;
    text-align: center;
}

.powered-by {
    position: relative;
    z-index: 1;
    margin-top: 50px;
    color: rgba(255, 255, 255, 0.75);
}

.login-form-panel {
    display: grid;
    place-items: center;
    padding: 45px;
    background: #ffffff;
}

.login-form-wrapper {
    width: min(100%, 470px);
}

.login-form-wrapper h2 {
    margin-bottom: 8px;
    font-size: 2rem;
    font-weight: 750;
}

.mobile-brand {
    display: none;
    margin-bottom: 30px;
    color: var(--primary);
    font-size: 1.35rem;
    font-weight: 800;
}

.login-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 35px;
    color: var(--text-secondary);
    font-size: 0.82rem;
}

/* Password page */

.password-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 30px;
    background:
        linear-gradient(
            135deg,
            #eef2ff,
            #f8fafc
        );
}

.password-card {
    width: min(100%, 540px);
    padding: 40px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

.password-icon {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    border-radius: 18px;
    color: var(--primary);
    font-size: 28px;
    background: var(--primary-soft);
}

.password-card h1 {
    font-size: 1.75rem;
    font-weight: 800;
}

/* Main application */

.app-layout {
    min-height: 100vh;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    color: #d1d5db;
    background: var(--sidebar-bg);
    overflow-y: auto;
    transition: width 0.25s ease, transform 0.25s ease;
}

.sidebar-brand {
    min-height: var(--topbar-height);
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: var(--primary);
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.sidebar-brand-text strong {
    color: #ffffff;
    font-size: 1.15rem;
}

.sidebar-brand-text span {
    color: #9ca3af;
    font-size: 0.78rem;
}

.sidebar-user-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 16px 4px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-user-avatar,
.user-avatar {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    font-weight: 700;
    background: var(--primary);
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
}

.sidebar-user-summary div:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-user-summary strong,
.sidebar-user-summary span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-summary strong {
    color: #ffffff;
    font-size: 0.87rem;
}

.sidebar-user-summary span {
    color: #9ca3af;
    font-size: 0.75rem;
}

.sidebar-navigation {
    flex: 1;
    padding: 12px;
}

.sidebar-section-label {
    padding: 18px 12px 8px;
    color: #6b7280;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 44px;
    margin-bottom: 3px;
    padding: 10px 13px;
    border-radius: 10px;
    color: #cbd5e1;
    text-decoration: none;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.sidebar-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(2px);
}

.sidebar-link.active {
    color: #ffffff;
    background: var(--primary);
}

.sidebar-link i {
    width: 20px;
    text-align: center;
}

.sidebar-link span:nth-child(2) {
    flex: 1;
    font-size: 0.88rem;
}

.sidebar-coming-soon {
    padding: 2px 7px;
    border-radius: 999px;
    color: #fde68a;
    font-size: 0.62rem;
    font-weight: 700;
    background: rgba(217, 119, 6, 0.18);
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    font-size: 0.72rem;
}

.sidebar-footer strong {
    color: #ffffff;
}

.app-main {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.25s ease;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    min-height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 28px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
}

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

.sidebar-toggle,
.topbar-icon-button {
    border: 0;
    background: transparent;
}

.sidebar-toggle {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.sidebar-toggle:hover,
.topbar-icon-button:hover {
    background: #f3f4f6;
}

.topbar-context {
    display: flex;
    flex-direction: column;
}

.topbar-context strong {
    font-size: 0.92rem;
}

.topbar-context span {
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.topbar-icon-button {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #4b5563;
}

.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: var(--danger);
}

.user-menu-button {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    background: transparent;
}

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

.user-menu-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.user-menu-details strong {
    font-size: 0.85rem;
}

.user-menu-details small {
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.app-content {
    padding: 28px;
}

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.page-eyebrow {
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-heading h1 {
    margin: 4px 0 7px;
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    font-weight: 800;
    letter-spacing: -0.035em;
}

.page-heading p {
    margin: 0;
    color: var(--text-secondary);
}

.scope-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    color: var(--primary-dark);
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--primary-soft);
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.dashboard-card {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--card-bg);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    border-color: #c7d2fe;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.1);
}

.dashboard-card-icon {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--primary);
    font-size: 1.2rem;
    background: var(--primary-soft);
}

.dashboard-card div:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.dashboard-card span {
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-card strong {
    margin-top: 3px;
    font-size: 1.5rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: 24px;
}

.content-card {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--card-bg);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.content-card-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border-color);
}

.content-card-header h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 750;
}

.content-card-header p {
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.setup-progress-list {
    padding: 8px 22px 20px;
}

.setup-progress-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f2f5;
}

.setup-progress-item:last-child {
    border-bottom: 0;
}

.setup-progress-item > i {
    margin-top: 3px;
    color: #9ca3af;
}

.setup-progress-item.completed > i {
    color: var(--success);
}

.setup-progress-item.current > i {
    color: var(--primary);
}

.setup-progress-item div {
    display: flex;
    flex-direction: column;
}

.setup-progress-item strong {
    font-size: 0.88rem;
}

.setup-progress-item span {
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.context-details {
    margin: 0;
    padding: 10px 22px 20px;
}

.context-details div {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 15px;
    padding: 14px 0;
    border-bottom: 1px solid #f0f2f5;
}

.context-details div:last-child {
    border-bottom: 0;
}

.context-details dt {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
}

.context-details dd {
    margin: 0;
    text-align: right;
    font-size: 0.82rem;
    font-weight: 700;
}

.enterprise-table {
    margin: 0;
}

.enterprise-table th {
    padding: 14px 18px;
    border-bottom-width: 1px;
    color: #4b5563;
    background: #f8fafc;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.enterprise-table td {
    padding: 14px 18px;
    vertical-align: middle;
    color: #374151;
    font-size: 0.82rem;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 28px;
    padding: 20px 28px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    background: #ffffff;
    font-size: 0.78rem;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1035;
    display: none;
    background: rgba(15, 23, 42, 0.5);
}

/* Desktop collapsed sidebar */

body.sidebar-collapsed .app-sidebar {
    width: 78px;
}

body.sidebar-collapsed .app-main {
    margin-left: 78px;
}

body.sidebar-collapsed .sidebar-brand-text,
body.sidebar-collapsed .sidebar-user-summary div:last-child,
body.sidebar-collapsed .sidebar-section-label,
body.sidebar-collapsed .sidebar-link span,
body.sidebar-collapsed .sidebar-footer {
    display: none;
}

body.sidebar-collapsed .sidebar-user-summary {
    justify-content: center;
    padding: 10px;
}

body.sidebar-collapsed .sidebar-link {
    justify-content: center;
}

body.sidebar-collapsed .sidebar-link i {
    width: auto;
}

/* Responsive */

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

@media (max-width: 991px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

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

    .mobile-brand {
        display: block;
    }

    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.show {
        transform: translateX(0);
    }

    .sidebar-overlay.show {
        display: block;
    }

    .app-main,
    body.sidebar-collapsed .app-main {
        margin-left: 0;
    }

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

    body.sidebar-open {
        overflow: hidden;
    }
}

@media (max-width: 767px) {
    .login-form-panel,
    .password-page {
        padding: 24px;
    }

    .password-card {
        padding: 28px 22px;
    }

    .app-topbar {
        padding: 10px 16px;
    }

    .topbar-context {
        display: none;
    }

    .user-menu-details {
        display: none;
    }

    .app-content {
        padding: 20px 14px;
    }

    .page-heading {
        flex-direction: column;
    }

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

    .app-footer {
        flex-direction: column;
        padding: 18px 16px;
    }
}

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

    .login-footer {
        flex-direction: column;
        gap: 5px;
    }
}



/* Organisation Profile */

.organisation-hero {
    display: flex;
    align-items: center;
    gap: 26px;
    padding: 30px;
    background:
        linear-gradient(
            135deg,
            rgba(29, 78, 216, 0.97),
            rgba(17, 24, 39, 0.96)
        );
    border-radius: 19px;
    color: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.organisation-logo-panel {
    flex: 0 0 auto;
}

.organisation-logo-image,
.organisation-logo-placeholder {
    width: 118px;
    height: 118px;
    border-radius: 24px;
}

.organisation-logo-image {
    padding: 8px;
    object-fit: contain;
    background: #ffffff;
}

.organisation-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 42px;
}

.organisation-hero-content {
    min-width: 0;
}

.organisation-hero-content h2 {
    font-size: 30px;
    font-weight: 760;
}

.organisation-short-name {
    margin: 7px 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.organisation-motto {
    margin: 14px 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 17px;
    font-style: italic;
}

.organisation-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
}

.organisation-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    font-size: 12px;
}

.summary-stat-card {
    min-height: 108px;
    display: flex;
    align-items: center;
    gap: 17px;
    padding: 21px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease;
}

.summary-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 32px rgba(15, 23, 42, 0.11);
}

.summary-stat-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    font-size: 21px;
}

.icon-blue {
    color: #1d4ed8;
    background: #dbeafe;
}

.icon-purple {
    color: #6d28d9;
    background: #ede9fe;
}

.icon-green {
    color: #047857;
    background: #d1fae5;
}

.icon-orange {
    color: #c2410c;
    background: #ffedd5;
}

.summary-stat-card span,
.summary-stat-card strong {
    display: block;
}

.summary-stat-card span {
    margin-bottom: 4px;
    color: var(--text-muted);
    font-size: 12px;
}

.summary-stat-card strong {
    font-size: 26px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 8px 24px 22px;
}

.detail-item {
    padding: 17px 0;
    border-bottom: 1px solid #eef0f3;
}

.detail-item:nth-child(odd) {
    padding-right: 20px;
}

.detail-item:nth-child(even) {
    padding-left: 20px;
}

.detail-item span,
.detail-item strong {
    display: block;
}

.detail-item span {
    margin-bottom: 5px;
    color: var(--text-muted);
    font-size: 12px;
}

.detail-item strong {
    overflow-wrap: anywhere;
}

.contact-list {
    padding: 8px 24px 22px;
}

.contact-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 0;
    border-bottom: 1px solid #eef0f3;
}

.contact-list-item:last-child {
    border-bottom: 0;
}

.contact-list-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: #eff6ff;
    border-radius: 12px;
}

.contact-list-item span,
.contact-list-item strong {
    display: block;
}

.contact-list-item span {
    margin-bottom: 3px;
    color: var(--text-muted);
    font-size: 12px;
}

.address-panel {
    min-height: 155px;
    display: flex;
    align-items: flex-start;
    gap: 17px;
    padding: 25px;
    line-height: 1.8;
}

.address-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    background: #fee2e2;
    border-radius: 14px;
    font-size: 19px;
}

.brand-colour-list {
    padding: 15px 24px 25px;
}

.brand-colour-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 0;
}

.brand-colour-swatch {
    width: 48px;
    height: 48px;
    display: inline-block;
    border: 4px solid #ffffff;
    border-radius: 14px;
    box-shadow: 0 0 0 1px #dfe3e8;
}

.brand-colour-item span,
.brand-colour-item strong {
    display: block;
}

.brand-colour-item div span {
    color: var(--text-muted);
    font-size: 12px;
}

.form-card-body {
    padding: 25px;
}

.form-action-bar {
    position: sticky;
    z-index: 20;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 17px 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border);
    border-radius: 15px;
    box-shadow: 0 -10px 28px rgba(15, 23, 42, 0.07);
    backdrop-filter: blur(10px);
}

.current-logo-preview {
    width: 150px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 13px;
    padding: 10px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.current-logo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.form-control-color {
    width: 58px;
    min-width: 58px;
    padding: 6px;
}

@media (max-width: 767px) {
    .organisation-hero {
        align-items: flex-start;
        flex-direction: column;
        padding: 23px;
    }

    .organisation-logo-image,
    .organisation-logo-placeholder {
        width: 90px;
        height: 90px;
        border-radius: 19px;
    }

    .organisation-hero-content h2 {
        font-size: 24px;
    }

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

    .detail-item:nth-child(odd),
    .detail-item:nth-child(even) {
        padding-right: 0;
        padding-left: 0;
    }

    .form-action-bar {
        flex-direction: column-reverse;
    }

    .form-action-bar .btn {
        width: 100%;
    }
}





.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 26px 16px 12px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 18px;
}

.sidebar-user-avatar {
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #4f61db;
    border-radius: 50%;
    font-size: 21px;
    font-weight: 700;
}

.sidebar-user-details {
    min-width: 0;
}

.sidebar-user-details strong,
.sidebar-user-details span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-details strong {
    color: #ffffff;
    font-size: 15px;
}

.sidebar-user-details span {
    margin-top: 5px;
    color: #a9b5d0;
    font-size: 13px;
}

body.sidebar-collapsed .sidebar-user-details {
    display: none;
}

body.sidebar-collapsed .sidebar-user-card {
    justify-content: center;
    margin-right: 10px;
    margin-left: 10px;
    padding: 12px 8px;
}

body.sidebar-collapsed .sidebar-user-avatar {
    width: 46px;
    height: 46px;
}


/* =========================================================
   CHURCHSYS ENTERPRISE — FINAL APPLICATION LAYOUT OVERRIDES
   Keep this block at the very bottom of app.css
   ========================================================= */

:root {
    --churchsys-sidebar-width: 280px;
    --churchsys-sidebar-collapsed-width: 88px;
    --churchsys-topbar-height: 72px;
    --churchsys-sidebar-bg: #111827;
    --churchsys-page-bg: #f4f7fb;
    --churchsys-border: #e5e7eb;
    --churchsys-primary: #4b5ed7;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body.app-body {
    min-height: 100vh;
    color: #172033;
    background: var(--churchsys-page-bg);
    overflow-x: hidden;
}

.app-shell {
    width: 100%;
    min-height: 100vh;
}

/* Sidebar */

.sidebar {
    position: fixed !important;
    z-index: 1040 !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;

    width: var(--churchsys-sidebar-width) !important;
    height: 100vh !important;

    display: flex !important;
    flex-direction: column !important;

    color: #ffffff !important;
    background: var(--churchsys-sidebar-bg) !important;

    overflow: hidden !important;
    transform: none;
    transition:
        width 0.25s ease,
        transform 0.25s ease;
}

.sidebar-brand {
    flex: 0 0 auto;
    min-height: 78px;
    display: flex !important;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: var(--churchsys-primary);
    border-radius: 13px;
    font-size: 19px;
}

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

.sidebar-brand-text strong {
    color: #ffffff;
    font-size: 20px;
    line-height: 1.1;
}

.sidebar-brand-text span {
    margin-top: 3px;
    color: #aab4ca;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sidebar-user-card {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 20px 15px 8px;
    padding: 17px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 16px;
}

.sidebar-user-avatar {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: var(--churchsys-primary);
    border-radius: 50%;
    font-size: 18px;
    font-weight: 700;
}

.sidebar-user-details {
    min-width: 0;
}

.sidebar-user-details strong,
.sidebar-user-details span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-details strong {
    color: #ffffff;
    font-size: 14px;
}

.sidebar-user-details span {
    margin-top: 4px;
    color: #aab4ca;
    font-size: 12px;
}

.sidebar-nav {
    flex: 1 1 auto !important;
    display: block !important;
    padding: 8px 12px 24px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 999px;
}

.sidebar-section-title {
    display: block;
    margin: 20px 11px 8px;
    color: #71809d !important;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.35px;
    text-transform: uppercase;
    white-space: nowrap;
}

.sidebar-link {
    width: 100% !important;
    min-height: 43px;
    display: flex !important;
    align-items: center;
    gap: 13px;

    margin: 0 0 4px !important;
    padding: 10px 13px !important;

    color: #c7d0df !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 10px !important;

    font-size: 14px;
    text-decoration: none !important;

    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.sidebar-link i {
    flex: 0 0 22px;
    width: 22px;
    color: inherit;
    text-align: center;
    font-size: 16px;
}

.sidebar-link span {
    display: inline;
    color: inherit;
    white-space: nowrap;
}

.sidebar-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08) !important;
    transform: translateX(2px);
}

.sidebar-link.active {
    color: #ffffff !important;
    background: var(--churchsys-primary) !important;
    box-shadow: none !important;
}

.sidebar-footer {
    flex: 0 0 auto;
    display: block;
    padding: 17px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer small,
.sidebar-footer strong {
    display: block;
    white-space: nowrap;
}

.sidebar-footer small {
    color: #71809d;
    font-size: 11px;
}

.sidebar-footer strong {
    margin-top: 3px;
    color: #ffffff;
    font-size: 12px;
}

/* Topbar */

.topbar {
    position: fixed !important;
    z-index: 1030 !important;
    top: 0 !important;
    right: 0 !important;
    left: var(--churchsys-sidebar-width) !important;

    width: auto !important;
    height: var(--churchsys-topbar-height) !important;
    min-height: var(--churchsys-topbar-height) !important;

    display: flex !important;
    align-items: center !important;

    padding: 0 26px !important;

    background: #ffffff !important;
    border-bottom: 1px solid var(--churchsys-border) !important;

    transition: left 0.25s ease;
}

.sidebar-toggle {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    margin-right: 18px;
    color: #374151;
    background: #f4f6f8;
    border: 0;
    border-radius: 11px;
}

.topbar-context {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-context strong {
    max-width: 320px;
    overflow: hidden;
    color: #172033;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.context-label {
    color: #9ca3af;
    font-size: 11px;
    text-transform: uppercase;
}

.context-divider {
    color: #cbd5e1;
}

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

.topbar-icon-button {
    position: relative;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    color: #374151;
    background: #f4f6f8;
    border: 0;
    border-radius: 11px;
}

.user-menu-button {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 5px 8px;
    color: #172033;
    background: transparent;
    border: 0;
}

.user-avatar {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: var(--churchsys-primary);
    border-radius: 50%;
    font-weight: 700;
}

.user-menu-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.user-menu-text strong {
    color: #172033;
    font-size: 13px;
}

.user-menu-text small {
    color: #6b7280;
    font-size: 11px;
}

/* Main application area */

.main-content {
    width: auto !important;
    min-height: 100vh !important;

    margin: 0 0 0 var(--churchsys-sidebar-width) !important;
    padding: var(--churchsys-topbar-height) 0 0 !important;

    background: var(--churchsys-page-bg) !important;

    transition: margin-left 0.25s ease;
}

.content-wrapper {
    width: 100% !important;
    max-width: none !important;
    padding: 28px !important;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.page-header h1 {
    margin: 0;
    color: #172033;
    font-size: 31px;
    font-weight: 750;
}

.page-header p {
    margin: 6px 0 0;
    color: #6b7280;
}

.page-eyebrow {
    margin: 0 0 5px !important;
    color: var(--churchsys-primary) !important;
    font-size: 11px !important;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.scope-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    color: #3447b8;
    background: #e7eaff;
    border: 1px solid #cfd5ff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

/* Dashboard statistic cards */

.dashboard-card {
    min-height: 125px !important;
    display: flex !important;
    align-items: center !important;
    gap: 17px !important;

    padding: 22px !important;

    color: #ffffff !important;
    border: 0 !important;
    border-radius: 17px !important;

    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12) !important;

    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease;
}

.dashboard-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 38px rgba(15, 23, 42, 0.17) !important;
}

.dashboard-card-icon {
    flex: 0 0 57px;
    width: 57px;
    height: 57px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.17);
    border-radius: 16px;
    font-size: 23px;
}

.dashboard-card span {
    display: block;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: 12px;
}

.dashboard-card strong {
    display: block;
    color: #ffffff !important;
    font-size: 29px;
}

.card-blue {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
}

.card-purple {
    background: linear-gradient(135deg, #7c3aed, #5b21b6) !important;
}

.card-green {
    background: linear-gradient(135deg, #059669, #047857) !important;
}

.card-orange {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}

/* Content cards */

.content-card {
    width: 100%;
    background: #ffffff !important;
    border: 1px solid var(--churchsys-border) !important;
    border-radius: 17px !important;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.045) !important;
    overflow: hidden;
}

.content-card-header {
    min-height: 76px;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px !important;
    border-bottom: 1px solid var(--churchsys-border) !important;
}

.content-card-header h2 {
    margin: 0;
    color: #172033;
    font-size: 17px;
    font-weight: 730;
}

.content-card-header p {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 12px;
}

.readiness-list {
    padding: 8px 22px 20px !important;
}

.readiness-item {
    display: flex !important;
    align-items: flex-start;
    gap: 13px;
    padding: 15px 0 !important;
    border-bottom: 1px solid #eef0f3;
}

.readiness-item:last-child {
    border-bottom: 0;
}

.readiness-item > i {
    flex: 0 0 20px;
    margin-top: 2px;
    font-size: 18px;
}

.readiness-item.completed > i {
    color: #10b981;
}

.readiness-item.pending > i {
    color: #cbd5e1;
}

.readiness-item div {
    min-width: 0;
}

.readiness-item strong,
.readiness-item span {
    display: block !important;
}

.readiness-item strong {
    color: #172033;
    font-size: 14px;
}

.readiness-item span {
    margin-top: 4px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.5;
}

.access-summary {
    padding: 8px 22px 20px !important;
}

.access-summary > div {
    padding: 13px 0;
    border-bottom: 1px solid #eef0f3;
}

.access-summary > div:last-child {
    border-bottom: 0;
}

.access-summary span,
.access-summary strong {
    display: block !important;
}

.access-summary span {
    margin-bottom: 4px;
    color: #6b7280;
    font-size: 11px;
}

.access-summary strong {
    color: #172033;
    font-size: 14px;
}

.form-card-body {
    padding: 23px !important;
}

/* Footer */

.app-footer {
    width: auto !important;
    display: flex !important;
    justify-content: space-between;
    gap: 16px;

    margin: 30px 0 0 !important;
    padding: 19px 28px !important;

    color: #6b7280 !important;
    background: #ffffff !important;
    border-top: 1px solid var(--churchsys-border) !important;

    font-size: 11px;
}

/* Collapsed desktop state */

body.sidebar-collapsed .sidebar {
    width: var(--churchsys-sidebar-collapsed-width) !important;
}

body.sidebar-collapsed .topbar {
    left: var(--churchsys-sidebar-collapsed-width) !important;
}

body.sidebar-collapsed .main-content {
    margin-left:
        var(--churchsys-sidebar-collapsed-width) !important;
}

body.sidebar-collapsed .sidebar-brand-text,
body.sidebar-collapsed .sidebar-user-details,
body.sidebar-collapsed .sidebar-section-title,
body.sidebar-collapsed .sidebar-link span,
body.sidebar-collapsed .sidebar-footer {
    display: none !important;
}

body.sidebar-collapsed .sidebar-brand,
body.sidebar-collapsed .sidebar-link,
body.sidebar-collapsed .sidebar-user-card {
    justify-content: center !important;
}

body.sidebar-collapsed .sidebar-brand {
    padding-right: 10px;
    padding-left: 10px;
}

body.sidebar-collapsed .sidebar-user-card {
    margin-right: 10px;
    margin-left: 10px;
    padding: 11px 6px;
}

body.sidebar-collapsed .sidebar-link {
    padding-right: 8px !important;
    padding-left: 8px !important;
}

/* Overlay */

.sidebar-overlay {
    display: none;
}

/* Tablet and mobile */

@media (max-width: 991px) {
    .sidebar {
        width: var(--churchsys-sidebar-width) !important;
        transform: translateX(-100%) !important;
    }

    .topbar {
        left: 0 !important;
        padding-right: 15px !important;
        padding-left: 15px !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    body.sidebar-mobile-open .sidebar {
        transform: translateX(0) !important;
    }

    body.sidebar-mobile-open .sidebar-overlay {
        position: fixed;
        z-index: 1035;
        inset: 0;
        display: block;
        background: rgba(15, 23, 42, 0.55);
    }

    .context-label,
    .context-divider,
    .topbar-context > span:last-child {
        display: none;
    }

    .user-menu-text {
        display: none;
    }

    .content-wrapper {
        padding: 21px 15px !important;
    }
}

@media (max-width: 576px) {
    .topbar-context strong {
        max-width: 145px;
    }

    .page-header {
        flex-direction: column;
    }

    .page-header-actions {
        width: 100%;
    }

    .scope-badge {
        width: fit-content;
    }

    .dashboard-card {
        min-height: 112px !important;
    }

    .content-card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-footer {
        flex-direction: column;
        padding: 17px !important;
    }
}


/* =========================================================
   BUILD 002B — REGION MANAGEMENT
   ========================================================= */

.status-inactive {
    color: #92400e;
    background: #fef3c7;
}

.count-badge {
    min-width: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    color: #3447b8;
    background: #e7eaff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.table-primary-text {
    color: #172033;
    font-weight: 700;
}

.table-secondary-text {
    margin-top: 3px;
    color: #6b7280;
    font-size: 12px;
}

.table-action-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.empty-state {
    max-width: 440px;
    margin: 0 auto;
    color: #6b7280;
}

.empty-state > i {
    margin-bottom: 14px;
    color: #c7cfdd;
    font-size: 42px;
}

.empty-state h3 {
    margin-bottom: 7px;
    color: #172033;
    font-size: 19px;
}

.empty-state p {
    margin-bottom: 18px;
}

.region-profile-banner {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 28px;
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            #1d4ed8,
            #4f46e5
        );
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(29, 78, 216, 0.18);
}

.region-profile-icon {
    flex: 0 0 88px;
    width: 88px;
    height: 88px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 22px;
    font-size: 34px;
}

.region-profile-content {
    min-width: 0;
}

.region-profile-content h2 {
    margin: 0;
    color: #ffffff;
    font-size: 28px;
}

.region-profile-content p {
    max-width: 850px;
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
}

.small-stat-value {
    max-width: 180px;
    overflow: hidden;
    font-size: 15px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .region-profile-banner {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px;
    }

    .region-profile-icon {
        width: 70px;
        height: 70px;
        flex-basis: 70px;
        border-radius: 18px;
        font-size: 27px;
    }

    .region-profile-content h2 {
        font-size: 23px;
    }

    .table-action-group {
        min-width: 88px;
    }
}


/* =========================================================
   BUILD 002C — DISTRICT MANAGEMENT
   ========================================================= */

.district-profile-banner {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 28px;
    color: #ffffff;
    background: linear-gradient(135deg, #6d28d9, #4338ca);
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(79, 70, 229, 0.18);
}

.district-profile-icon {
    flex: 0 0 88px;
    width: 88px;
    height: 88px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 22px;
    font-size: 34px;
}

.district-profile-content {
    min-width: 0;
}

.district-profile-content h2 {
    margin: 0;
    color: #ffffff;
    font-size: 28px;
}

.district-profile-content p {
    max-width: 850px;
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
}

@media (max-width: 767px) {
    .district-profile-banner {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px;
    }

    .district-profile-icon {
        flex-basis: 70px;
        width: 70px;
        height: 70px;
        border-radius: 18px;
        font-size: 27px;
    }

    .district-profile-content h2 {
        font-size: 23px;
    }
}


/* =========================================================
   BUILD 002D — BRANCH MANAGEMENT
   ========================================================= */

.branch-profile-banner {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 28px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f766e, #0369a1);
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(3, 105, 161, 0.18);
}

.branch-profile-icon {
    flex: 0 0 88px;
    width: 88px;
    height: 88px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 22px;
    font-size: 34px;
}

.branch-profile-content {
    min-width: 0;
}

.branch-profile-content h2 {
    margin: 0;
    color: #ffffff;
    font-size: 28px;
}

.branch-profile-content p {
    max-width: 850px;
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.7;
}

@media (max-width: 767px) {
    .branch-profile-banner {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px;
    }

    .branch-profile-icon {
        flex-basis: 70px;
        width: 70px;
        height: 70px;
        border-radius: 18px;
        font-size: 27px;
    }

    .branch-profile-content h2 {
        font-size: 23px;
    }
}





/* --------------------------------------------------------------------------
   ChurchSys Enterprise Login Refactor
   -------------------------------------------------------------------------- */

html:has(body.login-page),
body.login-page {
    width: 100%;
    min-height: 100%;
    overflow: hidden;
}

body.login-page {
    min-height: 100dvh;
    background: #ffffff;
}

.login-shell {
    width: 100%;
    height: 100dvh;
    min-height: 560px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
    overflow: hidden;
}

.login-brand-panel {
    min-width: 0;
    height: 100%;
    padding: clamp(30px, 5vh, 58px) clamp(40px, 6vw, 100px);
}

.login-brand-content {
    position: relative;
    z-index: 1;
    width: min(100%, 690px);
}

.brand-mark {
    width: clamp(58px, 7vh, 74px);
    height: clamp(58px, 7vh, 74px);
    margin-bottom: clamp(16px, 2.5vh, 24px);
    border-radius: 20px;
    font-size: clamp(26px, 3vh, 34px);
}

.brand-kicker,
.login-eyebrow {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.74rem;
    font-weight: 800;
}

.brand-kicker {
    color: rgba(255, 255, 255, 0.72);
}

.login-brand-panel h1 {
    font-size: clamp(2.6rem, 4.6vw, 4.9rem);
    line-height: 0.98;
}

.brand-subtitle {
    max-width: 680px;
    margin: clamp(14px, 2vh, 22px) 0 clamp(22px, 3vh, 34px);
    font-size: clamp(1rem, 1.45vw, 1.22rem);
    line-height: 1.55;
}

.login-feature-list {
    gap: clamp(10px, 1.6vh, 16px);
}

.login-feature-list div {
    font-size: clamp(0.9rem, 1vw, 1rem);
}

.powered-by {
    display: grid;
    gap: 2px;
    margin-top: clamp(24px, 4vh, 42px);
}

.powered-by span,
.powered-by small {
    color: rgba(255, 255, 255, 0.72);
}

.powered-by strong {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.login-form-panel {
    height: 100%;
    min-width: 0;
    padding: clamp(28px, 5vh, 58px) clamp(30px, 5vw, 72px);
    overflow: hidden;
}

.login-form-wrapper {
    width: min(100%, 500px);
}

.login-heading {
    margin-bottom: clamp(20px, 3vh, 30px);
}

.login-heading h2 {
    margin: 0 0 8px;
    font-size: clamp(2rem, 3vw, 2.55rem);
    font-weight: 800;
    letter-spacing: -0.035em;
}

.login-heading p {
    margin: 0;
    color: var(--text-secondary);
}

.login-eyebrow {
    color: var(--primary);
}

.login-alert {
    margin-bottom: 18px;
    border-radius: 12px;
}

.login-input-group .input-group-text,
.login-input-group .form-control,
.login-input-group .btn {
    min-height: 50px;
}

.login-input-group .input-group-text {
    background: #f8fafc;
}

.login-input-group .form-control:focus {
    position: relative;
    z-index: 3;
}

.login-submit {
    min-height: 52px;
    border-radius: 10px;
    font-weight: 700;
}

.login-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: clamp(22px, 3vh, 34px);
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
    font-size: 0.78rem;
}

@media (max-height: 720px) and (min-width: 992px) {
    .login-brand-panel {
        padding-top: 26px;
        padding-bottom: 26px;
    }

    .brand-mark {
        width: 56px;
        height: 56px;
        margin-bottom: 14px;
        font-size: 25px;
    }

    .brand-subtitle {
        margin-top: 12px;
        margin-bottom: 18px;
    }

    .login-feature-list {
        gap: 9px;
    }

    .powered-by {
        margin-top: 20px;
    }

    .login-form-panel {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .login-heading {
        margin-bottom: 18px;
    }

    .login-footer {
        margin-top: 20px;
        padding-top: 14px;
    }
}

@media (max-width: 991px) {
    html:has(body.login-page),
    body.login-page {
        overflow-y: auto;
    }

    .login-shell {
        min-height: 100dvh;
        height: auto;
        grid-template-columns: 1fr;
    }

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

    .login-form-panel {
        min-height: 100dvh;
        padding: 30px 22px;
        overflow: visible;
    }

    .login-form-wrapper {
        margin: auto;
    }

    .mobile-brand {
        display: block;
    }
}

@media (max-width: 520px) {
    .login-form-panel {
        padding: 24px 18px;
    }

    .login-heading h2 {
        font-size: 1.85rem;
    }

    .login-footer {
        flex-direction: column;
        gap: 5px;
    }
}


/* --------------------------------------------------------------------------
   Church Logo Integration
   -------------------------------------------------------------------------- */

.church-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-mark {
    overflow: hidden;
    padding: 6px;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.2);
}

.church-logo-login {
    border-radius: 14px;
}

.mobile-brand {
    display: none;
    align-items: center;
    gap: 10px;
}

.church-logo-mobile {
    width: 42px;
    height: 42px;
    padding: 3px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.sidebar-logo {
    overflow: hidden;
    padding: 3px;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.32);
}

.church-logo-sidebar {
    border-radius: 8px;
}

body.sidebar-collapsed .sidebar-logo {
    width: 40px;
    height: 40px;
    margin-inline: auto;
}

@media (max-width: 991px) {
    .mobile-brand {
        display: flex;
    }
}


/* --------------------------------------------------------------------------
   SysPoint Solutions branding beside Powered by block
   -------------------------------------------------------------------------- */

.powered-by-with-logo {
    display: flex;
    align-items: center;
    gap: 18px;
}

.powered-by-text {
    display: grid;
    gap: 2px;
}

.powered-by-logo-wrap {
    width: 118px;
    height: 64px;
    padding: 7px 9px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
}

.syspoint-powered-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-height: 720px) and (min-width: 992px) {
    .powered-by-with-logo {
        gap: 14px;
    }

    .powered-by-logo-wrap {
        width: 104px;
        height: 56px;
        padding: 6px 8px;
    }
}

@media (max-width: 991px) {
    .powered-by-with-logo {
        justify-content: flex-start;
    }
}

/* =========================================================
   CHURCHSYS BUILD 010B — EXPANDABLE SIDEBAR BASELINE
   Restores submenu styling lost from the current app.css.
   ========================================================= */
.sidebar-expandable {
    width: 100%;
}

.sidebar-expandable-toggle {
    width: 100%;
    border: 0;
    text-align: left;
    background: transparent;
    cursor: pointer;
}

.sidebar-expandable-toggle .sidebar-expandable-chevron {
    flex: 0 0 auto;
    margin-left: auto;
    font-size: 0.72rem;
    transition: transform 0.2s ease;
}

.sidebar-expandable.is-open .sidebar-expandable-chevron {
    transform: rotate(180deg);
}

.sidebar-submenu {
    position: relative;
    display: block;
    width: auto;
    margin: 0.25rem 0 0.55rem 1.1rem;
    padding: 0.3rem 0 0.3rem 0.75rem;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-submenu[hidden] {
    display: none !important;
}

.sidebar-sublink {
    width: 100%;
    min-height: 40px;
    display: flex !important;
    align-items: center;
    gap: 0.65rem;
    margin: 0.1rem 0;
    padding: 0.55rem 0.65rem;
    border-radius: 9px;
    color: rgba(255, 255, 255, 0.76) !important;
    background: transparent;
    text-decoration: none !important;
    font-size: 0.82rem;
    line-height: 1.3;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.sidebar-sublink:visited {
    color: rgba(255, 255, 255, 0.76) !important;
}

.sidebar-sublink > i {
    flex: 0 0 18px;
    width: 18px;
    color: inherit;
    text-align: center;
    font-size: 0.82rem;
}

.sidebar-sublink > span {
    flex: 1 1 auto;
    min-width: 0;
    display: block;
    color: inherit;
    white-space: normal;
    overflow-wrap: anywhere;
}

.sidebar-sublink:hover,
.sidebar-sublink.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none !important;
    transform: translateX(2px);
}

.sidebar-sublink.active {
    font-weight: 700;
    box-shadow: inset 3px 0 0 rgba(255, 255, 255, 0.72);
}

.sidebar-submenu-divider {
    display: block;
    margin: 0.7rem 0 0.25rem;
    padding: 0 0.65rem;
    color: rgba(255, 255, 255, 0.42) !important;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
    .sidebar-expandable-chevron,
    .sidebar-sublink {
        transition: none;
    }
}
