/* Amaru Software visual identity overrides */
:root {
    --ins-amaru-midnight-navy: #000515;
    --ins-amaru-deep-navy: #07142f;
    --ins-amaru-ink: #0d1b3d;
    --ins-amaru-action-blue: #0b5bd3;
    --ins-amaru-electric-blue: #2f80ff;
    --ins-amaru-cyan: #06d7f3;
    --ins-amaru-slate: #52627a;
    --ins-amaru-surface: #f6f9ff;
    --ins-amaru-border: #dde5f2;
    --ins-blue: #0b5bd3;
    --ins-indigo: #2f80ff;
    --ins-pink: #2f80ff;
    --ins-teal: #06d7f3;
    --ins-cyan: #06d7f3;
    --ins-black: #000515;
    --ins-black-rgb: 0, 5, 21;
    --ins-gray: #52627a;
    --ins-gray-dark: #07142f;
    --ins-gray-100: #f6f9ff;
    --ins-gray-200: #dde5f2;
    --ins-gray-300: #dde5f2;
    --ins-gray-400: #b7c4d8;
    --ins-gray-500: #8fa0b8;
    --ins-gray-600: #52627a;
    --ins-gray-700: #52627a;
    --ins-gray-800: #07142f;
    --ins-gray-900: #0d1b3d;
    --ins-light: #f6f9ff;
    --ins-light-rgb: 246, 249, 255;
    --ins-dark: #0d1b3d;
    --ins-dark-rgb: 13, 27, 61;
    --ins-body-bg: #f6f9ff;
    --ins-body-bg-rgb: 246, 249, 255;
    --ins-body-color: #0d1b3d;
    --ins-body-color-rgb: 13, 27, 61;
    --ins-secondary-color: #52627a;
    --ins-secondary-color-rgb: 82, 98, 122;
    --ins-secondary-bg: #ffffff;
    --ins-secondary-bg-rgb: 255, 255, 255;
    --ins-tertiary-color: #52627a;
    --ins-tertiary-bg: #f6f9ff;
    --ins-tertiary-bg-rgb: 246, 249, 255;
    --ins-emphasis-color: #0d1b3d;
    --ins-emphasis-color-rgb: 13, 27, 61;
    --ins-border-color: #dde5f2;
    --ins-border-color-translucent: #dde5f2;
    --ins-primary: #0b5bd3;
    --ins-primary-rgb: 11, 91, 211;
    --ins-secondary: #52627a;
    --ins-secondary-rgb: 82, 98, 122;
    --ins-info: #06d7f3;
    --ins-info-rgb: 6, 215, 243;
    --ins-purple: #2f80ff;
    --ins-purple-rgb: 47, 128, 255;
    --ins-link-color: #0b5bd3;
    --ins-link-color-rgb: 11, 91, 211;
    --ins-link-hover-color: #2f80ff;
    --ins-link-hover-color-rgb: 47, 128, 255;
    --ins-focus-ring-color: rgba(6, 215, 243, .35);
    --ins-theme-card-border-color: var(--ins-border-color);
    --ins-logo-surface-bg: #ffffff;
    --swsafe-table-hover-bg: rgba(11, 91, 211, .08);
    --swsafe-table-hover-color: var(--ins-body-color);
}

html[data-bs-theme="dark"] {
    --ins-body-bg: #000515;
    --ins-body-bg-rgb: 0, 5, 21;
    --ins-body-color: #f6f9ff;
    --ins-body-color-rgb: 246, 249, 255;
    --ins-secondary-color: #b7c4d8;
    --ins-secondary-color-rgb: 183, 196, 216;
    --ins-secondary-bg: #07142f;
    --ins-secondary-bg-rgb: 7, 20, 47;
    --ins-tertiary-color: #8fa0b8;
    --ins-tertiary-bg: #0d1b3d;
    --ins-tertiary-bg-rgb: 13, 27, 61;
    --ins-emphasis-color: #0d1b3d;
    --ins-emphasis-color-rgb: 246, 249, 255;
    --ins-border-color: #334766;
    --ins-border-color-translucent: #607493;
    --ins-primary: #2f80ff;
    --ins-primary-rgb: 47, 128, 255;
    --ins-link-color: #2f80ff;
    --ins-link-color-rgb: 47, 128, 255;
    --ins-link-hover-color: #06d7f3;
    --ins-link-hover-color-rgb: 6, 215, 243;
    --ins-focus-ring-color: rgba(6, 215, 243, .35);
    --ins-logo-surface-bg: #ffffff;
    --ins-light: #07142f;
    --ins-light-rgb: 7, 20, 47;
    --ins-dark: #607493;
    --ins-dark-rgb: 96, 116, 147;
    --swsafe-table-striped-bg: rgba(13, 27, 61, .72);
    --swsafe-table-hover-bg: rgba(47, 128, 255, .16);
    --swsafe-table-hover-color: #ffffff;
}

﻿/* Stronger hover for DataTables + Bootstrap table */
#datatables-ajax.dataTable tbody tr:not(.child) {
    cursor: pointer;
}

/* Override striped rows on hover (exclude child rows) */
#datatables-ajax.dataTable tbody tr:hover>* {
    background-color: var(--swsafe-table-hover-bg) !important;
    /* light primary */
    color: var(--ins-body-color);
    /* keep text readable */
}

#datatables_buttons_info {
    background-color: var(--ins-primary);
    color: white;
}

.as-textarea-h100 {
    min-height: 100px !important;
    max-height: 100px !important;
}

.as-placeholder {
    height: 38px;
    display: block;
}



/* Snniper */
#formLoading {
    z-index: 1050;
    /* Perf: hint compositing for smoother fades when toggling opacity/display */
    will-change: opacity;
}

.sk-chase {
    width: 40px;
    height: 40px;
    position: relative;
    animation: sk-chase 2.5s infinite linear both;
}

.sk-chase-dot {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    animation: sk-chase-dot 2.0s infinite ease-in-out both;
}

.sk-chase-dot:before {
    content: '';
    display: block;
    width: 25%;
    height: 25%;
    background-color: var(--ins-primary);
    border-radius: 100%;
    animation: sk-chase-dot-before 2.0s infinite ease-in-out both;
}

.sk-chase-dot:nth-child(1) {
    animation-delay: -1.1s;
}

.sk-chase-dot:nth-child(2) {
    animation-delay: -1.0s;
}

.sk-chase-dot:nth-child(3) {
    animation-delay: -0.9s;
}

.sk-chase-dot:nth-child(4) {
    animation-delay: -0.8s;
}

.sk-chase-dot:nth-child(5) {
    animation-delay: -0.7s;
}

.sk-chase-dot:nth-child(6) {
    animation-delay: -0.6s;
}

.sk-chase-dot:nth-child(1):before {
    animation-delay: -1.1s;
}

.sk-chase-dot:nth-child(2):before {
    animation-delay: -1.0s;
}

.sk-chase-dot:nth-child(3):before {
    animation-delay: -0.9s;
}

.sk-chase-dot:nth-child(4):before {
    animation-delay: -0.8s;
}

.sk-chase-dot:nth-child(5):before {
    animation-delay: -0.7s;
}

.sk-chase-dot:nth-child(6):before {
    animation-delay: -0.6s;
}

@keyframes sk-chase {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes sk-chase-dot {

    80%,
    100% {
        transform: rotate(360deg);
    }
}

@keyframes sk-chase-dot-before {
    50% {
        transform: scale(0.4);
    }

    100%,
    0% {
        transform: scale(1.0);
    }
}

/* Perf hints for SweetAlert2 */
.swal2-container,
.swal2-popup {
    will-change: transform, opacity;
}


/* Overlay to block the interaction while the login is validated */
#loginForm {
    position: relative;
}

.login-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.75rem;
    background: var(--ins-secondary-bg);
    backdrop-filter: blur(4px);
    border-radius: 1rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 500ms ease, visibility 500ms ease;
    z-index: 5;
    margin: -10px;
}

.login-overlay.show {
    opacity: 0.7;
    visibility: visible;
    pointer-events: all;
    transition: opacity 500ms ease, visibility 500ms ease;
}

/* spinner */
.spinner {
    margin: 0;
    width: 70px;
    text-align: center;
}

.spinner>div {
    width: 18px;
    height: 18px;
    background-color: var(--ins-primary);
    border-radius: 100%;
    display: inline-block;
    -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;
    animation: sk-bouncedelay 1.4s infinite ease-in-out both;
}

.spinner .bounce1 {
    -webkit-animation-delay: -0.32s;
    animation-delay: -0.32s;
}

.spinner .bounce2 {
    -webkit-animation-delay: -0.16s;
    animation-delay: -0.16s;
}

@-webkit-keyframes sk-bouncedelay {

    0%,
    80%,
    100% {
        -webkit-transform: scale(0)
    }

    40% {
        -webkit-transform: scale(1.0)
    }
}

@keyframes sk-bouncedelay {

    0%,
    80%,
    100% {
        -webkit-transform: scale(0);
        transform: scale(0);
    }

    40% {
        -webkit-transform: scale(1.0);
        transform: scale(1.0);
    }
}


.auth-logo-image {
    max-height: 96px;
    width: auto;
    object-fit: contain;
}

.auth-panel {
    transition: opacity .25s ease, transform .25s ease;
}

.auth-panel.is-hidden {
    display: none;
}

.recovery-card {
    border: 1px solid var(--ins-border-color);
    background: var(--ins-tertiary-bg);
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.recovery-card .ti {
    color: var(--ins-primary);
}

.auth-link-button {
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--ins-link-color);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-link-button:hover {
    color: var(--ins-primary);
}

.auth-support-note {
    font-size: .92rem;
    color: var(--ins-secondary-color);
    margin-top: 1rem;
}

.auth-tooltip-button {
    border: 0;
    background: transparent;
    color: var(--ins-secondary-color);
    padding: 0;
    margin-left: .35rem;
    line-height: 1;
}

.auth-tooltip-button:hover {
    color: var(--ins-primary);
}

.auth-language-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.auth-language-form {
    background: var(--ins-secondary-bg);
    border: 1px solid var(--ins-border-color);
    border-radius: 999px;
    padding: .45rem .75rem;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.auth-language-form label {
    font-size: .85rem;
    color: var(--ins-secondary-color);
    margin: 0;
}

.auth-language-form .form-select {
    border: 0;
    padding-top: 0;
    padding-bottom: 0;
    padding-left: .25rem;
    padding-right: 1.8rem;
    min-width: 140px;
    box-shadow: none;
    background-position: right .35rem center;
    background-color: transparent;
}
/* Dark table row overrides */
html[data-bs-theme="dark"] .table,
html[data-bs-theme="dark"] table.dataTable {
    --ins-table-color: var(--ins-body-color);
    --ins-table-bg: transparent;
    --ins-table-border-color: var(--ins-border-color);
    --ins-table-striped-color: var(--ins-body-color);
    --ins-table-striped-bg: var(--swsafe-table-striped-bg);
    --ins-table-active-color: #ffffff;
    --ins-table-active-bg: rgba(47, 128, 255, .18);
    --ins-table-hover-color: var(--swsafe-table-hover-color);
    --ins-table-hover-bg: var(--swsafe-table-hover-bg);
}

    html[data-bs-theme="dark"] .table > :not(caption) > * > *,
    html[data-bs-theme="dark"] table.dataTable > :not(caption) > * > * {
        border-color: var(--ins-table-border-color);
        color: var(--ins-table-color-state, var(--ins-table-color-type, var(--ins-table-color)));
    }

    html[data-bs-theme="dark"] table.dataTable tbody tr > * {
        background-color: transparent !important;
    }

    html[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > *,
    html[data-bs-theme="dark"] table.dataTable.table-striped > tbody > tr:nth-of-type(odd) > *,
    html[data-bs-theme="dark"] table.dataTable.stripe > tbody > tr.odd > *,
    html[data-bs-theme="dark"] table.dataTable.display > tbody > tr.odd > * {
        background-color: var(--swsafe-table-striped-bg) !important;
        color: var(--ins-body-color);
    }

    html[data-bs-theme="dark"] .table-hover > tbody > tr:hover > *,
    html[data-bs-theme="dark"] table.dataTable.table-hover > tbody > tr:hover > *,
    html[data-bs-theme="dark"] table.dataTable.hover > tbody > tr:hover > *,
    html[data-bs-theme="dark"] table.dataTable.display > tbody > tr:hover > *,
    html[data-bs-theme="dark"] #datatables-ajax.dataTable tbody tr:hover > * {
        background-color: var(--swsafe-table-hover-bg) !important;
        color: var(--swsafe-table-hover-color);
    }

    html[data-bs-theme="dark"] table.dataTable tbody tr.child > td,
    html[data-bs-theme="dark"] table.dataTable tbody tr.child ul.dtr-details {
        background-color: var(--ins-secondary-bg) !important;
        color: var(--ins-body-color);
    }

/* Login-specific Amaru surfaces and controls. */
:root { --auth-action-text: #ffffff; }
html[data-bs-theme="dark"] {
    --auth-action-text: #000515;
    --ins-emphasis-color: #f6f9ff;
}
.auth-language-bar { align-items: center; gap: .75rem; flex-wrap: wrap; }
.auth-theme-toggle { min-width: 44px; min-height: 44px; border-radius: 50%; }
/* Native select popups need an explicit surface as well as text color. */
.auth-language-form .form-select {
    color-scheme: light;
}
html[data-bs-theme="dark"] .auth-language-form .form-select {
    color-scheme: dark;
}
.auth-language-form .form-select option {
    background-color: var(--ins-secondary-bg);
    color: var(--ins-body-color);
}
.auth-language-form .form-select:focus-visible,
.auth-link-button:focus-visible,
.auth-tooltip-button:focus-visible,
.auth-theme-toggle:focus-visible {
    outline: 2px solid var(--ins-link-color);
    outline-offset: 3px;
}
.auth-amaru-logo { width: min(100%, 300px); height: auto; max-height: 110px; object-fit: contain; }
.auth-brand .logo-dark, .auth-brand .logo-light { background: transparent; }
.auth-support-note, .auth-tooltip-button { color: var(--ins-secondary-color); }
.auth-link-button:hover, .auth-tooltip-button:hover { color: var(--ins-link-hover-color); }
#datatables_buttons_info { color: var(--auth-action-text); }
.swal2-popup {
    background: var(--ins-secondary-bg);
    color: var(--ins-body-color);
}
.swal2-title, .swal2-html-container { color: var(--ins-body-color); }
.swal2-styled.swal2-confirm, #downloadRecoveryCodesButton {
    background: var(--ins-primary);
    color: var(--auth-action-text);
}
.swal2-styled.swal2-confirm:focus-visible, #downloadRecoveryCodesButton:focus-visible {
    outline: 2px solid var(--ins-link-color);
    outline-offset: 3px;
}
.swal2-input, .swal2-textarea, .swal2-select {
    background: var(--ins-secondary-bg);
    color: var(--ins-body-color);
    border-color: var(--ins-border-color-translucent);
}
