/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 30px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 15px 15px;
    margin-bottom: 30px;
}

.header h1 {
    text-align: center;
    font-size: 28px;
    font-weight: 600;
}

.nav {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    margin: 0 auto 30px;
    max-width: 1000px;
}

.nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s;
    padding: 10px 20px;
    border-radius: 8px;
    border: 2px solid transparent;
}

.nav a:hover {
    color: #4facfe;
    border-color: #4facfe;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 卡片样式 */
.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: fadeIn 1s ease-in-out;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: #4facfe;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.card-title {
    font-size: 24px;
    margin-bottom: 25px;
    color: #333;
    border-bottom: 3px solid #4facfe;
    padding-bottom: 15px;
    font-weight: 600;
}

/* 表单样式 */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #4a5568;
    font-size: 15px;
}

.form-group label .required {
    color: #ff6b6b;
    margin-left: 3px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* 按钮样式 */
.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-sm {
    padding: 10px 18px;
    font-size: 13px;
}

/* 上传区域样式 */
.upload-area {
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    padding: 50px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.upload-area:hover {
    border-color: #4facfe;
    background: #f0f7ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.1);
}

.upload-area.dragover {
    border-color: #4facfe;
    background: #e8f4ff;
}

.upload-icon {
    font-size: 56px;
    color: #4facfe;
    margin-bottom: 20px;
}

.upload-text {
    color: #333;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 500;
}

.upload-hint {
    color: #999;
    font-size: 13px;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.table th,
.table td {
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

/* 状态标签 */
.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.badge-warning {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    color: white;
}

.badge-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.badge-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
}

.badge-primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

/* 消息提示 */
.alert {
    padding: 18px 22px;
    border-radius: 12px;
    margin-bottom: 25px;
    animation: fadeIn 0.5s ease-in-out;
}

.alert-success {
    background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
    color: #22543d;
    border: 2px solid #68d391;
}

.alert-error {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    color: #742a2a;
    border: 2px solid #fc8181;
}

.alert-info {
    background: linear-gradient(135deg, #bee3f8 0%, #90cdf4 100%);
    color: #2a4365;
    border: 2px solid #63b3ed;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 35px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-in-out;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 18px;
    border-bottom: 3px solid #e0e0e0;
}

.modal-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    font-size: 32px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

/* PDF预览容器 */
.pdf-preview {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 25px;
    background: #f5f5f5;
}

.pdf-canvas {
    display: block;
    margin: 0 auto;
}

/* 印章选择器 */
.stamp-selector {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.stamp-item {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.stamp-item:hover {
    border-color: #4facfe;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stamp-item.selected {
    border-color: #4facfe;
    background: linear-gradient(135deg, #e8f4ff 0%, #d4ecff 100%);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.2);
}

.stamp-item img {
    max-width: 120px;
    max-height: 120px;
}

/* 查询结果 */
.query-result {
    background: white;
    border-radius: 15px;
    padding: 35px;
    margin-top: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: fadeIn 1s ease-in-out;
}

.result-item {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    width: 150px;
    font-weight: 600;
    color: #4a5568;
}

.result-value {
    flex: 1;
    color: #333;
}

/* 链接展示 */
.link-box {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px;
    margin-top: 18px;
    word-break: break-all;
}

.link-box code {
    color: #4facfe;
    font-size: 14px;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .card {
        padding: 25px;
        border-radius: 12px;
    }

    .nav ul {
        flex-direction: column;
        gap: 12px;
        padding: 10px;
    }

    .table {
        font-size: 13px;
    }

    .table th,
    .table td {
        padding: 12px 10px;
    }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 50px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4facfe;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    animation: spin 1s linear infinite;
    margin: 0 auto 18px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 密码输入框 */
.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.password-toggle:hover {
    color: #4facfe;
}

/* 管理员侧边栏 */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 25px 0;
    overflow-y: auto;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    border-right: 3px solid #4facfe;
}

.sidebar-header {
    padding: 0 25px 25px;
    border-bottom: 3px solid #e0e0e0;
    text-align: center;
    margin-bottom: 20px;
}

.sidebar-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
}

.sidebar-menu li {
    margin-bottom: 8px;
}

.sidebar-menu a {
    display: block;
    padding: 14px 25px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-weight: 500;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-left-color: #4facfe;
    color: #4facfe;
    transform: translateX(5px);
}

.main-content {
    margin-left: 260px;
    padding: 30px;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        z-index: 1001;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Logo动画 */
.logo-container {
    margin-bottom: 30px;
    animation: pulse 2s infinite;
}

.logo-container img {
    width: 180px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 系统卡片 */
.system-card {
    background: white;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.system-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #4facfe;
}

.system-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.system-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.system-status {
    font-size: 12px;
    color: #999;
}

/* 页脚 */
.footer {
    margin-top: 50px;
    padding: 25px;
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

/* 统计卡片 */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #4facfe;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    color: #4facfe;
}

.stat-label {
    font-size: 14px;
    color: #999;
    margin-top: 10px;
}
