/*
 * Product theme for the signed-in area (Unfold admin).
 *
 * Loaded after css/unfold-daniks.css — the re-tinted copy of Unfold's own
 * stylesheet (see `manage.py build_admin_theme`), which already carries the ink
 * palette and the Geist font stack. This file only refines components.
 *
 * Brand-neutral on purpose: it also styles white-label partner domains, so the
 * accent always comes from --color-primary-* (partners override that palette)
 * and nothing here names or draws the Daniks brand.
 */

:root {
    --dx-ink: #0e1236;
    --dx-body: #474c6e;
    --dx-muted: #62688c;
    --dx-line: #e3e7f2;
    --dx-line-faint: #eef1f8;
    --dx-ground: #f5f7fb;
    --dx-robot: #1e7f5c;
    --dx-robot-soft: #e7f6ef;
    --dx-mono: 'Geist Mono Variable', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --dx-radius: 10px;
    --dx-radius-card: 14px;
    --dx-shadow-card: 0 24px 48px -36px rgba(14, 18, 54, 0.35);
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- Shell ---------- */

#main {
    box-shadow: none;
}

html:not(.dark) body {
    background: #fff;
}

/* Sidebar: cool ground, white "pill" for the current page. */
#nav-sidebar h3 {
    margin-top: 18px;
    font-family: var(--dx-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

html:not(.dark) #nav-sidebar h3 {
    color: var(--dx-muted);
}

#nav-sidebar ol a {
    height: 2.5rem;
    border-radius: var(--dx-radius);
    transition: background-color 0.15s ease, color 0.15s ease;
}

html:not(.dark) #nav-sidebar ol a:hover {
    background: rgba(14, 18, 54, 0.04);
    color: var(--dx-ink);
}

html:not(.dark) #nav-sidebar ol a.font-semibold {
    border-color: var(--dx-line);
    background: #fff;
    box-shadow: 0 6px 14px -10px rgba(14, 18, 54, 0.35);
}

#nav-sidebar ol a.font-semibold {
    font-weight: 500;
}

/* Page title in the top bar. */
#header-inner h1,
#header-inner .text-xl {
    letter-spacing: -0.02em;
}

/* ---------- Type ---------- */

html:not(.dark) .text-2xl.font-medium,
html:not(.dark) h1,
html:not(.dark) h2 {
    letter-spacing: -0.02em;
}

html:not(.dark) .text-2xl.font-medium {
    color: var(--dx-ink);
}

/* ---------- Surfaces ---------- */

.rounded-md {
    border-radius: var(--dx-radius);
}

.rounded {
    border-radius: 8px;
}

/* Checkboxes stay square; switches (rounded-full) keep their pill shape. */
input[type='checkbox'].rounded {
    border-radius: 4px;
}

/* Cards (Unfold components/card.html) */
.border.flex.flex-col.flex-grow.p-6.rounded-md {
    border-radius: var(--dx-radius-card);
}

html:not(.dark) .border.flex.flex-col.flex-grow.p-6.rounded-md {
    background: #fff;
    box-shadow: var(--dx-shadow-card);
}

/* Small uppercase labels (Unfold helpers/label.html) */
.text-xxs.uppercase {
    padding: 3px 8px;
    border-radius: 999px;
    font-family: var(--dx-mono);
    font-weight: 500;
    letter-spacing: 0.04em;
}

/* ---------- Buttons and fields ---------- */

button.bg-primary-600,
a.bg-primary-600,
input[type='submit'].bg-primary-600 {
    font-weight: 500;
    box-shadow: 0 10px 24px -14px rgb(var(--color-primary-600));
    transition: filter 0.15s ease, transform 0.15s ease;
}

button.bg-primary-600:hover,
a.bg-primary-600:hover,
input[type='submit'].bg-primary-600:hover {
    filter: brightness(0.95);
}

html:not(.dark) input.border,
html:not(.dark) select.border,
html:not(.dark) textarea.border {
    border-color: #d5daea;
    color: var(--dx-ink);
}

html:not(.dark) input.border::placeholder,
html:not(.dark) textarea.border::placeholder {
    color: #9aa0c0;
}

/* ---------- Tables ---------- */

#result_list,
table.border-separate {
    border-radius: var(--dx-radius-card);
    overflow: hidden;
}

html:not(.dark) #result_list {
    background: #fff;
    box-shadow: var(--dx-shadow-card);
}

#result_list thead th {
    font-family: var(--dx-mono);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

html:not(.dark) #result_list thead th {
    background: var(--dx-ground);
    color: var(--dx-muted);
}

html:not(.dark) #result_list tbody tr:hover > td,
html:not(.dark) #result_list tbody tr:hover > th {
    background: #fafbfe;
}

html:not(.dark) #result_list tbody td,
html:not(.dark) #result_list tbody th {
    color: var(--dx-body);
}

html:not(.dark) #result_list tbody th a,
html:not(.dark) #result_list tbody td a {
    font-weight: 500;
}

#result_list td,
#result_list th {
    font-variant-numeric: tabular-nums;
}

/* ---------- Notices (dashboard + pages) ----------
   White card; severity lives in the icon chip, the hairline and the action
   button — not in a tinted box. Variants only set the three custom properties. */

.dx-notice {
    --dx-notice-accent: var(--dx-ink);
    --dx-notice-soft: var(--dx-line-faint);
    --dx-notice-line: var(--dx-line);
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding: 18px 20px;
    border: 1px solid var(--dx-notice-line);
    border-radius: var(--dx-radius-card);
    background: #fff;
    color: var(--dx-body);
    box-shadow: var(--dx-shadow-card);
}

.dx-notice__icon {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--dx-notice-soft);
    font-size: 20px;
    line-height: 1;
    color: var(--dx-notice-accent);
}

.dx-notice__body {
    min-width: 0;
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
}

.dx-notice__title {
    margin: 0;
    padding-top: 1px;
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: var(--dx-ink);
}

.dx-notice__title + p {
    margin-top: 2px;
}

.dx-notice__body > p + p,
.dx-notice__body > p + div,
.dx-notice__body > div + p,
.dx-notice__body > div + div,
.dx-notice__body > p + form,
.dx-notice__body > div + form {
    margin-top: 12px;
}

.dx-notice__body strong {
    font-weight: 600;
    color: var(--dx-ink);
}

.dx-notice__body a:not(.dx-btn) {
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: #c3c9e0;
    text-underline-offset: 3px;
    color: var(--dx-ink);
}

.dx-notice__body a:not(.dx-btn):hover {
    text-decoration-color: currentColor;
}

/* Who the notice is about (subscription owners): quiet inset rows. */
.dx-notice__list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 14px;
    border-radius: var(--dx-radius);
    background: var(--dx-ground);
    font-size: 13.5px;
}

.dx-notice__list > div {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.dx-notice__list .material-symbols-outlined {
    font-size: 17px;
    line-height: 1.3;
    color: var(--dx-notice-accent);
}

.dx-notice--danger {
    --dx-notice-accent: #c53030;
    --dx-notice-soft: #fdecec;
    --dx-notice-line: #f0cfcf;
}

.dx-notice--warning {
    --dx-notice-accent: #b7710b;
    --dx-notice-soft: #fdf3dc;
    --dx-notice-line: #eedcb4;
}

.dx-notice--success {
    --dx-notice-accent: var(--dx-robot);
    --dx-notice-soft: var(--dx-robot-soft);
    --dx-notice-line: #c4e6d6;
}

.dx-notice--info {
    --dx-notice-accent: rgb(var(--color-primary-600));
    --dx-notice-soft: rgb(var(--color-primary-600) / 0.1);
}

/* Flash messages (Django messages, form error notes): same card, one line. */
.dx-flash-list {
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.dx-notice--flash {
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 10px 14px;
    box-shadow: none;
}

.dx-notice--flash .dx-notice__icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 17px;
}

.dx-notice--flash .dx-notice__body {
    color: var(--dx-ink);
}

p.errornote {
    margin-bottom: 24px;
    padding: 12px 16px;
    border: 1px solid #f0cfcf;
    border-radius: var(--dx-radius);
    background: #fff;
    font-size: 14px;
    color: #a12b2b;
}

.dark p.errornote {
    border-color: rgba(229, 83, 83, 0.35);
    background: rgba(229, 83, 83, 0.08);
    color: #ffb4b4;
}

.dx-notice__steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dx-notice__steps > div {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.dx-notice__step-num {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--dx-ink);
    font-family: var(--dx-mono);
    font-size: 12px;
    font-weight: 500;
    color: #fff;
}

.dx-notice__steps p {
    margin: 0;
}

.dx-notice__steps p + p {
    margin-top: 2px;
    color: var(--dx-muted);
}

.dx-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 18px;
    border: 0;
    border-radius: var(--dx-radius);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    color: #fff;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.dx-btn:hover {
    filter: brightness(0.94);
}

.dx-btn .material-symbols-outlined {
    font-size: 18px;
    line-height: 1;
}

.dx-btn--danger {
    background: #c53030;
}

.dx-btn--warning {
    background: #b7710b;
}

.dx-btn--primary {
    background: rgb(var(--color-primary-600));
}

.dx-btn--lg {
    min-height: 48px;
    padding: 12px 24px;
    font-size: 15.5px;
}

.dx-btn--quiet {
    border: 1px solid #d5daea;
    background: #fff;
    color: var(--dx-ink);
}

/* Dark mode keeps Unfold's own surfaces; notices just need readable text. */
.dark .dx-notice {
    --dx-notice-line: rgba(255, 255, 255, 0.12);
    --dx-notice-soft: rgba(255, 255, 255, 0.08);
    --dx-notice-accent: #fff;
    background: rgba(255, 255, 255, 0.03);
    color: #d5d8ee;
    box-shadow: none;
}

.dark .dx-notice--danger {
    --dx-notice-accent: #ff8f8f;
    --dx-notice-soft: rgba(229, 83, 83, 0.16);
    --dx-notice-line: rgba(229, 83, 83, 0.35);
}

.dark .dx-notice--warning {
    --dx-notice-accent: #f3c266;
    --dx-notice-soft: rgba(243, 194, 102, 0.14);
    --dx-notice-line: rgba(243, 194, 102, 0.3);
}

.dark .dx-notice--success {
    --dx-notice-accent: #7fe0b8;
    --dx-notice-soft: rgba(47, 184, 133, 0.14);
    --dx-notice-line: rgba(47, 184, 133, 0.3);
}

.dark .dx-notice--info {
    --dx-notice-accent: rgb(var(--color-primary-400));
    --dx-notice-soft: rgb(var(--color-primary-400) / 0.14);
}

.dark .dx-notice__title,
.dark .dx-notice__body strong,
.dark .dx-notice__body a:not(.dx-btn),
.dark .dx-notice--flash .dx-notice__body {
    color: #fff;
}

.dark .dx-notice__list {
    background: rgba(255, 255, 255, 0.05);
}

.dark .dx-notice__steps p + p {
    color: #a9aed0;
}

.dark .dx-btn--quiet {
    border-color: rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #fff;
}

/* ---------- Dashboard ---------- */

.dx-dash-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 24px;
    margin: -4px 0 24px;
}

.dx-eyebrow {
    font-family: var(--dx-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgb(var(--color-primary-600));
}

.dx-dash-title {
    margin: 0;
    font-size: 28px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: var(--dx-ink);
}

.dx-dash-title b {
    font-weight: 500;
    color: #7f85ad;
}

.dark .dx-dash-title {
    color: #fff;
}

.dx-link-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid #d5daea;
    border-radius: 999px;
    background: #fff;
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    color: var(--dx-ink);
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.dx-link-pill:hover {
    border-color: rgb(var(--color-primary-600));
    background: var(--dx-ground);
}

.dx-link-pill .material-symbols-outlined {
    font-size: 16px;
    line-height: 1;
    color: rgb(var(--color-primary-600));
}

.dark .dx-link-pill {
    border-color: rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #fff;
}

.dx-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.dx-kpi {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 18px 20px;
    border: 1px solid var(--dx-line);
    border-radius: var(--dx-radius-card);
    background: #fff;
    box-shadow: var(--dx-shadow-card);
}

.dx-kpi__label {
    overflow: hidden;
    padding-right: 56px;
    font-size: 13.5px;
    line-height: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--dx-muted);
}

.dx-kpi__value {
    font-size: 28px;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    color: var(--dx-ink);
}

.dx-kpi__unit {
    position: absolute;
    top: 18px;
    right: 18px;
    font-family: var(--dx-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9aa0c0;
}

.dark .dx-kpi {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: none;
}

.dark .dx-kpi__label,
.dark .dx-kpi__unit {
    color: #a9aed0;
}

.dark .dx-kpi__value {
    color: #fff;
}

.dx-kpi__hint {
    margin-top: 2px;
    font-size: 12.5px;
    line-height: 18px;
    color: var(--dx-muted);
}

.dx-kpi__hint a {
    font-weight: 500;
    white-space: nowrap;
    color: rgb(var(--color-primary-600));
}

.dx-kpi__hint a:hover {
    text-decoration: underline;
}

.dark .dx-kpi__hint {
    color: #a9aed0;
}

.dark .dx-kpi__hint a {
    color: rgb(var(--color-primary-400));
}

/* Secondary figures: one card, hairline-separated cells. */
.dx-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    overflow: hidden;
    margin-bottom: 28px;
    border: 1px solid var(--dx-line);
    border-radius: var(--dx-radius-card);
    background: #fff;
    box-shadow: var(--dx-shadow-card);
}

.dx-strip__cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 14px 20px 16px;
    /* Hairlines come from a shadow so wrapped rows stay separated without doubled borders. */
    box-shadow: -1px -1px 0 var(--dx-line);
}

.dx-strip__label {
    overflow: hidden;
    font-size: 12.5px;
    line-height: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--dx-muted);
}

.dx-strip__value {
    font-size: 19px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--dx-ink);
}

.dx-strip__value small {
    margin-left: 6px;
    font-family: var(--dx-mono);
    font-size: 10.5px;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9aa0c0;
}

.dark .dx-strip {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: none;
}

.dark .dx-strip__cell {
    box-shadow: -1px -1px 0 rgba(255, 255, 255, 0.1);
}

.dark .dx-strip__label {
    color: #a9aed0;
}

.dark .dx-strip__value {
    color: #fff;
}

/* Reporting period: joined date range, quick ranges, submit. */
.dx-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-bottom: 16px;
}

.dx-range {
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding: 0 6px 0 10px;
    border: 1px solid #d5daea;
    border-radius: var(--dx-radius);
    background: #fff;
    box-shadow: 0 1px 2px rgba(14, 18, 54, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dx-range:focus-within {
    border-color: rgb(var(--color-primary-600));
    box-shadow: 0 0 0 3px rgb(var(--color-primary-600) / 0.14);
}

.dx-range__icon {
    font-size: 18px;
    line-height: 1;
    color: #9aa0c0;
}

.dx-range__sep {
    color: #9aa0c0;
}

.dx-toolbar .dx-range input[type='date'] {
    width: 128px;
    min-width: 0;
    height: 36px;
    padding: 0 6px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    box-shadow: none;
    outline: 0;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    color: var(--dx-ink);
}

.dx-presets {
    display: inline-flex;
    height: 38px;
    padding: 3px;
    border-radius: var(--dx-radius);
    background: #eef1f8;
}

.dx-presets__item {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--dx-muted);
    transition: color 0.15s ease, background-color 0.15s ease;
}

.dx-presets__item:hover {
    color: var(--dx-ink);
}

.dx-presets__item.is-active {
    background: #fff;
    box-shadow: 0 1px 2px rgba(14, 18, 54, 0.12);
    color: var(--dx-ink);
}

.dx-toolbar__submit {
    min-height: 38px;
    padding: 0 16px;
    white-space: nowrap;
}

.dark .dx-range {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: none;
}

.dark .dx-toolbar .dx-range input[type='date'] {
    color: #fff;
    color-scheme: dark;
}

.dark .dx-presets {
    background: rgba(255, 255, 255, 0.06);
}

.dark .dx-presets__item {
    color: #a9aed0;
}

.dark .dx-presets__item:hover,
.dark .dx-presets__item.is-active {
    color: #fff;
}

.dark .dx-presets__item.is-active {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

@media (max-width: 1023px) {
    .dx-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .dx-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-bottom: 20px;
    }

    .dx-strip__cell {
        padding: 12px 16px 14px;
    }

    .dx-strip__value {
        font-size: 17px;
    }

    .dx-kpi {
        padding: 14px 16px;
    }

    .dx-kpi__value {
        font-size: 22px;
    }

    .dx-dash-title {
        font-size: 22px;
    }
}

/* ---------- Sign-in pages (admin/login.html, login/base.html) ---------- */

.dx-auth {
    position: relative;
    overflow: hidden;
}

html:not(.dark) body.login {
    background: var(--dx-ground);
}

html:not(.dark) .dx-auth {
    background: #fff;
}

/* White-label sign-in pages keep their own templates (partner logo, no artwork): same card, neutral ground. */
body.login .sm\:w-96 {
    width: 100%;
    max-width: 440px;
    padding: 32px;
    border: 1px solid var(--dx-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 50px 100px -40px rgba(14, 18, 54, 0.3), 0 20px 40px -24px rgba(14, 18, 54, 0.18);
}

.dark body.login .sm\:w-96 {
    border-color: rgba(255, 255, 255, 0.12);
    background: #111827;
    box-shadow: none;
}

body.login .sm\:w-96 input[type='text'],
body.login .sm\:w-96 input[type='email'],
body.login .sm\:w-96 input[type='password'] {
    height: 46px;
    font-size: 16px;
    font-weight: 400;
}

/* The white-label email form renders a bare `.form-control` input. */
body.login input.form-control {
    width: 100%;
    padding: 0 14px;
    border: 1px solid #d5daea;
    border-radius: var(--dx-radius);
    background: #fff;
    color: var(--dx-ink);
}

body.login input.form-control:focus {
    outline: none;
    border-color: rgb(var(--color-primary-600));
    box-shadow: 0 0 0 3px rgb(var(--color-primary-600) / 0.2);
}

.dark body.login input.form-control {
    border-color: rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #fff;
}

body.login .sm\:w-96 button[type='submit'] {
    min-height: 46px;
    font-size: 15px;
    font-weight: 500;
}

@media (max-width: 640px) {
    body.login .sm\:w-96 {
        padding: 24px 20px;
    }
}

.dx-auth__plane {
    position: absolute;
    top: -420px;
    right: -480px;
    width: 1100px;
    height: 1000px;
    border-radius: 160px;
    transform: rotate(-28deg);
    pointer-events: none;
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.42) 0, rgba(255, 255, 255, 0.42) 1px, transparent 1px, transparent 8px),
        radial-gradient(closest-side at 30% 35%, #ffb45c 0%, rgba(255, 180, 92, 0) 72%),
        radial-gradient(closest-side at 62% 30%, #f062b0 0%, rgba(240, 98, 176, 0) 76%),
        radial-gradient(closest-side at 50% 72%, rgb(var(--color-primary-600)) 0%, rgb(var(--color-primary-600) / 0) 82%),
        radial-gradient(closest-side at 80% 60%, #6fb8ff 0%, rgba(111, 184, 255, 0) 76%),
        #efe6ff;
}

.dark .dx-auth__plane {
    opacity: 0.35;
}

.dx-auth__col {
    position: relative;
    z-index: 1;
    padding-top: 40px;
    padding-bottom: 40px;
}

.dx-auth__wrap {
    max-width: 440px;
}

.dx-auth__logo {
    display: block;
    width: auto;
    height: 34px;
    margin: 0 0 24px 4px;
}

.dx-auth__card {
    padding: 32px;
    border: 1px solid var(--dx-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 50px 100px -40px rgba(14, 18, 54, 0.4), 0 20px 40px -24px rgba(14, 18, 54, 0.22);
}

.dark .dx-auth__card {
    border-color: rgba(255, 255, 255, 0.12);
    background: #111827;
    box-shadow: none;
}

.dx-auth__title {
    margin-bottom: 24px;
    font-size: 26px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: var(--dx-ink);
}

.dx-auth__title-rest {
    color: #7f85ad;
}

.dark .dx-auth__title {
    color: #fff;
}

.dx-auth__intro {
    margin: -14px 0 24px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--dx-body);
}

.dark .dx-auth__intro {
    color: #a9aed0;
}

.dx-auth__card input[type='text'],
.dx-auth__card input[type='email'],
.dx-auth__card input[type='password'] {
    height: 46px;
    font-size: 16px;
    font-weight: 400;
}

.dx-auth__card .submit-row button,
.dx-auth__card button[type='submit'],
.dx-auth__card a.bg-white.border {
    min-height: 46px;
    font-size: 15px;
    font-weight: 500;
}

@media (max-width: 640px) {
    .dx-auth__plane {
        top: auto;
        bottom: -340px;
        right: -420px;
        width: 700px;
        height: 640px;
    }

    .dx-auth__card {
        padding: 24px 20px;
    }
}

/* ---------- Header menus (account, theme) ---------- */

.dx-menu {
    width: 272px;
    padding: 6px;
    overflow: hidden;
    border-color: var(--dx-line);
    border-radius: var(--dx-radius-card);
    box-shadow: 0 30px 60px -30px rgba(14, 18, 54, 0.4), 0 12px 24px -16px rgba(14, 18, 54, 0.2);
}

.dx-menu--narrow {
    width: 176px;
}

.dx-menu--narrow > a {
    margin: 0;
    padding: 9px 10px;
    border-radius: 8px;
}

.dx-menu__account {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    padding: 8px 8px 12px;
    border-bottom: 1px solid var(--dx-line-faint);
}

.dx-menu__avatar {
    flex: none;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgb(var(--color-primary-600) / 0.1);
    font-size: 14px;
    font-weight: 600;
    color: rgb(var(--color-primary-700));
}

.dx-menu__account-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.dx-menu__label {
    display: block;
    font-family: var(--dx-mono);
    font-size: 10.5px;
    font-weight: 500;
    line-height: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9aa0c0;
}

.dx-menu__name {
    overflow: hidden;
    font-size: 14px;
    font-weight: 500;
    line-height: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--dx-ink);
}

.dx-menu__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 20px;
    text-align: left;
    color: var(--dx-body);
    transition: background-color 0.12s ease, color 0.12s ease;
}

.dx-menu__item .material-symbols-outlined {
    flex: none;
    font-size: 18px;
    line-height: 1;
    color: #9aa0c0;
    transition: color 0.12s ease;
}

.dx-menu__item:hover {
    background: var(--dx-ground);
    color: var(--dx-ink);
}

.dx-menu__item:hover .material-symbols-outlined {
    color: rgb(var(--color-primary-600));
}

.dx-menu__item--danger,
.dx-menu__item--danger .material-symbols-outlined {
    color: #c53030;
}

.dx-menu__item--danger:hover {
    background: #fdeeee;
    color: #a12b2b;
}

.dx-menu__item--danger:hover .material-symbols-outlined {
    color: #a12b2b;
}

.dx-menu__field {
    margin-top: 6px;
    padding: 12px 10px 10px;
    border-top: 1px solid var(--dx-line-faint);
}

.dx-menu__field .dx-menu__label {
    margin-bottom: 6px;
}

.dx-menu__footer {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--dx-line-faint);
}

.dark .dx-menu {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}

.dark .dx-menu__account,
.dark .dx-menu__field,
.dark .dx-menu__footer {
    border-color: rgba(255, 255, 255, 0.1);
}

.dark .dx-menu__name {
    color: #fff;
}

.dark .dx-menu__item {
    color: #d5d8ee;
}

.dark .dx-menu__item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.dark .dx-menu__item--danger,
.dark .dx-menu__item--danger .material-symbols-outlined {
    color: #f87171;
}

.dark .dx-menu__item--danger:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

/* ---------- Dialogs ---------- */

.dx-dialog {
    width: 90vw;
    max-width: 560px;
    padding: 28px;
    border: 0;
    border-radius: 20px;
    background: #fff;
    color: var(--dx-body);
    box-shadow: 0 50px 100px -40px rgba(14, 18, 54, 0.5), 0 20px 40px -24px rgba(14, 18, 54, 0.3);
}

.dx-dialog::backdrop {
    background: rgba(14, 18, 54, 0.5);
}

.dx-dialog__title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--dx-ink);
}

.dx-dialog__close {
    padding: 0;
    border: 0;
    background: none;
    color: #9aa0c0;
    cursor: pointer;
}

.dx-dialog__close:hover {
    color: var(--dx-ink);
}

.dx-dialog__intro {
    margin: 0 0 22px;
    font-size: 14.5px;
    line-height: 1.6;
}

.dx-dialog__check {
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: rgb(var(--color-primary-600));
}

.dx-dialog__option-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--dx-ink);
}

.dx-dialog__option-text {
    display: block;
    margin-top: 2px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--dx-muted);
}

.dark .dx-dialog {
    background: #111827;
    color: #d5d8ee;
}

.dark .dx-dialog__title,
.dark .dx-dialog__option-title {
    color: #fff;
}

.dark .dx-dialog__option-text {
    color: #a9aed0;
}

@media (max-width: 639px) {
    .dx-range {
        width: 100%;
    }

    .dx-toolbar .dx-range input[type='date'] {
        flex: 1 1 0;
        width: auto;
    }

    .dx-presets {
        flex: 1 1 auto;
    }

    .dx-presets__item {
        flex: 1 1 0;
        justify-content: center;
    }
}
