/* OAuthorize UI overrides — компактный layout без лишней прокрутки */

html {
    height: auto !important;
    overflow-y: auto;
}

body.oa-app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-height: none;
    margin: 0;
}

.oa-nav {
    flex-shrink: 0;
    padding: 0.75rem 1.25rem;
}

.oa-main {
    flex: 1 0 auto;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.25rem 1.25rem 1.5rem;
}

.oa-footer {
    flex-shrink: 0;
    padding: 1rem 1.25rem;
    font-size: 0.8125rem;
}

.oa-title {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    margin: 0 0 0.6rem;
    line-height: 1.2;
}

.oa-sub {
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.oa-card {
    padding: 1rem 1.15rem;
}

.oa-grid { gap: 0.75rem; }
.oa-grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.oa-grid-3 { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.oa-grid-4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.oa-platform-card {
    padding: 1rem 0.75rem;
}

.oa-platform-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 0.5rem;
}

.oa-btn {
    padding: 0.7rem 1.2rem;
    font-size: 0.9375rem;
}

.oa-field {
    margin-bottom: 0.75rem;
}

.oa-field input,
.oa-field select,
.oa-field textarea {
    padding: 0.65rem 0.85rem;
}

.oa-stat-value {
    font-size: 1.35rem;
}

.oa-alert {
    margin-bottom: 0.75rem;
    padding: 0.75rem 1rem;
}

/* ─── Home ─── */
.oa-hero {
    position: relative;
    text-align: center;
    padding: 1.5rem 0 1.25rem;
    margin-bottom: 1.25rem;
}

.oa-hero::before {
    content: '';
    position: absolute;
    top: -2rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(600px, 90vw);
    height: 200px;
    background: radial-gradient(ellipse, rgba(131,56,236,.18) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.oa-hero > * { position: relative; z-index: 1; }

.oa-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(131,56,236,.12);
    border: 1px solid rgba(131,56,236,.25);
    color: #c9a0ff;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.oa-hero h1 {
    font-family: var(--fd);
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 0.75rem;
}

.oa-hero h1 span {
    background: var(--vg);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.oa-hero-desc {
    color: var(--cx);
    max-width: 520px;
    margin: 0 auto 1.25rem;
    font-size: 0.975rem;
    line-height: 1.55;
}

.oa-hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.oa-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

.oa-feature {
    text-align: center;
    padding: 1rem 0.75rem;
    background: var(--ol);
    border: 1px solid var(--sr);
    border-radius: var(--q2);
}

.oa-feature strong {
    display: block;
    font-size: 0.9375rem;
    color: var(--ig);
    margin-bottom: 0.25rem;
}

.oa-feature span {
    font-size: 0.7rem;
    color: var(--bw);
}

.oa-section-title {
    font-family: var(--fd);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: var(--ig);
}

.oa-platforms {
    margin-bottom: 1.25rem;
}

.oa-platform-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.85rem 0.5rem;
    text-decoration: none;
    color: inherit;
    background: var(--ol);
    border: 1px solid var(--sr);
    border-radius: var(--q2);
    transition: var(--w1);
    font-size: 0.8125rem;
    font-weight: 600;
}

.oa-platform-tile:hover {
    border-color: var(--hr);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(131,56,236,.15);
}

.oa-platform-tile img {
    width: 36px;
    height: 36px;
}

.oa-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
}

.oa-step {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem;
    background: var(--ol);
    border: 1px solid var(--sr);
    border-radius: var(--q2);
}

.oa-step-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--vg);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}

.oa-step strong {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 0.15rem;
}

.oa-step p {
    font-size: 0.75rem;
    color: var(--bw);
    margin: 0;
    line-height: 1.4;
}

/* Order page compact */
.oa-order-step-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 1rem 0 0.5rem;
    color: var(--ig);
}

.oa-order-step-title:first-child {
    margin-top: 0;
}

.oa-service-item {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 0.75rem 1rem;
    background: var(--ol);
    border: 1px solid var(--sr);
    border-radius: var(--q2);
    margin-bottom: 0.5rem;
    transition: var(--w1);
}

.oa-service-item:hover,
.oa-service-item.selected {
    border-color: var(--hr);
}

.oa-service-item strong {
    font-size: 0.875rem;
}

.oa-service-meta {
    font-size: 0.75rem;
    color: var(--bw);
    margin-top: 0.25rem;
}

/* Auth pages — центрирование без прокрутки */
.oa-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 140px);
    padding: 1rem 0;
}

.oa-auth-card {
    width: 100%;
    max-width: 440px;
}

.oa-auth-card .oa-field {
    margin-bottom: 0.6rem;
}

.oa-auth-card .oa-title {
    margin-bottom: 0.85rem;
}

@media (max-width: 768px) {
    .oa-features { grid-template-columns: repeat(2, 1fr); }
    .oa-steps { grid-template-columns: 1fr; }
    .oa-nav { flex-direction: column; align-items: flex-start; }
    .oa-main { padding: 1rem; }
    .oa-auth { min-height: auto; }
}
