* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.5;
}

.container {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px 20px;
}

.header {
    text-align: center;
    margin-bottom: 32px;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 15px;
    color: #666;
}

.main {
    flex: 1;
    width: 100%;
    max-width: 960px;
}

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 32px;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.page-card {
    max-width: none;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #555;
    margin-bottom: 6px;
    white-space: nowrap;
}

.form-group input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.15);
}

.readonly-text {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    line-height: 42px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    background: #f5f5f5;
    color: #555;
    font-size: 15px;
    box-sizing: border-box;
}

.readonly-text.empty {
    color: #999;
}

.captcha-row,
.sms-row {
    display: flex;
    gap: 10px;
}

.captcha-row input,
.sms-row input {
    flex: 1;
}

.captcha-box {
    width: 110px;
    height: 42px;
    border-radius: 6px;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 4px;
    color: #2c3e50;
    border: 1px solid #d9d9d9;
    transition: opacity 0.2s;
}

.captcha-box:hover {
    opacity: 0.85;
}

.btn {
    height: 42px;
    padding: 0 20px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: #1890ff;
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: #40a9ff;
}

.btn-secondary {
    background: #f0f2f5;
    color: #555;
}

.btn-secondary:hover:not(:disabled) {
    background: #e4e6e9;
}

.btn-sms {
    width: 110px;
    padding: 0 10px;
    background: #52c41a;
    color: #fff;
    font-size: 13px;
    white-space: nowrap;
}

.btn-sms:hover:not(:disabled) {
    background: #73d13d;
}

.btn-sms.counting {
    background: #bfbfbf;
}

.btn-default {
    background: #f5f5f5;
    color: #555;
    border: 1px solid #d9d9d9;
}

.btn-default:hover:not(:disabled) {
    background: #e8e8e8;
}

.btn-row {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-row .btn {
    flex: 1;
}

.extra-links {
    margin-top: 20px;
    text-align: center;
}

.link {
    font-size: 14px;
    color: #1890ff;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

.user-card {
    text-align: center;
}

.welcome-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 12px;
}

.hint-text {
    font-size: 14px;
    color: #888;
    margin-bottom: 24px;
}

.footer {
    margin-top: 32px;
    text-align: center;
    font-size: 13px;
    color: #888;
}

.footer a {
    color: #888;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 9999;
}

.toast.show {
    opacity: 1;
}

.qualification-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 0 auto 8px;
    max-width: 480px;
}

.qualification-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qualification-label {
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
    text-align: center;
}

.qualification-upload {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 2px dashed #d9d9d9;
    border-radius: 8px;
    background: #fafafa;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.qualification-upload:hover {
    border-color: #1890ff;
    background: #f0f9ff;
}

.qualification-upload.has-image {
    border-style: solid;
    border-color: #1890ff;
}

.qualification-upload input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.upload-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 13px;
    pointer-events: none;
}

.upload-icon {
    font-size: 32px;
    line-height: 1;
    margin-bottom: 6px;
    color: #bfbfbf;
}

.upload-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.upload-preview.hidden,
.delete-img.hidden {
    display: none;
}

.image-link {
    margin-top: 6px;
    font-size: 13px;
    color: #1890ff;
    text-decoration: none;
    text-align: center;
}

.image-link:hover {
    text-decoration: underline;
}

.image-link.hidden {
    display: none;
}

.delete-img {
    margin-top: 2px;
    padding: 4px 10px;
    font-size: 13px;
    color: #ff4d4f;
    background: transparent;
    border: none;
    cursor: pointer;
}

.delete-img:hover {
    background: #fff1f0;
    border-radius: 4px;
}

.upload-hint {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

@media (max-width: 768px) {
    .qualification-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .qualification-grid {
        grid-template-columns: 1fr;
    }
}

.user-body {
    background: #f7f8fa;
}

.top-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 64px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.top-header h1 {
    margin: 0;
    font-size: 20px;
    color: #2c3e50;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: #666;
}

.layout {
    display: flex;
    min-height: calc(100vh - 64px - 60px);
}

.sidebar {
    width: 200px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #e8e8e8;
    padding: 16px 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    margin: 0 12px;
    border-radius: 8px;
    font-size: 15px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-item:hover {
    background: #f5f5f5;
    color: #333;
}

.nav-item.active {
    background: #1890ff;
    color: #fff;
}

.nav-icon {
    font-size: 18px;
}

.main-content {
    flex: 1;
    padding: 24px 32px;
    min-width: 0;
}

.page-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 24px 32px;
}

.page-section.hidden {
    display: none;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 16px;
}

.welcome-card {
    padding: 24px;
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    border-radius: 8px;
}

.welcome-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
}

.user-body .hint-text {
    font-size: 14px;
    color: #888;
}

.form-hint {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
}

.form-section {
    margin-bottom: 24px;
}

.form-section h3 {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.settlement-form .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.settlement-form .form-row .form-group {
    flex: 1 1 280px;
    min-width: 0;
    margin-bottom: 0;
}

.settlement-form .form-row .form-group.full {
    flex: 1 1 100%;
}

.settlement-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    font-size: 15px;
    resize: vertical;
    box-sizing: border-box;
}

.settlement-form select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    box-sizing: border-box;
}

.input-with-btn {
    display: flex;
    gap: 8px;
}

.input-with-btn input {
    flex: 1 1 0;
    min-width: 0;
}

.input-with-btn .btn-sms {
    white-space: nowrap;
    padding: 0 12px;
    height: 42px;
    min-width: 100px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.user-footer {
    text-align: center;
    padding: 16px;
    font-size: 13px;
    color: #888;
    background: #f7f8fa;
}

.user-footer a {
    color: #888;
    text-decoration: none;
}

.user-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .container {
        padding: 24px 16px 16px;
    }

    .header h1 {
        font-size: 22px;
    }

    .card {
        padding: 24px;
    }

    .btn-sms {
        width: 100px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .top-header {
        padding: 0 16px;
    }

    .top-header h1 {
        font-size: 16px;
    }

    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e8e8e8;
        padding: 8px 0;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0 12px;
    }

    .nav-item {
        flex: 1;
        min-width: 120px;
        margin: 0;
        justify-content: center;
    }

    .main-content {
        padding: 16px;
    }

    .page-section {
        padding: 20px;
    }

    .settlement-form .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-actions {
        flex-direction: column;
    }
}
