/* ==========================================================================
   公开页面样式（出库记录公示）
   与 auth-styles.css 共用同一套浅色设计语言：浅底、靛蓝渐变、圆角卡片
   ========================================================================== */

:root {
    --pub-ink: #0f172a;
    --pub-ink-2: #334155;
    --pub-muted: #64748b;
    --pub-line: #e6eaf2;
    --pub-bg: #f2f5fb;
    --pub-card: #ffffff;
    --pub-primary: #4f46e5;
    --pub-primary-2: #3b82f6;
    --pub-success: #0f9d76;
    --pub-warning: #f59e0b;
    --pub-radius-lg: 24px;
    --pub-radius-md: 14px;
    --pub-shadow: 0 18px 40px -28px rgba(15, 23, 42, .38), 0 2px 6px rgba(15, 23, 42, .04);
    --pub-font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Helvetica Neue", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body.pub-page {
    margin: 0;
    min-height: 100vh;
    background: var(--pub-bg);
    color: var(--pub-ink);
    font-family: var(--pub-font);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ---------- 背景光斑 ---------- */
.pub-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.pub-bg span {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .5;
}

.pub-bg .b1 {
    width: 420px;
    height: 420px;
    top: -140px;
    left: -120px;
    background: rgba(79, 70, 229, .18);
}

.pub-bg .b2 {
    width: 380px;
    height: 380px;
    top: 120px;
    right: -140px;
    background: rgba(6, 182, 212, .14);
}

.pub-bg .b3 {
    width: 360px;
    height: 360px;
    bottom: -160px;
    left: 42%;
    background: rgba(59, 130, 246, .12);
}

/* ---------- 顶栏 ---------- */
.pub-top {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    border-bottom: 1px solid var(--pub-line);
}

.pub-top-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.pub-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.pub-logo {
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 13px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #3b82f6 62%, #06b6d4);
    box-shadow: 0 10px 22px -12px rgba(79, 70, 229, .9);
}

.pub-logo svg {
    width: 22px;
    height: 22px;
}

.pub-brand-text {
    min-width: 0;
}

.pub-brand-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--pub-ink);
    white-space: nowrap;
}

.pub-brand-sub {
    margin: 1px 0 0;
    font-size: 12px;
    color: var(--pub-muted);
}

.pub-badge {
    display: inline-flex;
    align-items: center;
    height: 21px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(79, 70, 229, .1);
    color: var(--pub-primary);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
}

.pub-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: none;
}

.pub-live {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--pub-muted);
    white-space: nowrap;
}

.pub-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pub-success);
    box-shadow: 0 0 0 4px rgba(15, 157, 118, .14);
    animation: pubPulse 2.4s ease-in-out infinite;
}

.pub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 38px;
    padding: 0 16px;
    border-radius: 11px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
    white-space: nowrap;
}

.pub-btn svg {
    width: 16px;
    height: 16px;
}

.pub-btn-primary {
    color: #fff;
    background: linear-gradient(120deg, #4f46e5, #3b82f6 58%, #06b6d4);
    box-shadow: 0 12px 24px -14px rgba(79, 70, 229, .95);
}

.pub-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px -14px rgba(79, 70, 229, .95);
}

.pub-btn-ghost {
    color: var(--pub-ink-2);
    background: #fff;
    border: 1px solid var(--pub-line);
}

.pub-btn-ghost:hover {
    border-color: #cfd8ea;
    background: #f8fafc;
}

/* ---------- 主体 ---------- */
.pub-main {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 26px 24px 56px;
    flex: 1;
}

/* ---------- 顶部渐变横幅 ---------- */
.pub-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--pub-radius-lg);
    padding: 30px 32px;
    color: #fff;
    background:
        radial-gradient(120% 140% at 88% 0%, rgba(6, 182, 212, .34), transparent 56%),
        radial-gradient(90% 120% at 8% 100%, rgba(59, 130, 246, .34), transparent 60%),
        linear-gradient(150deg, #17143a, #29235f 46%, #3b34a8 74%, #1d4ed8);
    box-shadow: 0 26px 60px -40px rgba(23, 20, 58, .9);
    animation: pubRise .6s cubic-bezier(.22, .9, .3, 1) both;
}

.pub-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(120% 100% at 20% 0%, #000, transparent 78%);
    -webkit-mask-image: radial-gradient(120% 100% at 20% 0%, #000, transparent 78%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 26px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .2);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
}

.hero-title {
    margin: 14px 0 0;
    font-size: clamp(24px, 3.4vw, 32px);
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.25;
}

.hero-title em {
    font-style: normal;
    background: linear-gradient(100deg, #a5b4fc, #7dd3fc 60%, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    margin: 8px 0 0;
    font-size: 13.5px;
    color: rgba(255, 255, 255, .72);
}

.hero-date {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    font-size: 13.5px;
    font-weight: 600;
    backdrop-filter: blur(6px);
}

.hero-date svg {
    width: 16px;
    height: 16px;
    opacity: .8;
}

/* 数据概览 */
.hero-stats {
    position: relative;
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.hero-stat {
    padding: 15px 16px 14px;
    border-radius: var(--pub-radius-md);
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .14);
    backdrop-filter: blur(6px);
    min-width: 0;
}

.hero-stat-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, .7);
}

.hero-stat-label svg {
    width: 14px;
    height: 14px;
    opacity: .85;
}

.hero-stat-value {
    margin-top: 6px;
    font-size: clamp(20px, 2.4vw, 26px);
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-stat-unit {
    margin-left: 3px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, .66);
}

/* ---------- 通用卡片 ---------- */
.pub-card {
    margin-top: 18px;
    background: var(--pub-card);
    border: 1px solid var(--pub-line);
    border-radius: var(--pub-radius-lg);
    box-shadow: var(--pub-shadow);
    animation: pubRise .6s cubic-bezier(.22, .9, .3, 1) both;
    animation-delay: .06s;
}

.pub-card + .pub-card {
    animation-delay: .12s;
}

.pub-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--pub-line);
}

.pub-card-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--pub-ink);
}

.pub-card-title svg {
    width: 17px;
    height: 17px;
    color: var(--pub-primary);
}

.pub-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 27px;
    padding: 0 11px;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--pub-muted);
    font-size: 12.5px;
    white-space: nowrap;
}

.pub-count strong {
    color: var(--pub-ink);
    font-weight: 700;
}

/* ---------- 日期选择 ---------- */
.pub-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 22px 20px;
}

.pub-date {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--pub-line);
    background: #f8fafc;
    color: var(--pub-ink-2);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    font-variant-numeric: tabular-nums;
    transition: all .18s ease;
}

.pub-date svg {
    width: 14px;
    height: 14px;
    opacity: .55;
}

.pub-date:hover {
    border-color: #cfd8ea;
    background: #eef2f9;
    transform: translateY(-1px);
}

.pub-date.is-active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(120deg, #4f46e5, #3b82f6 60%, #06b6d4);
    box-shadow: 0 10px 22px -14px rgba(79, 70, 229, .95);
}

.pub-date.is-active svg {
    opacity: .9;
}

.pub-dates-empty {
    padding: 6px 22px 22px;
    color: var(--pub-muted);
    font-size: 13px;
}

/* ---------- 表格 ---------- */
.pub-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.pub-table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
}

.pub-table thead th {
    padding: 11px 16px;
    text-align: left;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--pub-muted);
    background: #f8fafc;
    border-bottom: 1px solid var(--pub-line);
    white-space: nowrap;
}

.pub-table thead th.is-center {
    text-align: center;
}

.pub-table thead th.is-right {
    text-align: right;
}

.pub-table thead th:first-child,
.pub-table tbody td:first-child {
    padding-left: 22px;
}

.pub-table thead th:last-child,
.pub-table tbody td:last-child {
    padding-right: 22px;
}

.pub-table tbody td {
    padding: 14px 16px;
    font-size: 13.5px;
    color: var(--pub-ink-2);
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.pub-table tbody tr:last-child td {
    border-bottom: none;
}

.pub-table tbody tr {
    transition: background .16s ease;
}

.pub-table tbody tr:hover {
    background: #f8faff;
}

.pub-table td.is-center {
    text-align: center;
}

.pub-table td.is-right {
    text-align: right;
}

.pub-seq {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 24px;
    padding: 0 8px;
    border-radius: 8px;
    background: #f1f5f9;
    color: var(--pub-ink-2);
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.pub-muted-date {
    color: var(--pub-muted);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.pub-ship {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--pub-ink);
}

.pub-ship-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--pub-primary-2);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .14);
    flex: none;
}

.pub-remark {
    color: var(--pub-muted);
    letter-spacing: .02em;
}

.pub-num {
    font-weight: 700;
    color: var(--pub-ink);
    font-variant-numeric: tabular-nums;
}

.pub-weight {
    font-weight: 700;
    color: #d97706;
    font-variant-numeric: tabular-nums;
}

.pub-lock {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--pub-primary);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.pub-lock svg {
    width: 14px;
    height: 14px;
}

.pub-lock:hover {
    color: #3730a3;
}

/* 空状态 */
.pub-empty {
    padding: 60px 20px;
    text-align: center;
}

.pub-empty-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 14px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: #94a3b8;
    background: #f1f5f9;
}

.pub-empty-icon svg {
    width: 26px;
    height: 26px;
}

.pub-empty h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--pub-ink);
}

.pub-empty p {
    margin: 5px 0 0;
    font-size: 13px;
    color: var(--pub-muted);
}

/* ---------- 说明卡 ---------- */
.pub-note {
    margin-top: 18px;
    padding: 22px 24px;
    border-radius: var(--pub-radius-lg);
    border: 1px solid #dbe4ff;
    background: linear-gradient(120deg, #f5f7ff, #eef6ff);
    animation: pubRise .6s cubic-bezier(.22, .9, .3, 1) both;
    animation-delay: .18s;
}

.pub-note-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pub-note-icon {
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 11px;
    display: grid;
    place-items: center;
    color: var(--pub-primary);
    background: #fff;
    border: 1px solid #dbe4ff;
}

.pub-note-icon svg {
    width: 17px;
    height: 17px;
}

.pub-note h3 {
    margin: 0;
    font-size: 14.5px;
    font-weight: 700;
    color: #312e81;
}

.pub-note ul {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.pub-note li {
    position: relative;
    padding-left: 22px;
    font-size: 13px;
    color: #4338ca;
    line-height: 1.65;
}

.pub-note li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
}

/* ---------- 页脚 ---------- */
.pub-footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--pub-line);
    background: rgba(255, 255, 255, .6);
}

.pub-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--pub-muted);
}

.pub-footer-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.pub-footer-status .pub-live-dot {
    width: 6px;
    height: 6px;
    box-shadow: none;
}

/* ---------- 动画 ---------- */
@keyframes pubRise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pubPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .45;
        transform: scale(.86);
    }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .pub-top-inner {
        padding: 12px 16px;
    }

    .pub-main {
        padding: 18px 16px 40px;
    }

    .pub-hero {
        padding: 24px 22px;
        border-radius: 20px;
    }

    .pub-brand-sub,
    .pub-live {
        display: none;
    }

    .pub-btn {
        height: 36px;
        padding: 0 13px;
        font-size: 13px;
    }

    .hero-stats {
        margin-top: 20px;
    }

    .pub-card {
        border-radius: 20px;
    }

    .pub-card-head {
        padding: 15px 16px;
    }

    .pub-dates {
        padding: 14px 16px 18px;
    }

    .pub-card-title {
        font-size: 14px;
    }

    .pub-note {
        padding: 18px 18px;
        border-radius: 20px;
    }
}

@media (max-width: 520px) {
    .pub-brand-title {
        font-size: 15px;
        max-width: 58vw;
        white-space: normal;
    }

    .pub-logo {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .pub-hero {
        padding: 20px 18px;
    }

    .hero-stats {
        gap: 9px;
    }

    .hero-stat {
        padding: 12px 13px;
    }

    .hero-stat-value {
        font-size: 19px;
    }

    .hero-date {
        height: auto;
        padding: 7px 12px;
        font-size: 12.5px;
    }

    .pub-btn span {
        display: none;
    }

    .pub-btn {
        padding: 0 11px;
    }

    .pub-count {
        display: none;
    }

    .pub-footer-inner {
        padding: 14px 16px;
        justify-content: center;
        text-align: center;
    }
}

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

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}
