/* ==========
   Design tokens
   ========== */

:root {
    --bg-body: #050013;
    --bg-elevated: #0b021f;
    --bg-elevated-soft: #12072c;
    --accent: #8b5cf6;
    --accent-soft: rgba(139, 92, 246, 0.15);
    --accent-strong: #a855f7;
    --border-subtle: rgba(148, 163, 184, 0.3);
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --danger: #f97373;
    --success: #4ade80;
    --refunded: #fddc7a;
    --radius-lg: 16px;
    --radius-md: 10px;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.85);
    --transition-fast: 160ms ease-out;
    --nav-height: 64px;
}

/* ==========
   Global
   ========== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
    color: var(--text-main);
    background: #000000;
}

body::before {
    /* subtle starfield */
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
            radial-gradient(1px 1px at 10% 20%, rgba(255, 255, 255, 0.35), transparent),
            radial-gradient(1px 1px at 80% 30%, rgba(255, 255, 255, 0.35), transparent),
            radial-gradient(1.5px 1.5px at 50% 70%, rgba(255, 255, 255, 0.3), transparent),
            radial-gradient(1px 1px at 25% 60%, rgba(255, 255, 255, 0.28), transparent);
    opacity: 0.35;
    z-index: -1;
}

a {
    color: inherit;
}

main {
    display: block;
}

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
            radial-gradient(circle at top, rgba(139, 92, 246, 0.25), transparent 55%),
            radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.18), transparent 55%),
            radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.12), transparent 55%),
            #050013;
}

.theme-toggle {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.theme-toggle:checked ~ .page-shell {
    background: #f3f4f6;
    --bg-elevated: #ffffff;
    --bg-elevated-soft: #f3f4f6;
    --border-subtle: rgba(148, 163, 184, 0.6);
    --text-main: #0f172a;
    --text-muted: #6b7280;
}

.theme-toggle:checked ~ .page-shell .navbar {
    background: rgba(248, 250, 252, 0.9);
    border-bottom-color: rgba(148, 163, 184, 0.5);
}

.theme-toggle:checked ~ .page-shell .nav-menu a {
    color: #4b5563;
}

.theme-toggle:checked ~ .page-shell .nav-menu a.active {
    color: #111827;
}

.theme-toggle:checked ~ .page-shell .panel {
    background: #ffffff;
}

.theme-toggle:checked ~ .page-shell .panel-section {
    background: #f3f4f6;
}

.theme-toggle:checked ~ .page-shell .feature-card {
    background: #f9fafb;
}

.theme-toggle:checked ~ .page-shell .feature-icon {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.9);
}

.theme-toggle:checked ~ .page-shell .panel-section-title {
    color: #111827;
}

.theme-toggle:checked ~ .page-shell input[type="text"],
.theme-toggle:checked ~ .page-shell input[type="email"],
.theme-toggle:checked ~ .page-shell input[type="password"],
.theme-toggle:checked ~ .page-shell input[type="number"],
.theme-toggle:checked ~ .page-shell select {
    background: #ffffff;
    color: #111827;
    border-color: rgba(148, 163, 184, 0.9);
    box-shadow: none;
}

.theme-toggle:checked ~ .page-shell input::placeholder {
    color: #9ca3af;
}

.theme-toggle:checked ~ .page-shell input[readonly] {
    background: #f9fafb;
    color: #6b7280;
}

.theme-toggle:checked ~ .page-shell input:focus,
.theme-toggle:checked ~ .page-shell select:focus {
    border-color: #8b5cf6;
    box-shadow: none;
    background: #ffffff;
}

.theme-toggle-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--text-muted);
    background: rgba(15, 23, 42, 0.9);
}

.theme-toggle-icon {
    font-size: 1rem;
    opacity: 0.5;
}

.theme-toggle-icon.is-active {
    opacity: 1;
}

.theme-toggle-label {
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.theme-toggle:checked ~ .page-shell .theme-toggle-switch {
    background: #f9fafb;
    color: #4b5563;
}

.theme-toggle:checked ~ .page-shell .theme-toggle-icon.moon {
    opacity: 0.4;
}

.theme-toggle:checked ~ .page-shell .theme-toggle-icon.sun {
    opacity: 1;
}

.theme-toggle:checked ~ .page-shell .pill-label {
    background: #f9fafb;
    border-color: rgba(148, 163, 184, 0.6);
    color: #6b7280;
}

.theme-toggle:checked ~ .page-shell .btn-secondary {
    background: #f9fafb;
    border-color: rgba(148, 163, 184, 0.7);
    color: #0f172a;
}

.theme-toggle:checked ~ .page-shell .btn-secondary:hover {
    background: #f3f4f6;
}

.theme-toggle:checked ~ .page-shell .quote-expired-cta {
    color: #fff;
}

.theme-toggle:checked ~ .page-shell .quote-expired-cta:hover {
    background: var(--accent-strong);
}

/* Remove all shadows in light theme */
.theme-toggle:checked ~ .page-shell .panel {
    box-shadow: none;
}

.theme-toggle:checked ~ .page-shell .navbar .nav-menu a {
    box-shadow: none;
}

.theme-toggle:checked ~ .page-shell button,
.theme-toggle:checked ~ .page-shell input[type="submit"] {
    box-shadow: none;
}

.theme-toggle:checked ~ .page-shell button:hover,
.theme-toggle:checked ~ .page-shell input[type="submit"]:hover {
    box-shadow: none;
}

.theme-toggle:checked ~ .page-shell button:active,
.theme-toggle:checked ~ .page-shell input[type="submit"]:active {
    box-shadow: none;
}

.theme-toggle:checked ~ .page-shell input:focus,
.theme-toggle:checked ~ .page-shell select:focus {
    box-shadow: none;
}

.theme-toggle:checked ~ .page-shell .logo {
    box-shadow: none;
}

.page-content {
    flex: 1;
    padding: 32px 16px 40px;
    display: flex;
    justify-content: center;
}

.page-inner {
    width: 100%;
    max-width: 1040px;
}

@media (min-width: 768px) {
    .page-content {
        padding: 40px 32px 56px;
    }
}

/* ==========
   Typography
   ========== */

h1,
h2,
h3,
h4 {
    color: var(--text-main);
    letter-spacing: 0.02em;
    margin-top: 0;
}

p {
    color: var(--text-muted);
    line-height: 1.6;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 6px;
    padding: 2px 6px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: #e5e7eb;
}

pre {
    margin: 0 0 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.4);
    overflow-x: auto;
    font-size: 0.9rem;
}

pre code {
    padding: 0;
    border: none;
    background: transparent;
}

hr {
    border: none;
    border-top: 1px dashed rgba(148, 163, 184, 0.35);
    margin: 24px 0;
}

ul {
    padding-left: 20px;
}

/* ==========
   Navbar
   ========== */

.navbar {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(18px);
    background: linear-gradient(
            to bottom,
            rgba(5, 6, 24, 0.96),
            rgba(5, 6, 24, 0.88),
            transparent
    );
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.nav-container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: radial-gradient(circle at 20% 0%, #f9a8d4, #8b5cf6);
    font-size: 0.95rem;
}

.logo-text {
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.86rem;
    color: #f9fafb;
}


.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    text-decoration: none;
    color: var(--text-muted);
    border: 1px solid transparent;
    transition: background var(--transition-fast), color var(--transition-fast),
    border-color var(--transition-fast), transform var(--transition-fast);
}

.nav-menu a:hover {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.45);
    color: #e5e7eb;
    transform: translateY(-1px);
}

.nav-menu a.active {
    background: radial-gradient(circle at 0% 0%, #f97316, transparent 55%),
    radial-gradient(circle at 100% 0%, #8b5cf6, transparent 55%);
    color: #f9fafb;
    border-color: rgba(249, 250, 251, 0.18);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.75);
}

.theme-toggle:checked ~ .page-shell .navbar {
    background: #ffffff;
    backdrop-filter: none;
    box-shadow: none;
    border-bottom: 1px solid rgba(148, 163, 184, 0.4);
}

.theme-toggle:checked ~ .page-shell .nav-menu a.active {
    box-shadow: none;
    background: rgba(15, 23, 42, 0.04);
    color: #0f172a;
}

/* Light theme: flat dark logo */
.theme-toggle:checked ~ .page-shell .logo-icon {
    background: #0f172a;
    color: #ffffff;
    box-shadow: none;
}

.theme-toggle:checked ~ .page-shell .logo-text {
    color: #0f172a;
}

/* Burger (mobile) */

.burger-toggle {
    display: none;
}

.burger-menu {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 6px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.9);
}

.burger-menu span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #e5e7eb;
    transition: transform 160ms ease-out, opacity 160ms ease-out;
}

.burger-overlay {
    display: none;
}

@media (max-width: 720px) {
    .nav-container {
        padding-inline: 14px;
    }

    .burger-menu {
        display: inline-flex;
    }

    .nav-menu {
        position: fixed;
        inset: calc(var(--nav-height) + 8px) 12px auto;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 10px;
        border-radius: 14px;
        background: rgba(5, 6, 24, 0.98);
        border: 1px solid rgba(148, 163, 184, 0.45);
        box-shadow: var(--shadow-soft);
        transform-origin: top;
        transform: scaleY(0.8);
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--transition-fast), transform var(--transition-fast);
    }

    .nav-menu a {
        width: 100%;
        justify-content: flex-start;
    }

    .burger-overlay {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.55);
        backdrop-filter: blur(4px);
        display: block;
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--transition-fast);
    }

    .burger-toggle:checked ~ .burger-menu span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .burger-toggle:checked ~ .burger-menu span:nth-child(2) {
        opacity: 0;
    }

    .burger-toggle:checked ~ .burger-menu span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .burger-toggle:checked ~ .burger-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .burger-toggle:checked ~ .nav-menu {
        opacity: 1;
        transform: scaleY(1);
        pointer-events: auto;
    }
}

/* ==========
   Cards & layout helpers
   ========== */

.swap-layout > header,
.swap-layout > section {
    margin: 0;
}

/* Panels must not add spacing outside themselves */
.panel {
    margin: 0;
}

.panel {
    background: radial-gradient(circle at 0% 0%, rgba(248, 250, 252, 0.06), transparent 55%),
    radial-gradient(circle at 110% 20%, rgba(94, 234, 212, 0.08), transparent 60%),
    var(--bg-elevated);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    padding: 20px 18px 22px;
}

@media (min-width: 768px) {
    .panel {
        padding: 24px 24px 26px;
    }
}

.panel-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.panel-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.panel-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.hero-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.5;
    margin: 0;
    text-align: center;
    width: 100%;
}

.hero-features {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    text-align: center;
    width: 100%;
}

.theme-toggle:checked ~ .page-shell .hero-title {
    color: #0f172a;
}

.theme-toggle:checked ~ .page-shell .hero-features {
    color: #6b7280;
}


.panel-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 18px;
}

@media (max-width: 880px) {
    .panel-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
.swap-layout {
    display: flex;
    flex-direction: column;
    gap: 28px; /* ← choose ONE value, 24–32px works well */
}

.pill-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.6);
    color: var(--text-muted);
    margin-bottom: 12px;
}

.pill-label-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 0%, #4ade80, #22c55e);
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.meta-kv {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.meta-kv strong {
    color: #e5e7eb;
    font-weight: 500;
}

/* ==========
   Forms
   ========== */

form {
    margin: 0;
}

fieldset {
    border: none;
    padding: 0;
    margin: 0 0 16px;
}

legend {
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

label {
    display: block;
    font-size: 0.86rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
select {
    width: 100%;
    padding: 9px 11px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: rgba(15, 23, 42, 0.95);
    color: var(--text-main);
    font-size: 0.92rem;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast), transform var(--transition-fast);
}

input::placeholder {
    color: rgba(148, 163, 184, 0.7);
}

input[readonly] {
    background: rgba(15, 23, 42, 0.85);
    color: rgba(156, 163, 175, 0.95);
}

select {
    appearance: none;
    background-image:
            linear-gradient(45deg, transparent 50%, #9ca3af 50%),
            linear-gradient(135deg, #9ca3af 50%, transparent 50%);
    background-position:
            calc(100% - 14px) 50%,
            calc(100% - 9px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

input:focus,
select:focus {
    border-color: var(--accent-strong);
    box-shadow:
            0 0 0 1px rgba(248, 250, 252, 0.12),
            0 0 32px rgba(139, 92, 246, 0.6);
    background: rgba(15, 23, 42, 0.98);
    transform: translateY(-0.5px);
}

input[type="checkbox"] {
    width: auto;
    margin-right: 6px;
    accent-color: var(--accent-strong);
}

.form-row-inline {
    display: flex;
    gap: 10px;
}

.form-row-inline > * {
    flex: 1;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

/* ==========
   Buttons
   ========== */

button,
input[type="submit"] {
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: radial-gradient(circle at 0% 0%, rgba(248, 250, 252, 0.18), transparent 60%),
    radial-gradient(circle at 100% 0%, rgba(94, 234, 212, 0.18), transparent 60%),
    #020617;
    color: #e5e7eb;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 160ms ease-out, transform 160ms ease-out,
    box-shadow 160ms ease-out, border-color 160ms ease-out;
}

button:hover,
input[type="submit"]:hover {
    background: radial-gradient(circle at 0% 0%, rgba(248, 250, 252, 0.3), transparent 60%),
    radial-gradient(circle at 100% 0%, rgba(94, 234, 212, 0.24), transparent 60%),
    #020617;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.9);
    transform: translateY(-1px);
    border-color: rgba(248, 250, 252, 0.28);
}

button:active,
input[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.85);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.7);
}

.btn-secondary:hover {
    background: rgba(15, 23, 42, 0.98);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-danger {
    border-color: rgba(248, 113, 113, 0.8);
    background: radial-gradient(circle at 0% 0%, rgba(254, 226, 226, 0.25), transparent 55%),
    #450a0a;
}

.btn-danger:hover {
    border-color: rgba(248, 113, 113, 0.95);
    background: radial-gradient(circle at 0% 0%, rgba(254, 226, 226, 0.35), transparent 60%),
    #450a0a;
}

/* ==========
   Alerts
   ========== */

.alert {
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.84rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.alert-error {
    background: rgba(248, 113, 113, 0.09);
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.7);
}

.alert-success {
    background: rgba(52, 211, 153, 0.09);
    color: #bbf7d0;
    border: 1px solid rgba(52, 211, 153, 0.7);
}

.alert-indicator {
    width: 7px;
    height: 7px;
    border-radius: 999px;
}

.alert-error .alert-indicator {
    background: radial-gradient(circle at 0 0, #fecaca, #f97373);
}

.alert-success .alert-indicator {
    background: radial-gradient(circle at 0 0, #bbf7d0, #22c55e);
}

/* ==========
   Contact success / error modal
   ========== */
.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: none;
}
.contact-modal:not(.contact-modal-hidden) {
    pointer-events: auto;
}
.contact-modal[hidden],
.contact-modal-hidden {
    display: none !important;
}
.contact-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 0, 19, 0.82);
    cursor: pointer;
    text-indent: -9999px;
    display: block;
    pointer-events: auto;
}
.contact-modal-content {
    position: relative;
    z-index: 1;
    pointer-events: auto;
    text-align: center;
    background: radial-gradient(circle at 0% 0%, rgba(248, 250, 252, 0.06), transparent 55%),
                radial-gradient(circle at 110% 20%, rgba(94, 234, 212, 0.08), transparent 60%),
                var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-soft), 0 0 0 1px rgba(139, 92, 246, 0.12);
}
.contact-modal-message {
    margin: 0 0 24px;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.contact-modal-icon-error {
    background: rgba(248, 113, 113, 0.2);
    color: var(--danger);
}
.contact-modal.contact-modal-error .contact-modal-message {
    color: #fecaca;
}
.contact-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    text-decoration: none;
}
.contact-modal-close:hover {
    text-decoration: none;
}

/* Light theme: modal is sibling of page-shell */
.theme-toggle:checked ~ .contact-modal .contact-modal-overlay {
    background: rgba(15, 23, 42, 0.5);
}
.theme-toggle:checked ~ .contact-modal .contact-modal-content {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.5);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(148, 163, 184, 0.2);
}
.theme-toggle:checked ~ .contact-modal .contact-modal-message {
    color: #111827;
}
.theme-toggle:checked ~ .contact-modal .contact-modal-icon {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}
.theme-toggle:checked ~ .contact-modal .contact-modal-icon-error {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}
.theme-toggle:checked ~ .contact-modal.contact-modal-error .contact-modal-message {
    color: #b91c1c;
}
.theme-toggle:checked ~ .contact-modal .contact-modal-close {
    background: #f9fafb;
    border-color: rgba(148, 163, 184, 0.7);
    color: #0f172a;
}
.theme-toggle:checked ~ .contact-modal .contact-modal-close:hover {
    background: #f3f4f6;
}

/* ==========
   Swap grid: 2 columns + full-width destination
   ========== */
.swap-main form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.swap-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.swap-destination {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.swap-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
}

/* Each column (Send / Get) */
.swap-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Amount + coin inline */
.amount-coin-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px;
    gap: 10px;
    align-items: end;
}

.amount-coin-row fieldset {
    margin-bottom: 0;
}

/* Destination spans both columns */
.swap-destination {
    grid-column: 1 / -1;
    margin-top: 4px;
}

/* Mobile: stack everything */
@media (max-width: 880px) {
    .swap-grid {
        grid-template-columns: 1fr;
    }

    .amount-coin-row {
        grid-template-columns: 1fr;
    }
}

/* Index: send icon left, get icon right (no get amount) */
.swap-form-index .swap-grid-icons {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.swap-form-index .swap-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.swap-col-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.swap-col-send .swap-col-icon { color: var(--accent); }
.swap-col-get .swap-col-icon { color: var(--success); }

.swap-form-index .swap-destination {
    margin-top: 16px;
}

/* Quote page: summary row + form */
.quote-summary {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    padding: 20px;
    margin-bottom: 24px;
    border-radius: var(--radius-lg);
    background: var(--bg-elevated-soft);
    border: 1px solid var(--border-subtle);
}

.quote-side {
    text-align: center;
}

.quote-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: 0 auto 8px;
}

.quote-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.quote-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 4px 0 2px;
}

.quote-amount-get {
    color: #eab308;
}

.quote-network {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.quote-arrow-wrap {
    font-size: 1.2rem;
    color: var(--text-muted);
    opacity: 0.6;
}

.quote-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quote-form .form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

a.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

@media (max-width: 768px) {
    .quote-summary {
        grid-template-columns: 1fr;
    }
}

/* ==========
   /swap page only
   ========== */

.swap-page .swap-page-header .hero-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-main);
    margin: 0;
}

.swap-page .swap-page-header .hero-features {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.swap-page-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Quote expired state (same page, no redirect) */
.quote-expired-block {
    text-align: center;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.quote-expired-icon {
    font-size: 2.5rem;
    line-height: 1;
    opacity: 0.9;
    color: var(--text-muted);
}

.quote-expired-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.quote-expired-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
    max-width: 420px;
    line-height: 1.5;
}

.quote-expired-context {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.quote-expired-context strong {
    color: var(--text-main);
}

.quote-expired-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background var(--transition-fast);
    margin-top: 8px;
}

.quote-expired-cta:hover {
    background: var(--accent-strong);
}

.swap-page-summary {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-radius: var(--radius-lg);
    background: var(--bg-elevated-soft);
    border: 1px solid var(--border-subtle);
}

.swap-page-side {
    text-align: center;
}

.swap-page-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: 0 auto 8px;
}

.swap-page-send .swap-page-icon {
    color: var(--accent);
}

.swap-page-get .swap-page-icon {
    color: var(--success);
}

.swap-page-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.swap-page-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 4px 0 2px;
}

.swap-page-amount-get {
    color: #eab308;
}

.swap-page-network {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.swap-page-arrow {
    font-size: 1.2rem;
    color: var(--text-muted);
    opacity: 0.6;
}

.swap-quote-expired-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 8px 0;
}

.swap-page-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.swap-page-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.swap-page-form fieldset {
    margin-bottom: 0;
}

.swap-page-form .form-actions,
.swap-page-form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.swap-page-form a.btn-secondary,
.swap-get-quote-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

@media (max-width: 768px) {
    .swap-page .swap-page-summary {
        grid-template-columns: 1fr;
    }
}


.exchange-display-field {
    padding: 9px 11px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: rgba(15, 23, 42, 0.95);
    color: var(--text-main);
    font-size: 0.92rem;
}

.theme-toggle:checked ~ .page-shell .exchange-display-field {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.6);
    color: #0f172a;
}

.theme-toggle:checked ~ .page-shell .exchange-id {
    color: #0f172a;
}

.swap-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

@media (max-width: 880px) {
    .features-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.feature-card {
    background: radial-gradient(circle at 0 0, rgba(248, 250, 252, 0.05), transparent 55%),
    rgba(15, 23, 42, 0.9);
    border-radius: 14px;
    padding: 12px 12px 13px;
    border: 1px solid rgba(148, 163, 184, 0.5);
}

.feature-card h3 {
    margin: 0 0 4px;
    font-size: 1.2rem;
    text-align: center;
}

.feature-card p {
    margin: 0;
    font-size: 0.9rem;
    text-align: center;
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.6);
    margin-inline: auto;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

/* ==========
   Login & Cabinet
   ========== */

/* Login page: center content vertically and horizontally */
.login-page.page-content {
    align-items: center;
}

.login-page .login-layout {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.auth-panel {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.auth-panel h1 {
    font-size: 1.3rem;
    margin-bottom: 6px;
}

.auth-panel p {
    margin-top: 0;
    font-size: 0.86rem;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.86rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Cabinet: two columns (orders | payouts) + user block */
.cabinet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.cabinet-two-cols {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

.cabinet-col {
    min-width: 0;
}

.cabinet-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--text-main);
}

.cabinet-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-elevated-soft);
}

.cabinet-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.cabinet-table th,
.cabinet-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.cabinet-table th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.7rem;
}

.cabinet-table tbody tr:last-child td {
    border-bottom: none;
}

.cabinet-table tbody tr:hover {
    background: rgba(148, 163, 184, 0.06);
}

.cabinet-coin-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cabinet-coin-icon {
    flex-shrink: 0;
    border-radius: 50%;
}

/* Orders table: enhanced styling (use modifier class so styles always apply) */
.cabinet-table-wrap--orders {
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12) !important;
    background: var(--bg-elevated-soft) !important;
}

.cabinet-table--orders th {
    background: rgba(15, 23, 42, 0.5) !important;
    color: var(--text-muted) !important;
    padding: 12px 14px !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    white-space: nowrap !important;
}

.cabinet-table--orders td {
    padding: 12px 14px !important;
    vertical-align: middle !important;
}

.cabinet-table--orders tbody tr:nth-child(even) {
    background: rgba(148, 163, 184, 0.04) !important;
}

.cabinet-table--orders tbody tr:hover {
    background: rgba(139, 92, 246, 0.08) !important;
}

.cabinet-table--orders .cabinet-coin-cell {
    padding: 4px 8px !important;
    border-radius: var(--radius-md) !important;
    background: rgba(148, 163, 184, 0.1) !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    font-weight: 500 !important;
    color: var(--text-main) !important;
}

.cabinet-table--orders .cabinet-coin-icon {
    width: 22px !important;
    height: 22px !important;
}

.cabinet-table--orders th,
.cabinet-table--orders td {
    text-align: center !important;
}

.cabinet-table--orders td:nth-child(4),
.cabinet-table--orders td:nth-child(5),
.cabinet-table--orders td:nth-child(6) {
    font-variant-numeric: tabular-nums !important;
}

.cabinet-table--orders .cabinet-date {
    font-size: 0.78rem !important;
}

/* Payouts table: enhanced styling (use modifier class so styles always apply) */
.cabinet-table-wrap--payouts {
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12) !important;
    background: var(--bg-elevated-soft) !important;
}

.cabinet-table--payouts th {
    background: rgba(15, 23, 42, 0.5) !important;
    color: var(--text-muted) !important;
    padding: 12px 14px !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    white-space: nowrap !important;
}

.cabinet-table--payouts td {
    padding: 12px 14px !important;
    vertical-align: middle !important;
}

.cabinet-table--payouts tbody tr:nth-child(even) {
    background: rgba(148, 163, 184, 0.04) !important;
}

.cabinet-table--payouts tbody tr:hover {
    background: rgba(139, 92, 246, 0.08) !important;
}

.cabinet-table--payouts th,
.cabinet-table--payouts td {
    text-align: center !important;
}

.cabinet-table--payouts td:nth-child(1) {
    font-variant-numeric: tabular-nums !important;
    font-weight: 500 !important;
}

.cabinet-table--payouts .cabinet-address {
    max-width: 160px !important;
    font-size: 0.8rem !important;
}

/* Orders table: status chips (same pill style as payouts) */
.cabinet-table--orders .cabinet-status {
    display: inline-block !important;
    padding: 4px 10px !important;
    border-radius: 999px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

.cabinet-table--orders .cabinet-status-wait,
.cabinet-table--orders .cabinet-status-confirmation {
    background: rgba(234, 179, 8, 0.2) !important;
    color: #eab308 !important;
}

.cabinet-table--orders .cabinet-status-confirmed,
.cabinet-table--orders .cabinet-status-exchanging,
.cabinet-table--orders .cabinet-status-sending {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #3b82f6 !important;
}

.cabinet-table--orders .cabinet-status-success {
    background: rgba(74, 222, 128, 0.2) !important;
    color: var(--success) !important;
}

.cabinet-table--orders .cabinet-status-overdue,
.cabinet-table--orders .cabinet-status-refunded {
    background: rgba(248, 113, 113, 0.2) !important;
    color: var(--danger) !important;
}

.cabinet-table--payouts .cabinet-status {
    display: inline-block !important;
    padding: 4px 10px !important;
    border-radius: 999px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

.cabinet-table--payouts .cabinet-status-pending {
    background: rgba(234, 179, 8, 0.2) !important;
    color: #eab308 !important;
}

.cabinet-table--payouts .cabinet-status-accepted {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #3b82f6 !important;
}

.cabinet-table--payouts .cabinet-status-completed {
    background: rgba(74, 222, 128, 0.2) !important;
    color: var(--success) !important;
}

.cabinet-table--payouts .cabinet-status-declined,
.cabinet-table--payouts .cabinet-status-failed {
    background: rgba(248, 113, 113, 0.2) !important;
    color: var(--danger) !important;
}

.cabinet-table--payouts .cabinet-date {
    font-size: 0.78rem !important;
}

.cabinet-date {
    color: var(--text-muted);
    white-space: nowrap;
}

.cabinet-address {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cabinet-status {
    font-weight: 500;
}

.cabinet-status-pending { color: #eab308; }
.cabinet-status-accepted { color: #3b82f6; }
.cabinet-status-completed { color: var(--success); }
.cabinet-status-declined,
.cabinet-status-failed { color: var(--danger); }

.cabinet-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 20px !important;
}

/* ========== Cabinet: unified button style ========== */
.cabinet-btn,
.cabinet-panel .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    min-height: 44px;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: none;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-main);
    cursor: pointer;
    transition: background 160ms ease-out, border-color 160ms ease-out, transform 160ms ease-out;
    text-decoration: none;
    margin: 0;
}

.cabinet-btn:hover,
.cabinet-panel .btn-secondary:hover {
    background: rgba(15, 23, 42, 0.98);
    border-color: rgba(148, 163, 184, 0.85);
    transform: translateY(-1px);
}

.cabinet-btn:active,
.cabinet-panel .btn-secondary:active {
    transform: translateY(0);
}

.cabinet-modal-cancel {
    cursor: pointer;
}

/* User info block */
.cabinet-user-block {
    padding: 28px 24px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: var(--bg-elevated-soft);
}

.cabinet-user-block-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 20px;
    letter-spacing: 0.02em;
}

.cabinet-user-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0 0 24px;
    padding: 0;
}

.cabinet-user-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: baseline;
    gap: 16px 24px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.cabinet-user-row:first-of-type {
    padding-top: 0;
}

.cabinet-user-row:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.cabinet-user-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin: 0;
}

.cabinet-user-value {
    font-size: 0.9rem;
    color: var(--text-main);
    margin: 0;
    word-break: break-word;
}

.cabinet-user-row--api .cabinet-user-value {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.cabinet-user-row--api .cabinet-api-key {
    flex: 1;
    min-width: 0;
}

.cabinet-api-key {
    word-break: break-all;
    font-size: 0.8rem;
    line-height: 1.4;
}

.cabinet-user-value--api .cabinet-inline-form {
    display: inline-flex;
    margin: 0;
    flex-shrink: 0;
}

.cabinet-user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}

.cabinet-subtitle {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--text-main);
}

.cabinet-profile-form .form-actions {
    margin-top: 0;
}

.cabinet-password-form .form-actions {
    margin-top: 12px;
}

/* ========== Cabinet: change password modal ========== */
.cabinet-password-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: none;
}

#cabinet-password-modal-toggle:checked ~ .cabinet-password-modal {
    display: flex;
    pointer-events: auto;
}

.cabinet-profile-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: none;
}

#cabinet-profile-modal-toggle:checked ~ .cabinet-profile-modal {
    display: flex;
    pointer-events: auto;
}

.cabinet-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 0, 19, 0.82);
    cursor: pointer;
    text-indent: -9999px;
    display: block;
    pointer-events: auto;
}

.cabinet-modal-content {
    position: relative;
    z-index: 1;
    pointer-events: auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-soft), 0 0 0 1px rgba(139, 92, 246, 0.12);
}

.cabinet-modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 20px;
    color: var(--text-main);
}

.cabinet-password-modal .cabinet-password-form fieldset {
    margin: 0 0 16px;
}

.cabinet-password-modal .cabinet-password-form fieldset:last-of-type {
    margin-bottom: 20px;
}

.cabinet-profile-modal .cabinet-profile-form fieldset {
    margin: 0 0 16px;
}

.cabinet-profile-modal .cabinet-profile-form fieldset:last-of-type {
    margin-bottom: 20px;
}

.cabinet-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.cabinet-modal-actions .cabinet-btn {
    min-width: 120px;
}

.cabinet-modal-cancel {
    margin: 0;
}

.theme-toggle:checked ~ .page-shell .cabinet-password-modal .cabinet-modal-content {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.5);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(148, 163, 184, 0.2);
}

.theme-toggle:checked ~ .page-shell .cabinet-password-modal .cabinet-modal-title {
    color: #111827;
}

.theme-toggle:checked ~ .page-shell .cabinet-password-modal .cabinet-modal-overlay {
    background: rgba(15, 23, 42, 0.5);
}

.theme-toggle:checked ~ .page-shell .cabinet-profile-modal .cabinet-modal-content {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.5);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(148, 163, 184, 0.2);
}

.theme-toggle:checked ~ .page-shell .cabinet-profile-modal .cabinet-modal-title {
    color: #111827;
}

.theme-toggle:checked ~ .page-shell .cabinet-profile-modal .cabinet-modal-overlay {
    background: rgba(15, 23, 42, 0.5);
}

@media (max-width: 960px) {
    .cabinet-two-cols {
        grid-template-columns: 1fr;
    }

    .cabinet-user-block {
        padding: 20px 18px;
    }

    .cabinet-user-row {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 12px 0;
    }

    .cabinet-user-actions {
        padding-top: 16px;
        gap: 10px;
    }
}

.theme-toggle:checked ~ .page-shell .cabinet-table-wrap {
    background: #f9fafb;
    border-color: rgba(148, 163, 184, 0.4);
}

.theme-toggle:checked ~ .page-shell .cabinet-table-wrap--orders {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    background: #f9fafb !important;
}

.theme-toggle:checked ~ .page-shell .cabinet-table--orders th {
    background: rgba(148, 163, 184, 0.15) !important;
    color: #4b5563 !important;
}

.theme-toggle:checked ~ .page-shell .cabinet-table--orders tbody tr:nth-child(even) {
    background: rgba(148, 163, 184, 0.06) !important;
}

.theme-toggle:checked ~ .page-shell .cabinet-table--orders tbody tr:hover {
    background: rgba(139, 92, 246, 0.08) !important;
}

.theme-toggle:checked ~ .page-shell .cabinet-table--orders .cabinet-coin-cell {
    background: rgba(148, 163, 184, 0.12) !important;
    border-color: rgba(148, 163, 184, 0.25) !important;
    color: #111827 !important;
}

.theme-toggle:checked ~ .page-shell .cabinet-table--orders td,
.theme-toggle:checked ~ .page-shell .cabinet-table--payouts td {
    color: #111827 !important;
}

.theme-toggle:checked ~ .page-shell .cabinet-table--orders .cabinet-date,
.theme-toggle:checked ~ .page-shell .cabinet-table--payouts .cabinet-date,
.theme-toggle:checked ~ .page-shell .cabinet-table--payouts .cabinet-address {
    color: #111827 !important;
}

.theme-toggle:checked ~ .page-shell .cabinet-table--orders .cabinet-empty,
.theme-toggle:checked ~ .page-shell .cabinet-table--payouts .cabinet-empty {
    color: #4b5563 !important;
}

.theme-toggle:checked ~ .page-shell .cabinet-table-wrap--payouts {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    background: #f9fafb !important;
}

.theme-toggle:checked ~ .page-shell .cabinet-table--payouts th {
    background: rgba(148, 163, 184, 0.15) !important;
    color: #4b5563 !important;
}

.theme-toggle:checked ~ .page-shell .cabinet-table--payouts tbody tr:nth-child(even) {
    background: rgba(148, 163, 184, 0.06) !important;
}

.theme-toggle:checked ~ .page-shell .cabinet-table--payouts tbody tr:hover {
    background: rgba(139, 92, 246, 0.08) !important;
}

.theme-toggle:checked ~ .page-shell .cabinet-table--orders .cabinet-status-wait,
.theme-toggle:checked ~ .page-shell .cabinet-table--orders .cabinet-status-confirmation {
    background: rgba(234, 179, 8, 0.15) !important;
    color: #b45309 !important;
}

.theme-toggle:checked ~ .page-shell .cabinet-table--orders .cabinet-status-confirmed,
.theme-toggle:checked ~ .page-shell .cabinet-table--orders .cabinet-status-exchanging,
.theme-toggle:checked ~ .page-shell .cabinet-table--orders .cabinet-status-sending {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #2563eb !important;
}

.theme-toggle:checked ~ .page-shell .cabinet-table--orders .cabinet-status-success {
    background: rgba(74, 222, 128, 0.15) !important;
    color: #16a34a !important;
}

.theme-toggle:checked ~ .page-shell .cabinet-table--orders .cabinet-status-overdue,
.theme-toggle:checked ~ .page-shell .cabinet-table--orders .cabinet-status-refunded {
    background: rgba(248, 113, 113, 0.15) !important;
    color: #dc2626 !important;
}

.theme-toggle:checked ~ .page-shell .cabinet-table--payouts .cabinet-status-pending {
    background: rgba(234, 179, 8, 0.15) !important;
    color: #b45309 !important;
}

.theme-toggle:checked ~ .page-shell .cabinet-table--payouts .cabinet-status-accepted {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #2563eb !important;
}

.theme-toggle:checked ~ .page-shell .cabinet-table--payouts .cabinet-status-completed {
    background: rgba(74, 222, 128, 0.15) !important;
    color: #16a34a !important;
}

.theme-toggle:checked ~ .page-shell .cabinet-table--payouts .cabinet-status-declined,
.theme-toggle:checked ~ .page-shell .cabinet-table--payouts .cabinet-status-failed {
    background: rgba(248, 113, 113, 0.15) !important;
    color: #dc2626 !important;
}

.theme-toggle:checked ~ .page-shell .cabinet-user-block {
    background: #f9fafb;
    border-color: rgba(148, 163, 184, 0.4);
}

.theme-toggle:checked ~ .page-shell .cabinet-user-block-title {
    color: #0f172a;
}

.theme-toggle:checked ~ .page-shell .cabinet-user-block .cabinet-user-label {
    color: #6b7280;
}

.theme-toggle:checked ~ .page-shell .cabinet-user-block .cabinet-user-value {
    color: #111827;
}

.theme-toggle:checked ~ .page-shell .cabinet-user-block .cabinet-user-row {
    border-bottom-color: rgba(148, 163, 184, 0.35);
}

.theme-toggle:checked ~ .page-shell .cabinet-user-block .cabinet-user-actions {
    border-top-color: rgba(148, 163, 184, 0.35);
}

.theme-toggle:checked ~ .page-shell .cabinet-btn,
.theme-toggle:checked ~ .page-shell .cabinet-panel .btn-secondary {
    background: #f3f4f6;
    border-color: rgba(148, 163, 184, 0.6);
    color: #111827;
}

.theme-toggle:checked ~ .page-shell .cabinet-btn:hover,
.theme-toggle:checked ~ .page-shell .cabinet-panel .btn-secondary:hover {
    background: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.75);
}

.theme-toggle:checked ~ .page-shell .cabinet-section-title,
.theme-toggle:checked ~ .page-shell .cabinet-subtitle {
    color: #0f172a;
}

.theme-toggle:checked ~ .page-shell .cabinet-user-value {
    color: #111827;
}

.cabinet-section + .cabinet-section {
    margin-top: 14px;
}

.kv-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kv-list li {
    padding: 8px 0;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.45);
    font-size: 0.86rem;
}

.kv-list li:last-child {
    border-bottom: none;
}

.kv-label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 2px;
}

.kv-primary {
    font-weight: 500;
}

.kv-muted {
    color: var(--text-muted);
}

.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.84rem;
}

.history-list li {
    padding: 7px 0;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.45);
}

.history-list li:last-child {
    border-bottom: none;
}

.section-heading {
    font-size: 0.96rem;
    margin-bottom: 6px;
    font-weight: 500;
}

.section-description {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* ==========
   API docs
   ========== */

.api-layout h1 {
    margin-bottom: 4px;
}

.api-layout section {
    margin-bottom: 18px;
}

.api-layout h2 {
    font-size: 1.02rem;
    margin-bottom: 6px;
}

.api-layout h3 {
    font-size: 0.92rem;
    margin: 10px 0 4px;
}

.api-layout ul {
    margin-top: 6px;
}

/* ==========
   Exchange detail
   ========== */

.exchange-panel p {
    margin: 0 0 4px;
}

.exchange-panel {
    display: flex;
    flex-direction: column;
    gap: 28px;  /* same as .swap-layout gap on index */
}

.exchange-panel section {
    margin-bottom: 0;
}

.exchange-id {
    font-size: 0.92rem;
    color: var(--text-main);
    margin: 0 0 16px;
}

/* Unified text styling for exchange detail page - all text same size and color */
.exchange-panel,
.exchange-panel * {
    font-size: 0.92rem;
    color: var(--text-main);
}

.exchange-panel .swap-form-legend,
.exchange-panel label,
.exchange-panel .panel-section-title,
.exchange-panel .exchange-display-field,
.exchange-panel .exchange-id,
.exchange-panel p {
    font-size: 0.92rem;
    color: var(--text-main);
    text-transform: none;
    letter-spacing: normal;
    font-weight: normal;
}

.exchange-panel strong {
    font-weight: 500;
    color: var(--text-main);
}

.theme-toggle:checked ~ .page-shell .exchange-panel,
.theme-toggle:checked ~ .page-shell .exchange-panel * {
    color: #0f172a;
}

.theme-toggle:checked ~ .page-shell .exchange-panel .swap-form-legend,
.theme-toggle:checked ~ .page-shell .exchange-panel label,
.theme-toggle:checked ~ .page-shell .exchange-panel .panel-section-title,
.theme-toggle:checked ~ .page-shell .exchange-panel .exchange-display-field,
.theme-toggle:checked ~ .page-shell .exchange-panel .exchange-id,
.theme-toggle:checked ~ .page-shell .exchange-panel p,
.theme-toggle:checked ~ .page-shell .exchange-panel strong {
    color: #0f172a;
}

.theme-toggle:checked ~ .page-shell .order-card .order-card-title,
.theme-toggle:checked ~ .page-shell .order-card .order-detail-label {
    color: #4b5563;
}

.theme-toggle:checked ~ .page-shell .order-card .order-detail-value {
    color: #111827;
}

.theme-toggle:checked ~ .page-shell .order-card .order-id-value {
    color: #b45309;
}

.swap-destination {
    grid-column: 1 / -1;
}

.login-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.faq-section {
    margin-top: 18px;
}

.faq-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
}

.faq-item {
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.9);
    overflow: hidden;
}

.faq-item + .faq-item {
    margin-top: 8px;
}

/* Native <details> / <summary>: hide default marker */
.faq-item summary {
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-main);
    transition: background var(--transition-fast);
}

.faq-question:hover {
    background: rgba(15, 23, 42, 0.95);
}

.faq-icon {
    transition: transform var(--transition-fast), opacity var(--transition-fast);
    opacity: 0.6;
}

.faq-item[open] .faq-icon {
    transform: rotate(180deg);
    opacity: 1;
}

.faq-answer {
    padding: 10px 14px 14px;
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Light theme */
.theme-toggle:checked ~ .page-shell .faq-item {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.6);
}

.theme-toggle:checked ~ .page-shell .faq-question {
    color: #0f172a;
}

.theme-toggle:checked ~ .page-shell .faq-answer {
    color: #4b5563;
}

/* ==========
   Contact
   ========== */

.contact-section {
    margin-top: 18px;
}

.contact-title {
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 6px;
}

.contact-subtitle {
    text-align: center;
    font-size: 0.85rem;
    margin-bottom: 14px;
}

.form-row-2col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.form-row-2col fieldset {
    margin-bottom: 0;
}

/* Mobile: stack */
@media (max-width: 720px) {
    .form-row-2col {
        grid-template-columns: 1fr;
    }
}

textarea {
    width: 100%;
    padding: 10px 11px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: rgba(15, 23, 42, 0.95);
    color: var(--text-main);
    font-size: 0.92rem;
    resize: vertical;
    min-height: 90px;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
                background var(--transition-fast);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}

textarea:focus {
    border-color: var(--accent-strong);
    box-shadow:
        0 0 0 1px rgba(248, 250, 252, 0.12),
        0 0 32px rgba(139, 92, 246, 0.6);
    background: rgba(15, 23, 42, 0.98);
}

/* Light theme */
.theme-toggle:checked ~ .page-shell textarea {
    background: #ffffff;
    color: #0f172a;
    border-color: rgba(148, 163, 184, 0.9);
}

.theme-toggle:checked ~ .page-shell textarea::placeholder {
    color: #9ca3af;
}

/* ==========
   Footer
   ========== */

.site-footer {
    margin-top: 40px;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(5, 6, 24, 0.95);
}

.footer-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.footer-logo {
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.footer-muted {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.footer-right {
    display: flex;
    gap: 10px;
}

.footer-right a {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid transparent;
}

.footer-right a:hover {
    color: var(--text-main);
    border-color: rgba(148, 163, 184, 0.45);
}

/* Light theme */
.theme-toggle:checked ~ .page-shell .site-footer {
    background: #f9fafb;
    border-top-color: rgba(148, 163, 184, 0.5);
}

.theme-toggle:checked ~ .page-shell .footer-muted,
.theme-toggle:checked ~ .page-shell .footer-right a {
    color: #6b7280;
}

.theme-toggle:checked ~ .page-shell .footer-right a:hover {
    color: #111827;
}


/* ===== EXCHANGE EXPIRED: big block when status is overdue/refunded ===== */
.exchange-expired-block {
    text-align: center;
    padding: 48px 24px;
    margin: 0;
}

.exchange-expired-block .exchange-expired-icon {
    font-size: 3rem;
    line-height: 1;
    opacity: 0.9;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.exchange-expired-block .exchange-expired-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 12px 0;
}

.exchange-expired-block .exchange-expired-desc {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.theme-toggle:checked ~ .page-shell .exchange-expired-block .exchange-expired-title {
    color: #111827;
}

.theme-toggle:checked ~ .page-shell .exchange-expired-block .exchange-expired-desc {
    color: #4b5563;
}

/* ===== EXCHANGE SUCCESS: layout when status is success ===== */
.exchange-refund-block {
    text-align: center;
    padding: 40px 24px 24px;
    margin: 0;
}

.exchange-refund-block .exchange-refund-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--refunded);
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.exchange-success-block {
    text-align: center;
    padding: 40px 24px 24px;
    margin: 0;
}

.exchange-success-block .exchange-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--success);
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.exchange-success-block .exchange-success-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 10px 0;
}

.exchange-success-block .exchange-success-desc {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.exchange-success-receipt {
    padding: 24px 20px;
    margin: 0 0 28px 0;
    border-radius: 16px;
    background: var(--panel-bg);
    border: 1px solid var(--border-subtle);
}

.exchange-success-receipt .exchange-success-receipt-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.exchange-success-receipt .order-details-list {
    margin: 0 0 20px 0;
}

.exchange-success-summary {
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.exchange-success-summary-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.exchange-success-summary-line .exchange-success-amount {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

.exchange-success-summary-line .exchange-success-arrow {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.exchange-success-address-line {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.exchange-success-address-line .order-detail-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.exchange-success-address-line .exchange-address {
    font-size: 0.8rem;
    color: var(--text-main);
    word-break: break-all;
}

.exchange-success-cta {
    margin-top: 20px;
    text-align: center;
}

.exchange-success-cta .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:checked ~ .page-shell .exchange-success-block .exchange-success-title {
    color: #111827;
}

.theme-toggle:checked ~ .page-shell .exchange-success-block .exchange-success-desc {
    color: #4b5563;
}

.theme-toggle:checked ~ .page-shell .exchange-success-receipt {
    background: #f9fafb;
    border-color: rgba(148, 163, 184, 0.4);
}

.theme-toggle:checked ~ .page-shell .exchange-success-receipt .exchange-success-receipt-title {
    color: #111827;
    border-bottom-color: rgba(148, 163, 184, 0.4);
}

.theme-toggle:checked ~ .page-shell .exchange-success-summary {
    border-top-color: rgba(148, 163, 184, 0.4);
}

/* ===== STATUS BAR: 5 steps in one row (stepper with connecting line) ===== */
.exchange-status-bar .status-track {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    width: 100%;
    margin: 0;
    padding: 16px 20px;
}

.exchange-status-bar .status-step {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    min-width: 72px;
    position: relative;
}

.exchange-status-bar .status-step-dot {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.25);
    border: 2px solid rgba(148, 163, 184, 0.4);
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: transparent;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.exchange-status-bar .status-step.active .status-step-dot {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.exchange-status-bar .status-step.done .status-step-dot {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.exchange-status-bar .status-step-name {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 88px;
    line-height: 1.2;
}

.exchange-status-bar .status-step.active .status-step-name {
    color: var(--success);
    font-weight: 500;
}

.exchange-status-bar .status-step.done .status-step-name {
    color: var(--text-muted);
}

.exchange-status-bar .status-connector {
    flex: 1 1 0;
    min-width: 12px;
    width: 0;
    height: 3px;
    margin-top: 16.5px;
    align-self: flex-start;
    background: rgba(148, 163, 184, 0.25);
    border-radius: 1px;
    transition: background 0.2s ease;
}

.exchange-status-bar .status-step.done + .status-connector,
.exchange-status-bar .status-connector.done {
    background: var(--accent);
}

.theme-toggle:checked ~ .page-shell .exchange-status-bar .status-track {
    background: #f9fafb;
    border-color: rgba(148, 163, 184, 0.4);
}

.theme-toggle:checked ~ .page-shell .exchange-status-bar .status-step-dot {
    background: rgba(148, 163, 184, 0.2);
    border-color: rgba(148, 163, 184, 0.5);
}

.theme-toggle:checked ~ .page-shell .exchange-status-bar .status-step.active .status-step-dot {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

.theme-toggle:checked ~ .page-shell .exchange-status-bar .status-step.done .status-step-dot {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.theme-toggle:checked ~ .page-shell .exchange-status-bar .status-connector {
    background: rgba(148, 163, 184, 0.3);
}

.theme-toggle:checked ~ .page-shell .exchange-status-bar .status-step.done + .status-connector,
.theme-toggle:checked ~ .page-shell .exchange-status-bar .status-connector.done {
    background: var(--accent);
}

.theme-toggle:checked ~ .page-shell .exchange-status-bar .status-step.active .status-step-name {
    color: #16a34a;
}

/* ===== ROW 2: SEND / RECEIVE (horizontal) ===== */
.exchange-summary-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    padding: 24px 20px;
    margin-bottom: 28px;
    border-radius: 16px;
    background: var(--panel-bg);
    border: 1px solid var(--border-subtle);
}

.exchange-summary-row .summary-side {
    text-align: center;
}

.exchange-summary-row .summary-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.exchange-panel .summary-amount-main {
    font-size: 1.4rem;
    font-weight: 700;
    color: #eab308;
    margin: 6px 0 2px;
}

.summary-network {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.summary-coin-logo {
    margin: 8px 0;
}

.summary-coin-logo img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.exchange-summary-row .summary-address {
    font-size: 0.75rem;
    color: var(--text-muted);
    word-break: break-all;
    margin-top: 4px;
}

.exchange-summary-row .summary-address.mono {
    font-family: ui-monospace, monospace;
}

.summary-arrow-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-arrow-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
}

/* ===== ROW 3: One card – QR + order details in one row ===== */
.order-card-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 24px;
    padding: 20px;
    background: var(--panel-bg);
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
}

/* QR block inside order card */
.order-card-qr.qr-card {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 200px;
    flex-shrink: 0;
    padding: 12px;
    margin: 0;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: #fff;
    box-sizing: border-box;
}

.theme-toggle:checked ~ .page-shell .qr-card {
    background: #fff;
    border-color: rgba(148, 163, 184, 0.4);
}

.qr-wrap {
    margin: 0;
    padding: 0;
}

.qr-wrap img {
    width: 100%;
    height: 100%;
    max-width: 176px;
    max-height: 176px;
    object-fit: contain;
    display: block;
}

/* Order details (right side of row) */
.order-card-details {
    flex: 1;
    min-width: 0;
}

.order-card {
    min-width: 0;
}

.order-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.order-details-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.order-detail-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.order-detail-item:last-child {
    border-bottom: none;
}

.order-detail-label {
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin: 0;
}

.order-detail-value {
    font-size: 0.9rem;
    color: var(--text-main);
    margin: 0;
    word-break: break-all;
}

.order-card .order-id-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.order-status-value {
    font-size: 0.9rem;
    font-weight: 600;
}

.exchange-panel .order-status-value.status-danger {
    color: var(--danger);
}

.exchange-panel .order-status-value.status-muted {
    color: var(--text-muted);
}

.copy-icon {
    font-size: 0.85rem;
    opacity: 0.7;
    cursor: pointer;
}

.order-card .detail-value {
    font-size: 0.9rem;
    color: var(--text-main);
}

.detail-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-top: 10px;
    display: block;
}

.detail-value {
    font-size: 0.9rem;
    margin-top: 2px;
}

.detail-value.mono {
    font-family: ui-monospace, monospace;
    word-break: break-all;
}

.qr-toggles {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.qr-toggle {
    padding: 8px 14px;
    font-size: 0.8rem;
    background: #e5e7eb;
    color: #6b7280;
}

.qr-toggle.active {
    background: #fff;
    color: #111;
    font-weight: 500;
}

/* Exchange detail: responsive – stack only on small screens */
@media (max-width: 768px) {
    .exchange-status-bar .status-track {
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 0;
        padding: 12px 16px;
    }

    .exchange-status-bar .status-step {
        width: 48px;
        min-width: 48px;
        gap: 6px;
    }

    .exchange-status-bar .status-step-dot {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        font-size: 0.75rem;
    }

    .exchange-status-bar .status-step-name {
        font-size: 0.68rem;
        max-width: 48px;
    }

    .exchange-status-bar .status-connector {
        display: block;
        flex: 1 1 0;
        min-width: 6px;
        margin-top: 12.5px;
    }

    /* Success layout – mobile */
    .exchange-success-block {
        padding: 32px 20px 20px;
    }

    .exchange-success-block .exchange-success-icon {
        width: 56px;
        height: 56px;
        font-size: 1.75rem;
        margin-bottom: 16px;
    }

    .exchange-success-block .exchange-success-title {
        font-size: 1.25rem;
    }

    .exchange-success-block .exchange-success-desc {
        font-size: 0.9rem;
    }

    .exchange-success-receipt {
        padding: 18px 16px;
        margin-bottom: 24px;
    }

    .exchange-success-receipt .exchange-success-receipt-title {
        font-size: 0.9rem;
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .exchange-success-summary-line .exchange-success-amount {
        font-size: 0.9rem;
    }

    .exchange-success-cta {
        margin-top: 16px;
    }

    .exchange-summary-row {
        grid-template-columns: 1fr;
    }

    /* Order card block (QR + order details) – mobile only */
    .order-card-row {
        flex-direction: column;
        gap: 14px;
        padding: 14px;
        align-items: center;
    }

    .order-card-row .order-card-qr.qr-card {
        width: 160px;
        height: 160px;
        padding: 10px;
    }

    .order-card-row .order-card-details {
        width: 100%;
    }

    .order-card-row .order-card-title {
        font-size: 0.9rem;
        margin: 0 0 10px 0;
        padding-bottom: 8px;
    }

    .order-card-row .order-detail-item {
        grid-template-columns: 1fr;
        gap: 2px;
        padding: 8px 0;
    }

    .order-card-row .order-detail-label {
        font-size: 0.68rem;
    }

    .order-card-row .order-detail-value {
        font-size: 0.82rem;
    }
}

/* Exchange detail / quote / swap: swap summary panel (same layout as index, read-only) */
.exchange-panel .exchange-detail-swap {
    margin-bottom: 24px;
}

.exchange-expired-get-quote .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
}
.exchange-detail-swap .index-coin-icon,
.quote-detail-swap .index-coin-icon,
.swap-detail-swap .index-coin-icon {
    display: flex !important;
}
.exchange-coin-trigger {
    display: flex;
    align-items: center;
    height: 42px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: rgba(15, 23, 42, 0.6);
    cursor: default;
}
.exchange-coin-label {
    font-size: 0.9rem;
    color: var(--text-main);
    flex: 1;
    min-width: 0;
}
.exchange-send-amount {
    height: 42px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-main);
}
.exchange-get-amount {
    height: 42px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-main);}
.exchange-get-amount-value {
    color: #eab308;
}

.exchange-address {
    min-height: 42px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: rgba(15, 23, 42, 0.6);
    font-size: 0.8rem;
    line-height: 1.4;
    word-break: break-all;
    color: var(--text-main);
}

.theme-toggle:checked ~ .page-shell .exchange-coin-trigger,
.theme-toggle:checked ~ .page-shell .exchange-send-amount,
.theme-toggle:checked ~ .page-shell .exchange-get-amount,
.theme-toggle:checked ~ .page-shell .exchange-address {
    background: #fff;
    border-color: rgba(148, 163, 184, 0.5);
    color: #0f172a;
}
.theme-toggle:checked ~ .page-shell .exchange-coin-label {
    color: #0f172a;
}
.theme-toggle:checked ~ .page-shell .exchange-get-amount-value {
    color: #b45309;
}

/* Index swap form – single cohesive structure */
/* Allow dropdown to extend outside and overlay panel */
.panel:has(.index-swap-form-inner) {
    overflow: visible;
}

.index-swap-form-inner {
    background: var(--bg-elevated-soft);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    overflow: visible;
}

.index-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: stretch;
    min-height: 0;
}

.index-two-cols .index-col {
    padding: 0 20px;
}

.index-two-cols .index-col:first-child {
    padding-left: 0;
    border-right: 1px solid var(--border-subtle);
    padding-right: 20px;
}

.index-two-cols .index-col:last-child {
    padding-right: 0;
    padding-left: 20px;
}

.index-col {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.index-send-col,
.index-get-col {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Shared field block styling */
.index-swap-form-inner .index-icon-row {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    padding-bottom: 12px;
}

.index-swap-form-inner .index-select-row,
.index-swap-form-inner .index-amount-row,
.index-swap-form-inner .index-address-row {
    padding-bottom: 14px;
}

.index-swap-form-inner .index-select-row:last-of-type,
.index-swap-form-inner .index-amount-row:last-of-type,
.index-swap-form-inner .index-address-row:last-of-type {
    padding-bottom: 0;
}

.index-swap-form-inner fieldset > label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

/* Custom dropdown – options overlay below, form doesn’t grow */
.index-dropdown {
    position: relative;
    display: block;
}

.index-dropdown summary {
    list-style: none;
}

.index-dropdown summary::-webkit-details-marker {
    display: none;
}

.index-dropdown-trigger {
    position: relative;
    display: flex;
    align-items: center;
    height: 42px;
    padding: 0 40px 0 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: rgba(15, 23, 42, 0.6);
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.index-dropdown[open] .index-dropdown-trigger {
    border-color: var(--accent);
    background: rgba(15, 23, 42, 0.8);
}

.index-dropdown-trigger input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.index-dropdown-trigger .index-dropdown-label {
    display: none;
    font-size: 0.9rem;
    color: var(--text-main);
    flex: 1;
    min-width: 0;
}

.index-dropdown-trigger input:checked + .index-dropdown-label {
    display: block;
}

.index-dropdown-trigger .index-select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--text-muted);
    pointer-events: none;
    flex-shrink: 0;
}

.index-dropdown[open] .index-select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* List overlays content below, doesn’t expand form */
.index-dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    margin-top: -1px;
    padding: 0;
    border: 1px solid var(--border-subtle);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    background: rgba(15, 23, 42, 0.98);
    max-height: calc(3 * (10px + 10px + 1.35em));
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.index-dropdown-list label {
    display: block;
    margin: 0;
    padding: 10px 12px;
    font-size: 0.9rem;
    line-height: 1.35;
    color: var(--text-main);
    cursor: pointer;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    transition: background var(--transition-fast);
}

.index-dropdown-list label:last-child {
    border-bottom: none;
}

.index-dropdown-list label:hover {
    background: rgba(148, 163, 184, 0.15);
}

.index-swap-form-inner input[type="number"] {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-main);
    font-size: 0.9rem;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.index-swap-form-inner input[type="number"]:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(15, 23, 42, 0.8);
}

.index-swap-form-inner fieldset {
    margin: 0;
    padding: 0;
    border: none;
}

.index-coin-icon-wrap {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.index-coin-icon {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
}

.index-coin-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.index-form-actions {
    padding-top: 16px;
}

.index-swap-form-inner .btn-secondary {
    width: 100%;
    height: 42px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .index-two-cols {
        grid-template-columns: 1fr;
    }

    .index-two-cols .index-col:first-child {
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        padding: 0 0 20px;
        margin-bottom: 20px;
    }

    .index-two-cols .index-col:last-child {
        padding: 0;
    }

    .index-swap-form-inner {
        padding: 20px;
    }
}

.theme-toggle:checked ~ .page-shell .index-swap-form-inner input[type="number"] {
    background: #fff;
    border-color: rgba(148, 163, 184, 0.5);
    color: #0f172a;
}

.theme-toggle:checked ~ .page-shell .index-swap-form-inner input[type="number"]:focus {
    background: #fff;
    border-color: var(--accent);
}

.theme-toggle:checked ~ .page-shell .index-dropdown-trigger {
    background: #fff;
    border-color: rgba(148, 163, 184, 0.5);
}

.theme-toggle:checked ~ .page-shell .index-dropdown[open] .index-dropdown-trigger {
    background: #fff;
    border-color: rgba(148, 163, 184, 0.5);
}

.theme-toggle:checked ~ .page-shell .index-dropdown-trigger .index-dropdown-label {
    color: #0f172a;
}

.theme-toggle:checked ~ .page-shell .index-dropdown-list {
    background: #fff;
    border-color: rgba(148, 163, 184, 0.5);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.theme-toggle:checked ~ .page-shell .index-dropdown-list label {
    color: #0f172a;
    border-bottom-color: rgba(148, 163, 184, 0.2);
}

.theme-toggle:checked ~ .page-shell .index-dropdown-list label:hover {
    background: rgba(148, 163, 184, 0.1);
}

.theme-toggle:checked ~ .page-shell .index-select-arrow {
    border-top-color: #6b7280;
}
