html {
  font-size: 14px;
}

.navbar > .container-fluid { flex-wrap: nowrap; gap: 8px; }
.app-language-selector { margin-left: auto; flex-shrink: 0; }
.app-language-toggle { min-width: 88px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.app-language-toggle.show { color: var(--bs-body-color); background-color: var(--bs-tertiary-bg); }
.app-language-selector .dropdown-item { min-height: 44px; height: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app-language-selector form { margin: 0; }

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.row{
    padding: 15px;
}

input {
    padding: 15px;
    margin-top: 5px;
    margin-bottom: 5px;
    border-top-style: none;
    border-left-style: none;
    border-right-style: none;
    border-bottom-style: solid;
    border-bottom-width: 1px;
    border-bottom-color: gray;
}

button, .btn {
    height: 50px;
}

.z-top{
    z-index: 10;
}

.app-home {
    min-height: calc(100vh - 180px);
    padding: 42px 0 40px;
}

.app-home-header {
    display: flex;
    justify-content: center;
    margin-bottom: 48px;
}

.app-home-header h1 {
    margin: 0;
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
}

.app-home-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 360px;
    margin: 0 auto;
}

.app-home-action {
    width: 100%;
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: 600;
}

@media (max-width: 576px) {
    .app-home {
        padding-top: 34px;
    }

    .app-home-header {
        margin-bottom: 36px;
    }

    .app-home-header h1 {
        font-size: 1.6rem;
    }
}

.app-navbar-brand {
    width: 132px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
}

.app-navbar-logo {
    width: 108px;
    max-width: 100%;
    height: auto;
    display: block;
}

.app-navbar-logo-dark,
[data-bs-theme="dark"] .app-navbar-logo-light {
    display: none;
}

[data-bs-theme="dark"] .app-navbar-logo-dark {
    display: block;
}

.app-home-action.btn-primary {
    background-color: #2a3a73;
    border-color: #2a3a73;
    color: #ffffff;
}

.app-home-action.btn-primary:hover,
.app-home-action.btn-primary:focus {
    background-color: #223263;
    border-color: #223263;
    color: #ffffff;
}

.app-login {
    width: 100%;
    max-width: 440px;
    margin: 34px auto 64px;
}

.app-login-panel {
    padding: 32px;
}

.app-login-heading {
    margin-bottom: 28px;
    text-align: center;
}

.app-login-heading h1 {
    margin: 0 0 8px;
    font-size: 2rem;
    font-weight: 600;
}

.app-login-heading p {
    margin: 0;
    color: var(--bs-secondary-color);
}

.app-login .validation-summary-valid,
.app-login .field-validation-valid {
    display: none;
}

.app-login .validation-summary-errors {
    margin-bottom: 20px;
}

.app-login .validation-summary-errors ul {
    margin-bottom: 0;
}

.app-login-field {
    margin-bottom: 18px;
}

.app-login-field .form-label {
    margin-bottom: 7px;
    font-weight: 600;
}

.app-login-field .form-control {
    min-height: 50px;
    margin: 0;
    padding: 12px 14px;
    border: 0;
    border-radius: 8px;
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}

.app-login-field .form-control:focus {
    box-shadow: 0 0 0 3px rgba(13, 110, 253, .3);
}

.app-login-field .field-validation-error {
    display: block;
    margin-top: 6px;
}

.app-login-remember {
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    margin: 6px 0 24px;
    cursor: pointer;
}

.app-login-remember .form-check-input {
    width: 20px;
    height: 20px;
    margin: 0;
    padding: 0;
    border-color: var(--bs-link-color);
    flex-shrink: 0;
}

.app-login-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    text-align: center;
}

.app-login-external {
    margin-top: 24px;
    text-align: center;
}

.app-login-external h2 {
    margin-bottom: 16px;
    font-size: 1.1rem;
    font-weight: 600;
}

.app-login-external-actions {
    display: grid;
    gap: 12px;
}

@media (max-width: 576px) {
    .app-login {
        margin-top: 20px;
    }

    .app-login-panel {
        padding: 24px 20px;
    }
}

.report-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 10px 0 32px;
}

.report-header {
    margin-bottom: 18px;
}

.report-header h1 {
    margin: 8px 0 4px;
    font-size: 1.55rem;
    font-weight: 700;
}

.report-header p {
    margin: 0;
    color: #667085;
}

.report-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.report-heading-copy {
    min-width: 0;
    overflow-wrap: anywhere;
}

.report-download {
    --bs-btn-color: #ffffff;
    --bs-btn-bg: #2a3a73;
    --bs-btn-border-color: #2a3a73;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #223263;
    --bs-btn-hover-border-color: #223263;
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-bg: #223263;
    --bs-btn-active-border-color: #223263;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    gap: 10px;
    min-height: 48px;
    height: auto;
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease;
}

.report-download:focus-visible {
    outline: 3px solid rgba(42, 58, 115, .4);
    outline-offset: 3px;
    box-shadow: none;
}

.report-download-icon {
    flex-shrink: 0;
}

[data-bs-theme="dark"] .report-download {
    --bs-btn-border-color: #6f85bd;
    --bs-btn-hover-bg: #334783;
    --bs-btn-hover-border-color: #9badde;
    --bs-btn-active-bg: #334783;
    --bs-btn-active-border-color: #9badde;
}

[data-bs-theme="dark"] .report-download:focus-visible {
    outline-color: #acbcf4;
}

@media (max-width: 576px) {
    .report-heading-row {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .report-download {
        width: 100%;
    }
}

.report-back {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    font-weight: 600;
    text-decoration: none;
}

.report-list,
.account-list,
.transaction-list,
.receipt-image-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.account-row,
.transaction-card,
.report-empty,
.report-section,
.receipt-image-link {
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: var(--bs-body-bg);
}



.report-list-meta,
.account-row > div > span,
.transaction-topline span,
.report-empty p {
    color: #667085;
}

.report-empty {
    padding: 18px;
}

.report-empty h2,
.report-section h2 {
    margin: 0 0 10px;
    font-size: 1.1rem;
    font-weight: 700;
}

.report-summary-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.report-summary-item {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 8px;
    color: #ffffff;
    text-decoration: none;
}

.report-summary-item span {
    font-weight: 600;
}

.report-income {
    background: #2f7d55;
}

.report-expense {
    background: #b84d4d;
}

.report-result {
    background: #2a3a73;
}

.report-section {
    padding: 14px;
    margin-top: 14px;
}

.report-month-row,
.ledger-row,
.transaction-topline,
.account-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.report-comparison-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(135px, max-content) minmax(80px, max-content);
    align-items: center;
    column-gap: 14px;
    padding: 10px 0;
    border-top: 1px solid #eaecf0;
}

.report-comparison-row:first-of-type {
    border-top: 0;
}

.report-comparison-row strong,
.report-comparison-row small {
    white-space: nowrap;
    text-align: right;
}

.report-chart {
    position: relative;
    width: 100%;
    height: 260px;
    margin-bottom: 12px;
}

.report-month-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid #eaecf0;
}

.report-month-row {
    min-height: 44px;
    padding: 8px 0;
    border-bottom: 1px solid #eaecf0;
}

.report-month-row a,
.report-month-row strong {
    min-width: 95px;
    text-align: right;
}

.balance-report-heading,
.balance-report-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(116px, max-content) minmax(116px, max-content);
    align-items: center;
    gap: 14px;
}

.balance-report-heading {
    padding-bottom: 6px;
    color: #667085;
    font-size: .9rem;
    font-weight: 700;
    text-align: right;
}

.balance-report-row {
    min-height: 48px;
    padding: 10px 0;
    border-bottom: 1px solid #eaecf0;
    color: inherit;
    text-decoration: none;
}

.balance-report-row:hover,
.balance-report-row:focus {
    color: inherit;
    text-decoration: underline;
}

.balance-report-row-disabled,
.balance-report-row-disabled:hover,
.balance-report-row-disabled:focus {
    color: #667085;
    text-decoration: none;
}

.balance-report-row strong {
    flex-shrink: 0;
    text-align: right;
}

.balance-report-label {
    min-width: 0;
}

.balance-report-account-range {
    display: inline-block;
    min-width: 82px;
    margin-right: 8px;
    color: var(--bs-link-color);
    text-align: left;
}

.balance-report-row-disabled .balance-report-account-range {
    color: #667085;
}

.balance-report-total {
    font-weight: 700;
}

.balance-report-total:hover,
.balance-report-total:focus {
    text-decoration: none;
}

.report-month-list-two .report-month-row strong {
    min-width: 130px;
}

.account-row {
    padding: 14px;
}

.account-row > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.account-row > div:last-child {
    align-items: flex-end;
}

.balance-account-row {
    align-items: flex-start;
}

.balance-account-main {
    min-width: 0;
    flex: 1 1 auto;
}

.balance-account-main strong {
    overflow-wrap: anywhere;
}

.balance-account-actions {
    flex: 0 0 auto;
    min-width: 210px;
    gap: 6px;
}

.balance-account-amount-line {
    display: grid;
    grid-template-columns: auto minmax(120px, max-content);
    gap: 10px;
    width: 100%;
    align-items: baseline;
}

.balance-account-amount-line > span:last-child {
    text-align: right;
}

.balance-account-amount-value {
    color: var(--bs-body-color);
    font-weight: 700;
}

.balance-account-amount-label {
    color: #667085;
}

.balance-account-actions a {
    white-space: nowrap;
}

.balance-account-actions span {
    white-space: nowrap;
}

.transaction-card {
    padding: 14px;
}

.transaction-card p {
    margin: 10px 0;
}

.ledger-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.ledger-row {
    align-items: flex-start;
    padding-top: 8px;
    border-top: 1px solid #eaecf0;
}

.ledger-row span {
    min-width: 0;
}

.ledger-row strong {
    white-space: nowrap;
}

.transaction-image-link {
    width: 100%;
    margin-top: 14px;
}

.receipt-image-link {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    text-decoration: none;
}

.receipt-image-link img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.receipt-image-link span {
    font-weight: 700;
}

@media (min-width: 576px) {
    .report-summary-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .report-summary-item {
        flex-direction: column;
    }
}

@media (max-width: 420px) {
    .balance-report-heading {
        display: none;
    }

    .balance-report-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .balance-report-opening,
    .balance-report-closing {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        text-align: left !important;
        white-space: normal;
    }

    .balance-report-opening::before,
    .balance-report-closing::before {
        content: attr(data-label);
        color: #667085;
        font-weight: 600;
    }

    .balance-account-row {
        flex-direction: column;
    }

    .balance-account-actions {
        width: 100%;
        min-width: 0;
        align-items: stretch !important;
    }

    .balance-account-actions strong,
    .balance-account-actions a {
        white-space: normal;
    }

    .balance-account-amount-line {
        grid-template-columns: auto minmax(0, max-content);
    }
}

.report-period-action {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
}

.report-period-action .app-home-action {
    max-width: none;
}

.photo-studio-page {
    max-width: 640px;
}

.photo-file-input {
    display: none;
}

.photo-capture-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.photo-capture-button {
    margin: 0;
}

.photo-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.photo-status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: var(--bs-body-bg);
    text-align: center;
}

.photo-status-item span {
    color: #667085;
}

.photo-status-item strong {
    font-size: 1.35rem;
}

.photo-error {
    display: none;
    padding: 12px 14px;
    border: 1px solid #f1aeb5;
    border-radius: 8px;
    color: #f04438;
    background: rgba(180, 35, 24, .12);
    font-weight: 700;
}

.photo-error.is-visible {
    display: block;
}

.photo-upload-section {
    margin-top: 14px;
}

.photo-upload-section h2 {
    margin: 0 0 10px;
    font-size: 1.1rem;
    font-weight: 700;
}

.photo-upload-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.photo-upload-card {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: var(--bs-body-bg);
    color: #667085;
    font-weight: 700;
}

.photo-upload-card-error {
    justify-content: flex-start;
    border-color: #f1aeb5;
    color: #f04438;
    background: rgba(180, 35, 24, .12);
}

.photo-upload-card-complete {
    display: block;
    padding: 10px;
}

.photo-upload-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.photo-upload-image {
    width: 100%;
    max-height: 360px;
    object-fit: contain;
    border-radius: 6px;
    background: #101828;
}

.photo-upload-meta {
    margin: 0;
    color: #667085;
    font-weight: 700;
}

.choose-company-page {
    max-width: 520px;
    padding-top: 42px;
}

.choose-company-form,
.choose-company-field {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
}

.choose-company-field label {
    color: #667085;
    font-weight: 600;
}

.choose-company-select {
    min-height: 50px;
    border-color: #d0d5dd;
    border-radius: 8px;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
}

.choose-company-submit {
    max-width: none;
    margin-top: 4px;
}

.my-images-page {
    max-width: 720px;
}

.my-images-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.my-image-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: var(--bs-body-bg);
}

.my-image-preview {
    width: 100%;
    min-height: 160px;
    padding: 0;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #101828;
    overflow: hidden;
}

.my-image-preview img {
    width: 100%;
    height: 100%;
    min-height: 160px;
    display: block;
    object-fit: contain;
}

.my-image-details {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.my-image-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.my-image-topline > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.my-image-topline strong {
    font-size: 1.05rem;
}

.my-image-topline > div > span,
.my-image-meta dt,
.my-image-waiting {
    color: #667085;
}

.my-image-status {
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 8px;
    font-weight: 700;
    font-size: .85rem;
    white-space: nowrap;
}

.my-image-status-complete {
    color: #ffffff;
    background: #2f7d55;
}

.my-image-status-pending {
    color: #ffffff;
    background: #2a3a73;
}

.my-image-status-error {
    color: #ffffff;
    background: #b42318;
}

.my-image-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.my-image-meta div {
    min-width: 0;
}

.my-image-meta dt {
    font-weight: 600;
}

.my-image-meta dd {
    margin: 2px 0 0;
    overflow-wrap: anywhere;
    font-weight: 700;
}

.my-image-action {
    max-width: 220px;
    min-height: 48px;
}

.my-image-waiting {
    margin: auto 0 0;
    font-weight: 700;
}

.my-image-modal {
    max-width: min(960px, calc(100vw - 24px));
}

.my-image-modal-body {
    text-align: center;
}

.my-image-modal-body img {
    max-width: 100%;
    max-height: calc(100vh - 180px);
    height: auto;
}

@media (max-width: 576px) {
    .my-image-card {
        grid-template-columns: 1fr;
    }

    .my-image-meta {
        grid-template-columns: 1fr;
    }

    .my-image-action {
        max-width: none;
    }
}

