/* 公共CSS样式 - 提取自所有HTML页面 */

/* CSS变量定义 */
:root {
    --primary-color: #0b5028;
    --primary-light: #0d6b36;
    --primary-dark: #08371d;
}

/* 基础样式 */
body {
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

/* 页头样式 */
.header-section {
    background: url(./images/top.jpg) top center no-repeat;
    background-color: #0b5028;
    border-bottom: 3px #0b5028 solid;
    color: white;
    padding: 15px 0;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-section h1 {
    font-size: 28px;
    font-weight: 600;
    margin: 5px 0;
}

.header-section .subtitle {
    font-size: 16px;
    opacity: 0.9;
}

/* 页脚样式 */
.footer-section {
    background-color: var(--primary-dark);
    color: white;
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
}

.footer-section a {
    color: #a3d9b1;
}

.footer-section a:hover {
    color: white;
    text-decoration: none;
}

/* 容器样式 */
.registration-container,
.login-container {
    max-width: 900px;
    margin: 0 auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.registration-header,
.login-header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
    text-align: center;
}

.registration-header h2,
.login-header h2 {
    margin: 0;
    font-weight: 600;
}

.registration-body,
.login-body {
    padding: 30px;
}

/* 表单样式 */
.form-group label {
    font-weight: 600;
    color: #444;
}

.required-field::after {
    content: " *";
    color: #e74c3c;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(11, 80, 40, 0.2);
}

.has-error .form-control:focus {
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

.validation-error {
    color: #e74c3c;
    font-size: 13px;
    display: none;
    margin-top: 5px;
}

.position-relative {
    position: relative;
}

/* 按钮样式 */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 10px 25px;
    font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
}

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    padding: 10px 25px;
    font-weight: 600;
    color: #212529;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    padding: 10px 25px;
    font-weight: 600;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    padding: 10px 25px;
    font-weight: 600;
}

/* 文件上传样式 */
.file-upload-container {
    border: 2px dashed #ddd;
    border-radius: 5px;
    padding: 20px;
    text-align: center;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.file-upload-container:hover {
    border-color: var(--primary-color);
    background-color: #f9f9f9;
}

.file-upload-label {
    display: block;
    cursor: pointer;
    color: #666;
}

.file-upload-label i {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.file-info {
    font-size: 12px;
    color: red;
    margin-top: 5px;
}

.file-preview {
    margin-top: 10px;
    display: none;
    text-align: center;
    border: 2px dashed #ddd;
    border-radius: 5px;
    position: relative;
}

.file-preview img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* 验证码样式 */
.captcha-container {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.captcha-container .form-group {
    flex: 1;
}

.captcha-image {
    height: 34px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--primary-color);
    letter-spacing: 3px;
    user-select: none;
    cursor: pointer;
    padding: 0 5px;
}

#captchaImage {
    height: 30px;
}

.captcha-refresh {
    margin-top: 5px;
    color: var(--primary-color);
    font-size: 18px;
    cursor: pointer;
}

.captcha-refresh:hover {
    color: var(--primary-light);
}

/* 密码切换图标 */
.password-toggle {
    position: absolute;
    right: 15px;
    top: 0px;
    font-size: 24px;
    cursor: pointer;
    color: #777;
}

.password-toggle:hover {
    color: var(--primary-color);
}

/* 成功消息样式 */
.success-message {
    display: none;
    padding: 30px;
    text-align: center;
    background-color: #f0f9f4;
    border-radius: 8px;
    border-left: 5px solid var(--primary-color);
    margin-top: 20px;
}

.success-icon {
    color: var(--primary-color);
    font-size: 60px;
    margin-bottom: 20px;
}

.success-message h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* 链接样式 */
.login-link,
.return-link {
    color: var(--primary-color);
    font-weight: 600;
}

.login-link:hover,
.return-link:hover {
    text-decoration: underline;
}

/* 确认弹窗表格样式 */
.box-lable {
    font-weight: 700;
    padding: 6px;
    border-bottom: 1px solid #ddd;
}

.box-content {
    padding: 6px;
    border-bottom: 1px solid #ddd;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .logo {
        width: 100%;
    }

    .registration-body,
    .login-body {
        padding: 20px;
    }

    .header-section h1 {
        font-size: 24px;
    }

    .captcha-image,
    .captcha-refresh {
        margin-top: 0;
        align-self: center;
    }

    .info-row {
        flex-direction: column;
    }

    .info-label {
        flex: none;
        margin-bottom: 5px;
    }

    .status-switcher .btn {
        font-size: 12px;
        padding: 8px 5px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
    }
}

/* info.html 专用样式 */
.user-info-section {
    background-color: white;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin-right: 15px;
}

.dashboard-container {
    max-width: 1200px;
    margin: 30px auto;
}

.status-card {
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.status-pending {
    border-left: 5px solid #ffc107;
    background-color: #fffcf2;
}

.status-approved {
    border-left: 5px solid #28a745;
    background-color: #f2f9f5;
}

.status-rejected {
    border-left: 5px solid #dc3545;
    background-color: #fdf4f5;
}

.status-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.status-pending .status-icon {
    color: #ffc107;
}

.status-approved .status-icon {
    color: #28a745;
}

.status-rejected .status-icon {
    color: #dc3545;
}

.status-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
}

.status-desc {
    color: #666;
    margin-bottom: 20px;
}

.info-card {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.info-card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.info-row {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    flex: 0 0 150px;
    font-weight: 600;
    color: #555;
}

.info-value {
    flex: 1;
    color: #333;
}

.action-buttons {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.photo-preview {
    width: 120px;
    height: 160px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logout-btn {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-left: 15px;
}

.logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.nav-tabs > li > a {
    color: #555;
    font-weight: 600;
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.tab-content {
    padding: 20px 0;
}

.timeline-item {
    position: relative;
    padding-left: 30px;
    margin-bottom: 25px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

.timeline-item.completed::before {
    background-color: #28a745;
}

.timeline-item.pending::before {
    background-color: #ffc107;
}

.timeline-item.rejected::before {
    background-color: #dc3545;
}

.timeline-date {
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}

.timeline-content {
    color: #666;
}

.uploaded-file {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 10px;
}

.uploaded-file i {
    font-size: 24px;
    color: var(--primary-color);
    margin-right: 10px;
}

/* index.html 登录页面专用样式 */
.login-container {
    max-width: 1100px;
}

.login-message {
    margin-bottom: 20px;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    margin-bottom: 25px;
}

.login-options a {
    color: var(--primary-color);
    font-weight: 500;
}

.login-options a:hover {
    text-decoration: underline;
}

.register-link {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.register-link a {
    color: var(--primary-color);
    font-weight: 600;
}

.register-link a:hover {
    text-decoration: underline;
}

.login-icon {
    color: var(--primary-color);
    font-size: 60px;
    margin-bottom: 20px;
}

.login-method-tabs {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.login-method-tabs .nav-tabs {
    border-bottom: none;
}

.login-method-tabs .nav-tabs > li > a {
    border: none;
    color: #666;
    padding: 10px 15px;
    font-weight: 500;
}

.login-method-tabs .nav-tabs > li.active > a,
.login-method-tabs .nav-tabs > li.active > a:hover,
.login-method-tabs .nav-tabs > li.active > a:focus {
    background-color: transparent;
    border: none;
    border-bottom: 3px solid var(--primary-color);
    color: var(--primary-color);
}

.login-method-tabs .nav-tabs > li > a:hover {
    background-color: #f9f9f9;
    border-bottom: 3px solid #ddd;
}

/* 流程时间轴样式 */
.process-section {
    flex: 1;
    background-color: #f9f9f9;
    padding: 30px;
    border-right: 1px solid #eee;
}

.login-section {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.process-timeline {
    position: relative;
    padding-left: 30px;
}

.process-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.process-step {
    position: relative;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #ddd;
}

.process-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.process-step::before {
    content: '';
    position: absolute;
    left: -36px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 4px solid white;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.process-step.completed::before {
    background-color: white;
}

.process-step.current::before {
    background-color: #ffc107;
    border-color: #ffc107;
    box-shadow: 0 0 0 2px #ffc107;
}

.process-step.completed .step-title {
    color: var(--primary-color);
}

.process-step.current .step-title {
    color: #ff9800;
}

.step-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

.step-time {
    font-size: 14px;
    color: #888;
    margin-bottom: 10px;
}

.step-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.step-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.status-current {
    background-color: #fff3cd;
    color: #856404;
}

.status-completed {
    background-color: #d4edda;
    color: #155724;
}

.status-upcoming {
    background-color: #e2e3e5;
    color: #383d41;
}

.process-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.process-title i {
    margin-right: 10px;
}

@media screen and (max-width: 768px) {
    .process-section {
        display: none;
    }
}
