/* ESG报告管理系统 - 样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    min-height: 100vh;
    color: #333;
}

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

/* ===== 前台搜索页 ===== */
.search-box {
    background: #fff;
    border-radius: 16px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
    max-width: 700px;
    margin: 80px auto 0;
}

.search-box h2 {
    font-size: 28px;
    color: #1a5276;
    margin-bottom: 8px;
}

.search-box .subtitle {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 30px;
}

.search-box .field {
    margin-bottom: 16px;
    text-align: left;
}

.search-box .field label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
    font-weight: 500;
}

.search-box .field input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.search-box .field input:focus {
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(41,128,185,0.15);
}

.search-box button[type="submit"] {
    margin-top: 10px;
    padding: 14px 48px;
    background: linear-gradient(135deg, #2980b9, #1a5276);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.search-box button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(41,128,185,0.4);
}

.search-box .admin-link {
    display: inline-block;
    margin-top: 24px;
    color: #999;
    font-size: 13px;
    text-decoration: none;
}

.search-box .admin-link:hover { color: #2980b9; }

/* ===== 搜索结果 ===== */
.results-box {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.results-box h2 {
    font-size: 22px;
    color: #1a5276;
    margin-bottom: 20px;
}

.results-box .back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #2980b9;
    text-decoration: none;
    font-size: 14px;
}

.results-box .back-link:hover { text-decoration: underline; }

.results-box .count {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table th {
    background: #1a5276;
    color: #fff;
    padding: 12px 14px;
    text-align: left;
    font-weight: 500;
    white-space: nowrap;
}

table th:first-child { border-radius: 8px 0 0 0; }
table th:last-child { border-radius: 0 8px 0 0; }

table td {
    padding: 12px 14px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
    word-break: break-all;
}

table tr:hover td { background: #f7fbff; }

table a {
    color: #2980b9;
    text-decoration: none;
}

table a:hover { text-decoration: underline; }

.no-result {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 15px;
}

/* ===== 后台页面 ===== */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-header h2 {
    font-size: 22px;
    color: #1a5276;
}

.admin-header .actions a {
    display: inline-block;
    padding: 8px 18px;
    background: #2980b9;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    margin-left: 8px;
    transition: background 0.2s;
}

.admin-header .actions a:hover { background: #1a5276; }
.admin-header .actions a.danger { background: #e74c3c; }
.admin-header .actions a.danger:hover { background: #c0392b; }
.admin-header .actions a.secondary { background: #7f8c8d; }
.admin-header .actions a.secondary:hover { background: #636e72; }

.admin-box {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    margin-bottom: 24px;
}

.admin-box h3 {
    font-size: 17px;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #ecf0f1;
}

/* 表单 */
.form-group {
    margin-bottom: 16px;
}

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

.form-group label .req {
    color: #e74c3c;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #2980b9;
}

.form-group .hint {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.form-actions button {
    padding: 10px 28px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.form-actions .btn-primary {
    background: #2980b9;
    color: #fff;
}

.form-actions .btn-primary:hover { background: #1a5276; }

.form-actions .btn-secondary {
    background: #ecf0f1;
    color: #555;
}

.form-actions .btn-secondary:hover { background: #dfe6e9; }

/* 消息提示 */
.msg {
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.msg.success { background: #d5f5e3; color: #1e8449; }
.msg.error { background: #fadbd8; color: #c0392b; }

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
    color: #555;
    background: #f0f0f0;
}

.pagination a:hover { background: #ddd; }
.pagination .current { background: #2980b9; color: #fff; }

/* 登录框 */
.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
    max-width: 380px;
    margin: 120px auto 0;
}

.login-box h2 { margin-bottom: 24px; color: #1a5276; }

.login-box input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 16px;
    outline: none;
}

.login-box input[type="password"]:focus {
    border-color: #2980b9;
}

.login-box button {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #2980b9, #1a5276);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

.login-box button:hover { opacity: 0.9; }

.login-box .error { color: #e74c3c; margin-bottom: 12px; font-size: 14px; }

.login-box .back { margin-top: 16px; }
.login-box .back a { color: #999; text-decoration: none; font-size: 13px; }
.login-box .back a:hover { color: #2980b9; }
