:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 8px;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    padding: 2rem 1rem;
}

.app-container {
    max-width: 900px;
    margin: 0 auto;
}

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

.github-link {
    display: inline-block;
    font-size: 0.825rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: white;
    transition: all 0.2s;
    margin-top: 1rem;
}

@media (min-width: 900px) {
    .github-link {
        position: absolute;
        top: 0;
        right: 0;
        margin-top: 0;
    }
}

.github-link:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: #f0f7ff;
}

.trust-banner {
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #1e40af;
}

.trust-sub {
    font-size: 0.875rem;
    color: #60a5fa;
    margin-top: 0.25rem;
}

.how-it-works {
    margin-bottom: 2.5rem;
    padding: 0 1rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}

.step-num {
    background: #1e293b;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
}

.step-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

/* Upload Section */
.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 3rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafafa;
}

.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--primary);
    background: #f0f7ff;
}

.drop-title {
    font-weight: 600;
    color: var(--text);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.drop-sub {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.browse-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
}

.file-summary {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hidden {
    display: none !important;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.full-width {
    grid-column: span 2;
}

label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.required {
    color: var(--danger);
}

input[type="text"],
select,
textarea {
    padding: 0.625rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    width: 100%;
    transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    ring: 2px solid var(--primary);
}

.radio-group {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.25rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 400;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    max-height: 400px;
    border: 1px solid var(--border);
    border-radius: 6px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

tr:last-child td {
    border-bottom: none;
}

.arrow-col {
    text-align: center;
    color: var(--text-muted);
    width: 40px;
}

.action-col {
    width: 40px;
    text-align: right;
}

.btn-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.btn-remove:hover {
    color: var(--danger);
    background: #fee2e2;
}

.empty-state {
    padding: 3rem;
    text-align: center;
    color: var(--text-muted);
    background: #fff;
}

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
}

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

.btn-large {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

.btn-text {
    background: none;
    padding: 4px 8px;
}

.btn-danger {
    color: var(--danger);
}

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

footer {
    margin-top: 4rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .full-width {
        grid-column: span 1;
    }
    .radio-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .step {
        flex-direction: row;
        text-align: left;
    }
}
