:root {
    --bg: #120d18;
    --bg-soft: #1c1424;
    --panel: rgba(35, 24, 46, 0.84);
    --panel-strong: rgba(27, 19, 36, 0.96);
    --border: rgba(255, 120, 196, 0.24);
    --text: #fff4fb;
    --muted: #d8b9cf;
    --pink: #ff4fa2;
    --pink-soft: #ff8dca;
    --cyan: #51e8d4;
    --gold: #ffd166;
    --shadow: 0 24px 70px rgba(8, 6, 14, 0.45);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(255, 79, 162, 0.18), transparent 34%),
        radial-gradient(circle at 80% 15%, rgba(81, 232, 212, 0.14), transparent 28%),
        linear-gradient(180deg, #100b16 0%, #18111f 55%, #0e0a14 100%);
    color: var(--text);
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
}

body {
    overflow-x: hidden;
}

.page-shell {
    position: relative;
    max-width: 1240px;
    margin: 0 auto;
    padding: 40px 20px 72px;
}

.page-shell-landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.flash {
    margin-bottom: 18px;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 700;
}

.flash-success {
    background: rgba(81, 232, 212, 0.12);
    color: #b8fff4;
}

.flash-error {
    background: rgba(255, 79, 162, 0.12);
    color: #ffd5ea;
}

.ambient {
    position: absolute;
    border-radius: 999px;
    filter: blur(90px);
    opacity: 0.6;
    pointer-events: none;
}

.ambient-a {
    top: -40px;
    left: -100px;
    width: 280px;
    height: 280px;
    background: rgba(255, 79, 162, 0.28);
}

.ambient-b {
    top: 160px;
    right: -70px;
    width: 320px;
    height: 320px;
    background: rgba(81, 232, 212, 0.16);
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 24px;
    margin-bottom: 28px;
}

.hero-compact h1 {
    max-width: 14ch;
}

.landing-shell {
    position: relative;
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-card {
    position: relative;
    width: min(100%, 980px);
    padding: 56px;
    border-radius: 36px;
    border: 1px solid rgba(255, 120, 196, 0.28);
    background:
        linear-gradient(180deg, rgba(34, 20, 45, 0.94), rgba(19, 13, 28, 0.98));
    box-shadow: var(--shadow);
    overflow: hidden;
}

.landing-card::before {
    content: "";
    position: absolute;
    inset: 16px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    pointer-events: none;
}

.landing-card::after {
    content: "";
    position: absolute;
    top: -120px;
    right: -100px;
    width: 320px;
    height: 320px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 79, 162, 0.34), rgba(255, 79, 162, 0));
    filter: blur(16px);
    pointer-events: none;
}

.landing-mark {
    position: relative;
    z-index: 1;
    margin: 0 0 18px;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    font-size: 0.82rem;
    color: var(--pink-soft);
}

.landing-title {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: clamp(4.4rem, 13vw, 9rem);
    line-height: 0.86;
    letter-spacing: -0.07em;
    text-transform: uppercase;
    text-wrap: balance;
}

.landing-title span {
    display: block;
}

.landing-subtitle {
    position: relative;
    z-index: 1;
    max-width: 34ch;
    margin: 26px 0 0;
    color: var(--muted);
    font-size: 1.06rem;
    line-height: 1.75;
}

.landing-actions {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.landing-note {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.landing-note span {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
    font-size: 0.92rem;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    margin-bottom: 18px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: rgba(28, 20, 36, 0.84);
    box-shadow: var(--shadow);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-badge p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.18);
}

.user-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--pink), #ff6fb8);
    color: #fff;
    font-weight: 800;
}

.hero-copy,
.hero-card,
.card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: var(--panel);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.hero-copy {
    padding: 34px;
}

.hero-card {
    padding: 28px;
    background: linear-gradient(180deg, rgba(28, 20, 36, 0.98), rgba(21, 16, 29, 0.94));
}

.eyebrow {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.77rem;
    color: var(--pink-soft);
}

h1,
h2 {
    margin: 0;
    line-height: 1.08;
}

h1 {
    font-size: clamp(2.2rem, 4vw, 4.4rem);
    max-width: 12ch;
}

h2 {
    font-size: 1.6rem;
    margin-bottom: 14px;
}

.lede {
    margin: 18px 0 0;
    max-width: 62ch;
    color: var(--muted);
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.primary-button {
    background: linear-gradient(135deg, var(--pink), #ff6fb8);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-1px);
}

.primary-button-lg {
    min-height: 60px;
    padding: 0 26px;
    font-size: 1rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    margin-bottom: 12px;
    font-size: 0.84rem;
    font-weight: 700;
}

.status-ok {
    color: #0d3728;
    background: linear-gradient(135deg, #7df4c2, #51e8d4);
}

.status-warn {
    color: #38200f;
    background: linear-gradient(135deg, #ffd166, #ffb455);
}

.check-list,
.steps {
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
    line-height: 1.7;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.card-span-2 {
    grid-column: 1 / -1;
}

.card {
    padding: 28px;
    background: linear-gradient(180deg, rgba(34, 23, 45, 0.94), rgba(22, 16, 30, 0.98));
}

.access-card {
    max-width: 760px;
    margin: 0 auto;
}

.section-head {
    margin-bottom: 18px;
}

.panel-nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.panel-nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.04);
    transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.panel-nav-link:hover,
.panel-nav-link.is-active {
    transform: translateY(-1px);
    color: var(--text);
    border-color: rgba(255, 120, 196, 0.34);
    background: rgba(255, 79, 162, 0.12);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.metric-grid-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.metric-label {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.92rem;
}

.metric strong {
    font-size: 1.8rem;
    color: var(--gold);
}

.sync-list,
.log-table {
    display: grid;
    gap: 12px;
}

.sync-row,
.log-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sync-row p,
.log-row p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.sync-meta,
.log-row-meta {
    display: grid;
    gap: 6px;
    min-width: 170px;
    text-align: right;
    color: var(--muted);
}

.sync-meta small,
.log-row-meta small {
    color: var(--cyan);
}

.channel-list,
.feature-list {
    display: grid;
    gap: 12px;
}

.channel-list div,
.feature-list span {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-list span {
    justify-content: flex-start;
}

.summary-columns {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.summary-box {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.summary-box h3 {
    margin: 0 0 14px;
    font-size: 1rem;
}

.summary-box p {
    margin: 8px 0 0;
    color: var(--muted);
}

.summary-box strong {
    color: var(--text);
}

code {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--cyan);
}

.filters-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    outline: none;
}

.input-sm {
    max-width: 140px;
}

.input-xs {
    max-width: 96px;
}

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

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

.album-card-button {
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 22px;
    overflow: hidden;
    text-align: left;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.album-card-button:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 120, 196, 0.34);
    box-shadow: 0 20px 40px rgba(7, 5, 14, 0.26);
}

.album-image-wrap {
    aspect-ratio: 0.72;
    background: linear-gradient(180deg, rgba(255, 79, 162, 0.16), rgba(81, 232, 212, 0.08));
}

.album-image,
.modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.album-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--muted);
}

.album-copy {
    padding: 16px;
}

.album-copy h3 {
    margin: 0;
    font-size: 1rem;
}

.album-copy p {
    margin: 8px 0 0;
    color: var(--muted);
}

.album-copy-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.rarity-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 79, 162, 0.14);
    color: #ffd3ea;
    font-size: 0.8rem;
    white-space: nowrap;
}

.album-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    color: var(--cyan);
    font-size: 0.92rem;
}

.tool-stack {
    display: grid;
    gap: 14px;
}

.tool-field {
    display: grid;
    gap: 8px;
}

.tool-field span {
    color: var(--muted);
}

.calc-result {
    display: grid;
    gap: 8px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 79, 162, 0.1);
    border: 1px solid rgba(255, 120, 196, 0.24);
}

.calc-result strong {
    font-size: 2rem;
    color: var(--gold);
}

.editable-list {
    display: grid;
    gap: 12px;
}

.editable-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 140px minmax(0, 1fr) 96px auto;
    gap: 10px;
    align-items: center;
}

.editable-row-new {
    margin-top: 8px;
}

.inline-delete {
    margin-top: -4px;
}

.delete-button {
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(255, 107, 107, 0.24);
    border-radius: 14px;
    background: rgba(255, 107, 107, 0.1);
    color: #ffd8d8;
    cursor: pointer;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(5, 4, 8, 0.82);
    backdrop-filter: blur(12px);
    z-index: 40;
}

.modal-card {
    width: min(100%, 920px);
    padding: 22px;
    border-radius: 28px;
    border: 1px solid rgba(255, 120, 196, 0.24);
    background: rgba(22, 16, 30, 0.96);
    box-shadow: var(--shadow);
}

.modal-image {
    max-height: 72vh;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
}

.modal-copy {
    margin-top: 14px;
}

.modal-copy h3 {
    margin: 0;
    font-size: 1.35rem;
}

.modal-copy p {
    margin: 8px 0 0;
    color: var(--muted);
}

.modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 12px;
    margin-bottom: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    cursor: pointer;
}

.steps li + li {
    margin-top: 10px;
}

@media (max-width: 920px) {
    .topbar,
    .hero,
    .content-grid {
        grid-template-columns: 1fr;
    }

    .metric-grid,
    .metric-grid-4,
    .summary-columns,
    .album-grid {
        grid-template-columns: 1fr;
    }

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

    .sync-row,
    .log-row {
        flex-direction: column;
    }

    .sync-meta,
    .log-row-meta {
        min-width: 0;
        text-align: left;
    }
}

@media (max-width: 640px) {
    .page-shell {
        padding: 18px 14px 40px;
    }

    .landing-shell {
        min-height: calc(100vh - 36px);
    }

    .landing-card {
        padding: 30px 22px;
        border-radius: 26px;
    }

    .landing-card::before {
        inset: 10px;
        border-radius: 20px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-copy,
    .hero-card,
    .card {
        padding: 22px;
        border-radius: 22px;
    }

    .channel-list div {
        flex-direction: column;
        align-items: flex-start;
    }

    .panel-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filters-row {
        flex-direction: column;
    }
}
