/* App page — extends style.css conventions (navy/cyan, card shadows, rounded corners) */

.app-section {
    padding: 56px 0 96px;
}

.app-section h1 {
    font-size: 2rem;
    color: #0f3460;
    margin-bottom: 8px;
}

.app-section .subtitle {
    color: #555;
    margin-bottom: 40px;
    font-size: 1rem;
}

.step-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 28px;
    margin-bottom: 24px;
}

.step-card h2 {
    font-size: 1.15rem;
    color: #0f3460;
    margin-bottom: 16px;
}

.step-card.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.field-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.field-row label {
    font-size: 0.9rem;
    color: #333;
    font-weight: 600;
}

.field-row input[type="number"] {
    width: 70px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9rem;
}

input[type="file"] {
    font-size: 0.9rem;
}

.btn {
    display: inline-block;
    background: #00b4d8;
    color: white;
    padding: 10px 22px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn:hover {
    background: #0096c7;
}

.btn:disabled {
    background: #b0c4d8;
    cursor: not-allowed;
}

.btn-secondary {
    background: #0f3460;
}

.btn-secondary:hover {
    background: #16213e;
}

.status-message {
    font-size: 0.9rem;
    margin-top: 12px;
}

.status-message.error {
    color: #c0392b;
}

.status-message.info {
    color: #555;
}

.status-message.warning {
    color: #8a6d00;
    background: #fff8e1;
    border: 1px solid #f0d975;
    border-radius: 6px;
    padding: 10px 12px;
}

.credits-badge {
    display: inline-block;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.85rem;
    color: #0f3460;
    font-weight: 600;
    margin-left: 12px;
}

/* T-account preview */
.t-account-preview {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 24px;
    margin-top: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    background-color: #ffffff;
    background-repeat: no-repeat;
    background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
    background-attachment: local, local, scroll, scroll;
    background-image:
        linear-gradient(to right, #ffffff 30%, rgba(255, 255, 255, 0)),
        linear-gradient(to left, #ffffff 30%, rgba(255, 255, 255, 0)),
        linear-gradient(to right, rgba(15, 52, 96, 0.18), rgba(15, 52, 96, 0)),
        linear-gradient(to left, rgba(15, 52, 96, 0.18), rgba(15, 52, 96, 0));
    background-position: left center, right center, left center, right center;
}

.t-type-group {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: 16px;
}

.t-type-header {
    text-align: center;
}

.t-type-header .type-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #0f3460;
}

.t-type-header .type-balance {
    font-size: 0.95rem;
    color: #0078d4;
    border-bottom: 1px solid #ccc;
    padding-bottom: 6px;
    display: block;
}

.t-box {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 16px;
    min-width: 260px;
}

.t-box .account-name {
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    border-bottom: 2px solid #0f3460;
    padding-bottom: 8px;
    margin-bottom: 4px;
}

.t-box table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.t-box th {
    text-align: right;
    font-weight: 700;
    font-size: 0.8rem;
    border-bottom: 1px solid #ccc;
    padding: 4px 6px;
}

.t-box th:first-child,
.t-box td:first-child {
    text-align: left;
}

.t-box td {
    padding: 4px 6px;
    text-align: right;
}

.t-box td:nth-child(2),
.t-box th:nth-child(2) {
    border-right: 2px solid #0f3460;
}

.t-box .balance-row td {
    border-top: 1px solid #0f3460;
    font-weight: 700;
}

/* Column mapping review */
.mapping-hint {
    color: #555;
    font-size: 0.9rem;
    margin: -8px 0 20px;
}

.format-toggle {
    margin-bottom: 20px;
    padding: 14px 16px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.toggle-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #0f3460;
}

.toggle-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toggle-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 400;
    color: #333;
    cursor: pointer;
}

.toggle-option input[type="radio"] {
    margin: 0;
}

.mapping-fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 6px 20px;
}

.mapping-field {
    margin-bottom: 12px;
}

.mapping-field label {
    display: block;
    margin-bottom: 4px;
    color: #333;
    font-weight: 600;
    font-size: 0.85rem;
}

.badge-required {
    font-size: 0.7rem;
    font-weight: 600;
    color: #c0392b;
    background: #fde7e9;
    border-radius: 3px;
    padding: 2px 6px;
    margin-left: 6px;
    vertical-align: middle;
}

.badge-optional {
    font-size: 0.7rem;
    font-weight: 400;
    color: #777;
    background: #f0f0f0;
    border-radius: 3px;
    padding: 2px 6px;
    margin-left: 6px;
    vertical-align: middle;
}

.mapping-field select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    box-sizing: border-box;
}

.mapping-field select:focus {
    border-color: #00b4d8;
    outline: none;
}

.mapping-field.matched select {
    border-color: #27ae60;
}

.mapping-field.unmatched select {
    border-color: #c0392b;
}
