:root {
    --sh-bg: #0d0f12;
    --sh-card: #171a1f;
    --sh-border: rgba(255, 255, 255, .13);
    --sh-text: #f7f8fa;
    --sh-muted: #a8adb7;
    --sh-green: #18b981;
    --sh-blue: #2ca5e8;
    --sh-amber: #f2b233;
    --sh-red: #ef5b6c;
}

.sh-launcher {
    position: fixed;
    right: 20px;
    bottom: 78px;
    z-index: 2147480500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 15px;
    border: 1px solid rgba(44, 165, 232, .35);
    border-radius: 999px;
    background: #092034;
    color: #8dd7ff;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .34);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.sh-launcher:hover { transform: translateY(-1px); }
.sh-launcher > span:first-child { font-size: 19px; line-height: 1; }

.sh-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 20px;
    background: rgba(0, 0, 0, .76);
    -webkit-overflow-scrolling: touch;
}

.sh-dialog {
    width: min(760px, 100%);
    max-height: min(calc(100vh - 40px), calc(100dvh - 40px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--sh-border);
    border-radius: 22px;
    background: var(--sh-bg);
    color: var(--sh-text);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .58);
}

.sh-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px 17px;
    border-bottom: 1px solid var(--sh-border);
}

.sh-header h2 { margin: 0; font-size: 22px; line-height: 1.2; }
.sh-header p { margin: 5px 0 0; color: var(--sh-muted); font-size: 13px; }
.sh-header .sh-eyebrow { margin: 0 0 5px; color: #79ceff; font-size: 10px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.sh-close { width: 40px; height: 40px; flex: 0 0 auto; border: 1px solid var(--sh-border); border-radius: 12px; background: transparent; color: var(--sh-text); font-size: 27px; line-height: 1; cursor: pointer; }

.sh-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 20px 22px calc(24px + env(safe-area-inset-bottom, 0px));
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.sh-timeline { position: relative; display: grid; gap: 13px; padding-left: 25px; }
.sh-timeline::before { content: ''; position: absolute; left: 7px; top: 9px; bottom: 9px; width: 2px; background: rgba(255,255,255,.1); }
.sh-event { position: relative; }
.sh-marker { position: absolute; left: -25px; top: 18px; width: 16px; height: 16px; border: 4px solid var(--sh-bg); border-radius: 50%; background: var(--sh-blue); box-shadow: 0 0 0 2px rgba(44,165,232,.25); }
.sh-tone-success .sh-marker { background: var(--sh-green); box-shadow: 0 0 0 2px rgba(24,185,129,.25); }
.sh-tone-warning .sh-marker { background: var(--sh-amber); box-shadow: 0 0 0 2px rgba(242,178,51,.25); }
.sh-tone-danger .sh-marker { background: var(--sh-red); box-shadow: 0 0 0 2px rgba(239,91,108,.25); }

.sh-event-card { padding: 15px 16px; border: 1px solid var(--sh-border); border-radius: 15px; background: var(--sh-card); }
.sh-event-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sh-event-top h3 { margin: 0; font-size: 15px; line-height: 1.35; }
.sh-event-top time { flex: 0 0 auto; color: var(--sh-muted); font-size: 10px; white-space: nowrap; }
.sh-description { margin: 7px 0 0; color: #d7dae0; font-size: 13px; line-height: 1.5; }
.sh-actor { margin: 8px 0 0; color: var(--sh-muted); font-size: 11px; }
.sh-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sh-meta span { padding: 5px 8px; border: 1px solid rgba(255,255,255,.1); border-radius: 999px; background: rgba(255,255,255,.04); color: #c5cad2; font-size: 10px; }
.sh-photo-link { display: inline-flex; margin-top: 10px; padding: 8px 11px; border-radius: 9px; background: rgba(24,185,129,.12); color: #6ce8bc; font-size: 11px; font-weight: 800; text-decoration: none; }
.sh-legacy { margin: 9px 0 0; color: #efc96c; font-size: 10px; }

.sh-state { display: grid; min-height: 220px; place-items: center; align-content: center; gap: 10px; color: var(--sh-muted); text-align: center; }
.sh-spinner { width: 28px; height: 28px; border: 3px solid rgba(255,255,255,.15); border-top-color: var(--sh-blue); border-radius: 50%; animation: sh-spin .8s linear infinite; }
.sh-error { padding: 18px; border: 1px solid rgba(239,91,108,.3); border-radius: 14px; background: rgba(239,91,108,.09); color: #ffb3bd; }
.sh-error p { margin: 6px 0 12px; font-size: 12px; }
.sh-error button { padding: 8px 12px; border: 0; border-radius: 9px; background: var(--sh-red); color: #fff; font-weight: 800; cursor: pointer; }

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

@media (max-width: 640px) {
    .sh-launcher { right: 12px; bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }
    .sh-overlay { align-items: flex-end; padding: 0; }
    .sh-dialog { width: 100%; max-height: min(94vh, 94dvh); border-radius: 22px 22px 0 0; }
    .sh-header { padding: 17px 16px 14px; }
    .sh-header h2 { font-size: 19px; }
    .sh-content { padding: 16px 16px calc(28px + env(safe-area-inset-bottom, 0px)); }
    .sh-event-top { display: grid; gap: 5px; }
    .sh-event-top time { white-space: normal; }
}

/* V11.5 — blocos adicionais da auditoria, sem alterar o fluxo do modal. */
.sh-audit-block {
    margin-top: 11px;
    padding: 11px 12px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 11px;
    background: rgba(255,255,255,.025);
}
.sh-audit-block > strong {
    display: block;
    margin-bottom: 8px;
    color: #dfe3e9;
    font-size: 11px;
}
.sh-audit-block ul {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.sh-audit-block li {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    color: #cbd0d8;
    font-size: 11px;
}
.sh-audit-block li small {
    color: var(--sh-muted);
    text-align: right;
    overflow-wrap: anywhere;
}
.sh-summary > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: 7px;
}
.sh-summary span {
    display: grid;
    gap: 2px;
    padding: 8px;
    border-radius: 9px;
    background: rgba(255,255,255,.035);
    color: var(--sh-muted);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.sh-summary span b {
    color: var(--sh-text);
    font-size: 15px;
    line-height: 1;
}

@media (max-width: 640px) {
    .sh-audit-block li { display: grid; gap: 3px; }
    .sh-audit-block li small { text-align: left; }
}
