:root {
    --fim-primary: #18c7c9;
    --fim-primary-dark: #0cb4b8;
    --fim-text: #23405f;
    --fim-muted: #7f8b97;
    --fim-bg: #f6fafc;
    --fim-border: #edf2f5;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background: #e9eef2;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--fim-text);
}

.app-shell {
    width: 100%;
    max-width: 430px;
    min-height: 100vh;
    margin: 0 auto;
    background: linear-gradient(180deg, #f3fbfd 0%, #ffffff 34%, #ffffff 100%);
    position: relative;
    overflow: hidden;
    padding-bottom: 78px;
}

.app-content {
    padding: 34px 22px 24px;
}

.brand-wrap {
    text-align: center;
    margin-bottom: 17px;
}

.fim-logo {
    width: 92px;
    height: auto;
    display: block;
    margin: 0 auto 8px;
    object-fit: contain;
}

.brand-title {
    margin: 0;
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: .02em;
    color: #294768;
}

.brand-subtitle {
    margin: 5px auto 0;
    max-width: 300px;
    color: #7c8b99;
    font-size: .68rem;
    font-weight: 600;
    line-height: 1.3;
}

.search-box {
    position: relative;
    margin-bottom: 12px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: #aab4bd;
    pointer-events: none;
}

.search-input {
    height: 48px;
    border: 0;
    border-radius: 7px;
    background: #ffffff;
    padding-left: 42px;
    font-size: .82rem;
    box-shadow: 0 4px 13px rgba(49, 77, 99, .12);
}

.search-input:focus {
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(24, 199, 201, .22);
}

.nav-card {
    min-height: 62px;
    border: 0;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 4px 13px rgba(49, 77, 99, .13);
    color: #294768;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 17px;
    margin-bottom: 10px;
    transition: transform .16s ease, box-shadow .16s ease;
}

.nav-card:hover {
    color: #294768;
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(49, 77, 99, .16);
}

.nav-card-primary {
    background: linear-gradient(135deg, #21d5cc, #18c8d0);
    color: #ffffff;
    min-height: 68px;
}

.nav-card-primary:hover {
    color: #ffffff;
}

.nav-card-title {
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .01em;
    line-height: 1.2;
}

.nav-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.new-badge {
    display: inline-flex;
    align-items: center;
    background: #fb6b49;
    color: #fff;
    border-radius: 3px;
    font-size: .46rem;
    font-weight: 800;
    padding: 3px 5px;
    line-height: 1;
    text-transform: uppercase;
}

.android-icon {
    width: 30px;
    height: 30px;
    color: #1fcbd0;
}

.quick-actions-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    color: #8b969f;
    font-size: .65rem;
}

.quick-actions-dot {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #17c8ca;
    color: #fff;
    font-size: .63rem;
    font-weight: 700;
}

.bottom-nav {
    position: fixed;
    z-index: 10;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: 68px;
    background: rgba(255, 255, 255, .97);
    border-top: 1px solid var(--fim-border);
    box-shadow: 0 -4px 14px rgba(43, 62, 77, .06);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.bottom-nav-link {
    text-decoration: none;
    color: #a6b0b8;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    font-size: .58rem;
    font-weight: 600;
}

.bottom-nav-link svg {
    width: 19px;
    height: 19px;
}

.bottom-nav-link.active {
    color: #627482;
}

.no-result {
    display: none;
    margin: 18px 0 0;
    text-align: center;
    color: #8b969f;
    font-size: .78rem;
}

@media (min-width: 576px) {
    body {
        padding: 28px 0;
    }

    .app-shell {
        min-height: calc(100vh - 56px);
        border-radius: 26px;
        box-shadow: 0 18px 50px rgba(31, 52, 68, .14);
    }

    .bottom-nav {
        bottom: 28px;
        border-radius: 0 0 26px 26px;
    }
}

/* ================================================================
   FIM Navigator - Splash / Onboarding
   ================================================================ */
.onboarding-page,
.login-page {
    min-height: 100vh;
}

.onboarding-shell {
    min-height: 100svh;
    height: 100dvh;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 50% -8%, rgba(24, 199, 201, .13), transparent 31%),
        linear-gradient(180deg, #f3fbfd 0%, #ffffff 62%, #fbfdfe 100%);
}

/* Carousel takes whatever space remains after the checkbox area.
   This prevents the CTA and slide bullets from overlapping on short screens. */
.onboarding-carousel {
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
}

.onboarding-carousel .carousel-inner,
.onboarding-carousel .carousel-item {
    height: 100%;
    min-height: 0;
}

.onboarding-slide {
    height: 100%;
    min-height: 0;
    padding: clamp(18px, 3dvh, 26px) clamp(18px, 5.5vw, 24px) 68px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-width: none;
}

.onboarding-slide::-webkit-scrollbar {
    display: none;
}

.onboarding-brand {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #294768;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .08em;
}

.onboarding-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.onboarding-visual {
    width: 100%;
    min-height: clamp(150px, 31dvh, 270px);
    margin: clamp(10px, 2.2dvh, 18px) 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.feature-icon-large {
    width: 120px;
    height: 120px;
    border-radius: 36px;
    background: linear-gradient(145deg, #25d8d0, #13bfc8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 45px rgba(23, 194, 200, .25);
    position: relative;
    z-index: 2;
    transform: rotate(-4deg);
}

.feature-icon-large svg {
    width: 58px;
    height: 58px;
}

.visual-orbit {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(24, 199, 201, .2);
}

.orbit-one {
    width: 210px;
    height: 210px;
}

.orbit-two {
    width: 270px;
    height: 270px;
    border-style: dashed;
    border-color: rgba(41, 71, 104, .11);
}

.onboarding-copy {
    text-align: center;
    width: 100%;
    max-width: 350px;
}

.slide-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 5px 11px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: rgba(24, 199, 201, .1);
    color: #0cb4b8;
    font-size: .64rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.onboarding-copy h1 {
    margin: 0;
    color: #244260;
    font-size: 1.55rem;
    line-height: 1.17;
    font-weight: 800;
}

.onboarding-copy p {
    margin: 13px auto 0;
    color: #7a8996;
    max-width: 330px;
    font-size: .77rem;
    line-height: 1.6;
}

.onboarding-next {
    width: min(100%, 340px);
    min-height: clamp(46px, 6.5dvh, 50px);
    flex: 0 0 auto;
    margin-top: auto;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #20d3cb, #13c1cc);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 18px;
    font-size: clamp(.72rem, 3.2vw, .78rem);
    font-weight: 800;
    box-shadow: 0 9px 22px rgba(19, 193, 204, .2);
}

.onboarding-next:hover,
.onboarding-next:focus {
    color: #fff;
    background: linear-gradient(135deg, #19cbc4, #0db9c4);
}

.onboarding-next span {
    font-size: 1.05rem;
    transition: transform .15s ease;
}

.onboarding-next:hover span {
    transform: translateX(3px);
}

.onboarding-indicators {
    bottom: 8px;
    margin: 0;
    gap: 0;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* Give every bullet a comfortable tap area while keeping the visual dot small. */
.onboarding-indicators [data-bs-target] {
    position: relative;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    opacity: 1;
    pointer-events: auto;
}

.onboarding-indicators [data-bs-target]::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: #cdd8df;
    transition: width .18s ease, background-color .18s ease, transform .18s ease;
}

.onboarding-indicators [data-bs-target].active::after {
    width: 22px;
    background: #18c7c9;
}

.onboarding-preference {
    position: relative;
    z-index: 4;
    flex: 0 0 auto;
    width: 100%;
    padding: 13px clamp(16px, 5vw, 22px) calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97);
    border-top: 1px solid #edf2f5;
    box-shadow: 0 -7px 20px rgba(41, 71, 104, .055);
    text-align: center;
}

.skip-check-wrap {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #5f7384;
    font-size: .7rem;
    font-weight: 700;
    cursor: pointer;
}

.skip-check-wrap .form-check-input {
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1.5px solid #b9c7d0;
    box-shadow: none;
    cursor: pointer;
}

.skip-check-wrap .form-check-input:checked {
    background-color: #18c7c9;
    border-color: #18c7c9;
}

.onboarding-preference small {
    display: block;
    margin-top: 6px;
    color: #a0abb3;
    font-size: .57rem;
}

.phone-card-demo {
    width: 215px;
    padding: 18px 14px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid #edf2f5;
    box-shadow: 0 20px 48px rgba(42, 73, 97, .14);
    transform: rotate(2deg);
}

.demo-search {
    height: 24px;
    margin-bottom: 10px;
    border-radius: 6px;
    background: #f1f5f7;
}

.demo-card {
    height: 45px;
    margin-top: 8px;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(49, 77, 99, .13);
}

.demo-card-primary {
    padding: 0 12px;
    background: linear-gradient(135deg, #21d5cc, #18c8d0);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .62rem;
    font-weight: 800;
}

.demo-arrow {
    font-size: .9rem;
}

.guide-stack {
    width: 210px;
    height: 190px;
    position: relative;
}

.guide-card {
    position: absolute;
    left: 50%;
    width: 180px;
    height: 150px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #edf2f5;
    box-shadow: 0 15px 36px rgba(42, 73, 97, .12);
}

.guide-card-back {
    top: 24px;
    transform: translateX(-50%) rotate(-9deg);
    opacity: .55;
}

.guide-card-middle {
    top: 16px;
    transform: translateX(-50%) rotate(8deg);
    opacity: .78;
}

.guide-card-front {
    top: 20px;
    transform: translateX(-50%);
    padding: 26px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #294768;
}

.guide-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    border-radius: 15px;
    background: rgba(24, 199, 201, .12);
    color: #18bdc2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guide-icon svg {
    width: 27px;
    height: 27px;
}

.guide-card-front strong {
    font-size: .65rem;
    letter-spacing: .03em;
}

.guide-card-front small {
    margin-top: 5px;
    color: #8a98a3;
    font-size: .55rem;
}

.manual-visual {
    width: 200px;
    height: 180px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.manual-book {
    width: 122px;
    height: 150px;
    border-radius: 20px;
    background: linear-gradient(145deg, #244a70, #2b608c);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 42px rgba(36, 74, 112, .22);
    transform: rotate(-5deg);
}

.manual-book svg {
    width: 62px;
    height: 62px;
}

.manual-check {
    position: absolute;
    right: 18px;
    bottom: 12px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #1ccbc8;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
    border: 5px solid #fff;
    box-shadow: 0 9px 22px rgba(28, 203, 200, .24);
}

/* Compact phones / short browser viewports */
@media (max-height: 760px) {
    .onboarding-slide {
        padding-top: 16px;
        padding-bottom: 62px;
    }

    .onboarding-logo {
        width: 42px;
        height: 42px;
    }

    .onboarding-visual {
        min-height: 150px;
        margin-top: 8px;
    }

    .feature-icon-large {
        width: 96px;
        height: 96px;
        border-radius: 28px;
    }

    .feature-icon-large svg {
        width: 47px;
        height: 47px;
    }

    .orbit-one {
        width: 170px;
        height: 170px;
    }

    .orbit-two {
        width: 215px;
        height: 215px;
    }

    .phone-card-demo {
        transform: scale(.88) rotate(2deg);
    }

    .guide-stack,
    .manual-visual {
        transform: scale(.88);
    }

    .onboarding-copy h1 {
        font-size: 1.35rem;
    }

    .onboarding-copy p {
        margin-top: 9px;
        line-height: 1.45;
    }

    .slide-kicker {
        margin-bottom: 7px;
    }

    .onboarding-next {
        margin-top: 14px;
    }

    .onboarding-preference {
        padding-top: 10px;
        padding-bottom: calc(9px + env(safe-area-inset-bottom));
    }

    .onboarding-preference small {
        margin-top: 4px;
    }
}

@media (max-height: 650px) {
    .onboarding-brand {
        font-size: .62rem;
    }

    .onboarding-logo {
        width: 36px;
        height: 36px;
    }

    .onboarding-visual {
        min-height: 118px;
        margin-top: 4px;
    }

    .feature-icon-large,
    .phone-card-demo,
    .guide-stack,
    .manual-visual {
        transform: scale(.76);
    }

    .feature-icon-large {
        transform: scale(.76) rotate(-4deg);
    }

    .onboarding-copy h1 {
        font-size: 1.18rem;
    }

    .onboarding-copy p {
        font-size: .7rem;
        line-height: 1.38;
    }

    .onboarding-next {
        min-height: 44px;
        margin-top: 10px;
    }
}

@media (max-width: 350px) {
    .onboarding-slide {
        padding-left: 16px;
        padding-right: 16px;
    }

    .onboarding-next {
        width: 100%;
    }

    .skip-check-wrap {
        font-size: .66rem;
    }

    .onboarding-preference small {
        font-size: .54rem;
    }
}

@media (min-width: 576px) {
    .onboarding-shell {
        height: calc(100dvh - 56px);
        min-height: calc(100dvh - 56px);
    }
}

/* ================================================================
   FIM Navigator - Login with numeric PIN keypad
   ================================================================ */
.login-shell {
    min-height: 100vh;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 50% -8%, rgba(24, 199, 201, .12), transparent 34%),
        linear-gradient(180deg, #f0f9fc 0%, #f8fcfd 48%, #ffffff 100%);
}

.login-content {
    width: 100%;
    padding: 28px 24px 10px;
}

.login-brand-wrap {
    text-align: center;
    margin-bottom: 17px;
}

.login-logo {
    width: 88px;
    height: auto;
    display: block;
    margin: 0 auto 8px;
}

.login-brand-wrap h1 {
    margin: 0;
    color: #193a5c;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: .025em;
}

.login-brand-wrap p {
    margin: 3px 0 0;
    color: #687985;
    font-size: .64rem;
    font-weight: 600;
    line-height: 1.25;
}

.login-form {
    width: 100%;
}

.login-field {
    position: relative;
    margin-bottom: 16px;
}

.login-field-icon {
    position: absolute;
    z-index: 2;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #9daab3;
    line-height: 0;
}

.login-field-icon svg {
    width: 17px;
    height: 17px;
}

.login-field .form-control {
    height: 48px;
    padding-left: 42px;
    border: 1px solid #e5ecef;
    border-radius: 8px;
    background: rgba(255,255,255,.94);
    color: #294768;
    font-size: .76rem;
    box-shadow: 0 4px 13px rgba(49, 77, 99, .11);
}

.login-field .form-control:focus {
    border-color: rgba(24, 199, 201, .55);
    box-shadow: 0 5px 16px rgba(24, 199, 201, .14);
}

.pin-section {
    padding: 4px 0 10px;
    text-align: center;
}

.pin-label {
    margin: 0 0 10px;
    color: #526b7e;
    font-size: .68rem;
    font-weight: 700;
}

.pin-dots {
    min-height: 21px;
    display: flex;
    justify-content: center;
    gap: 14px;
}

.pin-dots span {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 1.7px solid #91a4b2;
    background: transparent;
    transition: all .12s ease;
}

.pin-dots span.filled {
    border-color: #18c7c9;
    background: #18c7c9;
    box-shadow: 0 0 0 3px rgba(24, 199, 201, .1);
}

.pin-keypad {
    width: min(100%, 310px);
    margin: 6px auto 13px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 18px;
    justify-items: center;
}

.pin-key {
    width: 62px;
    height: 62px;
    padding: 0;
    border: 1px solid rgba(194, 208, 216, .68);
    border-radius: 50%;
    background: rgba(255, 255, 255, .78);
    color: #264763;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.28rem;
    line-height: 1;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(42, 73, 97, .055);
    transition: transform .08s ease, background .08s ease;
    -webkit-tap-highlight-color: transparent;
}

.pin-key span {
    margin-top: 3px;
    color: #91a0ab;
    font-size: .37rem;
    font-weight: 700;
    letter-spacing: .08em;
}

.pin-key:active {
    transform: scale(.94);
    background: rgba(24, 199, 201, .12);
}

.pin-key-blank {
    visibility: hidden;
    pointer-events: none;
}

.pin-key-delete {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.pin-key-delete svg {
    width: 25px;
    height: 25px;
}

.login-btn {
    width: 100%;
    height: 49px;
    border: 0;
    border-radius: 9px;
    background: linear-gradient(135deg, #20d3cb, #13c1cc);
    color: #14364a;
    font-size: .74rem;
    font-weight: 800;
    box-shadow: 0 7px 18px rgba(19, 193, 204, .2);
}

.login-btn:hover,
.login-btn:focus {
    color: #14364a;
}

.login-btn:disabled {
    opacity: .48;
    box-shadow: none;
}

.forgot-pin-btn {
    display: block;
    margin: 11px auto 0;
    padding: 3px 8px;
    border: 0;
    background: transparent;
    color: #dc966f;
    font-size: .62rem;
}

.login-footer {
    margin-top: auto;
    padding: 14px 20px calc(17px + env(safe-area-inset-bottom));
    text-align: center;
    color: #8d9ba5;
}

.login-footer p {
    margin: 0;
    font-size: .49rem;
    line-height: 1.4;
}

.login-footer button {
    margin-top: 8px;
    border: 0;
    background: transparent;
    color: #18aeb3;
    font-size: .53rem;
    text-decoration: underline;
}

@media (max-height: 720px) {
    .onboarding-visual {
        min-height: 220px;
        margin-top: 5px;
    }

    .onboarding-slide {
        padding-top: 18px;
    }

    .onboarding-copy h1 {
        font-size: 1.35rem;
    }

    .onboarding-copy p {
        margin-top: 8px;
        font-size: .7rem;
    }

    .login-content {
        padding-top: 18px;
    }

    .login-logo {
        width: 72px;
    }

    .login-brand-wrap h1 {
        font-size: 1.2rem;
    }

    .login-brand-wrap {
        margin-bottom: 12px;
    }

    .pin-key {
        width: 54px;
        height: 54px;
        font-size: 1.1rem;
    }

    .pin-keypad {
        gap: 5px 17px;
        margin-bottom: 8px;
    }
}

@media (min-width: 576px) {
    .onboarding-page,
    .login-page {
        padding: 28px 0;
    }

    .onboarding-shell,
    .login-shell {
        min-height: calc(100vh - 56px);
        border-radius: 26px;
        box-shadow: 0 18px 50px rgba(31, 52, 68, .14);
    }

    .onboarding-carousel,
    .onboarding-carousel .carousel-inner,
    .onboarding-carousel .carousel-item,
    .onboarding-slide {
        min-height: calc(100vh - 160px);
    }

    .onboarding-preference {
        border-radius: 0 0 26px 26px;
    }
}

/* ================================================================
   V6 - ENTER KIT masterlist + notification page
   ================================================================ */
.kit-shell,
.notification-page-shell {
    background:
        radial-gradient(circle at 50% 4%, rgba(24,199,201,.08), transparent 29%),
        linear-gradient(180deg, #f3fbfe 0%, #eef8fb 57%, #f8fcfd 100%);
}

.kit-content,
.notification-page-content {
    padding-top: 18px;
    padding-bottom: 94px;
}

.kit-brand-wrap,
.notification-brand-wrap {
    margin-bottom: 13px;
}

.kit-brand-wrap .fim-logo,
.notification-brand-wrap .fim-logo {
    width: 92px;
}

.kit-brand-wrap .brand-title,
.notification-brand-wrap .brand-title {
    margin-top: 3px;
    font-size: 1.34rem;
}

.kit-brand-wrap .brand-subtitle,
.notification-brand-wrap .brand-subtitle {
    font-size: .64rem;
    line-height: 1.22;
}

.kit-notification-banner {
    display: grid;
    grid-template-columns: 27px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-height: 52px;
    margin: 0 0 14px;
    padding: 8px 9px;
    border: 1px solid rgba(215,229,235,.95);
    border-radius: 13px;
    background: rgba(255,255,255,.96);
    color: #627783;
    text-decoration: none;
    box-shadow: 0 6px 15px rgba(43,78,101,.13);
    transition: transform .16s ease, box-shadow .16s ease;
}

.kit-notification-banner:active {
    transform: scale(.987);
}

.notification-bell {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: #fff3e4;
    color: #ff9418;
}

.notification-bell svg {
    width: 18px;
    height: 18px;
}

.kit-notification-copy {
    min-width: 0;
    display: block;
    font-size: .58rem;
    line-height: 1.35;
}

.kit-notification-copy strong {
    color: #415662;
    font-weight: 800;
}

.kit-notification-copy span {
    margin-left: 2px;
}

.notification-arrow {
    color: #a8b7c0;
    font-size: 1.3rem;
    line-height: 1;
}

.kit-db-alert {
    margin-bottom: 12px;
    padding: 9px 11px;
    border: 1px solid #f3d1a4;
    border-radius: 10px;
    background: #fff8ee;
    color: #9a6b2e;
    font-size: .58rem;
    line-height: 1.4;
}

.kit-master-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.kit-master-card {
    display: flex;
    min-width: 0;
    min-height: 154px;
    padding: 12px 8px 10px;
    border: 1px solid rgba(215,229,235,.9);
    border-radius: 15px;
    background: rgba(255,255,255,.97);
    color: #203e61;
    text-decoration: none;
    text-align: center;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 7px 16px rgba(43,78,101,.13);
    transition: transform .16s ease, box-shadow .16s ease;
}

.kit-master-card:hover,
.kit-master-card:focus {
    color: #203e61;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(43,78,101,.16);
}

.kit-master-card:active {
    transform: scale(.98);
}

.kit-master-icon {
    display: grid;
    place-items: center;
    width: 82px;
    height: 72px;
    margin-bottom: 7px;
}

.kit-master-icon svg {
    width: 100%;
    height: 100%;
}

.kit-master-name {
    display: block;
    color: #203e61;
    font-size: .78rem;
    font-weight: 900;
    line-height: 1.15;
    text-transform: uppercase;
}

.kit-master-description {
    display: block;
    max-width: 130px;
    margin-top: 3px;
    color: #7a8992;
    font-size: .43rem;
    font-weight: 600;
    line-height: 1.25;
}

.notification-page-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 7px 0 14px;
}

.notification-back {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid #dbe9ee;
    border-radius: 11px;
    background: #fff;
    color: #163c63;
    font-size: 1.75rem;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(43,78,101,.08);
}

.notification-page-heading h2 {
    margin: 0;
    color: #173b61;
    font-size: 1rem;
    font-weight: 900;
}

.notification-page-heading p {
    margin: 2px 0 0;
    color: #8b9aa3;
    font-size: .56rem;
}

.notification-list {
    display: grid;
    gap: 10px;
}

.notification-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    padding: 12px;
    border: 1px solid #dce9ee;
    border-radius: 14px;
    background: rgba(255,255,255,.96);
    color: inherit;
    text-decoration: none;
    box-shadow: 0 6px 15px rgba(43,78,101,.09);
}

.notification-item-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff3e4;
    color: #ff9418;
}

.notification-item-icon svg {
    width: 20px;
    height: 20px;
}

.notification-item-body {
    display: block;
    min-width: 0;
}

.notification-item-title {
    display: block;
    margin-bottom: 3px;
    color: #244766;
    font-size: .69rem;
    font-weight: 900;
}

.notification-item-message {
    display: block;
    color: #697e8a;
    font-size: .59rem;
    line-height: 1.45;
}

.notification-item-date {
    display: block;
    margin-top: 6px;
    color: #a0adb5;
    font-size: .48rem;
}

.notification-item-arrow {
    align-self: center;
    color: #a6b4bd;
    font-size: 1.3rem;
}

.notification-empty {
    display: flex;
    min-height: 210px;
    padding: 25px;
    border: 1px solid #dce9ee;
    border-radius: 14px;
    background: rgba(255,255,255,.9);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.notification-empty-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 9px;
    border-radius: 50%;
    background: #fff3e4;
    color: #ff9418;
}

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

.notification-empty strong {
    color: #294966;
    font-size: .78rem;
}

.notification-empty > span:last-child {
    margin-top: 3px;
    color: #8a9aa4;
    font-size: .57rem;
}

@media (max-width: 360px) {
    .kit-content,
    .notification-page-content {
        padding-left: 13px;
        padding-right: 13px;
    }

    .kit-master-grid {
        gap: 9px;
    }

    .kit-master-card {
        min-height: 143px;
        padding-left: 5px;
        padding-right: 5px;
    }

    .kit-master-icon {
        width: 72px;
        height: 64px;
    }

    .kit-master-name {
        font-size: .69rem;
    }

    .kit-master-description {
        max-width: 118px;
        font-size: .39rem;
    }
}

@media (max-height: 720px) {
    .kit-content {
        padding-top: 10px;
    }

    .kit-brand-wrap {
        margin-bottom: 8px;
    }

    .kit-brand-wrap .fim-logo {
        width: 72px;
    }

    .kit-brand-wrap .brand-title {
        font-size: 1.1rem;
    }

    .kit-brand-wrap .brand-subtitle {
        font-size: .55rem;
    }

    .kit-notification-banner {
        min-height: 46px;
        margin-bottom: 10px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .kit-master-grid {
        gap: 8px;
    }

    .kit-master-card {
        min-height: 126px;
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .kit-master-icon {
        width: 64px;
        height: 55px;
        margin-bottom: 4px;
    }
}

/* ================================================================
   FIM Navigator - polished 4-item bottom navigation
   Used by Home, Enter KIT and Notifications.
   ================================================================ */
.bottom-nav.bottom-nav-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    height: calc(70px + env(safe-area-inset-bottom));
    padding: 5px 7px env(safe-area-inset-bottom);
    align-items: stretch;
    overflow: hidden;
}

.bottom-nav.bottom-nav-four .bottom-nav-link {
    position: relative;
    min-width: 0;
    height: 60px;
    margin: 0 2px;
    padding: 7px 2px 5px;
    border-radius: 13px;
    gap: 3px;
    justify-content: center;
    line-height: 1;
    font-size: .55rem;
    transition: color .16s ease, background-color .16s ease, transform .16s ease;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav.bottom-nav-four .bottom-nav-link svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.bottom-nav.bottom-nav-four .bottom-nav-link span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bottom-nav.bottom-nav-four .bottom-nav-link.active {
    color: #173f62;
    background: linear-gradient(180deg, rgba(24,199,201,.10), rgba(24,199,201,.035));
}

.bottom-nav.bottom-nav-four .bottom-nav-link.active::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 50%;
    width: 22px;
    height: 3px;
    border-radius: 999px;
    background: var(--fim-primary);
    transform: translateX(-50%);
}

.bottom-nav.bottom-nav-four .bottom-nav-link:active {
    transform: scale(.96);
}

.bottom-nav.bottom-nav-four .bottom-nav-logout {
    color: #98a5ae;
}

.bottom-nav.bottom-nav-four .bottom-nav-logout:hover,
.bottom-nav.bottom-nav-four .bottom-nav-logout:focus {
    color: #d76565;
    background: rgba(215,101,101,.055);
}

/* Four-item bar needs a little more reserved space at the bottom. */
.app-shell:has(.bottom-nav-four) {
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
}

@media (max-width: 340px) {
    .bottom-nav.bottom-nav-four {
        padding-left: 3px;
        padding-right: 3px;
    }

    .bottom-nav.bottom-nav-four .bottom-nav-link {
        margin-left: 0;
        margin-right: 0;
        font-size: .51rem;
    }

    .bottom-nav.bottom-nav-four .bottom-nav-link svg {
        width: 18px;
        height: 18px;
    }
}

@media (min-width: 576px) {
    .bottom-nav.bottom-nav-four {
        height: 70px;
        padding-bottom: 5px;
    }
}

/* ================================================================
   V8 - Masterlist / Sub Masterlist page
   ================================================================ */
.masterlist-shell {
    background: linear-gradient(180deg, #eaf5f9 0%, #f7fbfc 100%);
}

.masterlist-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 48px;
    align-items: center;
    min-height: 82px;
    padding: calc(12px + env(safe-area-inset-top)) 14px 12px;
    background: linear-gradient(135deg, #173b66 0%, #214d76 100%);
    box-shadow: 0 5px 16px rgba(18, 52, 84, .16);
}

.masterlist-back {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.masterlist-back:active {
    background: rgba(255,255,255,.10);
}

.masterlist-back svg {
    width: 24px;
    height: 24px;
}

.masterlist-title-wrap {
    min-width: 0;
    padding: 0 8px;
}

.masterlist-title-wrap h1 {
    margin: 0;
    color: #fff;
    font-size: .92rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .01em;
    text-transform: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.masterlist-title-wrap span {
    display: block;
    margin-top: 3px;
    color: rgba(255,255,255,.72);
    font-size: .52rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.masterlist-logo {
    justify-self: end;
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.12));
}

.masterlist-content {
    padding: 14px 14px 22px;
}

.masterlist-intro {
    display: flex;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #d8e8ed;
    border-radius: 12px;
    background: rgba(255,255,255,.88);
    box-shadow: 0 4px 12px rgba(23,63,98,.05);
    flex-direction: column;
}

.masterlist-intro strong {
    color: #173f62;
    font-size: .72rem;
}

.masterlist-intro span {
    margin-top: 2px;
    color: #81919d;
    font-size: .52rem;
}

.submaster-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.submaster-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 154px;
    padding: 12px 8px 9px;
    border: 1px solid #dce9ed;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 13px rgba(28, 69, 97, .10);
    color: inherit;
    text-align: center;
    text-decoration: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    -webkit-tap-highlight-color: transparent;
    transition: transform .15s ease, box-shadow .15s ease;
}

.submaster-card:active {
    transform: scale(.975);
    box-shadow: 0 3px 8px rgba(28,69,97,.08);
}

.submaster-number {
    position: absolute;
    top: 7px;
    left: 8px;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #eef6f8;
    color: #365e7b;
    font-size: .52rem;
    font-weight: 800;
}

.submaster-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin: 7px 0 6px;
}

.submaster-icon svg {
    width: 100%;
    height: 100%;
}

.submaster-name {
    width: 100%;
    color: #173f62;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1.22;
}

.submaster-description {
    display: -webkit-box;
    width: 100%;
    margin-top: 3px;
    color: #8a99a3;
    font-size: .43rem;
    line-height: 1.28;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.submaster-action {
    margin-top: auto;
    padding-top: 7px;
    color: #18aeb6;
    font-size: .43rem;
    font-weight: 700;
}

.submaster-card.no-file .submaster-action {
    color: #a5afb5;
}

.submaster-empty {
    display: flex;
    min-height: 220px;
    padding: 28px 22px;
    border: 1px solid #dce9ed;
    border-radius: 14px;
    background: rgba(255,255,255,.9);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.submaster-empty-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 9px;
    border-radius: 50%;
    background: #eaf8f9;
    color: #18aeb6;
}

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

.submaster-empty strong {
    color: #294966;
    font-size: .76rem;
}

.submaster-empty > span:last-child {
    max-width: 240px;
    margin-top: 4px;
    color: #8a9aa4;
    font-size: .52rem;
    line-height: 1.45;
}

.file-toast {
    position: fixed;
    z-index: 999;
    left: 50%;
    bottom: calc(88px + env(safe-area-inset-bottom));
    width: max-content;
    max-width: calc(100% - 32px);
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(23,63,98,.94);
    color: #fff;
    font-size: .58rem;
    box-shadow: 0 8px 20px rgba(23,63,98,.18);
    opacity: 0;
    transform: translate(-50%, 8px);
    transition: opacity .18s ease, transform .18s ease;
}

.file-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 350px) {
    .masterlist-content {
        padding-left: 11px;
        padding-right: 11px;
    }

    .submaster-grid {
        gap: 8px;
    }

    .submaster-card {
        min-height: 144px;
        padding-left: 6px;
        padding-right: 6px;
    }

    .submaster-icon {
        width: 53px;
        height: 53px;
    }

    .submaster-name {
        font-size: .63rem;
    }
}

@media (min-width: 576px) {
    .masterlist-topbar,
    .masterlist-content {
        width: min(100%, 520px);
        margin-left: auto;
        margin-right: auto;
    }

    .masterlist-topbar {
        border-radius: 0 0 14px 14px;
    }
}

/* ================================================================
   V9 - Multiple attachment selection page
   ================================================================ */
.file-library-content {
    padding-bottom: 26px;
}

.file-library-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 11px 12px;
    border: 1px solid #d8e8ed;
    border-radius: 12px;
    background: rgba(255,255,255,.9);
    box-shadow: 0 4px 12px rgba(23,63,98,.05);
}

.file-library-intro > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.file-library-intro strong {
    color: #173f62;
    font-size: .75rem;
}

.file-library-intro span:not(.file-library-count) {
    margin-top: 2px;
    color: #8796a0;
    font-size: .52rem;
}

.file-library-count {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    border-radius: 999px;
    background: #e8f8f9;
    color: #159ea6;
    font-size: .65rem;
    font-weight: 800;
}

.file-library-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.file-library-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 78px;
    padding: 10px 11px;
    border: 1px solid #dce9ed;
    border-radius: 12px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 5px 13px rgba(28, 69, 97, .08);
    transition: transform .14s ease, box-shadow .14s ease;
    -webkit-tap-highlight-color: transparent;
}

.file-library-card:active {
    transform: scale(.985);
    box-shadow: 0 3px 8px rgba(28, 69, 97, .07);
}

.file-library-card-disabled {
    opacity: .55;
}

.file-library-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 52px;
    border-radius: 10px;
    background: #eef8f9;
    color: #204a6a;
}

.file-library-icon svg {
    width: 28px;
    height: 34px;
}

.file-library-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.file-library-copy strong {
    color: #173f62;
    font-size: .66rem;
    line-height: 1.3;
}

.file-library-copy span {
    display: -webkit-box;
    margin-top: 3px;
    color: #8b99a3;
    font-size: .48rem;
    line-height: 1.35;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.file-library-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #159ea6;
}

.file-library-meta small {
    padding: 4px 6px;
    border-radius: 6px;
    background: #eff9fa;
    font-size: .43rem;
    font-weight: 800;
}

.file-library-meta svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 350px) {
    .file-library-card {
        grid-template-columns: 42px minmax(0, 1fr) auto;
        gap: 8px;
        padding-left: 8px;
        padding-right: 8px;
    }

    .file-library-icon {
        width: 40px;
        height: 46px;
    }

    .file-library-meta small {
        display: none;
    }
}

/* ================================================================
   V10 - Super Admin & configuration pages
   ================================================================ */
.nav-card-admin {
    position: relative;
    border-color: #cfe6e9;
    background: linear-gradient(135deg, #ffffff 0%, #eefbfb 100%);
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 19px;
    padding: 0 8px;
    border-radius: 999px;
    background: #173f62;
    color: #fff;
    font-size: .42rem;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.admin-shell {
    background: linear-gradient(180deg, #edf8fb 0%, #f8fbfc 46%, #f4f8fa 100%);
}

.admin-dashboard-content,
.admin-crud-content {
    padding-top: 14px;
    padding-bottom: calc(100px + env(safe-area-inset-bottom));
}

.admin-welcome-card {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 13px;
    padding: 13px;
    border: 1px solid #d8e9ed;
    border-radius: 14px;
    background: rgba(255,255,255,.95);
    box-shadow: 0 5px 14px rgba(24,63,97,.07);
}

.admin-welcome-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #e8f8f9;
    color: #173f62;
}

.admin-welcome-icon svg {
    width: 24px;
    height: 24px;
}

.admin-welcome-card > div,
.admin-config-copy,
.admin-section-heading > div,
.admin-record-main > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-welcome-card strong {
    color: #173f62;
    font-size: .72rem;
}

.admin-welcome-card span:not(.admin-welcome-icon) {
    margin-top: 2px;
    color: #84949f;
    font-size: .5rem;
    line-height: 1.4;
}

.admin-config-grid {
    display: grid;
    gap: 10px;
}

.admin-config-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 10px;
    min-height: 80px;
    padding: 10px 12px;
    border: 1px solid #d9e8ec;
    border-radius: 14px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 5px 14px rgba(24,63,97,.08);
    -webkit-tap-highlight-color: transparent;
    transition: transform .15s ease, box-shadow .15s ease;
}

.admin-config-card:active {
    transform: scale(.985);
    box-shadow: 0 3px 8px rgba(24,63,97,.06);
}

.admin-config-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
}

.admin-config-icon svg {
    width: 52px;
    height: 52px;
}

.admin-config-copy strong {
    color: #173f62;
    font-size: .7rem;
    line-height: 1.2;
}

.admin-config-copy small {
    margin-top: 3px;
    color: #8b99a3;
    font-size: .49rem;
}

.admin-config-arrow {
    color: #19aeb7;
    font-size: 1.35rem;
    line-height: 1;
}

.admin-info-note {
    display: flex;
    flex-direction: column;
    margin-top: 13px;
    padding: 11px 12px;
    border: 1px solid #dbe9ed;
    border-radius: 12px;
    background: rgba(255,255,255,.82);
}

.admin-info-note strong {
    color: #315773;
    font-size: .58rem;
}

.admin-info-note span {
    margin-top: 3px;
    color: #87959f;
    font-size: .47rem;
    line-height: 1.45;
}

.admin-info-note code {
    color: #159ea6;
    font-size: .46rem;
}

.admin-alert {
    margin-bottom: 11px;
    border-radius: 10px;
    font-size: .55rem;
}

.admin-form-card,
.admin-record-section {
    padding: 12px;
    border: 1px solid #dbe9ed;
    border-radius: 14px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 5px 14px rgba(24,63,97,.06);
}

.admin-record-section {
    margin-top: 13px;
}

.admin-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.admin-section-heading strong {
    color: #173f62;
    font-size: .68rem;
}

.admin-section-heading span {
    margin-top: 1px;
    color: #8b99a3;
    font-size: .46rem;
}

.admin-mini-link {
    flex: 0 0 auto;
    color: #159ea6;
    font-size: .48rem;
    font-weight: 800;
    text-decoration: none;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.admin-field {
    min-width: 0;
    margin: 0;
}

.admin-field-full,
.admin-form-action {
    grid-column: 1 / -1;
}

.admin-field > span {
    display: block;
    margin: 0 0 4px 2px;
    color: #49697f;
    font-size: .48rem;
    font-weight: 800;
}

.admin-field > small {
    display: block;
    margin: 4px 2px 0;
    color: #94a0a8;
    font-size: .42rem;
    line-height: 1.4;
}

.admin-field .form-control,
.admin-field .form-select {
    min-height: 38px;
    border: 1px solid #d4e3e8;
    border-radius: 9px;
    color: #294d68;
    font-size: .55rem;
    box-shadow: none;
}

.admin-field textarea.form-control {
    min-height: 64px;
    resize: vertical;
}

.admin-field .form-control:focus,
.admin-field .form-select:focus {
    border-color: #20bec4;
    box-shadow: 0 0 0 3px rgba(32,190,196,.10);
}

.admin-form-action {
    margin-top: 2px;
}

.admin-primary-btn {
    width: 100%;
    min-height: 40px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #16bec5, #14aeb7);
    color: #fff;
    font-size: .54rem;
    font-weight: 900;
    letter-spacing: .03em;
    box-shadow: 0 6px 13px rgba(21,174,183,.18);
}

.admin-primary-btn:hover,
.admin-primary-btn:focus {
    color: #fff;
    background: linear-gradient(135deg, #16b8bf, #139fa8);
}

.admin-record-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-record-card {
    padding: 10px;
    border: 1px solid #deeaed;
    border-radius: 11px;
    background: #fbfdfe;
}

.admin-record-main {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.admin-record-id {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #eaf7f8;
    color: #1a7880;
    font-size: .45rem;
    font-weight: 900;
}

.admin-record-main strong {
    color: #173f62;
    font-size: .57rem;
    line-height: 1.3;
}

.admin-record-main div > span,
.admin-record-main div > small {
    display: block;
    margin-top: 2px;
    color: #8b99a3;
    font-size: .43rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.admin-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 19px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: .38rem;
    font-weight: 900;
}

.admin-status.is-active {
    background: #e8f8ef;
    color: #2c8b5c;
}

.admin-status.is-inactive {
    background: #f2f3f4;
    color: #7f8a91;
}

.admin-record-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-top: 8px;
}

.admin-record-actions form {
    margin: 0;
}

.admin-edit-btn,
.admin-delete-btn {
    width: 100%;
    min-height: 31px;
    border-radius: 8px;
    font-size: .47rem;
    font-weight: 800;
}

.admin-edit-btn {
    border: 1px solid #bfe3e6;
    background: #ecf9fa;
    color: #168e96;
}

.admin-delete-btn {
    border: 1px solid #f1d0d0;
    background: #fff4f4;
    color: #b44a4a;
}

.admin-file-note {
    margin-top: 10px;
}

.admin-file-type {
    display: grid;
    place-items: center;
    width: 32px;
    min-height: 30px;
    padding: 0 4px;
    border-radius: 7px;
    background: #eaf7f8;
    color: #197c83;
    font-size: .38rem;
    font-weight: 900;
}

.master-direct-files {
    margin: 0 0 13px;
    padding: 10px;
    border: 1px solid #dbe9ed;
    border-radius: 13px;
    background: rgba(255,255,255,.9);
}

.master-direct-heading {
    margin-bottom: 8px;
}

.compact-master-file {
    min-height: 70px;
}

@media (max-width: 350px) {
    .admin-dashboard-content,
    .admin-crud-content {
        padding-left: 10px;
        padding-right: 10px;
    }

    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-field-full,
    .admin-form-action {
        grid-column: auto;
    }

    .admin-record-main {
        grid-template-columns: 28px minmax(0, 1fr);
    }

    .admin-record-main .admin-status {
        grid-column: 2;
        justify-self: start;
    }
}

@media (min-width: 576px) {
    .admin-dashboard-content,
    .admin-crud-content {
        width: min(100%, 520px);
        margin-left: auto;
        margin-right: auto;
    }
}

/* ================================================================
   V11 - Super Admin access + upload/link document configuration
   ================================================================ */
.register-name-field {
    margin-bottom: 9px;
}

.admin-access-count {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #e8f8f9;
    color: #168e96 !important;
    font-size: .42rem !important;
    font-weight: 900;
}

.admin-user-search {
    margin-top: 2px;
}

.admin-user-list {
    max-height: 58vh;
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-width: thin;
}

.admin-user-card[hidden] {
    display: none !important;
}

.admin-user-main {
    align-items: start;
}

.admin-access-action-row {
    margin-top: 8px;
}

.admin-access-action-row form {
    margin: 0;
}

.admin-allow-btn,
.admin-access-current {
    width: 100%;
    min-height: 32px;
    border-radius: 8px;
    font-size: .47rem;
    font-weight: 900;
}

.admin-allow-btn {
    border: 1px solid #b9e2d0;
    background: #ebf9f1;
    color: #278359;
}

.admin-allow-btn:hover,
.admin-allow-btn:focus {
    background: #def5e8;
    color: #216f4c;
}

.admin-allow-btn:disabled {
    opacity: .45;
}

.admin-access-current {
    border: 1px solid #d9e6ea;
    background: #f3f7f8;
    color: #7c8c95;
}

.admin-user-empty {
    margin-top: 8px;
}

.admin-upload-control {
    padding-top: 7px;
    padding-bottom: 7px;
}

.admin-upload-control::file-selector-button {
    margin-right: 9px;
    border: 0;
    border-radius: 7px;
    padding: 5px 8px;
    background: #e8f8f9;
    color: #167f87;
    font-size: .48rem;
    font-weight: 800;
}

.admin-current-file {
    display: block;
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #f4f8fa;
    color: #607783;
    font-size: .43rem;
    overflow-wrap: anywhere;
}

#directLinkWrap[hidden],
#uploadFileWrap[hidden],
#masterTargetWrap[hidden],
#subTargetWrap[hidden] {
    display: none !important;
}


/* ================================================================
   V12 - Profile + FIM Assistant Chatbot
   ================================================================ */
.profile-content {
    padding-top: 16px;
    padding-bottom: 30px;
}

.profile-hero-card,
.profile-card {
    border: 1px solid #deebef;
    border-radius: 15px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 6px 18px rgba(43,62,77,.08);
}

.profile-hero-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    margin-bottom: 12px;
}

.profile-avatar {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #20d1cc, #16b8c4);
    color: #fff;
    font-size: 1.15rem;
    font-weight: 900;
    box-shadow: 0 5px 12px rgba(22,184,196,.24);
}

.profile-hero-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-hero-copy strong {
    color: #173f62;
    font-size: .73rem;
}

.profile-hero-copy span,
.profile-hero-copy small {
    overflow-wrap: anywhere;
    color: #758691;
    font-size: .48rem;
}

.profile-card {
    padding: 13px;
    margin-bottom: 12px;
}

.profile-section-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #edf3f5;
}

.profile-section-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #e9f9fa;
    color: #168d95;
}

.profile-section-icon svg {
    width: 19px;
    height: 19px;
}

.profile-section-heading div {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.profile-section-heading strong {
    color: #173f62;
    font-size: .62rem;
}

.profile-section-heading span {
    margin-top: 2px;
    color: #87959d;
    font-size: .43rem;
}

.profile-form {
    display: grid;
    gap: 10px;
}

.profile-form .admin-field {
    margin: 0;
}

.profile-form .admin-field > span {
    display: block;
    margin-bottom: 5px;
    color: #536c7c;
    font-size: .47rem;
    font-weight: 800;
}

.profile-form .form-control {
    min-height: 39px;
    border-radius: 9px;
    border-color: #dce7eb;
    font-size: .58rem;
}

.profile-form .admin-field small {
    display: block;
    margin-top: 4px;
    color: #8a979f;
    font-size: .4rem;
}

.profile-save-btn {
    width: 100%;
    min-height: 39px;
}

.profile-pin-input {
    letter-spacing: .28rem;
    font-weight: 800;
}

.admin-faq-answer {
    min-height: 105px;
    resize: vertical;
}

.admin-faq-record .admin-record-main div > small {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Floating bot - V12.2 responsive */
:root {
    --fim-visible-vh: 100dvh;
    --fim-chat-safe-bottom: max(10px, env(safe-area-inset-bottom));
}

.fim-chatbot {
    position: relative;
    z-index: 80;
}

.fim-chatbot-launcher {
    position: fixed;
    z-index: 82;
    right: max(12px, calc((100vw - 430px) / 2 + 12px));
    bottom: calc(78px + env(safe-area-inset-bottom));
    min-width: 92px;
    height: 47px;
    border: 0;
    border-radius: 25px 7px 7px 25px;
    background: linear-gradient(135deg, #20d0c9, #18bec8);
    color: #fff;
    box-shadow: 0 8px 21px rgba(17,126,135,.26);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 5px;
    cursor: pointer;
    touch-action: manipulation;
}

.fim-bot-avatar {
    display: grid;
    place-items: center;
    color: #168f98;
}

.fim-chatbot-launcher .fim-bot-avatar {
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
}

.fim-bot-avatar svg {
    width: 34px;
    height: 34px;
}

.fim-chatbot-launcher-text {
    font-size: .62rem;
    font-weight: 900;
    white-space: nowrap;
}

.fim-chatbot-panel {
    position: fixed;
    z-index: 83;
    right: max(10px, calc((100vw - 430px) / 2 + 10px));
    bottom: calc(132px + env(safe-area-inset-bottom));
    width: min(390px, calc(100vw - 20px));
    height: min(610px, calc(var(--fim-visible-vh, 100dvh) - 150px));
    max-height: calc(var(--fim-visible-vh, 100dvh) - 92px);
    min-height: min(390px, calc(var(--fim-visible-vh, 100dvh) - 120px));
    border: 1px solid #dbe9ed;
    border-radius: 18px;
    background: #eef6f7;
    box-shadow: 0 18px 46px rgba(28,56,73,.25);
    display: grid;
    grid-template-rows: auto minmax(0,1fr) minmax(90px, auto) auto;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(15px) scale(.98);
    transform-origin: bottom right;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.fim-chatbot-panel.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.fim-chatbot-header {
    min-height: 61px;
    padding: 9px 10px;
    background: linear-gradient(135deg, #0f9fa8, #18c7c9);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fim-chatbot-header-avatar {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
}

.fim-chatbot-header-avatar svg {
    width: 35px;
    height: 35px;
}

.fim-chatbot-header-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.fim-chatbot-header-copy strong {
    font-size: .72rem;
    line-height: 1.2;
}

.fim-chatbot-header-copy small {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
    font-size: .46rem;
    opacity: .9;
}

.fim-chatbot-online-dot {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: #d6ffdb;
}

.fim-chatbot-close {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.14);
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    touch-action: manipulation;
}

.fim-chatbot-messages {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 13px 10px;
    background:
        radial-gradient(circle at 18px 18px, rgba(255,255,255,.45) 1px, transparent 1.5px) 0 0 / 22px 22px,
        #eef6f7;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.fim-chat-message-row {
    min-width: 0;
    display: flex;
    align-items: flex-end;
    gap: 6px;
    margin-bottom: 9px;
}

.fim-chat-message-row.is-user {
    justify-content: flex-end;
    padding-left: clamp(24px, 12vw, 48px);
}

.fim-chat-message-row.is-bot {
    justify-content: flex-start;
    padding-right: clamp(18px, 9vw, 38px);
}

.fim-chat-mini-avatar {
    flex: 0 0 25px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #18c4c8;
    color: #168f98;
    display: grid;
    place-items: center;
    box-shadow: 0 2px 7px rgba(29,94,99,.16);
}

.fim-chat-mini-avatar svg {
    width: 22px;
    height: 22px;
}

.fim-chat-bubble {
    min-width: 0;
    max-width: min(84%, 290px);
    padding: 9px 10px;
    border-radius: 12px;
    font-size: clamp(.58rem, 2.5vw, .68rem);
    line-height: 1.48;
    box-shadow: 0 2px 7px rgba(42,74,91,.08);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.fim-chat-bubble > span {
    display: block;
    min-width: 0;
}

.is-bot .fim-chat-bubble {
    background: #fff;
    color: #3a5569;
    border-bottom-left-radius: 3px;
}

.is-user .fim-chat-bubble {
    background: #d7f5ed;
    color: #214d4e;
    border-bottom-right-radius: 3px;
}

.fim-chat-link {
    display: inline-flex;
    max-width: 100%;
    margin-top: 7px;
    padding: 6px 9px;
    border-radius: 7px;
    background: #e7f9fa;
    color: #158a91;
    text-decoration: none;
    font-size: .52rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.fim-chatbot-suggestions-wrap {
    min-height: 0;
    max-height: min(180px, 29vh);
    padding: 8px 9px 9px;
    border-top: 1px solid #dbe7ea;
    background: rgba(255,255,255,.96);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.fim-chatbot-suggestions-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.fim-chatbot-suggestions-label {
    color: #718791;
    font-size: .45rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.fim-chatbot-suggestions-hint {
    color: #9aa8ae;
    font-size: .42rem;
    font-weight: 700;
    white-space: nowrap;
}

.fim-chatbot-suggestions {
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1px 2px 2px 0;
    scrollbar-width: thin;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.fim-chat-faq-chip {
    width: 100%;
    min-width: 0;
    border: 1px solid #bfe3e5;
    border-radius: 11px;
    background: #f2fcfc;
    color: #197b82;
    padding: 7px 9px;
    font-size: .5rem;
    font-weight: 800;
    line-height: 1.3;
    text-align: left;
    display: grid;
    grid-template-columns: 23px minmax(0,1fr);
    align-items: start;
    gap: 7px;
    cursor: pointer;
    touch-action: manipulation;
}

.fim-chat-faq-chip:hover,
.fim-chat-faq-chip:focus-visible {
    background: #e5f8f9;
    outline: none;
    border-color: #8ed4d8;
}

.fim-chat-faq-number {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #dff6f7;
    color: #19868d;
    font-size: .46rem;
    font-weight: 900;
}

.fim-chat-faq-text {
    min-width: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.fim-chatbot-no-faq {
    color: #8b969f;
    font-size: .5rem;
    padding: 4px 1px;
}

.fim-chatbot-composer {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0,1fr) 40px;
    gap: 7px;
    padding: 9px;
    padding-bottom: max(9px, env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid #e3ecef;
}

.fim-chatbot-composer input {
    min-width: 0;
    width: 100%;
    height: 40px;
    border: 1px solid #dbe7eb;
    border-radius: 20px;
    padding: 0 13px;
    outline: none;
    color: #324e61;
    font-size: max(16px, .62rem);
}

.fim-chatbot-composer input:focus {
    border-color: #8ddadd;
    box-shadow: 0 0 0 3px rgba(24,199,201,.10);
}

.fim-chatbot-composer button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #18c5c8;
    color: #fff;
    touch-action: manipulation;
}

.fim-chatbot-composer button svg {
    width: 18px;
    height: 18px;
}

.search-input[data-chatbot-open] {
    cursor: pointer;
}

/* Phone / small screen */
@media (max-width: 480px) {
    .fim-chatbot-panel {
        left: 8px;
        right: 8px;
        bottom: calc(128px + env(safe-area-inset-bottom));
        width: auto;
        height: min(68vh, calc(var(--fim-visible-vh, 100dvh) - 145px));
        max-height: calc(var(--fim-visible-vh, 100dvh) - 100px);
        min-height: min(360px, calc(var(--fim-visible-vh, 100dvh) - 110px));
        border-radius: 16px;
    }

    .fim-chatbot-suggestions-wrap {
        max-height: min(155px, 27vh);
    }

    .fim-chat-bubble {
        max-width: 86%;
    }
}

/* Very narrow phone */
@media (max-width: 350px) {
    .fim-chatbot-launcher {
        min-width: 47px;
        width: 47px;
        padding: 4px;
        border-radius: 50%;
    }

    .fim-chatbot-launcher-text {
        display: none;
    }

    .fim-chatbot-panel {
        left: 6px;
        right: 6px;
        bottom: calc(126px + env(safe-area-inset-bottom));
        min-height: min(330px, calc(var(--fim-visible-vh, 100dvh) - 105px));
        height: min(64vh, calc(var(--fim-visible-vh, 100dvh) - 140px));
    }

    .fim-chatbot-header {
        min-height: 56px;
        padding: 7px 8px;
    }

    .fim-chatbot-suggestions-wrap {
        max-height: 135px;
        padding-left: 7px;
        padding-right: 7px;
    }

    .fim-chat-faq-chip {
        grid-template-columns: 21px minmax(0,1fr);
        gap: 6px;
        padding: 6px 7px;
    }
}

/* Wider screens */
@media (min-width: 576px) {
    .fim-chatbot-launcher {
        bottom: 110px;
    }

    .fim-chatbot-panel {
        bottom: 166px;
        height: min(610px, calc(var(--fim-visible-vh, 100vh) - 190px));
    }

    .fim-chatbot-suggestions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fim-chatbot-suggestions-wrap {
        max-height: 190px;
    }
}

/* V12.1 - CTA buttons follow the same visual language as "TAMBAH FILE" */
.profile-save-btn,
.admin-form-action .admin-primary-btn {
    width: 100%;
}

.profile-save-btn {
    min-height: 44px;
}

/* PIN input remains masked but accepts numeric values only via HTML + JS validation. */
.profile-pin-input {
    font-variant-numeric: tabular-nums;
}
