/* 样式与Python版相同 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.header h1 {
    font-size: 1.8em;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-links {
    display: flex;
    gap: 10px;
}

.header-links .btn {
    text-decoration: none;
    display: inline-block;
}

/* 登录提示 */
.login-prompt {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.prompt-box {
    background: white;
    padding: 60px 80px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    text-align: center;
}

.prompt-box h2 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #333;
}

.prompt-box p {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

.prompt-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.prompt-buttons .btn {
    padding: 12px 40px;
    font-size: 16px;
    text-decoration: none;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-danger {
    background: #ff4757;
    color: white;
}

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

.stats-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 2.5em;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

.links-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.links-section h2 {
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.link-code {
    font-family: monospace;
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 13px;
}

.link-type.single { background: #e3f2fd; color: #1976d2; padding: 3px 8px; border-radius: 4px; font-size: 12px; }
.link-type.multiple { background: #fce4ec; color: #c2185b; padding: 3px 8px; border-radius: 4px; font-size: 12px; }

.status-badge.active { background: #e8f5e9; color: #2e7d32; padding: 3px 8px; border-radius: 4px; font-size: 12px; }
.status-badge.inactive { background: #ffebee; color: #c62828; padding: 3px 8px; border-radius: 4px; font-size: 12px; }

.actions { display: flex; gap: 5px; }
.actions button { padding: 5px 10px; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; }
.actions .view-btn { background: #e3f2fd; color: #1976d2; }
.actions .edit-btn { background: #fff3e0; color: #f57c00; }
.actions .delete-btn { background: #ffebee; color: #c62828; }

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; justify-content: center; align-items: center; }
.modal.active { display: flex; }
.modal-content { background: white; border-radius: 15px; width: 500px; max-height: 90vh; overflow-y: auto; }
.modal-lg { width: 700px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 25px; border-bottom: 1px solid #eee; }
.close { font-size: 28px; cursor: pointer; color: #999; }
.modal-body { padding: 25px; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; color: #555; }
.form-group input, .form-group select { width: 100%; padding: 12px 15px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: #667eea; }

.form-actions { display: flex; gap: 10px; margin-top: 25px; }
.form-actions .btn { flex: 1; padding: 12px; }

.province-list { margin-bottom: 15px; }
.province-item { display: flex; gap: 10px; margin-bottom: 10px; align-items: center; }
.province-item select, .province-item input { flex: 1; }

.detail-section { margin-bottom: 25px; }
.detail-section h4 { margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid #667eea; color: #333; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.detail-item { padding: 10px; background: #f8f9fa; border-radius: 8px; }
.detail-item label { display: block; color: #666; font-size: 12px; margin-bottom: 5px; }
.detail-item span { font-weight: 500; color: #333; }

.qr-display { text-align: center; padding: 20px; background: #f8f9fa; border-radius: 10px; }
.qr-display img { max-width: 200px; border-radius: 8px; }
.qr-url { margin-top: 10px; font-family: monospace; font-size: 12px; color: #666; word-break: break-all; }

@media (max-width: 768px) {
    .stats-cards { grid-template-columns: 1fr; }
    .header { flex-direction: column; gap: 15px; }
    .modal-content { width: 95%; margin: 10px; }
    table { font-size: 12px; }
    th, td { padding: 10px 5px; }
}
