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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #F2F4F7;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: #1D72F3;
    color: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.controls-section, .results-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

.control-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
    background: white;
}

.form-file {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: white;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary {
    background: #1D72F3;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #1557b0;
}

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

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

.btn-secondary:hover {
    background: #545b62;
}

.status {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #666;
}

.metodo-nota {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #444;
    font-style: italic;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

.results-section h2 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.result-block {
    white-space: pre-wrap;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.85rem;
    background: #F9F9F9;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #eee;
}

.result-block h3 {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: #1D72F3;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
    margin-bottom: 15px;
}

.stats-grid div {
    padding: 4px 0;
}

.success-msg {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
    font-family: 'Segoe UI', sans-serif;
    margin-top: 10px;
}

.error-msg {
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
    font-family: 'Segoe UI', sans-serif;
    margin-top: 10px;
}

.warning-msg {
    color: #856404;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
    font-family: 'Segoe UI', sans-serif;
    margin-top: 10px;
}

.export-buttons {
    margin-top: 15px;
}

@media (max-width: 768px) {
    .container { padding: 10px; }
    .header { padding: 20px; }
    .header h1 { font-size: 1.3rem; }
    .stats-grid { grid-template-columns: 1fr; }
    .button-group { flex-direction: column; }
    .btn { width: 100%; }
}
