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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    background: #f5f7fa;
    color: #1a1a2e;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 1.8rem;
    color: #1a365d;
    margin-bottom: 0.25rem;
}

.subtitle {
    color: #4a5568;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #e6fffa;
    color: #234e52;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    border: 1px solid #b2f5ea;
}

.step {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.step h2 {
    font-size: 1.15rem;
    color: #2d3748;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.85rem;
    color: #4a5568;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.form-group input,
.form-group select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}

.btn {
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-primary {
    background: #2b6cb0;
    color: #fff;
}

.btn-primary:hover {
    background: #2c5282;
}

.btn-secondary {
    background: #edf2f7;
    color: #2d3748;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-small {
    padding: 0.3rem 0.75rem;
    font-size: 0.85rem;
    background: #fed7d7;
    color: #c53030;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-small:hover {
    background: #feb2b2;
}

/* Dropzone */
.dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    background: #f7fafc;
    cursor: pointer;
    transition: all 0.2s;
    color: #718096;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: #4299e1;
    background: #ebf8ff;
}

.dropzone svg {
    margin-bottom: 0.75rem;
    color: #a0aec0;
}

.dropzone p {
    font-size: 0.95rem;
}

.file-link {
    color: #2b6cb0;
    text-decoration: underline;
    cursor: pointer;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: #ebf8ff;
    border-radius: 8px;
    border: 1px solid #bee3f8;
}

.file-info #fileName {
    font-weight: 600;
    color: #2b6cb0;
}

.file-info #fileRows {
    color: #4a5568;
    font-size: 0.9rem;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #718096;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a365d;
}

.format-badge {
    background: #ebf4ff;
    color: #2b6cb0;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid #bee3f8;
    text-align: center;
}

.actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* XML Preview */
.xml-preview {
    background: #1a202c;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    max-height: 400px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Error / Success */
.error-box {
    background: #fed7d7;
    color: #c53030;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    border: 1px solid #feb2b2;
}

.success-box {
    background: #c6f6d5;
    color: #22543d;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    border: 1px solid #9ae6b4;
}

footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    color: #a0aec0;
    font-size: 0.85rem;
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .actions {
        flex-direction: column;
    }
}
