/* ===== 员工档案与产品信息管理系统 - 全局样式 ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: #f1f5f9;
    color: #1e293b;
    font-size: 14px;
    line-height: 1.6;
}
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- 顶栏 ---------- */
.topbar { background: #0f172a; color: #fff; }
.topbar-inner {
    max-width: 1280px; margin: 0 auto; padding: 0 20px;
    display: flex; align-items: center; height: 56px; gap: 24px;
}
.brand { font-size: 16px; font-weight: 600; color: #fff; white-space: nowrap; }
.brand:hover { text-decoration: none; opacity: .9; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.nav a {
    color: #cbd5e1; padding: 8px 14px; border-radius: 6px; font-size: 14px; white-space: nowrap;
}
.nav a:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.nav a.active { color: #fff; background: #2563eb; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.admin-name { color: #94a3b8; font-size: 13px; }

/* ---------- 布局 ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 20px; }
.page-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px; gap: 12px; flex-wrap: wrap;
}
.page-head h2 { font-size: 20px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-block; padding: 8px 16px; border-radius: 6px; border: 1px solid #cbd5e1;
    background: #fff; color: #334155; font-size: 14px; cursor: pointer;
    text-align: center; line-height: 1.4; transition: all .15s;
}
.btn:hover { border-color: #94a3b8; background: #f8fafc; text-decoration: none; }
.btn-primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; }
.btn-danger { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }
.btn-outline { background: transparent; color: #2563eb; border-color: #93c5fd; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- 表单 ---------- */
.form-group { margin-bottom: 14px; flex: 1; min-width: 180px; }
.form-group-wide { flex: 2.2; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; }
.form-control {
    width: 100%; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 6px;
    font-size: 14px; background: #fff; color: #1e293b; outline: none;
}
.form-control:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
textarea.form-control { resize: vertical; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }
.req { color: #dc2626; }
.checkbox { display: block; margin: 6px 0; cursor: pointer; user-select: none; }
.checkbox input { margin-right: 6px; }
.muted { color: #64748b; font-size: 13px; }

/* ---------- 卡片 / 表格 ---------- */
.card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
    padding: 16px 20px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.card-head h3 { font-size: 16px; }
.card-head .more { font-size: 13px; }
.card-inner { border: 1px dashed #cbd5e1; border-radius: 8px; padding: 12px 16px; margin-bottom: 14px; background: #f8fafc; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid #e2e8f0; text-align: left; vertical-align: middle; }
.table th { background: #f8fafc; font-weight: 600; color: #475569; white-space: nowrap; }
.table tbody tr:hover { background: #f8fafc; }
.table .empty { text-align: center; color: #94a3b8; padding: 30px 0; }
.table-wide th, .table-wide td { white-space: nowrap; }
.td-actions { white-space: nowrap; }
.th-actions { width: 150px; }
.inline-form { display: inline-block; margin-left: 4px; }
.search-bar { display: flex; gap: 8px; margin-bottom: 12px; }
.search-bar .form-control { max-width: 420px; }

/* ---------- 统计卡 ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 18px 20px;
}
.stat-num { font-size: 28px; font-weight: 700; color: #0f172a; }
.stat-label { color: #64748b; margin: 4px 0 8px; }
.stat-link { font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2 > .card { margin-bottom: 0; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- 分页 ---------- */
.pagination { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.pagination .page {
    display: inline-block; min-width: 32px; padding: 6px 10px; text-align: center;
    border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #334155;
}
.pagination .page.current { background: #2563eb; border-color: #2563eb; color: #fff; }

/* ---------- 提示 ---------- */
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }
.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert-danger  { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* ---------- 登录页 ---------- */
.login-body { background: #0f172a; min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-wrap { width: 100%; padding: 20px; display: flex; justify-content: center; }
.login-card {
    background: #fff; border-radius: 12px; padding: 32px; width: 100%; max-width: 400px;
    box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.login-title { font-size: 20px; text-align: center; margin-bottom: 4px; }
.login-sub { text-align: center; color: #64748b; margin-bottom: 20px; }
.login-hint { margin-top: 16px; font-size: 12px; color: #94a3b8; text-align: center; line-height: 1.7; }

/* ---------- 计算预览 ---------- */
.calc-preview-title { font-weight: 600; margin-bottom: 10px; font-size: 14px; }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.calc-item { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 12px; text-align: center; }
.calc-num { font-size: 18px; font-weight: 700; color: #2563eb; }
.calc-label { font-size: 12px; color: #64748b; margin-top: 2px; }

/* ---------- 二维码 ---------- */
.qr-cell { text-align: center; }
.qr-box { display: inline-block; }
.qr-box canvas { border: 1px solid #e2e8f0; border-radius: 4px; }
.qr-download { display: inline-block; margin-top: 6px; }
.preview-box {
    margin-top: 14px; background: #f8fafc; border: 1px dashed #cbd5e1;
    border-radius: 8px; padding: 10px 14px; font-size: 13px; line-height: 1.9;
}
.masked { color: #dc2626; font-weight: 600; letter-spacing: 1px; }

/* ---------- 快捷功能 ---------- */
.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 滚动公告（单条滚动，不重复显示两组） ---------- */
.announce-scroll {
    background: #fef3c7; border-bottom: 1px solid #fde68a; overflow: hidden;
    padding: 6px 0; white-space: nowrap;
}
.announce-scroll-track {
    display: inline-block; width: max-content; will-change: transform;
    animation: announce-scroll 20s linear infinite;
}
.announce-scroll-item { display: inline-block; padding: 0 40px 0 0; color: #92400e; font-size: 14px; }
@keyframes announce-scroll {
    from { transform: translateX(100vw); }
    to   { transform: translateX(-100%); }
}

/* ---------- 弹窗公告 ---------- */
.announce-popup-mask {
    position: fixed; inset: 0; background: rgba(15, 23, 42, .55); z-index: 1000;
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.announce-popup-mask[hidden], [hidden] { display: none !important; }
.announce-popup {
    position: relative; background: #fff; border-radius: 12px; max-width: 460px; width: 100%;
    padding: 24px 28px 28px; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.announce-popup-close {
    position: absolute; top: 10px; right: 12px; border: 0; background: transparent;
    font-size: 24px; line-height: 1; color: #94a3b8; cursor: pointer;
}
.announce-popup-close:hover { color: #334155; }
.announce-popup-title { font-size: 18px; margin: 0 0 10px; color: #0f172a; }
.announce-popup-text { color: #334155; font-size: 14px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }

/* ---------- 首页（公开版） ---------- */
.hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%); color: #fff;
    border-radius: 12px; padding: 36px 28px; margin-bottom: 18px;
}
.hero h1 { font-size: 26px; margin: 0 0 10px; }
.hero p { font-size: 15px; color: #dbeafe; margin: 0; line-height: 1.8; }
.home-banner { border-left: 4px solid #2563eb; }
.home-banner h3 { margin: 0 0 6px; }
.home-banner p { margin: 0; color: #334155; }
.home-note p { margin: 0; color: #64748b; }

/* ---------- 二维码实时预览（产品表单） ---------- */
.qr-preview-row { display: flex; gap: 18px; flex-wrap: wrap; }
.qr-preview-col { flex: 1; min-width: 220px; }
.qr-preview-col-fixed { flex: 0 0 190px; min-width: 0; text-align: center; }
.qr-preview-title { font-weight: 600; margin-bottom: 8px; color: #334155; }
.qr-preview-box {
    display: inline-block; background: #fff; border: 1px solid #e2e8f0;
    border-radius: 8px; padding: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.qr-preview-box canvas { display: block; }

/* ---------- 员工头像 ---------- */
.avatar-cell { text-align: center; width: 56px; }
.avatar-thumb { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid #e2e8f0; background: #f8fafc; }
.avatar-upload { display: flex; gap: 18px; align-items: center; margin-bottom: 8px; }
.avatar-preview { flex: 0 0 84px; }
.avatar-preview img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 2px solid #e2e8f0; background: #f8fafc; }

/* ---------- 产品图片 ---------- */
.prod-thumb { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; border: 1px solid #e2e8f0; vertical-align: middle; margin-right: 6px; background: #f8fafc; }
.avatar-preview img.prod-preview { border-radius: 8px; }
/* 产品图片预览：小屏不超屏 */
.prod-preview { max-width: 100%; height: auto; }

/* ---------- 社交二维码上传 ---------- */
.card-sub { font-size: 13px; font-weight: 600; color: #475569; border-left: 3px solid #2563eb; padding-left: 8px; margin: 18px 0 10px; }
.qr-upload-row { display: flex; gap: 10px; align-items: center; }
.qr-upload-row .form-control-file { flex: 1; min-width: 150px; }
.qr-thumb { width: 56px; height: 56px; object-fit: contain; border: 1px solid #e2e8f0; border-radius: 6px; background: #fff; padding: 2px; }
.qr-thumb-empty { opacity: .5; }

/* ---------- 考勤 / 工资 ---------- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; }
.badge-present { background: #dcfce7; color: #15803d; }
.badge-leave   { background: #fef9c3; color: #a16207; }
.badge-absent  { background: #fee2e2; color: #b91c1c; }
.badge-rest    { background: #e2e8f0; color: #475569; }
.ot { color: #b91c1c; font-weight: 600; }
.tfoot-row td { background: #f1f5f9; font-weight: 600; }
.form-control-file { padding: 6px 0; }

/* ---------- 手机端：表格竖排卡片化 ---------- */
@media (max-width: 768px) {
    .container { padding: 12px; }
    .topbar-inner { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 8px 16px; }
    .nav { order: 3; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
    .topbar-right { margin-left: auto; }

    .table-wrap { overflow-x: visible; }
    .table, .table tbody, .table tr, .table td { display: block; width: 100%; box-sizing: border-box; }
    .table thead { display: none; }
    .table tr {
        border: 1px solid #e2e8f0; border-radius: 12px; margin-bottom: 14px;
        background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.06); padding: 4px 14px;
    }
    .table tbody tr:hover { background: #fff; }
    .table td {
        display: flex; justify-content: space-between; align-items: center; gap: 14px;
        padding: 8px 2px; border-bottom: 1px dashed #eef2f7; text-align: right; white-space: normal;
    }
    .table td:last-child { border-bottom: none; }
    .table td::before { content: attr(data-label); flex: 0 0 auto; font-weight: 600; color: #64748b; text-align: left; font-size: 13px; }
    .table td:empty::before { content: ''; }

    /* 头像列：卡片顶部居中 */
    .table td.avatar-cell { display: block; text-align: center; padding: 12px 0 8px; }
    .table td.avatar-cell::before { content: none; }
    .avatar-thumb { width: 56px; height: 56px; }

    /* 产品名称列：图片+名称左对齐，查看按钮 */
    .table td.prod-name-cell { justify-content: flex-start; text-align: left; flex-wrap: wrap; }
    .table td.prod-name-cell::before { content: none; }
    .view-link { margin-left: 6px; }

    /* 二维码列：居中 */
    .table td.qr-cell { display: block; text-align: center; padding: 10px 0 6px; }
    .table td.qr-cell::before { content: none; }

    /* 操作列：按钮横排换行 */
    .table td.td-actions { justify-content: flex-start; flex-wrap: wrap; border-top: 1px solid #eef2f7; margin-top: 4px; padding-top: 10px; }
    .table td.td-actions::before { content: none; }
    .table .inline-form { display: inline; }

    /* 空提示行 */
    .table .empty { display: block; text-align: center; padding: 24px 0; }
    .table .empty::before { content: none; }

    /* 工资合计行：保留横排换行 */
    .table .tfoot-row td { display: inline-flex; width: auto; border: none; margin: 0 10px 6px 0; padding: 4px 0; background: none; }
    .table .tfoot-row td::before { content: attr(data-label); margin-right: 4px; font-weight: 600; color: #64748b; font-size: 12px; }
}

/* ---------- 打印 ---------- */
@media print {
    body { background: #fff; }
    .announce-scroll, .announce-popup-mask { display: none !important; }
}

/* ========== v1.14：身份证 / 银行卡上传 ========== */
.idcard-upload-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.idcard-upload-item { display: flex; flex-direction: column; gap: 4px; }
.idcard-thumb {
    width: 160px; height: 100px; object-fit: cover;
    border: 1px dashed #cbd5e1; border-radius: 8px; background: #f1f5f9;
    display: block; box-sizing: border-box;
}
img.idcard-thumb[src=""], img.idcard-thumb:not([src]), img.idcard-thumb.thumb-missing {
    background: #f1f5f9 url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2240%22 height=%2240%22 viewBox=%220 0 24 24%22 fill=%22%2394a3b8%22%3E%3Cpath d=%22M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z%22/%3E%3C/svg%3E') no-repeat center center;
    background-size: 40px 40px;
}
.idcard-upload-item .form-control-file { font-size: 12px; width: 160px; padding: 2px 0; }
.bankcard-thumb { width: 220px; height: 120px; object-fit: cover; border-radius: 8px; }

/* ========== v1.14：员工详情页 ========== */
.emp-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.emp-detail-card { border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 16px; background: #fbfcfe; }
.emp-detail-card h4 { margin: 0 0 10px; font-size: 14px; color: #475569; border-left: 3px solid #2563eb; padding-left: 8px; }
.emp-detail-card dl { margin: 0; display: grid; grid-template-columns: 96px 1fr; row-gap: 8px; font-size: 13px; }
.emp-detail-card dt { color: #64748b; font-weight: 600; }
.emp-detail-card dd { margin: 0; word-break: break-all; }
.img-view-row { display: flex; gap: 16px; flex-wrap: wrap; }
.img-view-box { text-align: center; }
.img-view-box img { max-width: 240px; max-height: 150px; border: 1px solid #e2e8f0; border-radius: 8px; object-fit: cover; }
.img-view-box span { display: block; font-size: 12px; color: #64748b; margin-top: 4px; }
.img-locked { color: #94a3b8; font-size: 13px; padding: 10px 0; }

/* ========== v1.14：月度考勤矩阵（1~31 天） ========== */
.att-matrix-wrap { overflow-x: auto; }
.att-matrix { border-collapse: collapse; white-space: nowrap; }
.att-matrix th, .att-matrix td { border: 1px solid #e2e8f0; padding: 3px 4px; font-size: 12px; text-align: center; }
.att-matrix th { background: #f1f5f9; font-weight: 600; }
.att-matrix th.att-day-out, .att-matrix td.att-day-out { background: #f8fafc; }
.att-matrix .att-emp-col { text-align: left; min-width: 130px; position: sticky; left: 0; background: #fff; z-index: 1; }
.att-matrix thead th.att-emp-col { background: #f1f5f9; }
.att-matrix .att-sum-col { min-width: 90px; background: #f8fafc; font-size: 12px; line-height: 1.7; }
.att-day { min-width: 88px; }
.att-cell { display: flex; flex-direction: column; gap: 2px; align-items: center; line-height: 1.5; }
.att-cell .badge { padding: 0 6px; font-size: 11px; }
.att-time { color: #475569; font-size: 11px; }
.att-ot { color: #b91c1c; font-weight: 600; font-size: 11px; }
.att-otr { color: #a16207; font-size: 11px; max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: #fef9c3; border-radius: 4px; padding: 0 4px; }
.att-note { color: #64748b; font-size: 10px; border: 1px solid #cbd5e1; border-radius: 4px; padding: 0 3px; }
.att-empty { color: #cbd5e1; }
/* 手机端矩阵保持横向滚动，不做竖排卡片 */
@media (max-width: 768px) {
    .att-matrix-wrap { -webkit-overflow-scrolling: touch; }
    .att-matrix .table, .att-matrix .table tbody, .att-matrix .table tr, .att-matrix .table td,
    .att-matrix .table th { display: table-cell; }
    .att-matrix .table { display: table; }
    .att-matrix .table tr { box-shadow: none; padding: 0; margin: 0; }
}
/* 考勤视图切换标签 */
.view-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.view-tabs a { padding: 6px 16px; border: 1px solid #cbd5e1; border-radius: 999px; font-size: 13px; color: #475569; text-decoration: none; }
.view-tabs a.active { background: #2563eb; color: #fff; border-color: #2563eb; }
.view-tabs a.btn-link-tab { background: #f0f9ff; border-color: #93c5fd; color: #1d4ed8; font-weight: 600; }

/* ============ v1.15：31 格点击式考勤录入 ============ */
.att-grid-legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0; font-size: 13px; color: #475569; }
.att-grid-legend .lg { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 4px; border: 1px solid rgba(0,0,0,.08); }
.lg-present { background: #bfdbfe; }
.lg-leave { background: #fde68a; }
.lg-absent { background: #fecaca; }
.lg-rest { background: #e2e8f0; }

/* v1.17 工资调整区（绩效奖励/罚款/补贴） */
.adj-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin: 12px 0; padding: 10px 12px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; font-size: 13px; }
.adj-title { font-weight: 600; color: #0f172a; }
.adj-bar label { display: inline-flex; align-items: center; gap: 4px; color: #334155; }
.adj-in { width: 96px !important; display: inline-block !important; }

.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.att-grid-cell {
    border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px;
    background: #fff; cursor: pointer; transition: background .15s, border-color .15s; min-height: 96px;
    display: flex; flex-direction: column; gap: 6px;
}
.att-grid-cell:hover { border-color: #93c5fd; }
.att-grid-cell.st-present { background: #eff6ff; border-color: #93c5fd; }
.att-grid-cell.st-leave { background: #fefce8; border-color: #facc15; }
.att-grid-cell.st-absent { background: #fef2f2; border-color: #f87171; }
.att-grid-cell.st-rest { background: #f8fafc; border-color: #94a3b8; }
.att-grid-cell.att-grid-out { opacity: .35; pointer-events: none; background: repeating-linear-gradient(45deg,#f1f5f9,#f1f5f9 6px,#e2e8f0 6px,#e2e8f0 12px); border-style: dashed; }
.agc-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; color: #0f172a; }
.agc-status { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: #dbeafe; color: #1d4ed8; }
.st-leave .agc-status { background: #fef9c3; color: #a16207; }
.st-absent .agc-status { background: #fee2e2; color: #b91c1c; }
.st-rest .agc-status { background: #e2e8f0; color: #475569; }
.agc-fields { display: flex; flex-direction: column; gap: 4px; }
.agc-hidden { display: none !important; }
.agc-hours { display: flex; gap: 4px; align-items: center; }
.agc-label { font-size: 11px; color: #64748b; white-space: nowrap; }
.agc-work-h { width: 52px !important; }
.agc-in { font-size: 12px !important; padding: 2px 6px !important; height: auto !important; }
.agc-ot { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.agc-ot-label { font-size: 11px; color: #64748b; white-space: nowrap; }
.agc-ot-h { width: 48px !important; }
.agc-unit { font-size: 10px; color: #94a3b8; }
.agc-ot-remark { flex: 1; min-width: 60px; }
.agc-pay { font-size: 11px; color: #1d4ed8; background: #dbeafe; border-radius: 6px; padding: 3px 8px; }
.agc-pay-num { font-size: 12px; }
.att-hours { color: #0369a1; font-weight: 600; font-size: 11px; }
@media (max-width: 768px) {
    .att-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .att-grid-cell { min-height: 84px; padding: 6px; }
}

/* ============ v1.15：员工自助查看详细考勤（1~31 天两行样式） ============ */
.staff-att-wrap { overflow-x: auto; margin: 6px 0 8px; }
.staff-att-table { border-collapse: collapse; white-space: nowrap; width: auto; min-width: 100%; }
.staff-att-table caption { caption-side: top; text-align: left; font-weight: 600; font-size: 14px; color: #0f172a; padding: 4px 0 8px; }
.staff-att-table th, .staff-att-table td { border: 1px solid #e2e8f0; padding: 5px 7px; text-align: center; font-size: 13px; min-width: 30px; }
.staff-att-table thead th { background: #f1f5f9; font-weight: 600; }
.staff-att-table th.row-label { background: #f1f5f9; font-weight: 600; text-align: left; position: sticky; left: 0; }
.staff-att-table .att-day-cell { background: #bfdbfe; color: #1e3a8a; font-size: 12px; }
.staff-att-table .att-day-cell.st-leave { background: #fde68a; color: #78350f; }
.staff-att-table .att-day-cell.st-absent { background: #fecaca; color: #7f1d1d; }
.staff-att-table .att-day-cell.st-rest { background: #e2e8f0; color: #475569; }
.staff-att-table .att-day-cell.st-none { background: #fff; }
.staff-att-table .att-ot-cell { background: #fff; color: #b91c1c; font-size: 12px; }
.staff-att-table .att-ot-cell.has { background: #fef2f2; font-weight: 600; }
.staff-att-table .att-total { background: #f8fafc; font-weight: 700; min-width: 70px; }
.staff-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 2px; }
.dot-present { background: #bfdbfe; }
.dot-leave { background: #fde68a; }
.dot-absent { background: #fecaca; }
.dot-rest { background: #e2e8f0; }

/* ============ v1.15：用户权限标签 ============ */
.perm-tag { display: inline-block; background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; border-radius: 999px; padding: 1px 8px; font-size: 11px; margin: 1px 3px 1px 0; }
.perm-box { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 10px 12px; margin-top: 8px; }
