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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    color: #333;
    background: #f5f5f5;
}

.app-container {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 1px;
    background: #ddd;
    height: calc(100vh - 40px);
}

.main-column {
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
}

.left-panel {
    padding: 16px;
    border-bottom: 2px solid #ddd;
    flex-shrink: 0;
    max-height: 45vh;
    overflow-y: auto;
}

.center-panel {
    padding: 16px;
    flex: 1;
    overflow-y: auto;
}

.right-panel {
    background: #fff;
    padding: 16px;
    overflow-y: auto;
}

.bottom-panel {
    background: #fff;
    border-top: 1px solid #ddd;
    padding: 8px 16px;
    font-size: 12px;
    color: #666;
    height: 40px;
}

h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    margin-bottom: 12px;
}

.btn-primary {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

.btn-primary:hover {
    background: #0052a3;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table th {
    text-align: left;
    padding: 6px 8px;
    background: #f8f8f8;
    border-bottom: 2px solid #ddd;
    font-weight: 600;
    white-space: nowrap;
}

.table td {
    padding: 6px 8px;
    border-bottom: 1px solid #eee;
}

.table tbody tr:hover {
    background: #f0f7ff;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-secondary {
    background: #e2e3e5;
    color: #383d41;
}

.text-warning {
    color: #856404;
    font-size: 11px;
}

.text-info {
    color: #0c5460;
    font-size: 11px;
}

.line-grid-header {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    padding: 6px 0;
    border-bottom: 2px solid #ddd;
}

input[type="checkbox"] {
    cursor: pointer;
}

.sync-result {
    font-size: 12px;
    color: #333;
    padding: 4px 0;
}

#sync-status {
    font-size: 12px;
    margin-bottom: 8px;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.text-muted {
    color: #999;
}

.text-success {
    color: #155724;
}

.text-error {
    color: #dc3545;
    font-size: 13px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 2px rgba(0,102,204,0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.conversion-section {
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
}

.conversion-section h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.preview-container {
    font-size: 13px;
}

.preview-container h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
}

.preview-container h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #555;
}

.preview-section {
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px;
}

.preview-table {
    width: 100%;
    font-size: 12px;
}

.preview-table td {
    padding: 3px 0;
}

.preview-table td:first-child {
    color: #888;
    width: 120px;
}

.preview-table td.amount {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
}

.summary-bar {
    display: flex;
    justify-content: space-between;
    background: #f8f8f8;
    padding: 8px 12px;
    font-size: 13px;
}

.summary-bar strong {
    color: #0066cc;
}

.preview-actions {
    margin-top: 12px;
    text-align: right;
}

.line-actions {
    margin-top: 8px;
    padding: 8px 0;
    border-top: 1px solid #eee;
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
    margin-bottom: 0;
}

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

.radio-group {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.radio-group label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: normal;
    font-size: 13px;
    cursor: pointer;
}

.convert-bar {
    margin-top: 12px;
    padding: 12px;
    background: #f0f7ff;
    border: 1px solid #b3d4fc;
    border-radius: 6px;
    text-align: center;
}

.convert-bar .btn {
    margin-bottom: 0;
    padding: 8px 20px;
    font-size: 14px;
}

.dry-run-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 12px;
    font-size: 13px;
    cursor: pointer;
}
