/* 校园反馈系统 - 简洁朴素样式（适合老师使用） */

/* 基础变量 - 朴素配色 */
:root {
    --primary: #2c5aa0;
    --primary-dark: #1e3d6f;
    --secondary: #5a5a5a;
    
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    
    --bg-body: #f0f2f5;
    --bg-card: #ffffff;
    --bg-header: #2c5aa0;
    
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-light: #ffffff;
    
    --border: #dddddd;
    --border-light: #eeeeee;
    
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    
    --radius: 4px;
    --radius-lg: 8px;
}

/* 重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

/* 头部 - 简洁蓝色 */
.header {
    background: var(--bg-header);
    color: var(--text-light);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 18px;
    font-weight: 600;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.logout-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px;
}

/* 卡片 */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

/* 表单 */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px; /* 防止iOS缩放 */
    transition: border-color 0.2s;
    -webkit-appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* 表格 - 简洁样式 */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th,
.table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.table tr:hover {
    background: #f8f9fa;
}

/* 列表 */
.list-group {
    list-style: none;
}

.list-item {
    padding: 12px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-item:last-child {
    border-bottom: none;
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 500;
}

.badge-primary {
    background: #e3f2fd;
    color: var(--primary);
}

.badge-success {
    background: #e8f5e9;
    color: var(--success);
}

.badge-warning {
    background: #fff3e0;
    color: #f57c00;
}

.badge-danger {
    background: #ffebee;
    color: var(--danger);
}

/* 状态标签 */
.status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius);
    font-size: 12px;
}

.status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-pending {
    background: #fff3e0;
    color: #e65100;
}

.status-pending::before {
    background: #ff9800;
}

.status-processing {
    background: #e3f2fd;
    color: #1565c0;
}

.status-processing::before {
    background: #2196f3;
}

.status-resolved {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-resolved::before {
    background: #4caf50;
}

/* 导航 */
.nav-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary);
    font-size: 14px;
    margin-bottom: 12px;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--bg-card);
    padding: 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--border-light);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* 菜单网格 */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.menu-item {
    background: var(--bg-card);
    padding: 16px;
    border-radius: var(--radius-lg);
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    transition: all 0.2s;
}

.menu-item:hover {
    border-color: var(--primary);
    background: #f5f7fa;
}

.menu-item span {
    display: block;
    font-size: 14px;
    font-weight: 500;
}

/* 提示 */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.alert-warning {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffe0b2;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.alert-danger {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 14px;
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.pagination .current {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state p {
    font-size: 14px;
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: var(--radius-lg);
}

.filter-group {
    flex: 1;
    min-width: 140px;
}

.filter-group label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
}

/* 底部固定按钮 */
.fixed-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 12px 16px;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    z-index: 100;
}

/* 时间显示 */
.time-display {
    font-family: "Courier New", monospace;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ==================== 手机端极致适配 ==================== */

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .container {
        padding: 8px;
    }
    
    .header {
        padding: 10px 12px;
    }
    
    .header h1 {
        font-size: 16px;
    }
    
    .header-info {
        font-size: 12px;
        gap: 8px;
    }
    
    .card {
        padding: 12px;
        margin-bottom: 8px;
        border-radius: var(--radius);
    }
    
    .card-title {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    /* 表单元素放大，方便触摸 */
    .form-control {
        padding: 14px 12px;
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    .btn {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .btn-sm {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    /* 表格横向滚动 */
    .table {
        font-size: 13px;
    }
    
    .table th,
    .table td {
        padding: 10px 8px;
        white-space: nowrap;
    }
    
    /* 统计卡片 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    /* 菜单 */
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .menu-item {
        padding: 14px 10px;
    }
    
    .menu-item span {
        font-size: 13px;
    }
    
    /* 筛选 */
    .filter-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    /* 列表项 */
    .list-item {
        padding: 14px 10px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    /* 分页 */
    .pagination {
        gap: 4px;
    }
    
    .pagination a,
    .pagination span {
        padding: 10px 14px;
        font-size: 14px;
    }
}

/* 小屏幕手机 */
@media (max-width: 375px) {
    html {
        font-size: 14px;
    }
    
    .header h1 {
        font-size: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
    }
}

/* 暗黑模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-body: #1a1a1a;
        --bg-card: #2d2d2d;
        --text-primary: #e0e0e0;
        --text-secondary: #b0b0b0;
        --border: #404040;
        --border-light: #333333;
    }
    
    .table th {
        background: #333333;
    }
    
    .table tr:hover {
        background: #333333;
    }
}

/* 打印样式 */
@media print {
    .header,
    .btn,
    .pagination,
    .fixed-bottom {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
