/* ====================================================
   酷开影视会员管理系统 - Cinematic Visual Shell
   保持业务逻辑不变，仅重构前端视觉层
   ==================================================== */

:root {
    --bg-0: #060d24;
    --bg-1: #0f1834;
    --bg-2: #151f42;
    --bg-3: #1a2445;
    --text-0: #e0e4ff;
    --text-1: #a4aac8;
    --line: rgba(64, 71, 97, 0.16);
    --line-strong: rgba(64, 71, 97, 0.28);
    --primary: #85adff;
    --primary-soft: #6d9fff;
    --secondary: #6fd2fe;
    --danger: #ff6e81;
    --danger-deep: #ff0354;
    --success: #6fd2fe;
    --shadow-ambient: 0 0 40px rgba(133, 173, 255, 0.06);
    --shadow-card: 0 22px 60px rgba(4, 8, 24, 0.3);
    --radius-sm: 1rem;
    --radius-md: 1.5rem;
    --radius-lg: 2rem;
    --radius-xl: 3rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-0);
    background:
        radial-gradient(circle at 12% 12%, rgba(133, 173, 255, 0.12), transparent 22%),
        radial-gradient(circle at 88% 10%, rgba(111, 210, 254, 0.1), transparent 22%),
        radial-gradient(circle at 100% 0%, #22356f 0%, #0d1635 36%, #060d24 100%);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
}

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

.glass-card {
    position: relative;
    background: rgba(26, 36, 69, 0.42);
    border: 1px solid var(--line);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    box-shadow: var(--shadow-card);
}

.glass-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 26%);
}

.custom-scrollbar::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(133, 173, 255, 0.16);
    border-radius: 999px;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 17rem;
    height: 100vh;
    padding: 1.9rem 1.4rem 1.6rem;
    display: flex;
    flex-direction: column;
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
    background: rgba(8, 14, 36, 0.62);
    border-right: 1px solid rgba(64, 71, 97, 0.1);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    box-shadow: var(--shadow-ambient);
    z-index: 50;
}

.sidebar .logo {
    display: inline-block;
    font-family: 'Manrope', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -0.06em;
    color: var(--primary);
}

.sidebar .logo-sub {
    display: block;
    margin-top: 0.4rem;
    color: rgba(164, 170, 200, 0.68);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.82rem;
    width: 100%;
    padding: 0.86rem 1.05rem;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: rgba(224, 228, 255, 0.58);
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}

.nav-item:hover {
    color: var(--text-0);
    background: rgba(64, 71, 97, 0.2);
}

.nav-item.active {
    color: #060d24;
    background: linear-gradient(135deg, var(--primary), var(--primary-soft));
    box-shadow: 0 0 15px rgba(133, 173, 255, 0.35);
}

.nav-item:active,
.btn:active,
.icon-btn:active,
.chip:active {
    transform: scale(0.98);
}

.main-content {
    margin-left: 17rem;
    min-height: 100vh;
    padding: 2.9rem 3.1rem 3rem;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.4rem;
    margin-bottom: 2.2rem;
}

.page-title {
    font-family: 'Manrope', sans-serif;
    font-size: 2rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.page-subtitle {
    margin-top: 0.65rem;
    color: rgba(164, 170, 200, 0.72);
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 46rem;
}

.section-title {
    font-family: 'Manrope', sans-serif;
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.search-box,
.field,
select.search-box {
    width: 100%;
    color: var(--text-0);
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(64, 71, 97, 0.25);
    border-radius: 999px;
    padding: 0.85rem 1.15rem;
    outline: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.search-box::placeholder,
.field::placeholder,
textarea::placeholder {
    color: rgba(164, 170, 200, 0.45);
}

.search-box:focus,
.field:focus,
textarea:focus,
select.search-box:focus {
    border-color: rgba(133, 173, 255, 0.42);
    box-shadow: 0 0 0 1px rgba(133, 173, 255, 0.32), 0 0 22px rgba(133, 173, 255, 0.08);
}

textarea,
select.search-box {
    border-radius: var(--radius-md);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.9rem;
    padding: 0.78rem 1.25rem;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-primary {
    color: #060d24;
    background: linear-gradient(135deg, var(--primary), var(--primary-soft));
    box-shadow: 0 10px 30px rgba(133, 173, 255, 0.22);
}

.btn-primary:hover {
    opacity: 0.95;
}

.btn-ghost {
    color: var(--text-0);
    background: rgba(26, 36, 69, 0.48);
    border: 1px solid rgba(64, 71, 97, 0.28);
}

.btn-ghost:hover {
    background: rgba(35, 48, 84, 0.62);
}

.btn-danger {
    color: #060d24;
    background: linear-gradient(135deg, #ff6e81, #ff8797);
    box-shadow: 0 10px 30px rgba(255, 110, 129, 0.18);
}

.icon-btn {
    width: 2.55rem;
    height: 2.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(26, 36, 69, 0.46);
    color: rgba(224, 228, 255, 0.68);
    cursor: pointer;
    transition: transform 0.18s ease, background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}

.icon-btn:hover {
    color: var(--text-0);
    background: rgba(64, 71, 97, 0.24);
}

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

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.62rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(64, 71, 97, 0.22);
    background: rgba(26, 36, 69, 0.34);
    color: rgba(224, 228, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.chip.active {
    color: #060d24;
    background: linear-gradient(135deg, var(--primary), var(--primary-soft));
    box-shadow: 0 0 18px rgba(133, 173, 255, 0.26);
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.35rem;
}

.kpi-card {
    padding: 1.8rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.28s ease;
}

.kpi-card:hover {
    transform: translateY(-3px);
}

.kpi-glow {
    position: absolute;
    right: -2.3rem;
    top: -2.3rem;
    width: 9rem;
    height: 9rem;
    opacity: 0.3;
    filter: blur(60px);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.kpi-card:hover .kpi-glow {
    opacity: 0.55;
}

.kpi-value {
    margin-top: 0.55rem;
    font-family: 'Manrope', sans-serif;
    font-size: 3rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.07em;
}

.kpi-rule {
    width: 3rem;
    height: 0.25rem;
    margin-top: 1rem;
    border-radius: 999px;
}

.surface-grid {
    display: grid;
    gap: 1.5rem;
}

.panel {
    padding: 1.6rem;
    border-radius: var(--radius-lg);
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.panel-title {
    font-family: 'Manrope', sans-serif;
    font-size: 1.28rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.asset-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.asset-card {
    padding: 1.28rem;
    border-radius: var(--radius-lg);
    display: grid;
    grid-template-columns: auto minmax(0, 17rem) minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.15rem;
    transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.asset-card:hover {
    transform: translateY(-2px);
}

.asset-card.selected {
    border-color: rgba(133, 173, 255, 0.36);
    background: rgba(26, 36, 69, 0.58);
    box-shadow: 0 0 0 1px rgba(133, 173, 255, 0.18), var(--shadow-card);
}

.asset-ident {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    min-width: 0;
}

.asset-logo {
    width: 3.3rem;
    height: 3.3rem;
    border-radius: 1rem;
    background: rgba(224, 228, 255, 0.96);
    color: #22356f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Manrope', sans-serif;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(64, 71, 97, 0.08), 0 8px 20px rgba(0, 0, 0, 0.15);
}

.asset-title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.asset-meta,
.asset-sub {
    color: rgba(164, 170, 200, 0.72);
    font-size: 0.76rem;
}

.asset-sub {
    margin-top: 0.22rem;
}

.asset-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.48rem;
}

.asset-timeline-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: rgba(164, 170, 200, 0.72);
    font-size: 0.64rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 800;
}

.timeline-track {
    position: relative;
    height: 0.85rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(17, 24, 52, 0.78);
    border: 1px solid rgba(64, 71, 97, 0.24);
}

.timeline-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 40%;
    border-radius: inherit;
}

.timeline-fill.safe {
    background: linear-gradient(90deg, #17a8da, #6fd2fe);
    box-shadow: 0 0 15px rgba(111, 210, 254, 0.26);
}

.timeline-fill.primary {
    background: linear-gradient(90deg, #2674ef, #85adff);
    box-shadow: 0 0 15px rgba(133, 173, 255, 0.22);
}

.timeline-fill.risk {
    background-color: var(--danger);
    box-shadow: 0 0 15px rgba(255, 110, 129, 0.3);
}

.timeline-pulse {
    background-size: 30px 30px;
    background-image: repeating-linear-gradient(
        45deg,
        rgba(255, 110, 129, 0.18),
        rgba(255, 110, 129, 0.18) 10px,
        rgba(255, 110, 129, 0.4) 10px,
        rgba(255, 110, 129, 0.4) 20px
    );
    animation: stripe-scroll 1.4s linear infinite;
}

@keyframes stripe-scroll {
    0% { background-position: 0 0; }
    100% { background-position: 30px 0; }
}

.timeline-dot {
    position: absolute;
    top: 50%;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: #f6f8ff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.asset-metric {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    min-width: 9.5rem;
}

.metric-number {
    font-family: 'Manrope', sans-serif;
    font-size: 1.06rem;
    font-weight: 800;
}

.metric-risk {
    color: var(--danger);
}

.metric-safe {
    color: var(--secondary);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    padding: 0.32rem 0.8rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.badge-ok {
    background: rgba(111, 210, 254, 0.13);
    color: var(--secondary);
}

.badge-warn {
    background: rgba(255, 110, 129, 0.15);
    color: var(--danger);
}

.badge-sold {
    background: rgba(133, 173, 255, 0.14);
    color: var(--primary);
}

.badge-dead {
    background: rgba(255, 113, 108, 0.14);
    color: #ff8b84;
}

.table-shell {
    overflow: auto;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.7rem;
}

.data-table thead th {
    padding: 0.3rem 1rem 0.55rem;
    color: rgba(164, 170, 200, 0.68);
    font-size: 0.66rem;
    letter-spacing: 0.17em;
    text-transform: uppercase;
    text-align: left;
}

.data-table tbody tr {
    background: rgba(26, 36, 69, 0.34);
    transition: background 0.2s ease, transform 0.2s ease;
}

.data-table tbody tr:hover {
    background: rgba(26, 36, 69, 0.54);
    transform: translateY(-1px);
}

.data-table tbody td {
    padding: 1rem;
    font-size: 0.84rem;
    vertical-align: middle;
}

.data-table tbody td:first-child {
    border-radius: 1rem 0 0 1rem;
}

.data-table tbody td:last-child {
    border-radius: 0 1rem 1rem 0;
}

.hero-strip {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.8rem;
}

.hero-inline-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    color: rgba(164, 170, 200, 0.76);
    font-size: 0.88rem;
}

.hero-inline-nav .active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.25rem;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.toolbar-shell {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.floating-selection {
    position: sticky;
    bottom: 1.5rem;
    z-index: 20;
    margin-top: 1rem;
}

.selection-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-radius: 999px;
}

.selection-bar.show {
    display: flex;
}

.selection-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(3, 7, 20, 0.7);
    backdrop-filter: blur(12px);
    z-index: 100;
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    width: min(94vw, 38rem);
    padding: 2rem;
    border-radius: var(--radius-lg);
}

.modal-box h2 {
    font-family: 'Manrope', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
}

.modal-box p.meta {
    margin-bottom: 1rem;
    color: rgba(164, 170, 200, 0.72);
    font-size: 0.84rem;
    line-height: 1.6;
}

.modal-box textarea {
    width: 100%;
    min-height: 11rem;
    padding: 1rem 1.1rem;
    resize: vertical;
    color: var(--text-0);
    background: rgba(0, 0, 0, 0.24);
    border: 1px solid rgba(64, 71, 97, 0.28);
    border-radius: var(--radius-md);
    outline: none;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.2rem;
}

.terminal-box {
    height: 28rem;
    padding: 1rem 1.1rem;
    overflow: auto;
    border-radius: var(--radius-lg);
    background: rgba(0, 0, 0, 0.48);
    border: 1px solid rgba(64, 71, 97, 0.18);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
}

.terminal-line {
    margin-bottom: 0.45rem;
}

.public-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.public-card {
    width: min(100%, 29rem);
    padding: 2.4rem;
    border-radius: var(--radius-lg);
    text-align: center;
}

.public-logo {
    width: 4.2rem;
    height: 4.2rem;
    margin: 0 auto 1.3rem;
    border-radius: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #060d24;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 0 26px rgba(133, 173, 255, 0.26);
}

.public-title {
    font-family: 'Manrope', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -0.07em;
}

.public-subtitle {
    margin-top: 0.8rem;
    color: rgba(164, 170, 200, 0.72);
    font-size: 0.9rem;
    line-height: 1.7;
}

.public-form {
    margin-top: 2rem;
    text-align: left;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.45rem;
    color: rgba(164, 170, 200, 0.82);
    font-size: 0.8rem;
    font-weight: 700;
}

.error-msg {
    height: 1rem;
    margin-top: 0.95rem;
    color: var(--danger);
    font-size: 0.84rem;
    text-align: center;
}

.system-live {
    position: fixed;
    right: 2.3rem;
    bottom: 2.2rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 1.2rem;
    border-radius: 999px;
    pointer-events: none;
    z-index: 40;
}

.system-live .dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
    animation: pulse-dot 2s ease-in-out infinite;
}

.system-live span {
    color: var(--primary);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.empty-state {
    padding: 2.2rem 1rem;
    text-align: center;
    color: rgba(164, 170, 200, 0.72);
}

.muted {
    color: rgba(164, 170, 200, 0.72);
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (max-width: 1280px) {
    .asset-card {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 1rem;
    }

    .asset-timeline,
    .asset-metric {
        grid-column: 2 / -1;
    }

    .asset-metric {
        align-items: flex-start;
        min-width: 0;
    }

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

@media (max-width: 980px) {
    .sidebar {
        position: static;
        width: auto;
        height: auto;
        border-radius: 0;
        padding-bottom: 1rem;
    }

    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }

    .hero-strip,
    .top-bar,
    .panel-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .kpi-grid,
    .surface-grid {
        grid-template-columns: 1fr;
    }

    .system-live {
        right: 1rem;
        bottom: 1rem;
    }
}
