:root {
    --bg-0: #05080f;
    --bg-1: #0a101a;
    --bg-2: #101a2a;
    --surface: #121a28;
    --surface-soft: #182235;
    --line: #2b3a55;
    --line-strong: #3d4f73;
    --text-main: #edf2ff;
    --text-soft: #9eacc8;
    --accent-red: #df2f48;
    --accent-cyan: #45c9ff;
    --ok: #35dc81;
    --warn: #f2c14e;
    --danger: #ff4d61;
    --scrollbar-thumb: var(--accent-red);
    --scrollbar-track: rgba(39, 52, 76, 0.45);
    --scrollbar-glow: rgba(223, 47, 72, 0.55);
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
}

* {
    box-sizing: border-box;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    scrollbar-width: thin;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 999px;
    box-shadow: 0 0 10px var(--scrollbar-glow);
}

html,
body {
    width: 100vw;
    max-width: 100%;
    height: 100%;
    margin: 0;
    font-family: "Rajdhani", "Segoe UI", sans-serif;
    color: var(--text-main);
    background: radial-gradient(circle at 15% -10%, #15243d 0%, transparent 40%),
        radial-gradient(circle at 85% 110%, #1d1432 0%, transparent 35%),
        linear-gradient(160deg, var(--bg-0), var(--bg-1) 45%, var(--bg-2));
}

html.preload-theme-light,
html.preload-theme-light body {
    color: #172033;
    background: #eef3f9;
}

html.preload-theme-dark,
html.preload-theme-dark body {
    color: var(--text-main);
    background: radial-gradient(circle at 15% -10%, #15243d 0%, transparent 40%),
        radial-gradient(circle at 85% 110%, #1d1432 0%, transparent 35%),
        linear-gradient(160deg, var(--bg-0), var(--bg-1) 45%, var(--bg-2));
}

body {
    min-height: 100vh;
    overflow-x: hidden;
}

#app,
.main-shell,
.app-theme {
    min-height: 100vh;
    width: 100vw;
    max-width: 100%;
}

html.preload-theme-light #app:has(> .loading-progress) {
    color: var(--text-main);
    background: radial-gradient(circle at 15% -10%, #15243d 0%, transparent 40%),
        radial-gradient(circle at 85% 110%, #1d1432 0%, transparent 35%),
        linear-gradient(160deg, var(--bg-0), var(--bg-1) 45%, var(--bg-2));
}

h1:focus {
    outline: none;
}

.scene-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(circle at 80% 20%, rgba(223, 47, 72, 0.14) 0%, transparent 36%),
        radial-gradient(circle at 12% 80%, rgba(69, 201, 255, 0.08) 0%, transparent 34%);
}

.app-topbar {
    display: flex;
    align-items: center;
    min-height: 64px;
    gap: 0.6rem;
    padding-top: var(--safe-area-top);
    padding-right: var(--safe-area-right);
    padding-left: var(--safe-area-left);
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(180deg, #0a101b, #090f19);
    border-bottom: 1px solid #27344c;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.38);
}

.app-content {
    padding-right: var(--safe-area-right);
    padding-bottom: var(--safe-area-bottom);
    padding-left: var(--safe-area-left);
}

.top-left {
    display: flex;
    align-items: center;
    height: 64px;
}

.brand-zone {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    height: 100%;
    padding: 0 1rem;
    border-right: 1px solid #233046;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.brand-logo {
    width: 34px;
    height: 34px;
    display: inline-block;
    flex: 0 0 34px;
    background: url("../images/Logo_darck.png") center / contain no-repeat;
    filter: drop-shadow(0 0 12px rgba(223, 47, 72, 0.32));
}

.menu-toggle {
    width: 52px;
    height: 64px;
    border: none;
    border-right: 1px solid #233046;
    background: transparent;
    position: relative;
}

.menu-toggle::before,
.menu-toggle::after {
    content: "";
    position: absolute;
    left: 18px;
    width: 16px;
    border-top: 2px solid #d9e2f3;
}

.menu-toggle::before {
    top: 24px;
}

.menu-toggle::after {
    top: 34px;
}

.menu-items {
    display: flex;
    align-items: center;
    height: 64px;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    scrollbar-width: thin;
}

.menu-items::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.menu-items::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 999px;
}

.menu-items::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 999px;
    box-shadow: 0 0 10px var(--scrollbar-glow);
}

.menu-items a {
    display: inline-flex;
    align-items: center;
    height: 100%;
    padding: 0 1.05rem;
    color: var(--text-soft);
    text-decoration: none;
    border-right: 1px solid #1e2a3f;
}

.menu-items a.active {
    color: var(--text-main);
    border-bottom: 3px solid var(--accent-red);
}

.toolbar {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0 0.75rem;
}

.date-picker,
.ghost-button,
.clock-chip,
.theme-toggle {
    border: 1px solid #31415f;
    background: #141c2c;
    color: #e7eeff;
    border-radius: 8px;
    padding: 0.4rem 0.65rem;
    font-family: inherit;
    font-size: 0.96rem;
}

.ghost-button {
    cursor: pointer;
}

.ghost-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.report-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.65rem;
}

.user-menu-host {
    position: relative;
    flex: 0 0 auto;
}

.user-menu-trigger {
    position: relative;
    z-index: 1004;
    min-height: 44px;
    max-width: 220px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.55rem;
    padding: 0.25rem 0.45rem;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: #e7eeff;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.user-menu-trigger:hover,
.user-menu-trigger:focus-visible,
.user-menu-trigger.is-open {
    border-color: #31415f;
    background: #101a2a;
    outline: none;
}

.user-avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    background: linear-gradient(145deg, #ff536b, #c51f3b 54%, #651022);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.32);
}

.user-avatar-photo {
    display: block;
    padding: 0;
    object-fit: cover;
    object-position: center;
}

.user-avatar-large {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    font-size: 0.85rem;
}

.user-trigger-copy,
.user-menu-profile > span:last-child {
    min-width: 0;
    display: grid;
}

.user-trigger-copy strong,
.user-trigger-copy small,
.user-menu-profile strong,
.user-menu-profile small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-trigger-copy strong {
    font-size: 0.76rem;
    line-height: 1.15;
}

.user-trigger-copy small {
    color: #9aa8c1;
    font-size: 0.58rem;
    line-height: 1.2;
}

.user-menu-chevron {
    color: #aebbd0;
    transition: transform 160ms ease;
}

.user-menu-trigger.is-open .user-menu-chevron {
    transform: rotate(180deg);
}

.user-menu-dismiss {
    position: fixed;
    inset: 0;
    z-index: 1002;
    border: 0;
    background: transparent;
}

.user-menu-panel {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    z-index: 1003;
    width: min(270px, calc(100vw - 1rem));
    padding: 0.7rem;
    border: 1px solid #263854;
    border-radius: 10px;
    background: linear-gradient(155deg, #111c2d, #0b1422);
    color: #e7eeff;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.48);
}

.user-menu-profile {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.7rem;
    padding: 0.15rem 0.15rem 0.8rem;
    border-bottom: 1px solid #24334b;
}

.user-menu-profile strong {
    font-size: 0.86rem;
}

.user-menu-profile small {
    color: #9aa8c1;
    font-size: 0.68rem;
}

.user-menu-options {
    display: grid;
    gap: 0.08rem;
    padding: 0.55rem 0;
}

.user-menu-item {
    width: 100%;
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.4rem 0.55rem;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #c4cee0;
    font: inherit;
    font-size: 0.78rem;
    text-align: left;
    cursor: pointer;
}

.user-menu-item i {
    width: 1rem;
    color: #9aa8c1;
    font-size: 1rem;
    text-align: center;
}

.user-menu-item:hover,
.user-menu-item:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    outline: none;
}

.user-menu-item.is-unavailable {
    cursor: default;
    opacity: 0.72;
}

.user-menu-theme-row > span:not(.theme-toggle) {
    flex: 1 1 auto;
}

.user-menu-theme-toggle {
    margin-left: auto;
    transform: scale(0.72);
    transform-origin: right center;
    pointer-events: none;
}

.user-grid-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.user-grid-actions .icon-action {
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    font-size: 1rem;
}

.user-menu-logout {
    padding-top: 0.65rem;
    border-top: 1px solid #24334b;
    border-radius: 0;
    color: #ff4f64;
}

.user-menu-logout i {
    color: currentColor;
}

.report-card-detail {
    max-width: 100%;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.report-download-error {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0 0 1rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid color-mix(in srgb, var(--danger) 55%, var(--line));
    border-radius: 10px;
    background: color-mix(in srgb, var(--danger) 12%, var(--panel));
    color: var(--text-main);
}

.report-download-error i {
    flex: 0 0 auto;
    color: var(--danger);
    font-size: 1.15rem;
}

.report-download-error span {
    min-width: 0;
    flex: 1;
    overflow-wrap: anywhere;
}

.report-download-error button {
    border: 0;
    background: transparent;
    color: var(--text-soft);
    cursor: pointer;
    font: inherit;
}

.report-download-button {
    text-decoration: none;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0;
    cursor: pointer;
    width: 4.25rem;
    min-width: 4.25rem;
    height: 2.05rem;
    justify-content: space-between;
    border-radius: 999px;
    padding: 0.2rem 0.24rem;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.theme-option {
    position: relative;
    width: 1.56rem;
    height: 1.56rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(231, 238, 255, 0.38);
    transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.theme-option i {
    display: inline-flex;
    line-height: 1;
}

.fs-22 {
    font-size: 1.18rem;
}

.theme-dark .theme-toggle {
    border-color: #20314e;
    background: #0a0d13;
    box-shadow: inset 0 0 0 1px rgba(73, 113, 179, 0.28);
}

.theme-dark .moon-icon {
    background: #252525;
    color: #ffffff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.42);
}

.theme-dark .sun-icon {
    color: rgba(240, 240, 240, 0.18);
}

.menu-actions {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.75rem;
}

.menu-action {
    min-height: 38px;
    border: 1px solid #31415f;
    border-radius: 8px;
    background: #141c2c;
    color: #e7eeff;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.65rem;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

.menu-action-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.menu-theme-action {
    justify-content: space-between;
}

.menu-theme-pill {
    width: 3.55rem;
    height: 1.45rem;
    border-radius: 999px;
    background: #0f1726;
    border: 1px solid #2d3d59;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.2rem;
    box-shadow: 0 0 0 1px rgba(121, 144, 185, 0.18) inset;
}

.menu-theme-pill .theme-option {
    width: 1.05rem;
    height: 1.05rem;
    font-size: 0.8rem;
}

.menu-logout-action {
    color: #ff5870;
}

.dashboard-page,
.login-page {
    width: 100%;
    max-width: none;
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.dashboard-page {
    padding: 0 0.35rem;
}

.board-shell,
.login-card {
    background: linear-gradient(145deg, rgba(19, 29, 44, 0.93), rgba(12, 20, 32, 0.96));
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
    animation: rise 360ms ease-out both;
}

.kpi-grid,
.widget-grid,
.board-footer {
    padding: 0.8rem;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(155px, 1fr));
    gap: 0.7rem;
}

.kpi-card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(20, 31, 48, 0.95), rgba(14, 23, 37, 0.95));
    padding: 0.9rem;
    overflow: hidden;
}

.kpi-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 14px;
    border: 1px solid rgba(69, 201, 255, 0.16);
    pointer-events: none;
}

.kpi-card::after {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    right: -60px;
    top: -70px;
    background: radial-gradient(circle, rgba(69, 201, 255, 0.18), transparent 62%);
    pointer-events: none;
}

.kpi-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-soft);
    text-transform: uppercase;
}

.kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid currentColor;
    position: relative;
}

.kpi-icon.bell {
    border: none;
    border-radius: 12px;
}

.kpi-icon.bell::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 6px;
    width: 20px;
    height: 21px;
    border: 3px solid currentColor;
    border-radius: 10px 10px 7px 7px;
}

.kpi-icon.bell::after {
    content: "";
    position: absolute;
    left: 15px;
    bottom: 2px;
    width: 8px;
    height: 4px;
    background: currentColor;
    border-radius: 4px;
}

.kpi-icon.clock::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 7px;
    width: 2px;
    height: 12px;
    background: currentColor;
}

.kpi-icon.clock::after {
    content: "";
    position: absolute;
    left: 18px;
    top: 19px;
    width: 10px;
    height: 2px;
    background: currentColor;
}

.kpi-icon.meter::before,
.kpi-icon.pulse::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 18px;
    width: 20px;
    border-top: 2px solid currentColor;
}

.kpi-icon.ring::before {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 2px solid color-mix(in srgb, currentColor 65%, transparent);
}

.kpi-icon.ok,
.trend.ok,
.dot.ok {
    color: var(--ok);
}

.kpi-icon.danger,
.trend.danger,
.dot.danger {
    color: var(--danger);
}

.kpi-icon.neutral,
.trend.neutral,
.dot.warn {
    color: var(--warn);
}

.kpi-card h3 {
    margin: 0.35rem 0 0;
    font-size: 2.1rem;
    line-height: 1;
}

.kpi-card h3 span {
    font-size: 1rem;
    color: var(--text-soft);
}

.kpi-card .trend {
    margin: 0.2rem 0 0;
    font-size: 1rem;
}

.widget-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.35fr;
    gap: 0.7rem;
}

.widget-grid.two {
    grid-template-columns: 1fr 1.2fr;
}

.widget {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(19, 28, 43, 0.96), rgba(13, 22, 34, 0.95));
    padding: 0.85rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.widget h4 {
    margin: 0 0 0.6rem;
    font-size: 1.14rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.widget-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.widget-title-row h4 {
    min-width: 0;
}

.widget-period-select {
    min-width: 112px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2, #111b2d);
    color: var(--text-main);
    padding: 0.38rem 0.55rem;
    font: inherit;
    font-size: 0.78rem;
}

.widget h4 span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid #6f7d97;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #9dabbe;
}

.widget-context {
    margin: -0.25rem 0 0.75rem;
    color: var(--text-soft);
    font-size: 0.78rem;
    line-height: 1.35;
}

.h-bar-row {
    display: grid;
    grid-template-columns: 120px 1fr 72px;
    gap: 0.55rem;
    align-items: center;
    margin: 0.38rem 0;
}

.h-bar-row small {
    color: var(--text-soft);
    font-size: 0.75rem;
}

.h-bar {
    height: 14px;
    border-radius: 999px;
    border: 1px solid #24344d;
    background: #101829;
    overflow: hidden;
}

.h-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, #8f1b24, #de2f3a);
}

.h-bar .fill.alt {
    background: linear-gradient(90deg, #93304f, #ff4f68);
}

.h-bar .fill.anim {
    transform-origin: left center;
    transform: scaleX(0);
    animation: growX 900ms ease forwards;
}

.hour-labels {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    margin-bottom: 0.25rem;
    font-size: 0.84rem;
    color: var(--text-soft);
}

.heatmap-scroll { overflow-x: auto; padding: .25rem 0 .5rem; }
.heatmap-board { display: grid; grid-template-columns: minmax(110px, 180px) minmax(620px, 1fr); gap: 5px 10px; min-width: 760px; }
.heatmap-corner { color: var(--text-soft); font-size: .8rem; align-self: end; }
.heatmap-area { align-self: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heatmap-empty { grid-column: 1 / -1; color: var(--text-soft); }

.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 3px;
}

.heat {
    position: relative;
    border: 0;
    width: 100%;
    height: 27px;
    border-radius: 3px;
    opacity: 0;
    transform: scale(0.9);
    animation: heatIn 420ms ease forwards;
}

.heat.none { background: rgba(77, 96, 125, .24); }
.heat.low { background: #2ea768; }
.heat.med { background: #c8ac3d; }
.heat.high { background: #d2822e; }
.heat.crit { background: #c93a4f; }
.heat:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }
.heatmap-tooltip { position: absolute; z-index: 20; left: 50%; bottom: calc(100% + 8px); width: max-content; max-width: 310px; transform: translateX(-50%); padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: #07111f; color: var(--text-main); font-size: .75rem; line-height: 1.35; text-align: left; white-space: normal; pointer-events: none; opacity: 0; visibility: hidden; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.heat:hover .heatmap-tooltip, .heat:focus .heatmap-tooltip { opacity: 1; visibility: visible; }

.legend {
    margin-top: 0.7rem;
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}
.legend .l.none { background: rgba(77, 96, 125, .5); }

.legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-soft);
}

.l {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

.l.low { background: #2ea768; }
.l.med { background: #c8ac3d; }
.l.high { background: #d2822e; }
.l.crit { background: #c93a4f; }

.trend-line {
    width: 100%;
    height: 180px;
    border: 1px solid #2a3a55;
    border-radius: 8px;
    background: repeating-linear-gradient(180deg, #111a2a 0, #111a2a 29px, #152136 29px, #152136 30px);
}

.trend-line polyline {
    fill: none;
    stroke: #ff4863;
    stroke-width: 3;
}

.trend-line .trend-path {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawTrend 1.2s ease forwards;
}

.trend-line circle {
    fill: #ff4863;
    opacity: 0;
    transform-origin: center;
    transform: scale(0.4);
    animation: dotIn 320ms ease forwards;
}

.trend-values,
.month-labels {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    margin-top: 0.35rem;
}

.trend-values {
    color: #f1f5ff;
}

.month-labels {
    color: var(--text-soft);
}

.status-table {
    width: 100%;
    border-collapse: collapse;
}

.status-table th,
.status-table td {
    border-bottom: 1px solid #25334b;
    padding: 0.45rem 0.3rem;
    text-align: left;
    font-size: 0.95rem;
}

.status-table th {
    color: var(--text-soft);
    font-weight: 600;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.45rem;
}

.board-footer {
    border-top: 1px solid #27344c;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-note-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ff6a77, #961d33);
    box-shadow: 0 0 22px rgba(223, 47, 72, 0.4);
}

.board-footer p {
    margin: 0;
    flex: 1;
    color: #d9e2f3;
}

.footer-actions {
    display: flex;
    gap: 0.6rem;
}

.action {
    border: 1px solid #344764;
    background: #172236;
    color: #f3f6ff;
    border-radius: 8px;
    padding: 0.45rem 0.7rem;
    font-family: inherit;
}

.action:disabled,
.modal-danger-action:disabled,
.evidence-remove-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.events-header {
    padding: 0.95rem 0.9rem 0;
}

.events-header h2 {
    margin: 0;
}

.events-header p {
    margin: 0.2rem 0 0;
    color: var(--text-soft);
}

.event-row {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 0.4rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid #27344c;
}

.event-row span {
    color: var(--text-soft);
}

.events-table-wrap {
    margin: 0.6rem 0.75rem 0.75rem;
}

.events-table td,
.events-table th {
    font-size: 0.92rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.12rem 0.5rem;
    font-weight: 700;
    font-size: 0.78rem;
}

.pill.med {
    background: rgba(212, 178, 66, 0.2);
    color: #f3cd56;
}

.pill.high {
    background: rgba(224, 110, 40, 0.24);
    color: #ffa451;
}

.pill.crit {
    background: rgba(219, 58, 68, 0.24);
    color: #ff6f77;
}

.placeholder-page {
    padding: 1.2rem;
}

.placeholder-page p {
    color: var(--text-soft);
}

.app-alert {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    margin: 0.75rem 0;
    color: var(--text-main);
    background: rgba(18, 26, 40, 0.92);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
    animation: alert-in 160ms ease-out;
}

.app-alert i {
    font-size: 1.15rem;
    line-height: 1;
}

.app-alert span {
    font-weight: 700;
}

.app-alert-primary {
    border-color: rgba(69, 201, 255, 0.48);
    background: #0c263a;
    color: #fff;
}

.app-alert-primary i {
    color: var(--accent-cyan);
}

.app-alert-success {
    border-color: rgba(53, 220, 129, 0.48);
    background: #083422;
    color: #fff;
}

.app-alert-success i {
    color: #22c55e;
}

.app-alert-danger {
    border-color: rgba(255, 77, 97, 0.5);
    background: #48111d;
    color: #fff;
}

.app-alert-danger i {
    color: #ff6b7a;
}

.app-alert-warning {
    border-color: rgba(242, 193, 78, 0.5);
    background: #423310;
    color: #fff;
}

.app-alert-warning i {
    color: #f2c14e;
}

@keyframes alert-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-page {
    --login-accent: #da3832;
    --login-accent-dark: #bd111b;
    --login-accent-soft: rgba(218, 56, 50, 0.42);
    position: relative;
    grid-template-columns: minmax(420px, 43vw) 1fr;
    align-items: stretch;
    gap: 0;
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    min-height: 680px;
    margin: 0;
    overflow: hidden;
    background:
        linear-gradient(90deg, #010712 0%, rgba(2, 8, 17, 0.9) 29%, rgba(2, 8, 17, 0.34) 46%, rgba(2, 6, 12, 0.02) 100%),
        url("../images/Wallpaper_Andon.png");
    background-size: auto 100%;
    background-position: right center;
    background-repeat: no-repeat;
}

.login-page::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: min(52vw, 760px);
    pointer-events: none;
    background: linear-gradient(112deg, rgba(0, 6, 14, 0.82) 0%, rgba(1, 8, 18, 0.76) 66%, transparent 66.5%);
}

.login-panel {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: start;
    height: 100%;
    padding: calc(clamp(0.75rem, 2.7vh, 2rem) + var(--safe-area-top))
        calc(clamp(1.5rem, 6.8vw, 7rem) + var(--safe-area-right))
        calc(6.3rem + var(--safe-area-bottom))
        calc(clamp(1.5rem, 6.8vw, 7rem) + var(--safe-area-left));
    color: #ffffff;
}

.login-brand {
    margin-bottom: clamp(0.75rem, 2.1vh, 1.45rem);
}

.login-brand img {
    display: block;
    width: clamp(240px, 23vw, 360px);
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.5));
}

.login-copy {
    margin-bottom: clamp(0.7rem, 1.8vh, 1.1rem);
}

.login-kicker {
    display: block;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(1.35rem, 2.15vw, 2.05rem);
    letter-spacing: 0.34em;
    text-transform: uppercase;
}

.login-copy h1 {
    margin: 0.28rem 0 0;
    color: #ffffff;
    font-size: clamp(3.35rem, 5.45vw, 5.35rem);
    font-weight: 700;
    line-height: 0.92;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.login-tagline,
.login-support {
    margin: 0.65rem 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: clamp(1rem, 1.35vw, 1.35rem);
}

.login-tagline strong {
    color: var(--login-accent);
    font-weight: 700;
}

.login-line {
    display: block;
    width: 62px;
    height: 3px;
    margin-top: 0.65rem;
    background: var(--login-accent);
    box-shadow: 0 0 16px var(--login-accent-soft);
}

.login-support {
    line-height: 1.32;
}

.login-form {
    width: min(390px, 100%);
    display: grid;
    gap: 0.42rem;
}

.login-field {
    min-height: 42px;
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    border: 1px solid rgba(138, 162, 203, 0.36);
    border-radius: 8px;
    background: rgba(10, 19, 33, 0.78);
    overflow: hidden;
}

.login-field-icon,
.login-field-action {
    display: grid;
    place-items: center;
}

.login-field-icon i {
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.18rem;
    line-height: 1;
}

.login-field .text-input {
    width: 100%;
    min-width: 0;
    height: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #e6eefb;
    color: #111827;
    padding: 0.56rem 0.65rem;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

.login-field .text-input::placeholder {
    color: rgba(17, 24, 39, 0.55);
}

.login-field-action {
    width: 48px;
    height: 100%;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.login-field-action img {
    width: 25px;
    height: 25px;
    object-fit: contain;
    opacity: 0.95;
    filter: drop-shadow(0 0 8px rgba(218, 56, 50, 0.35));
}

.sign-in {
    min-height: 46px;
    margin-top: 0.4rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--login-accent-dark), #d01622);
    color: #ffffff;
    padding: 0.62rem 0.9rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 16px 32px rgba(189, 17, 27, 0.36);
}

.login-error {
    width: min(390px, 100%);
    margin: 0.7rem 0 0;
}

.login-app-version {
    margin: 0.15rem 0 0;
    color: var(--login-accent);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 0 12px rgba(218, 56, 50, 0.45);
}

.login-footer {
    position: absolute;
    left: calc(clamp(1.5rem, 5.5vw, 6.2rem) + var(--safe-area-left));
    right: calc(clamp(1.5rem, 5.5vw, 6.2rem) + var(--safe-area-right));
    bottom: var(--safe-area-bottom);
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: center;
    gap: 0;
    color: rgba(255, 255, 255, 0.84);
    padding: 0.35rem 0.85rem;
    background: linear-gradient(90deg, rgba(2, 7, 15, 0.62), rgba(20, 5, 11, 0.5), rgba(2, 7, 15, 0.7));
}

.login-footer div {
    min-width: 0;
    min-height: 64px;
    display: grid;
    grid-template-rows: 32px auto;
    place-items: center;
    gap: 0.3rem;
    padding: 0 0.55rem;
    border-right: 1px solid rgba(255, 255, 255, 0.22);
    text-align: center;
}

.login-footer div:last-child {
    border-right: 0;
}

.login-footer img {
    width: 31px;
    height: 31px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(218, 56, 50, 0.72)) drop-shadow(0 3px 8px rgba(0, 0, 0, 0.75));
}

.login-footer span {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(0.58rem, 0.72vw, 0.8rem);
    font-weight: 600;
    line-height: 1.18;
    text-transform: uppercase;
    text-shadow: 0 2px 7px rgba(0, 0, 0, 0.85);
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes growX {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

@keyframes heatIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes drawTrend {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes dotIn {
    from {
        opacity: 0;
        transform: scale(0.4);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 1280px) {
    .kpi-grid {
        grid-template-columns: repeat(3, minmax(120px, 1fr));
    }

    .widget-grid,
    .widget-grid.two {
        grid-template-columns: 1fr;
    }

    .app-topbar {
        flex-wrap: wrap;
        min-height: auto;
        padding-bottom: 0.35rem;
    }

    .menu-items,
    .menu-items a {
        height: 46px;
    }
}

@media (max-width: 760px) {
    .technician-alert-meta,
    .technician-report-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-page,
    .login-page {
        width: 100%;
    }

    .login-page {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
        grid-template-columns: 1fr;
        background-size: cover;
        background-position: center;
    }

    .login-page::before {
        width: 100%;
        background: linear-gradient(180deg, rgba(1, 7, 16, 0.96), rgba(1, 7, 16, 0.78));
    }

    .login-panel {
        height: auto;
        min-height: auto;
        padding: calc(1rem + var(--safe-area-top))
            calc(1rem + var(--safe-area-right))
            0.6rem
            calc(1rem + var(--safe-area-left));
    }

    .login-brand img {
        width: min(330px, 92vw);
    }

    .login-copy h1 {
        font-size: clamp(3rem, 20vw, 4rem);
    }

    .login-footer {
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin: 0.25rem calc(1rem + var(--safe-area-right)) calc(1rem + var(--safe-area-bottom)) calc(1rem + var(--safe-area-left));
        padding: 0.55rem 0.65rem;
    }

    .login-footer div {
        min-height: 56px;
        grid-template-rows: 28px auto;
        gap: 0.22rem;
    }

    .login-footer img {
        width: 27px;
        height: 27px;
    }

    .menu-items {
        display: none;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }

    .board-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

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

/* Andon module */
.andon-page {
    padding: 1rem;
}

.andon-panel {
    min-width: 0;
    max-width: 100%;
    padding: 1rem;
}

.andon-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.andon-header h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.andon-header p {
    margin: 0.25rem 0 0;
    color: var(--text-soft);
}

.andon-header.compact h2 {
    font-size: clamp(1.6rem, 2.5vw, 2.3rem);
}

.andon-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.andon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.andon-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.widget {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(14, 23, 37, 0.82);
    padding: 1rem;
    margin-bottom: 1rem;
}

.widget h4 {
    margin: 0 0 0.85rem;
    font-size: 1.15rem;
}

.text-input {
    width: 100%;
    border: 1px solid #31415f;
    background: #101827;
    color: var(--text-main);
    border-radius: 8px;
    padding: 0.55rem 0.7rem;
    margin: 0.35rem 0 0.75rem;
    font-family: inherit;
}

.action,
.icon-button {
    border: 1px solid #276bff;
    background: #175cff;
    color: white;
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
}

.user-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 0 0.8rem;
}

.user-form-message {
    grid-column: 1 / -1;
    margin: 0;
}

.user-password-field {
    display: grid;
    gap: 0.35rem;
}

.user-password-field span {
    color: var(--text-soft);
    font-size: 0.78rem;
    line-height: 1.25;
}

.user-modal {
    width: min(760px, 100%);
}

.user-modal header p {
    margin: 0.25rem 0 0;
    color: var(--text-soft);
}

.icon-button {
    white-space: nowrap;
}

.andon-kpis {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.andon-kpis.seven {
    grid-template-columns: repeat(7, minmax(120px, 1fr));
}

.kpi-grid.mini {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.kpi-card h3 {
    margin: 0.25rem 0;
    font-size: 2rem;
}

.kpi-card p,
.kpi-card span {
    color: var(--text-soft);
}

.ok-text { color: var(--ok) !important; }
.info-text { color: var(--accent-cyan) !important; }
.danger-text { color: var(--danger) !important; }

.danger-button {
    border-color: #dc2f4a !important;
    color: #ffffff !important;
    background: #dc2f4a !important;
}

.danger-button:hover {
    border-color: #ff4d61 !important;
    color: #ffffff !important;
    background: #ff4d61 !important;
}

.modal-danger-action {
    min-height: 42px;
    border: 1px solid #dc2f4a;
    border-radius: 8px;
    background: #dc2f4a;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.7rem;
    font-family: inherit;
    font-size: 0.96rem;
    cursor: pointer;
}

.modal-danger-action:hover {
    border-color: #ff4d61;
    background: #ff4d61;
    color: #ffffff;
}

.modal-close-button {
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0 !important;
    font-weight: 800;
    justify-content: center;
    border-radius: 8px;
    color: var(--danger);
    border-color: rgba(255, 77, 97, 0.56);
    background: rgba(255, 77, 97, 0.08);
}

.modal-close-button:hover {
    color: #ffffff;
    border-color: var(--danger);
    background: var(--danger);
}

.andon-filters {
    display: grid;
    grid-template-columns: minmax(220px,1.35fr) repeat(3,minmax(170px,1fr)) minmax(145px,.65fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.technician-alert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.technician-alert-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    overflow: hidden;
    border-left-width: 5px;
}

.technician-alert-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 42%);
}

.technician-alert-card.alert-pending-highlight {
    border-left-color: var(--danger);
    animation: alertCardPulseDanger 1.65s ease-in-out infinite;
}

.technician-alert-card.alert-way-highlight {
    border-left-color: #73a7ff;
    box-shadow: inset 0 0 0 1px rgba(45, 115, 255, 0.18), 0 0 18px rgba(45, 115, 255, 0.1);
}

.technician-alert-card.alert-site-highlight {
    border-left-color: var(--accent-cyan);
    animation: alertCardPulseInfo 1.9s ease-in-out infinite;
}

.technician-alert-card.alert-escalated-highlight {
    border-left-color: var(--warn);
    animation: alertCardPulseWarn 1.8s ease-in-out infinite;
}

.technician-alert-card.alert-pending-highlight::before,
.technician-alert-card.alert-site-highlight::before,
.technician-alert-card.alert-escalated-highlight::before {
    animation: alertCardSweep 2.4s ease-in-out infinite;
}

.technician-alert-card header,
.technician-alert-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.technician-alert-card h3 {
    margin: 6px 0 0;
    font-size: 1.35rem;
}

.technician-alert-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.technician-alert-meta span {
    display: block;
    color: var(--text-soft);
    font-size: .78rem;
}

.technician-alert-meta strong {
    display: block;
    margin-top: 4px;
}

.technician-escalation-reason {
    display: grid;
    gap: 0.25rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(242, 193, 78, 0.28);
    border-radius: 8px;
    background: rgba(242, 193, 78, 0.08);
}

.technician-escalation-reason span {
    color: var(--text-soft);
    font-size: 0.78rem;
}

.technician-escalation-reason strong {
    color: #f2c14e;
}

.technician-alert-timer strong {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--accent-red);
    font-size: 1.08rem;
}

.technician-alert-timer i {
    font-size: 1rem;
}

.technician-alert-actions {
    justify-content: flex-start;
}

.status-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    min-width: 92px;
    font-family: inherit;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
}

.status-action:disabled {
    cursor: not-allowed;
    opacity: 0.42;
    filter: saturate(0.45);
}

.status-action-way {
    border-color: rgba(45, 115, 255, 0.18);
    background: #0d326c;
    color: #73a7ff;
}

.status-action-site {
    border-color: rgba(69, 201, 255, 0.16);
    background: #0d3a52;
    color: var(--accent-cyan);
}

.status-action-resolved {
    border-color: rgba(53, 220, 129, 0.16);
    background: #0b4a34;
    color: var(--ok);
}

.status-action-escalate {
    border-color: rgba(242, 193, 78, 0.18);
    background: #3f3920;
    color: var(--warn);
}

.status-action-report {
    border-color: rgba(255, 77, 97, 0.18);
    background: #4a1622;
    color: var(--danger);
}

.technician-report-modal {
    display: flex;
    flex-direction: column;
    position: relative;
    width: min(820px, 100%);
    max-width: 860px;
    max-height: calc(100dvh - 0.75rem);
    overflow: hidden;
    background:
        radial-gradient(circle at 0 0, rgba(75, 113, 255, 0.14), transparent 32rem),
        #101a2b;
}

.technician-report-textarea {
    width: 100%;
    min-height: 68px;
    resize: vertical;
    line-height: 1.35;
    background: rgba(8, 16, 30, 0.68);
    border-color: rgba(126, 146, 181, 0.28);
    color: #eef4ff;
}

.technician-report-header {
    align-items: flex-start !important;
    flex-shrink: 0;
    padding: 0.9rem 1.15rem !important;
}

.technician-report-titlemark {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(40, 75, 190, 0.9), rgba(27, 43, 120, 0.95));
    color: #ffffff;
    font-size: 1.2rem;
    box-shadow: 0 18px 36px rgba(35, 75, 180, 0.22);
}

.technician-report-heading {
    flex: 1;
}

.technician-report-heading h3 {
    font-size: clamp(1.1rem, 1.8vw, 1.42rem);
    line-height: 1.05;
    margin-top: 0.2rem;
}

.technician-report-heading p {
    margin: 0.28rem 0 0;
    color: #aebbd0;
    font-size: 0.86rem;
}

.technician-report-modal .andon-modal-body {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0.65rem;
    min-height: 0;
    overflow: hidden;
    padding: 0.8rem 1.15rem;
}

.evidence-file-list::-webkit-scrollbar {
    width: 8px;
}

.evidence-file-list::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 999px;
}

.evidence-file-list::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 999px;
    box-shadow: 0 0 10px var(--scrollbar-glow);
}

.technician-report-section {
    position: relative;
    padding: 0.7rem;
    border: 1px solid rgba(126, 146, 181, 0.18);
    border-radius: 12px;
    background: rgba(18, 30, 50, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.technician-report-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
    color: #f3f6ff;
}

.technician-report-section-title strong {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.98rem;
}

.technician-report-section-title span {
    color: #6f9dff;
    font-size: 0.9rem;
    font-weight: 700;
}

.technician-report-counter {
    margin-top: 0.35rem;
    text-align: right;
    color: #8e9bb1;
    font-size: 0.85rem;
}

.evidence-file-picker {
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 46px;
    padding: 0.65rem 0.85rem;
    border: 1px dashed rgba(126, 146, 181, 0.32);
    border-radius: 10px;
    background: rgba(8, 16, 30, 0.38);
    color: #d9e2f3 !important;
    cursor: pointer;
}

.evidence-file-picker input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.evidence-file-picker span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #6f9dff;
    font-size: 0.95rem;
    font-weight: 700;
}

.evidence-file-picker small {
    color: #8e9bb1;
    text-align: right;
    font-size: 0.82rem;
}

.evidence-file-list {
    display: grid;
    gap: 0.65rem;
    max-height: min(240px, 34dvh);
    overflow-y: auto;
    margin-top: 0.75rem;
    padding-right: 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

.evidence-file-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 30px;
    align-items: center;
    gap: 0.65rem;
    min-height: 40px;
    color: #d9e2f3;
}

.evidence-file-card {
    display: grid;
    padding: 0.7rem;
    border: 1px solid rgba(126, 146, 181, 0.18);
    border-radius: 8px;
    background: rgba(8, 16, 30, 0.3);
}

.evidence-file-card-grid {
    display: grid;
    grid-template-columns: minmax(210px, 0.9fr) minmax(260px, 1.1fr);
    align-items: start;
    gap: 0.8rem;
}

.evidence-description-cell {
    display: grid;
    gap: 0.25rem;
}

.evidence-description-input {
    min-height: 58px;
    resize: vertical;
    font-size: 0.78rem;
}

.evidence-file-main {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.evidence-file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-width: 0;
    color: #9aa7bd;
    font-size: 0.76rem;
}

.evidence-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.evidence-title-copy {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.evidence-add-button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.35rem;
    padding: 0 0.95rem;
    border: 1px solid rgba(255, 78, 107, 0.72);
    background: linear-gradient(180deg, #ff4e6b, #e73358);
    color: #ffffff;
    border-radius: 7px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 10px 22px rgba(231, 51, 88, 0.2);
}

.evidence-add-button:hover {
    background: linear-gradient(180deg, #ff617a, #ee3b5f);
}

.evidence-add-button input {
    display: none;
}

.evidence-empty-state {
    display: grid;
    place-items: center;
    gap: 0.35rem;
    width: 100%;
    min-height: 82px;
    border: 1px dashed rgba(126, 146, 181, 0.28);
    border-radius: 8px;
    background: rgba(8, 16, 30, 0.22);
    color: #b8c4d8;
    text-align: center;
}

.evidence-empty-state i {
    color: #ff6d85;
    font-size: 1.45rem;
}

.evidence-empty-state span {
    font-weight: 700;
}

.evidence-empty-state small {
    color: #8e9bb1;
}

.evidence-file-row:last-child {
    border-bottom: 0;
}

.evidence-file-icon {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 5px;
    color: #ffffff;
    font-size: 1rem;
}

.evidence-file-icon.image {
    background: #36c978;
}

.evidence-file-icon.video {
    background: #855df4;
}

.evidence-file-icon.pdf {
    background: #ee5a64;
}

.evidence-file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.evidence-file-size {
    color: #9aa7bd;
    white-space: nowrap;
    text-align: right;
}

.evidence-file-type {
    color: #8e9bb1;
    white-space: nowrap;
}

.evidence-remove-button {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #aebbd0;
    font-size: 1.25rem;
}

.evidence-remove-button:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.technician-report-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: auto;
    padding: 0.45rem 0.65rem;
    border: 1px solid rgba(126, 146, 181, 0.2);
    border-radius: 8px;
    color: #aebbd0;
    font-size: 0.82rem;
}

.technician-report-modal footer {
    flex-shrink: 0;
    padding: 0.8rem 1.15rem !important;
}

.andon-modal.technician-report-mobile {
    width: min(760px, calc(100vw - 1.25rem));
    max-width: 760px;
    max-height: calc(100dvh - 1rem);
    border: 0;
    border-radius: 18px;
    background: #f7f9fc;
    color: #122033;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.technician-report-mobile.resolution .technician-report-header {
    background: linear-gradient(145deg, #0f6d32, #0b4f25);
}

.technician-report-mobile.escalation .technician-report-header {
    background: linear-gradient(145deg, #c63638, #8f1d24);
}

.technician-report-mobile .technician-report-header {
    align-items: center !important;
    gap: 0.75rem;
    border-bottom: 0 !important;
    color: #ffffff;
    padding: 1rem 1.25rem !important;
}

.technician-report-mobile .mobile-report-close {
    display: grid;
    width: 42px;
    height: 42px;
    min-height: 42px;
    place-items: center;
    border: 1px solid rgba(255, 77, 97, 0.56);
    border-radius: 8px;
    background: rgba(255, 77, 97, 0.08);
    color: var(--danger);
    font-size: 1.18rem;
    font-weight: 800;
}

.technician-report-mobile .technician-report-titlemark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border: 2px solid rgba(255, 255, 255, 0.48);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 1.35rem;
    box-shadow: none;
}

.technician-report-mobile .technician-report-heading h3,
.technician-report-mobile .technician-report-heading p {
    color: #ffffff;
}

.technician-report-mobile .technician-report-heading h3 {
    margin: 0;
    font-size: 1.25rem;
}

.technician-report-mobile .andon-modal-body {
    display: grid;
    grid-template-rows: none;
    grid-auto-rows: max-content;
    align-content: start;
    gap: 0.55rem;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.85rem 1rem 0.8rem;
    background: #f7f9fc;
}

.mobile-report-summary,
.technician-report-mobile .mobile-report-section {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.mobile-report-summary {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
}

.mobile-report-compact {
    display: grid;
    gap: 0.65rem;
}

.mobile-report-folio {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
}

.mobile-report-equipment {
    overflow: hidden;
    color: #0f172a;
    font-size: 0.86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-report-compact-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.mobile-report-compact-meta div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0 0.45rem;
    min-width: 0;
}

.mobile-report-compact-meta i {
    grid-row: span 2;
    align-self: center;
    color: #0f172a;
    font-size: 1rem;
}

.mobile-report-compact-meta .status-dot {
    color: #f5a400;
}

.mobile-report-compact-meta strong {
    overflow: hidden;
    color: #0f172a;
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-report-compact-meta span {
    color: #64748b;
    font-size: 0.72rem;
}

.mobile-report-toggle {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    padding: 0.55rem 0 0;
    border: 0;
    border-top: 1px solid #e2e8f0;
    background: transparent;
    color: #334155;
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
}

.mobile-report-toggle:disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

.mobile-report-machine {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: #e7f7ee;
    color: #10823c;
    font-size: 1.15rem;
}

.technician-report-mobile.escalation .mobile-report-machine {
    background: #fff0f0;
    color: #d12832;
}

.mobile-report-folio strong {
    color: #0f8a3b;
    font-size: 1rem;
}

.technician-report-mobile.escalation .mobile-report-folio strong {
    color: #d12832;
}

.mobile-report-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem 0.65rem;
}

.mobile-report-meta-grid div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.05rem 0.45rem;
    min-width: 0;
}

.mobile-report-meta-grid i {
    grid-row: span 2;
    color: #0f172a;
    font-size: 1rem;
}

.mobile-report-meta-grid .status-dot {
    color: #f5a400;
}

.mobile-report-meta-grid span {
    color: #64748b;
    font-size: 0.72rem;
}

.mobile-report-meta-grid strong {
    overflow: hidden;
    color: #0f172a;
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.technician-report-mobile .mobile-report-section {
    padding: 0.75rem;
}

.mobile-report-section-title {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.65rem;
    margin-bottom: 0.5rem;
}

.mobile-report-section-title strong {
    display: block;
    color: #0f172a;
    font-size: 0.88rem;
}

.mobile-report-section-title small {
    color: #64748b;
    font-size: 0.76rem;
}

.report-step {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 6px;
    background: linear-gradient(145deg, #158f45, #0f7738);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
}

.technician-report-mobile.escalation .report-step {
    background: linear-gradient(145deg, #e04747, #c92f32);
}

.technician-report-mobile .technician-report-textarea {
    min-height: 56px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #1e293b;
    font-size: 0.84rem;
}

.technician-report-mobile .technician-report-counter {
    color: #475569;
}

.mobile-evidence-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
}

.mobile-evidence-actions label {
    position: relative;
    display: grid !important;
    min-height: 38px;
    place-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a !important;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
}

.mobile-evidence-actions input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.mobile-evidence-actions span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.mobile-evidence-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.55rem;
    min-height: 38px;
    padding: 0 0.75rem;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #ffffff;
    color: #1d4ed8;
    font-size: 0.82rem;
    font-weight: 800;
}

.mobile-evidence-list {
    max-height: 120px;
}

.technician-report-mobile .evidence-file-row {
    color: #1e293b;
}

.technician-report-mobile .evidence-file-size,
.technician-report-mobile .evidence-file-type {
    color: #64748b;
}

.mobile-next-level-info {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem;
    border-radius: 8px;
    background: #e8f2ff;
    color: #1e3a8a;
    font-size: 0.82rem;
}

.technician-report-mobile footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr);
    gap: 0.75rem;
    border-top: 0 !important;
    background: #f7f9fc;
    padding: 0.8rem 1rem 1rem !important;
}

.mobile-draft-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 46px;
    border: 1px solid #b7d8bf;
    border-radius: 8px;
    background: #ffffff;
    color: #11672e;
    font-weight: 800;
}

.technician-report-mobile.escalation .mobile-draft-action {
    border-color: #cbd5e1;
    color: #0f172a;
}

.technician-report-mobile footer .action {
    min-height: 46px;
    border-radius: 8px;
}

.technician-report-mobile.resolution footer .action {
    border-color: rgba(31, 99, 233, 0.62);
    background: #2563eb;
    color: #ffffff;
}

.andon-modal.technician-report-mobile {
    border: 1px solid rgba(126, 146, 181, 0.26);
    background: radial-gradient(circle at top left, rgba(45, 108, 223, 0.12), transparent 34%), #121d2f;
    color: #d9e2f3;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
}

.technician-report-mobile .technician-report-header,
.technician-report-mobile.resolution .technician-report-header,
.technician-report-mobile.escalation .technician-report-header {
    border-bottom: 1px solid rgba(126, 146, 181, 0.22) !important;
    background: linear-gradient(145deg, rgba(35, 56, 88, 0.96), rgba(15, 27, 45, 0.98));
}

.technician-report-mobile .mobile-report-close {
    border-color: rgba(255, 77, 97, 0.56);
    background: rgba(255, 77, 97, 0.08);
    color: var(--danger);
}

.technician-report-mobile .mobile-report-close:hover {
    border-color: var(--danger);
    background: var(--danger);
    color: #ffffff;
}

.technician-report-mobile .technician-report-titlemark {
    border-color: rgba(111, 157, 255, 0.46);
    background: rgba(111, 157, 255, 0.13);
    color: #6f9dff;
}

.technician-report-mobile.escalation .technician-report-titlemark {
    border-color: rgba(111, 157, 255, 0.46);
    background: rgba(111, 157, 255, 0.13);
    color: #6f9dff;
}

.technician-report-mobile .andon-modal-body {
    grid-template-rows: none;
    grid-auto-rows: max-content;
    align-content: start;
    gap: 0.75rem;
    background: transparent;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

.mobile-report-summary,
.technician-report-mobile .mobile-report-section {
    border-color: rgba(126, 146, 181, 0.22);
    background: linear-gradient(145deg, rgba(23, 35, 55, 0.94), rgba(15, 27, 45, 0.94));
    box-shadow: none;
}

.mobile-report-machine {
    background: rgba(111, 157, 255, 0.12);
    color: #6f9dff;
}

.technician-report-mobile.escalation .mobile-report-machine {
    background: rgba(111, 157, 255, 0.12);
    color: #6f9dff;
}

.technician-report-mobile .mobile-report-equipment {
    color: #f3f6ff;
}

.mobile-report-folio strong {
    color: #6f9dff;
}

.technician-report-mobile.escalation .mobile-report-folio strong {
    color: #6f9dff;
}

.mobile-report-meta-grid i {
    color: #aebbd0;
}

.technician-report-mobile .mobile-report-compact-meta i {
    color: #aebbd0;
}

.technician-report-mobile .mobile-report-compact-meta .status-dot {
    color: #f5a400;
}

.technician-report-mobile .mobile-report-compact-meta strong {
    color: #f3f6ff;
}

.technician-report-mobile .mobile-report-compact-meta span {
    color: #9aa7bd;
}

.technician-report-mobile .mobile-report-toggle {
    border-top-color: rgba(126, 146, 181, 0.2);
    color: #d9e2f3;
}

.technician-report-mobile .mobile-report-toggle:hover {
    color: #ffffff;
}

.mobile-report-meta-grid span,
.mobile-report-section-title small {
    color: #9aa7bd;
}

.mobile-report-meta-grid strong,
.mobile-report-section-title strong {
    color: #f3f6ff;
}

.report-step {
    background: linear-gradient(145deg, #6f9dff, #2563eb);
    color: #ffffff;
}

.technician-report-mobile.escalation .report-step {
    background: linear-gradient(145deg, #6f9dff, #2563eb);
    color: #ffffff;
}

.technician-report-mobile .technician-report-textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border-color: rgba(126, 146, 181, 0.24);
    background: rgba(8, 16, 30, 0.54);
    color: #f3f6ff;
}

.technician-report-mobile .technician-report-textarea::placeholder {
    color: #75849b;
}

.technician-report-mobile .technician-report-counter {
    color: #9aa7bd;
}

.report-readonly-field {
    min-height: 56px;
    width: 100%;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(126, 146, 181, 0.24);
    border-radius: 8px;
    background: rgba(8, 16, 30, 0.54);
    color: #f3f6ff;
    font-size: 0.84rem;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.report-readonly-field.compact {
    min-height: 42px;
}

.evidence-uploader-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    align-items: stretch;
}

.evidence-uploader-grid .evidence-file-picker {
    min-height: 116px;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.evidence-file-picker .evidence-picker-icon {
    color: #aebbd0;
    font-size: 2rem;
}

.evidence-file-picker strong {
    color: #6f9dff;
}

.evidence-uploader-grid .evidence-file-picker small {
    text-align: center;
}

.technician-report-mobile .evidence-file-list {
    max-height: 140px;
    margin-top: 0;
}

.technician-report-mobile .evidence-file-list > strong {
    display: block;
    margin-bottom: 0.35rem;
    color: #f3f6ff;
    font-size: 0.82rem;
}

.technician-report-mobile .evidence-file-row {
    color: #d9e2f3;
}

.technician-report-mobile .evidence-file-size,
.technician-report-mobile .evidence-file-type {
    color: #9aa7bd;
}

.report-evidence-description {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow: hidden;
    text-overflow: unset;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.technician-report-mobile footer {
    border-top: 1px solid rgba(126, 146, 181, 0.22) !important;
    background: rgba(15, 27, 45, 0.98);
}

.technician-report-mobile footer .secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 1px solid rgba(126, 146, 181, 0.18);
    border-radius: 8px;
    background: rgba(126, 146, 181, 0.12);
    color: #f3f6ff;
    font-weight: 800;
}

.technician-report-mobile footer .secondary-action:hover {
    background: rgba(126, 146, 181, 0.2);
}

.technician-report-mobile.escalation footer .action {
    border-color: rgba(31, 99, 233, 0.62);
    background: #2563eb;
    color: #ffffff;
}

.escalation-report-modal {
    display: flex;
    flex-direction: column;
    width: min(760px, 100%);
    max-height: calc(100dvh - 0.75rem);
    overflow: hidden;
}

.escalation-report-body {
    display: grid;
    gap: 0.75rem;
    min-height: 0;
    overflow-y: auto;
    padding: 0.9rem 1.15rem 1rem;
}

.escalation-report-message,
.escalation-report-empty {
    margin: 0;
    color: #e8eefb;
    line-height: 1.35;
}

.escalation-report-empty {
    color: #8e9bb1;
}

.report-evidence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.6rem;
}

.report-evidence-tile {
    min-width: 0;
    max-width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.55rem;
    min-height: 58px;
    border: 1px solid rgba(126, 146, 181, 0.22);
    border-radius: 8px;
    background: rgba(8, 16, 30, 0.38);
    color: #f3f6ff;
    padding: 0.55rem;
    text-align: left;
}

.report-evidence-tile span:not(.evidence-file-icon) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-evidence-tile small {
    grid-column: 2;
    color: #8e9bb1;
}

.evidence-preview-panel {
    display: grid;
    gap: 0.65rem;
    padding: 0.75rem;
    border: 1px solid rgba(126, 146, 181, 0.22);
    border-radius: 10px;
    background: rgba(8, 16, 30, 0.42);
}

.evidence-preview-panel img,
.evidence-preview-panel video,
.evidence-preview-panel iframe {
    width: 100%;
    max-width: 100%;
    max-height: min(62dvh, 560px);
    border: 0;
    border-radius: 8px;
    background: #050b14;
    object-fit: contain;
}

.evidence-preview-panel iframe {
    min-height: min(62dvh, 560px);
}

.report-inline-loader {
    display: grid;
    justify-items: center;
    gap: 0.55rem;
    padding: 2rem 1rem;
    color: #aebbd0;
}

.report-page-loader {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(8, 16, 30, 0.72);
    backdrop-filter: blur(3px);
}

.report-page-loader-box {
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    width: min(320px, 100%);
    padding: 1.1rem;
    border: 1px solid rgba(111, 157, 255, 0.32);
    border-radius: 12px;
    background: rgba(16, 26, 43, 0.96);
    color: #f3f6ff;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.32);
}

.report-page-loader-icon {
    display: inline-block;
    color: #6f9dff;
    font-size: 2rem;
    line-height: 1;
    animation: report-spin 0.85s linear infinite;
}

.report-page-loader-box span {
    color: #aebbd0;
    font-size: 0.88rem;
}

@keyframes report-spin {
    to {
        transform: rotate(360deg);
    }
}

.table-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.status-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.status-table th,
.status-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.status-table th {
    color: #d9e2f3;
    font-size: 0.88rem;
}

.consolidated-table {
    min-width: 1550px;
}

.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.18rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.ok-pill { background: rgba(53, 220, 129, 0.16); color: var(--ok); }
.warn-pill { background: rgba(242, 193, 78, 0.18); color: var(--warn); }
.danger-pill { background: rgba(255, 77, 97, 0.18); color: var(--danger); }
.blue-pill { background: rgba(45, 115, 255, 0.18); color: #73a7ff; }
.cyan-pill { background: rgba(69, 201, 255, 0.16); color: var(--accent-cyan); }
.info-pill { background: rgba(69, 201, 255, 0.16); color: var(--accent-cyan); }
.muted-pill { background: rgba(158, 172, 200, 0.14); color: var(--text-soft); }

.status-pulse {
    animation: statusPulse 1.35s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% {
        filter: brightness(1);
        box-shadow: 0 0 0 rgba(255, 77, 97, 0);
    }
    50% {
        filter: brightness(1.35);
        box-shadow: 0 0 18px rgba(255, 77, 97, 0.95), 0 0 34px rgba(255, 77, 97, 0.35);
    }
}

@keyframes alertCardPulseDanger {
    0%, 100% {
        box-shadow: inset 0 0 0 1px rgba(255, 77, 97, 0.16), 0 0 0 rgba(255, 77, 97, 0);
    }
    50% {
        box-shadow: inset 0 0 0 1px rgba(255, 77, 97, 0.38), 0 0 24px rgba(255, 77, 97, 0.18);
    }
}

@keyframes alertCardPulseInfo {
    0%, 100% {
        box-shadow: inset 0 0 0 1px rgba(69, 201, 255, 0.14), 0 0 0 rgba(69, 201, 255, 0);
    }
    50% {
        box-shadow: inset 0 0 0 1px rgba(69, 201, 255, 0.36), 0 0 22px rgba(69, 201, 255, 0.16);
    }
}

@keyframes alertCardPulseWarn {
    0%, 100% {
        box-shadow: inset 0 0 0 1px rgba(242, 193, 78, 0.16), 0 0 0 rgba(242, 193, 78, 0);
    }
    50% {
        box-shadow: inset 0 0 0 1px rgba(242, 193, 78, 0.38), 0 0 22px rgba(242, 193, 78, 0.15);
    }
}

@keyframes alertCardSweep {
    0%, 100% {
        opacity: 0;
        transform: translateX(-35%);
    }
    45% {
        opacity: 0.32;
    }
    70% {
        opacity: 0;
        transform: translateX(35%);
    }
}

.badge-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.summary-text {
    display: inline-block;
    max-width: 240px;
}

.folio-link {
    color: #8db8ff;
}

.table-footer {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--text-soft);
    font-size: 0.88rem;
    padding: 0 0.25rem;
}

.table-footer .right {
    margin-left: auto;
}

.bitacora-table-shell {
    padding: 0;
    border-radius: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.bitacora-compact-table {
    min-width: 1760px;
    background: rgba(12, 21, 35, 0.82);
}

.bitacora-compact-table th {
    padding: 1rem 0.9rem;
    color: #b8c9e9;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.bitacora-compact-table td {
    padding: 0.78rem 0.9rem;
    color: #dbe7ff;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(43, 61, 91, 0.52);
}

.bitacora-compact-table tbody tr {
    background: rgba(13, 23, 38, 0.72);
}

.bitacora-compact-table tbody tr:hover {
    background: rgba(20, 34, 55, 0.95);
}

.bitacora-compact-table small {
    color: #8fa3c3;
    font-size: 0.78rem;
}

.bitacora-compact-table .pill {
    padding: 0.2rem 0.55rem;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.bitacora-compact-table .summary-text {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-group,
.count-chip {
    display: inline-flex;
    min-width: 1.45rem;
    height: 1.35rem;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    background: rgba(7, 14, 24, 0.92);
    color: #dce8ff;
    font-size: 0.82rem;
    font-weight: 800;
}

.mini-group {
    padding: 0 0.45rem;
    min-width: auto;
}

.resolution-ok {
    color: var(--ok);
}

.bitacora-view-button {
    width: 2.15rem;
    height: 2rem;
    padding: 0;
    border-color: rgba(73, 116, 187, 0.65);
    background: rgba(17, 31, 52, 0.85);
    color: #bcd0ef;
    justify-content: center;
}

.bitacora-view-button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.edit-icon-button {
    width: 2.15rem;
    height: 2rem;
    padding: 0;
    justify-content: center;
}

.pencil-icon {
    position: relative;
    display: inline-block;
    width: 0.86rem;
    height: 0.22rem;
    border-radius: 2px;
    background: currentColor;
    transform: rotate(142deg);
}

.pencil-icon::before {
    content: "";
    position: absolute;
    right: -0.27rem;
    top: 0;
    border-left: 0.28rem solid currentColor;
    border-top: 0.11rem solid transparent;
    border-bottom: 0.11rem solid transparent;
}

.pencil-icon::after {
    content: "";
    position: absolute;
    left: -0.18rem;
    top: 0;
    width: 0.13rem;
    height: 0.22rem;
    border-radius: 1px;
    background: rgba(158, 172, 200, 0.85);
}

.view-eye {
    position: relative;
    display: inline-block;
    width: 1rem;
    height: 0.62rem;
    border: 1.5px solid currentColor;
    border-radius: 999px 999px 999px 999px / 700px 700px 700px 700px;
}

.view-eye::after {
    content: "";
    position: absolute;
    width: 0.28rem;
    height: 0.28rem;
    left: 50%;
    top: 50%;
    border-radius: 50%;
    background: currentColor;
    transform: translate(-50%, -50%);
}

.empty-row {
    text-align: center !important;
    color: var(--text-soft) !important;
    padding: 1.8rem !important;
}

.bitacora-footer {
    align-items: center;
    justify-content: space-between;
}

.pager {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
}

.pager-button {
    min-width: 2rem;
    height: 2rem;
    border: 1px solid rgba(63, 83, 119, 0.8);
    border-radius: 7px;
    background: rgba(11, 20, 34, 0.9);
    color: #d8e5fb;
    font-size: 0.78rem;
}

.pager-button.active {
    border-color: #2d73ff;
    background: #2d73ff;
    color: white;
}

.pager-button:disabled {
    opacity: 0.45;
}

.pager-gap {
    color: var(--text-soft);
    padding: 0 0.25rem;
}

.cost-kpis {
    grid-template-columns: repeat(7, minmax(130px, 1fr));
}

.cost-rate-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 0.65rem;
    margin: 0 0.85rem 0.8rem;
}

.cost-rate-strip div {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(12, 20, 32, 0.72);
    padding: 0.65rem 0.75rem;
}

.cost-rate-strip span,
.cost-filters label span {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.cost-rate-strip strong {
    font-size: 1.05rem;
}

.cost-filters {
    grid-template-columns: repeat(5, minmax(130px, 1fr)) auto auto;
    align-items: end;
}

.cost-filters label {
    display: grid;
    min-width: 0;
}

.cost-filters .text-input {
    width: 100%;
    margin-bottom: 0;
}

.filter-button {
    min-height: 39px;
}

.cost-table .summary-text {
    max-width: 340px;
}

.cost-message-modal {
    width: min(820px, 100%);
}

.cost-message-modal header p {
    margin: 0.2rem 0 0;
    color: var(--text-soft);
}

.cost-message-meta {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.cost-message-content {
    max-height: min(52vh, 520px);
    margin: 0;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(7, 13, 23, 0.75);
    color: var(--text-main);
    padding: 1rem;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.45;
}

.cost-kind {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.12rem 0.5rem;
    font-weight: 700;
    font-size: 0.78rem;
    white-space: nowrap;
}

.cost-kind.template {
    background: rgba(96, 165, 250, 0.16);
    color: #93c5fd;
}

.cost-kind.free {
    background: rgba(34, 197, 94, 0.16);
    color: #4ade80;
}

.cost-kind.fallback {
    background: rgba(242, 193, 78, 0.18);
    color: #f2c14e;
}

.detail-header-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(120px, 1fr));
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.8rem;
}

.detail-header-grid div {
    padding: 0.75rem;
    background: rgba(10, 16, 26, 0.72);
    border-right: 1px solid var(--line);
}

.detail-header-grid span {
    display: block;
    color: var(--text-soft);
    font-size: 0.8rem;
}

.detail-header-grid strong {
    display: block;
    margin-top: 0.2rem;
}

.andon-tabs {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1rem;
}

.andon-tabs button,
.andon-tabs a {
    border: 0;
    background: transparent;
    color: var(--text-soft);
    padding: 0.7rem 0.9rem;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.andon-tabs button.active {
    color: #F89434;
    border-bottom: 3px solid #58585A;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    gap: 0.75rem;
}

.summary-cards div {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.85rem;
    background: rgba(16, 24, 39, 0.72);
}

.summary-cards span {
    display: block;
    color: var(--text-soft);
    font-size: 0.84rem;
}

.summary-cards strong {
    display: block;
    margin-top: 0.25rem;
    font-size: 1.35rem;
}

.summary-cards.metrics strong {
    color: var(--ok);
}

.detail-helper {
    margin: -0.25rem 0 0.75rem;
    color: var(--text-soft);
    font-size: 0.86rem;
}

.attention-chain {
    display: grid;
    gap: 0.75rem;
}

.chain-card {
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent-cyan);
    border-radius: 10px;
    background: rgba(16, 24, 39, 0.72);
    padding: 0.8rem;
}

.chain-card strong,
.chain-card span,
.chain-card small {
    display: block;
}

.chain-card span,
.chain-card small {
    color: var(--text-soft);
    margin-top: 0.2rem;
}

.chain-card.generated { border-left-color: var(--accent-red); }
.chain-card.resolved { border-left-color: var(--ok); }
.chain-card.cancelled { border-left-color: var(--text-soft); }

/* Cadena de atencion */
.attention-reconstruction { color: #f4f7ff; }
.attention-heading { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 1rem; margin-bottom: 1.3rem; }
.attention-heading h3 { margin: 0 0 .35rem; font-size: 1.55rem; }
.attention-heading p { margin: 0; color: #9eabc0; }
.attention-sla-summary { display: flex; align-items: center; gap: .85rem; min-width: 260px; padding: .8rem 1rem; border: 1px solid #203249; border-radius: 10px; background: linear-gradient(135deg, rgba(18,32,49,.95), rgba(12,25,40,.8)); }
.attention-sla-summary .sla-shield { display: grid; place-items: center; color: #24dc72; font-size: 2rem; }
.attention-sla-summary strong,.attention-sla-summary span { display: block; }
.attention-sla-summary strong { margin-bottom: .25rem; font-size: .9rem; }
.attention-sla-summary span { color: #aab5c8; font-size: .75rem; line-height: 1.5; }
.attention-config-button { min-height: 44px; padding: 0 1rem; color: #39a0ff; border: 1px solid #1978ca; border-radius: 9px; background: transparent; cursor: pointer; }
.attention-config-button:hover { background: rgba(22,119,215,.12); }
.attention-timeline { position: relative; }
.attention-row { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 18px; position: relative; }
.timeline-rail { position: relative; display: flex; flex-direction: column; align-items: center; min-height: 100%; }
.timeline-rail::after { content: ""; position: absolute; z-index: 0; top: 57px; bottom: -20px; left: 50%; width: 2px; transform: translateX(-50%); background: #6e829b; }
.stage-row:last-of-type .timeline-rail::after { display: none; }
.timeline-node { position: relative; z-index: 1; display: grid; place-items: center; width: 54px; height: 54px; border: 2px solid currentColor; border-radius: 50%; font-size: 1.75rem; box-shadow: 0 0 20px color-mix(in srgb, currentColor 22%, transparent); }
.timeline-node.generated { color: #ff434e; background: radial-gradient(circle, #4a1821, #172033 70%); }
.timeline-node.active { color: #168cff; background: radial-gradient(circle, #173e75, #132035 70%); }
.timeline-node.resolved { color: #22d66f; background: radial-gradient(circle, #12613c, #13273b 70%); }
.timeline-node.manual { color: var(--warn); background: radial-gradient(circle, #61550c, #222437 70%); }
.timeline-node.automatic { color: var(--warn); background: radial-gradient(circle, #61550c, #222437 70%); }
.timeline-node.cancelled { color: #8e9caf; background: radial-gradient(circle, #394454, #182132 70%); }
.timeline-rail time { margin-top: 15px; color: #bac5d7; font-size: .84rem; line-height: 1.45; text-align: center; white-space: pre-line; }
.alert-created-card,.attention-stage-card { position: relative; margin-bottom: 24px; border: 1px solid; border-radius: 11px; background: linear-gradient(105deg, rgba(15,31,48,.96), rgba(13,29,46,.78)); overflow: visible; }
.alert-created-card { border-color: rgba(255,55,67,.55); padding: 1.3rem 1.65rem; }
.alert-created-card::before,.attention-stage-card::before { content: ""; position: absolute; top: 27px; left: -8px; width: 14px; height: 14px; transform: rotate(45deg); border-left: 1px solid currentColor; border-bottom: 1px solid currentColor; background: #102136; }
.alert-created-card { color: #ff424d; }
.alert-created-card h4 { margin: 0 0 1rem; color: #ff424d; font-size: 1.25rem; }
.alert-created-grid { display: grid; grid-template-columns: 1.1fr 1.2fr .95fr .9fr .9fr; }
.alert-created-grid > div { position: relative; min-height: 52px; padding: .2rem 1.3rem; border-right: 1px solid rgba(107,130,157,.16); color: #eef3fb; }
.alert-created-grid > div:first-child { padding-left: 2.8rem; }
.alert-created-grid > div:last-child { border: 0; }
.alert-created-grid > div > i { position: absolute; left: .15rem; top: .4rem; color: #98a8bd; font-size: 1.8rem; }
.alert-created-grid span,.alert-created-grid strong { display: block; }
.alert-created-grid span { margin-bottom: .45rem; color: #9facc0; font-size: .8rem; }
.alert-created-grid strong { color: #f2f5fa; font-size: .94rem; }
.priority-high { display: inline-block !important; width: fit-content; padding: .3rem .65rem; color: #ff6068 !important; border-radius: 20px; background: rgba(211,47,57,.28); }
.transition-label { position: relative; margin: 6px 0 -1px 110px; height: 28px; border-top: 1px dashed currentColor; color: var(--warn); }
.transition-label span { position: absolute; top: -16px; left: 28px; padding: .38rem 1.2rem; border: 1px solid currentColor; border-radius: 8px; background: #102033; font-size: .82rem; }
.transition-label.automatic { color: var(--warn); }
.transition-label.cancelled { color: #8e9caf; }
.attention-stage-card { --stage-color: #168cff; color: var(--stage-color); border-color: color-mix(in srgb, var(--stage-color) 70%, transparent); }
.attention-stage-card.manual { --stage-color: var(--warn); }
.attention-stage-card.automatic { --stage-color: var(--warn); }
.attention-stage-card.resolved { --stage-color: #22d66f; }
.attention-stage-card.cancelled { --stage-color: #8e9caf; }
.attention-stage-card > header { display: flex; align-items: center; justify-content: space-between; min-height: 63px; padding: 0 1.65rem; border-bottom: 1px solid rgba(103,129,158,.2); }
.stage-title { display: flex; align-items: center; gap: .75rem; }
.stage-title h4 { margin: 0; color: var(--stage-color); font-size: 1.2rem; }
.attended-badge { padding: .3rem .7rem; color: var(--stage-color); border-radius: 18px; background: color-mix(in srgb, var(--stage-color) 15%, transparent); font-size: .78rem; }
.stage-result-badge { display: inline-flex; align-items: center; gap: .55rem; padding: .65rem 1rem; color: #fff; border: 1px solid color-mix(in srgb, var(--stage-color) 55%, transparent); border-radius: 9px; background: color-mix(in srgb, var(--stage-color) 38%, #132338); box-shadow: 0 0 16px color-mix(in srgb, var(--stage-color) 14%, transparent); font-size: .86rem; }
.stage-result-badge i { color: var(--stage-color); font-size: 1.25rem; }
.stage-details-grid { display: grid; grid-template-columns: 1.08fr .9fr 1.05fr 1.12fr 1.18fr; color: #eff3fa; }
.stage-details-grid > section { min-width: 0; min-height: 205px; padding: 1.15rem 1rem; border-right: 1px solid rgba(103,129,158,.2); }
.stage-details-grid > section:last-child { border-right: 0; }
.stage-details-grid h5 { margin: 0 0 1rem; color: #eef3fb; font-size: .82rem; font-weight: 500; }
.stage-details-grid ul { margin: 0; padding-left: 1.1rem; color: #f1f4f9; font-size: .86rem; line-height: 2.15; }
.stage-empty { color: #8f9db1; font-size: .82rem; }
.participants-link { margin-top: 1rem; padding: 0; color: var(--stage-color); border: 0; background: none; font-size: .82rem; font-weight: 600; cursor: pointer; }
.participants-link:hover { filter: brightness(1.2); text-decoration: underline; }
.stage-person { display: flex; align-items: center; gap: .55rem; margin-bottom: 1.35rem; }
.stage-person i { color: var(--stage-color); font-size: 1.4rem; }
.stage-person strong { font-size: .9rem; }
.detail-label { display: block; margin-top: .6rem; color: #91a0b5; font-size: .74rem; }
.stage-details-grid p { margin: .35rem 0; color: #e6ebf3; font-size: .8rem; line-height: 1.35; overflow-wrap: anywhere; }
.stage-stat { display: grid; grid-template-columns: 23px 1fr; align-items: center; gap: .4rem .45rem; margin-bottom: 1.05rem; }
.stage-stat i { grid-row: 1 / span 2; color: #19d66d; font-size: 1.25rem; }
.stage-stat.notification i { color: var(--accent-cyan); }
.stage-stat.escalate i { color: #d6e0ef; }
.stage-stat.reminders i { color: #9bacbf; }
.stage-stat span { color: #9dabc0; font-size: .74rem; }
.stage-stat strong { font-size: .82rem; font-weight: 500; }
.outcome-title { display: flex; align-items: center; gap: .55rem; margin-bottom: 1rem; }
.outcome-title i { color: var(--stage-color); font-size: 1.45rem; }
.outcome-title strong { color: #eef3fb; font-size: .86rem; font-weight: 500; }
.attention-flow-summary { display: grid; grid-template-columns: 1.35fr repeat(4, .8fr) 1.05fr .85fr; align-items: center; gap: .5rem; padding: 1rem 1.2rem; border: 1px solid #20334a; border-radius: 10px; background: linear-gradient(110deg, rgba(18,37,57,.9), rgba(13,29,45,.75)); }
.attention-flow-summary > div { min-width: 0; }
.attention-flow-summary strong,.attention-flow-summary span,.attention-flow-summary small { display: block; }
.attention-flow-summary > div > strong { font-size: 1.3rem; }
.attention-flow-summary span,.attention-flow-summary small { color: #91a0b4; font-size: .68rem; line-height: 1.45; }
.flow-summary-title { display: flex; align-items: center; gap: .7rem; }
.flow-summary-title i { display: grid; place-items: center; width: 34px; height: 34px; color: #168cff; border-radius: 50%; background: rgba(28,100,171,.18); }
.flow-summary-title strong { font-size: .82rem !important; }
.flow-final-state strong { display: flex; align-items: center; gap: .35rem; margin-top: .35rem; color: #22dc71; font-size: .82rem !important; }
.flow-total-time strong { margin-top: .35rem; color: #22dc71; font-size: 1rem !important; }
.chain-compact-widget { margin-top: 1rem; }
.chain-compact-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.chain-compact-heading h4,.chain-compact-heading p { margin: 0; }
.chain-compact-heading p { margin-top: .25rem; color: var(--text-soft); font-size: .82rem; }
.chain-compact-flow { display: flex; align-items: center; gap: .75rem; margin-top: 1rem; overflow-x: auto; padding-bottom: .3rem; }
.compact-step { display: flex; align-items: center; gap: .45rem; flex: 0 0 auto; padding: .65rem .8rem; color: #168cff; border: 1px solid currentColor; border-radius: 9px; background: rgba(17,32,49,.75); }
.compact-step.generated { color: #ff434e; }.compact-step.resolved { color: #22d66f; }.compact-step.manual { color: var(--warn); }.compact-step.automatic { color: var(--warn); }.compact-step.cancelled { color: #8e9caf; }
.compact-step span { color: var(--text-main); font-size: .82rem; }.compact-arrow { color: var(--text-soft); }
.theme-light .attention-reconstruction { color: #172235; }
.theme-light .attention-heading p,.theme-light .attention-sla-summary span { color: #58677c; }
.theme-light .attention-sla-summary,.theme-light .alert-created-card,.theme-light .attention-stage-card,.theme-light .attention-flow-summary,.theme-light .compact-step { background: linear-gradient(120deg,#fff,#f4f7fb); }
.theme-light .alert-created-card::before,.theme-light .attention-stage-card::before,.theme-light .transition-label span { background: #f8fafd; }
.theme-light .alert-created-grid strong,.theme-light .stage-details-grid,.theme-light .stage-details-grid h5,.theme-light .stage-details-grid p,.theme-light .outcome-title strong { color: #1c2a3c; }

@media (max-width: 1180px) {
    .attention-heading { grid-template-columns: 1fr auto; }.attention-heading > div:first-child { grid-column: 1 / -1; }
    .stage-details-grid { grid-template-columns: repeat(2,1fr); }.stage-details-grid > section { min-height: 170px; border-bottom: 1px solid rgba(103,129,158,.2); }.stage-details-grid > section:nth-child(2n) { border-right: 0; }.stage-details-grid > section:last-child { grid-column: 1 / -1; }
    .attention-flow-summary { grid-template-columns: repeat(4,1fr); }.flow-summary-title { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    .attention-heading { display: flex; align-items: stretch; flex-direction: column; }.attention-sla-summary { min-width: 0; }.attention-config-button { width: 100%; }
    .attention-row { grid-template-columns: 58px minmax(0,1fr); gap: 9px; }.timeline-node { width: 44px; height: 44px; font-size: 1.35rem; }.timeline-rail::after { top: 47px; }.timeline-rail time { font-size: .65rem; }
    .alert-created-card { padding: 1rem; }.alert-created-grid { grid-template-columns: 1fr 1fr; }.alert-created-grid > div { padding: .7rem; border-right: 0; border-bottom: 1px solid rgba(103,129,158,.16); }.alert-created-grid > div:first-child { padding-left: 2.6rem; }.alert-created-grid > div:last-child { grid-column: 1 / -1; }
    .attention-stage-card > header { align-items: flex-start; flex-direction: column; gap: .65rem; padding: 1rem; }.stage-title { flex-wrap: wrap; }.stage-result-badge { width: 100%; box-sizing: border-box; }
    .stage-details-grid { grid-template-columns: 1fr; }.stage-details-grid > section,.stage-details-grid > section:nth-child(2n),.stage-details-grid > section:last-child { grid-column: auto; min-height: 0; border-right: 0; }
    .transition-label { margin-left: 67px; }.transition-label span { left: 10px; }
    .attention-flow-summary { grid-template-columns: 1fr 1fr; }.flow-summary-title,.flow-final-state,.flow-total-time { grid-column: 1 / -1; }
}

.highlight-ok { border-color: rgba(53, 220, 129, 0.42); }
.highlight-muted { border-color: rgba(158, 172, 200, 0.35); }
.evidence-empty {
    min-width: 0;
    max-width: 100%;
    border: 1px dashed var(--line);
    border-radius: 10px;
    color: var(--text-soft);
    padding: 0.75rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.evidence-empty strong {
    color: var(--text-main);
}

.evidence-empty > small {
    display: block;
    margin-top: 0.25rem;
}

.evidence-empty p {
    margin: 0.65rem 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.meta-id { word-break: break-all; color: var(--text-soft); }

.monitor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.monitor-card {
    border: 1px solid var(--line);
    border-left: 6px solid var(--accent-cyan);
    border-radius: 12px;
    padding: 1rem;
    background: rgba(16, 24, 39, 0.82);
}

.monitor-card.warn { border-left-color: var(--warn); }
.monitor-card.info { border-left-color: var(--accent-cyan); }
.monitor-card.danger { border-left-color: var(--danger); }
.monitor-card.blue { border-left-color: #73a7ff; }
.monitor-card.cyan { border-left-color: var(--accent-cyan); }
.monitor-card.ok { border-left-color: var(--ok); }
.monitor-card.muted { border-left-color: var(--text-soft); }
.monitor-card h3 { margin: 0.2rem 0; font-size: 1.7rem; }
.monitor-card header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .7rem; }
.monitor-label, .monitor-meta span { display: block; color: var(--text-soft); font-size: .78rem; }
.monitor-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1rem; margin-top: 1rem; }
.monitor-meta strong { display: block; margin-top: .2rem; }
.monitor-attention { margin: 1rem 0 0; padding-top: .8rem; border-top: 1px solid var(--line); color: var(--text-main); }
.technician-alert-field-label { display: block; margin-top: .35rem; color: var(--text-soft); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 560px) { .monitor-meta { grid-template-columns: 1fr; } }

@media (max-width: 1100px) {
    .andon-kpis.seven,
    .detail-header-grid,
    .andon-grid.two,
    .andon-filters {
        grid-template-columns: 1fr;
    }

    .andon-header {
        flex-direction: column;
    }

    .user-form-grid {
        grid-template-columns: 1fr;
    }
}

.andon-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    padding: calc(1rem + var(--safe-area-top))
        calc(1rem + var(--safe-area-right))
        calc(1rem + var(--safe-area-bottom))
        calc(1rem + var(--safe-area-left));
    background: rgba(3, 8, 18, 0.72);
    backdrop-filter: blur(6px);
}

.andon-modal {
    width: min(560px, 100%);
    max-height: calc(100dvh - 2rem - var(--safe-area-top) - var(--safe-area-bottom));
    display: flex;
    flex-direction: column;
    border: 1px solid #314460;
    border-radius: 16px;
    background: #101a2b;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
    color: #f3f6ff;
}

.andon-modal header,
.andon-modal footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid #26364f;
}

.andon-modal footer {
    justify-content: flex-end;
    border-top: 1px solid #26364f;
    border-bottom: 0;
}

.andon-modal h3 {
    margin: 0;
    font-size: 1.1rem;
}

.andon-modal-body {
    display: grid;
    gap: 0.65rem;
    padding: 1rem;
    overflow: auto;
}

.andon-modal-body label {
    color: #aebbd0;
    font-size: 0.85rem;
}

.compact-button {
    padding: 0.35rem 0.6rem;
    font-size: 0.82rem;
}

.andon-check-row {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #f3f6ff;
    border: 1px solid #3b4d6d;
    border-radius: 8px;
    background: #162237;
    padding: 0.7rem 0.8rem;
}

.andon-check-row input {
    width: 1rem;
    height: 1rem;
    accent-color: #22c55e;
}

.app-theme {
    background: radial-gradient(circle at 15% -10%, #15243d 0%, transparent 40%),
        radial-gradient(circle at 85% 110%, #1d1432 0%, transparent 35%),
        linear-gradient(160deg, var(--bg-0), var(--bg-1) 45%, var(--bg-2));
    color: var(--text-main);
}

.theme-light {
    --bg-0: #f4f7fb;
    --bg-1: #eef3f9;
    --bg-2: #e4ebf5;
    --surface: #ffffff;
    --surface-soft: #f4f7fb;
    --line: #cbd6e6;
    --line-strong: #9fb0c8;
    --text-main: #172033;
    --text-soft: #60708b;
    --accent-red: #d92843;
    --accent-cyan: #0477b8;
    --ok: #087a44;
    --warn: #aa7a05;
    --danger: #d72f49;
}

/* Dashboard de tiempos de atención */
.timing-dashboard { display: grid; min-width: 0; max-width: 100%; gap: 1rem; overflow: hidden; color: var(--text-main); }
.timing-dashboard > * { min-width: 0; max-width: 100%; }
.dashboard-scope-bar { display:flex; align-items:flex-end; gap:.75rem; flex-wrap:wrap; padding:.75rem 1rem; margin-bottom:.85rem; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.alerts-grid-heading { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1rem; }.alerts-grid-heading h4 { margin:0; }.alerts-grid-heading span { color:var(--text-soft); font-size:.78rem; }
.alerts-record-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.85rem; }
.alerts-record-card { padding:1rem; border:1px solid var(--line); border-radius:12px; background:linear-gradient(145deg,var(--surface-soft),var(--surface)); }
.alerts-record-card header { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; }.alerts-record-card h3 { margin:.25rem 0 0; }.alerts-record-meta,.alerts-record-times { display:grid; gap:.65rem; margin-top:1rem; }.alerts-record-meta { grid-template-columns:repeat(3,1fr); }.alerts-record-times { grid-template-columns:repeat(2,1fr); padding-top:.8rem; border-top:1px solid var(--line); }.alerts-record-card span { color:var(--text-soft); }.alerts-record-card small { display:block; margin-bottom:.2rem; color:var(--text-soft); }.alerts-record-card strong { color:var(--text-main); }
.theme-light .alerts-record-card { background:linear-gradient(145deg,#fff,#f4f7fb); box-shadow:0 5px 15px rgba(33,52,79,.05); }
@media (max-width:900px) { .alerts-record-grid { grid-template-columns:1fr; } }
@media (max-width:560px) { .alerts-grid-heading { align-items:flex-start; flex-direction:column; }.alerts-record-meta,.alerts-record-times { grid-template-columns:1fr; } }
.trend-point { cursor: help; transition: r .15s ease, filter .15s ease; }
.trend-point:hover,.trend-point:focus { r: 7px; filter: drop-shadow(0 0 5px var(--accent-red)); outline:none; }
.dashboard-scope-bar label { display:grid; gap:.3rem; color:var(--text-soft); font-size:.72rem; }
.dashboard-scope-bar select { min-width:190px; padding:.55rem .75rem; color:var(--text-main); border:1px solid var(--line); border-radius:8px; background:var(--surface-soft); }
@media (max-width:700px) { .dashboard-scope-bar,.dashboard-scope-bar label,.dashboard-scope-bar select { width:100%; } }
.timing-dashboard-header,.timing-panel,.timing-summary-widget { border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(135deg,var(--surface),color-mix(in srgb,var(--surface-soft) 74%,transparent)); }
.timing-dashboard-header { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 1rem; padding: 1.15rem; }
.timing-dashboard-header h3,.timing-dashboard-header p,.timing-panel h4,.timing-section-heading h4,.timing-section-heading p { margin: 0; }
.timing-dashboard-header h3 { font-size: 1.35rem; }.timing-dashboard-header h3 i { color: var(--accent-cyan); }.timing-dashboard-header p { margin-top: .35rem; color: var(--text-soft); }
.timing-sla-panel { display: flex; gap: .75rem; min-width: 205px; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: 11px; background: color-mix(in srgb,var(--surface-soft) 70%,transparent); }
.timing-sla-panel>i { color: var(--ok); font-size: 1.4rem; }.timing-sla-panel div { display: grid; gap: .15rem; }.timing-sla-panel span,.timing-sla-panel small { color: var(--text-soft); font-size: .72rem; }.timing-sla-panel small { color: var(--warn); }
.timing-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(190px,100%),1fr)); gap: .75rem; }.timing-kpi-grid.compact { grid-template-columns: repeat(auto-fit,minmax(min(180px,100%),1fr)); margin-top: 1rem; }
.timing-kpi { display: flex; align-items: center; min-width: 0; gap: .7rem; min-height: 94px; padding: .85rem; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(145deg,var(--surface-soft),var(--surface)); }
.timing-kpi>i { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; font-size: 1.3rem; color: var(--accent-cyan); background: color-mix(in srgb,var(--accent-cyan) 16%,transparent); }.timing-kpi div { display: grid; min-width: 0; gap: .25rem; }.timing-kpi span,.timing-kpi small { color: var(--text-soft); font-size: .72rem; }.timing-kpi strong { font-size: clamp(1.05rem,1.4vw,1.35rem); overflow-wrap: anywhere; }.timing-kpi.success>i,.timing-kpi.success small,.timing-kpi.success strong:last-child { color: var(--ok); }.timing-kpi.warn>i { color: var(--warn); }.timing-kpi.danger>i,.timing-kpi.danger small { color: var(--accent-red); }.timing-kpi.neutral>i { color: var(--text-soft); }
.timing-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.timing-panel { min-width: 0; padding: 1.05rem; }.timing-panel h4 { margin-bottom: 1rem; font-size: 1.05rem; }
.timing-total-line { display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; gap: .4rem; padding: .75rem 0; overflow-x: auto; }
.timing-milestone { display: grid; flex: 1 1 100px; justify-items: center; min-width: 88px; gap: .35rem; text-align: center; }.timing-milestone-icon { display: grid; place-items: center; width: 48px; height: 48px; border: 2px solid currentColor; border-radius: 50%; color: var(--accent-cyan); background: color-mix(in srgb,var(--accent-cyan) 12%,var(--surface)); font-size: 1.3rem; }.timing-milestone strong { font-size: .88rem; }.timing-milestone.danger .timing-milestone-icon { color: var(--accent-red); }.timing-milestone.success .timing-milestone-icon { color: var(--ok); }.timing-milestone.warn .timing-milestone-icon { color: var(--warn); }.timing-milestone time { color: var(--text-soft); font-size: .65rem; white-space: nowrap; }.timing-connector { flex: .55 1 58px; min-width: 32px; padding-top: 10px; color: var(--text-main); font-size: .82rem; text-align: center; border-top: 1px solid var(--text-soft); }.timing-total-caption { margin: .8rem auto 0; text-align: center; }.timing-total-caption strong { color: var(--ok); font-size: 1.15rem; }
.timing-levels { display: grid; min-width: 0; gap: .65rem; }.timing-level { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb,var(--surface-soft) 58%,transparent); }.timing-level summary { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 1rem; padding: .9rem 1rem; cursor: pointer; }.timing-level summary>span { display: flex; min-width: 0; align-items: center; gap: .65rem; }.timing-level summary>span:first-child { color: var(--accent-cyan); font-size: 1rem; flex-wrap: wrap; }.timing-level.manual summary>span:first-child,.timing-level.automatic summary>span:first-child { color: var(--warn); }.timing-level.resolved summary>span:first-child { color: var(--ok); }.timing-level summary em { padding: .2rem .55rem; border-radius: 999px; color: inherit; background: color-mix(in srgb,currentColor 14%,transparent); font-size: .68rem; font-style: normal; }.timing-level summary>span:last-child { justify-content: flex-end; color: var(--text-soft); font-size: .72rem; text-align: right; white-space: normal; }.timing-level summary>span:last-child strong { flex: 0 0 auto; color: var(--text-main); font-size: .82rem; white-space: nowrap; }
.timing-level-body { display: grid; grid-template-columns: 1.15fr repeat(3,1fr) .7fr; border-top: 1px solid var(--line); }.timing-level-body>* { padding: 1rem; border-right: 1px solid var(--line); }.timing-level-body>*:last-child { border: 0; }.timing-breakdown { display: grid; gap: .6rem; }.timing-breakdown div { display: flex; justify-content: space-between; gap: .75rem; }.timing-breakdown time,.timing-phase small,.timing-share span { color: var(--text-soft); font-size: .72rem; }.timing-phase { display: grid; align-content: start; gap: .45rem; }.timing-phase strong { font-size: 1.25rem; }.timing-bar { height: 6px; overflow: hidden; border-radius: 99px; background: color-mix(in srgb,var(--text-soft) 20%,transparent); }.timing-bar span { display: block; height: 100%; border-radius: inherit; background: var(--ok); }.timing-phase em,.timing-compliance { width: max-content; padding: .22rem .55rem; border-radius: 99px; font-size: .7rem; font-style: normal; }.timing-phase em.success,.timing-compliance.success { color: var(--ok); background: color-mix(in srgb,var(--ok) 14%,transparent); }.timing-phase em.danger,.timing-compliance.danger { color: var(--accent-red); background: color-mix(in srgb,var(--accent-red) 14%,transparent); }.timing-phase em.operation,.timing-compliance.operation { color: var(--accent-cyan); background: color-mix(in srgb,var(--accent-cyan) 14%,transparent); }.timing-phase em.neutral,.timing-compliance.neutral { color: var(--text-soft); background: color-mix(in srgb,var(--text-soft) 12%,transparent); }.timing-share { display: grid; place-content: center; justify-items: center; text-align: center; }.timing-share strong { color: var(--ok); font-size: 1.5rem; }
.timing-dot { display: inline-block; width: 8px; height: 8px; margin-right: .55rem; border-radius: 50%; background: var(--accent-cyan); }.timing-dot.manual,.timing-dot.automatic { background: var(--warn); }.timing-dot.resolved { background: var(--ok); }.timing-comparison,.timing-comparison .table-scroll { min-width: 0; max-width: 100%; }.timing-comparison .status-table { min-width: 720px; }.timing-final>div { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); }.timing-final span { display: grid; min-width: 0; gap: .35rem; padding: .5rem 1rem; color: var(--text-soft); border-right: 1px solid var(--line); overflow-wrap: anywhere; }.timing-final span:last-child { border: 0; }.timing-final strong { color: var(--text-main); font-size: 1.15rem; overflow-wrap: anywhere; }.timing-final strong.success { color: var(--ok); }.timing-final strong.danger { color: var(--accent-red); }
.theme-light .timing-dashboard-header,.theme-light .timing-panel,.theme-light .timing-summary-widget,.theme-light .timing-kpi { background: linear-gradient(145deg,#fff,#f4f7fb); box-shadow: 0 5px 15px rgba(33,52,79,.05); }.theme-light .timing-level,.theme-light .timing-sla-panel { background: #f8fafd; }
@media (max-width:1200px) { .timing-level-body { grid-template-columns: repeat(2,minmax(0,1fr)); }.timing-dashboard-header { grid-template-columns: minmax(0,1fr) auto; }.timing-dashboard-header>button { grid-column: 2; }.timing-total-line { align-items: stretch; flex-direction: column; overflow: visible; }.timing-milestone { flex: none; min-width: 0; }.timing-connector { align-self: center; flex: none; min-width: 0; width: 1px; height: 34px; padding: 0; border-top: 0; border-left: 1px solid var(--text-soft); writing-mode: vertical-rl; } }
@media (max-width:700px) { .timing-dashboard-header { grid-template-columns: 1fr; padding: .9rem; }.timing-dashboard-header>button { grid-column: auto; width: 100%; }.timing-sla-panel { min-width: 0; width: 100%; }.timing-kpi-grid,.timing-kpi-grid.compact { grid-template-columns: 1fr; }.timing-panel { padding: .85rem; }.timing-level summary { grid-template-columns: 1fr; align-items: flex-start; padding: .75rem; }.timing-level summary>span { min-width: 0; flex-wrap: wrap; }.timing-level summary>span:last-child { justify-content: flex-start; text-align: left; }.timing-level-body { grid-template-columns: 1fr; }.timing-level-body>* { padding: .8rem; border-right: 0; border-bottom: 1px solid var(--line); }.timing-final>div { grid-template-columns: 1fr 1fr; }.timing-final span { min-width: 0; padding: .65rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }.timing-section-heading { align-items: flex-start; flex-direction: column; } }
@media (max-width:420px) { .timing-final>div { grid-template-columns: 1fr; }.timing-dashboard-header h3 { font-size: 1.1rem; }.timing-kpi { min-height: 82px; }.timing-milestone time { white-space: normal; } }

/* Participantes por jerarquia */
.participants-dashboard { display:grid; min-width:0; gap:1rem; color:var(--text-main); }
.participants-header,.participants-panel { min-width:0; border:1px solid var(--line); border-radius:14px; background:linear-gradient(135deg,var(--surface),color-mix(in srgb,var(--surface-soft) 74%,transparent)); }
.participants-header { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1.15rem; }
.participants-title { display:flex; align-items:center; min-width:0; gap:.8rem; }.participants-title>i { color:#3b82f6; font-size:1.8rem; }.participants-title h3,.participants-title p { margin:0; }.participants-title h3 { font-size:1.35rem; }.participants-title p { margin-top:.3rem; color:var(--text-soft); }
.participants-sla { display:flex; flex:0 1 280px; min-width:220px; gap:.75rem; padding:.7rem .9rem; border:1px solid var(--line); border-radius:11px; background:color-mix(in srgb,var(--surface-soft) 70%,transparent); }.participants-sla>i { color:var(--ok); font-size:1.4rem; }.participants-sla div { display:grid; min-width:0; gap:.1rem; }.participants-sla span,.participants-sla small { color:var(--text-soft); font-size:.7rem; }.participants-sla small { color:var(--warn); }
.participants-kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(190px,100%),1fr)); gap:.75rem; }.participants-kpis article { display:flex; align-items:center; min-width:0; min-height:94px; gap:.75rem; padding:.85rem; border:1px solid var(--line); border-radius:12px; background:linear-gradient(145deg,var(--surface-soft),var(--surface)); }.participants-kpis article>i { display:grid; place-items:center; width:44px; height:44px; flex:0 0 44px; border-radius:50%; color:#60a5fa; background:color-mix(in srgb,#3b82f6 18%,transparent); font-size:1.4rem; }.participants-kpis article>div { display:grid; min-width:0; gap:.12rem; }.participants-kpis strong { font-size:1.35rem; }.participants-kpis span { font-weight:700; }.participants-kpis small { color:var(--text-soft); overflow-wrap:anywhere; }.participants-kpis article.success>i { color:var(--ok); background:color-mix(in srgb,var(--ok) 16%,transparent); }.participants-kpis article.attended>i { color:#a970ff; background:color-mix(in srgb,#8b5cf6 17%,transparent); }.participants-kpis article.warn>i { color:var(--warn); background:color-mix(in srgb,var(--warn) 17%,transparent); }.participants-kpis article.danger>i { color:var(--danger); background:color-mix(in srgb,var(--danger) 17%,transparent); }
.participants-panel { padding:.75rem; }.participants-panel>h4 { margin:.1rem .15rem .75rem; }.participant-levels { display:grid; min-width:0; gap:.55rem; }.participant-level { min-width:0; overflow:hidden; border:1px solid var(--line); border-left:3px solid #3b82f6; border-radius:11px; background:color-mix(in srgb,var(--surface-soft) 58%,transparent); }.participant-level.manual,.participant-level.automatic { border-left-color:var(--warn); }.participant-level.resolved { border-left-color:var(--ok); }.participant-level.cancelled { border-left-color:var(--danger); }
.participant-level summary { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:1rem; padding:.75rem .9rem; cursor:pointer; list-style:none; }.participant-level summary::-webkit-details-marker { display:none; }.participant-level summary:focus-visible { outline:2px solid #3b82f6; outline-offset:-2px; }.participant-level-name { display:flex; min-width:0; align-items:center; flex-wrap:wrap; gap:.5rem; color:#60a5fa; font-weight:700; }.participant-level.manual .participant-level-name,.participant-level.automatic .participant-level-name { color:var(--warn); }.participant-level.resolved .participant-level-name { color:var(--ok); }.participant-level.cancelled .participant-level-name { color:var(--danger); }.participant-level-name em,.participant-result-badge { padding:.2rem .55rem; border-radius:999px; background:color-mix(in srgb,currentColor 14%,transparent); font-size:.68rem; font-style:normal; }.participant-result-badge { display:inline-flex; align-items:center; gap:.3rem; color:#60a5fa; white-space:nowrap; }.participant-level.manual .participant-result-badge,.participant-level.automatic .participant-result-badge { color:var(--warn); }.participant-level.resolved .participant-result-badge { color:var(--ok); }.participant-level.cancelled .participant-result-badge { color:var(--danger); }
.participant-level-body { display:grid; grid-template-columns:minmax(190px,.9fr) minmax(250px,1.2fr) minmax(420px,2fr); min-width:0; border-top:1px solid var(--line); }.participant-level-body>section { min-width:0; padding:.95rem; border-right:1px solid var(--line); }.participant-level-body>section:last-child { border-right:0; }.participant-level-body h5 { margin:0 0 .7rem; color:var(--text-main); font-size:.82rem; }
.participant-user-list { display:grid; gap:.55rem; }.participant-user { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:.55rem; color:var(--text-soft); }.participant-avatar { display:grid; place-items:center; width:34px; height:34px; border-radius:50%; color:var(--text-main); background:color-mix(in srgb,var(--text-soft) 18%,transparent); font-weight:800; }.participant-user>div { display:grid; min-width:0; }.participant-user strong { color:var(--text-main); overflow-wrap:anywhere; }.participant-user small { color:var(--text-soft); }.participant-user>i { color:var(--text-soft); }.participant-user.attendee .participant-avatar { color:#fff; background:#2563eb; }.participant-user.attendee>i,.participant-user.attendee small { color:var(--ok); }
.participant-owner>h5 { color:var(--ok); }.participant-level.manual .participant-owner>h5,.participant-level.automatic .participant-owner>h5 { color:var(--warn); }.participant-level.cancelled .participant-owner>h5 { color:var(--danger); }.participant-owner-card { display:grid; min-width:0; gap:.55rem; padding:.8rem; border:1px solid currentColor; border-radius:9px; color:var(--ok); background:color-mix(in srgb,currentColor 5%,transparent); }.participant-level.manual .participant-owner-card,.participant-level.automatic .participant-owner-card { color:var(--warn); }.participant-level.cancelled .participant-owner-card { color:var(--danger); }.participant-owner-card.empty { place-items:center; color:var(--text-soft); text-align:center; }.participant-owner-card.empty>i { font-size:1.6rem; }.participant-owner-card.empty span { color:var(--text-soft); }.participant-owner-name { display:flex; min-width:0; align-items:center; gap:.55rem; }.participant-owner-name>i { font-size:1.25rem; }.participant-owner-name strong { min-width:0; color:var(--text-main); font-size:1.05rem; overflow-wrap:anywhere; }.participant-owner-name em { margin-left:auto; padding:.15rem .45rem; border-radius:999px; background:color-mix(in srgb,currentColor 14%,transparent); font-size:.65rem; font-style:normal; }.participant-owner-card p { display:grid; grid-template-columns:minmax(95px,.75fr) minmax(0,1.25fr); gap:.5rem; margin:0; }.participant-owner-card p span { color:var(--text-soft); }.participant-owner-card p strong { color:var(--text-main); overflow-wrap:anywhere; }.participant-motive { padding-top:.5rem; border-top:1px solid color-mix(in srgb,currentColor 30%,transparent); }
.participant-activity { overflow:hidden; }.participant-timeline { display:flex; align-items:flex-start; justify-content:center; min-width:0; gap:.35rem; padding:.4rem 0; }.participant-timeline-step { display:grid; flex:1 1 90px; min-width:68px; justify-items:center; gap:.2rem; text-align:center; }.participant-timeline-step>span { display:grid; place-items:center; width:38px; height:38px; border:1px solid currentColor; border-radius:50%; color:#60a5fa; background:color-mix(in srgb,#3b82f6 12%,var(--surface)); }.participant-timeline-step.responded>span,.participant-timeline-step.arrival>span,.participant-timeline-step.resolved>span { color:var(--ok); }.participant-timeline-step.manual>span,.participant-timeline-step.automatic>span { color:var(--warn); }.participant-timeline-step.cancelled>span { color:var(--danger); }.participant-timeline-step time { color:var(--text-soft); font-size:.65rem; white-space:nowrap; }.participant-timeline-step strong { font-size:.7rem; }.participant-timeline-arrow { flex:0 1 45px; margin-top:11px; color:var(--text-soft); text-align:center; }.participant-empty { margin:.4rem 0; color:var(--text-soft); }
.theme-light .participants-header,.theme-light .participants-panel,.theme-light .participants-kpis article { background:linear-gradient(145deg,#fff,#f4f7fb); box-shadow:0 5px 15px rgba(33,52,79,.05); }.theme-light .participants-sla,.theme-light .participant-level { background:#f8fafd; }
@media (max-width:1100px) { .participant-level-body { grid-template-columns:minmax(0,1fr) minmax(0,1.25fr); }.participant-activity { grid-column:1/-1; border-top:1px solid var(--line); }.participant-level-body>section:nth-child(2) { border-right:0; } }
@media (max-width:700px) { .participants-header { align-items:stretch; flex-direction:column; padding:.9rem; }.participants-sla { flex:none; min-width:0; width:100%; }.participants-title { align-items:flex-start; }.participants-title h3 { font-size:1.15rem; }.participants-kpis { grid-template-columns:1fr; }.participant-level summary { grid-template-columns:1fr; align-items:start; gap:.5rem; }.participant-result-badge { width:max-content; max-width:100%; white-space:normal; }.participant-level-body { grid-template-columns:1fr; }.participant-level-body>section { padding:.8rem; border-right:0; border-bottom:1px solid var(--line); }.participant-level-body>section:last-child { border-bottom:0; }.participant-activity { grid-column:auto; border-top:0; }.participant-timeline { align-items:center; flex-direction:column; }.participant-timeline-step { flex:none; min-width:0; }.participant-timeline-step time { white-space:normal; }.participant-timeline-arrow { flex:none; margin:0; transform:rotate(90deg); }.participant-owner-card p { grid-template-columns:1fr; gap:.1rem; } }

/* Fidelidad del mockup de Participantes */
.participants-dashboard { gap:.7rem; padding:1rem; border:1px solid var(--line); border-radius:12px; background:linear-gradient(135deg,color-mix(in srgb,var(--surface) 92%,transparent),color-mix(in srgb,var(--surface-soft) 54%,transparent)); }
.participants-header { display:grid; grid-template-columns:minmax(0,1fr) minmax(240px,280px); padding:.15rem .1rem .45rem; border:0; border-radius:0; background:transparent; }
.participants-title>i { font-size:1.65rem; }.participants-title h3 { font-size:1.45rem; }.participants-title p { font-size:.82rem; }
.participants-sla { width:100%; min-width:0; padding:.6rem .8rem; }
.participants-export,.participants-filters button,.participants-filters input,.participants-filters select { min-height:38px; border:1px solid var(--line); border-radius:7px; color:var(--text-main); background:color-mix(in srgb,var(--surface-soft) 65%,transparent); font:inherit; }
.participants-export { display:inline-flex; align-items:center; justify-content:center; gap:.45rem; padding:.5rem .85rem; cursor:pointer; }.participants-export:hover,.participants-filters button:hover { border-color:#3b82f6; color:#60a5fa; }
.participants-kpis { grid-template-columns:repeat(5,minmax(0,1fr)); gap:.9rem; }.participants-kpis article { min-height:100px; padding:.8rem .9rem; }.participants-kpis article>i { width:48px; height:48px; flex-basis:48px; font-size:1.55rem; }.participants-kpis strong { font-size:1.55rem; }.participants-kpis span { font-size:.78rem; }.participants-kpis small { font-size:.7rem; }
.participants-filters { display:grid; grid-template-columns:minmax(250px,1.7fr) minmax(175px,.9fr) minmax(175px,.9fr) minmax(150px,.7fr); gap:.75rem; }.participants-filters label { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; min-width:0; padding:0 .7rem; border:1px solid var(--line); border-radius:7px; color:var(--text-soft); background:color-mix(in srgb,var(--surface-soft) 65%,transparent); }.participants-filters label input { min-width:0; padding:.45rem; border:0; background:transparent; outline:0; }.participants-filters select { min-width:0; padding:.45rem .7rem; }.participants-filters button { display:inline-flex; align-items:center; justify-content:center; gap:.4rem; padding:.45rem .7rem; cursor:pointer; }
.participants-panel { padding:.65rem; }.participants-panel-heading { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin:0 .1rem .55rem; }.participants-panel-heading h4 { margin:0; }.participants-panel-heading .participant-result-badge.resolved { color:#60a5fa; }.participants-panel-heading .participant-result-badge.cancelled { color:var(--danger); }.participants-panel-heading .participant-result-badge.automatic { color:var(--warn); }
.participant-levels { gap:.45rem; }.participant-level summary { padding:.5rem .7rem; }.participant-level-name { font-size:.92rem; }.participant-level-body { grid-template-columns:minmax(205px,.85fr) minmax(300px,1.35fr) minmax(480px,2.5fr); }.participant-level-body>section { padding:.7rem .85rem; }.participant-user-list { gap:.38rem; }.participant-avatar { width:34px; height:34px; }.participant-level.manual .participant-avatar,.participant-level.automatic .participant-avatar { color:#fff; background:color-mix(in srgb,var(--warn) 88%,#000); }.participant-level.resolved .participant-avatar { color:#fff; background:color-mix(in srgb,var(--ok) 82%,#075); }.participant-level.cancelled .participant-avatar { color:#fff; background:color-mix(in srgb,var(--danger) 82%,#600); }.participant-owner-card { gap:.35rem; padding:.65rem .75rem; }.participant-owner-card p { font-size:.72rem; }.participant-timeline { padding:.25rem 0; }.participant-timeline-step>span { width:38px; height:38px; }.participant-timeline-step time,.participant-timeline-step strong { font-size:.68rem; }.participant-timeline-arrow { margin-top:10px; }
.participants-no-response { margin-top:.55rem; overflow:hidden; border:1px solid var(--line); border-left:3px solid var(--danger); border-radius:9px; background:color-mix(in srgb,var(--surface-soft) 55%,transparent); }.participants-no-response>header { display:flex; align-items:center; gap:.45rem; padding:.45rem .7rem; color:var(--danger); }.participants-no-response-row { display:grid; grid-template-columns:minmax(230px,1.2fr) repeat(4,minmax(150px,1fr)); align-items:center; gap:1rem; padding:.55rem .8rem; border-top:1px solid var(--line); }.participants-no-response-row>span { display:grid; min-width:0; gap:.1rem; }.participants-no-response-row small { color:var(--text-soft); }.participants-no-response-row strong { overflow-wrap:anywhere; }.participants-no-response-row .participant-user { display:grid; }
.theme-light .participants-dashboard { background:linear-gradient(145deg,#fff,#eef4fb); }.theme-light .participants-header { box-shadow:none; background:transparent; }.theme-light .participants-filters label,.theme-light .participants-filters input,.theme-light .participants-filters select,.theme-light .participants-filters button,.theme-light .participants-export,.theme-light .participants-no-response { color:var(--text-main); background:#fff; }
@media (max-width:1250px) { .participants-kpis { grid-template-columns:repeat(3,minmax(0,1fr)); }.participant-level-body { grid-template-columns:minmax(0,1fr) minmax(0,1.25fr); }.participant-activity { grid-column:1/-1; border-top:1px solid var(--line); }.participant-level-body>section:nth-child(2) { border-right:0; }.participants-no-response-row { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:850px) { .participants-header { grid-template-columns:1fr; }.participants-export { width:100%; }.participants-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }.participants-filters { grid-template-columns:1fr 1fr; }.participants-filters label { grid-column:1/-1; } }
@media (max-width:700px) { .participants-dashboard { padding:.65rem; }.participants-header { display:grid; padding:.15rem; }.participants-kpis { grid-template-columns:1fr; }.participants-filters { grid-template-columns:1fr; }.participants-filters label { grid-column:auto; }.participant-level-body { grid-template-columns:1fr; }.participant-level-body>section:nth-child(2) { border-right:0; }.participants-no-response-row { grid-template-columns:1fr; gap:.55rem; }.participants-panel-heading { align-items:flex-start; flex-direction:column; }.participant-timeline { flex-direction:column; }.participant-timeline-arrow { transform:rotate(90deg); } }

html:has(.theme-light),
body:has(.theme-light) {
    background: #eef3f9;
}

.theme-light.app-theme {
    background: linear-gradient(160deg, #f8fbff, #eef3f9 48%, #e6edf7);
}

.theme-light .scene-bg {
    background: none;
}

.theme-light .app-topbar {
    background: linear-gradient(180deg, #ffffff, #eef3f9);
    border-bottom-color: #c8d5e8;
    box-shadow: 0 8px 22px rgba(30, 43, 68, 0.12);
}

.theme-light .brand-zone,
.theme-light .menu-toggle,
.theme-light .menu-items a {
    border-color: #d2dceb;
}

.theme-light .menu-items a.active {
    color: #172033;
    background: #e8eef7;
    border-bottom-color: var(--accent-red);
}

.theme-light .brand-logo {
    background-image: url("../images/Logo_white.png");
    filter: drop-shadow(0 1px 5px rgba(30, 43, 68, 0.14));
}

.theme-light .menu-toggle::before,
.theme-light .menu-toggle::after {
    border-top-color: #273449;
}

.theme-light .date-picker,
.theme-light .ghost-button,
.theme-light .clock-chip,
.theme-light .text-input,
.theme-light .andon-check-row,
.theme-light select,
.theme-light .menu-action {
    border-color: #b9c8dc;
    background: #ffffff;
    color: #172033;
}

.theme-light .user-menu-trigger {
    color: #172033;
}

.theme-light .user-menu-trigger:hover,
.theme-light .user-menu-trigger:focus-visible,
.theme-light .user-menu-trigger.is-open {
    border-color: #b9c8dc;
    background: #edf3fb;
}

.theme-light .user-trigger-copy small,
.theme-light .user-menu-chevron {
    color: #60708b;
}

.theme-light .user-menu-panel {
    border-color: #b9c8dc;
    background: linear-gradient(155deg, #fff, #eef3f9);
    color: #172033;
    box-shadow: 0 18px 42px rgba(33, 48, 76, 0.2);
}

.theme-light .user-menu-profile,
.theme-light .user-menu-logout {
    border-color: #d2dceb;
}

.theme-light .user-menu-profile small,
.theme-light .user-menu-item,
.theme-light .user-menu-item i {
    color: #60708b;
}

.theme-light .user-menu-item:hover,
.theme-light .user-menu-item:focus-visible {
    background: #e3ebf5;
    color: #172033;
}

.theme-light .user-menu-logout,
.theme-light .user-menu-logout i {
    color: #d92843;
}

.theme-light .menu-theme-pill {
    border-color: #b9c8dc;
    background: #edf3fb;
    box-shadow: 0 0 0 1px rgba(159, 176, 200, 0.2) inset;
}

.theme-light .menu-logout-action {
    color: #d92843;
}

.theme-light .theme-toggle {
    border-color: #d9d9d9;
    background: #d7d7d7;
    color: #172033;
    box-shadow: none;
}

.theme-light .sun-icon {
    background: #ffffff;
    color: #4b4b4b;
    box-shadow: 0 1px 5px rgba(60, 60, 60, 0.14);
}

.theme-light .moon-icon {
    color: rgba(69, 69, 69, 0.34);
}

.theme-light .board-shell,
.theme-light .login-card,
.theme-light .kpi-card,
.theme-light .widget,
.theme-light .summary-cards div,
.theme-light .chain-card,
.theme-light .monitor-card,
.theme-light .andon-modal {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(242, 246, 252, 0.97));
    border-color: var(--line);
    box-shadow: 0 16px 36px rgba(33, 48, 76, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    color: var(--text-main);
}

.theme-light .kpi-card::before {
    border-color: rgba(4, 119, 184, 0.14);
}

.theme-light .kpi-card::after {
    background: radial-gradient(circle, rgba(4, 119, 184, 0.12), transparent 62%);
}

.theme-light .h-bar,
.theme-light .trend-line,
.theme-light .bitacora-compact-table,
.theme-light .pager-button,
.theme-light .detail-header-grid div,
.theme-light .bitacora-view-button,
.theme-light .edit-icon-button {
    background: #f6f9fd;
    border-color: var(--line);
    color: var(--text-main);
}

.theme-light .trend-line {
    background: repeating-linear-gradient(180deg, #f9fbfe 0, #f9fbfe 29px, #edf2f8 29px, #edf2f8 30px);
}

.theme-light .bitacora-compact-table tbody tr {
    background: #ffffff;
}

.theme-light .bitacora-compact-table tbody tr:hover {
    background: #f1f6fc;
}

.theme-light .bitacora-compact-table td,
.theme-light .status-table td {
    color: #223049;
    border-bottom-color: #d8e1ee;
}

.theme-light .status-table th,
.theme-light .bitacora-compact-table th {
    color: #465977;
}

.theme-light .mini-group,
.theme-light .count-chip {
    background: #e8eef7;
    color: #223049;
}

.theme-light .cost-rate-strip div {
    background: #ffffff;
    border-color: var(--line);
}

.theme-light .cost-message-content {
    background: #ffffff;
    color: #172033;
    border-color: #cbd6e6;
}

.theme-light .cost-kind.template {
    background: #eaf1ff;
    color: #1f63e9;
}

.theme-light .cost-kind.free {
    background: #e8f7ee;
    color: #087a44;
}

.theme-light .cost-kind.fallback {
    background: #fff7df;
    color: #8b6505;
}

.theme-light .folio-link {
    color: #1f63e9;
}

.theme-light .status-action-way {
    border-color: rgba(31, 99, 233, 0.24);
    background: #eaf1ff;
    color: #1f63e9;
}

.theme-light .status-action-site {
    border-color: rgba(4, 119, 184, 0.24);
    background: #e6f7fc;
    color: #0477b8;
}

.theme-light .status-action-resolved {
    border-color: rgba(8, 122, 68, 0.24);
    background: #e8f7ee;
    color: #087a44;
}

.theme-light .status-action-escalate {
    border-color: rgba(170, 122, 5, 0.24);
    background: #fff7df;
    color: #8b6505;
}

.theme-light .technician-escalation-reason {
    background: #fff8e6;
    border-color: #e8c86f;
}

.theme-light .technician-escalation-reason strong {
    color: #805800;
}

.theme-light .status-action-report {
    border-color: rgba(215, 47, 73, 0.24);
    background: #ffe7eb;
    color: var(--danger);
}

.theme-light .technician-alert-card.alert-pending-highlight {
    border-left-color: var(--danger);
}

.theme-light .technician-alert-card.alert-way-highlight {
    border-left-color: #1f63e9;
}

.theme-light .technician-alert-card.alert-site-highlight {
    border-left-color: var(--accent-cyan);
}

.theme-light .technician-alert-card.alert-escalated-highlight,
.theme-light .monitor-card.warn {
    border-left-color: var(--warn);
}

.theme-light .monitor-card.info,
.theme-light .monitor-card.cyan {
    border-left-color: var(--accent-cyan);
}

.theme-light .monitor-card.danger {
    border-left-color: var(--danger);
}

.theme-light .monitor-card.blue {
    border-left-color: #1f63e9;
}

.theme-light .monitor-card.ok {
    border-left-color: var(--ok);
}

.theme-light .monitor-card.muted {
    border-left-color: var(--text-soft);
}

.theme-light .board-footer,
.theme-light .andon-tabs,
.theme-light .andon-modal header,
.theme-light .andon-modal footer {
    border-color: var(--line);
}

.theme-light .board-footer p,
.theme-light .login-card p,
.theme-light .trend-values {
    color: var(--text-main);
}

.theme-light .pager-button.active,
.theme-light .action,
.theme-light .icon-button {
    border-color: #1f63e9;
    background: #2563eb;
    color: #ffffff;
}

.theme-light .technician-report-modal {
    background: linear-gradient(145deg, #ffffff, #f4f7fb);
    color: #172033;
    border-color: #cbd6e6;
}

.theme-light .technician-report-heading h3 {
    color: #172033;
}

.theme-light .technician-report-mobile .technician-report-heading h3 {
    color: #172033;
}

.theme-light .technician-report-mobile .technician-report-heading p {
    color: #60708b;
}

.theme-light .technician-report-heading p,
.theme-light .technician-report-counter,
.theme-light .evidence-file-size,
.theme-light .evidence-file-type,
.theme-light .evidence-file-picker small,
.theme-light .technician-report-hint {
    color: #60708b;
}

.theme-light .technician-report-section {
    background: #ffffff;
    border-color: #cbd6e6;
    box-shadow: 0 1px 3px rgba(30, 43, 68, 0.08);
}

.theme-light .andon-modal.technician-report-mobile {
    background: #f4f7fb;
    color: #172033;
    border-color: #cbd6e6;
    box-shadow: 0 24px 70px rgba(30, 43, 68, 0.28);
}

.theme-light .technician-report-mobile .technician-report-header,
.theme-light .technician-report-mobile.resolution .technician-report-header,
.theme-light .technician-report-mobile.escalation .technician-report-header {
    background: #ffffff;
    border-bottom-color: #cbd6e6 !important;
}

.theme-light .technician-report-mobile .mobile-report-close {
    border-color: rgba(215, 47, 73, 0.56);
    background: rgba(215, 47, 73, 0.08);
    color: var(--danger);
}

.theme-light .technician-report-mobile .mobile-report-close:hover {
    border-color: var(--danger);
    background: var(--danger);
    color: #ffffff;
}

.theme-light .technician-report-mobile .andon-modal-body {
    background: #f4f7fb;
}

.theme-light .technician-report-mobile .mobile-report-summary {
    background: #ffffff;
    border-color: #cbd6e6;
    box-shadow: 0 8px 20px rgba(30, 43, 68, 0.1);
}

.theme-light .technician-report-mobile .mobile-report-equipment,
.theme-light .technician-report-mobile .mobile-report-compact-meta strong {
    color: #172033;
}

.theme-light .technician-report-mobile .mobile-report-compact-meta span {
    color: #60708b;
}

.theme-light .technician-report-mobile .mobile-report-compact-meta i {
    color: #60708b;
}

.theme-light .technician-report-mobile .mobile-report-compact-meta .status-dot {
    color: #f5a400;
}

.theme-light .technician-report-mobile .mobile-report-toggle {
    border-top-color: #dce5f2;
    color: #465977;
}

.theme-light .technician-report-mobile .mobile-report-section {
    background: #ffffff;
    border-color: #cbd6e6;
    box-shadow: 0 8px 20px rgba(30, 43, 68, 0.1);
}

.theme-light .mobile-report-section-title strong,
.theme-light .mobile-report-meta-grid strong {
    color: #172033;
}

.theme-light .mobile-report-summary .mobile-report-meta-grid strong {
    color: #172033;
}

.theme-light .mobile-report-section-title small,
.theme-light .mobile-report-meta-grid span {
    color: #60708b;
}

.theme-light .mobile-report-summary .mobile-report-meta-grid span {
    color: #60708b;
}

.theme-light .mobile-report-meta-grid i {
    color: #60708b;
}

.theme-light .technician-report-mobile .technician-report-titlemark,
.theme-light .technician-report-mobile.escalation .technician-report-titlemark,
.theme-light .mobile-report-machine,
.theme-light .technician-report-mobile.escalation .mobile-report-machine {
    border-color: rgba(31, 99, 233, 0.28);
    background: rgba(31, 99, 233, 0.1);
    color: #2563eb;
}

.theme-light .mobile-report-folio strong,
.theme-light .technician-report-mobile.escalation .mobile-report-folio strong {
    color: #2563eb;
}

.theme-light .report-step,
.theme-light .technician-report-mobile.escalation .report-step {
    background: #2563eb;
    color: #ffffff;
}

.theme-light .technician-report-mobile footer .action,
.theme-light .technician-report-mobile.resolution footer .action,
.theme-light .technician-report-mobile.escalation footer .action {
    border-color: #1f63e9;
    background: #2563eb;
    color: #ffffff;
}

.theme-light .technician-report-mobile footer {
    background: #ffffff;
    border-top-color: #cbd6e6 !important;
}

.theme-light .technician-report-mobile footer .modal-danger-action {
    border-color: #dc2f4a;
    background: #dc2f4a;
    color: #ffffff;
}

.theme-light .technician-report-section-title {
    color: #172033;
}

.theme-light .technician-report-textarea {
    background: #ffffff;
    border-color: #b9c8dc;
    color: #172033;
    box-shadow: inset 0 1px 0 rgba(30, 43, 68, 0.03);
}

.theme-light .technician-report-textarea::placeholder {
    color: #8493aa;
}

.theme-light .report-readonly-field {
    background: #ffffff;
    border-color: #b9c8dc;
    color: #172033;
    box-shadow: inset 0 1px 0 rgba(30, 43, 68, 0.03);
}

.theme-light .evidence-file-picker {
    background: #f8fbff;
    border-color: #b9c8dc;
    color: #172033 !important;
}

.theme-light .technician-report-mobile .evidence-file-picker {
    background: #f8fbff;
    border-color: #b9c8dc;
    color: #172033 !important;
}

.theme-light .technician-report-mobile .evidence-file-picker small,
.theme-light .technician-report-mobile .technician-report-counter,
.theme-light .technician-report-mobile .evidence-file-size,
.theme-light .technician-report-mobile .evidence-file-type {
    color: #60708b;
}

.theme-light .evidence-file-row {
    color: #172033;
    border-bottom-color: #dce5f2;
}

.theme-light .technician-report-mobile .evidence-file-row {
    color: #172033;
    border-bottom-color: #dce5f2;
}

.theme-light .evidence-remove-button {
    color: #60708b;
}

.theme-light .evidence-remove-button:hover {
    background: #e8eef8;
    color: #172033;
}

.theme-light .evidence-add-button {
    background: linear-gradient(180deg, #ff4e6b, #e73358);
    border-color: rgba(231, 51, 88, 0.72);
    color: #ffffff;
}

.theme-light .evidence-add-button:hover {
    background: linear-gradient(180deg, #ff617a, #ee3b5f);
}

.theme-light .evidence-file-card,
.theme-light .evidence-empty-state {
    background: #f8fbff;
    border-color: #d6e0ee;
    color: #172033;
}

.theme-light .evidence-empty-state small {
    color: #60708b;
}

.theme-light .technician-report-hint {
    background: #f8fbff;
    border-color: #d6e0ee;
}

.theme-light .report-page-loader {
    background: rgba(238, 243, 249, 0.76);
}

.theme-light .report-page-loader-box {
    background: #ffffff;
    border-color: #bfd0e8;
    color: #172033;
    box-shadow: 0 20px 50px rgba(30, 43, 68, 0.18);
}

.theme-light .report-page-loader-box span {
    color: #60708b;
}

.theme-light .escalation-report-message {
    color: #172033;
}

.theme-light .escalation-report-empty {
    color: #60708b;
}

.theme-light .report-evidence-tile {
    background: #f8fbff;
    border-color: #cbd6e6;
    color: #172033;
}

.theme-light .report-evidence-tile small {
    color: #60708b;
}

.theme-light .evidence-preview-panel {
    background: #f8fbff;
    border-color: #cbd6e6;
}

.theme-light .evidence-preview-panel img,
.theme-light .evidence-preview-panel video,
.theme-light .evidence-preview-panel iframe {
    background: #ffffff;
}

@media (max-width: 760px) {
    .andon-modal.technician-report-mobile {
        width: min(100%, calc(100vw - 0.75rem));
    }

    .mobile-report-meta-grid,
    .evidence-uploader-grid {
        grid-template-columns: 1fr;
    }

    .technician-report-header {
        padding: 1rem !important;
    }

    .technician-report-titlemark {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
        font-size: 1.25rem;
    }

    .technician-report-modal .andon-modal-body {
        padding: 1rem;
    }

    .evidence-file-picker {
        align-items: flex-start;
        flex-direction: column;
    }

    .evidence-file-picker small {
        text-align: left;
    }

    .evidence-section-title {
        display: flex;
        align-items: flex-start;
        flex-direction: column;
    }

    .evidence-title-copy {
        width: 100%;
    }

    .evidence-add-button {
        box-sizing: border-box;
        width: 100%;
        justify-content: center;
    }

    .evidence-file-card-grid {
        grid-template-columns: 1fr;
    }

    .evidence-file-row {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .evidence-file-type,
    .evidence-file-size {
        display: none;
    }

    .evidence-file-card {
        gap: 0.35rem;
    }

    .technician-report-hint {
        width: 100%;
        margin-right: 0;
    }
}

/* Responsive density adjustments for web and Capacitor shells */
@media (max-width: 1600px) {
    .app-topbar {
        gap: 0.35rem;
    }

    .brand-zone {
        gap: 0.55rem;
        padding: 0 0.75rem;
    }

    .brand-zone strong {
        max-width: 5.9rem;
        line-height: 1.25;
    }

    .menu-items a {
        padding: 0 0.75rem;
        font-size: 0.95rem;
    }

    .toolbar {
        gap: 0.45rem;
        padding: 0 0.45rem;
    }

    .date-picker,
    .ghost-button,
    .clock-chip,
    .theme-toggle {
        font-size: 0.9rem;
        padding: 0.35rem 0.55rem;
    }

    .clock-chip {
        max-width: 4.2rem;
        line-height: 1.2;
        text-align: center;
    }

    .dashboard-page {
        padding: 0.7rem;
        gap: 1rem;
    }

    .kpi-grid {
        gap: 0.8rem;
        padding: 0.8rem;
    }

    .kpi-card {
        border-radius: 12px;
        padding: 0.8rem;
    }

    .kpi-card h3 {
        font-size: 1.85rem;
    }

    .kpi-icon {
        width: 36px;
        height: 36px;
    }

    .widget-grid {
        gap: 0.8rem;
    }
}

@media (max-width: 1400px) {
    .user-trigger-copy {
        display: none;
    }

    .user-menu-trigger {
        grid-template-columns: auto auto;
        gap: 0.2rem;
    }
}

@media (max-width: 1180px) {
    .app-topbar {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: stretch;
        gap: 0;
        padding-bottom: 0;
    }

    .top-left {
        grid-column: 1;
        height: 56px;
    }

    .brand-zone {
        height: 56px;
    }

    .brand-logo {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    .menu-toggle {
        width: 48px;
        height: 56px;
    }

    .menu-toggle::before {
        top: 20px;
    }

    .menu-toggle::after {
        top: 30px;
    }

    .menu-items {
        grid-column: 2;
        height: 56px;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .menu-items a {
        height: 56px;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .toolbar {
        grid-column: 1 / -1;
        width: 100%;
        margin-left: 0;
        padding: 0.45rem 0.7rem;
        justify-content: flex-end;
        border-top: 1px solid rgba(35, 48, 70, 0.65);
        flex-wrap: wrap;
        overflow: visible;
    }

    .kpi-grid {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }
}

@media (max-width: 900px) {
    .app-topbar {
        grid-template-columns: 1fr;
    }

    .top-left,
    .menu-items,
    .toolbar {
        grid-column: 1;
    }

    .top-left {
        justify-content: space-between;
        border-bottom: 1px solid rgba(35, 48, 70, 0.65);
    }

    .brand-zone {
        flex: 1 1 auto;
        min-width: 0;
    }

    .brand-zone strong {
        max-width: none;
        font-size: 0.9rem;
    }

    .menu-items {
        display: flex;
        height: 48px;
        border-bottom: 1px solid rgba(35, 48, 70, 0.65);
    }

    .menu-items a {
        height: 48px;
        padding: 0 0.85rem;
        font-size: 0.9rem;
    }

    .toolbar {
        justify-content: flex-start;
        gap: 0.4rem;
    }

    .date-picker {
        min-width: 8.5rem;
    }

    .clock-chip {
        max-width: none;
        white-space: nowrap;
    }

    .dashboard-page,
    .andon-page {
        padding: 0.55rem;
    }

    .andon-header {
        margin-bottom: 0.65rem;
    }

    .andon-header h2 {
        font-size: 1.45rem;
    }

    .andon-header p {
        font-size: 0.9rem;
    }

    .andon-actions {
        width: 100%;
    }

    .andon-actions .action,
    .andon-actions .ghost-button {
        flex: 1 1 auto;
    }

    .andon-filters {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .cost-kpis,
    .cost-rate-strip,
    .cost-filters {
        grid-template-columns: 1fr;
    }

    .text-input {
        margin-bottom: 0.45rem;
    }

    .kpi-grid,
    .andon-kpis.seven {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
        padding: 0.55rem;
    }

    .kpi-card {
        min-height: 0;
        padding: 0.65rem;
    }

    .kpi-header {
        gap: 0.45rem;
        font-size: 0.78rem;
    }

    .kpi-card h3 {
        font-size: 1.6rem;
    }

    .kpi-card .trend,
    .kpi-card p,
    .kpi-card span {
        font-size: 0.84rem;
    }

    .kpi-icon {
        width: 32px;
        height: 32px;
        border-width: 2px;
    }

    .widget-grid,
    .widget-grid.two,
    .andon-grid,
    .andon-grid.two,
    .technician-alert-grid {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .widget {
        padding: 0.75rem;
        margin-bottom: 0.65rem;
    }

    .widget h4 {
        font-size: 1rem;
    }

    .heat {
        height: 22px;
    }

    .hour-labels {
        margin-left: 0;
        font-size: 0.72rem;
    }
}

@media (max-width: 520px) {
    .brand-zone {
        padding: 0 0.6rem;
    }

    .brand-zone strong {
        font-size: 0.78rem;
        letter-spacing: 0.08em;
    }

    .brand-logo {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
    }

    .menu-items a {
        padding: 0 0.75rem;
        font-size: 0.86rem;
    }

    .toolbar {
        padding: 0.4rem 0.5rem;
        flex-wrap: nowrap;
    }

    .date-picker,
    .ghost-button,
    .clock-chip,
    .theme-toggle {
        font-size: 0.82rem;
    }

    .user-menu-trigger {
        min-height: 38px;
        padding: 0.15rem 0.25rem;
    }

    .user-avatar {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    .user-menu-panel {
        position: fixed;
        top: calc(154px + var(--safe-area-top));
        right: calc(0.5rem + var(--safe-area-right));
    }

    .theme-toggle {
        width: 3.7rem;
        min-width: 3.7rem;
    }

    .kpi-grid,
    .andon-kpis.seven {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .board-footer {
        padding: 0.7rem;
    }

    .footer-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .footer-actions .action {
        flex: 1 1 auto;
    }

    .status-table {
        min-width: 680px;
    }

    .consolidated-table,
    .bitacora-compact-table {
        min-width: 1280px;
    }

    .andon-modal-backdrop {
        padding: calc(0.45rem + var(--safe-area-top))
            calc(0.45rem + var(--safe-area-right))
            calc(0.45rem + var(--safe-area-bottom))
            calc(0.45rem + var(--safe-area-left));
        place-items: stretch;
    }

    .andon-modal {
        width: 100%;
        max-height: calc(100dvh - 0.9rem - var(--safe-area-top) - var(--safe-area-bottom));
        border-radius: 12px;
    }

    .andon-modal header,
    .andon-modal footer {
        padding: 0.75rem;
    }

    .andon-modal header {
        align-items: flex-start;
    }

    .andon-modal h3 {
        max-width: calc(100vw - 5.8rem);
        overflow-wrap: anywhere;
        font-size: 1rem;
        line-height: 1.25;
    }

    .modal-close-button {
        width: 38px;
        height: 38px;
        min-height: 38px;
        flex: 0 0 38px;
    }

    .andon-modal-body {
        padding: 0.75rem;
    }

    .evidence-preview-panel {
        padding: 0.55rem;
    }

    .evidence-preview-panel img,
    .evidence-preview-panel video,
    .evidence-preview-panel iframe {
        max-height: calc(100dvh - 12rem);
    }

    .evidence-preview-panel iframe {
        min-height: calc(100dvh - 12rem);
    }
}

.menu-scrim {
    display: none;
}

@media (max-width: 900px) {
    .app-topbar .menu-scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1001;
        border: 0;
        background: rgba(3, 9, 20, 0.62);
        backdrop-filter: blur(2px);
    }

    .app-topbar .menu-toggle {
        z-index: 1004;
    }

    .app-topbar .menu-toggle.is-open::before {
        top: 28px;
        transform: rotate(45deg);
    }

    .app-topbar .menu-toggle.is-open::after {
        top: 28px;
        transform: rotate(-45deg);
    }

    .app-topbar .menu-items {
        position: fixed;
        top: calc(56px + var(--safe-area-top));
        left: var(--safe-area-left);
        bottom: var(--safe-area-bottom);
        z-index: 1002;
        width: min(76vw, 260px);
        height: calc(100dvh - 56px - var(--safe-area-top) - var(--safe-area-bottom));
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.2rem;
        padding: 12px 10px calc(18px + var(--safe-area-bottom));
        border-top: 1px solid rgba(35, 48, 70, 0.68);
        border-right: 1px solid rgba(67, 97, 140, 0.62);
        border-bottom: 0;
        background: linear-gradient(180deg, rgba(9, 18, 31, 0.99), rgba(8, 14, 27, 0.99));
        box-shadow: 24px 0 50px rgba(0, 0, 0, 0.38);
        overflow-y: auto;
        overflow-x: hidden;
        transform: translateX(-105%);
        transition: transform 0.22s ease;
        -webkit-overflow-scrolling: touch;
    }

    .app-topbar .menu-items.is-open {
        transform: translateX(0);
    }

    .app-topbar .menu-items a {
        width: 100%;
        min-height: 42px;
        height: 42px;
        justify-content: flex-start;
        padding: 0 12px;
        border-radius: 6px;
        border-right: 0;
        border-bottom: 0;
        border-left: 2px solid transparent;
        color: #a9b5cb;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .app-topbar .menu-items a.active {
        color: #ffffff;
        border-bottom: 0;
        border-left-color: var(--accent-red);
        background: rgba(255, 255, 255, 0.045);
    }

    .app-topbar .menu-actions {
        width: 100%;
        display: grid;
        gap: 0.35rem;
        margin-top: auto;
        padding: 0.85rem 0.2rem 0;
        border-top: 1px solid rgba(67, 97, 140, 0.28);
    }

    .toolbar .theme-toggle {
        display: none;
    }

    .app-topbar .menu-action {
        width: 100%;
        min-height: 38px;
        justify-content: flex-start;
        border-color: transparent;
        background: transparent;
        padding: 0.35rem 0.45rem;
        font-size: 0.78rem;
    }

    .app-topbar .menu-theme-action {
        justify-content: space-between;
        color: #a9b5cb;
    }

    .app-topbar .menu-logout-action {
        color: #ff4f64;
    }

    .theme-light .app-topbar .menu-scrim {
        background: rgba(23, 32, 51, 0.32);
    }

    .theme-light .app-topbar .menu-items {
        border-top-color: #d2dceb;
        border-right-color: #b9c8dc;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(241, 246, 252, 0.99));
        box-shadow: 24px 0 50px rgba(33, 48, 76, 0.18);
    }

    .theme-light .app-topbar .menu-items a {
        color: #60708b;
    }

    .theme-light .app-topbar .menu-items a.active {
        color: #172033;
        border-left-color: var(--accent-red);
        background: #eef3f9;
    }

    .theme-light .app-topbar .menu-actions {
        border-top-color: #d2dceb;
    }

    .theme-light .app-topbar .menu-theme-action {
        color: #60708b;
    }

    .theme-light .app-topbar .menu-logout-action {
        color: #d92843;
    }
}

@media (min-width: 901px) {
    .app-topbar .menu-items {
        display: none;
        max-width: min(72vw, calc(100vw - 360px));
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
        transform: none !important;
        -webkit-overflow-scrolling: touch;
    }

    .app-topbar .menu-items.is-open {
        display: flex;
    }

    .app-topbar .menu-scrim {
        display: none !important;
    }

    .app-topbar .menu-items a {
        flex: 0 0 auto;
        white-space: nowrap;
    }

}

@media (min-width: 901px) and (max-width: 1180px) {
    .app-topbar .menu-items.is-open {
        grid-column: 2;
        height: 56px;
    }
}

.profile-photo-input {
    display: none !important;
}

.brand-zone {
    color: inherit;
    text-decoration: none;
}

/* Toggles de estado usados por los formularios de Smart Andon. */
.status-toggle { display: inline-flex; align-items: center; gap: .65rem; min-height: 32px; color: var(--text-main); cursor: pointer; }
.status-toggle input[type="checkbox"] { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none; }
.status-toggle-track { position: relative; width: 42px; height: 24px; flex: 0 0 42px; border: 1px solid #667995; border-radius: 999px; background: #43536d; transition: background .18s ease, border-color .18s ease; }
.status-toggle-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #eef4ff; box-shadow: 0 1px 3px rgba(0, 0, 0, .32); transition: transform .18s ease; }
.status-toggle input:checked + .status-toggle-track { border-color: #18a965; background: #159457; }
.status-toggle input:checked + .status-toggle-track::after { transform: translateX(18px); }
.status-toggle input:focus-visible + .status-toggle-track { outline: 2px solid var(--accent-cyan); outline-offset: 3px; }
.status-toggle input:disabled + .status-toggle-track { opacity: .48; cursor: not-allowed; }
.status-toggle-label { font-size: .86rem; font-weight: 650; }
.status-toggle-copy { display: grid; gap: .35rem; }
.status-toggle-copy small { color: var(--text-soft); line-height: 1.4; }

/* La tabla de estaciones comparte fila con la gráfica MTTR; no debe imponer el ancho global de tablas administrativas. */
.smart-andon-module-host .line-status-widget { min-width: 0; overflow: hidden; }
.smart-andon-module-host .line-status-table-scroll { width: 100%; max-width: 100%; overflow-x: auto; }
.smart-andon-module-host .line-status-table { min-width: 0; table-layout: fixed; }
.smart-andon-module-host .line-status-table th,
.smart-andon-module-host .line-status-table td { overflow-wrap: anywhere; }
.smart-andon-module-host .line-status-table th:nth-child(1),
.smart-andon-module-host .line-status-table td:nth-child(1) { width: 38%; }
.smart-andon-module-host .line-status-table th:nth-child(2),
.smart-andon-module-host .line-status-table td:nth-child(2) { width: 22%; }
.smart-andon-module-host .line-status-table th:nth-child(3),
.smart-andon-module-host .line-status-table td:nth-child(3),
.smart-andon-module-host .line-status-table th:nth-child(4),
.smart-andon-module-host .line-status-table td:nth-child(4) { width: 20%; }
