/* ===== 精简版多租户打卡系统 - 共享样式（按老系统 UI 重制） ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ============ 头部 ============ */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 300;
}
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.header h1 { font-size: 24px; }
.nav { display: flex; gap: 10px; flex-wrap: wrap; }
.nav a {
    color: white;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 4px;
    transition: background 0.3s;
    font-size: 14px;
}
.nav a:hover, .nav a.active { background: rgba(255,255,255,0.2); }

/* 移动端汉堡菜单 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.mobile-menu-btn span {
    width: 100%;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s;
}
.mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translateY(7px); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translateY(-7px); }

.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 10px;
    right: 10px;
    background: white;
    flex-direction: column;
    padding: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-radius: 12px;
    margin-top: 8px;
    overflow: hidden;
    z-index: 50;
}
.mobile-nav a {
    color: #333;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 15px;
}
.mobile-nav a:hover { background: #f5f7fa; }
.mobile-nav a.active { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
.mobile-nav a:last-child {
    color: #e74c3c;
    margin-top: 4px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}
.mobile-nav.active { display: flex; }

/* ============ 主体 ============ */
.main-content { padding: 20px 0; min-height: calc(100vh - 200px); }

/* ============ 卡片 ============ */
.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.card h2 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}
.card h3 { font-size: 15px; margin-bottom: 12px; color: #333; }

/* ============ 表单 ============ */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}
.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
    background: #fff;
    color: #333;
}
.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ============ 按钮 ============ */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    line-height: 1.4;
}
.btn-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(102,126,234,0.4); }
.btn-success { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); color: white; }
.btn-danger { background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%); color: white; }
.btn-secondary { background: #6c757d; color: white; }
.btn-warning { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); color: white; }
.btn-info { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); color: white; }
.btn-sm { padding: 8px 16px; font-size: 12px; }
.btn-block { display: block; width: 100%; }

/* ============ 提示 ============ */
.alert { padding: 14px; border-radius: 6px; margin-bottom: 20px; font-size: 14px; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ============ 表格 ============ */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; min-width: 600px; }
.table th, .table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}
.table th { background: #f8f9fa; font-weight: 600; color: #555; white-space: nowrap; }
.table tr:hover { background: #f8f9fa; }

/* ============ 标签 ============ */
.tag { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.tag-success { background: #d4edda; color: #155724; }
.tag-warning { background: #fff3cd; color: #856404; }
.tag-danger { background: #f8d7da; color: #721c24; }
.tag-info { background: #d1ecf1; color: #0c5460; }

/* ============ 统计卡 ============ */
.stats-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.stat-card {
    flex: 1;
    min-width: 150px;
    text-align: center;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.stat-label { color: #777; font-size: 14px; margin-bottom: 8px; }
.stat-value { font-size: 32px; font-weight: 700; color: #667eea; }
.stat-value.highlight { color: #667eea; }

/* ============ 通知 ============ */
.notification-item {
    display: block;
    padding: 14px;
    border: 1px solid #eee;
    border-radius: 6px;
    margin-bottom: 12px;
    transition: all 0.3s;
    color: #333;
    text-decoration: none;
}
.notification-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); text-decoration: none; }
.notification-item.unread { background: #e8f0fe; border-left: 3px solid #667eea; }
.notif-title { font-weight: 500; margin-bottom: 4px; }
.notif-time { color: #777; font-size: 12px; }

/* ============ 列表项 ============ */
.action-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 4px;
    border-bottom: 1px solid #eee;
    color: #333;
    text-decoration: none;
    font-size: 15px;
}
.action-item:hover { background: #f8f9fa; text-decoration: none; }
.action-item .arrow { color: #ccc; }

/* ============ 工具类 ============ */
.flex { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.text-muted { color: #777; }
.text-center { text-align: center; }
.mt-10 { margin-top: 10px; }
.mb-10 { margin-bottom: 10px; }
.mb-16 { margin-bottom: 16px; }

/* ============ 页脚 ============ */
.footer { text-align: center; padding: 24px 0; color: #777; font-size: 13px; }

/* ============ 认证页（登录/注册/安装） ============ */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}
.auth-card {
    background: #fff;
    border-radius: 12px;
    padding: 34px 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.auth-card h1 { margin: 0 0 6px; font-size: 24px; text-align: center; color: #333; }
.auth-sub { margin: 0 0 22px; text-align: center; color: #777; }
.auth-links { margin-top: 18px; text-align: center; font-size: 14px; }
.auth-links a { color: #667eea; text-decoration: none; }

/* ============ 响应式 ============ */
@media (max-width: 768px) {
    .container { padding: 0 12px; }
    .header { padding: 12px 0; position: relative; }
    .header h1 { font-size: 18px; }
    .nav { display: none; }
    /* 超级管理端链接少：手机端保持换行显示，不折叠 */
    .admin-header .nav { display: flex; flex-wrap: wrap; }
    .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }
    .main-content { padding: 16px 0; }
    .card { padding: 16px; border-radius: 6px; }
    .card h2 { font-size: 16px; margin-bottom: 14px; }
    .stat-value { font-size: 28px; }
    .btn { padding: 14px 24px; font-size: 15px; }
    .table th, .table td { padding: 8px 10px; font-size: 13px; }
}

@media (max-width: 480px) {
    .header h1 { font-size: 16px; }
    .card { padding: 14px; }
    .stat-value { font-size: 24px; }
    .form-control { padding: 14px; font-size: 16px; }
    .btn { padding: 16px; font-size: 16px; }
}

/* ============ 首页/收光：老系统 grid 统计卡 ============ */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.stat-card .number { font-size: 32px; font-weight: 700; color: #667eea; }
.stat-card .label { color: #777; margin-top: 8px; font-size: 14px; }

/* 收光记录：桌面表格 / 手机卡片 */
.light-desktop { display: block; }
.light-mobile { display: none; }

@media (max-width: 768px) {
    .grid-2, .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-card .number { font-size: 28px; }
    .light-desktop { display: none; }
    .light-mobile { display: flex; flex-direction: column; gap: 16px; }
    .light-card { border: 1px solid #e0e0e0; border-radius: 10px; overflow: hidden; background: #fff; }
    .light-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; padding: 12px 16px; }
    .light-date { font-size: 16px; font-weight: 600; }
    .light-body { padding: 16px; }
    .light-item { display: flex; justify-content: space-between; padding: 8px 0; }
    .light-label { color: #666; font-size: 14px; }
    .light-value { color: #333; font-size: 15px; font-weight: 500; }
    .light-reward { color: #667eea !important; font-size: 18px !important; font-weight: bold !important; }
}

/* ============ 二级页导航条（通知/工资/钱包等） ============ */
.page-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(102,126,234,0.28);
    margin-bottom: 16px;
}
.page-nav-back {
    display: flex;
    align-items: center;
    color: rgba(255,255,255,0.92);
    text-decoration: none;
    transition: color 0.2s, transform 0.2s;
}
.page-nav-back:hover { color: #ffffff; transform: translateX(-2px); }
.page-nav-icon {
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,0.22);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
}
.page-nav-title {
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (max-width: 640px) {
    .page-nav {
        padding: 10px 16px;
        background: rgba(255,255,255,0.92);
        box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 4px 16px rgba(102,126,234,0.08);
    }
    .page-nav-back { color: #6b7280; }
    .page-nav-back:hover { color: #374151; }
    .page-nav-title { color: #1f2937; }
    .page-nav-icon { background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%); color: #667eea; }
}
@media (min-width: 768px) {
    .page-nav { position: static; }
}

/* ============ 工资明细：桌面表格 / 手机卡片 ============ */
.salary-desktop { display: block; }
.salary-mobile { display: none; }
.salary-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.salary-table th { padding: 12px 10px; text-align: left; border-bottom: 2px solid #667eea; font-weight: 600; color: #333; font-size: 13px; white-space: nowrap; }
.salary-table td { padding: 12px 10px; border-bottom: 1px solid #e9ecef; color: #555; font-size: 13px; }
.salary-table tr:nth-child(even) { background: #fafafa; }
.salary-table tr:last-child td { border-bottom: none; }
.salary-total { font-weight: 700; color: #667eea; font-size: 15px; }
.salary-fine { color: #dc3545; font-weight: 500; }
.salary-card { border: 1px solid #e0e0e0; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin-bottom: 12px; }
.salary-card-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 15px; display: flex; justify-content: space-between; align-items: center; }
.salary-card-title { font-weight: 600; color: #fff; font-size: 14px; }
.salary-card-body { padding: 16px; }
.salary-card-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 2px; font-size: 14px; color: #555; }
.salary-card-row span:first-child { color: #666; }
.salary-card-row span:last-child { color: #333; font-weight: 500; }
.salary-card-total { margin-top: 4px; padding: 12px 2px 0; border-top: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; font-size: 16px; }
.salary-card-total strong { color: #667eea; font-size: 22px; font-weight: bold; }

@media (max-width: 768px) {
    .salary-desktop { display: none !important; }
    .salary-mobile { display: flex !important; flex-direction: column; gap: 15px; }
}

/* ============ 登录/注册：居中卡片 ============ */
.login-container { max-width: 400px; margin: 60px auto; padding: 0 20px; }
