:root {
    --lyear-bg: #f5f6fa;
    --lyear-surface: #ffffff;
    --lyear-surface-alt: #f8fafc;
    --lyear-border: #e6ebf2;
    --lyear-text: #303133;
    --lyear-muted: #7c8798;
    --lyear-primary: #33cabb;
    --lyear-primary-dark: #2ca89b;
    --lyear-accent: #5c7cfa;
    --lyear-sidebar: #283046;
    --lyear-sidebar-soft: #313a53;
    --lyear-header: rgba(255, 255, 255, 0.88);
    --lyear-success: #15c377;
    --lyear-danger: #f96868;
    --lyear-warning: #faa64b;
    --lyear-shadow: 0 16px 40px rgba(36, 46, 66, 0.08);
    --lyear-radius: 14px;
    --lyear-radius-lg: 18px;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--lyear-bg);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--lyear-text);
    background:
        radial-gradient(circle at top right, rgba(92, 124, 250, 0.08), transparent 28%),
        radial-gradient(circle at bottom left, rgba(51, 202, 187, 0.09), transparent 24%),
        var(--lyear-bg);
    font: 14px/1.6 "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

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

[hidden] {
    display: none !important;
}

.notify-stack {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1200;
    display: grid;
    gap: 12px;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}

.notify-item {
    pointer-events: auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: start;
    padding: 16px 16px 14px;
    color: #fff;
    border-radius: 10px;
    box-shadow: 0 18px 42px rgba(20, 28, 45, 0.22);
    animation: notify-in 0.28s ease;
}

.notify-item.is-success {
    background: linear-gradient(135deg, #18c58b, #0fa968);
}

.notify-item.is-error {
    background: linear-gradient(135deg, #ff7a7a, #e55353);
}

.notify-item.is-warning {
    background: linear-gradient(135deg, #ffbe63, #f58b2a);
}

.notify-item.is-info {
    background: linear-gradient(135deg, #5c7cfa, #4263eb);
}

.notify-item.is-hiding {
    animation: notify-out 0.22s ease forwards;
}

.notify-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 16px;
    font-weight: 700;
}

.notify-body strong,
.notify-body p {
    display: block;
    margin: 0;
}

.notify-body strong {
    margin-bottom: 4px;
    font-size: 14px;
    letter-spacing: 0.02em;
}

.notify-body p {
    font-size: 13px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.9);
    word-break: break-word;
}

.notify-close {
    border: 0;
    margin: 0;
    padding: 0;
    width: 28px;
    height: 28px;
    min-height: 0;
    cursor: pointer;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 999px;
    box-shadow: none;
}

.notify-close:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: none;
}

.lyear-layout-web,
.lyear-layout-container {
    min-height: 100vh;
}

.lyear-layout-container {
    display: flex;
}

.lyear-layout-sidebar {
    width: 270px;
    flex: 0 0 270px;
    color: rgba(255, 255, 255, 0.92);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
        var(--lyear-sidebar);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    z-index: 40;
}

.sidebar-header {
    padding: 22px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-badge {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--lyear-primary), var(--lyear-accent));
    box-shadow: 0 10px 28px rgba(92, 124, 250, 0.28);
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-copy strong {
    font-size: 16px;
    line-height: 1.2;
}

.brand-copy small {
    color: rgba(255, 255, 255, 0.56);
    font-size: 12px;
}

.lyear-layout-sidebar-info {
    height: calc(100vh - 87px);
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 24px 18px 18px;
    overflow-y: auto;
}

.sidebar-intro,
.sidebar-card {
    padding: 16px;
    border-radius: var(--lyear-radius);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-intro p,
.sidebar-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
}

.sidebar-card strong {
    display: block;
    margin: 4px 0 8px;
    color: #fff;
    font-size: 15px;
}

.sidebar-card-label {
    color: rgba(255, 255, 255, 0.56);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-card code {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 6px;
    border-radius: 8px;
}

.eyebrow {
    margin: 0 0 10px;
    color: #90a0b7;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.sidebar-intro .eyebrow,
.auth-hero .eyebrow {
    color: rgba(255, 255, 255, 0.58);
}

.sidebar-main {
    display: block;
}

.nav-drawer {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.nav-item a {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 12px;
    transition: background 0.18s ease, transform 0.18s ease;
}

.nav-item a:hover {
    background: rgba(255, 255, 255, 0.07);
}

.nav-item.active a {
    color: #fff;
    background: linear-gradient(135deg, rgba(51, 202, 187, 0.28), rgba(92, 124, 250, 0.24));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.nav-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 700;
    font-size: 13px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.nav-item.active .nav-icon {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.nav-copy {
    display: grid;
    gap: 2px;
}

.nav-copy strong {
    font-size: 14px;
    font-weight: 600;
}

.nav-copy small {
    color: rgba(255, 255, 255, 0.52);
    font-size: 12px;
}

.lyear-backdrop {
    display: none;
}

.lyear-layout-page {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.lyear-layout-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(12px);
    background: var(--lyear-header);
    border-bottom: 1px solid rgba(35, 42, 56, 0.06);
}

.navbar {
    min-height: 78px;
    padding: 12px 26px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.navbar-left,
.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.page-heading {
    min-width: 0;
}

.page-heading .page-kicker {
    margin: 0 0 4px;
    color: var(--lyear-primary-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-heading h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1.25;
}

.page-heading p {
    margin: 6px 0 0;
    color: var(--lyear-muted);
    font-size: 13px;
}

.lyear-aside-toggler {
    width: 44px;
    height: 44px;
    border: 0;
    padding: 0;
    border-radius: 12px;
    background: var(--lyear-surface);
    box-shadow: var(--lyear-shadow);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.lyear-aside-toggler span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #465164;
}

.header-chip,
.header-link,
.profile-chip {
    height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.header-chip {
    color: var(--lyear-muted);
    background: rgba(124, 135, 152, 0.12);
}

.header-link {
    color: #4b5565;
    background: rgba(51, 202, 187, 0.1);
}

.profile-chip {
    color: #fff;
    background: linear-gradient(135deg, var(--lyear-primary), var(--lyear-accent));
    box-shadow: 0 12px 24px rgba(51, 202, 187, 0.24);
}

.lyear-layout-content {
    flex: 1;
}

.container-fluid {
    padding: 24px 26px;
}

.hero-card,
.panel,
.upload-result,
.status-slot {
    min-width: 0;
}

.hero-card,
.panel {
    background: var(--lyear-surface);
    border-radius: var(--lyear-radius-lg);
    box-shadow: var(--lyear-shadow);
    border: 1px solid rgba(230, 235, 242, 0.9);
}

.hero-card {
    padding: 26px 28px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
}

.hero-card h2,
.panel-head h2,
.panel-head h3,
.result-meta h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 600;
}

.hero-card p,
.panel-head p,
.empty-state p,
.result-meta p {
    margin: 0;
    color: var(--lyear-muted);
}

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

.panel {
    padding: 24px;
}

.panel-head {
    margin-bottom: 20px;
}

.panel-head-inline {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.button-link,
button {
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 18px;
    border-radius: 6px;
    color: #fff;
    background: linear-gradient(135deg, var(--lyear-primary), var(--lyear-accent));
    box-shadow: 0 10px 24px rgba(51, 202, 187, 0.2);
    transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

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

.button-secondary {
    color: #4c5667;
    background: #edf2f7;
    box-shadow: none;
}

.button-small {
    min-height: 34px;
    padding: 7px 12px;
    font-size: 13px;
}

button[disabled] {
    opacity: 0.68;
    cursor: progress;
    transform: none;
}

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

.form-grid label {
    display: grid;
    gap: 8px;
    color: #4b5565;
    font-weight: 600;
}

.form-grid input[type="text"],
.form-grid input[type="password"],
.form-grid input[type="file"] {
    width: 100%;
    min-height: 42px;
    padding: 10px 14px;
    color: var(--lyear-text);
    background: var(--lyear-surface-alt);
    border: 1px solid var(--lyear-border);
    border-radius: 6px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.form-grid input[type="file"] {
    padding: 8px 12px;
}

.form-grid input:focus {
    outline: 0;
    border-color: rgba(51, 202, 187, 0.85);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(51, 202, 187, 0.12);
}

.status-slot {
    min-height: 10px;
    margin-bottom: 16px;
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
}

.alert-success {
    color: #0c8f58;
    background: rgba(21, 195, 119, 0.1);
    border-color: rgba(21, 195, 119, 0.18);
}

.alert-error {
    color: #d64747;
    background: rgba(249, 104, 104, 0.12);
    border-color: rgba(249, 104, 104, 0.18);
}

.alert-warning {
    color: #b96a08;
    background: rgba(250, 166, 75, 0.12);
    border-color: rgba(250, 166, 75, 0.18);
}

.alert-info {
    color: #3556dc;
    background: rgba(92, 124, 250, 0.12);
    border-color: rgba(92, 124, 250, 0.18);
}

.table-status {
    margin-bottom: 14px;
    color: var(--lyear-muted);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 840px;
}

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

th {
    color: #667186;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: #fafbfd;
}

tbody tr:hover {
    background: rgba(92, 124, 250, 0.03);
}

td code {
    display: inline-block;
    max-width: 100%;
    padding: 6px 8px;
    color: #415066;
    background: #f3f6fb;
    border-radius: 6px;
    white-space: nowrap;
    overflow-x: auto;
}

.thumb-link {
    display: inline-flex;
}

.thumb-link img {
    width: 110px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--lyear-border);
    background: #eef2f8;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.empty-state {
    padding: 12px 0 4px;
    display: grid;
    gap: 14px;
    justify-items: start;
}

.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 1.1fr) minmax(320px, 0.9fr);
}

.auth-hero {
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(92, 124, 250, 0.35), transparent 28%),
        radial-gradient(circle at bottom left, rgba(51, 202, 187, 0.25), transparent 22%),
        linear-gradient(160deg, #20273c 0%, #2d3957 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.auth-hero-inner {
    width: min(520px, 100%);
}

.auth-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 4vw, 48px);
    line-height: 1.15;
}

.auth-copy {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 15px;
}

.auth-highlights {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.highlight-card,
.auth-note {
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.highlight-card {
    padding: 16px;
}

.highlight-card span {
    display: block;
    color: rgba(255, 255, 255, 0.62);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.highlight-card strong {
    display: block;
    margin-top: 8px;
    font-size: 24px;
}

.auth-note {
    margin-top: 18px;
    padding: 18px;
}

.auth-note strong,
.auth-note p {
    margin: 0;
}

.auth-note p {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.72);
}

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px;
}

.auth-main-inner {
    width: min(520px, 100%);
}

.auth-panel {
    width: 100%;
}

.upload-result {
    margin-top: 20px;
}

.result-card {
    display: grid;
    grid-template-columns: 152px minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--lyear-border);
    border-radius: 12px;
    background: #fbfcff;
}

.result-preview {
    width: 152px;
    height: 102px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--lyear-border);
    background: #eef2f7;
}

.result-meta {
    display: grid;
    gap: 10px;
}

.result-paths {
    display: grid;
    gap: 8px;
}

.result-paths code {
    display: inline-block;
    max-width: 100%;
    padding: 7px 10px;
    color: #415066;
    background: #f3f6fb;
    border-radius: 6px;
    white-space: nowrap;
    overflow-x: auto;
}

@keyframes notify-in {
    from {
        opacity: 0;
        transform: translate3d(0, -12px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes notify-out {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    to {
        opacity: 0;
        transform: translate3d(0, -8px, 0);
    }
}

@media (max-width: 1100px) {
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-hero,
    .auth-main {
        padding: 28px 20px;
    }
}

@media (max-width: 960px) {
    .lyear-layout-sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-100%);
        transition: transform 0.22s ease;
    }

    .sidebar-open .lyear-layout-sidebar {
        transform: translateX(0);
    }

    .lyear-backdrop {
        position: fixed;
        inset: 0;
        z-index: 30;
        background: rgba(13, 18, 30, 0.38);
    }

    .sidebar-open .lyear-backdrop {
        display: block;
    }

    .lyear-aside-toggler {
        display: inline-flex;
    }

    .navbar,
    .container-fluid {
        padding-left: 18px;
        padding-right: 18px;
    }

    .navbar {
        min-height: auto;
        align-items: flex-start;
        flex-direction: column;
    }

    .navbar-left,
    .navbar-right {
        width: 100%;
        flex-wrap: wrap;
    }

    .header-chip {
        display: none;
    }

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

    .hero-actions {
        width: 100%;
    }

    .hero-actions .button-link,
    .hero-actions .button-secondary,
    .hero-actions button {
        width: 100%;
    }

    .result-card {
        grid-template-columns: 1fr;
    }

    .result-preview {
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 2;
    }
}

@media (max-width: 640px) {
    .notify-stack {
        top: 12px;
        right: 12px;
        left: 12px;
        width: auto;
    }

    .hero-card,
    .panel {
        padding: 18px;
    }

    .page-heading h1 {
        font-size: 20px;
    }

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