/* LMC ERP. Colours follow the Next.js app (brand orange, dark sidebar); the MudBlazor theme is in Layout/LmcTheme.cs. */

html, body {
    font-family: "Segoe UI", Tahoma, Arial, sans-serif; /* Windows fonts with Arabic coverage: no internet needed */
    background: #f4f5f7;
}

/* ---- loading screen (before the app starts) ---- */
.lmc-loading { position: relative; min-height: 100vh; }

.lmc-loading-name {
    position: absolute;
    inset: calc(20vh + 9rem) 0 auto 0;
    text-align: center;
    font-weight: 700;
    letter-spacing: .08em;
    color: #15171c;
}

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e5e7eb;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #ff5a1f;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

/* ---- unexpected error bar ---- */
#blazor-error-ui {
    color-scheme: light only;
    background: #fef3e2;
    color: #15171c;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 2000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        inset-inline-end: 0.75rem;
        top: 0.5rem;
    }

/* ---- app ---- */
.lmc-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #ff5a1f;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: .04em;
}

.lmc-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, #15171c 0%, #1f232b 60%, #2b1a12 100%);
}

.lmc-login-card { width: 100%; max-width: 420px; }

.lmc-page-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

    .lmc-page-header .lmc-grow { flex: 1 1 auto; }

.lmc-module-card { height: 100%; border-top: 4px solid var(--lmc-module, #ff5a1f); }

.lmc-muted { color: #6b7280; }

.lmc-nowrap { white-space: nowrap; }

/* Branch switcher: the branch name in normal case, not MudBlazor's button capitals. */
.lmc-branch-switcher .mud-button-root { text-transform: none; font-weight: 600; }

/* Sortable column headers of server-side lists. */
.lmc-sort-header { cursor: pointer; user-select: none; white-space: nowrap; }
.lmc-sort-header:hover { color: #e0470f; }

/* ---- ledger ---- */
.lmc-strong td { font-weight: 600; }                          /* header accounts in the chart and reports */
.lmc-clickable { cursor: pointer; }
.lmc-num-input input { text-align: end; font-variant-numeric: tabular-nums; }
.lmc-journal-grid { overflow-x: auto; }
.lmc-num { font-variant-numeric: tabular-nums; direction: ltr; } /* amounts line up, and keep "-1,234.567" left-to-right in Arabic */
