/* ===== 鸿蒙WebView兼容 ===== */
html { touch-action: manipulation; }
* { -webkit-tap-highlight-color: rgba(0,0,0,0); }
select, .date-selects select { z-index: 9999 !important; max-height: 70vh !important; }
.stat-card.gray { background: #f8fafc; color: #64748b; border: 2px solid #e2e8f0; }

/* 工管系请假审批系统 - 统一样式
   移动端优先，深蓝渐变 + 橙色请假强调 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 50%, #c7d2fe 100%);
    min-height: 100vh; color: #1e293b;
    -webkit-text-size-adjust: 100%;
}
a { text-decoration: none; color: inherit; }

/* 顶部导航栏 */
.navbar {
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%);
    color: white; padding: 14px 16px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 2px 12px rgba(30,58,138,0.25);
    position: sticky; top: 0; z-index: 100;
}
.navbar .brand { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.navbar .brand .badge-icon { width: 32px; height: 32px; background: rgba(255,255,255,0.2); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.navbar .nav-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.navbar .nav-links a {
    color: white; padding: 7px 12px; border-radius: 8px; font-size: 13px;
    font-weight: 600; transition: background 0.2s;
}
.navbar .nav-links a:hover, .navbar .nav-links a.active { background: rgba(255,255,255,0.18); }
.navbar .nav-links a.leave-highlight {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    box-shadow: 0 2px 8px rgba(234,88,12,0.4);
    font-size: 14px; padding: 8px 16px;
}
.navbar .nav-links a.leave-highlight:hover { background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%); }

/* 未读角标 */
.badge {
    background: #ef4444; color: white; font-size: 11px; font-weight: 700;
    min-width: 18px; height: 18px; line-height: 18px; border-radius: 10px;
    padding: 0 5px; display: inline-block; text-align: center; margin-left: 3px;
}

/* 容器 */
.container { max-width: 720px; margin: 0 auto; padding: 16px; }

/* 卡片 */
.card {
    background: white; border-radius: 16px; padding: 20px;
    box-shadow: 0 4px 20px rgba(30,58,138,0.08); margin-bottom: 16px;
    border: 1px solid #e2e8f0;
}
.card-title {
    font-size: 18px; font-weight: 700; color: #1e3a8a;
    margin-bottom: 14px; padding-bottom: 12px;
    border-bottom: 2px solid #eef2ff; display: flex; justify-content: space-between; align-items: center;
}

/* 按钮 */
.btn {
    display: inline-block; border: none; border-radius: 12px;
    padding: 12px 20px; font-size: 15px; font-weight: 700;
    cursor: pointer; transition: all 0.2s; text-align: center;
}
.btn-primary { background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%); color: white; width: 100%; }
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-orange { background: linear-gradient(135deg, #ea580c 0%, #f97316 100%); color: white; width: 100%; }
.btn-orange:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(234,88,12,0.3); }
.btn-green { background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%); color: white; }
.btn-green:hover { opacity: 0.9; }
.btn-red { background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%); color: white; }
.btn-red:hover { opacity: 0.9; }
.btn-gray { background: #f1f5f9; color: #475569; }
.btn-gray:hover { background: #e2e8f0; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; color: #475569; margin-bottom: 8px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 12px 14px; border: 2px solid #e2e8f0;
    border-radius: 12px; font-size: 16px; outline: none; font-family: inherit;
    transition: border-color 0.2s; background: #f8fafc; color: #1e293b;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: #3730a3; box-shadow: 0 0 0 3px rgba(55,48,163,0.1); background: white;
}
.form-group textarea { min-height: 100px; resize: vertical; }
.form-group select { appearance: none; -webkit-appearance: none; }

/* 消息提示 */
.alert {
    padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 600;
    margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.alert-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.alert-info { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }

/* 状态标签 */
.tag {
    display: inline-block; padding: 4px 12px; border-radius: 20px;
    font-size: 12px; font-weight: 700;
}
.tag-pending { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.tag-pass { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.tag-reject { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

/* 列表项 */
.list-item {
    border: 1px solid #e2e8f0; border-radius: 14px; padding: 16px;
    margin-bottom: 12px; background: white; transition: all 0.2s;
    border-left: 5px solid #e2e8f0;
}
.list-item:hover { box-shadow: 0 4px 14px rgba(30,58,138,0.08); }
.list-item.pending { border-left-color: #f97316; }
.list-item.pass { border-left-color: #22c55e; }
.list-item.reject { border-left-color: #ef4444; }
.list-item .item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; flex-wrap: wrap; gap: 6px; }
.list-item .item-title { font-size: 16px; font-weight: 700; color: #1e293b; }
.list-item .item-desc { font-size: 14px; color: #64748b; margin-bottom: 6px; }
.list-item .item-meta { font-size: 12px; color: #94a3b8; }
.list-item .item-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* 统计卡片 */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-card {
    background: white; border-radius: 14px; padding: 16px 12px; text-align: center;
    box-shadow: 0 2px 10px rgba(30,58,138,0.06); border-top: 4px solid #e2e8f0;
}
.stat-card .num { font-size: 30px; font-weight: 800; }
.stat-card .label { font-size: 12px; color: #64748b; margin-top: 4px; font-weight: 600; }
.stat-card.orange { border-top-color: #f97316; }
.stat-card.orange .num { color: #ea580c; }
.stat-card.green { border-top-color: #22c55e; }
.stat-card.green .num { color: #16a34a; }
.stat-card.red { border-top-color: #ef4444; }
.stat-card.red .num { color: #dc2626; }
.stat-card.blue { border-top-color: #3730a3; }
.stat-card.blue .num { color: #1e3a8a; }

/* 空状态 */
.empty { text-align: center; padding: 40px 20px; color: #94a3b8; }
.empty .icon { font-size: 48px; margin-bottom: 12px; }
.empty .text { font-size: 15px; }

/* 筛选标签 */
.filter-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.filter-tab {
    padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: 600;
    border: 1px solid #e2e8f0; background: white; color: #64748b; cursor: pointer;
}
.filter-tab.active { background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%); color: white; border-color: #3730a3; }

/* 登录页 */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-card {
    background: white; border-radius: 20px; padding: 32px 28px; width: 100%; max-width: 400px;
    box-shadow: 0 10px 40px rgba(30,58,138,0.15);
}
.login-card .logo {
    width: 64px; height: 64px; background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    border-radius: 18px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center;
    font-size: 32px; box-shadow: 0 6px 20px rgba(234,88,12,0.3);
}
.login-card h1 { text-align: center; font-size: 20px; color: #1e3a8a; margin-bottom: 4px; }
.login-card .subtitle { text-align: center; font-size: 13px; color: #94a3b8; margin-bottom: 24px; }
.login-card .form-group label { font-size: 13px; }
.login-card .btn { margin-top: 8px; }
.login-card .hint { text-align: center; font-size: 12px; color: #94a3b8; margin-top: 16px; line-height: 1.6; }

/* 学生信息展示 */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.info-item { background: #f8fafc; border-radius: 10px; padding: 12px; }
.info-item .info-label { font-size: 12px; color: #94a3b8; margin-bottom: 4px; }
.info-item .info-value { font-size: 15px; font-weight: 600; color: #1e293b; }

/* 用户信息条 */
.user-bar {
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%);
    color: white; border-radius: 14px; padding: 16px; margin-bottom: 16px;
    display: flex; align-items: center; gap: 12px;
}
.user-bar .avatar { width: 44px; height: 44px; background: rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.user-bar .user-name { font-size: 17px; font-weight: 700; }
.user-bar .user-sub { font-size: 12px; opacity: 0.8; }

/* 日期选择 */
.date-selects { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.date-selects select { flex: 1; min-width: 0; padding: 10px; }
.date-unit { color: #64748b; font-size: 14px; font-weight: 700; margin: 0 2px; }

/* 响应式 */
@media (max-width: 480px) {
    .navbar { padding: 10px 12px; }
    .navbar .brand { font-size: 15px; }
    .navbar .nav-links a { padding: 6px 9px; font-size: 12px; }
    .navbar .nav-links a.leave-highlight { font-size: 13px; padding: 7px 12px; }
    .container { padding: 12px; }
    .card { padding: 16px; }
    .stats { gap: 8px; }
    .stat-card .num { font-size: 26px; }
    .info-grid { grid-template-columns: 1fr; }
    .btn { padding: 12px 16px; font-size: 14px; }
}
