/* ========================================
   顺辉科技 - 员工管理系统样式表
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #1a6cf0;
    --primary-light: #4a90ff;
    --primary-dark: #0d52c1;
    --teal: #00b8a9;
    --teal-light: #00d9c8;
    --bg: #f0f2f5;
    --card-bg: #ffffff;
    --text: #1a1a2e;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --text-lighter: #c4c8cf;
    --border: #e8eaed;
    --border-light: #f0f0f0;
    --success: #22c55e;
    --success-bg: #dcfce7;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --info: #3b82f6;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --header-h: 56px;
    --bottom-nav-h: 60px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
}

/* ========== 登录页 ========== */
.login-page {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #0d52c1 0%, #1a6cf0 40%, #00b8a9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.login-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    overflow: hidden;
}

.login-pattern {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.06) 0%, transparent 40%);
}

.login-container {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 380px;
    text-align: center;
}

.login-header {
    margin-bottom: 36px;
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.login-header h1 {
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
}

.login-subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 15px;
    margin-top: 6px;
    letter-spacing: 1px;
}

.login-form {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 28px 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
}

.login-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    background: rgba(0,0,0,0.05);
    border-radius: 12px;
    padding: 3px;
}

.login-tab {
    flex: 1;
    text-align: center;
    padding: 9px 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s;
}

.login-tab.active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.input-group {
    position: relative;
    margin-bottom: 16px;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    z-index: 1;
}

.input-group input {
    width: 100%;
    height: 48px;
    padding: 0 14px 0 44px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    background: #f8f9fb;
    color: var(--text);
    transition: all 0.2s;
    outline: none;
}

.input-group input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26,108,240,0.1);
}

.login-btn {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 4px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 4px;
}

.login-btn:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.login-hint {
    color: var(--text-light);
    font-size: 12px;
    margin-top: 12px;
}

.guest-btn {
    width: 100%;
    height: 42px;
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 16px;
    transition: all 0.2s;
}

.guest-btn:active {
    background: #f0f2f5;
}

/* 记住密码 */
.remember-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    margin-top: -4px;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    user-select: none;
}

.remember-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.remember-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 5px;
    background: #f8f9fb;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.remember-label input:checked ~ .remember-checkbox {
    background: var(--primary);
    border-color: var(--primary);
}

.remember-label input:checked ~ .remember-checkbox::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ========== 主应用容器 ========== */
.app-container {
    min-height: 100vh;
    position: relative;
    padding-bottom: calc(var(--bottom-nav-h) + 8px);
}

/* 顶部导航栏 */
.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    box-shadow: 0 2px 12px rgba(26,108,240,0.3);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logo {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    border: 1.5px solid rgba(255,255,255,0.3);
}

.header-title {
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-badge {
    color: rgba(255,255,255,0.9);
    font-size: 12px;
    background: rgba(255,255,255,0.15);
    padding: 4px 10px;
    border-radius: 20px;
}

.header-btn {
    position: relative;
    background: transparent;
    border: none;
    color: #fff;
    padding: 6px;
    cursor: pointer;
    border-radius: 8px;
}

.header-btn:active {
    background: rgba(255,255,255,0.15);
}

.notify-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 1.5px solid var(--primary-dark);
    display: none;
}

.notify-dot.show {
    display: block;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

/* ========== 安全标语滚动栏 ========== */
.safety-banner {
    position: sticky;
    top: var(--header-h);
    z-index: 49;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    background: linear-gradient(90deg, #fff8e1, #fff3e0, #fff8e1);
    border-bottom: 1px solid rgba(245,158,11,0.15);
    overflow: hidden;
}

.safety-banner-icon {
    color: #e65100;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.safety-banner-track {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.safety-banner-text {
    display: inline-block;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
    color: #bf360c;
    padding-left: 100%;
    animation: safetyScroll 30s linear infinite;
}

@keyframes safetyScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* 内容区域 */
.app-content {
    padding: 12px;
    max-width: 600px;
    margin: 0 auto;
}

/* ========== 底部导航栏 ========== */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--bottom-nav-h);
    background: #fff;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 50;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--text-light);
    cursor: pointer;
    padding: 6px 0;
    transition: color 0.2s;
    -webkit-user-select: none;
    user-select: none;
}

.nav-item span {
    font-size: 10px;
    font-weight: 500;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active svg {
    transform: scale(1.1);
}

/* ========== 浮动按钮 ========== */
.fab-btn {
    position: fixed;
    right: 16px;
    bottom: calc(var(--bottom-nav-h) + 16px);
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(26,108,240,0.4);
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.fab-btn:active {
    transform: scale(0.92);
}

/* ========== 页面标题 ========== */
.page-title {
    font-size: 20px;
    font-weight: 700;
    padding: 12px 4px 8px;
    color: var(--text);
}

.page-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 4px 8px;
}

.page-title-row .page-title {
    padding: 0;
}

.page-refresh-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--primary);
    cursor: pointer;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.page-refresh-btn:active {
    background: rgba(26, 108, 240, 0.1);
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 0 4px 12px;
}

/* ========== 卡片 ========== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 12px;
}

.card-body {
    padding: 16px;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px 14px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--primary);
}

.stat-card.teal::before { background: var(--teal); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.danger::before { background: var(--danger); }
.stat-card.success::before { background: var(--success); }

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    background: rgba(26,108,240,0.1);
    color: var(--primary);
}

.stat-card.teal .stat-icon { background: rgba(0,184,169,0.1); color: var(--teal); }
.stat-card.warning .stat-icon { background: rgba(245,158,11,0.1); color: var(--warning); }
.stat-card.danger .stat-icon { background: rgba(239,68,68,0.1); color: var(--danger); }
.stat-card.success .stat-icon { background: rgba(34,197,94,0.1); color: var(--success); }

.stat-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.stat-trend {
    font-size: 11px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }
.stat-trend.neutral { color: var(--text-light); }

/* ========== 列表 ========== */
.list-section {
    margin-bottom: 12px;
}

.list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 4px 8px;
}

.list-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.list-header .more {
    color: var(--primary);
    font-size: 13px;
    cursor: pointer;
}

/* 责任区间 */
.resp-role-tag {
    font-size: 12px;
    color: var(--primary);
    background: rgba(26,108,240,0.08);
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 500;
}
.resp-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.resp-card-intro {
    padding: 12px 14px 8px;
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    border-bottom: 1px solid var(--border-light);
    font-weight: 500;
}
.resp-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-light);
}
.resp-item:last-child {
    border-bottom: none;
}
.resp-item-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.resp-item-body {
    flex: 1;
    min-width: 0;
}
.resp-item-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}
.resp-item-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 责任区间编辑器 */
.resp-edit-item {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
}
.resp-edit-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.resp-edit-item-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.resp-edit-del {
    border: none;
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}
.resp-edit-del:hover {
    background: rgba(239,68,68,0.2);
}
.resp-edit-add-btn {
    width: 100%;
    padding: 12px;
    border: 2px dashed var(--border-light);
    border-radius: 10px;
    background: transparent;
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.resp-edit-add-btn:hover {
    border-color: var(--primary);
    background: rgba(26,108,240,0.05);
}

/* 钨制品价格卡片 */
.tungsten-price-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.tungsten-price-meta {
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(26,108,240,0.06), rgba(0,184,169,0.06));
    border-bottom: 1px solid var(--border);
}

.tungsten-price-date {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

.tungsten-price-source {
    font-size: 11px;
    color: var(--text-light);
}

.tungsten-price-table {
    padding: 4px 0;
}

.tungsten-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border-light, #f0f0f0);
}

.tungsten-price-row:last-child {
    border-bottom: none;
}

.tungsten-price-row.even {
    background: var(--bg);
}

.tungsten-price-name {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.tungsten-price-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--danger);
}

.tungsten-price-unit {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-light);
    margin-left: 4px;
}

/* 价格过期提醒 */
.tungsten-price-stale {
    border: 1px solid #f59e0b;
}
.tungsten-price-warn {
    background: #fffbeb;
    color: #b45309;
    font-size: 12px;
    line-height: 1.5;
    padding: 8px 14px;
    border-bottom: 1px solid #fde68a;
}

/* 弹窗内参考提示 */
.tp-ref-tip {
    background: #f0f7ff;
    border: 1px solid #cfe2ff;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.6;
    color: #1d4ed8;
    margin-bottom: 14px;
}
.tp-ref-tip a {
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: underline;
}
.tp-fetch-btn {
    display: inline-block;
    margin-top: 8px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.tp-fetch-btn:active { transform: scale(0.98); }

/* 钨制品价格编辑表单 */
.form-row-tungsten {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.form-tungsten-name {
    flex: 1;
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
}

.form-tungsten-input {
    width: 100px !important;
    text-align: right;
}

.form-tungsten-unit {
    font-size: 12px;
    color: var(--text-light);
    white-space: nowrap;
    min-width: 70px;
}

.tungsten-form-list {
    max-height: 360px;
    overflow-y: auto;
}

/* 公司产品报价卡片 */
.product-quote-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.product-quote-meta {
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(245,158,11,0.06), rgba(236,72,153,0.06));
    border-bottom: 1px solid var(--border);
}

.product-quote-date {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

.product-quote-updated {
    font-size: 11px;
    color: var(--text-light);
}

.product-quote-category {
    margin-bottom: 4px;
}

.product-quote-cat-title {
    padding: 8px 14px 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    background: rgba(26,108,240,0.03);
}

.product-quote-header-row {
    display: flex;
    padding: 6px 14px;
    font-size: 11px;
    color: var(--text-light);
    font-weight: 600;
    background: var(--bg);
}

.product-quote-item {
    display: flex;
    padding: 7px 14px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.product-quote-item.even {
    background: var(--bg);
}

.pq-col-spec {
    flex: 1.2;
    color: var(--text-secondary);
    font-weight: 500;
}

.pq-col-tax {
    flex: 1;
    text-align: right;
    color: var(--danger);
    font-weight: 600;
}

.pq-col-notax {
    flex: 1;
    text-align: right;
    color: var(--text);
    font-weight: 500;
}

.pq-unit {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-light);
    margin-left: 2px;
}

/* 产品报价编辑表单 */
.pq-form-headers {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 11px;
    color: var(--text-light);
    font-weight: 600;
}

.pq-form-headers .pq-form-spec { flex: 1.2; }
.pq-form-headers .pq-form-h-tax { width: 90px; text-align: center; }
.pq-form-headers .pq-form-h-notax { width: 90px; text-align: center; }
.pq-form-headers .pq-form-unit { width: 50px; }

.pq-form-category {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    padding: 8px 0 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 6px;
}

.pq-form-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.pq-form-spec {
    flex: 1.2;
    font-size: 12px;
    color: var(--text);
    font-weight: 500;
}

.pq-form-input {
    width: 90px !important;
    text-align: center;
    padding: 6px 4px !important;
    font-size: 13px !important;
}

.pq-form-unit {
    font-size: 11px;
    color: var(--text-light);
    white-space: nowrap;
    width: 50px;
}

/* ========== 产品下单工作流 ========== */
.po-workflow-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.po-workflow-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.po-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.po-step.active {
    opacity: 1;
}

.po-step-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    border: 2px solid var(--border-light);
}

.po-step.active .po-step-icon {
    background: rgba(26,108,240,0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.po-step-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

.po-step-person {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
}

.po-step-arrow {
    font-size: 18px;
    color: var(--border-light);
    padding: 0 4px;
    margin-bottom: 20px;
    transition: color 0.3s;
}

.po-step-arrow.active {
    color: var(--success);
}

.po-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.po-stat {
    font-size: 13px;
    font-weight: 600;
}

.po-item {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.po-item:active {
    box-shadow: 0 0 0 2px var(--primary);
}

.po-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.po-item-id {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    margin-right: 8px;
}

.po-item-cat {
    font-size: 13px;
    color: var(--text);
}

.po-item-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.po-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.po-item-meta {
    font-size: 11px;
    color: var(--text-lighter);
}

.po-item-actions {
    display: flex;
    gap: 6px;
}

.po-btn {
    border: none;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.po-btn-approve {
    background: rgba(34,197,94,0.12);
    color: #22c55e;
}

.po-btn-reject {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
}

.po-btn-create {
    background: rgba(26,108,240,0.1);
    color: var(--primary);
}

.po-btn-stock {
    background: rgba(14,165,233,0.12);
    color: #0ea5e9;
}

.po-type-toggle {
    display: flex;
    gap: 10px;
}

.po-type-opt {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all .15s;
}

.po-type-opt.active {
    border-color: var(--primary);
    background: rgba(26,108,240,0.08);
    color: var(--primary);
}

.po-type-opt input { display: none; }

.po-type-tip {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.5;
    background: var(--bg);
    border-radius: 8px;
    padding: 8px 10px;
}

.po-inv-hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.po-type-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 5px;
    margin-right: 6px;
    vertical-align: middle;
}

.po-type-tag.customer { background: rgba(34,197,94,0.14); color: #22c55e; }
.po-type-tag.restock { background: rgba(139,92,246,0.14); color: #8b5cf6; }

.po-item-stock {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 5px;
}
.po-item-stock.ok { background: rgba(34,197,94,0.12); color: #22c55e; }
.po-item-stock.low { background: rgba(239,68,68,0.12); color: #ef4444; }
.po-item-stock.none { background: rgba(107,114,128,0.12); color: #6b7280; }

.po-foot-note {
    font-size: 11px;
    color: var(--danger);
    margin-left: 8px;
}

.po-link {
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

/* 产品订单详情时间线 */
.po-detail-timeline {
    margin-bottom: 16px;
    padding-left: 4px;
}

.po-timeline-item {
    display: flex;
    align-items: flex-start;
    padding-bottom: 16px;
    position: relative;
}

.po-timeline-item:not(.last)::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 32px;
    bottom: 0;
    width: 2px;
    background: var(--border-light);
}

.po-timeline-item.done:not(.last)::before {
    background: var(--success);
}

.po-timeline-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-light);
    border: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-light);
    flex-shrink: 0;
    margin-right: 12px;
    z-index: 1;
}

.po-timeline-dot.done {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.po-timeline-content {
    padding-top: 4px;
}

.po-timeline-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.po-timeline-person {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}

.po-timeline-date {
    font-size: 11px;
    color: var(--text-lighter);
    margin-top: 1px;
}

.po-detail-comment {
    background: rgba(239,68,68,0.06);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text);
}

/* ========== 员工一键打卡卡片 ========== */
.clock-card {
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 16px;
    text-align: center;
}
.clock-card.clock-on {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border: 2px solid #4caf50;
}
.clock-card.clock-off {
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    border: 2px solid #9e9e9e;
}
.clock-status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}
.clock-status-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}
.clock-on .clock-status-icon {
    background: #4caf50;
    color: #fff;
}
.clock-off .clock-status-icon {
    background: #9e9e9e;
    color: #fff;
}
.clock-status-text {
    text-align: left;
}
.clock-status-label {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}
.clock-status-time {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 2px;
}
.clock-btn {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    letter-spacing: 4px;
    transition: opacity 0.2s;
}
.clock-btn:active { opacity: 0.8; }
.clock-btn-on {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
}
.clock-btn-off {
    background: linear-gradient(135deg, #78909c, #546e7a);
}
.clock-quick-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.clock-quick-btn {
    flex: 1;
    padding: 12px 8px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: #fff;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}
.clock-quick-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.clock-quick-btn:active { opacity: 0.8; }

/* ========== 员工任务大卡片 ========== */
.emp-task-summary {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    padding: 8px 4px 16px;
}
.emp-task-count {
    color: var(--danger);
    font-size: 24px;
    font-weight: 700;
}
.emp-task-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}
.emp-task-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e8f5e9;
    color: #4caf50;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.emp-task-empty-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}
.emp-task-empty-sub {
    font-size: 14px;
    color: var(--text-light);
}
.emp-task-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    cursor: pointer;
    border-left: 5px solid var(--primary);
    transition: transform 0.15s;
}
.emp-task-card:active { transform: scale(0.98); }
.emp-task-card-active { border-left-color: #f59e0b; }
.emp-task-card-pending { border-left-color: var(--primary); }
.emp-task-card-done { border-left-color: #22c55e; }
.emp-task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.emp-task-card-id {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}
.emp-task-card-status {
    font-size: 14px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(245,158,11,0.1);
    color: #f59e0b;
}
.emp-task-card-product {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.4;
}
.emp-task-card-stage {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    text-align: center;
}
.emp-task-card-stage-label {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 4px;
}
.emp-task-card-stage-name {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}
.emp-task-card-stage-progress {
    font-size: 14px;
    color: var(--text-light);
}
.emp-task-card-bar {
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}
.emp-task-card-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
}
.emp-task-card-footer {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 12px;
}
.emp-task-card-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}
.emp-task-card-btn:active { opacity: 0.8; }
.emp-task-card-btn-done {
    background: #22c55e;
}
.emp-task-done-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    margin-top: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    border-top: 1px solid var(--border);
}
.emp-task-toggle {
    font-size: 14px;
    color: var(--primary);
}
.emp-task-done-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    margin-bottom: 8px;
    background: var(--bg-light);
    border-radius: 10px;
    cursor: pointer;
}
.emp-task-done-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.emp-task-done-id {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.emp-task-done-product {
    font-size: 13px;
    color: var(--text-light);
}
.emp-task-done-stage {
    font-size: 12px;
    color: var(--text-lighter);
}
.emp-task-done-badge {
    font-size: 14px;
    font-weight: 600;
    color: #22c55e;
}

/* 搜索框 */
.search-bar {
    position: relative;
    margin-bottom: 12px;
}

.search-bar input {
    width: 100%;
    height: 40px;
    padding: 0 14px 0 40px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    font-size: 14px;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.search-bar input:focus {
    border-color: var(--primary);
}

.search-bar svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

/* 筛选标签 */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding: 2px;
}

.filter-tab {
    white-space: nowrap;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    background: #fff;
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* 日期筛选行 */
.date-filter-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px 10px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.date-filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
}

.date-filter-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.date-filter-tab {
    white-space: nowrap;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    background: #fff;
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.date-filter-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.date-filter-picker {
    margin-left: auto;
}

.date-filter-picker input[type="date"] {
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
    background: #fff;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
}

.date-filter-picker input[type="date"]:focus {
    border-color: var(--primary);
}

/* 员工卡片 */
.employee-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}

.employee-card:active {
    transform: scale(0.99);
}

.employee-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
}

.employee-info {
    flex: 1;
    min-width: 0;
}

.employee-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.employee-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 3px;
}

.employee-status {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.status-badge {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.status-active { background: var(--success-bg); color: var(--success); }
.status-idle { background: var(--warning-bg); color: var(--warning); }
.status-maintenance { background: var(--info); background: rgba(59,130,246,0.1); color: var(--info); }
.status-offline { background: #f3f4f6; color: var(--text-light); }
.status-leave { background: var(--warning-bg); color: var(--warning); }
.status-field { background: rgba(26,108,240,0.1); color: var(--primary); }
.status-low { background: var(--danger-bg); color: var(--danger); }
.status-normal { background: var(--success-bg); color: var(--success); }

/* 个人中心 - 我的状态 */
.my-status-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.my-status-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.my-status-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.my-status-info { flex: 1; }
.my-status-name { font-size: 16px; font-weight: 600; }
.my-status-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.my-status-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 14px 0 10px;
}
.status-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.status-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    background: #f9fafb;
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}
.status-btn.active {
    font-weight: 600;
    border-width: 2px;
}
.status-btn-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.status-btn-dot.status-active { background: var(--success); }
.status-btn-dot.status-offline { background: #d1d5db; }
.status-btn-dot.status-leave { background: var(--warning); }
.status-btn-dot.status-idle { background: var(--warning); }
.status-btn-dot.status-field { background: var(--primary); }

/* 设备卡片 */
.equipment-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 14px;
    margin-bottom: 10px;
}

.equipment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.equipment-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.equipment-id {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
    font-family: monospace;
}

.equipment-stats {
    display: flex;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.equipment-stat {
    flex: 1;
}

.equipment-stat-label {
    font-size: 11px;
    color: var(--text-light);
}

.equipment-stat-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-top: 2px;
}

/* 库存卡片 */
.inventory-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 14px;
    margin-bottom: 10px;
}

.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.inventory-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.inventory-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.inventory-qty {
    text-align: right;
}

.inventory-qty-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.inventory-qty-unit {
    font-size: 12px;
    color: var(--text-light);
}

.inventory-bar {
    height: 6px;
    background: #f0f2f5;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 10px;
}

.inventory-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}

/* 生产任务卡片 */
.task-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 14px;
    margin-bottom: 10px;
    border-left: 4px solid var(--primary);
}

.task-card.urgent { border-left-color: var(--danger); }
.task-card.progress { border-left-color: var(--warning); }
.task-card.done { border-left-color: var(--success); }

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.task-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.task-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.task-progress-bar {
    height: 6px;
    background: #f0f2f5;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.task-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--teal));
    border-radius: 3px;
    transition: width 0.3s;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-light);
}

/* ========== 弹窗 ========== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-sheet {
    background: #fff;
    width: 100%;
    max-width: 500px;
    border-radius: 20px 20px 0 0;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-center {
    align-items: center;
}

.modal-center .modal-sheet {
    border-radius: 20px;
    width: 90%;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    z-index: 1;
}

.modal-title {
    font-size: 17px;
    font-weight: 600;
}

.modal-close {
    background: #f0f2f5;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}

.form-label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    background: #f8f9fb;
    color: var(--text);
    outline: none;
    transition: all 0.2s;
}

.form-input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26,108,240,0.1);
}

.form-select {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    background: #f8f9fb;
    color: var(--text);
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.form-textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    background: #f8f9fb;
    color: var(--text);
    outline: none;
    resize: vertical;
    font-family: inherit;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    position: sticky;
    bottom: 0;
    background: #fff;
}

.btn {
    flex: 1;
    height: 44px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}

.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
    background: #f0f2f5;
    color: var(--text);
}

.btn-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

/* ========== 详情页 ========== */
.detail-section {
    margin-bottom: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.detail-row:last-child { border-bottom: none; }

.detail-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.detail-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    text-align: right;
}

/* 操作按钮组 */
.action-group {
    display: flex;
    gap: 8px;
    padding: 0 20px 20px;
}

.action-btn {
    flex: 1;
    height: 40px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: #fff;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s;
}

.action-btn:active { background: #f0f2f5; }

.action-btn.edit { color: var(--primary); border-color: var(--primary); }
.action-btn.delete { color: var(--danger); border-color: var(--danger); }

/* ========== 个人中心 ========== */
.profile-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--teal) 100%);
    padding: 28px 20px 40px;
    border-radius: 0 0 24px 24px;
    text-align: center;
    margin: -12px -12px 0;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 3px solid rgba(255,255,255,0.5);
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
    font-weight: 700;
}

.profile-name {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

.profile-role {
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    margin-top: 4px;
}

.menu-list {
    margin-top: -24px;
    position: relative;
    z-index: 1;
}

.menu-item {
    background: #fff;
    display: flex;
    align-items: center;
    padding: 14px 16px;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border);
}

.menu-item:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.menu-item:last-child { border-radius: 0 0 var(--radius) var(--radius); border-bottom: none; }
.menu-item:active { background: #f8f9fb; }

.menu-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.menu-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.menu-arrow {
    color: var(--text-light);
}

/* ========== Toast 提示 ========== */
.toast-container {
    position: fixed;
    top: 70px; left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    pointer-events: none;
}

.toast {
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    margin-bottom: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2s forwards;
    white-space: nowrap;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    to { opacity: 0; transform: translateY(-10px); }
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state svg {
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 14px;
}

/* ========== 通知列表 ========== */
.notify-item {
    display: flex;
    gap: 10px;
    padding: 14px;
    border-bottom: 1px solid var(--border);
}

.notify-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notify-content {
    flex: 1;
    min-width: 0;
}

.notify-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.notify-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.notify-time {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
}

/* 滚动条美化 */
.modal-sheet::-webkit-scrollbar { width: 4px; }
.modal-sheet::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }

/* 响应式 - 桌面端 */
@media (min-width: 768px) {
    .app-content {
        max-width: 600px;
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .modal-overlay {
        align-items: center;
    }

    .modal-sheet {
        border-radius: 20px;
        width: 500px;
    }
}

/* 管理员标识 */
.admin-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
    font-weight: 600;
}

/* 颜色色块 */
.avatar-color-1 { background: linear-gradient(135deg, #1a6cf0, #4a90ff); }
.avatar-color-2 { background: linear-gradient(135deg, #00b8a9, #00d9c8); }
.avatar-color-3 { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.avatar-color-4 { background: linear-gradient(135deg, #ef4444, #f87171); }
.avatar-color-5 { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.avatar-color-6 { background: linear-gradient(135deg, #ec4899, #f472b6); }
.avatar-color-7 { background: linear-gradient(135deg, #059669, #34d399); }
.avatar-color-8 { background: linear-gradient(135deg, #6366f1, #818cf8); }

/* ========== 库存操作栏 ========== */
.inv-action-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.inv-action-btn {
    flex: 1;
    height: 42px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.inv-action-btn:active { background: #f8f9fb; }

.inv-action-btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border-color: var(--primary);
}

.inv-action-btn.primary:active { opacity: 0.9; }

/* ========== 出入库明细 ========== */
.txn-date-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1.5px solid var(--border);
    margin-bottom: 6px;
    margin-top: 10px;
}

.txn-date-header:first-child { margin-top: 0; }

.txn-date-count {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-light);
}

.txn-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 6px;
    box-shadow: var(--shadow-sm);
}

.txn-arrow {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.txn-in .txn-arrow { background: var(--success-bg); color: var(--success); }
.txn-out .txn-arrow { background: var(--danger-bg); color: var(--danger); }

.txn-info {
    flex: 1;
    min-width: 0;
}

.txn-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.txn-type-badge {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.txn-type-badge.txn-in { background: var(--success-bg); color: var(--success); }
.txn-type-badge.txn-out { background: var(--danger-bg); color: var(--danger); }

.txn-item-meta {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.txn-qty {
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
}

.txn-qty.txn-in { color: var(--success); }
.txn-qty.txn-out { color: var(--danger); }

/* ========== 员工状态切换器 ========== */
.status-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.status-option {
    flex: 1;
    min-width: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    border-radius: 14px;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.status-option:active { transform: scale(0.96); }

.status-option.active.onduty {
    border-color: var(--success);
    background: var(--success-bg);
}
.status-option.active.offduty {
    border-color: var(--text-light);
    background: #f3f4f6;
}
.status-option.active.leave {
    border-color: var(--warning);
    background: var(--warning-bg);
}
.status-option.active.rest {
    border-color: var(--primary);
    background: rgba(26,108,240,0.08);
}

.status-option-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.status-option.onduty .status-option-icon { background: var(--success-bg); color: var(--success); }
.status-option.offduty .status-option-icon { background: #f3f4f6; color: var(--text-secondary); }
.status-option.leave .status-option-icon { background: var(--warning-bg); color: var(--warning); }
.status-option.rest .status-option-icon { background: rgba(26,108,240,0.1); color: var(--primary); }

.status-option-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.status-option.active .status-option-label {
    font-weight: 700;
}

/* ========== 订单管理 ========== */
.order-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.order-card:active {
    transform: scale(0.98);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.order-id {
    font-size: 12px;
    color: var(--text-light);
    font-family: "SF Mono", "Fira Code", monospace;
    letter-spacing: -0.3px;
}

.order-customer {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-top: 2px;
}

.order-content {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 8px 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-light);
}

.order-amount {
    margin-top: 6px;
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    text-align: right;
}

.order-amount::before {
    content: '¥';
    font-size: 12px;
    font-weight: 500;
    margin-right: 1px;
}

/* 订单进度条 */
.order-progress-wrap {
    margin-top: 8px;
}

.order-progress-bar {
    height: 6px;
    background: var(--bg-gray, #f0f2f5);
    border-radius: 3px;
    overflow: hidden;
}

.order-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.order-progress-text {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
    text-align: right;
}

/* 订单流程时间线（详情弹窗） */
.order-timeline {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0 12px;
    gap: 0;
}

.ot-stage {
    flex-shrink: 0;
    width: 64px;
    text-align: center;
    position: relative;
}

.ot-dot-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    position: relative;
}

.ot-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e8eaed;
    border: 2px solid #d1d5db;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 1;
    transition: all 0.3s ease;
}

.ot-stage.current .ot-dot {
    box-shadow: 0 0 0 4px rgba(26, 108, 240, 0.15);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 4px rgba(26, 108, 240, 0.15); }
    50% { box-shadow: 0 0 0 7px rgba(26, 108, 240, 0.08); }
}

.ot-line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
    transform: translateY(-50%);
}

.ot-line.done {
    opacity: 1;
}

.ot-label {
    font-size: 10px;
    color: var(--text-light);
    margin-top: 6px;
    line-height: 1.3;
}

.ot-stage.done .ot-label {
    color: var(--text-secondary);
}

/* ========== 生产全生命周期管理 ========== */

/* 生命周期统计卡片 */
.lifecycle-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.lifecycle-stat {
    background: #fff;
    border-radius: var(--radius);
    padding: 12px 8px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.lifecycle-stat::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
}

.lifecycle-stat.progress::before { background: var(--primary); }
.lifecycle-stat.done::before { background: var(--success); }
.lifecycle-stat.pending::before { background: var(--warning); }

.lifecycle-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.lifecycle-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* 阶段分布图 */
.stage-distribution {
    background: #fff;
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.stage-distribution-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

.stage-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.stage-bar-label {
    width: 64px;
    font-size: 11px;
    color: var(--text-secondary);
    flex-shrink: 0;
    text-align: right;
}

.stage-bar-track {
    flex: 1;
    height: 18px;
    background: #f0f2f5;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.stage-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
    min-width: 2px;
}

.stage-bar-count {
    width: 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
    text-align: left;
    flex-shrink: 0;
}

/* 生产卡片 */
.production-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: transform 0.15s;
    border-left: 4px solid var(--primary);
}

.production-card.stage-production { border-left-color: var(--teal); }
.production-card.stage-material { border-left-color: var(--primary); }
.production-card.stage-equipment { border-left-color: #8b5cf6; }
.production-card.stage-cleaning { border-left-color: var(--info); }
.production-card.stage-packaging { border-left-color: var(--warning); }
.production-card.stage-inbound { border-left-color: var(--success); }
.production-card.stage-outbound { border-left-color: #ec4899; }
.production-card.stage-aftersales { border-left-color: #6366f1; }
.production-card.stage-done { border-left-color: var(--success); }

.production-card:active {
    transform: scale(0.99);
}

.production-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.production-product {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.production-customer {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.production-qty {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

/* 水平生命周期进度条 */
.lifecycle-horizontal {
    display: flex;
    align-items: center;
    margin: 10px 0;
    position: relative;
}

.lifecycle-h-line {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    height: 2px;
    background: var(--border);
    z-index: 0;
}

.lifecycle-h-line-completed {
    position: absolute;
    top: 10px;
    left: 10px;
    height: 2px;
    background: var(--success);
    z-index: 1;
    transition: width 0.3s;
}

.lifecycle-h-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 2;
    margin: 0 auto;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    transition: all 0.2s;
}

.lifecycle-h-dot.pending {
    background: #d1d5db;
}

.lifecycle-h-dot.in_progress {
    background: var(--primary);
    animation: pulse-dot 1.5s infinite;
}

.lifecycle-h-dot.completed {
    background: var(--success);
}

.lifecycle-h-dot.skipped {
    background: var(--text-light);
}

.lifecycle-h-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.lifecycle-h-label {
    font-size: 8px;
    color: var(--text-light);
    text-align: center;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.lifecycle-h-item.current .lifecycle-h-label {
    color: var(--primary);
    font-weight: 600;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.production-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-light);
    padding-top: 8px;
    border-top: 1px solid var(--border);
    margin-top: 6px;
}

.production-progress-text {
    font-weight: 600;
    color: var(--text-secondary);
}

/* 垂直生命周期时间线（详情弹窗） */
.lifecycle-vertical {
    position: relative;
    padding-left: 8px;
}

.lifecycle-v-item {
    display: flex;
    gap: 14px;
    position: relative;
    padding-bottom: 20px;
}

.lifecycle-v-item:last-child {
    padding-bottom: 0;
}

.lifecycle-v-item::before {
    content: '';
    position: absolute;
    left: 13px;
    top: 28px;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.lifecycle-v-item:last-child::before {
    display: none;
}

.lifecycle-v-item.completed::before {
    background: var(--success);
}

.lifecycle-v-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 1;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.lifecycle-v-dot.pending { background: #d1d5db; }
.lifecycle-v-dot.in_progress { background: var(--primary); animation: pulse-dot 1.5s infinite; }
.lifecycle-v-dot.completed { background: var(--success); }
.lifecycle-v-dot.skipped { background: var(--text-light); }

.lifecycle-v-content {
    flex: 1;
    min-width: 0;
}

.lifecycle-v-stage-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.lifecycle-v-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.6;
}

.lifecycle-v-notes {
    font-size: 12px;
    color: var(--text);
    margin-top: 6px;
    padding: 8px 10px;
    background: var(--bg);
    border-radius: 8px;
    line-height: 1.5;
}

.lifecycle-v-action {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.stage-status-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.stage-status-badge.pending { background: #f3f4f6; color: var(--text-light); }
.stage-status-badge.in_progress { background: rgba(26,108,240,0.1); color: var(--primary); }
.stage-status-badge.completed { background: var(--success-bg); color: var(--success); }
.stage-status-badge.skipped { background: #f3f4f6; color: var(--text-light); }

.stage-action-btn {
    padding: 5px 12px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: #fff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.stage-action-btn:active { background: #f8f9fb; }
.stage-action-btn.primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.stage-action-btn.primary:active { opacity: 0.9; }
.stage-action-btn.success {
    color: var(--success);
    border-color: var(--success);
}

/* 底部导航7项适配 */
.bottom-nav .nav-item span {
    font-size: 9px;
}

/* 阶段筛选标签 - 生产专用 */
.production-stage-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.stage-icon-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    background: #fff;
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.stage-icon-pill.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.stage-icon-pill .stage-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
