/* App-wide custom styles shared by every host (linked from Web.Blazor
   _Host.cshtml and Mobile.Maui index.html). Single source of truth — put
   cross-host utility classes here rather than duplicating them in each host's
   site.css / app.css. */

/* Excel button — Microsoft-Excel green font + green contour (#217346).

   CONVENTION: every Excel import/export button carries the `btn-excel` class in
   addition to whatever base button class it already uses
   (e.g. `btn btn-excel`, or `wms-btn btn-excel`). Apply it to ANY new Excel
   button too, so all Excel actions read as green across the solution.

   !important so the green wins over Bootstrap's btn-outline-* colours and the
   WMS .wms-btn palette without having to drop those base classes. Only the font
   colour and the border (contour) are forced — the background is left to the
   base button class. */
.btn-excel {
    color: #217346 !important;
    border: 1px solid #217346 !important;
}

.btn-excel:hover,
.btn-excel:focus {
    color: #1a5c38 !important;
    border-color: #1a5c38 !important;
    background-color: rgba(33, 115, 70, 0.08) !important;
}

/* Field-service: always-visible top-bar pointage counter (RunningPointageIndicator). Mirrors the
   WorkBar's red-LED readout (FieldServiceWorkBar.razor.css .wt-clock) so a running pointage reads
   the same everywhere. Shown off the action page (the WorkBar owns the clock on the action page);
   click returns to the last action opened for the pointage, else its mother. */
.mc-pointage-clock {
    font-family: Consolas, "SFMono-Regular", Menlo, "Courier New", monospace;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.12em;
    line-height: 1;
    color: #ff3b30;
    background: #140000;
    border: 1px solid #3a0a0a;
    border-radius: 0.3rem;
    padding: 0.28rem 0.6rem;
    cursor: pointer;
    text-shadow: 0 0 4px rgba(255, 59, 48, 0.85), 0 0 9px rgba(255, 59, 48, 0.55);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
}

.mc-pointage-clock--paused {
    color: #f0ad4e;
    text-shadow: 0 0 4px rgba(240, 173, 78, 0.8), 0 0 9px rgba(240, 173, 78, 0.5);
}

/* ============================================================================
   Per-user dashboard (/dashboard) — summary widget grid + full-screen overlay +
   config modal. Kept here (global, loaded on every host) rather than in scoped
   .razor.css so the widget cards, overlay and modal share one dash-* set and the
   ChildContent summaries style cleanly across component boundaries.
   ============================================================================ */
.dash-page { padding: 0.5rem 0 2rem; }

.dash-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.dash-title { font-size: 1.4rem; font-weight: 700; margin: 0; color: #111827; }

.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.dash-empty-page {
    display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem;
    color: #6b7280; padding: 2rem 0;
}

/* --- card --- */
.dash-card {
    display: flex; flex-direction: column; gap: 0.6rem;
    text-align: left; width: 100%;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 0.6rem;
    padding: 1rem; min-height: 8.5rem;
    cursor: pointer; transition: box-shadow .15s, border-color .15s, transform .06s;
}
.dash-card:hover { border-color: #c7cbd1; box-shadow: 0 4px 14px rgba(0, 0, 0, .08); }
.dash-card:active { transform: translateY(1px); }

.dash-card-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.dash-card-title { font-weight: 600; font-size: .95rem; color: #111827; }
.dash-card-open { width: 1rem; height: 1rem; color: #9ca3af; flex: 0 0 auto; }
.dash-card-open svg { width: 100%; height: 100%; display: block; }
.dash-card-body { flex: 1 1 auto; display: flex; }
.dash-card-state { color: #9ca3af; font-size: .9rem; align-self: center; }
.dash-card-error { color: #b91c1c; }

/* --- metrics / lists inside a card --- */
.dash-metric { display: flex; flex-direction: column; gap: .15rem; align-self: center; }
.dash-metric-value { font-size: 2rem; font-weight: 700; line-height: 1.1; color: #111827; font-variant-numeric: tabular-nums; }
.dash-metric-sub { font-size: .8rem; color: #6b7280; }
.dash-duo { display: flex; gap: 1.5rem; align-self: center; }
.dash-duo-item { display: flex; flex-direction: column; gap: .1rem; }
.dash-duo .dash-metric-value { font-size: 1.4rem; }

.dash-red { color: #dc2626; }
.dash-amber { color: #d97706; }
.dash-green { color: #15803d; }
.dash-blue { color: #1d4ed8; }
.dash-orange { color: #ea580c; }

.dash-empty { color: #9ca3af; font-size: .9rem; align-self: center; }

.dash-list { list-style: none; margin: 0; padding: 0; width: 100%; align-self: stretch; font-size: .85rem; }
.dash-list-row { display: flex; align-items: baseline; gap: .5rem; padding: .18rem 0; border-bottom: 1px solid #f3f4f6; }
.dash-list-row:last-child { border-bottom: 0; }
.dash-list-main { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #111827; }
.dash-list-sub { color: #9ca3af; flex: 0 0 auto; }
.dash-list-amt { color: #374151; font-variant-numeric: tabular-nums; flex: 0 0 auto; font-weight: 600; }

/* --- full-screen overlay --- */
.dash-overlay {
    position: fixed; inset: 0; z-index: 1080;
    background: rgba(17, 24, 39, .55);
    display: flex; padding: 1.5rem;
}
.dash-overlay-panel {
    background: #fff; border-radius: .6rem; overflow: hidden;
    display: flex; flex-direction: column;
    width: 100%; max-width: 1200px; margin: auto; max-height: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.dash-overlay-head {
    display: flex; align-items: center; gap: .75rem;
    padding: .6rem .9rem; border-bottom: 1px solid #e5e7eb; flex: 0 0 auto;
}
.dash-overlay-back {
    display: inline-flex; align-items: center; gap: .3rem;
    background: transparent; border: 1px solid #d1d5db; border-radius: .4rem;
    padding: .3rem .6rem; cursor: pointer; color: #374151; font-size: .85rem;
}
.dash-overlay-back:hover { background: #f3f4f6; }
.dash-overlay-back svg { width: 1rem; height: 1rem; }
.dash-overlay-title { font-size: 1rem; font-weight: 600; margin: 0; color: #111827; }
.dash-overlay-body { flex: 1 1 auto; overflow: auto; padding: 1rem; }

/* --- config modal --- */
.dash-config-list { list-style: none; margin: 0; padding: 0; }
.dash-config-row {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .45rem 0; border-bottom: 1px solid #f3f4f6;
}
.dash-config-row:last-child { border-bottom: 0; }
.dash-config-toggle { display: flex; align-items: center; gap: .55rem; margin: 0; cursor: pointer; }
.dash-config-move { display: inline-flex; gap: .3rem; flex: 0 0 auto; }
