:root {
    --bg: #f4f8fb;
    --bg-accent: #eef3ff;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-strong: #ffffff;
    --surface-dark: #0f172a;
    --line: #dbe4ec;
    --line-strong: #c7d4df;
    --text: #0f172a;
    --muted: #475569;
    --muted-soft: #64748b;
    --brand: #0f766e;
    --brand-strong: #115e59;
    --brand-soft: #ccfbf1;
    --accent: #f59e0b;
    --accent-soft: #fef3c7;
    --danger: #dc2626;
    --danger-soft: #fee2e2;
    --success: #15803d;
    --success-soft: #dcfce7;
    --shadow: 0 20px 44px rgba(15, 23, 42, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.portal-body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.16), transparent 28%),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 32%),
        linear-gradient(180deg, #f9fbfd 0%, #f4f8fb 44%, #eef3ff 100%);
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

.portal-header {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid rgba(219, 228, 236, 0.9);
    background: rgba(248, 250, 252, 0.88);
    backdrop-filter: blur(18px);
}

.portal-header__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    text-decoration: none;
}

.brand__mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0f766e 0%, #2563eb 100%);
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    box-shadow: 0 12px 30px rgba(15, 118, 110, 0.24);
}

.brand__text {
    min-width: 0;
}

.brand__text strong {
    display: block;
    font-size: 1rem;
    letter-spacing: 0.01em;
}

.brand__text span {
    display: block;
    color: var(--muted);
    font-size: 0.84rem;
}

.header-nav,
.header-meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.nav-link,
.ghost-btn,
.secondary-btn,
.primary-btn,
.chip-link,
.auth-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: 999px;
    text-decoration: none;
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.nav-link,
.ghost-btn,
.chip-link,
.auth-link {
    padding: 0.55rem 0.95rem;
}

.nav-link {
    border: 1px solid transparent;
    color: var(--muted);
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--text);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.72);
}

.pill,
.balance-chip,
.user-chip,
.filter-summary,
.price-pill,
.status-pill,
.card-category,
.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 600;
}

.balance-chip {
    padding: 0.5rem 0.9rem;
    color: var(--success);
    background: rgba(21, 128, 61, 0.12);
}

.user-chip {
    padding: 0.5rem 0.85rem;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
}

.portal-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.hero {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    padding: 2.4rem;
    margin-bottom: 1.75rem;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 26%),
        linear-gradient(135deg, #0f172a 0%, #134e4a 48%, #2563eb 100%);
    color: #fff;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
    gap: 1.5rem;
    align-items: stretch;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero__title {
    margin: 1rem 0 0.75rem;
    font-size: clamp(2rem, 4vw, 3.15rem);
    line-height: 1.1;
}

.hero__desc {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.05rem;
}

.hero__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.4rem;
}

.hero__panel {
    padding: 1.35rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
}

.hero__panel-title {
    margin: 0;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.8);
}

.hero__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.hero__stat {
    padding: 1rem;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.18);
}

.hero__stat strong {
    display: block;
    font-size: 1.45rem;
    line-height: 1.1;
    margin-bottom: 0.25rem;
}

.hero__stat span {
    display: block;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.82rem;
}

.section {
    margin-top: 1.8rem;
}

.section__top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.section__top h2,
.section__top h3 {
    margin: 0 0 0.35rem;
    font-size: 1.45rem;
}

.section__intro {
    margin: 0;
    color: var(--muted-soft);
}

.surface-card,
.filter-panel,
.catalog-card,
.metric-card,
.quick-card,
.info-card,
.auth-form-panel {
    background: var(--surface);
    border: 1px solid rgba(219, 228, 236, 0.92);
    box-shadow: var(--shadow);
}

.quick-grid,
.metric-grid,
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.quick-card,
.metric-card,
.info-card {
    border-radius: 24px;
    padding: 1.25rem;
}

.quick-card h3,
.metric-card h3,
.info-card h3 {
    margin: 0 0 0.45rem;
    font-size: 1rem;
}

.quick-card p,
.metric-card p,
.info-card p,
.info-card li {
    margin: 0;
    color: var(--muted);
}

.quick-card:hover,
.catalog-card:hover {
    transform: translateY(-2px);
}

.metric-card strong {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 1.6rem;
}

.filter-panel {
    border-radius: 26px;
    padding: 1.1rem;
}

.search-box {
    display: grid;
    gap: 0.8rem;
}

.search-input {
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--text);
    font-size: 1rem;
}

.search-input:focus,
.auth-field input:focus {
    outline: none;
    border-color: rgba(15, 118, 110, 0.55);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.16);
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.filter-chip {
    padding: 0.58rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.18s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
    color: #fff;
    background: var(--text);
    border-color: var(--text);
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1rem;
}

.catalog-card {
    border-radius: 24px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    cursor: pointer;
}

.catalog-card[hidden] {
    display: none !important;
}

.catalog-card:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.32);
    outline-offset: 3px;
}

.catalog-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.catalog-card__title {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.35;
}

.catalog-card__desc {
    margin: 0;
    color: var(--muted);
    min-height: 3.2rem;
}

.catalog-card__meta {
    display: grid;
    gap: 0.35rem;
    color: var(--muted-soft);
    font-size: 0.9rem;
}

.catalog-card__meta strong {
    color: var(--text);
}

.catalog-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.catalog-card__footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.card-category {
    padding: 0.36rem 0.75rem;
    color: var(--brand-strong);
    background: var(--brand-soft);
}

.price-pill {
    padding: 0.36rem 0.75rem;
    color: #92400e;
    background: var(--accent-soft);
}

.status-pill {
    padding: 0.36rem 0.75rem;
    color: #7c2d12;
    background: #fed7aa;
}

.tag-pill {
    padding: 0.3rem 0.7rem;
    color: var(--muted);
    background: rgba(226, 232, 240, 0.7);
}

.primary-btn,
.secondary-btn {
    padding: 0.72rem 1.15rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, #0f766e 0%, #2563eb 100%);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.18);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.auth-link:hover {
    transform: translateY(-1px);
}

.secondary-btn {
    color: var(--text);
    background: rgba(255, 255, 255, 0.92);
    border-color: var(--line-strong);
}

.secondary-btn.is-disabled {
    pointer-events: none;
    opacity: 0.6;
}

.ghost-btn,
.chip-link,
.auth-link {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.chip-link,
.auth-link {
    color: var(--text);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.72);
}

.notice-banner,
.empty-state,
.alert-box {
    border-radius: 22px;
    padding: 1rem 1.15rem;
}

.notice-banner {
    background: var(--accent-soft);
    border: 1px solid #fcd34d;
    color: #92400e;
}

.empty-state {
    text-align: center;
    background: rgba(255, 255, 255, 0.84);
    border: 1px dashed var(--line-strong);
    color: var(--muted);
}

.empty-state[hidden] {
    display: none !important;
}

.helper-list {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--muted);
}

.helper-list li + li {
    margin-top: 0.45rem;
}

.footer-note {
    margin-top: 1rem;
    color: var(--muted-soft);
    font-size: 0.9rem;
}

.admin-shortcut {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.58rem 0.95rem;
    border-radius: 999px;
    text-decoration: none;
    color: #7c2d12;
    background: #ffedd5;
    border: 1px solid #fdba74;
}

body.launcher-page {
    background: #f5f7fb;
}

body.launcher-page .portal-main {
    max-width: 1220px;
}

body.launcher-page .section__top {
    align-items: center;
}

body.launcher-page .filter-panel {
    margin-bottom: 1.5rem;
    border-radius: 16px;
    padding: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

body.launcher-page .search-box {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0.85rem;
}

body.launcher-page .search-input {
    min-height: 52px;
    border-radius: 12px;
    border-color: #d8e1ed;
    background: #fbfdff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

body.launcher-page .chip-row {
    min-width: 0;
    flex-wrap: wrap;
    gap: 0.65rem;
    overflow: visible;
    padding-bottom: 0;
}

body.launcher-page .filter-chip {
    flex: 0 0 auto;
    min-height: 42px;
    border-radius: 12px;
    padding: 0.58rem 0.9rem;
    white-space: nowrap;
    background: #f8fbff;
    border-color: #dbe6f2;
    color: #334155;
    font-weight: 650;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.launcher-page .filter-chip:hover {
    color: #0f172a;
    background: #eef6ff;
    border-color: #bed5ee;
}

body.launcher-page .filter-chip.is-active {
    color: #fff;
    background: #111827;
    border-color: #111827;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
}

body.launcher-page .launcher-catalog-grid {
    margin-top: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

body.launcher-page .catalog-card {
    min-height: 168px;
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e5edf5;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

body.launcher-page .catalog-card:hover {
    border-color: #cbd9e8;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

body.launcher-page .catalog-card__preview {
    min-width: 0;
}

body.launcher-page .catalog-preview {
    border-radius: 12px;
    border: 1px solid #e6edf5;
    background: #f8fbff;
    overflow: hidden;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
}

body.launcher-page .preview-board {
    position: relative;
    min-height: 104px;
    background:
        linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px),
        linear-gradient(0deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px),
        linear-gradient(145deg, #ffffff 0%, #eef7ff 100%);
    background-size: 18px 18px, 18px 18px, auto;
}

body.launcher-page .preview-board--image {
    background: #fff;
}

body.launcher-page .preview-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0.18rem;
    object-fit: cover;
    display: block;
    box-sizing: border-box;
}

body.launcher-page .catalog-card[data-analysis-type="forest-plot"] .preview-image,
body.launcher-page .preview-image[src*="forest-plot.webp"] {
    object-fit: contain;
}

body.launcher-page .preview-caption {
    padding: 0.38rem 0.55rem;
    border-top: 1px solid #e6edf5;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.launcher-page .catalog-card__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

body.launcher-page .catalog-card__top {
    align-items: center;
    gap: 0.45rem;
}

body.launcher-page .card-category,
body.launcher-page .price-pill,
body.launcher-page .status-pill,
body.launcher-page .tag-pill {
    border-radius: 6px;
    font-size: 0.72rem;
    line-height: 1.1;
}

body.launcher-page .card-category,
body.launcher-page .price-pill,
body.launcher-page .status-pill {
    padding: 0.28rem 0.48rem;
}

body.launcher-page .catalog-card__title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: #172033;
    font-size: 1rem;
    line-height: 1.35;
}

body.launcher-page .catalog-card__desc {
    min-height: 0;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: #708199;
    font-size: 0.85rem;
    line-height: 1.55;
}

body.launcher-page .catalog-card__meta {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: #7b8ba1;
    font-size: 0.78rem;
    line-height: 1.5;
}

body.launcher-page .catalog-card__meta div + div {
    margin-top: 0.16rem;
}

body.launcher-page .catalog-card__tags {
    min-width: 0;
    flex-wrap: nowrap;
    overflow: hidden;
}

body.launcher-page .tag-pill {
    flex: 0 1 auto;
    max-width: 86px;
    padding: 0.28rem 0.45rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #3164d8;
    background: #edf4ff;
}

body.launcher-page .catalog-card__footer {
    margin-top: auto;
    flex-wrap: nowrap;
    align-items: center;
}

body.launcher-page .catalog-card__link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    color: #8da1bd;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

body.launcher-page .catalog-card__link::after {
    content: "→";
    color: #b3c1d2;
}

body.launcher-page .catalog-card__link:hover {
    color: #2563eb;
}

body.launcher-page .preview-heat,
body.launcher-page .preview-bar,
body.launcher-page .preview-dot,
body.launcher-page .preview-node,
body.launcher-page .preview-bond,
body.launcher-page .preview-line,
body.launcher-page .preview-axis,
body.launcher-page .preview-doc,
body.launcher-page .preview-doc-line,
body.launcher-page .preview-circle,
body.launcher-page .preview-chip,
body.launcher-page .preview-ring {
    position: absolute;
    display: block;
}

body.launcher-page .preview-heat {
    width: 18px;
    height: 18px;
    border-radius: 3px;
}

body.launcher-page .preview-heat.h1 { left: 22px; top: 18px; background: #ff9a76; }
body.launcher-page .preview-heat.h2 { left: 44px; top: 18px; background: #ffe08a; }
body.launcher-page .preview-heat.h3 { left: 66px; top: 18px; background: #7cd9b8; }
body.launcher-page .preview-heat.h4 { left: 22px; top: 42px; background: #5f9cff; }
body.launcher-page .preview-heat.h5 { left: 44px; top: 42px; background: #ef6f88; }
body.launcher-page .preview-heat.h6 { left: 66px; top: 42px; background: #a78bfa; }

body.launcher-page .preview-dot {
    width: 13px;
    height: 13px;
    border-radius: 999px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.85);
}

body.launcher-page .dot-a { left: 24px; top: 28px; background: #38bdf8; }
body.launcher-page .dot-b { left: 52px; top: 44px; background: #a78bfa; }
body.launcher-page .dot-c { left: 82px; top: 28px; background: #22c55e; }
body.launcher-page .dot-d { left: 72px; top: 68px; background: #f97316; }
body.launcher-page .preview-axis {
    background: rgba(100, 116, 139, 0.34);
    border-radius: 999px;
}
body.launcher-page .axis-x { left: 18px; right: 18px; bottom: 18px; height: 2px; }
body.launcher-page .axis-y { left: 18px; top: 18px; bottom: 18px; width: 2px; }

body.launcher-page .preview-bar {
    bottom: 22px;
    width: 12px;
    border-radius: 8px 8px 2px 2px;
    background: #2563eb;
}

body.launcher-page .bar-a { left: 26px; height: 28px; background: #60a5fa; }
body.launcher-page .bar-b { left: 45px; height: 48px; background: #2563eb; }
body.launcher-page .bar-c { left: 64px; height: 36px; background: #f97316; }
body.launcher-page .bar-d { left: 83px; height: 62px; background: #16a34a; }
body.launcher-page .preview-line {
    left: 20px;
    right: 18px;
    height: 2px;
    background: rgba(15, 23, 42, 0.14);
    transform-origin: left center;
}
body.launcher-page .line-a { top: 30px; transform: rotate(-8deg); }
body.launcher-page .line-b { top: 58px; transform: rotate(10deg); }

body.launcher-page .preview-node {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #14b8a6;
}
body.launcher-page .node-a { left: 24px; top: 26px; }
body.launcher-page .node-b { right: 24px; top: 34px; background: #f59e0b; }
body.launcher-page .node-c { left: 50px; bottom: 25px; background: #6366f1; }
body.launcher-page .preview-bond {
    height: 3px;
    width: 54px;
    background: rgba(71, 85, 105, 0.28);
    border-radius: 999px;
    transform-origin: left center;
}
body.launcher-page .bond-a { left: 39px; top: 38px; transform: rotate(9deg); }
body.launcher-page .bond-b { left: 43px; top: 58px; transform: rotate(-31deg); }
body.launcher-page .preview-ring {
    right: 24px;
    bottom: 18px;
    width: 34px;
    height: 34px;
    border: 4px solid rgba(20, 184, 166, 0.22);
    border-radius: 999px;
}

body.launcher-page .preview-doc {
    width: 44px;
    height: 58px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #d7e2ee;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}
body.launcher-page .doc-a { left: 26px; top: 23px; transform: rotate(-6deg); }
body.launcher-page .doc-b { left: 50px; top: 18px; transform: rotate(7deg); }
body.launcher-page .preview-doc-line {
    left: 60px;
    height: 4px;
    border-radius: 999px;
    background: #94a3b8;
}
body.launcher-page .preview-doc-line.line-a { top: 35px; width: 34px; transform: none; }
body.launcher-page .preview-doc-line.line-b { top: 49px; width: 28px; transform: none; }
body.launcher-page .preview-doc-line.line-c { top: 63px; width: 38px; transform: none; }

body.launcher-page .preview-circle {
    border-radius: 999px;
    border: 3px solid rgba(37, 99, 235, 0.38);
}
body.launcher-page .circle-a { left: 25px; top: 28px; width: 34px; height: 34px; }
body.launcher-page .circle-b { left: 48px; top: 45px; width: 34px; height: 34px; border-color: rgba(245, 158, 11, 0.45); }
body.launcher-page .circle-c { left: 68px; top: 25px; width: 34px; height: 34px; border-color: rgba(20, 184, 166, 0.45); }
body.launcher-page .preview-chip {
    left: 33px;
    right: 33px;
    bottom: 17px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #14b8a6, #f59e0b);
}

.auth-layout {
    min-height: 100vh;
    padding: 2rem 1rem;
    display: grid;
    place-items: center;
}

.auth-shell {
    width: min(1080px, 100%);
    border-radius: 30px;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.95fr);
    box-shadow: var(--shadow);
    border: 1px solid rgba(219, 228, 236, 0.92);
}

.auth-panel {
    padding: 2.4rem;
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 26%),
        linear-gradient(150deg, #0f172a 0%, #0f766e 52%, #2563eb 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.6rem;
}

.auth-panel h1,
.auth-form-panel h1 {
    margin: 0;
    font-size: clamp(1.9rem, 3vw, 2.5rem);
    line-height: 1.15;
}

.auth-panel p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
}

.auth-panel__list {
    display: grid;
    gap: 0.8rem;
}

.auth-panel__item {
    padding: 1rem 1.05rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.auth-panel__item strong {
    display: block;
    margin-bottom: 0.2rem;
}

.auth-form-panel {
    padding: 2.4rem;
    background: rgba(255, 255, 255, 0.96);
}

.auth-form-panel p {
    color: var(--muted);
}

.auth-stack {
    display: grid;
    gap: 1rem;
}

.auth-field {
    display: grid;
    gap: 0.45rem;
}

.auth-field label {
    font-weight: 600;
}

.auth-field input {
    width: 100%;
    padding: 0.92rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--line-strong);
    background: #fff;
}

.auth-submit {
    width: 100%;
    border: none;
    cursor: pointer;
}

.auth-submit[disabled] {
    opacity: 0.7;
    cursor: wait;
}

.auth-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.auth-links a {
    color: var(--brand-strong);
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.alert-box {
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.alert-box.is-info {
    color: #1d4ed8;
    background: #dbeafe;
    border-color: #93c5fd;
}

.alert-box.is-success {
    color: #166534;
    background: var(--success-soft);
    border-color: #86efac;
}

.alert-box.is-error {
    color: #991b1b;
    background: var(--danger-soft);
    border-color: #fca5a5;
}

.password-meter {
    font-size: 0.86rem;
    color: var(--muted-soft);
}

.password-meter.is-weak {
    color: #b91c1c;
}

.password-meter.is-medium {
    color: #b45309;
}

.password-meter.is-strong {
    color: #166534;
}

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

    body.launcher-page .search-box {
        grid-template-columns: 1fr;
    }

    body.launcher-page .launcher-catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.launcher-page .catalog-card {
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .portal-header__inner,
    .portal-main {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero,
    .auth-panel,
    .auth-form-panel {
        padding: 1.5rem;
    }

    .hero__stats {
        grid-template-columns: 1fr 1fr;
    }

    body.launcher-page .launcher-catalog-grid {
        grid-template-columns: 1fr;
    }

    body.launcher-page .catalog-card {
        grid-template-columns: 108px minmax(0, 1fr);
    }

    .section__top {
        align-items: flex-start;
    }
}

@media (max-width: 520px) {
    .hero__stats,
    .quick-grid,
    .metric-grid,
    .info-grid,
    .catalog-grid {
        grid-template-columns: 1fr;
    }

    .brand {
        width: 100%;
    }

    body.launcher-page .catalog-card {
        grid-template-columns: 1fr;
    }

    body.launcher-page .preview-board {
        min-height: 130px;
    }

    body.launcher-page .preview-image {
        padding: 0.45rem;
        object-fit: contain;
    }
}
