/* ADR-101 §9: the Migaro console. The shell, the sign-in frame, tables, dialogs, charts and forms all come from the design
   system (lawfirm.tokens.css), exactly as in Mahkam's BackOffice; this file only adds what the console alone needs. */

/* Chrome: the console's label beside the logo. */
.mc-chrome-tag {
    padding: .2rem .6rem;
    border: 1px solid rgb(255 255 255 / .28);
    border-radius: 999px;
    color: rgb(255 255 255 / .86);
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}
.lf-account__actions form { display: contents; }
@media (max-width: 40rem) { .mc-chrome-tag { display: none; } }

/* Pages: the same rhythm as the BackOffice's workspace pages. */
.mc-page { display: flex; flex-direction: column; gap: 1.25rem; padding-block: clamp(1.25rem, 3vw, 2.5rem) clamp(2.5rem, 6vw, 5rem); }
.mc-tab-panel { display: flex; flex-direction: column; gap: 1.25rem; }
.mc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1.25rem; align-items: start; }
.mc-grid--wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 28rem), 1fr)); }

/* A firm's page: the way back to the register, and the firm's id beside its badges. */
.mc-breadcrumb { display: flex; align-items: center; gap: .35rem; margin-block-end: -.5rem; color: var(--lf-muted); font-size: .8125rem; }
.mc-breadcrumb a { color: var(--lf-muted); text-decoration: none; }
.mc-breadcrumb a:hover, .mc-breadcrumb a:focus-visible { color: var(--lf-ink); text-decoration: underline; }
.mc-breadcrumb [aria-current] { color: var(--lf-ink); font-weight: 600; }
.mc-meta-code { color: var(--lf-muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .8125rem; }

/* Table cells: a title with a muted line under it, figures that keep their order in Arabic, rows that open something. */
.mc-cell-title { display: block; color: var(--lf-ink); font-weight: 600; }
.mc-sub { display: block; margin-block-start: .15rem; color: var(--lf-muted); font-size: .75rem; }
.mc-badges { display: inline-flex; flex-wrap: wrap; gap: .35rem; }
.mc-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mc-end { text-align: end; }
.mc-person { display: inline-flex; align-items: center; gap: .6rem; }
.mc-row-link { cursor: pointer; }
.mc-row-link:focus-visible { outline: 2px solid var(--lf-focus, var(--lf-ink)); outline-offset: -2px; }
.mc-row-muted td { color: var(--lf-muted); }
.mc-row-actions { width: 1%; white-space: nowrap; text-align: end; }
.mc-table td { vertical-align: middle; }

/* Facts about a record: label, then value. */
.mc-facts { display: grid; grid-template-columns: max-content 1fr; gap: .6rem 1.5rem; margin: 0; }
.mc-facts dt { color: var(--lf-muted); font-size: .875rem; }
.mc-facts dd { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 0; font-size: .875rem; font-weight: 600; color: var(--lf-ink); overflow-wrap: anywhere; }
.mc-facts dd.mc-mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 400; }

/* Dialog forms: a small heading between groups of fields, a radio choice, and an action set apart. */
.mc-form-section { margin: .5rem 0 0; }
fieldset.mc-choice { display: grid; gap: .5rem; margin: 0; padding: 1rem 1.25rem; border: 1px solid var(--lf-rule); border-radius: var(--lf-radius-md); }
fieldset.mc-choice legend { padding-inline: .35rem; font-weight: 600; }
fieldset.mc-choice label { display: flex; gap: .6rem; align-items: center; font-weight: 400; }
.mc-danger-zone { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border: 1px solid var(--lf-rule); border-radius: var(--lf-radius-md); }
.mc-danger-zone p { margin: .25rem 0 0; color: var(--lf-muted); font-size: .8125rem; }

/* A value shown once (a temporary password): high contrast, selectable in one click, with a copy button. */
.mc-once { display: grid; gap: .5rem; margin-block-end: 1rem; padding: 1rem 1.25rem; border: 1px solid var(--lf-ink); border-radius: var(--lf-radius-md); background: var(--lf-surface); }
.mc-once__label { color: var(--lf-muted); font-size: .75rem; font-weight: 600; }
.mc-once__value { display: flex; gap: .75rem; align-items: center; justify-content: space-between; }
.mc-once code { font-size: 1.125rem; font-weight: 600; letter-spacing: .04em; user-select: all; overflow-wrap: anywhere; }

/* Sign-in: the heading inside the card, the authenticator key, and the code field. */
.mc-auth-heading { display: grid; gap: .35rem; margin-block-end: 1.25rem; }
.mc-auth-heading h2 { margin: 0; font-size: 1.375rem; font-weight: 700; color: var(--lf-ink); }
.mc-auth-heading p { margin: 0; color: var(--lf-muted); font-size: .875rem; line-height: 1.6; }
.mc-key { display: grid; gap: .35rem; margin-block-end: 1rem; padding: .85rem 1rem; border-radius: var(--lf-radius-sm); background: var(--lf-field); }
.mc-key__label { color: var(--lf-muted); font-size: .75rem; font-weight: 600; }
.mc-key code { font-size: 1rem; font-weight: 600; letter-spacing: .08em; word-break: break-all; user-select: all; }
.mc-code { letter-spacing: .4em; font-variant-numeric: tabular-nums; }
.lf-auth-form .lf-button--link { justify-self: center; }
.lf-auth-card__toolbar .locale-switch__trigger { text-decoration: none; }

/* ADR-103: permissions to tick, grouped, in the role and account dialogs. */
.mc-permissions { display: grid; gap: .5rem; margin: 0; padding: 0; border: 0; }
.mc-permissions legend { margin-block-end: .4rem; padding: 0; color: var(--lf-ink); font-size: .8125rem; font-weight: 700; }
.mc-form-block { display: grid; gap: .75rem; }
.mc-form-note { margin: 0; font-size: .8125rem; }
.mc-permission-summary { color: var(--lf-muted); font-size: .8125rem; }

/* Blazor's error bar: hidden until Blazor shows it, styled as in Mahkam (BackOffice MainLayout.razor.css). Without these rules
   the bar stayed visible on every console page. */
#blazor-error-ui {
    background: var(--lf-danger-surface);
    border-top: 1px solid var(--lf-danger);
    bottom: 0;
    box-sizing: border-box;
    color: var(--lf-ink);
    display: none;
    inset-inline-start: 0;
    padding-block: .75rem;
    padding-inline: 1.25rem 3rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; inset-inline-end: .75rem; top: .5rem; }

/* ADR-105: the support register and a ticket's conversation. */
.mc-dot { display: inline-block; width: .5rem; height: .5rem; margin-inline-end: .4rem; border-radius: 50%; background: var(--lf-danger); vertical-align: middle; }
.mc-ticket { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem); gap: 1.25rem; align-items: start; }
@media (max-width: 64rem) { .mc-ticket { grid-template-columns: 1fr; } }
.mc-ticket__main { display: grid; gap: 1.25rem; min-width: 0; }
.mc-ticket__side { display: grid; gap: 1.25rem; }
.mc-thread { display: grid; gap: .9rem; margin: 0; padding: 0; list-style: none; }
.mc-thread__item { display: grid; gap: .5rem; max-width: 46rem; padding: 1rem 1.15rem; border: 1px solid var(--lf-rule); border-radius: var(--lf-radius-md); background: var(--lf-surface); }
.mc-thread__item--support { margin-inline-start: auto; border-color: color-mix(in srgb, var(--lf-cedar, var(--lf-ink)) 30%, var(--lf-rule)); background: color-mix(in srgb, var(--lf-cedar, var(--lf-ink)) 5%, var(--lf-surface)); }
.mc-thread__item--note { margin-inline-start: auto; border-style: dashed; background: color-mix(in srgb, var(--lf-warning, #b26b00) 8%, var(--lf-surface)); }
.mc-thread__item header { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; align-items: baseline; }
.mc-thread__item header strong { display: inline-flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.mc-thread__body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.mc-thread__picture img { display: block; max-width: 100%; max-height: 28rem; border: 1px solid var(--lf-rule); border-radius: var(--lf-radius-sm); }
.mc-actions-end { display: flex; justify-content: flex-end; }
.mc-device { font-size: .75rem; font-weight: 400; }
