:root {
    --dv-topbar-h: 56px;
}

body {
    background: var(--cream);
}

body.lang-te {
    font-family: 'NTR', sans-serif;
}

#nav {
    display: none !important;
}

.dv-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--dv-topbar-h);
    padding: 0 1rem;
    padding-top: env(safe-area-inset-top);
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--white);
    border-bottom: 1px solid var(--rule);
    z-index: 500;
}

.dv-back-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--g50);
    color: var(--g600);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.dv-topbar-title {
    font-family: var(--fh);
    font-size: 1rem;
    font-weight: 800;
    color: var(--ink);
}

.dv-main {
    padding-top: calc(var(--dv-topbar-h) + env(safe-area-inset-top) + 16px);
    padding-bottom: 3rem;
    max-width: 640px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.dv-section-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    margin: 1.5rem 4px .6rem;
}

.dv-empty {
    text-align: center;
    font-size: .88rem;
    color: var(--muted);
    padding: 3rem 1rem;
}

.dv-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: 16px;
    padding: 1rem 1.1rem;
    margin-bottom: 10px;
}

.dv-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--g50);
    color: var(--g600);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dv-card-body {
    flex: 1;
    min-width: 0;
}

.dv-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

.dv-card-name {
    font-size: .92rem;
    font-weight: 700;
    color: var(--ink);
}

.dv-badge-this {
    font-size: .64rem;
    font-weight: 700;
    color: var(--g700);
    background: var(--g50);
    border: 1px solid var(--g200);
    padding: 2px 8px;
    border-radius: 100px;
}

.dv-card-meta {
    font-size: .78rem;
    color: var(--ink3);
    margin-bottom: 3px;
}

.dv-card-location {
    font-size: .74rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.dv-card-status {
    font-size: .74rem;
    font-weight: 600;
    margin-top: 6px;
}

.dv-status-active {
    color: var(--g600);
}

.dv-status-inactive {
    color: var(--muted);
    font-weight: 400;
}

.dv-logout-link {
    background: none;
    border: none;
    color: #c0392b;
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    padding: 6px 0 0;
    flex-shrink: 0;
}

#dv-bottom-actions {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dv-danger-btn {
    width: 100%;
    background: #fdecea;
    color: #c0392b;
    border: none;
    border-radius: 100px;
    padding: 13px;
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.dv-ghost-btn {
    width: 100%;
    background: var(--white);
    border: 1.5px solid var(--rule);
    color: var(--ink3);
    border-radius: 100px;
    padding: 13px;
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

/* ── Bottom sheet (mirrors /news/ pattern) ── */
.sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1998;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
}

.sheet-backdrop.open {
    opacity: 1;
    pointer-events: all;
}

.bottom-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1999;
    background: var(--white);
    border-radius: 22px 22px 0 0;
    padding: .75rem 1.4rem calc(1.5rem + env(safe-area-inset-bottom));
    max-width: 560px;
    margin: 0 auto;
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.32, .72, 0, 1);
}

.bottom-sheet.open {
    transform: translateY(0);
}

.sheet-handle {
    width: 38px;
    height: 4px;
    background: var(--rule);
    border-radius: 3px;
    margin: 0 auto 1.2rem;
}

.dv-confirm-text {
    font-size: .95rem;
    font-weight: 700;
    color: var(--ink);
    text-align: center;
    margin-bottom: .4rem;
}

.dv-confirm-sub {
    font-size: .82rem;
    color: var(--ink3);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 1.4rem;
}

.dv-confirm-actions {
    display: flex;
    gap: 10px;
}

.dv-sheet-btn {
    flex: 1;
    padding: 12px;
    border-radius: 100px;
    border: none;
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.dv-sheet-btn--ghost {
    background: var(--rule);
    color: var(--ink3);
}

.dv-sheet-btn--danger {
    background: #c0392b;
    color: #fff;
}

#toast-container {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    padding-top: calc(11px + env(safe-area-inset-top));
    font-size: .79rem;
    font-weight: 600;
    color: #fff;
    width: 100%;
    box-sizing: border-box;
    transform: translateY(-16px);
    opacity: 0;
    transition: transform .32s cubic-bezier(.2, .9, .3, 1.15), opacity .28s ease;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast--success {
    background: var(--g600);
}

.toast--error {
    background: #c0392b;
}

@media (min-width: 640px) {
    .toast {
        width: auto;
        max-width: 400px;
        margin-top: 14px;
        border-radius: 10px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
    }
}