:root {
    --fk-primary: #175cd3;
    --fk-ink: #102033;
    --fk-teal: #0f766e;
    --fk-soft: #edf5ff;
    --fk-gold: #ffe313;
    --fk-sky: #059bd3;
}

body {
    letter-spacing: 0;
}

.public-home {
    min-height: 100vh;
    color: #242424;
    background:
        radial-gradient(circle at 9% 18%, rgba(5, 155, 211, .10), transparent 26%),
        radial-gradient(circle at 88% 14%, rgba(248, 191, 34, .13), transparent 24%),
        linear-gradient(rgba(7, 54, 94, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(7, 54, 94, .035) 1px, transparent 1px),
        #ffffff;
    background-size: auto, auto, 42px 42px, 42px 42px, auto;
    overflow-x: hidden;
    position: relative;
}

.public-home::before {
    background:
        linear-gradient(135deg, transparent 0 46%, rgba(5, 155, 211, .055) 46% 54%, transparent 54% 100%),
        linear-gradient(45deg, transparent 0 47%, rgba(248, 191, 34, .06) 47% 53%, transparent 53% 100%);
    background-size: 150px 150px;
    content: "";
    inset: 92px 0 auto;
    height: 420px;
    pointer-events: none;
    position: absolute;
    z-index: 0;
}

.home-nav {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid rgba(15, 23, 42, .06);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
    display: flex;
    justify-content: center;
    min-height: 92px;
    padding: 14px clamp(18px, 4vw, 54px);
    position: sticky;
    top: 0;
    z-index: 5;
}

.public-home main,
.home-footer {
    position: relative;
    z-index: 1;
}

.home-nav__inner {
    align-items: center;
    display: flex;
    justify-content: space-between;
    max-width: 1180px;
    width: 100%;
}

.home-brand {
    align-items: center;
    color: #070707;
    animation: homeFadeDown .7s ease both;
    display: inline-flex;
    gap: 13px;
    line-height: 1.05;
    min-width: 0;
}

.home-brand,
.home-brand:hover,
.home-brand:focus,
.home-brand:active,
.home-brand span,
.home-brand strong,
.home-brand small {
    color: #070707;
    text-decoration: none !important;
}

.home-brand img {
    background: #ffffff;
    border: 1px solid #e6eef5;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(7, 54, 94, .08);
    flex: 0 0 auto;
    height: 58px;
    object-fit: contain;
    padding: 6px;
    width: 58px;
}

.home-brand span {
    display: block;
    max-width: 540px;
    overflow-wrap: anywhere;
}

.home-brand strong,
.home-brand small {
    display: block;
}

.home-brand strong {
    color: #07365e;
    font-size: clamp(1.22rem, 1.8vw, 1.72rem);
    font-weight: 950;
    letter-spacing: -.02em;
}

.home-brand small {
    color: #667789;
    font-size: .86rem;
    font-weight: 750;
    margin-top: 4px;
}

.home-menu-toggle {
    align-items: center;
    background: #f8bf22;
    border: 0;
    border-radius: 12px;
    color: #07365e;
    display: none;
    font-size: 1rem;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.home-menu {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: clamp(10px, 1.8vw, 24px);
    margin-left: 24px;
}

.home-menu a,
.home-menu a:hover,
.home-menu a:focus {
    text-decoration: none !important;
}

.home-menu a {
    border-radius: 999px;
    color: #334155;
    font-size: .92rem;
    font-weight: 850;
    padding: 9px 12px;
    transition: background .2s ease, color .2s ease;
    white-space: nowrap;
}

.home-menu a:hover,
.home-menu a:focus {
    background: #eef7fc;
    color: #0789c4;
}

.home-menu a:last-child {
    background: #f8bf22;
    color: #07365e;
    font-weight: 900;
}

.home-menu a:last-child:hover,
.home-menu a:last-child:focus {
    background: #ffd75a;
    color: #07365e;
}

.home-footer {
    align-items: center;
    background: #07365e;
    color: rgba(255, 255, 255, .82);
    display: flex;
    flex-wrap: wrap;
    font-weight: 750;
    gap: 6px;
    justify-content: center;
    padding: 18px 14px;
    text-align: center;
}

.home-footer strong {
    color: #f8bf22;
}

.home-footer a,
.home-footer a:hover,
.home-footer a:focus {
    color: #ffffff;
    font-weight: 900;
    text-decoration: none !important;
}

.home-hero {
    background: linear-gradient(118deg, #08365f 0%, #0a6099 50%, #0789c4 100%);
    border-radius: 30px 30px 0 0;
    color: #ffffff;
    margin: 62px auto 0;
    max-width: min(92vw, 1780px);
    min-height: 54vh;
    overflow: hidden;
    padding: clamp(86px, 9vw, 126px) 28px clamp(76px, 8vw, 108px);
    position: relative;
    text-align: center;
}

.home-hero::before {
    animation: homeLogoFloat 8s ease-in-out infinite;
    background-image: var(--home-logo-url);
    background-position: center;
    background-repeat: no-repeat;
    background-size: min(360px, 34vw);
    content: "";
    inset: 0;
    opacity: .08;
    position: absolute;
}

.home-hero::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, .10), transparent 34%);
    content: "";
    inset: 0;
    position: absolute;
}

.home-hero__inner {
    animation: homeFadeUp .75s ease both;
    margin: 0 auto;
    max-width: 1160px;
    position: relative;
    z-index: 1;
}

.eyebrow {
    animation: homeFadeUp .7s ease .08s both;
    background: #f8bf22;
    border: 0;
    border-radius: 999px;
    color: #07365e;
    display: inline-block;
    font-size: clamp(.84rem, 1.12vw, 1.1rem);
    font-weight: 950;
    letter-spacing: .08em;
    line-height: 1.4;
    padding: 12px 30px;
    text-transform: uppercase;
}

.home-hero h1 {
    animation: homeFadeUp .8s ease .16s both;
    color: #ffffff;
    font-size: clamp(2.45rem, 5vw, 4.6rem);
    font-weight: 900;
    line-height: 1.05;
    margin: 34px auto 20px;
    max-width: 1180px;
    text-shadow: 0 12px 34px rgba(1, 25, 54, .32);
}

.home-hero p {
    animation: homeFadeUp .8s ease .26s both;
    color: rgba(255, 255, 255, .88);
    font-size: clamp(1.05rem, 1.7vw, 1.55rem);
    line-height: 1.8;
    margin: 0 auto;
    max-width: 920px;
}

.home-actions {
    animation: homeFadeUp .8s ease .36s both;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 30px;
}

.home-primary-action {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    font-weight: 800;
    gap: 10px;
    justify-content: center;
    min-height: 50px;
    padding: 13px 18px;
}

.home-primary-action {
    background: var(--fk-gold);
    border: 1px solid rgba(255, 255, 255, .38);
    color: #003e74;
    overflow: hidden;
    position: relative;
    box-shadow: 0 18px 38px rgba(0, 42, 92, .24);
}

.home-primary-action::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .58), transparent);
    content: "";
    height: 100%;
    left: -60%;
    position: absolute;
    top: 0;
    transform: skewX(-18deg);
    width: 46%;
}

.home-primary-action:hover::after {
    animation: homeButtonShine .85s ease;
}

.home-primary-action:hover {
    background: #fff06a;
    color: #003e74;
    text-decoration: none;
}

.home-primary-action,
.home-primary-action:hover,
.home-primary-action:focus {
    text-decoration: none !important;
}

.home-hero__signals {
    animation: homeFadeUp .8s ease .46s both;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 28px;
}

.home-hero__signals span {
    align-items: center;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    color: rgba(255, 255, 255, .94);
    display: inline-flex;
    font-size: .86rem;
    font-weight: 750;
    gap: 8px;
    padding: 8px 12px;
}

.home-hero__signals i {
    color: var(--fk-gold);
}

.home-feature-band {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, 1fr);
    margin: 34px auto 0;
    max-width: 1120px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.home-feature {
    background: #ffffff;
    border: 1px solid #dceaf4;
    border-radius: 8px;
    animation: homeCardIn .7s ease both;
    box-shadow: 0 18px 44px rgba(0, 53, 108, .12);
    min-width: 0;
    padding: 24px;
}

.home-feature:nth-child(2) {
    animation-delay: .08s;
}

.home-feature:nth-child(3) {
    animation-delay: .16s;
}

.home-feature:hover {
    box-shadow: 0 24px 58px rgba(0, 53, 108, .16);
    transform: translateY(-4px);
    transition: transform .25s ease, box-shadow .25s ease;
}

.home-feature i {
    align-items: center;
    background: linear-gradient(135deg, rgba(5, 155, 211, .14), rgba(255, 227, 19, .18));
    border-radius: 8px;
    color: #0371ad;
    display: inline-flex;
    height: 42px;
    justify-content: center;
    margin-bottom: 16px;
    width: 42px;
}

.home-feature strong,
.home-feature span {
    display: block;
}

.home-feature strong {
    color: #07365e;
    font-size: 1.04rem;
    margin-bottom: 8px;
}

.home-feature span {
    color: #526b7c;
    line-height: 1.6;
}

.home-workflow {
    margin: 0 auto;
    max-width: 1120px;
    padding: 76px 20px 58px;
    position: relative;
}

.home-workflow::before {
    background: linear-gradient(135deg, rgba(5, 155, 211, .08), rgba(248, 191, 34, .10));
    border-radius: 999px;
    content: "";
    height: 180px;
    left: -80px;
    position: absolute;
    top: 28px;
    width: 180px;
    z-index: -1;
}

.home-workflow::after {
    background: linear-gradient(135deg, rgba(248, 191, 34, .12), rgba(5, 155, 211, .08));
    border-radius: 999px;
    bottom: 24px;
    content: "";
    height: 130px;
    position: absolute;
    right: -56px;
    width: 130px;
    z-index: -1;
}

.home-section-heading {
    align-items: end;
    animation: homeFadeUp .7s ease both;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 22px;
}

.home-section-heading span {
    color: #057bb5;
    font-weight: 800;
    text-transform: uppercase;
}

.home-section-heading h2 {
    color: #07365e;
    font-size: 2.1rem;
    font-weight: 850;
    margin: 0;
    max-width: 620px;
}

.home-flow-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, 1fr);
}

.home-flow-grid div {
    background: #ffffff;
    border: 1px solid #dceaf4;
    border-radius: 8px;
    animation: homeCardIn .7s ease both;
    min-width: 0;
    padding: 20px;
}

.home-flow-grid div:nth-child(2) {
    animation-delay: .08s;
}

.home-flow-grid div:nth-child(3) {
    animation-delay: .16s;
}

.home-flow-grid div:nth-child(4) {
    animation-delay: .24s;
}

.home-flow-grid div:hover {
    border-color: rgba(5, 155, 211, .42);
    box-shadow: 0 18px 42px rgba(0, 53, 108, .10);
    transform: translateY(-3px);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.home-flow-grid span {
    color: #c59b00;
    display: block;
    font-weight: 900;
    margin-bottom: 14px;
}

.home-flow-grid strong {
    color: #07365e;
    display: block;
    margin-bottom: 8px;
}

.home-flow-grid p {
    color: #667789;
    line-height: 1.6;
    margin: 0;
}

@keyframes homeFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes homeFadeDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes homeCardIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes homeLogoFloat {
    0%, 100% {
        opacity: .18;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: .26;
        transform: translateY(-10px) scale(1.018);
    }
}

@keyframes homeButtonShine {
    from {
        left: -60%;
    }
    to {
        left: 120%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-brand,
    .home-hero::before,
    .home-hero__inner,
    .eyebrow,
    .home-hero h1,
    .home-hero p,
    .home-actions,
    .home-hero__signals,
    .home-feature,
    .home-section-heading,
    .home-flow-grid div {
        animation: none !important;
    }

    .home-feature:hover,
    .home-flow-grid div:hover {
        transform: none;
    }
}

.elogin-page {
    align-items: center;
    background:
        radial-gradient(circle at 16% 20%, rgba(255, 227, 19, .18), transparent 28%),
        linear-gradient(118deg, #08365f 0%, #0a6099 52%, #0789c4 100%);
    min-height: 100vh;
    padding: 28px 16px;
}

.elogin-page::before {
    background:
        linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
    background-size: 44px 44px;
    content: "";
    inset: 0;
    opacity: .22;
    pointer-events: none;
    position: fixed;
}

.elogin-shell {
    animation: homeFadeUp .65s ease both;
    max-width: 430px;
    position: relative;
    width: 100%;
    z-index: 1;
}

.elogin-brand {
    align-items: center;
    color: #ffffff;
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-bottom: 18px;
    text-align: left;
}

.elogin-brand img,
.elogin-brand__fallback {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 16px 38px rgba(0, 25, 58, .20);
    height: 72px;
    object-fit: contain;
    padding: 8px;
    width: 72px;
}

.elogin-brand__fallback {
    align-items: center;
    color: #0872a9;
    display: inline-flex;
    font-size: 28px;
    justify-content: center;
}

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

.elogin-brand span {
    color: rgba(255, 255, 255, .84);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.elogin-brand strong {
    font-size: 1.35rem;
    font-weight: 950;
    line-height: 1.12;
    text-shadow: 0 10px 28px rgba(0, 25, 58, .22);
}

.login-card {
    border: 0;
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(0, 25, 58, .24);
    overflow: hidden;
}

.login-card::before {
    background: linear-gradient(90deg, #08365f, #0789c4, #f8bf22);
    content: "";
    display: block;
    height: 6px;
}

.login-card .login-card-body {
    padding: 28px;
}

.elogin-heading {
    margin-bottom: 20px;
    text-align: center;
}

.elogin-heading span {
    background: rgba(248, 191, 34, .18);
    border-radius: 999px;
    color: #07365e;
    display: inline-block;
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .06em;
    margin-bottom: 12px;
    padding: 7px 12px;
    text-transform: uppercase;
}

.elogin-heading h1 {
    color: #07365e;
    font-size: 1.8rem;
    font-weight: 950;
    margin: 0 0 8px;
}

.elogin-heading p {
    color: #607181;
    line-height: 1.55;
    margin: 0;
}

.elogin-page .input-group .form-control {
    border-color: #d9e6ef;
    min-height: 46px;
}

.elogin-page .input-group-text {
    background: #f4f9fc;
    border-color: #d9e6ef;
    color: #0872a9;
}

.elogin-page .btn-primary {
    background: #f8bf22;
    border-color: #f8bf22;
    border-radius: 12px;
    color: #07365e;
    font-weight: 900;
    min-height: 46px;
}

.elogin-page .btn-primary:hover,
.elogin-page .btn-primary:focus {
    background: #ffd75a;
    border-color: #ffd75a;
    color: #07365e;
}

.main-sidebar .brand-link {
    min-height: 57px;
}

.small-box {
    border-radius: 8px;
}

.card {
    border-radius: 8px;
}

.table td,
.table th {
    vertical-align: middle;
}

.backend-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.table .btn {
    margin: 2px 0;
}

table.dataTable td:last-child {
    white-space: nowrap;
}

.setting-preview {
    margin-top: 12px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.setting-preview img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
}

.setting-preview--icon img {
    max-width: 64px;
    max-height: 64px;
}

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

.form-grid .span-2 {
    grid-column: span 2;
}

.webview-mode .main-header {
    margin-left: 0 !important;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.webview-mode .main-sidebar {
    display: none;
}

.webview-mode .content-wrapper {
    margin-left: 0 !important;
    padding-bottom: 80px;
}

.webview-mode .content-header {
    padding: 14px .5rem 4px;
}

.webview-mode .content-header h1 {
    font-size: 1.35rem;
    font-weight: 700;
}

.webview-mode .breadcrumb {
    display: none;
}

.webview-mode .container-fluid {
    padding-left: 12px;
    padding-right: 12px;
}

.webview-mode .card-body,
.webview-mode .card-header {
    padding: 14px;
}

.webview-mode .form-grid {
    grid-template-columns: 1fr;
    gap: 10px;
}

.webview-mode .form-grid .span-2 {
    grid-column: auto;
}

.mobile-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #fff;
    border-top: 1px solid #dbe3ef;
    z-index: 1040;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, .12);
}

.mobile-tabbar a {
    min-height: 62px;
    color: #667085;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
}

.mobile-tabbar a.active {
    color: var(--fk-primary);
    font-weight: 700;
}

.mobile-tabbar i {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

@media (max-width: 767.98px) {
    .home-nav {
        min-height: auto;
        padding: 12px 14px;
    }

    .home-nav__inner {
        align-items: flex-start;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: space-between;
    }

    .home-brand img {
        height: 48px;
        width: 48px;
    }

    .home-brand span {
        display: block;
        max-width: calc(100vw - 92px);
    }

    .home-brand strong {
        font-size: 1.05rem;
    }

    .home-brand small {
        font-size: .72rem;
    }

    .home-menu-toggle {
        display: inline-flex;
    }

    .home-menu {
        background: #ffffff;
        border: 1px solid #e3edf5;
        border-radius: 14px;
        box-shadow: 0 14px 34px rgba(15, 23, 42, .10);
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        gap: 8px;
        margin-left: 0;
        max-width: 100%;
        padding: 10px;
        width: 100%;
    }

    .home-menu.is-open {
        display: flex;
    }

    .home-menu a {
        font-size: .78rem;
        justify-content: center;
        padding: 7px 10px;
    }

    .home-hero {
        min-height: auto;
        margin-top: 24px;
        max-width: calc(100vw - 28px);
        padding: 58px 18px 54px;
    }

    .home-hero h1 {
        font-size: 2.9rem;
    }

    .home-hero p {
        font-size: 1rem;
    }

    .home-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .home-feature-band,
    .home-flow-grid {
        grid-template-columns: 1fr;
    }

    .home-feature-band {
        margin-top: -26px;
        padding: 0 14px;
    }

    .home-workflow {
        padding: 46px 14px 40px;
    }

    .home-section-heading {
        align-items: start;
        display: grid;
    }

    .home-section-heading h2 {
        font-size: 1.65rem;
    }

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

    .form-grid .span-2 {
        grid-column: auto;
    }
}
