/* Only the authenticator page loads this stylesheet, never a shared bundle.
   Odoo's base layout does not apply body_class, so reset the document itself. */
html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: #002b1f;
    color-scheme: dark;
}

html {
    scrollbar-color: #527461 #002b1f;
}

html::-webkit-scrollbar {
    width: 10px;
    height: 10px;
    background: #002b1f;
}

html::-webkit-scrollbar-thumb {
    border: 2px solid #002b1f;
    border-radius: 8px;
    background: #527461;
}

.dena-totp-screen,
.dena-totp-screen * {
    box-sizing: border-box;
}

.dena-totp-screen {
    min-height: 100vh;
    min-height: 100svh;
    background: #002b1f url('../img/dena_home_background.png') center / cover no-repeat;
    color: #edf8f2;
    font-family: Vazirmatn, IRANSans, Tahoma, sans-serif;
    font-size: 14px;
    line-height: 1.8;
    text-align: right;
}

.dena-totp-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 8px 24px;
    border-bottom: 1px solid rgba(164, 210, 184, .16);
    background: #003022;
}

.dena-totp-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #e5f4ea;
    font-weight: 700;
}

.dena-totp-brand-mark {
    color: #ffb500;
    font-size: 21px;
    line-height: 1;
}

.dena-totp-content {
    display: flex;
    min-height: calc(100vh - 48px);
    min-height: calc(100svh - 48px);
    align-items: center;
    justify-content: center;
    padding: 36px 16px;
}

.dena-totp-card {
    width: 100%;
    max-width: 440px;
    padding: 32px;
    border: 1px solid rgba(159, 193, 137, .42);
    border-radius: 18px;
    background: linear-gradient(145deg, #064b33, #003a29 70%, #003324);
    box-shadow: 0 18px 48px rgba(0, 20, 13, .26);
}

.dena-totp-icon {
    display: flex;
    width: 88px;
    height: 88px;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    border: 1px solid rgba(196, 207, 137, .46);
    border-radius: 18px;
    background: linear-gradient(145deg, #09613e, #003a29);
    box-shadow: 0 5px 16px rgba(0, 20, 13, .24);
    color: #ffbd19;
}

.dena-totp-icon svg {
    width: 46px;
    height: 46px;
}

.dena-totp-card h1 {
    margin: 0 0 12px;
    color: #f5fff8;
    font-size: 23px;
    font-weight: 700;
    line-height: 1.6;
    text-align: center;
}

.dena-totp-description {
    margin: 0 0 28px;
    color: #c5dfd0;
    line-height: 1.9;
    text-align: center;
}

.dena-totp-form > label:first-of-type {
    display: block;
    margin-bottom: 9px;
    color: #e6f3eb;
    font-weight: 600;
}

.dena-totp-input {
    display: block;
    width: 100%;
    height: 56px;
    padding: 8px 16px;
    border: 1px solid #54836a;
    border-radius: 10px;
    background: #002d20;
    color: #f5fff8;
    font-family: inherit;
    font-size: 24px;
    letter-spacing: .22em;
    text-align: center;
}

.dena-totp-input:focus {
    border-color: #ffbd19;
}

.dena-totp-input:focus-visible,
.dena-totp-screen button:focus-visible {
    outline: 2px solid #ffbd19;
    outline-offset: 3px;
}

.dena-totp-input[aria-invalid="true"] {
    border-color: #ff9c8b;
}

.dena-totp-code {
    position: relative;
    direction: ltr;
}

.dena-totp-code-boxes {
    display: none;
}

.dena-totp-code.is-enhanced .dena-totp-input {
    position: absolute;
    inset: 0;
    z-index: 1;
    height: 100%;
    margin: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: transparent;
    caret-color: transparent;
    -webkit-text-fill-color: transparent;
}

.dena-totp-code.is-enhanced .dena-totp-input::selection {
    background: transparent;
    color: transparent;
}

.dena-totp-code.is-enhanced .dena-totp-code-boxes {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    pointer-events: none;
}

.dena-totp-code-box {
    display: flex;
    min-width: 0;
    height: 56px;
    align-items: center;
    justify-content: center;
    border: 1px solid #54836a;
    border-radius: 10px;
    background: #002d20;
    color: #f5fff8;
    font-size: 24px;
    line-height: 1;
}

.dena-totp-input[aria-invalid="true"] + .dena-totp-code-boxes .dena-totp-code-box {
    border-color: #ff9c8b;
}

.dena-totp-code-box.is-active {
    outline: 2px solid #ffbd19;
    outline-offset: 2px;
}

.dena-totp-code-box.is-selected {
    background: #1a5940;
}

.dena-totp-error {
    margin: 12px 0 0;
    color: #ffd5ce;
    font-size: 13px;
}

.dena-totp-submit {
    width: 100%;
    min-height: 48px;
    margin-top: 20px;
    padding: 10px 16px;
    border: 0;
    border-radius: 10px;
    background: #ffb500;
    color: #153423;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.dena-totp-submit:hover {
    background: #ffc32d;
}

.dena-totp-cancel {
    margin: 16px 0 0;
    text-align: center;
}

.dena-totp-cancel button {
    border: 0;
    background: none;
    color: #c5dfd0;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.dena-totp-cancel button {
    min-height: 44px;
    padding: 8px;
}

.dena-totp-cancel button:hover {
    color: #f5fff8;
}

@media (max-width: 480px) {
    .dena-totp-topbar { padding-inline: 16px; }
    .dena-totp-content { padding: 24px 16px; }
    .dena-totp-card { padding: 28px 20px; }
    .dena-totp-card h1 { font-size: 21px; }
}
