:root {
    --bg-color: #f1f5f9;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #475569;
    --border-color: #cbd5e1;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --danger: #dc2626;
}

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

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 14px;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    padding: 30px 15px;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    transition: max-width 0.3s ease;
}

/* Cards */
.header, .upload-section, .result-section {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    padding: 24px;
    margin-bottom: 20px;
}

/* Header */
.header {
    text-align: center;
    padding: 30px 24px;
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.header h1 span {
    color: var(--primary);
}

.header p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Dropzone */
.dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.dropzone:hover, .dropzone.dragover {
    background: #f0f9ff;
    border-color: #7dd3fc;
}

.drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    pointer-events: none;
}

.upload-icon {
    color: #94a3b8;
    width: 40px;
    height: 40px;
}

.dropzone:hover .upload-icon {
    color: var(--primary);
}

.drop-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: #334155;
}

.drop-content p {
    color: var(--text-muted);
    font-size: 13px;
}

/* File Info */
.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 20px;
}

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

#file-name {
    font-weight: 500;
    color: #334155;
}

.icon-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s;
}

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

/* Buttons */
.primary-btn {
    width: 100%;
    padding: 14px;
    margin-top: 20px;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

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

.primary-btn:disabled {
    background: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    border: 1px solid var(--border-color);
    color: #475569;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

.spinner.hidden {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Results Section */
.result-section.hidden {
    display: none;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.result-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
}

/* Table */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    max-height: 600px;
    overflow-y: auto;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
    min-width: 1000px;
}

.data-table th, .data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: #0f172a;
    color: #ffffff;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 1px 0 var(--border-color);
}

.data-table tbody tr {
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: #f1f5f9;
}

.data-table td {
    font-size: 13px;
    color: #334155;
    vertical-align: middle;
}

/* Table Money Columns */
.money {
    font-family: 'Roboto Mono', Consolas, monospace;
    font-weight: 500;
    color: #0f172a;
}

.td-error {
    color: var(--danger) !important;
    font-weight: 500;
}

/* Custom scrollbar for table */
.table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
