/**
 * 登科督学班管理系统 - H5端全局样式
 * 蓝色主题 + Tab导航 + Toast动画 + 基础布局
 */

/* ===== 基础重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    color: #333;
    background: #f5f5f5;
    min-height: 100vh;
}

/* ===== Toast动画 ===== */
@keyframes dkToastFade {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes dkToastFadeOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* ===== 页面容器 ===== */
.dk-page {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
    padding-bottom: 70px; /* 为Tab栏留空间 */
    min-height: 100vh;
}

.dk-page-header {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 16px;
}

.dk-page-header-title {
    font-size: 18px;
    font-weight: 600;
    color: #1565C0;
}

.dk-page-header-back {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 8px;
    font-size: 20px;
    color: #1E88E5;
}

/* ===== Tab导航栏 ===== */
.dk-tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #1E88E5;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

.dk-tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    opacity: 0.7;
    flex: 1;
    padding: 4px 0;
    transition: opacity 0.2s;
}

.dk-tab-item.dk-tab-active {
    opacity: 1;
    font-weight: 600;
}

.dk-tab-icon {
    font-size: 20px;
    line-height: 1;
}

.dk-tab-label {
    font-size: 12px;
    margin-top: 2px;
}

/* ===== 卡片容器 ===== */
.dk-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.dk-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1E88E5;
    margin-bottom: 12px;
}

/* ===== 按钮 ===== */
.dk-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    outline: none;
}

.dk-btn-primary {
    background: #1E88E5;
    color: #fff;
}

.dk-btn-primary:hover {
    background: #1565C0;
}

.dk-btn-danger {
    background: #F44336;
    color: #fff;
}

.dk-btn-success {
    background: #4CAF50;
    color: #fff;
}

/* ===== 输入框 ===== */
.dk-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.dk-input:focus {
    border-color: #1E88E5;
}

.dk-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    background: #fff;
    appearance: none;
}

.dk-select:focus {
    border-color: #1E88E5;
}

/* ===== 空状态 ===== */
.dk-empty {
    text-align: center;
    padding: 40px 0;
    color: #999;
    font-size: 14px;
}

.dk-empty-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

/* ===== 列表 ===== */
.dk-list-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.dk-list-item:last-child {
    border-bottom: none;
}

.dk-list-label {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.dk-list-value {
    font-size: 14px;
    color: #666;
}

.dk-status-success {
    color: #4CAF50;
}

.dk-status-pending {
    color: #FF9800;
}

.dk-status-rejected {
    color: #F44336;
}

.dk-status-approved {
    color: #4CAF50;
}

/* ===== 首页网格 ===== */
.dk-home-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.dk-home-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 8px;
    background: #E3F2FD;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
}

.dk-home-grid-item:hover {
    background: #BBDEFB;
}

.dk-home-grid-icon {
    font-size: 28px;
    margin-bottom: 4px;
}

.dk-home-grid-label {
    font-size: 12px;
    color: #1E88E5;
    font-weight: 500;
}
