/* COINEX — standalone public pages (login, install, guides, diagnostics) */

.coinex-public {
    background: #19191a;
    color: #fff;
}

.coinex-public-bg {
    min-height: 100vh;
    background-size: cover;
    background-position: center;
}

.coinex-public .card,
.coinex-panel .card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #202022;
    color: #fff;
}

.coinex-public .text-muted,
.coinex-panel .text-muted {
    color: #bfbfbf !important;
}

.coinex-public .form-control,
.coinex-public .form-select {
    background-color: #19191a;
    border-color: #313135;
    color: #fff;
}

.coinex-public .form-control:focus,
.coinex-public .form-select:focus {
    border-color: var(--bs-primary, #ff971d);
    box-shadow: 0 0 0 0.15rem rgba(255, 151, 29, 0.15);
}

.coinex-public .form-floating > label {
    color: #bfbfbf;
}

.coinex-public .btn-primary,
.coinex-panel .btn-primary {
    background: var(--bs-primary, #ff971d);
    border-color: var(--bs-primary, #ff971d);
    color: #19191a;
}

.coinex-public .btn-outline-secondary {
    border-color: #7c7c83;
    color: #bfbfbf;
}

.coinex-public .alert-info {
    background: rgba(7, 154, 162, 0.12);
    border-color: rgba(7, 154, 162, 0.35);
    color: #9eeaf0;
}

.coinex-public .alert-warning {
    background: rgba(241, 106, 27, 0.12);
    border-color: rgba(241, 106, 27, 0.35);
    color: #fcd9b6;
}

.coinex-public .alert-danger {
    background: rgba(192, 50, 33, 0.12);
    border-color: rgba(192, 50, 33, 0.35);
    color: #fecaca;
}

.coinex-public .alert-success {
    background: rgba(26, 160, 83, 0.12);
    border-color: rgba(26, 160, 83, 0.35);
    color: #bbf7d0;
}

.coinex-public .table {
    --bs-table-bg: transparent;
    --bs-table-color: #fff;
    --bs-table-border-color: #313135;
}

.coinex-public .table thead th {
    background: #313135;
    color: var(--bs-primary, #ff971d);
}

.coinex-public .badge.bg-primary {
    background: var(--bs-primary, #ff971d) !important;
    color: #19191a !important;
}

.coinex-public .badge.bg-secondary { background: #4a4a4f !important; }
.coinex-public .badge.bg-success { background: #1aa053 !important; }
.coinex-public .badge.bg-danger { background: #c03221 !important; }

.coinex-public .text-primary,
.coinex-panel .text-primary {
    color: var(--bs-primary, #ff971d) !important;
}

.coinex-public code {
    background: rgba(255, 151, 29, 0.12);
    color: #ff971d;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
}

.coinex-public pre,
.coinex-public .guide-pre {
    background: #19191a;
    color: #e5e5e5;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    direction: ltr;
    text-align: left;
    unicode-bidi: isolate;
    font-size: 0.85rem;
    border: 1px solid #313135;
}

.coinex-public pre .guide-pre-fa,
.coinex-public .guide-pre-fa {
    direction: rtl;
    unicode-bidi: isolate;
    display: block;
    text-align: right;
    color: #b8b8bc;
}

.coinex-public .guide-code-wrap {
    position: relative;
    margin: 0.75rem 0 1rem;
}

.coinex-public .guide-code-wrap > pre {
    margin: 0;
    padding-top: 2.75rem;
}

.coinex-public .guide-copy-btn {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    z-index: 2;
    border: 1px solid #4a4a4f;
    border-radius: 0.35rem;
    background: #29292c;
    color: #e5e5e5;
    padding: 0.25rem 0.65rem;
    font: inherit;
    font-size: 0.78rem;
    line-height: 1.35;
    cursor: pointer;
}

.coinex-public .guide-copy-btn:hover,
.coinex-public .guide-copy-btn:focus-visible {
    border-color: var(--bs-primary, #ff971d);
    color: var(--bs-primary, #ff971d);
    outline: none;
}

.coinex-public .guide-copy-btn.is-copied {
    border-color: #1aa053;
    color: #bbf7d0;
}

.coinex-public .guide-copy-btn.is-error {
    border-color: #c03221;
    color: #fecaca;
}

.coinex-public .guide-install-steps {
    padding-right: 1.25rem;
}

.coinex-public .guide-install-steps pre {
    margin-top: 0.35rem;
    margin-bottom: 0;
}

.coinex-public .guide-header {
    background: linear-gradient(135deg, #19191a 0%, #313135 55%, rgba(255, 151, 29, 0.35) 100%);
    color: #fff;
    padding: 2.75rem 0;
    border-bottom: 1px solid rgba(255, 151, 29, 0.25);
}

.coinex-public .guide-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 0 3rem;
}

.coinex-public .guide-md h2,
.coinex-public h2 {
    color: var(--bs-primary, #ff971d);
    margin-top: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #313135;
}

.coinex-public .guide-md h3,
.coinex-public h3 { color: #fff; margin-top: 1.25rem; }

.coinex-public .step-card {
    border-right: 4px solid var(--bs-primary, #ff971d);
    margin-bottom: 1.5rem;
}

.coinex-public .step-number {
    width: 36px;
    height: 36px;
    background: var(--bs-primary, #ff971d);
    color: #19191a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.coinex-public .warn-box {
    border-right: 4px solid #f16a1b;
    background: rgba(241, 106, 27, 0.1);
    padding: 1rem;
    border-radius: 0.5rem;
}

.coinex-public .info-box {
    border-right: 4px solid #079aa2;
    background: rgba(7, 154, 162, 0.1);
    padding: 1rem;
    border-radius: 0.5rem;
}

.coinex-public .success-box {
    border-right: 4px solid #1aa053;
    background: rgba(26, 160, 83, 0.1);
    padding: 1rem;
    border-radius: 0.5rem;
}

.coinex-public .toc a { color: var(--bs-primary, #ff971d); text-decoration: none; }
.coinex-public .toc a:hover { text-decoration: underline; }

.coinex-public .diag-wrap { max-width: 900px; margin: 0 auto; padding: 1.5rem; }
.coinex-public .diag-summary { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1rem 0; }
.coinex-public .diag-pill { padding: 0.5rem 1rem; border-radius: 999px; font-weight: 600; }
.coinex-public .diag-pill-ok { background: rgba(26, 160, 83, 0.15); color: #1aa053; }
.coinex-public .diag-pill-warn { background: rgba(241, 106, 27, 0.15); color: #f16a1b; }
.coinex-public .diag-pill-fail { background: rgba(192, 50, 33, 0.15); color: #c03221; }
.coinex-public .st-ok { color: #1aa053; font-weight: 600; }
.coinex-public .st-warn { color: #f16a1b; font-weight: 600; }
.coinex-public .st-fail { color: #c03221; font-weight: 600; }

.coinex-public .install-steps {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.coinex-public .install-step-badge {
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
}

.coinex-public .install-step-badge.is-active {
    background: var(--bs-primary, #ff971d);
    color: #19191a;
}

.coinex-public .install-step-badge.is-idle {
    background: #313135;
    color: #bfbfbf;
}

.coinex-public .public-top-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.coinex-panel body,
.coinex-panel {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.coinex-panel .bg-light-subtle,
.coinex-panel .bg-body-secondary,
.coinex-public .bg-body-secondary {
    background-color: #19191a !important;
    color: #e5e5e5;
}

.coinex-panel .bg-primary-subtle {
    background-color: rgba(255, 151, 29, 0.15) !important;
}

.coinex-panel .border-dashed { border-color: #313135 !important; }

.coinex-panel .dropdown-menu {
    background: #202022;
    border-color: #313135;
}

.coinex-panel .dropdown-item { color: #fff; }
.coinex-panel .dropdown-item:hover {
    background: rgba(255, 151, 29, 0.12);
    color: #fff;
}

.coinex-panel .nav-tabs .nav-link { color: #bfbfbf; }
.coinex-panel .nav-tabs .nav-link.active {
    background: #202022;
    border-color: #313135 #313135 #202022;
    color: var(--bs-primary, #ff971d);
}

.coinex-panel .modal-content {
    background: #202022;
    border-color: #313135;
    color: #fff;
}

.coinex-panel .list-group-item {
    background: #19191a;
    border-color: #313135;
    color: #fff;
}

.coinex-panel .alert-info {
    background: rgba(7, 154, 162, 0.12);
    border-color: rgba(7, 154, 162, 0.35);
    color: #9eeaf0;
}

.coinex-panel .alert-warning {
    background: rgba(241, 106, 27, 0.12);
    border-color: rgba(241, 106, 27, 0.35);
    color: #fcd9b6;
}

.coinex-panel .alert-danger {
    background: rgba(192, 50, 33, 0.12);
    border-color: rgba(192, 50, 33, 0.35);
    color: #fecaca;
}

.coinex-panel .alert-success {
    background: rgba(26, 160, 83, 0.12);
    border-color: rgba(26, 160, 83, 0.35);
    color: #bbf7d0;
}

.coinex-panel .table-bordered { border-color: #313135; }
.coinex-panel .table-bordered > :not(caption) > * > * { border-color: #313135; }

.coinex-panel .page-link {
    background: #19191a;
    border-color: #313135;
    color: #fff;
}

.coinex-panel .page-item.active .page-link {
    background: var(--bs-primary, #ff971d);
    border-color: var(--bs-primary, #ff971d);
    color: #19191a;
}
