/* ---- Site-wide look ------------------------------------------------------
   The card language of the coin page board, carried over to every page:
   a soft grey canvas, white cards with a hairline border and a long soft
   shadow, ink for the primary actions, dark surfaces for the forms. Loaded
   after site.css, so it only restyles; the layout stays in site.css. */
:root {
    --ui-bg: #f3f5f9;
    --ui-surface: #fff;
    --ui-ink: #0f172a;
    --ui-ink-soft: #1e293b;
    --ui-muted: #64748b;
    --ui-faint: #94a3b8;
    --ui-line: #e6e9ef;
    --ui-chip: #f1f5f9;
    --ui-hover: #f8fafc;
    --ui-buy: #16a34a;
    --ui-buy-soft: rgba(22, 163, 74, 0.09);
    --ui-sell: #dc2626;
    --ui-sell-soft: rgba(220, 38, 38, 0.08);
    --ui-accent: #f7931a;
    --ui-radius: 18px;
    --ui-radius-sm: 12px;
    --ui-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 30px -12px rgba(15, 23, 42, 0.12);
    --ui-shadow-lift: 0 2px 4px rgba(15, 23, 42, 0.05), 0 18px 40px -16px rgba(15, 23, 42, 0.22);
    --ui-dark: #0b1220;
    --ui-dark-line: rgba(255, 255, 255, 0.1);
    --ui-dark-field: rgba(255, 255, 255, 0.05);
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body,
.tm-page {
    background:
        radial-gradient(1200px 500px at 85% -10%, rgba(247, 147, 26, 0.07), transparent 60%),
        radial-gradient(900px 420px at -10% 10%, rgba(39, 117, 202, 0.06), transparent 60%),
        var(--ui-bg);
    color: var(--ui-ink);
}

.tm-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.tm-page > .uk-section-secondary:last-child {
    margin-top: auto;
}

.uk-section-default {
    background: transparent;
}

.uk-section {
    padding-top: 48px;
    padding-bottom: 56px;
}

@media (max-width: 600px) {
    .uk-section {
        padding-top: 20px;
        padding-bottom: 40px;
    }

    .uk-container {
        padding-left: 14px;
        padding-right: 14px;
    }
}

::selection {
    background: rgba(247, 147, 26, 0.25);
}

:focus-visible {
    outline: 2px solid var(--ui-accent);
    outline-offset: 2px;
}

/* ---- Header: frosted white bar ------------------------------------------- */
.tm-header .uk-navbar-container,
.tm-header-mobile .uk-navbar-container {
    background: rgba(255, 255, 255, 0.78);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.tm-header .uk-navbar,
.tm-header-mobile .uk-navbar {
    min-height: 64px;
}

.tm-header .uk-navbar-item,
.tm-header .uk-navbar-nav > li > a,
.tm-header-mobile .uk-navbar-item,
.tm-header-mobile .uk-navbar-toggle {
    min-height: 64px;
}

.uk-logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ui-ink);
}

.uk-logo:hover {
    color: var(--ui-ink);
}

.tm-header .uk-navbar-nav {
    gap: 2px;
}

.tm-header .uk-navbar-nav > li > a {
    min-height: 0;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ui-muted);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.tm-header .uk-navbar-nav > li > a::before,
.tm-header .uk-navbar-nav > li > a::after {
    display: none;
}

.tm-header .uk-navbar-nav > li > a:hover {
    background: var(--ui-chip);
    color: var(--ui-ink);
}

.tm-header .uk-navbar-nav > li.uk-active > a {
    background: var(--ui-ink);
    color: #fff;
}

.tm-header-mobile .uk-navbar-toggle {
    color: var(--ui-ink);
}

/* Full-screen mobile menu: big tappable rows. */
#tm-dialog-mobile .uk-modal-dialog {
    background: var(--ui-surface);
}

#tm-dialog-mobile .uk-nav-primary > li > a {
    padding: 10px 0;
    font-size: 22px;
    font-weight: 600;
    color: var(--ui-muted);
}

#tm-dialog-mobile .uk-nav-primary > li.uk-active > a {
    color: var(--ui-ink);
}

/* ---- Coin switcher: light pill bar under the header ---------------------- */
.coin-switcher {
    background: transparent;
    border-bottom: 0;
}

.coin-switcher__inner {
    padding-top: 14px;
    padding-bottom: 0;
}

.coin-switcher__coins {
    gap: 6px;
    padding: 4px;
    border: 1px solid var(--ui-line);
    border-radius: 999px;
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow);
    flex: 0 1 auto;
    scrollbar-width: none;
}

.coin-switcher__coins::-webkit-scrollbar {
    display: none;
}

.coin-switcher__pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 6px 6px;
    background: transparent;
    color: var(--ui-muted);
}

.coin-switcher__pill:hover {
    background: var(--ui-chip);
    color: var(--ui-ink);
}

.coin-switcher__pill.is-active {
    background: var(--ui-ink);
    color: #fff;
}

.coin-switcher__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.coin-switcher__cabinet {
    margin-left: auto;
    padding: 9px 16px;
    border: 1px solid var(--ui-line);
    background: var(--ui-surface);
    color: var(--ui-ink);
    box-shadow: var(--ui-shadow);
}

.coin-switcher__cabinet:hover {
    background: var(--ui-ink);
    border-color: var(--ui-ink);
    color: #fff;
}

.coin-switcher__badge {
    color: #fff;
}

.chat-notice {
    max-width: 1200px;
    margin: 12px auto 0;
    border-radius: 999px;
    box-shadow: 0 10px 24px -10px rgba(234, 88, 12, 0.6);
}

@media (max-width: 1240px) {
    .chat-notice {
        margin-left: 16px;
        margin-right: 16px;
    }
}

@media (max-width: 600px) {
    .coin-switcher__inner {
        gap: 8px;
        padding: 10px 14px 0;
    }

    .coin-switcher__pill {
        padding: 5px 10px 5px 5px;
    }

    .coin-switcher__cabinet {
        padding: 9px 11px;
    }

    .chat-notice {
        margin: 10px 14px 0;
        padding: 10px 14px;
        border-radius: 14px;
        font-size: 13px;
        text-align: left;
    }
}

/* ---- Footer ---------------------------------------------------------------- */
.tm-page > .uk-section-secondary {
    padding: 28px 0;
    background: var(--ui-dark);
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
}

.tm-page > .uk-section-secondary p {
    margin: 0;
    text-align: center;
}

/* Room for the fixed prev/next arrows on coin pages. */
body:has(.coin-nav) .tm-page > .uk-section-secondary {
    padding-bottom: 96px;
}

/* ---- Prev/next coin arrows: frosted glass ----------------------------------- */
.coin-nav__btn {
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: var(--ui-ink);
    box-shadow: var(--ui-shadow-lift);
}

.coin-nav__btn:hover {
    background: var(--ui-ink);
    color: #fff;
}

/* ---- Page titles ------------------------------------------------------------ */
.uk-article-title,
.cabinet__title,
.pool__title {
    font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--ui-ink);
}

.support-page .uk-article-title {
    text-align: center;
}

.support-page__intro {
    color: var(--ui-muted);
    opacity: 1;
}

/* ---- Dark form surfaces: popups and the support/login cards ---------------- */
.modal {
    background-color: rgba(15, 23, 42, 0.5);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.modal__box,
.support-card {
    background: linear-gradient(180deg, #111a2e, var(--ui-dark));
    border: 1px solid var(--ui-dark-line);
    border-radius: 24px;
    box-shadow: 0 30px 80px -20px rgba(2, 6, 23, 0.6);
}

.modal__box {
    padding: 28px 20px 28px;
    transform: translateY(12px) scale(0.98);
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal.is-visible .modal__box {
    transform: none;
}

.modal__title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.modal__close {
    border-color: var(--ui-dark-line);
    background: rgba(255, 255, 255, 0.06);
}

.modal__close:hover,
.modal__close:focus-visible {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
}

.support-card {
    padding: 32px 24px;
}

.input,
.form-grid .input {
    border: 1px solid var(--ui-dark-line);
    border-radius: 12px;
    background-color: var(--ui-dark-field);
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus,
.form-grid .input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
}

.input::placeholder {
    opacity: 0.4;
}

.input--locked {
    opacity: 1;
    border-color: transparent;
    background-color: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.6);
}

.field__caption {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.5;
}

/* The currency picker looks like the read-only fields next to it, plus a chevron. */
.input--select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 30px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
}

.input--select option {
    background: var(--ui-dark);
    color: #fff;
}

.trade {
    border-color: var(--ui-dark-line);
    border-radius: 16px;
    background-color: rgba(255, 255, 255, 0.025);
}

.trade.is-ready {
    border-color: rgba(34, 197, 94, 0.55);
    background-color: rgba(34, 197, 94, 0.06);
}

.trade__currency-hint {
    margin: -4px 0 0;
    font-size: 11.5px;
    text-align: center;
    opacity: 0.5;
}

.proposal-switch {
    border-color: var(--ui-dark-line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.proposal-switch__option span {
    border-radius: 9px;
}

.proposal-switch__option input:checked + span {
    background-color: #fff;
    color: var(--ui-ink);
}

.file-field {
    border-color: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
}

/* Slide-to-submit: a calm pill track with a white knob. */
.slider-track {
    width: 240px;
    height: 52px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--ui-dark-line);
    box-shadow: none;
    font-family: inherit;
}

.slider-track:after {
    left: 64px;
    line-height: 50px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
}

.slider-handle {
    top: 3px;
    left: 3px;
    width: 44px;
    height: 44px;
    border: 0;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center no-repeat;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.support-form__submit,
.submit {
    border-radius: 12px;
    background-color: #fff;
    color: var(--ui-ink);
    font-weight: 600;
    font-size: 15px;
    padding: 12px 28px;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.support-form__submit:hover,
.submit:hover {
    background-color: #e2e8f0;
    transform: translateY(-1px);
}

/* Phone: popups become bottom sheets that use the full width. */
@media (max-width: 600px) {
    .modal__box {
        width: 100%;
        margin: auto 0 0;
        padding: 22px 6px 28px;
        padding-bottom: max(28px, env(safe-area-inset-bottom));
        border-radius: 24px 24px 0 0;
        border-bottom: 0;
        transform: translateY(40px);
    }

    .modal__box::before {
        content: "";
        position: absolute;
        top: 8px;
        left: 50%;
        width: 40px;
        height: 4px;
        margin-left: -20px;
        border-radius: 4px;
        background: rgba(255, 255, 255, 0.2);
    }

    .modal__title {
        font-size: 1.3rem;
    }

    .form-row--info {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr);
    }

    .support-card {
        padding: 24px 6px;
        border-radius: 20px;
    }
}

/* ---- Legal pages: a readable white sheet ------------------------------------ */
.uk-article:not(.support-page) {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 48px;
    background: var(--ui-surface);
    border: 1px solid var(--ui-line);
    border-radius: 24px;
    box-shadow: var(--ui-shadow);
    font-size: 15px;
    line-height: 1.7;
    color: #334155;
}

.uk-article:not(.support-page) h2 {
    margin: 32px 0 12px;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.35;
    color: var(--ui-ink);
}

.uk-article:not(.support-page) h2 strong {
    font-weight: inherit;
}

@media (max-width: 600px) {
    .uk-article:not(.support-page) {
        padding: 24px 18px;
        border-radius: 18px;
        font-size: 14.5px;
        overflow-wrap: anywhere;
    }
}

/* ---- Dividenden-Pool ---------------------------------------------------------- */
.pool__eyebrow {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(247, 147, 26, 0.12);
    font-size: 11px;
}

.pool__lead {
    color: var(--ui-muted);
    opacity: 1;
}

.pool-card,
.pool-shares__item,
.pool-steps__item,
.pool-join {
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius);
    background-color: var(--ui-surface);
    box-shadow: var(--ui-shadow);
}

.pool-stat--mine {
    border-color: transparent;
    background: linear-gradient(160deg, #1b2740, var(--ui-dark));
}

.pool-stat__value {
    letter-spacing: -0.02em;
}

.pool-chart__pie {
    filter: drop-shadow(0 10px 20px rgba(15, 23, 42, 0.12));
}

.pool-legend__item {
    border-bottom-color: var(--ui-chip);
}

.pool-shares__item {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pool-shares__item:hover {
    transform: translateY(-2px);
    box-shadow: var(--ui-shadow-lift);
}

.pool-steps__num {
    background: var(--ui-ink);
}

.pool-btn,
.cabinet-button--accept {
    border-radius: 12px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    box-shadow: 0 8px 18px -8px rgba(22, 163, 74, 0.6);
}

.pool-btn:hover,
.cabinet-button--accept:hover {
    background: linear-gradient(135deg, #22c55e, #15803d);
    color: #fff;
}

.pool-join__input {
    border-color: var(--ui-line);
    border-radius: 12px;
    background: var(--ui-hover);
}

.pool-join__input:focus {
    outline: none;
    border-color: var(--ui-ink);
    background: #fff;
}

@media (max-width: 600px) {
    .pool__head {
        margin-bottom: 20px;
    }

    .pool__grid,
    .pool__side {
        gap: 12px;
    }

    .pool-shares {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .pool-section {
        margin-top: 28px;
    }

    .pool-join .pool-btn {
        justify-self: stretch;
        text-align: center;
    }

    .pool-join__input {
        max-width: none;
    }
}

/* ---- Kabinett ------------------------------------------------------------------ */
.cabinet-tabs {
    border: 1px solid var(--ui-line);
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow);
}

.cabinet-tabs__item {
    color: var(--ui-muted);
}

.cabinet-tabs__item.is-active {
    background: var(--ui-ink);
}

.cabinet-table-wrap,
.cabinet-chat-box {
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius);
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow);
}

.cabinet-table th {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ui-faint);
}

.cabinet-table td {
    font-variant-numeric: tabular-nums;
}

.cabinet-chat {
    border: 1px solid var(--ui-line);
    border-radius: 16px;
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cabinet-chat:hover {
    background: var(--ui-surface);
    transform: translateY(-1px);
    box-shadow: var(--ui-shadow-lift);
}

.cabinet-chat.has-unread {
    background: linear-gradient(90deg, rgba(234, 88, 12, 0.07), var(--ui-surface) 60%);
}

.cabinet-message--theirs {
    background: var(--ui-chip);
}

.cabinet-message--mine {
    background: var(--ui-ink);
}

.cabinet-compose textarea {
    border-color: var(--ui-line);
    border-radius: 12px;
    background: var(--ui-hover);
}

.cabinet-compose textarea:focus {
    border-color: var(--ui-ink);
    background: #fff;
}

.cabinet-button {
    border-radius: 12px;
    background: var(--ui-ink);
}

.cabinet-button:hover {
    background: var(--ui-ink-soft);
}

.cabinet-button--decline {
    border-color: var(--ui-line);
    background: var(--ui-surface);
    color: var(--ui-ink);
}

.cabinet-flash {
    border-radius: 12px;
}

@media (max-width: 600px) {
    .cabinet-head {
        flex-direction: column;
        align-items: stretch;
    }

    .cabinet-tabs__item {
        flex: 1 1 0;
        justify-content: center;
        padding: 8px 10px;
    }

    .cabinet-logout {
        align-self: flex-end;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
