/* css/gongzheng.css - 公证业务系统样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9f0f5 100%);
    min-height: 100vh;
    color: #2c3e50;
}

/* 表单容器 */
.form-container {
    max-width: 800px;
    margin: 30px auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.2em;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.content {
    padding: 40px;
}

.error-message {
    background: #ffebee;
    border-left: 4px solid #e74c3c;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 5px;
    color: #c0392b;
}

/* 表单分区 */
.form-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid #e0e7ed;
}

.form-section h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #2c3e50;
    padding-bottom: 10px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1 1 calc(50% - 10px);
    min-width: 250px;
}

.form-group.full-width {
    flex: 1 1 100%;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95em;
}

.required-field {
    color: #e74c3c;
    margin-left: 3px;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #dde4e9;
    border-radius: 8px;
    font-size: 1em;
    transition: border 0.3s;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2c3e50;
    outline: none;
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* 提交按钮 */
.submit-btn {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border: none;
    padding: 18px 30px;
    font-size: 1.2em;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.4);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 页脚链接 */
.footer-links {
    margin-top: 30px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e0e7ed;
}

.footer-links a {
    color: #2c3e50;
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* 成功页面 */
.success-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9f0f5 100%);
}

.success-box {
    background: white;
    border-radius: 20px;
    padding: 50px;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.success-icon {
    font-size: 5em;
    margin-bottom: 20px;
}

.success-box h1 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.info-box {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    text-align: left;
}

.info-item {
    padding: 8px 0;
    border-bottom: 1px dashed #dde4e9;
}

.info-item:last-child {
    border-bottom: none;
}

.buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    background: #ecf0f1;
    color: #2c3e50;
    border: 1px solid #bdc3c7;
}

.btn-success {
    background: #2c3e50;
    color: white;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* 登录页面 */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    border-radius: 10px;
    padding: 40px;
    width: 350px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.login-box h1 {
    margin-bottom: 30px;
    color: #333;
}

.login-box input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}

.login-box button:hover {
    background: #34495e;
}

.error {
    background: #ffebee;
    color: #e74c3c;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.back-link {
    margin-top: 20px;
}

.back-link a {
    color: #666;
    text-decoration: none;
}

/* 管理后台 */
.admin-header {
    background: #2c3e50;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.data-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.data-section h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #dee2e6;
}

td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

tr:hover {
    background: #f8f9fa;
}

.action-btn {
    display: inline-block;
    padding: 5px 10px;
    margin: 2px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9em;
    color: white;
    border: none;
    cursor: pointer;
}

.view-btn { background: #3498db; }
.edit-btn { background: #f39c12; }
.delete-btn { background: #e74c3c; }

.message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}
.message.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.message.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

.empty-state {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    margin: auto;
    padding: 0;
    border-radius: 16px;
    width: 80%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.modal-header {
    padding: 15px 20px;
    background: #2c3e50;
    color: white;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
}

.modal-body {
    padding: 24px;
    background: #f0f4f8;
}

.detail-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-left: 4px solid #2c3e50;
}

.detail-card-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ecf0f1;
}

.detail-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 12px;
    align-items: baseline;
}

.detail-row.full {
    display: block;
}

.detail-label {
    font-weight: 600;
    color: #34495e;
    min-width: 100px;
    margin-right: 8px;
    font-size: 0.95em;
}

.detail-value {
    color: #2c3e50;
    flex: 1;
    min-width: 200px;
    word-break: break-word;
}

/* 编辑页面按钮 */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}

.btn-primary {
    background: #2c3e50;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1.1em;
    cursor: pointer;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.1em;
}

/* 响应式 */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    .form-group {
        flex: 1 1 100%;
    }
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .admin-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

.custom-file-upload {
    margin-bottom: 15px;
}
.file-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
    border: none;
}
.file-btn:hover {
    background-color: #2980b9;
}
.file-list {
    margin-top: 8px;
    font-size: 13px;
    color: #333;
}
.file-list span {
    display: inline-block;
    background: #ecf0f1;
    padding: 2px 8px;
    border-radius: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
}
.photo-hint {
    font-size: 0.85em;
    color: #666;
    margin-top: 4px;
}