/* La tipografia del panel (Montserrat y Roboto, y su escala) vive en qhse-theme.css. */

h1:focus { outline: none; }

/* ---- ingreso ---- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0B4F8A;
    padding: 16px;
}

.login-card {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

.login-card h1 { margin: 0; font-size: 2.2rem; color: #0B4F8A; text-align: center; }
.login-subtitle { text-align: center; color: #555; margin: 4px 0 24px; }
.login-card label { display: block; font-weight: 600; margin: 14px 0 6px; }
.login-card input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    font-size: 1rem;
    border: 2px solid #777;
    border-radius: 8px;
}
.login-card input:focus { outline: 3px solid #0B4F8A; border-color: #0B4F8A; }
.login-card button {
    width: 100%;
    margin-top: 24px;
    padding: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    background: #0B4F8A;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}
.login-card button:hover { background: #093e6d; }
.login-alert {
    background: #fdecea;
    color: #8a1c14;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    font-weight: 600;
}
.login-link { display: block; text-align: center; margin-top: 16px; color: #0B4F8A; font-weight: 600; }

/* ---- gráfico de barras ---- */
.day-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 220px;
    overflow-x: auto;
    padding-top: 8px;
}
.day-bar { flex: 1 0 18px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 18px; }
.day-bar-fill { width: 100%; background: #0B4F8A; border-radius: 3px 3px 0 0; min-height: 0; }
.day-bar-fill.empty { background: transparent; border-bottom: 2px solid #cfd8e3; min-height: 2px; }
.day-bar-count { font-size: var(--fs-xs); color: #333; height: 14px; }
.day-bar-label { font-size: var(--fs-xs); color: #666; margin-top: 4px; white-space: nowrap; }

/* ---- errores de Blazor ---- */
#blazor-error-ui {
    background: #b32121;
    color: #fff;
    display: none;
    left: 0;
    padding: .6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 2000;
    bottom: 0;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* ---- vista previa del celular ---- */
.phone-frame { max-width: 380px; margin: 0 auto; border: 3px solid #223; border-radius: 22px; overflow: hidden; background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.phone-bar { background: #0B4F8A; color: #fff; padding: 14px 16px; font-weight: 700; }
.phone-body { padding: 14px 16px 18px; max-height: 70vh; overflow-y: auto; }
.phone-section { font-size: 1.15rem; margin: 10px 0 12px; font-weight: 700; }
.phone-field { margin-bottom: 18px; }
.phone-label { font-weight: 700; margin-bottom: 6px; }
.phone-label .req { color: #b00020; }
.phone-cond { font-size: .72rem; color: #b45f06; background: #fff4e5; border-radius: 6px; padding: 3px 8px; margin-bottom: 6px; display: inline-block; }
.phone-input { border: 2px solid #777; border-radius: 8px; padding: 12px; min-height: 22px; }
.phone-hint { color: #888; font-size: .85rem; }
.phone-row { display: flex; gap: 8px; }
.phone-btn { flex: 1; border: 2px solid #0B4F8A; color: #0B4F8A; border-radius: 24px; text-align: center; padding: 12px 8px; font-weight: 700; }
.phone-choice { border: 1.5px solid #777; border-radius: 8px; padding: 12px; margin-bottom: 6px; }
.phone-save { background: #0B4F8A; color: #fff; text-align: center; border-radius: 28px; padding: 14px; font-weight: 700; margin-top: 8px; }
.phone-table { border: 2px dashed #0B4F8A; border-radius: 10px; padding: 8px; }
.phone-table-head { font-size: .78rem; color: #555; margin-bottom: 6px; }
.table-column { border: 1px solid #d5dbe5; border-radius: 8px; background: #fafbfd; }

/* ---- respuestas de conformidad y tablas en el detalle de un envío ---- */
.compliance { display: inline-block; border-radius: 12px; padding: 2px 10px; font-weight: 700; font-size: var(--fs-sm); }
.compliance-ok { background: #e3f4e8; color: #1b6e36; }
.compliance-nc { background: #fde7e7; color: #a4161a; }
.compliance-na { background: #eceff3; color: #555; }
.answer-note { margin-top: 4px; color: var(--qhse-muted); font-size: var(--fs-sm); }
.answer-table { width: 100%; border-collapse: collapse; margin-top: 4px; font-size: var(--fs-sm); }
.answer-table th, .answer-table td { border: 1px solid #e0e5ec; padding: 5px 8px; text-align: left; vertical-align: top; }
.answer-table th { background: #f3f6fa; }
.answer-scroll { overflow-x: auto; }

/* ---- detalle de un envío ---- */
.meta { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.meta dt { color: #666; font-weight: 600; }
.meta dd { margin: 0; word-break: break-word; }
.answer { padding: 8px 0; border-bottom: 1px solid #e6eaf0; }
.answer:last-child { border-bottom: 0; }
.answer-label { color: var(--qhse-muted); font-size: var(--fs-sm); font-weight: 600; }
.answer-value { font-size: var(--fs-base); margin-top: 2px; word-break: break-word; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumbs img { width: 150px; height: 150px; object-fit: cover; border-radius: 8px; border: 1px solid #ccd; }
.signature { max-width: 320px; max-height: 140px; border: 1px solid #ccd; border-radius: 6px; background: #fff; }
.signature-card { width: 240px; }
.signature-card .signature { max-width: 100%; display: block; margin-bottom: 6px; }

/* ---- IPERC ---- */
.heat-wrap { overflow-x: auto; }
.heat { border-collapse: separate; border-spacing: 3px; }
.heat td { width: 44px; height: 34px; text-align: center; font-weight: 700; border-radius: 4px; }
.heat th { font-size: var(--fs-xs); font-weight: 400; color: #555; padding: 0 4px; white-space: nowrap; }
.level-chip { display: inline-block; padding: 2px 10px; border-radius: 12px; font-weight: 700; font-size: var(--fs-sm); color: #1b1b1b; }

/* ---- horas-hombre ---- */
.hours-grid { border-collapse: separate; border-spacing: 4px 2px; min-width: 1500px; }
.hours-grid th { font-size: var(--fs-sm); color: #555; text-align: left; font-weight: 600; white-space: nowrap; padding: 2px 4px; }
.hours-grid thead th { text-align: center; }
.hours-grid td { min-width: 104px; }
.hours-grid .mud-input-control { min-width: 104px; }
.hours-grid .mud-input-slot { font-size: var(--fs-md); padding: 7px 8px; text-align: right; }
.hours-total { font-weight: 700; text-align: right; font-size: var(--fs-sm); padding: 0 6px; }

/* ---- investigación y causa raíz ---- */
.signature-sm { max-width: 140px; max-height: 60px; display: block; }
.cause { border-left: 4px solid #1b2b47; background: #f6f8fc; border-radius: 6px; padding: 8px 12px; margin-bottom: 6px; }
.cause-basic { border-left-color: #e8a317; }
.cause-root { border-left-color: #e5694f; background: #fdf3f0; }
.cause-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cause-text { font-size: var(--fs-base); font-weight: 500; flex: 1 1 260px; }
.cause-actions { margin-top: 2px; }
.action-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ishikawa { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ishikawa-bone { border: 1px solid #e6eaf0; border-radius: 8px; padding: 10px 12px; }
.ishikawa-item { margin-top: 6px; font-size: var(--fs-sm); }
.muted { color: var(--qhse-muted); }

/* ---- tablero de decisiones ---- */
.attention { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; border: 1px solid #e6eaf0; border-left-width: 5px; background: #fff; margin-bottom: 10px; text-decoration: none; color: inherit; }
.attention:hover { background: #f6f8fc; }
.attention-high { border-left-color: #e5694f; }
.attention-medium { border-left-color: #e8a317; }
.attention-low { border-left-color: #1b2b47; }
.attention-count { font-size: var(--fs-xl, 1.5rem); font-weight: 700; min-width: 2.2rem; text-align: center; }
.attention-title { font-weight: 700; }
.pareto-row { display: grid; grid-template-columns: 130px 1fr 90px; gap: 10px; align-items: center; margin: 6px 0; font-size: var(--fs-sm); }
.pareto-bar { height: 16px; background: #eef2f7; border-radius: 8px; overflow: hidden; }
.pareto-fill { height: 100%; background: #1b2b47; border-radius: 8px; }
.pareto-fill-root { background: #e5694f; }
