/* DYOR design kit — CSS @layers порядок.
   tokens < components < (page CSS вне layer'а — выше всех)
   Page-стили автоматически перекрывают kit без необходимости в !important. */
@layer tokens, components;

@layer tokens {
:root {
    /* Color System */
    --bg-dark: #181A20;
    --bg-darker: #12151A;
    --bg-table: #1E2026;
    --bg-forest: #011B0F;        /* dashboard sub-theme: card bg (16 use) */
    --bg-forest-light: #013520;  /* dashboard sub-theme: hover/lighter forest (7 use) */
    --text-primary: #ECF5FF;
    --text-secondary: #B0BEC5;
    --text-tertiary: #8A9BAE;
    --text-inverse: #020302; /* тёмный текст на ярких/светлых фонах (9 use) */
    --accent-primary: #3AFFA3;
    --accent-primary-pressed: #29ba6d;
    --accent-secondary: #00C8FF;
    --border-color: #2B3139;
    --negative: #FF5E5E;
    --negative-pressed: #b34242;

    /* Accent-primary с прозрачностью (числа справа — частота в проекте) */
    --accent-primary-bg-faint: rgba(58, 255, 163, 0.05);  /* 29 */
    --accent-primary-bg: rgba(58, 255, 163, 0.1);         /* 63 */
    --accent-primary-bg-strong: rgba(58, 255, 163, 0.15); /* 37 */
    --accent-primary-bg-heavy: rgba(58, 255, 163, 0.3);   /* 34 */

    /* Negative с прозрачностью */
    --negative-bg: rgba(255, 94, 94, 0.1);                /* 17 */
    --negative-bg-strong: rgba(255, 94, 94, 0.15);        /* 12 */
    --negative-bg-heavy: rgba(255, 94, 94, 0.3);          /* 9 */

    /* Semantic aliases — отдельное имя для семантики, value делится с другим токеном */
    --positive: var(--accent-primary);     /* price-gain — то же что accent, но семантически другой */
    --highlight: var(--accent-primary-bg); /* alias для accent-primary-bg */

    /* Семантические цвета (Material-style, используются хардкодом в dialog/admin) */
    --warning: #FFC107;  /* 14 */
    --error: #F44336;    /* 15 */
    --success: #4CAF50;  /* 11 */
    --alert: #FF6723;    /* 5, оранжевый для "expiring"/"about to fail" между warning и error */

    /* Brand цвета бирж/партнёров */
    --brand-binance: #F0B90B; /* 17 */

    /* Typography System */
    /* Font Families */
    --font-body: 'Onest', 'Inter', sans-serif;
    --font-heading: 'Onest', sans-serif;

    /* Font Sizes - Desktop */
    --font-h1-desktop: 48px;
    --font-h2-desktop: 32px;
    --font-h3-desktop: 24px;
    --font-h4-desktop: 20px;
    --font-lg-desktop: 18px;
    --font-body-desktop: 16px;
    --font-small-desktop: 14px;
    --font-xs-desktop: 13px;
    --font-2xs-desktop: 12px;
    --font-3xs-desktop: 11px;
    --font-button-desktop: 16px;

    /* Font Sizes - Mobile */
    --font-h1-mobile: 32px;
    --font-h2-mobile: 28px;
    --font-h3-mobile: 24px;
    --font-body-mobile: 14px;
    --font-small-mobile: 12px;
    --font-button-mobile: 14px;

    /* Font Weights */
    --font-weight-bold: 700;
    --font-weight-semibold: 600;
    --font-weight-medium: 500;
    --font-weight-regular: 400;
    --font-weight-light: 300;

    /* Line Heights */
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.6;

    /* Letter Spacing */
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.5px;
    --letter-spacing-button: 0.5px;
}}

@layer tokens {
:root {
    /* Spacing scale — 4px grid.
       Используется для padding, margin, gap.
       Числа в имени = шаг × 4px. */
    --space-0: 0;
    --space-px: 1px;
    --space-0-5: 2px;
    --space-1: 4px;
    --space-1-5: 6px;
    --space-2: 8px;
    --space-2-5: 10px;
    --space-3: 12px;
    --space-3-5: 14px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 28px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-15: 60px;
    --space-20: 80px;
}
}

@layer tokens {
:root {
    /* Border radius scale. */
    --radius-xs: 2px;
    --radius-sm: 4px;
    --radius-sm-plus: 6px;
    --radius-md: 8px;
    --radius-md-plus: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-full: 9999px;
    --radius-circle: 50%;
}
}

@layer tokens {
:root {
    /* Нейтральные тени для elevation на тёмном фоне.
       Числа справа — частота встречаемости в проекте. */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);              /* 3 */
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);            /* 5 */
    --shadow-md-strong: 0 4px 12px rgba(0, 0, 0, 0.3);      /* 5 */
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);             /* 5 */
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.5);            /* 9, modal */

    /* Accent-glow: подсветка в фирменный зелёный. */
    --shadow-accent-sm: 0 4px 12px rgba(58, 255, 163, 0.1); /* 12, subtle */
    --shadow-accent-md: 0 4px 12px rgba(58, 255, 163, 0.3); /* 5, button hover */
    --shadow-accent-lg: 0 8px 24px rgba(58, 255, 163, 0.3); /* 4, card hover */

    /* Focus rings — для :focus-visible. */
    --shadow-focus: 0 0 0 3px rgba(58, 255, 163, 0.1);      /* 9, input focus */
    --shadow-focus-thin: 0 0 0 2px rgba(58, 255, 163, 0.1); /* 5 */
    --shadow-focus-strong: 0 0 0 2px rgba(58, 255, 163, 0.3); /* 4 */

    /* Danger glow для красных кнопок. */
    --shadow-danger: 0 4px 12px rgba(255, 94, 94, 0.3);     /* 4 */
}
}

@layer tokens {
:root {
    /* Длительности transition. */
    --duration-fast: 0.15s;
    --duration-base: 0.2s;
    --duration-slow: 0.3s;
    --duration-slower: 0.35s;

    /* Easing. */
    --ease-default: ease;
    --ease-in-out: ease-in-out;
}
}

@layer tokens {
:root {
    /* Семантическая шкала z-index — чтобы избежать гонки слоёв.
       Между значениями оставлен запас на промежуточные элементы. */
    --z-base: 0;
    --z-raised: 1;
    --z-dropdown: 100;
    --z-sticky: 800;
    --z-fixed: 1000;
    --z-modal-backdrop: 9000;
    --z-modal: 9999;
    --z-toast: 10000;
    --z-tooltip: 10001;
}
}

@layer tokens {
:root {
    /* Icon font sizes — для FontAwesome <i> и .icon-классов.
       Меньшие иконки используют типографические токены (--font-* desktop). */
    --icon-md: 32px;  /* 6 use — средние иконки в карточках */
    --icon-lg: 48px;  /* ~14 use — empty-state, error-icon, upload-icon */
    --icon-xl: 64px;  /* ~5 use — empty-state крупные */
}
}

@layer components {
/* Typography utility classes.
   Используют токены из colors.css, чтобы страницам не нужно было
   хардкодить размеры/семейство/вес. */

.h1 {
    font-family: var(--font-heading);
    font-size: var(--font-h1-desktop);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-normal);
    margin: 0;
}

.h2 {
    font-family: var(--font-heading);
    font-size: var(--font-h2-desktop);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-normal);
    margin: 0;
}

.h3 {
    font-family: var(--font-heading);
    font-size: var(--font-h3-desktop);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-normal);
    margin: 0;
}

.body {
    font-family: var(--font-body);
    font-size: var(--font-body-desktop);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-normal);
    letter-spacing: var(--letter-spacing-normal);
}

.body-sm {
    font-family: var(--font-body);
    font-size: var(--font-small-desktop);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-normal);
    letter-spacing: var(--letter-spacing-normal);
}

.button-text {
    font-family: var(--font-body);
    font-size: var(--font-button-desktop);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-button);
}

@media (max-width: 768px) {
    .h1 {
        font-size: var(--font-h1-mobile);
    }

    .h2 {
        font-size: var(--font-h2-mobile);
    }

    .h3 {
        font-size: var(--font-h3-mobile);
    }

    .body {
        font-size: var(--font-body-mobile);
    }

    .body-sm {
        font-size: var(--font-small-mobile);
    }

    .button-text {
        font-size: var(--font-button-mobile);
    }
}
}

@layer components {
/* DYOR button kit.
   API: одиночные классы (.button-primary, .button-error, ...). Размер
   маркируется суффиксом (-small). Все размеры/радиусы/переходы/цвета
   приходят из tokens. */

.button-primary {
    font-family: var(--font-body);
    font-size: var(--font-button-desktop);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-button);
    background-color: var(--accent-primary);
    color: var(--bg-darker);
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-2-5) var(--space-4);
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
}

@media (hover: hover) and (pointer: fine) {
    .button-primary:hover {
        background-color: var(--accent-primary-pressed);
        color: var(--bg-darker);
    }
}

.button-primary-small {
    font-family: var(--font-body);
    font-size: var(--font-button-mobile);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-button);
    background-color: var(--accent-primary);
    color: var(--bg-darker);
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-1-5) var(--space-3);
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
}

@media (hover: hover) and (pointer: fine) {
    .button-primary-small:hover {
        background-color: var(--accent-primary-pressed);
        color: var(--bg-darker);
    }
}

.button-error {
    font-family: var(--font-body);
    font-size: var(--font-button-desktop);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-button);
    background-color: var(--negative);
    color: var(--bg-darker);
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-2-5) var(--space-4);
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
}

@media (hover: hover) and (pointer: fine) {
    .button-error:hover {
        background-color: var(--negative-pressed);
        color: var(--bg-darker);
    }
}

.button-error-small {
    font-family: var(--font-body);
    font-size: var(--font-button-mobile);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-button);
    background-color: var(--negative);
    color: var(--bg-darker);
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-1-5) var(--space-3);
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
}

@media (hover: hover) and (pointer: fine) {
    .button-error-small:hover {
        background-color: var(--negative-pressed);
        color: var(--bg-darker);
    }
}

.button-warning-small {
    font-family: var(--font-body);
    font-size: var(--font-button-mobile);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-button);
    background-color: var(--warning);
    color: var(--bg-darker);
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-1-5) var(--space-3);
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
    display: inline-flex;
    align-items: center;
    gap: var(--space-1-5);
}

@media (hover: hover) and (pointer: fine) {
    .button-warning-small:hover {
        background-color: #FF8C00;
        color: var(--bg-darker);
    }
}

.button-close {
    background-color: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius-circle);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
}

@media (hover: hover) and (pointer: fine) {
    .button-close:hover {
        background-color: var(--highlight);
        color: var(--accent-primary);
    }
}

.button-back {
    font-family: var(--font-body);
    font-size: var(--font-button-desktop);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-button);
    position: absolute;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    top: var(--space-5);
    left: var(--space-5);
    padding: var(--space-2-5) var(--space-4);
    color: var(--text-primary);
    z-index: var(--z-raised);
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
    align-items: center;
    gap: var(--space-2);
}

@media (hover: hover) and (pointer: fine) {
    .button-back:hover {
        background-color: var(--highlight);
        color: var(--accent-primary);
        border-color: var(--accent-primary);
    }

    .button-back:hover svg path {
        stroke: var(--accent-primary);
    }
}

.button-icon {
    background-color: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius-circle);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
}

@media (hover: hover) and (pointer: fine) {
    .button-icon:hover {
        background-color: var(--highlight);
        color: var(--accent-primary);
    }
}

.button-link {
    font-family: var(--font-body);
    font-size: var(--font-button-desktop);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-button);
    background-color: transparent;
    color: var(--accent-primary-pressed);
    border: none;
    padding: 0;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
}

@media (hover: hover) and (pointer: fine) {
    .button-link:hover {
        color: var(--accent-primary);
        text-decoration: underline;
    }
}

/* SVG icon button (fill) */
.button-svg-icon {
    background: transparent;
    border: none;
    padding: var(--space-1-5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.button-svg-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--text-secondary);
    transition: fill var(--duration-slow) var(--ease-default);
}

@media (hover: hover) and (pointer: fine) {
    .button-svg-icon:hover svg {
        fill: var(--accent-primary);
    }
}

.sidebar .button-svg-icon.active svg {
    fill: var(--accent-primary);
}

/* SVG icon button (stroke) */
.button-svg-icon-stroke {
    background: transparent;
    border: none;
    padding: var(--space-1-5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: fill var(--duration-slow) var(--ease-default);
}

.button-svg-icon-stroke svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-secondary);
}

@media (hover: hover) and (pointer: fine) {
    .button-svg-icon-stroke:hover svg {
        stroke: var(--accent-primary);
    }
}

.sidebar .button-svg-icon-stroke.active svg {
    stroke: var(--accent-primary);
}

.button-secondary {
    font-family: var(--font-body);
    font-size: var(--font-button-desktop);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-button);
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-2-5) var(--space-4);
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

@media (hover: hover) and (pointer: fine) {
    .button-secondary:hover {
        background-color: var(--highlight);
        border-color: var(--accent-primary);
        color: var(--accent-primary);
    }
}

.button-secondary-small {
    font-family: var(--font-body);
    font-size: var(--font-button-mobile);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-button);
    background-color: var(--border-color);
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-1-5) var(--space-3);
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
}

@media (hover: hover) and (pointer: fine) {
    .button-secondary-small:hover {
        background-color: var(--accent-primary-pressed);
        color: var(--bg-darker);
    }
}

.button-text-small {
    font-family: var(--font-body);
    font-size: var(--font-button-mobile);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-button);
    background-color: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius-sm);
    padding: var(--space-1) var(--space-2);
    cursor: pointer;
    transition: color var(--duration-base) var(--ease-default);
}

@media (hover: hover) and (pointer: fine) {
    .button-text-small:hover {
        color: var(--accent-primary-pressed);
    }
}

/* === Global states ===
   Применяются ко всем .button-* классам сразу. */

.button-primary,
.button-primary-small,
.button-secondary,
.button-secondary-small,
.button-error,
.button-error-small,
.button-warning-small,
.button-close,
.button-back,
.button-icon,
.button-link,
.button-svg-icon,
.button-svg-icon-stroke,
.button-text-small {
    /* hook for shared states (focus-visible / disabled). Empty by design. */
}

.button-primary:focus,
.button-primary-small:focus,
.button-secondary:focus,
.button-secondary-small:focus,
.button-error:focus,
.button-error-small:focus,
.button-warning-small:focus,
.button-close:focus,
.button-back:focus,
.button-icon:focus,
.button-link:focus,
.button-svg-icon:focus,
.button-svg-icon-stroke:focus,
.button-text-small:focus {
    outline: none;
}

/* Keyboard-only focus ring (не показывается при click). */
.button-primary:focus-visible,
.button-primary-small:focus-visible,
.button-secondary:focus-visible,
.button-secondary-small:focus-visible,
.button-error:focus-visible,
.button-error-small:focus-visible,
.button-warning-small:focus-visible,
.button-close:focus-visible,
.button-back:focus-visible,
.button-icon:focus-visible,
.button-link:focus-visible,
.button-svg-icon:focus-visible,
.button-svg-icon-stroke:focus-visible,
.button-text-small:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
}

/* Disabled state — единый для всех кнопок kit'а. */
.button-primary:disabled,
.button-primary-small:disabled,
.button-secondary:disabled,
.button-secondary-small:disabled,
.button-error:disabled,
.button-error-small:disabled,
.button-warning-small:disabled,
.button-close:disabled,
.button-back:disabled,
.button-icon:disabled,
.button-link:disabled,
.button-svg-icon:disabled,
.button-svg-icon-stroke:disabled,
.button-text-small:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
}

@layer components {
.modal-content {
    color: white;
    background-color: #181A20;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.modal-header,
.modal-footer {
    border-color: #6c757d;
}

/* Dark‐mode form controls inside any .modal-content */
.modal-content .form-control {
    background-color: #181A20;
    border-color: #495057;
    color: #cdcdcd;
}

/* Placeholder text */
.modal-content .form-control::placeholder {
    color: #393939; /* lighter gray */
    opacity: 1; /* ensure full visibility */
}

/* For older WebKit browsers */
.modal-content .form-control::-webkit-input-placeholder {
    color: #393939;
}

.modal-content .form-control:-ms-input-placeholder {
    color: #393939;
}

.modal-content .form-control::-ms-input-placeholder {
    color: #393939;
}}

@layer components {
.dyor-switch {
    /* —— CONFIGURABLE VARS —— */
    --switch-width: 30px;
    --switch-height: 15px;
    --knob-size: 13px;
    --knob-offset: 1px;
    /* ———————————————— */

    position: relative;
    display: inline-block;
    width: var(--switch-width);
    height: var(--switch-height);
}

.dyor-switch-container {
    display: inline-flex;
    align-items: center;
}

.dyor-switch-text {
    margin-right: 0.5em; /* space between text and switch */
    user-select: none;
    font-size: 0.9em;
    color: var(--text-primary);
}

.dyor-switch .dyor-switch-input {
    /* hide the native checkbox */
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
}

.dyor-switch .dyor-switch-label {
    /* the track */
    display: block;
    width: 100%;
    height: 100%;
    background-color: #6c757d;
    border-radius: calc(var(--switch-height) / 2);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dyor-switch .dyor-switch-label::before {
    /* the knob */
    content: "";
    position: absolute;
    width: var(--knob-size);
    height: var(--knob-size);
    left: var(--knob-offset);
    top: var(--knob-offset);
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

/* checked = active state */
.dyor-switch .dyor-switch-input:checked ~ .dyor-switch-label {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.dyor-switch .dyor-switch-input:checked ~ .dyor-switch-label::before {
    transform: translateX(calc(var(--switch-width) - var(--knob-size) - 2 * var(--knob-offset)));
}}

@layer components {
.auth-error-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(24, 26, 32, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.auth-error-dialog {
    background-color: var(--bg-darker, #12151A);
    border: 1px solid var(--border-color, #2B3139);
    border-radius: 12px;
    padding: 32px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease-out;
}

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

.auth-error-title {
    color: var(--negative, #FF5E5E);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-error-message {
    color: var(--text-primary, #ECF5FF);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.auth-error-warning {
    background-color: rgba(255, 165, 0, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.auth-error-warning > div {
    color: var(--text-primary, #ECF5FF);
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
}

.auth-error-warning-link {
    color: var(--accent-primary, #3AFFA3);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.auth-error-warning-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.auth-error-details {
    margin-bottom: 24px;
}

.auth-error-details summary {
    color: var(--text-secondary, #B0BEC5);
    font-size: 14px;
    cursor: pointer;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    user-select: none;
    transition: background-color 0.2s;
}

.auth-error-details summary:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.auth-error-details-content {
    color: var(--text-secondary, #B0BEC5);
    font-size: 13px;
    font-family: 'Courier New', monospace;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color, #2B3139);
    border-radius: 6px;
    padding: 16px;
    margin-top: 12px;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 200px;
    overflow-y: auto;
}

.auth-error-copy-button {
    margin-top: 12px;
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary, #ECF5FF);
    border: 1px solid var(--border-color, #2B3139);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.auth-error-copy-button:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.auth-error-copy-button.copied {
    background-color: rgba(58, 255, 163, 0.2);
    border-color: var(--accent-primary, #3AFFA3);
    color: var(--accent-primary, #3AFFA3);
}

.auth-error-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.auth-error-actions button {
    padding: 12px 24px;
    font-size: 15px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-weight: 500;
}

@media (max-width: 600px) {
    .auth-error-dialog {
        padding: 24px;
        width: 95%;
    }

    .auth-error-title {
        font-size: 20px;
    }

    .auth-error-message {
        font-size: 14px;
    }

    .auth-error-actions {
        flex-direction: column;
    }

    .auth-error-actions button {
        width: 100%;
    }
}
}

.slow-request-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.slow-request-modal {
    background: var(--bg-table);
    border-radius: var(--radius-lg);
    max-width: 440px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slowRequestSlideIn 0.3s ease-out;
}

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

.slow-request-modal-header {
    padding: var(--space-6) var(--space-6) var(--space-4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.slow-request-modal-header h3 {
    margin: 0;
    font-size: var(--font-h4-desktop);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-2-5);
}

.slow-request-modal-header h3::before {
    content: "⚠️";
    font-size: var(--font-h3-desktop);
}

.slow-request-modal-body {
    padding: var(--space-6);
    /* stylelint-disable-next-line color-no-hex, scale-unlimited/declaration-strict-value */
    color: #B8C5D6;
    line-height: 1.6;
}

.slow-request-modal-body p {
    margin: 0 0 var(--space-3) 0;
}

.slow-request-modal-body p:last-child {
    margin-bottom: 0;
    color: var(--text-primary);
    font-weight: var(--font-weight-medium);
}

.slow-request-modal-actions {
    padding: var(--space-4) var(--space-6) var(--space-6);
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
}

.slow-request-btn {
    padding: var(--space-2-5) var(--space-5);
    border-radius: var(--radius-md);
    font-size: var(--font-small-desktop);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all var(--duration-base);
    border: none;
    outline: none;
}

.slow-request-btn-primary {
    /* stylelint-disable-next-line color-no-hex, scale-unlimited/declaration-strict-value */
    background: #3B82F6;
    color: white;
}

.slow-request-btn-primary:hover {
    /* stylelint-disable-next-line color-no-hex, scale-unlimited/declaration-strict-value */
    background: #2563EB;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.slow-request-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.slow-request-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

* {
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

body {
    margin: 0;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: var(--font-body);
}

.login-wrapper {
    display: flex;
    flex-direction: column;
    align-items: start;
    width: 70vw;
    width: 70dvw;
    padding: 1rem;
    box-sizing: border-box;
}

.logo {
    align-self: center;
}

img {
    width: 100%;
    max-width: 281px;
    height: auto;
}

.login-text {
    text-align: left;
    margin-bottom: var(--space-5);
}

.login-text h1 {
    font-size: var(--font-h2-desktop);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-2-5);
}

.login-text p {
    font-size: var(--font-body-desktop);
    color: var(--text-secondary);
    margin: 0;
}

.submit-button {
    width: 100%;
    border-radius: var(--radius-md);
    padding: var(--space-3-5) var(--space-4);
    margin-top: var(--space-6);
    font-size: var(--font-body-desktop);
    background-color: var(--accent-primary);
    color: var(--bg-forest-light);
    font-family: var(--font-body);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    border: solid 1px;
    transition: var(--duration-slow);
}

.register {
    color: var(--text-primary);
    margin-top: var(--space-8);
    font-size: var(--font-small-desktop);
    text-align: left;
}

.register a {
    color: var(--accent-primary);
}

.form-row {
    display: flex;
    gap: var(--space-5);
}

.form-row .form-group {
    flex: 1;
}

@media (hover: hover) and (pointer: fine) {
    .submit-button:hover {
        background-color: rgba(21, 47, 35, 0);
        color: var(--text-primary);
        border: solid 1px var(--border-color);
    }
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .login-wrapper {
        padding: var(--space-4);
        width: 95vw;
        width: 95dvw;
    }

    .login-text h1 {
        font-size: var(--font-h2-desktop);
    }

    .login-text p {
        font-size: var(--font-small-desktop);
    }

    .submit-button {
        font-size: var(--font-body-desktop);
        padding: var(--space-3) var(--space-4);
    }
}

.password-strength {
    display: none;
    align-items: center;
    gap: var(--space-2-5);
    margin-top: var(--space-2);
}

.strength-bar {
    flex: 1;
    height: 4px;
    /* stylelint-disable-next-line color-no-hex, scale-unlimited/declaration-strict-value */
    background-color: #2D2D2D;
    border-radius: var(--radius-xs);
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: width var(--duration-slow), background-color var(--duration-slow);
    border-radius: var(--radius-xs);
}

.strength-fill.weak {
    background-color: var(--negative);
}

.strength-fill.medium {
    background-color: var(--warning);
}

.strength-fill.strong {
    background-color: var(--accent-primary);
}

.strength-text {
    font-size: var(--font-2xs-desktop);
    min-width: 60px;
    text-align: right;
}

.strength-text.weak {
    color: var(--negative);
}

.strength-text.medium {
    color: var(--warning);
}

.strength-text.strong {
    color: var(--accent-primary);
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #454545 inset !important;
    box-shadow: 0 0 0 1000px #454545 inset !important;
    -webkit-text-fill-color: #9CA3AF !important;
    transition: background-color 5000s ease-in-out 0s;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0;
    width: 100%;
}

.input-wrapper i {
    position: absolute;
    left: 14px;
    color: #9CA3AF;
    font-size: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.input-wrapper .clear-icon {
    position: absolute;
    right: 8px;
    font-size: 16px;
    color: #9CA3AF;
    cursor: pointer;
    padding: 10px;
    transition: color 0.3s ease;
}

.input-wrapper .toggle-password {
    padding-left: 10px;
    padding-right: 10px;
    align-content: center;
    height: 100%;
    top: 50%;
    cursor: pointer;
    left: auto; /* cancel the left:14px */
    right: 45px; /* hug the right edge */
}

@media (hover: hover) and (pointer: fine) {
    .input-wrapper .clear-icon:hover,
    .input-wrapper .toggle-password:hover {
        color: #3AFFA3;
    }
}
form {
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group input {
    width: 100%;
    background-color: #454545;
    border: solid 1px #4B5563;
    border-radius: 8px;
    padding: 14px 18px 14px 40px;
    font-size: 16px;
    color: #9CA3AF;
    outline: none;
    box-sizing: border-box;
    caret-color: #ffffff;
}

.form-group input:focus {
    border-color: #ACACAC;
    color: #9CA3AF;
}

form label {
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    font-family: "Onest", sans-serif;
}
/* Container: stacked column */
.toast-container-v2 {
    position: fixed;
    top: 20px;
    right: 20px;
    left: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    overflow-y: auto;
    gap: 10px;
}

/* Base toast */
.toast-v2 {
    position: relative;
    background-color: #333;
    color: #fff;
    padding: 16px;
    height: auto;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.5s;
    overflow: hidden; /* for progress bar */
}

/* Types */
.toast-success-v2 {
    background-color: #4CAF50;
}

.toast-error-v2 {
    background-color: #f44336;
}

.toast-warning-v2 {
    background-color: #ff9800;
}

.toast-info-v2 {
    background-color: #2196f3;
}

/* Inner message */
.toast-message-v2 {
    display: block;
}

/* Progress bar */
.toast-progress-v2 {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.7);
    width: 100%;
    transition: width linear;
    /* transition-duration will be inherited from inline style duration */
}

/*# sourceMappingURL=register.f47d35cf.css.map*/