:root {
    color-scheme: light;
    --ink: #090a0c;
    --text: #22252a;
    --muted: #70757e;
    --subtle: #9ca1a9;
    --line: #deded7;
    --paper: #f7f7f2;
    --paper-2: #ecece6;
    --white: #ffffff;
    --black: #0b0c0f;
    --lime: #caff2c;
    --cyan: #18a5ff;
    --red: #c83232;
    --green: #168a48;
    --amber: #9b6a09;
    --radius: 8px;
    --shadow: 0 24px 70px rgba(9, 10, 12, .13);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--paper);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: var(--paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

a:not(.btn):not(.brand) {
    color: var(--ink);
    font-weight: 700;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
input,
select,
textarea {
    outline-color: rgba(24, 165, 255, .45);
    outline-offset: 3px;
}

h1,
h2,
h3,
h4,
p {
    margin-top: 0;
}

h1,
h2,
h3,
h4 {
    color: var(--ink);
    line-height: 1.08;
    letter-spacing: 0;
}

h1 {
    margin-bottom: 18px;
    font-size: 48px;
    font-weight: 850;
}

h2 {
    margin-bottom: 14px;
    font-size: 30px;
    font-weight: 820;
}

h3 {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 780;
}

h4 {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 780;
}

p {
    margin-bottom: 14px;
}

strong {
    color: var(--ink);
}

code,
pre {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.wrap {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    background: rgba(9, 10, 12, .72);
    backdrop-filter: blur(18px);
}

.nav {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 850;
    white-space: nowrap;
}

.brand::before {
    content: "";
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--lime), var(--cyan));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5);
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-links > a:not(.btn) {
    padding: 8px 11px;
    border-radius: var(--radius);
    color: rgba(255, 255, 255, .82);
    font-size: 14px;
}

.nav-links > a:not(.btn):hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.nav-form {
    margin: 0;
}

.site-header .btn:not(.ghost) {
    background: var(--lime);
    color: var(--ink);
}

.site-main {
    min-height: calc(100vh - 82px);
    padding: 104px 0 58px;
}

.home-main {
    width: 100%;
    padding: 0;
}

.home-main .alert {
    width: min(1180px, calc(100% - 40px));
    margin: 86px auto -68px;
    position: relative;
    z-index: 3;
}

.hero {
    min-height: 86vh;
    padding: 118px 0 76px;
    display: flex;
    align-items: flex-end;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .56) 38%, rgba(0, 0, 0, .08) 72%),
        url("/images/rekordbox-repair-hero.png") center / cover no-repeat;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(340px, .55fr);
    align-items: end;
    gap: 40px;
}

.hero-copy {
    max-width: 780px;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 18px;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .86);
    font-size: 12px;
    font-weight: 800;
}

.hero h1 {
    margin-bottom: 24px;
    color: #fff;
    font-size: 82px;
    line-height: .96;
}

.hero p {
    max-width: 650px;
    color: rgba(255, 255, 255, .78);
    font-size: 20px;
    line-height: 1.78;
}

.hero strong {
    color: #fff;
}

.hero .btn:not(.secondary) {
    background: var(--lime);
    color: var(--ink);
}

.hero .btn.secondary {
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.hero-card {
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--radius);
    background: rgba(13, 15, 18, .66);
    backdrop-filter: blur(22px);
    box-shadow: 0 28px 80px rgba(0, 0, 0, .34);
}

.hero-card h2 {
    color: #fff;
}

.hero-card .muted {
    color: rgba(255, 255, 255, .72);
}

.hero-card .price {
    color: var(--lime);
}

.section-band {
    padding: 72px 0;
    background: var(--paper);
}

.section-band.alt {
    background: #111214;
    color: #fff;
}

.section-head {
    max-width: 760px;
    margin-bottom: 28px;
}

.section-head p {
    color: var(--muted);
    font-size: 18px;
}

.section-band.alt h2,
.section-band.alt h3 {
    color: #fff;
}

.section-band.alt .section-head p {
    color: rgba(255, 255, 255, .66);
}

.panel,
.card {
    border: 1px solid rgba(9, 10, 12, .09);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .78);
    box-shadow: var(--shadow);
}

.panel {
    padding: 32px;
}

.card {
    padding: 24px;
}

.panel > :last-child,
.card > :last-child,
.field > :last-child {
    margin-bottom: 0;
}

.panel h1 {
    font-size: 34px;
}

.panel h2 {
    font-size: 24px;
}

.grid {
    display: grid;
    gap: 18px;
}

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

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

.feature-grid {
    align-items: stretch;
}

.feature-card {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #fff;
}

.step {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 42px;
    border-radius: var(--radius);
    background: var(--ink);
    color: var(--lime);
    font-size: 13px;
    font-weight: 850;
}

.app-layout {
    display: grid;
    grid-template-columns: minmax(0, .78fr) minmax(360px, .52fr);
    gap: 24px;
    align-items: start;
}

.intro-panel {
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        linear-gradient(135deg, rgba(9, 10, 12, .94), rgba(9, 10, 12, .72)),
        url("/images/rekordbox-repair-hero.png") center / cover no-repeat;
    color: #fff;
}

.page-banner {
    min-height: 260px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 24px;
}

.upload-page {
    min-height: calc(100vh - 190px);
    display: flex;
    align-items: center;
}

.upload-shell {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(360px, .7fr);
    gap: 24px;
}

.upload-drop-panel,
.upload-action-panel {
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.upload-drop-panel {
    min-height: 430px;
    padding: 28px;
    display: grid;
    grid-template-rows: minmax(260px, 1fr) auto auto;
    gap: 18px;
    background:
        linear-gradient(135deg, rgba(9, 10, 12, .96), rgba(9, 10, 12, .74)),
        url("/images/rekordbox-repair-hero.png") center / cover no-repeat;
}

.upload-action-panel {
    min-height: 430px;
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(255, 255, 255, .82);
}

.upload-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.upload-dropzone {
    width: 100%;
    height: 100%;
    min-height: 270px;
    border: 2px dashed rgba(255, 255, 255, .42);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.upload-dropzone:hover,
.upload-dropzone.is-dragging {
    border-color: var(--lime);
    background: rgba(202, 255, 44, .12);
    transform: translateY(-1px);
}

.upload-dropzone.has-file {
    border-color: rgba(22, 138, 72, .88);
    background: rgba(22, 138, 72, .16);
}

.upload-dropzone.has-error {
    border-color: rgba(200, 50, 50, .92);
    background: rgba(200, 50, 50, .14);
}

.upload-mark {
    width: 56px;
    height: 56px;
    margin-bottom: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--lime);
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
}

.upload-title {
    max-width: 480px;
    color: #fff;
    font-size: 34px;
    line-height: 1.08;
    font-weight: 850;
}

.upload-copy {
    max-width: 520px;
    margin-top: 12px;
    color: rgba(255, 255, 255, .72);
    font-size: 15px;
}

.upload-state {
    margin-top: 22px;
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 820;
}

.upload-dropzone.has-file .upload-state {
    background: #e6f7ed;
    color: var(--green);
}

.upload-path-field label {
    color: rgba(255, 255, 255, .82);
}

.upload-path-field .input {
    border-color: rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.upload-path-field .input:focus {
    box-shadow: 0 0 0 4px rgba(202, 255, 44, .12);
    border-color: rgba(202, 255, 44, .62);
}

.upload-error {
    margin: 0;
    border-radius: var(--radius);
    background: #fff0ee;
    color: var(--red);
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 800;
}

.upload-summary {
    display: grid;
    gap: 10px;
}

.upload-actions {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
}

.upload-actions .btn {
    width: 100%;
}

.intro-panel h1,
.intro-panel h2,
.intro-panel h3 {
    color: #fff;
}

.intro-panel .muted,
.intro-panel .hint {
    color: rgba(255, 255, 255, .72);
}

.auth-page {
    min-height: calc(100vh - 162px);
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(380px, .7fr);
    gap: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #fff;
}

.auth-visual {
    min-height: 640px;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(9, 10, 12, .12) 0%, rgba(9, 10, 12, .88) 100%),
        url("/images/rekordbox-repair-hero.png") center / cover no-repeat;
}

.auth-visual h1,
.auth-visual h2 {
    color: #fff;
}

.auth-visual p {
    max-width: 520px;
    color: rgba(255, 255, 255, .74);
    font-size: 18px;
}

.auth-panel {
    padding: 54px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
}

.auth-panel .panel {
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
}

.auth-panel form + form {
    margin-top: 26px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
}

.form {
    display: grid;
    gap: 16px;
}

.field label {
    display: block;
    margin: 0 0 7px;
    color: #3c3f45;
    font-size: 13px;
    font-weight: 800;
}

.input,
textarea,
select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    padding: 12px 13px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.input:focus,
textarea:focus,
select:focus {
    border-color: rgba(24, 165, 255, .75);
    box-shadow: 0 0 0 4px rgba(24, 165, 255, .12);
}

.input:disabled {
    color: var(--muted);
    background: #f0f0eb;
}

input[type="file"].input {
    padding: 10px 13px;
}

textarea {
    resize: vertical;
}

.hint {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

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

.alert {
    margin: 0 0 20px;
    padding: 13px 15px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-weight: 700;
}

.alert.ok {
    color: #0f6734;
    border-color: rgba(22, 138, 72, .24);
    background: #e8f7ee;
}

.alert.err {
    color: #962222;
    border-color: rgba(200, 50, 50, .22);
    background: #fff0ee;
}

.status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border: 1px solid rgba(9, 10, 12, .1);
    border-radius: 999px;
    background: #ecece7;
    color: #4d5158;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 800;
}

.status.ready {
    border-color: rgba(22, 138, 72, .22);
    background: #e6f7ed;
    color: var(--green);
}

.status.failed {
    border-color: rgba(200, 50, 50, .22);
    background: #fff0ee;
    color: var(--red);
}

.status.pending {
    border-color: rgba(155, 106, 9, .2);
    background: #fff6df;
    color: var(--amber);
}

.btn,
.button {
    min-height: 48px;
    border: 0;
    border-radius: var(--radius);
    background: var(--black);
    color: #fff;
    padding: 12px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 820;
    line-height: 1.2;
    white-space: nowrap;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn:hover,
.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(9, 10, 12, .16);
}

.btn:disabled,
.button:disabled {
    cursor: not-allowed;
    opacity: .52;
    transform: none;
    box-shadow: none;
}

.btn.secondary,
.button.secondary {
    background: #ebebe5;
    color: var(--ink);
}

.btn.danger {
    background: var(--red);
    color: #fff;
}

.btn.ghost {
    min-height: 40px;
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.btn.compact {
    min-height: 38px;
    padding: 8px 14px;
}

.actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.actions.between {
    justify-content: space-between;
}

.actions.between h1 {
    margin-bottom: 0;
}

.actions form {
    margin: 0;
}

.top-space {
    margin-top: 22px;
}

.price {
    color: var(--ink);
    font-size: 56px;
    line-height: 1;
    font-weight: 850;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    border-bottom: 1px solid var(--line);
    padding: 14px 10px;
    vertical-align: top;
}

th {
    color: #72767f;
    font-size: 12px;
    font-weight: 800;
}

td {
    color: #292c31;
    font-size: 14px;
}

tbody tr:hover td {
    background: rgba(255, 255, 255, .56);
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.table-wrap table {
    min-width: 680px;
}

.admin-shell {
    grid-template-columns: 248px minmax(0, 1fr);
    align-items: start;
}

.admin-sidebar {
    position: sticky;
    top: 96px;
    background: var(--black);
    color: #fff;
}

.admin-sidebar h2 {
    color: #fff;
}

.admin-nav {
    display: grid;
    gap: 6px;
}

.admin-nav a {
    padding: 11px 12px;
    border-radius: var(--radius);
    color: rgba(255, 255, 255, .76);
}

.admin-nav a:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.filter-select {
    max-width: 220px;
}

.search-input {
    max-width: 260px;
}

.qr-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.qr-code {
    width: 220px;
    height: 220px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

pre.hint {
    max-height: 360px;
    overflow: auto;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f0f0eb;
    color: #4c5057;
    white-space: pre-wrap;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 50;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(9, 10, 12, .62);
    backdrop-filter: blur(10px);
}

.modal.active {
    display: flex;
}

.modal .panel {
    width: min(440px, 100%);
    background: #fff;
}

.footer {
    padding: 28px 0 34px;
    color: #8d9096;
    font-size: 13px;
}

.pagination,
nav[role="navigation"] {
    color: var(--muted);
}

nav[role="navigation"] a,
nav[role="navigation"] span {
    border-radius: 8px !important;
}

@media (max-width: 1020px) {
    .hero-grid,
    .app-layout,
    .auth-page,
    .upload-shell,
    .admin-shell,
    .page-banner {
        grid-template-columns: 1fr;
    }

    .hero {
        align-items: center;
    }

    .hero h1 {
        font-size: 58px;
    }

    .auth-visual {
        min-height: 360px;
    }

    .admin-sidebar {
        position: static;
    }

    .grid.three,
    .grid.two {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .wrap {
        width: min(100% - 28px, 1180px);
    }

    .site-header {
        position: sticky;
    }

    .nav {
        min-height: auto;
        padding: 14px 0;
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

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

    .site-main {
        padding-top: 26px;
    }

    .home-main {
        padding-top: 0;
    }

    .hero {
        min-height: auto;
        padding: 72px 0 44px;
    }

    .hero h1 {
        font-size: 42px;
    }

    h1 {
        font-size: 34px;
    }

    h2 {
        font-size: 26px;
    }

    .hero p,
    .auth-visual p {
        font-size: 16px;
    }

    .panel,
    .card,
    .hero-card,
    .auth-panel,
    .auth-visual {
        padding: 22px;
    }

    .auth-visual {
        min-height: 280px;
    }

    .actions {
        width: 100%;
        align-items: stretch;
    }

    .actions .btn,
    .actions form,
    .actions form .btn,
    .form .btn {
        width: 100%;
    }

    .actions.between {
        align-items: stretch;
    }

    .filter-select,
    .search-input {
        max-width: none;
    }

    .upload-page {
        min-height: auto;
    }

    .upload-shell {
        gap: 18px;
    }

    .upload-drop-panel,
    .upload-action-panel {
        min-height: auto;
        padding: 22px;
    }

    .upload-title {
        font-size: 28px;
    }

    .upload-actions {
        grid-template-columns: 1fr;
    }

    th,
    td {
        padding: 12px 8px;
        font-size: 13px;
    }
}
