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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.header {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 20px 30px;
    text-align: center;
}

.header h1 {
    font-size: 24px;
    font-weight: bold;
}

.back-home {
    color: white;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.2);
    border-radius: 6px;
    transition: background 0.3s;
    white-space: nowrap;
}

.back-home:hover {
    background: rgba(255,255,255,0.35);
}

.watermark {
    background: #fff3cd;
    color: #856404;
    padding: 10px;
    text-align: center;
    font-size: 13px;
    border-bottom: 1px solid #ffeaa7;
}

.nav {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    flex-wrap: wrap;
}

.nav-item {
    flex: 1;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    font-weight: 500;
    min-width: 120px;
}

.nav-item:hover {
    background: #e9ecef;
}

.nav-item.active {
    border-bottom-color: #28a745;
    color: #28a745;
    background: white;
}

.nav-item.completed {
    background: #d4edda;
    color: #155724;
}

.content {
    padding: 30px;
    min-height: 500px;
}

.step {
    display: none;
}

.step.active {
    display: block;
}

h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
    border-left: 4px solid #28a745;
    padding-left: 12px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

input[type="text"], input[type="number"], input[type="password"], select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

input[type="text"]:focus, input[type="number"]:focus, input[type="password"]:focus, select:focus {
    outline: none;
    border-color: #28a745;
}

.date-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
}

.date-inputs input {
    width: 100px;
    text-align: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #28a745;
    color: white;
}

.btn-primary:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

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

.btn-danger:hover {
    background: #c82333;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.upload-area {
    border: 3px dashed #dee2e6;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s;
    cursor: pointer;
}

.upload-area:hover, .upload-area.dragover {
    border-color: #28a745;
    background: #e8f5e9;
}

.upload-area p {
    color: #6c757d;
    font-size: 16px;
}

.file-list {
    margin-top: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #28a745;
    flex-wrap: wrap;
    gap: 8px;
}

.file-item.locked {
    border-left-color: #28a745;
    background: #d4edda;
}

.file-name {
    flex: 1;
    font-weight: 500;
    min-width: 200px;
}

.file-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.experts-list {
    background: #e8f5e9;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.experts-list h4 {
    color: #155724;
    margin-bottom: 10px;
}

.expert-tag {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    margin: 3px;
    font-size: 14px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.checkbox-item:hover {
    background: #e9ecef;
}

.checkbox-item input {
    margin-top: 3px;
    width: auto;
}

.section-title {
    background: #007bff;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    margin: 20px 0 15px;
    font-weight: bold;
}

.preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.preview-modal.active {
    display: flex;
}

.preview-content {
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.preview-content img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
}

.preview-header {
    padding: 15px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
    flex-wrap: wrap;
    gap: 10px;
}

.export-result {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.export-result h3 {
    margin-bottom: 10px;
}

.hidden-file-input {
    display: none;
}

.image-editor {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}

.invoice-item {
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.settings-message.success {
    background: #d4edda;
    color: #155724;
    display: block;
}

.settings-message.error {
    background: #f8d7da;
    color: #721c24;
    display: block;
}

.settings-message.info {
    background: #e7f3ff;
    color: #004085;
    display: block;
}

@media (max-width: 768px) {
    .image-editor {
        grid-template-columns: 1fr;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .nav-item {
        flex: 1 1 33%;
        font-size: 13px;
        padding: 10px 5px;
        min-width: 100px;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .file-actions {
        width: 100%;
    }
}
