html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.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;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    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: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5I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I2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            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");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* ---------------------------------------------------------------------------
   Tantius Desk — technician shell.

   Mobile first: BYOD phones are a first-class client (FR-13.1), so the base
   rules are the 360 px ones and the wider layout is the override. Severity
   colour is semantic and deliberately not the brand accent — it encodes state,
   and an S1 must be findable in a list without reading it.
   --------------------------------------------------------------------------- */

:root {
    --ink: #12151a;
    --ink-soft: #454d59;
    --ink-faint: #6d7684;
    --rule: #d8dce3;
    --rule-soft: #e6e9ef;
    --surface: #fff;
    --surface-sunken: #f2f4f7;
    --accent: #1b4f9c;

    --s1: #b3261e; --s1-bg: #fbe9e7;
    --s2: #a9631b; --s2-bg: #fbf0e2;
    --s3: #1b4f9c; --s3-bg: #e8eefa;
    --s4: #5a6472; --s4-bg: #eceef2;

    --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

h1 { font-size: 1.375rem; line-height: 1.25; margin: 0 0 .75rem; }
h2 { font-size: 1rem; margin: 1.25rem 0 .5rem; color: var(--ink-soft); }

.muted { color: var(--ink-faint); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.hint { font-size: .75rem; color: var(--ink-faint); margin: .5rem 0 0; line-height: 1.4; }
.field > .hint { margin-top: .15rem; }
.req { color: var(--s1); font-weight: 600; }

/* --- chips --- */
.chip {
    display: inline-flex; align-items: center;
    padding: .1rem .45rem; border-radius: 3px;
    font-size: .6875rem; font-weight: 600;
    font-family: var(--mono); white-space: nowrap;
}
.chip.sev-s1 { background: var(--s1-bg); color: var(--s1); }
.chip.sev-s2 { background: var(--s2-bg); color: var(--s2); }
.chip.sev-s3 { background: var(--s3-bg); color: var(--s3); }
.chip.sev-s4 { background: var(--s4-bg); color: var(--s4); }
.chip.status { background: none; border: 1px solid var(--rule); color: var(--ink-soft); font-weight: 500; }
.chip.warn { background: var(--s2-bg); color: var(--s2); font-family: inherit; }

/* --- tabs --- */
.tabs { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .35rem; margin-bottom: .5rem; }
/* Actions, unlike views, wrap instead of scrolling. A clipped fifth view is a list to browse;
   a clipped third action is an option a technician may never learn exists. */
.tabs.wrap { flex-wrap: wrap; overflow-x: visible; }
.tab {
    white-space: nowrap; padding: .4rem .7rem; min-height: 44px;
    border: 1px solid var(--rule); border-radius: 999px;
    background: none; color: var(--ink-soft); font: inherit; font-size: .8125rem; cursor: pointer;
}
.tab.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* --- list --- */
.list { list-style: none; margin: 0; padding: 0; }
.row { border-bottom: 1px solid var(--rule-soft); }
.row-link {
    display: flex; flex-direction: column; gap: .3rem;
    padding: .7rem 0; min-height: 44px;
    text-decoration: none; color: inherit;
}
.row-link:hover, .row-link:focus-visible { background: var(--surface-sunken); }
.row-top { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.ticket-no { font-family: var(--mono); font-weight: 600; font-size: .8125rem; color: var(--ink-faint); }
.row-subject { font-size: .875rem; font-weight: 500; line-height: 1.35; }
.row-meta { display: flex; gap: .6rem; font-size: .6875rem; color: var(--ink-faint); font-family: var(--mono); }

/* --- severity block: never collapses (ADR-015) --- */
.severity-block {
    border: 1px solid var(--rule); border-left: 3px solid var(--s3);
    border-radius: 4px; padding: .6rem .7rem; margin: .75rem 0;
    display: flex; flex-direction: column; gap: .4rem;
}
.severity-block.unconfirmed { border-left-color: var(--s2); }
.severity-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.severity-row .lbl { font-size: .6875rem; color: var(--ink-faint); }
.reason {
    font-size: .6875rem; color: var(--ink-soft); font-style: italic;
    border-top: 1px dashed var(--rule); padding-top: .4rem; margin: 0;
}

/* --- facts --- */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .3rem .75rem; font-size: .8125rem; margin: .75rem 0; }
.kv dt { color: var(--ink-faint); }
.kv dd { margin: 0; color: var(--ink-soft); overflow-wrap: anywhere; }

.reported p { font-size: .875rem; border-left: 2px solid var(--rule); padding-left: .65rem; margin: 0; }

/* --- forms: 44 px targets, single column at phone width --- */
.field {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    margin-bottom: .6rem;

    /* A grid item's default min-width is auto, which is its content's intrinsic width. An
       <input> reports one (the browser's default size attribute), so a narrow track cannot
       shrink it and it overflows into the neighbouring column -- which is what put Minutos
       underneath "Cambiar estado a". Explicit zero lets the track govern. */
    min-width: 0;
}
.field > * { min-width: 0; max-width: 100%; }
.field label { font-size: .6875rem; color: var(--ink-faint); font-weight: 500; }
.field input, .field select, .field textarea {
    min-height: 44px; padding: .5rem .6rem;
    border: 1px solid var(--rule); border-radius: 5px;
    background: var(--surface); color: var(--ink);
    font: inherit; font-size: .875rem; width: 100%;
    /* Without this, width:100% plus padding and border is wider than the column. Selects are
       border-box by browser default and text inputs are not, which is why every select fitted
       and every text box overflowed by ~22 px at 360 px. */
    box-sizing: border-box;
}
.field textarea { min-height: 84px; resize: vertical; }
/* auto-fit rather than a fixed count: a row of two and a row of three both lay out, and at
   phone width they stack without a media query deciding when. A fixed `1fr 1fr 1fr` also left
   a two-field row occupying two thirds of the width with a gap where the third would be. */
.field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: .5rem;
    align-items: start;
}

.btn {
    min-height: 44px; padding: 0 .9rem;
    border: 1px solid var(--accent); border-radius: 5px;
    background: var(--accent); color: #fff;
    font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer;
}
.btn[disabled] { opacity: .5; cursor: default; }
.btn.row { width: 100%; }

/* A secondary action: present, and not competing with the primary one beside it.

   `quiet` was used from M3 onwards and never defined, so every one of these rendered as a
   full primary button -- including the reply-all toggle, which is the system's main
   accidental-disclosure control and the last thing that should look like the obvious thing
   to press (PR-24). Spotted in the M5 360 px screenshots, where "Editar" on every one of a
   technician's own notes outweighed "Guardar nota" (2026-09-28).

   Still 44 px tall: secondary is about visual weight, not about being harder to hit on a
   phone (FR-13.1). */
.btn.quiet {
    background: transparent;
    color: var(--accent);
    border-color: var(--rule);
    font-weight: 500;
}
.btn.quiet:hover { background: var(--surface-sunken); }

.actions { border-top: 1px solid var(--rule-soft); padding-top: .75rem; margin-top: 1rem; }

/* --- timeline --- */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.entry { border-left: 2px solid var(--rule); padding-left: .65rem; }
.entry.note { border-left-color: #7a4fb0; }
.entry.reply { border-left-color: var(--accent); }
.entry-head { display: flex; justify-content: space-between; gap: .5rem; font-size: .6875rem; }
.entry-kind { font-weight: 600; }
.entry-time { color: var(--ink-faint); }
.entry-text { font-size: .8125rem; color: var(--ink-soft); margin: .2rem 0; overflow-wrap: anywhere; }
.entry-foot { font-size: .6875rem; color: var(--ink-faint); font-family: var(--mono); margin: 0; }

[role="alert"] { color: var(--s1); font-size: .875rem; }

/* Forms stay readable rather than stretching the full width of a laptop screen: a 90 rem
   text input is harder to scan than a 30 rem one, and the eye loses the label. */
.field, .field-row, .actions, .kv, .reported { max-width: 44rem; }

@media (min-width: 768px) {
    h1 { font-size: 1.625rem; }
    .btn.row { width: auto; min-width: 12rem; }
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
}
.page-head .btn { text-decoration: none; display: inline-flex; align-items: center; }

/* Email body frame (ADR-013). The height comes from the frame itself via postMessage, so
   there is no fixed height here and no inner scrollbar — a scrolling box inside a scrolling
   page is the thing the ADR exists to avoid at 360 px. */
.email-frame {
    display: block;
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line, #d7d7dc);
    border-radius: 4px;
    background: #fff;
    /* Until the frame reports, the component's own fallback applies via the style attribute. */
    transition: height .12s ease-out;
}

.email-frame-note {
    margin: .3rem 0 0;
    font-size: .78rem;
    color: var(--muted, #55555f);
}

@media (prefers-reduced-motion: reduce) {
    .email-frame { transition: none; }
}

/* Intake (FR-7) ------------------------------------------------------------------------- */

/* Plain-text bodies: kept as sent, but wrapped, because a 360 px screen cannot scroll a
   client's paragraph sideways and remain readable. */
.email-text {
    white-space: pre-wrap;
    word-break: break-word;
    font: inherit;
    margin: 0 0 .8rem;
    padding: .6rem .7rem;
    background: var(--surface-sunken);
    border-radius: 4px;
}

h2.section {
    font-size: .8rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: 1rem 0 .4rem;
}

ul.plain { list-style: none; padding: 0; margin: 0 0 .8rem; display: grid; gap: .3rem; }
ul.plain li { display: flex; gap: .4rem; align-items: center; min-width: 0; overflow-wrap: anywhere; }

/* A checkbox with its label as one tap target: the whole line, not a 14 px square. */
label.check {
    display: flex;
    gap: .5rem;
    align-items: flex-start;
    margin: .2rem 0 .2rem;
    cursor: pointer;
}
label.check input { margin-top: .2rem; flex: none; }

/* --- Reports (FR-11.2) ---------------------------------------------------------------
   The summary is a document a client receives, so printing it must produce that document
   and not a screenshot of the application. Everything outside `.report` is marked
   `no-print`, and the report itself drops to black on white: a coloured chip costs a
   client ink and tells them nothing on paper. */

.report { margin: 1rem 0; }
.report-head h2 { margin: 0 0 .2rem; }
.report-client { font-size: 1.1rem; font-weight: 600; margin: 0 0 .2rem; }

.report-totals {
    display: grid;
    gap: .2rem;
    margin: .8rem 0;
    padding: .6rem .8rem;
    border: 1px solid var(--line);
    border-radius: 6px;
}
.report-totals p { margin: 0; display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.report-totals .lbl { color: var(--ink-soft); min-width: 14rem; }

.report-table { width: 100%; border-collapse: collapse; margin: .4rem 0 1rem; font-size: .9rem; }
.report-table th, .report-table td { text-align: left; padding: .3rem .4rem; border-bottom: 1px solid var(--line); }
.report-table th { color: var(--ink-soft); font-weight: 600; white-space: nowrap; }
.report-table td.num, .report-table th:nth-child(n+6) { text-align: right; }

.report-buttons { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }

/* At 360 px the ticket table cannot fit eight columns, so it scrolls sideways on its own
   rather than forcing the whole page to (FR-13.1). */
@media (max-width: 767px) {
    .report-table { display: block; overflow-x: auto; white-space: nowrap; }
}

@media print {
    .no-print, header.top-row, p.values, .account { display: none !important; }

    body { background: #fff; color: #000; }
    main, .page, article.content { padding: 0; margin: 0; max-width: none; }

    .report-table { font-size: 10pt; }
    .report-table th, .report-table td { border-bottom: 1px solid #999; }

    /* A table split across a page break loses its header, so rows stay whole and the header
       repeats. */
    .report-table thead { display: table-header-group; }
    .report-table tr { page-break-inside: avoid; }
}
