/**
 * SZCCEC 公共样式（common.css）
 * ----------------------------------------------------------------
 * 
 * 引用方式（在页面 <head> 中）：
 *   <link rel="stylesheet" href="/assets/css/common.css">
 * 
 * 内容范围：
 *   - CSS reset / box-sizing
 *   - 全局字体（Microsoft YaHei）
 *   - 页面 body 渐变背景
 *   - 公共按钮（btn-primary, btn-secondary, btn-danger）
 *   - 公共表单元素（input, select, textarea）
 *   - 公共消息提示（success, error, warning, info）
 *   - 公共布局（page-wrapper, header, footer）
 * 
 * 不包含：
 *   - 端特定样式（在 supplier.css / purchaser.css / judge.css 中）
 *   - 页面特定样式（保留在原文件 <style> 块中）
 */

/* ============================================================
 * 1. CSS Reset 与基础排版
 * ============================================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

html, body {
    height: 100%;
    font-size: 14px;
    line-height: 1.5;
    color: #2c3e50;
}

/* ============================================================
 * 2. 页面 body 渐变背景（supplier / judge 共用）
 *    purchaser 用 config/pu-style.css 中的不同背景
 * ============================================================ */

body.sz-body-gradient {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================================
 * 3. 公共布局
 * ============================================================ */

.sz-page-wrapper {
    max-width: 1480px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sz-page-wrapper-wide {
    /* 评委开标大厅等大屏页面 */
    max-width: 1680px;
}

.sz-header {
    background: linear-gradient(to right, #2c3e50, #3498db);
    color: white;
    padding: 15px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sz-header-left {
    padding-left: 20px;
}

.sz-header-left h1 {
    font-size: 20px;
    font-weight: 600;
}

.sz-header-right {
    padding-right: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.sz-logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.sz-logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================================
 * 4. 公共按钮
 * ============================================================ */

.sz-btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1.4;
    vertical-align: middle;
}

.sz-btn:disabled,
.sz-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.sz-btn-primary {
    background: linear-gradient(to right, #3498db, #2ecc71);
    color: white;
}

.sz-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.sz-btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
    border: 1px solid #bdc3c7;
}

.sz-btn-secondary:hover:not(:disabled) {
    background: #d5dbdb;
}

.sz-btn-danger {
    background: linear-gradient(to right, #e74c3c, #c0392b);
    color: white;
}

.sz-btn-danger:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.sz-btn-warning {
    background: linear-gradient(to right, #f39c12, #e67e22);
    color: white;
}

.sz-btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.sz-btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

.sz-btn-block {
    display: block;
    width: 100%;
}

/* ============================================================
 * 5. 公共表单元素
 * ============================================================ */

.sz-input,
.sz-select,
.sz-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    color: #2c3e50;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.sz-input:focus,
.sz-select:focus,
.sz-textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.sz-input.error,
.sz-select.error,
.sz-textarea.error {
    border-color: #e74c3c;
}

.sz-input.success,
.sz-select.success,
.sz-textarea.success {
    border-color: #2ecc71;
}

.sz-textarea {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

.sz-form-row {
    margin-bottom: 14px;
}

.sz-form-label {
    display: block;
    margin-bottom: 6px;
    color: #34495e;
    font-size: 13px;
    font-weight: 500;
}

.sz-form-label.required::before {
    content: '* ';
    color: #e74c3c;
}

/* ============================================================
 * 6. 公共消息提示
 * ============================================================ */

.sz-alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    border-left: 4px solid;
    font-size: 13px;
    line-height: 1.5;
}

.sz-alert-success {
    background: #e8f5e9;
    color: #1b5e20;
    border-color: #2ecc71;
}

.sz-alert-error {
    background: #ffebee;
    color: #c62828;
    border-color: #e74c3c;
}

.sz-alert-warning {
    background: #fff3e0;
    color: #e65100;
    border-color: #f39c12;
}

.sz-alert-info {
    background: #e3f2fd;
    color: #0d47a1;
    border-color: #3498db;
}

/* ============================================================
 * 7. 公共表格
 * ============================================================ */

.sz-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sz-table th,
.sz-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #ecf0f1;
    text-align: left;
    font-size: 13px;
}

.sz-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #34495e;
}

.sz-table tbody tr:hover {
    background: #f8f9fa;
}

/* ============================================================
 * 8. 公共工具类
 * ============================================================ */

.sz-text-center { text-align: center; }
.sz-text-right { text-align: right; }
.sz-text-muted { color: #7f8c8d; }
.sz-text-danger { color: #e74c3c; }
.sz-text-success { color: #2ecc71; }
.sz-text-primary { color: #3498db; }

.sz-mt-1 { margin-top: 8px; }
.sz-mt-2 { margin-top: 16px; }
.sz-mt-3 { margin-top: 24px; }
.sz-mb-1 { margin-bottom: 8px; }
.sz-mb-2 { margin-bottom: 16px; }
.sz-mb-3 { margin-bottom: 24px; }
.sz-ml-1 { margin-left: 8px; }
.sz-mr-1 { margin-right: 8px; }

.sz-hidden { display: none !important; }
.sz-flex { display: flex; }
.sz-flex-1 { flex: 1; }
.sz-flex-center { display: flex; justify-content: center; align-items: center; }
