/* Account effects share the existing neumorphic palette and native form controls. */
@property --mtsn-glow-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

.mtsn-field-well {
    display: block;
    position: relative;
    min-width: 0;
}
.mtsn-field-well > input {
    display: block;
    width: 100%;
    box-sizing: border-box;
}
body .mtsn-field-well.mtsn-password-well > input {
    padding-inline-end: 52px !important;
}
html body.auth-body .auth-login-form .input-icon > button[data-password-toggle][hidden] {
    display: none !important;
}
html body .mtsn-field-well > button[data-password-toggle] {
    position: absolute !important;
    z-index: 4;
    inset: 50% 4px auto auto;
    transform: translateY(-50%) !important;
    display: grid !important;
    place-items: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit;
}
html body [data-password-toggle]:focus-visible {
    outline: 2px solid #1372b9 !important;
    outline-offset: -3px;
}
[data-password-toggle] .mtsn-eye-slash { display: none; }
[data-password-toggle][aria-pressed="true"] .mtsn-eye-slash { display: inline; }

.mtsn-field-glow {
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease;
}
.mtsn-field-well > .mtsn-field-glow { border-radius: 12px; }
[data-account-field]:focus-within > .mtsn-field-glow {
    opacity: 1;
    outline: 2px solid #087f9e;
    outline-offset: -2px;
}
@supports (mask-composite: exclude) {
    [data-account-field]:focus-within > .mtsn-field-glow {
        outline: 0;
        padding: 2px;
        background: conic-gradient(from var(--mtsn-glow-angle), #168c8d, #40dfcc, #1457ba, #b65bff, #168c8d);
        mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        mask-composite: exclude;
        animation: mtsn-field-orbit 2.2s linear infinite;
    }
}
@keyframes mtsn-field-orbit { to { --mtsn-glow-angle: 360deg; } }

html body.auth-body .auth-login-form button.auth-submit:not(#nm-not-used),
html body.auth-body .auth-form-card .auth-register-action,
html body.auth-body .auth-form-card .karya-primary,
html body.auth-body .auth-form-card .auth-verify-submit,
html body.auth-body .auth-form-card .account36-google {
    min-height: 44px;
    box-shadow: 5px 6px 11px #8297ac66, -5px -5px 12px #fff9, inset 0 1px 1px #fff5 !important;
    transition: box-shadow .18s ease, transform .18s ease !important;
}
html body.auth-body .auth-login-form button.auth-submit:not(#nm-not-used):active,
html body.auth-body .auth-form-card :is(.auth-register-action,.karya-primary,.auth-verify-submit,.account36-google):active {
    transform: translateY(2px) scale(.985) !important;
    box-shadow: inset 4px 4px 10px #163e685e, inset -3px -3px 9px #ffffff60 !important;
}
.auth-help > .auth-register-action { text-decoration: none; }

.mtsn-strength {
    display: grid;
    gap: .35rem;
    margin-block: .45rem .15rem;
    font-size: .8rem;
    font-weight: 500;
    line-height: 1.45;
}
.mtsn-strength-status { font-weight: 700; }
.mtsn-strength-bar {
    display: block;
    height: .38rem;
    border-radius: 1rem;
    background: #899eb257;
    overflow: hidden;
}
.mtsn-strength-bar::before {
    content: "";
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    transition: width .18s ease;
}
.mtsn-strength[data-level="1"] .mtsn-strength-bar::before { width: 28%; background: #c33b51; }
.mtsn-strength[data-level="2"] .mtsn-strength-bar::before { width: 64%; background: #ae650b; }
.mtsn-strength[data-level="3"] .mtsn-strength-bar::before { width: 100%; background: #147b57; }
.mtsn-strength-checklist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .125rem .5rem;
}
.mtsn-strength-checklist > [data-met="true"] { font-weight: 750; }

html.auth-request-pending body.auth-body .site-page-loader {
    inset: auto max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) auto !important;
    display: flex !important;
    align-items: center;
    gap: .8rem;
    width: auto !important;
    max-width: calc(100vw - 24px);
    height: auto !important;
    min-height: 60px;
    padding: 8px 14px !important;
    border: 1px solid #8bafc9 !important;
    border-radius: 18px;
    background: var(--nm-bg, #e7ebf0) !important;
    box-shadow: 0 8px 23px #17365536 !important;
}
html.auth-request-pending body.auth-body .site-page-loader > strong { display: block !important; }
html.auth-request-pending body.auth-body .site-page-loader .nm-loader-orbit {
    --mtsn-auth-orbit-radius: 20px;
    display: grid !important;
    width: 52px !important;
    height: 52px !important;
    flex: 0 0 52px;
    margin: 0 !important;
}
html.auth-request-pending body.auth-body .site-page-loader .nm-loader-dot {
    width: 5px !important;
    height: 5px !important;
    inset: calc(50% - 2.5px) auto auto calc(50% - 2.5px) !important;
    margin: 0 !important;
    transform: rotate(var(--angle)) translateX(var(--mtsn-auth-orbit-radius)) !important;
    background: #1a80a5 !important;
    animation-name: mtsn-auth-pulse !important;
}
html.auth-request-pending body.auth-body .site-page-loader .nm-loader-center {
    inset: 11px !important;
    color: #10577f;
}
.nm-loader-center > svg { width: 20px; height: 20px; }
@keyframes mtsn-auth-pulse { 50% { opacity: .26; } }

html body.atlas-admin .admin-sidebar {
    background: linear-gradient(150deg, rgba(247,253,255,.96), rgba(214,232,237,.94)) !important;
    border-right: 1px solid #c9dce6 !important;
    backdrop-filter: blur(12px);
}
html[data-theme="dark"] body.atlas-admin .admin-sidebar {
    background: linear-gradient(150deg, #182e3e, #162733) !important;
    border-right-color: #36566c !important;
}
html[data-theme="dark"] body.atlas-admin .admin-sidebar :is(strong,b,small,p,span,a,summary) { color: #e5f4fc !important; }
html body.atlas-admin .admin-nav a.is-active {
    box-shadow: inset 3px 0 #28aeb1, inset 2px 2px 7px #49758938, 0 0 10px #2bb9b735 !important;
}
body .mts-rail-ready .mts-rail-button[aria-expanded="true"] {
    outline: 1px solid #289fa0;
    box-shadow: inset 2px 2px 8px #1f6c784d, 0 0 12px #40b8bb62 !important;
}
#mts-magic-nav .mobile-bottom-nav__item.is-active svg {
    filter: drop-shadow(0 0 4px #39dccd);
}
.drawer-nav > a, .mts-tinta-menu-links > a { display: flex; align-items: center; gap: .5rem; }
.mts-tinta-menu-links .mts-tinta-menu-group { list-style: none; padding-inline-start: .6rem; }
.mts-tinta-menu-links :is(a,summary) > svg { flex: 0 0 18px; width: 18px; height: 18px; }

.mtsn-dashboard-clock {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .65rem 1rem;
    width: fit-content;
    max-width: 100%;
    margin-block: 0 1rem;
    padding: .65rem .85rem;
    border-radius: 16px;
    border: 1px solid #638ba557;
    background: #e4eef3;
    color: #17334a;
}
.mtsn-dashboard-clock:has(time:empty) { display: none; }
.mtsn-dashboard-clock time { font: 700 1.3rem ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.mtsn-clock-zone { margin-inline-start: .4rem; font-size: .8rem; }
.mtsn-dashboard-clock small { display: block; }
.mtsn-clock-formats { display: flex; gap: .3rem; }
.mtsn-clock-formats > button { min-height: 44px; padding: .3rem .55rem; font-size: .8rem; }
html body .mtsn-clock-formats > [aria-pressed="true"] {
    box-shadow: inset 2px 2px 6px #57789155 !important;
    outline: 1px solid #359398;
}
html[data-theme="dark"] .mtsn-dashboard-clock { background: #172b38; color: #e5f4fc; }

html.reduce-motion .mtsn-field-glow,
html.reduce-motion body.auth-body .site-page-loader .nm-loader-dot { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
    html body .mtsn-field-glow,
    html body.auth-body .site-page-loader .nm-loader-dot,
    html body.auth-body .auth-form-card :is(.auth-submit,.auth-register-action,.karya-primary,.auth-verify-submit,.account36-google) {
        animation: none !important;
        transition: none !important;
    }
}
