dialog.tt-leave {
    position: fixed;
    inset: 0;
    width: min(400px, calc(100vw - 32px));
    max-width: none;
    height: fit-content;
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #0f172a;
    overflow: visible;
    box-sizing: border-box;
}
dialog.tt-leave::backdrop {
    background: rgba(8, 12, 22, 0.58);
}
dialog.tt-leave[open] .tt-leave-card {
    animation: tt-leave-in 0.16s ease-out;
}
@keyframes tt-leave-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: none; }
}
.tt-leave-card {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 14px;
    padding: 22px 22px 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.35);
    font: 400 15px/1.55 "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    letter-spacing: normal;
    text-align: left;
    text-transform: none;
    box-sizing: border-box;
}
.tt-leave-icon {
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #fff4ec;
    color: #c2410c;
}
.tt-leave-title {
    margin: 0 0 4px;
    padding: 0;
    color: inherit;
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: normal;
    text-transform: none;
    text-shadow: none;
}
.tt-leave-text {
    margin: 0;
    padding: 0;
    color: #475569;
    font: inherit;
}
.tt-leave-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}
.tt-leave-actions button {
    appearance: none;
    min-width: 96px;
    min-height: 40px;
    margin: 0;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    box-shadow: none;
    font: 600 14px/1 "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    letter-spacing: normal;
    text-transform: none;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.tt-leave-actions .tt-leave-stay {
    background: #c2410c;
    color: #ffffff;
}
.tt-leave-actions .tt-leave-stay:hover {
    background: #9a3412;
}
.tt-leave-actions .tt-leave-go {
    background: transparent;
    border-color: #cbd5e1;
    color: #334155;
}
.tt-leave-actions .tt-leave-go:hover {
    border-color: #b91c1c;
    color: #b91c1c;
}
.tt-leave-actions button:focus-visible {
    outline: 3px solid rgba(194, 65, 12, 0.35);
    outline-offset: 2px;
}

html[data-theme="dark"] dialog.tt-leave,
html[data-theme="dark"] .tt-leave-card {
    color: #e5e7eb;
}
html[data-theme="dark"] .tt-leave-card {
    border-color: rgba(148, 163, 184, 0.2);
    background: #141b29;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
html[data-theme="dark"] .tt-leave-icon {
    background: rgba(241, 170, 118, 0.14);
    color: #f1aa76;
}
html[data-theme="dark"] .tt-leave-text {
    color: #94a3b8;
}
html[data-theme="dark"] .tt-leave-actions .tt-leave-stay {
    background: #f1aa76;
    color: #1a1208;
}
html[data-theme="dark"] .tt-leave-actions .tt-leave-stay:hover {
    background: #f6c29b;
}
html[data-theme="dark"] .tt-leave-actions .tt-leave-go {
    border-color: rgba(148, 163, 184, 0.35);
    color: #cbd5e1;
}
html[data-theme="dark"] .tt-leave-actions .tt-leave-go:hover {
    border-color: #f87171;
    color: #fca5a5;
}

@media (max-width: 420px) {
    .tt-leave-card {
        padding: 18px 16px 16px;
    }
    .tt-leave-actions button {
        flex: 1 1 0;
    }
}
@media (prefers-reduced-motion: reduce) {
    dialog.tt-leave[open] .tt-leave-card {
        animation: none;
    }
}
