/* =========================================================
   BEGINNER BOOKKEEPING PRACTICE SIMULATOR
   Main Stylesheet
   ========================================================= */


/* =========================================================
   1. BASE / VARIABLES
   ========================================================= */

:root {
    --navy: #17365d;
    --navy-dark: #102a49;
    --blue: #2f6fad;
    --blue-light: #eaf3fb;
    --blue-soft: #f5f9fd;

    --green: #26734d;
    --green-light: #eaf6ef;

    --amber: #9a6700;
    --amber-light: #fff7df;

    --red: #b42318;
    --red-light: #fff0ee;

    --text: #25313d;
    --muted: #667085;

    --border: #d8dee6;
    --border-light: #e8ecf1;

    --surface: #ffffff;
    --page: #f4f6f8;

    --shadow:
        0 2px 8px rgba(16, 42, 73, 0.06);

    --radius: 8px;
}


* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-family:
        Arial,
        Helvetica,
        sans-serif;
    font-size: 14px;
    line-height: 1.5;
}


button,
input,
select,
textarea {
    font: inherit;
}


button {
    cursor: pointer;
}


button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}


[hidden] {
    display: none !important;
}


/* =========================================================
   2. HEADER
   ========================================================= */

.site-header {
    background: var(--navy);
    color: white;
    border-bottom: 4px solid var(--blue);
}


.header-inner {
    width: min(1500px, calc(100% - 40px));
    margin: 0 auto;
    min-height: 82px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}


.site-header h1 {
    margin: 0;
    font-size: 20px;
    line-height: 1.25;
}


.site-header p {
    margin: 5px 0 0;
    color: #d7e2ef;
    font-size: 12px;
}


.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}


.main-nav a {
    padding: 9px 12px;
    border-radius: 5px;

    color: #dbe7f3;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}


.main-nav a:hover,
.main-nav a.active {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}


/* =========================================================
   3. PAGE SHELL
   ========================================================= */

.page-shell {
    width: min(1500px, calc(100% - 40px));
    margin: 24px auto 50px;
}


/* =========================================================
   4. WORKDAY HEADER
   ========================================================= */

.workday-header {
    margin-bottom: 18px;
    padding: 20px 22px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 35px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}


.eyebrow {
    margin: 0 0 4px;
    color: var(--blue);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


.workday-header h2 {
    margin: 0;
    color: var(--navy);
    font-size: 21px;
}


.workday-number {
    margin: 4px 0 10px;
    color: var(--muted);
    font-size: 12px;
}


.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}


.badge {
    padding: 4px 9px;
    background: var(--blue-light);
    border: 1px solid #c9deef;
    border-radius: 999px;

    color: var(--navy);
    font-size: 10px;
    font-weight: 700;
}


.workday-progress {
    width: 310px;
    flex-shrink: 0;
}


.progress-heading {
    margin-bottom: 7px;

    display: flex;
    justify-content: space-between;
    gap: 20px;

    color: var(--muted);
    font-size: 11px;
}


.progress-heading strong {
    color: var(--navy);
}


.progress-track {
    height: 8px;
    overflow: hidden;

    background: #e6eaf0;
    border-radius: 999px;
}


.progress-bar {
    width: 0%;
    height: 100%;

    background: var(--blue);
    border-radius: inherit;

    transition: width 0.25s ease;
}


/* =========================================================
   5. GENERIC PANEL
   ========================================================= */

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}


.panel-heading {
    min-height: 58px;
    padding: 14px 16px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    border-bottom: 1px solid var(--border-light);
}


.panel-heading h2 {
    margin: 0;
    color: var(--navy);
    font-size: 16px;
}


/* =========================================================
   6. MAIN WORKSPACE
   ========================================================= */

.simulator-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}


.left-column,
.right-column {
    display: grid;
    gap: 18px;
}


/* =========================================================
   7. INBOX
   ========================================================= */

.inbox-count {
    padding: 4px 8px;

    background: var(--blue-light);
    border-radius: 999px;

    color: var(--blue);
    font-size: 10px;
    font-weight: 800;
}


.inbox-list {
    display: grid;
}


.email {
    width: 100%;
    min-height: 63px;
    padding: 11px 13px;

    display: flex;
    align-items: center;
    gap: 10px;

    background: white;
    border: 0;
    border-bottom: 1px solid var(--border-light);

    color: var(--text);
    text-align: left;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}


.email:last-child {
    border-bottom: 0;
}


.email:hover {
    background: var(--blue-soft);
}


.email.active {
    background: var(--blue-light);
    box-shadow: inset 3px 0 0 var(--blue);
}


.email-status {
    width: 20px;
    flex-shrink: 0;

    color: #98a2b3;
    font-size: 16px;
    font-weight: 800;
    text-align: center;
}


.email.status-complete .email-status {
    color: var(--green);
}


.email.status-review .email-status {
    color: var(--amber);
}


.email-text {
    min-width: 0;
    display: grid;
    gap: 3px;
}


.email-text strong {
    overflow: hidden;
    color: var(--navy);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.email-text small {
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================================================
   8. WHAT WOULD YOU DO?
   ========================================================= */

.decision-instruction {
    margin: 0;
    padding: 13px 16px 4px;

    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}


.action-list {
    padding: 10px 12px 14px;

    display: grid;
    gap: 7px;
}


.action-button {
    width: 100%;
    padding: 10px 11px;

    display: grid;
    gap: 2px;

    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;

    color: var(--text);
    text-align: left;
}


.action-button:hover {
    background: var(--blue-soft);
    border-color: #a8c8e5;
}


.action-button.selected {
    background: var(--blue-light);
    border-color: var(--blue);
    box-shadow: inset 3px 0 0 var(--blue);
}


.action-button strong {
    color: var(--navy);
    font-size: 12px;
}


.action-button span {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.4;
}


/* =========================================================
   9. HELP BUTTONS
   ========================================================= */

.help-button {
    width: 24px;
    height: 24px;
    padding: 0;
    flex-shrink: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: white;
    border: 1px solid #aac5df;
    border-radius: 50%;

    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
}


.help-button:hover {
    background: var(--blue-light);
    border-color: var(--blue);
}


/* =========================================================
   10. SOURCE DOCUMENT
   ========================================================= */

#task-content {
    padding: 18px;
}


.message-card {
    margin-bottom: 18px;
    padding: 18px;

    background: #fbfcfd;
    border: 1px solid var(--border-light);
    border-radius: 7px;
}


.message-header {
    margin-bottom: 16px;
    padding-bottom: 12px;

    display: flex;
    justify-content: space-between;
    gap: 20px;

    border-bottom: 1px solid var(--border-light);
}


.message-header > div {
    display: grid;
    gap: 2px;
}


.message-header strong {
    color: var(--navy);
}


.message-header span,
.message-header time {
    color: var(--muted);
    font-size: 11px;
}


.message-card p {
    margin: 0 0 12px;
}


.message-card p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   11. RECEIPT / DOCUMENT CARD
   ========================================================= */

.document-card {
    width: min(540px, 100%);
    margin: 0 auto;
    padding: 24px;

    background: #fffef9;
    border: 1px solid #ddd8c9;
    border-radius: 4px;

    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.05);

    font-family:
        "Courier New",
        Courier,
        monospace;
}


.receipt-title {
    margin-bottom: 18px;
    padding-bottom: 12px;

    display: grid;
    gap: 3px;

    border-bottom: 1px dashed #9e9b91;
    text-align: center;
}


.receipt-title strong {
    font-size: 16px;
}


.receipt-title span {
    color: #666;
    font-size: 10px;
}


.receipt-row,
.receipt-total {
    padding: 6px 0;

    display: flex;
    justify-content: space-between;
    gap: 20px;
}


.receipt-row {
    font-size: 11px;
}


.receipt-total {
    margin-top: 10px;
    padding-top: 12px;

    border-top: 1px dashed #9e9b91;
    font-size: 13px;
}


.payment-method {
    margin: 15px 0 0;
    padding-top: 12px;

    border-top: 1px dashed #c5c1b5;

    color: #555;
    font-size: 10px;
    text-align: center;
}


/* =========================================================
   12. RECORD TRANSACTION
   ========================================================= */

.transaction-panel {
    overflow: visible;
}


.selected-workflow {
    padding: 5px 9px;

    background: #f2f4f7;
    border-radius: 999px;

    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}


.entry-form-container {
    min-height: 190px;
    padding: 18px;
}


.transaction-placeholder {
    min-height: 150px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;

    color: var(--muted);
    text-align: left;
}


.placeholder-number {
    width: 42px;
    height: 42px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--blue-light);
    border-radius: 50%;

    color: var(--blue);
    font-size: 17px;
    font-weight: 800;
}


.transaction-placeholder h3 {
    margin: 0 0 4px;
    color: var(--navy);
    font-size: 14px;
}


.transaction-placeholder p {
    max-width: 450px;
    margin: 0;
    font-size: 11px;
}


/* =========================================================
   13. TRANSACTION FORMS
   ========================================================= */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px 18px;
}


.form-grid label {
    min-width: 0;

    display: grid;
    gap: 6px;

    color: var(--navy);
    font-size: 11px;
    font-weight: 700;
}


.form-grid label.full-width {
    grid-column: 1 / -1;
}


.field-title {
    display: flex;
    align-items: center;
    gap: 6px;
}


.field-title .help-button {
    width: 19px;
    height: 19px;
    font-size: 10px;
}


.optional {
    margin-left: 5px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 400;
}


.form-grid input,
.form-grid select,
.form-grid textarea {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;

    background: white;
    border: 1px solid #cfd6df;
    border-radius: 5px;

    color: var(--text);
    font-size: 12px;
    outline: none;
}


.form-grid textarea {
    min-height: 70px;
    resize: vertical;
}


.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
    border-color: var(--blue);
    box-shadow:
        0 0 0 3px rgba(47, 111, 173, 0.10);
}


.form-actions {
    margin-top: 18px;

    display: flex;
    justify-content: flex-end;
    gap: 10px;
}


.primary-button,
.secondary-button {
    min-height: 38px;
    padding: 8px 16px;

    border-radius: 5px;

    font-size: 11px;
    font-weight: 800;
}


.primary-button {
    background: var(--navy);
    border: 1px solid var(--navy);

    color: white;
}


.primary-button:hover:not(:disabled) {
    background: var(--navy-dark);
}


.secondary-button {
    background: white;
    border: 1px solid var(--border);

    color: var(--navy);
}


.secondary-button:hover {
    background: var(--blue-soft);
}


/* =========================================================
   14. GUIDED ENTRY REVIEW
   ========================================================= */

.review-panel {
    border-color: #bdd4e8;
}


#review-content {
    padding: 18px;
}


.review-summary {
    margin-bottom: 16px;
    padding: 13px 15px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    background: var(--blue-soft);
    border: 1px solid #d4e4f2;
    border-radius: 6px;
}


.review-summary strong {
    color: var(--navy);
}


.review-score {
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
}


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


.comparison-table th,
.comparison-table td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--border-light);
    text-align: left;
    vertical-align: top;
}


.comparison-table th {
    background: #f8fafc;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}


.comparison-table td:first-child {
    color: var(--navy);
    font-weight: 700;
}


.field-correct {
    color: var(--green);
    font-weight: 800;
}


.field-incorrect {
    color: var(--red);
    font-weight: 800;
}


.feedback-box {
    margin-top: 16px;
    padding: 15px;

    background: var(--amber-light);
    border-left: 3px solid #d79b17;
    border-radius: 5px;
}


.feedback-box h3 {
    margin: 0 0 7px;
    color: #684500;
    font-size: 12px;
}


.feedback-box p {
    margin: 0;
    color: #5f5133;
    font-size: 11px;
}


/* =========================================================
   15. ACCOUNTING EFFECT / DEALER EXPLANATION
   ========================================================= */

.accounting-effect {
    margin-top: 16px;
    padding: 16px;

    background: var(--green-light);
    border: 1px solid #c7e5d4;
    border-radius: 6px;
}


.accounting-effect h3 {
    margin: 0 0 13px;
    color: var(--green);
    font-size: 13px;
}


.account-effect-item {
    padding: 11px 0;

    display: grid;
    grid-template-columns: minmax(0, 1fr) 100px;
    gap: 20px;

    border-bottom: 1px solid #d5e9dd;
}


.account-effect-item:last-of-type {
    border-bottom: 0;
}


.account-effect-item strong {
    color: var(--navy);
}


.account-effect-item p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 10px;
}


.debit-credit {
    text-align: right;
}


.debit-credit span {
    display: block;
    color: var(--green);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}


.debit-credit strong {
    display: block;
    margin-top: 2px;
    font-size: 12px;
}


.balance-check {
    margin-top: 12px;
    padding-top: 11px;

    display: flex;
    justify-content: space-between;
    gap: 20px;

    border-top: 1px solid #bddbc9;

    color: var(--green);
    font-size: 10px;
    font-weight: 800;
}


/* =========================================================
   16. DEALER QUICK REFERENCE
   ========================================================= */

.dealer-reference {
    margin: 18px 0;
    padding: 12px 18px;

    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;

    background: #eef4fa;
    border: 1px solid #cdddeb;
    border-radius: var(--radius);
}


.dealer-title {
    display: flex;
    align-items: center;
    gap: 7px;
}


.dealer-title > span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}


.dealer-title > strong {
    color: var(--navy);
    font-size: 14px;
    letter-spacing: 0.05em;
}


.dealer-help-button {
    width: 20px;
    height: 20px;
    font-size: 10px;
}


.dealer-groups {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}


.dealer-side {
    display: flex;
    align-items: center;
    gap: 14px;
}


.dealer-heading {
    color: var(--navy);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}


.dealer-items {
    display: flex;
    align-items: center;
    gap: 13px;
}


.dealer-items span {
    color: var(--text);
    font-size: 10px;
    white-space: nowrap;
}


.dealer-items strong {
    display: inline-flex;
    width: 20px;
    height: 20px;
    margin-right: 3px;

    align-items: center;
    justify-content: center;

    background: white;
    border: 1px solid #bfd2e4;
    border-radius: 4px;

    color: var(--blue);
}


.dealer-divider {
    width: 1px;
    height: 32px;
    background: #c4d4e2;
}


.dealer-opposite {
    margin: 0;
    color: var(--muted);
    font-size: 9px;
    font-style: italic;
    white-space: nowrap;
}


/* =========================================================
   17. MY ENTRIES
   ========================================================= */

.entries-section {
    overflow: hidden;
}


.entries-heading p:not(.eyebrow) {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 10px;
}


.entries-progress {
    display: grid;
    gap: 2px;
    text-align: right;
}


.entries-progress span {
    color: var(--muted);
    font-size: 9px;
    text-transform: uppercase;
}


.entries-progress strong {
    color: var(--navy);
    font-size: 11px;
}


.empty-entries {
    padding: 34px 20px;
    text-align: center;
}


.empty-entries strong {
    color: var(--navy);
    font-size: 12px;
}


.empty-entries p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 10px;
}


.entries-table-wrapper {
    overflow-x: auto;
}


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


.entries-table th,
.entries-table td {
    padding: 11px 13px;
    border-bottom: 1px solid var(--border-light);
    text-align: left;
    vertical-align: middle;
}


.entries-table th {
    background: #f8fafc;

    color: var(--muted);
    font-size: 9px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}


.entries-table tbody tr:hover {
    background: #fbfcfe;
}


.entry-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    padding: 4px 7px;

    border-radius: 999px;

    font-size: 9px;
    font-weight: 800;
}


.entry-status.reviewed {
    background: var(--green-light);
    color: var(--green);
}


.entry-status.review-needed {
    background: var(--amber-light);
    color: var(--amber);
}


.entry-status.corrected {
    background: var(--blue-light);
    color: var(--blue);
}


.entry-row-button {
    padding: 5px 8px;

    background: white;
    border: 1px solid var(--border);
    border-radius: 4px;

    color: var(--blue);
    font-size: 9px;
    font-weight: 700;
}


.entry-row-button:hover {
    background: var(--blue-soft);
}


.entry-details-row td {
    padding: 0;
    background: #fafbfd;
}


.entry-details {
    padding: 15px 18px;

    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 12px 20px;
}


.entry-detail {
    display: grid;
    gap: 2px;
}


.entry-detail span {
    color: var(--muted);
    font-size: 9px;
    text-transform: uppercase;
}


.entry-detail strong {
    color: var(--navy);
    font-size: 11px;
}


.finish-workday {
    padding: 14px 16px;

    display: flex;
    justify-content: flex-end;

    background: #fafbfd;
    border-top: 1px solid var(--border-light);
}


/* =========================================================
   18. HELP MODAL
   ========================================================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;

    padding: 25px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(16, 42, 73, 0.48);
}


.help-modal {
    width: min(620px, 100%);
    max-height: 85vh;
    overflow-y: auto;

    background: white;
    border-radius: 9px;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.20);
}


.help-modal-header {
    padding: 15px 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid var(--border-light);
}


.help-modal-header h2 {
    margin: 0;
    color: var(--navy);
    font-size: 16px;
}


.modal-close {
    width: 30px;
    height: 30px;
    padding: 0;

    background: white;
    border: 1px solid var(--border);
    border-radius: 50%;

    color: var(--muted);
    font-size: 18px;
    line-height: 1;
}


.modal-close:hover {
    background: #f5f6f8;
}


#help-modal-content {
    padding: 20px;
}


#help-modal-content h3 {
    margin: 0 0 10px;
    color: var(--navy);
    font-size: 14px;
}


#help-modal-content h4 {
    margin: 18px 0 6px;
    color: var(--navy);
    font-size: 12px;
}


#help-modal-content p {
    margin: 0 0 10px;
    font-size: 11px;
    line-height: 1.6;
}


#help-modal-content ul {
    margin: 8px 0 12px;
    padding-left: 20px;
}


#help-modal-content li {
    margin-bottom: 5px;
    font-size: 11px;
}


.help-example {
    margin-top: 14px;
    padding: 13px;

    background: var(--blue-soft);
    border-left: 3px solid var(--blue);
    border-radius: 4px;
}


/* =========================================================
   19. RESPONSIVE
   ========================================================= */

@media (max-width: 1050px) {

    .simulator-layout {
        grid-template-columns: 300px minmax(0, 1fr);
    }


    .dealer-reference {
        grid-template-columns: 1fr;
        gap: 10px;
    }


    .dealer-groups {
        justify-content: flex-start;
    }


    .dealer-opposite {
        white-space: normal;
    }

}


@media (max-width: 800px) {

    .header-inner {
        padding: 14px 0;
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }


    .main-nav {
        width: 100%;
        overflow-x: auto;
    }


    .workday-header {
        align-items: flex-start;
        flex-direction: column;
    }


    .workday-progress {
        width: 100%;
    }


    .simulator-layout {
        grid-template-columns: 1fr;
    }


    .form-grid {
        grid-template-columns: 1fr;
    }


    .dealer-groups {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }


    .dealer-side {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }


    .dealer-divider {
        width: 100%;
        height: 1px;
    }


    .entry-details {
        grid-template-columns: 1fr 1fr;
    }

}


@media (max-width: 520px) {

    .page-shell,
    .header-inner {
        width: min(100% - 20px, 1500px);
    }


    .dealer-items {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }


    .entry-details {
        grid-template-columns: 1fr;
    }


    .comparison-table {
        font-size: 10px;
    }

}