/* Bill Parser MVP - Styles */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    text-align: center;
    padding: 30px 0;
}

header h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

header .subtitle {
    color: #7f8c8d;
    font-size: 1rem;
}

/* Main content */
main {
    flex: 1;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.card h2 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.info {
    color: #7f8c8d;
    margin-bottom: 25px;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.alert-warning {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

/* Form */
.upload-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.file-label:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.file-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.file-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #374151;
}

.file-hint {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-top: 5px;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-selected {
    display: none;
    padding: 10px;
    background: #e0f2fe;
    border-radius: 8px;
    color: #0369a1;
    font-size: 0.9rem;
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.btn-secondary:hover {
    background: #d1d5db;
}

/* Result page */
.result-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.result-header.success .result-icon {
    color: #16a34a;
}

.result-header.error .result-icon {
    color: #dc2626;
}

.result-icon {
    font-size: 2.5rem;
}

.result-header h2 {
    margin: 0;
}

/* Data table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

.data-table th {
    width: 40%;
    color: #6b7280;
    font-weight: 500;
}

.data-table td {
    color: #111827;
}

/* Confidence indicator */
.confidence {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.9rem;
}

.confidence.high {
    background: #dcfce7;
    color: #16a34a;
}

.confidence.medium {
    background: #fef3c7;
    color: #d97706;
}

.confidence.low {
    background: #fee2e2;
    color: #dc2626;
}

/* File info */
.file-info {
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.file-info h3 {
    margin-bottom: 10px;
    color: #374151;
}

.file-info p {
    margin-bottom: 8px;
}

.hint {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-left: 10px;
}

/* Telegram status */
.telegram-status {
    margin: 20px 0;
}

/* Actions */
.actions {
    margin-top: 25px;
    text-align: center;
}

/* Error card */
.error-card .error-info {
    text-align: center;
    padding: 20px;
    font-size: 1.1rem;
    color: #4b5563;
}

.error-details {
    background: #f8fafc;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.error-details h4 {
    margin-bottom: 10px;
    color: #6b7280;
}

.error-details ul {
    margin-left: 20px;
    color: #9ca3af;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 0;
    color: #9ca3af;
    font-size: 0.85rem;
}

.env-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
}

.env-dev {
    background: #fef3c7;
    color: #d97706;
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .card {
        padding: 20px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .file-label {
        padding: 30px 15px;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
        font-size: 0.9rem;
    }

    .data-table th {
        width: 35%;
    }
}
