@import "bootstrap/dist/css/bootstrap.min.css";
@import "sweetalert2/dist/sweetalert2.min.css";

:root {
    --app-ink: #1f2430;
    --app-muted: #687386;
    --app-bg: #f6f8fc;
    --app-panel: #ffffff;
    --app-line: #dfe5ef;
    --app-plum: #270f65;
    --app-violet: #7657d9;
    --app-teal: #089d78;
    --app-green: #12805c;
    --app-gold: #d69b2d;
    --app-rose: #b13d58;
    --app-navy: #243b64;
    --app-coral: #d85f52;
    --sidebar-width: 288px;
    --sidebar-collapsed-width: 88px;
}

* {
    letter-spacing: 0;
}

body {
    min-height: 100vh;
    color: var(--app-ink);
    background:
        linear-gradient(90deg, rgba(8, 18, 37, 0.02) 1px, transparent 1px),
        linear-gradient(180deg, #eef5f4 0%, #f8fbfd 42%, #f4f7fb 100%);
    background-size: 48px 48px, auto;
    font-family: "Instrument Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: var(--app-green);
}

.app-shell {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-width);
    height: 100vh;
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    color: #f8fbfa;
    background:
        radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.18), transparent 28%),
        radial-gradient(circle at 82% 18%, rgba(141, 76, 238, 0.34), transparent 30%),
        linear-gradient(180deg, #270f65 0%, #330e77 54%, #4f20a4 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 0;
    box-shadow: 10px 0 30px rgba(43, 23, 63, 0.16);
    transition: width 180ms ease, transform 190ms ease, box-shadow 190ms ease, padding 180ms ease;
    z-index: 1030;
}

.sidebar-overlay,
.sidebar-close-button {
    display: none;
}

.sidebar-close-button {
    width: 38px;
    height: 38px;
    place-items: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
}

.sidebar-close-button svg {
    width: 18px;
    height: 18px;
}

.brand-block {
    min-height: 5.25rem;
    padding: 1.45rem 1.1rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.brand-mark {
    display: grid;
    width: 3.25rem;
    height: 3.25rem;
    flex: 0 0 3.25rem;
    place-items: center;
    color: #270f65;
    background: linear-gradient(135deg, #fff6d7, #f2b84b);
    border-radius: 8px;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(14, 20, 28, 0.18);
}

.brand-title {
    color: #fff;
    font-size: 0.96rem;
    font-weight: 800;
    line-height: 1.2;
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.78rem;
}

.sidebar-section {
    flex: 1;
    display: grid;
    align-content: start;
    gap: 0.38rem;
    padding: 1rem;
}

.sidebar-label {
    margin: 0.8rem 0 0.45rem;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.sidebar-link,
.sidebar-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 2.85rem;
    gap: 0.75rem;
    padding: 0 0.82rem;
    color: rgba(248, 245, 255, 0.82);
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    font-size: 0.94rem;
    font-weight: 850;
    transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.sidebar-link svg,
.sidebar-toggle svg {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
}

.sidebar-link:hover,
.sidebar-toggle:hover,
.sidebar-link.active,
.sidebar-toggle.active {
    color: #fff;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(216, 204, 255, 0.16));
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow:
        0 12px 24px rgba(24, 10, 58, 0.22),
        inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.sidebar-submenu {
    display: grid;
    gap: 0.2rem;
    margin: 0.25rem 0 0.35rem 2.05rem;
}

.sidebar-submenu a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.36rem 0.45rem;
    border-radius: 6px;
}

.sidebar-submenu a:hover,
.sidebar-submenu a.active {
    color: #fff;
    background: rgba(243, 198, 101, 0.14);
}

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

.topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    min-height: 5rem;
    flex-wrap: nowrap;
    padding: 1rem 1.75rem;
    background: rgba(248, 251, 253, 0.9);
    border-bottom: 1px solid #dce5ee;
    backdrop-filter: blur(12px);
}

.topbar > .d-flex:first-child {
    flex: 1 1 auto;
    min-width: 0;
}

.top-icon-button,
.top-button,
.profile-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    color: #101936;
    background: #fff;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    box-shadow: none;
    transition: border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.top-icon-button {
    width: 3rem;
    flex: 0 0 3rem;
}

.top-icon-button:hover,
.top-button:hover,
.profile-button:hover {
    color: var(--app-violet);
    border-color: #b8c5d8;
    box-shadow: 0 10px 24px rgba(16, 25, 54, 0.08);
    transform: translateY(-1px);
}

.top-button {
    gap: 0.45rem;
    padding: 0 0.9rem;
    font-weight: 850;
}

.top-search {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: min(520px, 100%);
    min-width: 0;
    min-height: 3rem;
    color: #65738b;
    background: #fff;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    padding: 0 0.9rem;
    box-shadow: none;
}

.top-search svg {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
}

.top-search input {
    flex: 1;
    min-width: 0;
    min-height: 2.8rem;
    padding: 0;
    color: #101936;
    background: transparent;
    border: 0;
    outline: 0;
    font-weight: 750;
}

.top-search span {
    border-left: 1px solid #e1e8f3;
    padding-left: 0.8rem;
    color: #65738b;
    font-size: 0.82rem;
    font-weight: 900;
    white-space: nowrap;
}

.profile-button {
    min-width: 180px;
    max-width: 210px;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.35rem 0.65rem;
    text-align: left;
}

.topbar-actions {
    flex: 0 0 auto;
    margin-left: auto;
    min-width: 0;
}

body.sidebar-collapsed .app-sidebar {
    width: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .app-main {
    margin-left: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .brand-block {
    justify-content: center;
    padding-inline: 0.75rem;
}

body.sidebar-collapsed .brand-block .min-w-0,
body.sidebar-collapsed .sidebar-link span,
body.sidebar-collapsed .sidebar-label {
    display: none;
}

body.sidebar-collapsed .brand-mark {
    width: 3.2rem;
    height: 3.2rem;
    flex-basis: 3.2rem;
}

body.sidebar-collapsed .sidebar-section {
    padding-inline: 0.75rem;
}

body.sidebar-collapsed .sidebar-link {
    justify-content: center;
    gap: 0;
    padding-inline: 0;
}

body.sidebar-collapsed .sidebar-toggle-button {
    color: var(--app-violet);
    border-color: #7657d9;
    box-shadow: 0 0 0 3px rgba(118, 87, 217, 0.14);
}

.profile-button > span,
.profile-menu-head > div {
    min-width: 0;
}

.profile-button strong,
.profile-button em {
    display: block;
    max-width: 108px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-button strong {
    font-size: 0.86rem;
    font-weight: 950;
}

.profile-button em {
    color: var(--app-muted);
    font-size: 0.74rem;
    font-style: normal;
    font-weight: 780;
}

.profile-menu {
    width: 314px;
    padding: 0.55rem;
    border-color: #d8e1ed;
    border-radius: 8px;
    box-shadow: 0 24px 50px rgba(31, 36, 48, 0.16);
}

.profile-menu-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem;
    margin-bottom: 0.4rem;
    background: #f8fafc;
    border: 1px solid #e7edf4;
    border-radius: 8px;
}

.profile-menu-head strong,
.profile-menu-head span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-menu-head strong {
    font-weight: 950;
}

.profile-menu-head span {
    color: var(--app-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 42px;
    border-radius: 7px;
    font-weight: 800;
}

.dropdown-item svg {
    width: 17px;
    height: 17px;
}

.dropdown-item.active,
.dropdown-item:active,
.dropdown-item:hover {
    color: #fff;
    background: var(--app-plum);
}

.page-content {
    padding: 1.35rem 1.5rem 2.5rem;
}

.content-heading {
    margin-bottom: 1rem;
}

.content-heading h1 {
    margin: 0;
    color: #101828;
    font-size: 1.58rem;
    font-weight: 950;
}

.content-heading p {
    margin: 0.25rem 0 0;
    color: #30436a;
    font-weight: 750;
}

.page-title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
}

.page-kicker {
    color: var(--app-muted);
    font-size: 0.9rem;
}

.hero-band {
    min-height: 220px;
    padding: 1.35rem;
    color: #fff;
    background:
        linear-gradient(120deg, rgba(43, 23, 63, 0.91), rgba(8, 127, 122, 0.84)),
        url("https://images.unsplash.com/photo-1507692049790-de58290a4334?auto=format&fit=crop&w=1600&q=80") center/cover;
    border-radius: 8px;
}

.hero-band h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(2rem, 3.4vw, 3.5rem);
    font-weight: 850;
    line-height: 1.02;
}

.hero-band p {
    max-width: 650px;
    color: rgba(255, 255, 255, 0.82);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.metric-card,
.content-card,
.table-card,
.form-card {
    background: var(--app-panel);
    border: 1px solid var(--app-line);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(24, 37, 32, 0.06);
}

.metric-card {
    padding: 1rem;
}

.metric-card .metric-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #fff;
    background: var(--app-green);
    border-radius: 8px;
}

.metric-card svg {
    width: 19px;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 850;
}

.metric-label {
    color: var(--app-muted);
    font-size: 0.84rem;
    font-weight: 650;
}

.content-card,
.table-card,
.form-card {
    padding: 1rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 800;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 38px;
    border-radius: 7px;
    font-weight: 700;
}

.btn svg {
    width: 17px;
    height: 17px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--app-violet), var(--app-teal));
    border-color: transparent;
    box-shadow: 0 10px 18px rgba(89, 61, 153, 0.18);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #6444c2, #076d69);
    border-color: transparent;
}

.btn-outline-primary {
    color: var(--app-violet);
    border-color: rgba(118, 87, 217, 0.28);
    background: #fff;
}

.btn-outline-primary:hover {
    background: var(--app-violet);
    border-color: var(--app-violet);
}

.badge-soft {
    color: var(--app-green);
    background: #e6f2ee;
    border: 1px solid #c9e3da;
}

.badge-soft-gold {
    color: #7c5310;
    background: #fff5d9;
    border: 1px solid #f2d997;
}

.badge-soft-rose {
    color: #842c2c;
    background: #fdeaea;
    border: 1px solid #f5c7c7;
}

.table {
    min-width: 720px;
    vertical-align: middle;
}

.table-responsive {
    -webkit-overflow-scrolling: touch;
}

.table th {
    color: #42514b;
    font-size: 0.76rem;
    text-transform: uppercase;
}

.form-control,
.form-select {
    min-height: 3.35rem;
    min-width: 0;
    color: #111b3d;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 253, 0.96));
    border: 1px solid #dbe5f1;
    border-radius: 8px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 10px 22px rgba(24, 39, 75, 0.045);
    font-weight: 780;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #7657d9;
    box-shadow:
        0 0 0 3px rgba(118, 87, 217, 0.14),
        0 16px 30px rgba(24, 39, 75, 0.09);
}

textarea.form-control {
    min-height: 7rem;
    line-height: 1.5;
}

.form-label {
    color: #1f2937;
    font-weight: 760;
}

.modern-phone-frame {
    display: grid;
    grid-template-columns: auto minmax(5.25rem, auto) minmax(9rem, 1fr) auto;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    min-height: 3.35rem;
    overflow: hidden;
    color: #111b3d;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 253, 0.96));
    border: 1px solid #dbe5f1;
    border-radius: 8px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 10px 22px rgba(24, 39, 75, 0.045);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.modern-phone-frame:focus-within {
    border-color: #7657d9;
    box-shadow:
        0 0 0 3px rgba(118, 87, 217, 0.14),
        0 16px 30px rgba(24, 39, 75, 0.09);
}

.modern-phone-frame:has(.is-invalid) {
    border-color: #dc3545;
}

.phone-country-chip,
.phone-digit-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.15rem;
    padding: 0 0.65rem;
    color: #087486;
    background: #f6fbff;
    font-size: 0.78rem;
    font-weight: 950;
    white-space: nowrap;
}

.phone-country-chip {
    gap: 0.35rem;
    border-right: 1px solid #dbe5f1;
}

.phone-country-flag {
    display: grid;
    width: 1.8rem;
    height: 1.4rem;
    place-items: center;
    border-radius: 4px;
    color: #087486;
    background: #e5fbf7;
    font-size: 0.7rem;
    font-weight: 950;
}

.phone-dial-select,
.phone-national-input {
    min-width: 0;
    color: #111b3d;
    background: transparent;
    border: 0;
    outline: 0;
    font: inherit;
    font-weight: 850;
}

.phone-dial-select {
    width: 5.25rem;
    padding: 0 0.45rem 0 0.65rem;
    border-right: 1px solid #dbe5f1;
    cursor: pointer;
}

.phone-national-input {
    min-height: 3.3rem;
    min-width: 7rem;
    padding: 0 0.9rem;
}

.phone-national-input::placeholder {
    color: #98a6ba;
    font-weight: 750;
}

.phone-digit-counter {
    min-width: 3.35rem;
    border-left: 1px solid #dbe5f1;
    font-size: 0.73rem;
}

.phone-digit-counter.is-complete {
    color: #0f8b55;
}

.avatar-initials {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--app-plum), var(--app-violet));
    border-radius: 8px;
    font-weight: 900;
}

.min-w-0 {
    min-width: 0;
}

.sidebar-account {
    display: grid;
    gap: 0.7rem;
    padding: 0.85rem 0.7rem 1rem;
}

.account-chip {
    display: flex;
    align-items: center;
    min-height: 62px;
    gap: 0.7rem;
    padding: 0.55rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 15px;
}

.account-copy {
    min-width: 0;
}

.account-copy strong,
.account-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-copy strong {
    font-size: 0.86rem;
    font-weight: 900;
}

.account-copy span {
    color: #dff8f5;
    font-size: 0.75rem;
    font-weight: 750;
}

.logout-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    gap: 0.55rem;
    color: #fde2e2;
    background: rgba(177, 61, 88, 0.22);
    border: 0;
    border-radius: 15px;
    font-weight: 850;
}

.logout-button:hover {
    color: #fff;
    background: rgba(177, 61, 88, 0.36);
}

.logout-button svg {
    width: 18px;
    height: 18px;
}

.module-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.module-tabs a,
.module-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 38px;
    padding: 0.45rem 0.75rem;
    color: var(--app-muted);
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--app-line);
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 800;
}

.module-tabs a.active,
.module-tabs button.active,
.module-tabs a:hover,
.module-tabs button:hover {
    color: #fff;
    background: var(--app-plum);
    border-color: var(--app-plum);
}

.module-tabs svg {
    width: 16px;
    height: 16px;
}

.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
}

.filter-toolbar {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    gap: 0.65rem;
    min-width: 0;
}

.filter-field {
    position: relative;
    min-width: 0;
}

.filter-search-field {
    flex: 1 1 320px;
    max-width: 420px;
}

.filter-search-field > svg {
    position: absolute;
    top: 50%;
    left: 0.95rem;
    width: 19px;
    height: 19px;
    color: var(--app-violet);
    transform: translateY(-50%);
    pointer-events: none;
}

.filter-search-field .form-control {
    padding-left: 2.65rem;
}

.filter-select {
    flex: 0 1 190px;
    max-width: 230px;
}

.filter-select-sm {
    flex-basis: 155px;
    max-width: 170px;
}

.filter-clear-button {
    width: 3.35rem;
    flex: 0 0 3.35rem;
    padding-inline: 0;
}

.filter-toolbar.is-filtering {
    opacity: 0.72;
    pointer-events: none;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 0.55rem;
    min-width: 0;
}

.auth-body {
    min-height: 100vh;
    background:
        linear-gradient(130deg, rgba(43, 23, 63, 0.08), rgba(8, 127, 122, 0.1), rgba(214, 155, 45, 0.08)),
        #f7f7fb;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(380px, 520px);
    min-height: 100vh;
}

.auth-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    padding: 1.25rem;
    color: #fff;
    background:
        linear-gradient(145deg, rgba(32, 20, 53, 0.9), rgba(8, 117, 112, 0.78), rgba(55, 80, 64, 0.72)),
        url("https://images.unsplash.com/photo-1438032005730-c779502df39b?auto=format&fit=crop&w=1500&q=80") center/cover;
}

.auth-brand {
    width: min(520px, 100%);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    backdrop-filter: blur(12px);
}

.auth-visual-copy {
    max-width: 650px;
    padding: 0 0 4rem 0.25rem;
}

.auth-pill {
    display: inline-flex;
    margin-bottom: 1rem;
    padding: 0.45rem 0.75rem;
    color: #392009;
    background: #ffe7a7;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.auth-visual-copy h1 {
    max-width: 620px;
    margin: 0;
    font-size: clamp(2.6rem, 7vw, 5.5rem);
    font-weight: 950;
    line-height: 0.95;
}

.auth-visual-copy p {
    max-width: 560px;
    margin: 1rem 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.55;
}

.auth-panel {
    display: grid;
    align-items: center;
    padding: 2rem;
}

.auth-card {
    width: 100%;
    padding: 1.55rem;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--app-line);
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(31, 36, 48, 0.14);
}

.auth-card-header {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.auth-card-header h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 950;
}

.auth-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--app-violet), var(--app-teal), var(--app-green));
    border-radius: 8px;
}

.auth-icon svg {
    width: 25px;
    height: 25px;
}

.auth-form {
    display: grid;
    gap: 1rem;
}

.input-icon {
    position: relative;
}

.input-icon > svg {
    position: absolute;
    top: 50%;
    left: 0.85rem;
    width: 18px;
    height: 18px;
    color: var(--app-violet);
    transform: translateY(-50%);
}

.input-icon .form-control {
    min-height: 50px;
    padding-left: 2.55rem;
    padding-right: 2.8rem;
    font-weight: 700;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.55rem;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: var(--app-muted);
    background: transparent;
    border: 0;
    transform: translateY(-50%);
}

.password-toggle svg {
    width: 18px;
    height: 18px;
}

.auth-submit {
    min-height: 50px;
}

.auth-body-refined {
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.96), rgba(245, 248, 252, 0.95)),
        repeating-linear-gradient(52deg, transparent 0 116px, rgba(214, 155, 45, 0.13) 117px 118px);
    overflow-x: hidden;
}

.auth-login-body {
    height: 100vh;
    overflow: hidden;
}

.auth-login-body .auth-shell-refined,
.auth-login-body .auth-visual-reference,
.auth-login-body .auth-panel-refined {
    height: 109vh;
    min-height: 109vh;
}

.auth-shell-refined {
    grid-template-columns: 49.6% 50.4%;
}

.auth-visual-refined {
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(5, 39, 82, 0.9), rgba(4, 40, 83, 0.78) 54%, rgba(3, 39, 80, 0.98)),
        url("https://images.unsplash.com/photo-1514896856000-91cb6de818e0?auto=format&fit=crop&w=1500&q=82") center/cover;
}

.auth-visual-reference {
    padding: 0;
    background: var(--auth-left-image) center/100% 100% no-repeat;
}

.auth-visual-refined::after {
    position: absolute;
    right: -12%;
    bottom: 9%;
    width: 118%;
    height: 26%;
    content: "";
    background: #052752;
    border-top: 3px solid rgba(214, 169, 80, 0.9);
    transform: rotate(5deg);
    transform-origin: center;
}

.auth-visual-reference::after {
    display: none;
}

.auth-topline,
.auth-feature-row,
.auth-visual-refined .auth-visual-copy {
    position: relative;
    z-index: 1;
}

.auth-topline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #e0b75a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.25;
}

.auth-topline svg {
    width: 28px;
    height: 28px;
}

.auth-visual-refined .auth-visual-copy h1 {
    max-width: 520px;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.45rem, 4.7vw, 4.6rem);
    line-height: 1.08;
}

.auth-visual-refined .auth-visual-copy h1 span {
    color: #e0b75a;
}

.auth-gold-rule {
    width: 48px;
    height: 3px;
    margin: 1.15rem 0;
    background: #e0b75a;
    border-radius: 999px;
}

.auth-feature-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: auto;
}

.auth-feature-row div {
    display: grid;
    justify-items: center;
    gap: 0.45rem;
    color: #fff;
    text-align: center;
    font-size: 0.76rem;
    font-weight: 780;
}

.auth-feature-row svg {
    width: 29px;
    height: 29px;
    color: #e0b75a;
}

.auth-panel-refined {
    position: relative;
    display: grid;
    align-items: center;
    min-height: 100vh;
    padding: clamp(1.5rem, 4.1vw, 5.5rem);
    overflow-x: hidden;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(245, 248, 252, 0.88)),
        repeating-linear-gradient(47deg, transparent 0 128px, rgba(214, 155, 45, 0.11) 129px 130px);
}

.auth-card-refined {
    width: min(calc(100vw - 1.5rem), 534px);
    max-width: calc(100vw - 1.5rem);
    min-height: min(840px, calc(100vh - 4rem));
    margin-inline: auto;
    padding: clamp(1.55rem, 3.1vw, 2.7rem) clamp(1.35rem, 3.3vw, 2.75rem) 1.45rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(221, 228, 238, 0.95);
    border-radius: 24px;
    box-shadow: 0 34px 76px rgba(14, 32, 62, 0.17);
    backdrop-filter: blur(14px);
}

.auth-register-card {
    max-width: 760px;
}

.auth-card-brand {
    display: grid;
    justify-items: center;
    margin-bottom: 1.45rem;
    text-align: center;
}

.auth-church-icon {
    position: relative;
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    color: #052752;
}

.auth-church-icon svg {
    width: 70px;
    height: 70px;
    stroke-width: 1.7;
}

.auth-church-emblem span {
    position: absolute;
    top: 0;
    color: #d8a94c;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.auth-card-brand h2 {
    margin: 0.2rem 0 0;
    color: #052752;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.9rem, 3vw, 2.58rem);
    font-weight: 900;
    line-height: 1.06;
}

.auth-card-brand strong,
.auth-card-brand span {
    display: block;
}

.auth-card-brand strong {
    color: #073b92;
    font-size: 1.05rem;
    font-weight: 900;
}

.auth-card-brand span {
    color: #667085;
    margin-top: 0.42rem;
    font-size: 1rem;
    font-weight: 740;
}

.auth-gold-rule-short {
    width: 31px;
    height: 3px;
    margin: 1.2rem auto 1.25rem;
}

.auth-form-divider {
    position: relative;
    width: 100%;
    height: 1px;
    margin-top: 1.45rem;
    background: #dfe5ef;
}

.auth-form-divider span {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: 10px;
    height: 10px;
    background: #d8a94c;
    border: 3px solid #fff;
    transform: translate(-50%, -50%) rotate(45deg);
}

.auth-card-refined .input-icon .form-control {
    min-height: 53px;
    padding-left: 3rem;
    color: #27364f;
    background: #fff;
    border-color: #d4dce8;
    border-radius: 7px;
    box-shadow: 0 8px 18px rgba(15, 34, 61, 0.03);
    font-size: 0.98rem;
}

.auth-card-refined .input-icon > svg {
    left: 1.05rem;
    width: 21px;
    height: 21px;
    color: #667085;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 34px;
}

.auth-check .form-check-input {
    width: 1.55rem;
    height: 1.55rem;
    margin: 0;
    border-color: #aab5c4;
    border-radius: 5px;
    box-shadow: none;
}

.auth-check .form-check-label {
    color: #172033;
    font-size: 0.94rem;
    font-weight: 650;
}

.auth-muted-link {
    color: #073b92;
    font-size: 0.9rem;
    font-weight: 800;
}

.auth-card-refined .auth-form {
    gap: 1.25rem;
}

.auth-card-refined .password-toggle {
    color: #667085;
}

.auth-card-refined .btn-primary {
    min-height: 66px;
    background: linear-gradient(135deg, #06489b 0%, #00337f 58%, #002a72 100%);
    border: 0;
    border-radius: 7px;
    box-shadow: 0 14px 28px rgba(3, 50, 125, 0.2);
    font-size: 1.05rem;
    font-weight: 900;
}

.auth-card-refined .btn-primary:hover {
    background: linear-gradient(135deg, #073f8f 0%, #002f78 100%);
}

.auth-card-refined .auth-submit svg {
    margin-left: auto;
}

.auth-register-cta {
    display: grid;
    gap: 0.65rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e7f0;
}

.auth-register-cta span,
.auth-secure-note span {
    color: #667085;
    font-size: 0.86rem;
    font-weight: 750;
    text-align: center;
}

.auth-secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin-top: 2.1rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e0e7f0;
}

.auth-secure-note svg {
    width: 18px;
    height: 18px;
    color: #d69b2d;
}

.remote-modal-content,
.modal-content {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 30px 80px rgba(31, 36, 48, 0.22);
}

.modal-header {
    border-bottom-color: #e4ebf3;
}

.modal-footer {
    border-top-color: #e4ebf3;
}

.modal-kicker {
    color: var(--app-violet);
    font-size: 0.74rem;
    font-weight: 950;
    text-transform: uppercase;
}

.remote-modal-loading {
    display: grid;
    min-height: 220px;
    place-items: center;
    gap: 0.8rem;
}

.ajax-form-errors {
    border-radius: 8px;
}

.profile-card {
    display: grid;
    justify-items: center;
    min-height: 360px;
    text-align: center;
}

.profile-avatar {
    display: grid;
    width: 96px;
    height: 96px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--app-plum), var(--app-violet), var(--app-teal));
    border: 4px solid #fff;
    border-radius: 50%;
    box-shadow: 0 16px 35px rgba(43, 23, 63, 0.2);
    font-size: 1.7rem;
    font-weight: 950;
}

.profile-card h2 {
    margin: 0.9rem 0 0.15rem;
    font-size: 1.35rem;
    font-weight: 950;
}

.profile-card p {
    color: var(--app-muted);
    font-weight: 740;
}

.registration-toggle-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #e4ebf3;
    border-radius: 8px;
}

.registration-toggle-card p {
    margin: 0.2rem 0 0;
    color: var(--app-muted);
    font-weight: 700;
}

.registration-toggle-card .form-check-input {
    width: 3.3rem;
    height: 1.75rem;
    cursor: pointer;
}

.user-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.user-role-card {
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--app-line);
    border-radius: 8px;
}

.user-role-card strong {
    display: block;
    font-size: 1.45rem;
    font-weight: 950;
}

.user-role-card span {
    color: var(--app-muted);
    font-size: 0.82rem;
    font-weight: 750;
}

.qr-card {
    display: grid;
    grid-template-columns: 176px 1fr;
    gap: 1rem;
    min-height: 220px;
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--app-line);
    border-radius: 8px;
    page-break-inside: avoid;
}

.qr-frame {
    display: grid;
    place-items: center;
    background: #f8faf8;
    border: 1px solid var(--app-line);
    border-radius: 8px;
}

#qr-reader {
    min-height: 340px;
    overflow: hidden;
    background: #0b201e;
    border-radius: 8px;
}

.scan-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--app-line);
}

.scan-row span,
.scan-row em {
    display: block;
    color: var(--app-muted);
    font-size: 0.82rem;
    font-style: normal;
}

.mini-bars {
    display: grid;
    gap: 0.7rem;
}

.mini-bar-track {
    height: 10px;
    overflow: hidden;
    background: #e5ece8;
    border-radius: 999px;
}

.mini-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--app-teal), var(--app-gold));
}

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

.timeline-item {
    display: grid;
    grid-template-columns: 10px 1fr;
    gap: 0.75rem;
}

.timeline-dot {
    width: 10px;
    height: 10px;
    margin-top: 0.45rem;
    background: var(--app-gold);
    border-radius: 50%;
}

.empty-state {
    display: grid;
    min-height: 180px;
    place-items: center;
    color: var(--app-muted);
    text-align: center;
    border: 1px dashed #cad6cf;
    border-radius: 8px;
    background: #fbfcfb;
}

#page-loader {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: #f5f7f4;
    z-index: 2000;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.loader-hidden {
    opacity: 0;
    visibility: hidden;
}

.church-loader {
    width: 62px;
    height: 62px;
    border: 5px solid #dce9e4;
    border-top-color: var(--app-green);
    border-right-color: var(--app-gold);
    border-radius: 50%;
    animation: church-spin 0.8s linear infinite;
}

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

@media (max-width: 1199.98px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .page-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-toolbar,
    .toolbar-actions {
        width: 100%;
    }

    .toolbar-actions {
        justify-content: flex-start;
    }

    .filter-search-field {
        max-width: none;
    }
}

@media (max-width: 991.98px) {
    .app-sidebar {
        width: min(86vw, 310px);
        max-height: 100vh;
        border-radius: 0;
        box-shadow: 18px 0 50px rgba(14, 20, 28, 0.28);
        transform: translateX(-105%);
        transition: transform 0.24s ease;
        z-index: 1060;
    }

    body.sidebar-collapsed .app-sidebar {
        width: min(86vw, 310px);
    }

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

    body.sidebar-collapsed .brand-block {
        justify-content: flex-start;
        padding: 1.45rem 1.1rem 1rem;
    }

    body.sidebar-collapsed .brand-block .min-w-0,
    body.sidebar-collapsed .sidebar-link span {
        display: block;
    }

    body.sidebar-collapsed .sidebar-section {
        padding: 1rem;
    }

    body.sidebar-collapsed .sidebar-link {
        justify-content: flex-start;
        gap: 0.75rem;
        padding: 0 0.82rem;
    }

    body.sidebar-open {
        overflow: hidden;
    }

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

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        display: block;
        pointer-events: none;
        background: rgba(9, 18, 34, 0.46);
        opacity: 0;
        transition: opacity 0.2s ease;
        z-index: 1050;
    }

    body.sidebar-open .sidebar-overlay {
        pointer-events: auto;
        opacity: 1;
    }

    .sidebar-close-button {
        display: grid;
    }

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

    .topbar {
        position: sticky;
        flex-wrap: nowrap;
        align-items: center !important;
        padding: 0.85rem 1rem;
    }

    .topbar > .d-flex:first-child {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }

    .topbar-actions {
        flex: 0 0 auto;
        width: auto;
        justify-content: flex-end;
        overflow: visible;
        padding-bottom: 0;
    }

    .topbar-actions > * {
        flex: 0 0 auto;
    }

    .top-button span {
        display: none;
    }

    .topbar-actions .top-icon-button[title="Notifications"],
    .topbar-actions .top-icon-button[title="Theme"] {
        display: none;
    }

    .profile-button {
        min-width: 58px;
    }

    .profile-button > span {
        display: none;
    }

    .profile-menu {
        width: min(314px, calc(100vw - 2rem));
    }

    .top-search {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }

    .page-content {
        padding: 1rem;
    }

    .content-heading h1 {
        font-size: 1.35rem;
    }

    .content-heading p {
        font-size: 0.9rem;
    }

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

    .modal-dialog {
        margin: 0.75rem;
    }

    .remote-modal-content,
    .modal-content {
        max-height: calc(100vh - 1.5rem);
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-login-body {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }

    .auth-login-body .auth-shell-refined,
    .auth-login-body .auth-visual-reference,
    .auth-login-body .auth-panel-refined {
        height: auto;
        min-height: auto;
    }

    .auth-visual {
        min-height: 46vh;
    }

    .auth-visual-reference {
        min-height: 42vh;
        background-size: cover;
        background-position: center top;
    }

    .auth-panel-refined {
        min-height: auto;
        padding: 1.25rem;
    }

    .auth-card-refined {
        width: min(100%, 620px);
        min-height: auto;
    }

    .auth-visual-refined::after {
        display: none;
    }

    .auth-feature-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .auth-visual-copy {
        padding-bottom: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .auth-shell-refined {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .auth-panel,
    .auth-panel-refined {
        width: 100%;
        min-width: 0;
    }

    .topbar {
        gap: 0.65rem !important;
    }

    .top-icon-button {
        width: 42px;
        min-height: 42px;
        flex-basis: 42px;
    }

    .page-content,
    .topbar {
        padding-inline: 0.75rem;
    }

    .metric-grid,
    .user-summary-grid,
    .qr-card {
        grid-template-columns: 1fr;
    }

    .content-card,
    .table-card,
    .form-card {
        padding: 0.75rem;
    }

    .table-card > .d-flex,
    .content-card > .d-flex {
        align-items: stretch !important;
        flex-direction: column;
    }

    .filter-toolbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(8.5rem, 0.58fr) auto;
    }

    .filter-toolbar .filter-search-field {
        grid-column: 1 / -1;
    }

    .filter-select,
    .filter-select-sm {
        width: 100%;
        max-width: none;
    }

    .toolbar-actions,
    .toolbar-actions > * {
        width: 100%;
    }

    .module-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.15rem;
        -webkit-overflow-scrolling: touch;
    }

    .module-tabs a,
    .module-tabs button {
        white-space: nowrap;
    }

    .table {
        min-width: 640px;
    }

    .modal-dialog {
        max-width: calc(100vw - 1rem);
        margin: 0.5rem;
    }

    .hero-band h1 {
        font-size: 2rem;
    }

    .auth-panel,
    .auth-visual {
        padding: 1rem;
    }

    .auth-card {
        padding: 1rem;
    }

    .auth-card-refined {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        border-radius: 18px;
        padding: 1.15rem;
    }

    .auth-visual-reference {
        min-height: 140px;
    }

    .auth-panel-refined {
        padding: 0.75rem;
    }

    .auth-card-brand h2 {
        font-size: 1.72rem;
    }

    .auth-card-brand strong,
    .auth-card-brand span,
    .auth-secure-note span {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .auth-card-refined .auth-form > .d-flex {
        align-items: flex-start !important;
        flex-wrap: wrap;
    }

    .auth-muted-link {
        font-size: 0.84rem;
    }

    .auth-card-refined .btn-primary {
        min-height: 54px;
    }
}

@media (max-width: 575.98px) {
    .topbar {
        gap: 0.65rem !important;
    }

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

    .top-search span {
        display: none;
    }

    .top-search input {
        padding-right: 1rem;
    }

    .profile-button {
        min-width: auto;
    }

    .profile-button > span {
        display: none;
    }

    .topbar-actions .btn span {
        display: none;
    }

    .modern-phone-frame {
        grid-template-columns: minmax(5rem, auto) minmax(0, 1fr) auto;
    }

    .phone-country-chip {
        display: none;
    }

    .phone-dial-select {
        width: 5rem;
        padding-left: 0.55rem;
    }

    .phone-national-input {
        min-width: 0;
        padding-inline: 0.7rem;
    }

    .phone-digit-counter {
        min-width: 2.85rem;
        padding-inline: 0.55rem;
    }
}

@media print {
    .app-sidebar,
    .topbar,
    .no-print {
        display: none !important;
    }

    .app-main {
        margin: 0;
    }

    .page-content {
        padding: 0;
    }
}
