/*
 * ZECUS Employee PWA — mobile app shell.
 * Scoped under .zap-shell so nothing here leaks into the desktop admin UI.
 * Bootstrap 5 + Bootstrap Icons are already loaded globally.
 */

:root {
    --zap-bg: #f4f6fb;
    --zap-surface: #ffffff;
    --zap-navy: #03173d;
    --zap-primary: #2f6df6;
    --zap-text: #1b2440;
    --zap-muted: #7a869f;
    --zap-border: #e6eaf2;
    --zap-topbar-h: 56px;
    --zap-tabbar-h: 64px;
    --zap-safe-top: env(safe-area-inset-top, 0px);
    --zap-safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---- Shell frame ---- */
.zap-shell {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: var(--zap-bg);
    color: var(--zap-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
}

/* Hide the desktop chrome if any base layout bleeds through. */
.zap-shell #sidebar,
.zap-shell footer { display: none !important; }

/* ---- Top bar ---- */
.zap-topbar {
    flex: 0 0 auto;
    height: calc(var(--zap-topbar-h) + var(--zap-safe-top));
    padding-top: var(--zap-safe-top);
    background: var(--zap-navy);
    color: #fff;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding-left: 1rem;
    padding-right: .75rem;
    box-shadow: 0 1px 6px rgba(3, 23, 61, .12);
    z-index: 10;
}
.zap-topbar .zap-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.zap-topbar .zap-back {
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    background: none;
    border: 0;
    padding: .25rem;
    display: inline-flex;
}
.zap-topbar .zap-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--zap-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    flex: 0 0 auto;
}

/* ---- Scrollable content ---- */
.zap-content {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding: 1rem;
    padding-bottom: calc(var(--zap-tabbar-h) + var(--zap-safe-bottom) + 1rem);
}

/* ---- Bottom tab bar ---- */
.zap-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--zap-tabbar-h) + var(--zap-safe-bottom));
    padding-bottom: var(--zap-safe-bottom);
    background: var(--zap-surface);
    border-top: 1px solid var(--zap-border);
    display: flex;
    z-index: 20;
    box-shadow: 0 -1px 10px rgba(3, 23, 61, .06);
}
.zap-tab {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--zap-muted);
    text-decoration: none;
    font-size: .68rem;
    font-weight: 500;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}
.zap-tab i { font-size: 1.35rem; line-height: 1; }
.zap-tab.active { color: var(--zap-primary); }
.zap-tab .zap-badge {
    position: absolute;
    top: 6px;
    left: calc(50% + 6px);
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: #e5484d;
    color: #fff;
    font-size: .62rem;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--zap-surface);
}

/* ---- Generic cards / list rows reused across app pages ---- */
.zap-card {
    background: var(--zap-surface);
    border: 1px solid var(--zap-border);
    border-radius: 14px;
    padding: 1rem;
}
.zap-launch {
    display: flex;
    align-items: center;
    gap: .9rem;
    background: var(--zap-surface);
    border: 1px solid var(--zap-border);
    border-radius: 14px;
    padding: 1rem;
    text-decoration: none;
    color: var(--zap-text);
    margin-bottom: .75rem;
}
.zap-launch:active { transform: scale(.99); }
.zap-launch .zap-launch-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex: 0 0 auto;
}
.zap-launch h6 { margin: 0 0 2px; font-size: 1rem; font-weight: 600; }
.zap-launch p { margin: 0; font-size: .82rem; color: var(--zap-muted); }
.zap-launch .zap-launch-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e5484d;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}

.zap-greeting { margin: .25rem 0 1rem; }
.zap-greeting h4 { margin: 0; font-size: 1.3rem; font-weight: 700; }
.zap-greeting p { margin: 2px 0 0; color: var(--zap-muted); font-size: .9rem; }

.zap-empty {
    text-align: center;
    color: var(--zap-muted);
    padding: 3rem 1rem;
}
.zap-empty i { font-size: 2.5rem; opacity: .5; display: block; margin-bottom: .75rem; }

.bg-tint-primary { background: #e7effe; color: var(--zap-primary); }
.bg-tint-success { background: #e5f6ec; color: #1f9254; }
.bg-tint-warning { background: #fdf3e2; color: #cb8a14; }
.bg-tint-danger  { background: #fdeaea; color: #e5484d; }

/* ===================== Chat ===================== */

/* Shared avatar */
.zap-avatar {
    width: 46px; height: 46px; border-radius: 50%;
    background: var(--zap-primary); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .95rem; font-weight: 600; flex: 0 0 auto;
}
.zap-avatar.sm { width: 38px; height: 38px; font-size: .8rem; }
.zap-avatar.group { background: #6b53f6; }

/* Shared search + buttons */
.zap-search {
    position: relative; flex: 1 1 auto;
    display: flex; align-items: center;
}
.zap-search i { position: absolute; left: 12px; color: var(--zap-muted); font-size: .9rem; }
.zap-search input {
    width: 100%; border: 1px solid var(--zap-border); background: var(--zap-surface);
    color: var(--zap-text); border-radius: 999px; padding: .55rem .9rem .55rem 2.1rem;
    font-size: .9rem; outline: none;
}
.zap-field {
    width: 100%; border: 1px solid var(--zap-border); background: var(--zap-surface);
    color: var(--zap-text); border-radius: 10px; padding: .6rem .8rem; font-size: .95rem; outline: none;
}
.zap-icon-btn {
    flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px;
    border: 1px solid var(--zap-border); background: var(--zap-surface); color: var(--zap-text);
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.zap-icon-btn.primary { background: var(--zap-primary); border-color: var(--zap-primary); color: #fff; }
.zap-btn {
    border: 0; border-radius: 10px; padding: .55rem 1.1rem; font-size: .9rem; font-weight: 600;
    background: var(--zap-border); color: var(--zap-text);
}
.zap-btn.primary { background: var(--zap-primary); color: #fff; }
.zap-btn.danger { background: transparent; color: #e5484d; border: 1px solid #e5484d; }
.zap-btn.sm { padding: .3rem .7rem; font-size: .8rem; }
.zap-btn:disabled { opacity: .5; }

/* Toolbar above the conversation list. The list page keeps normal shell padding,
   so pull the toolbar to hug the content top. */
.zap-chat-toolbar { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; }

/* Conversation list */
.zap-conv-list { display: flex; flex-direction: column; gap: 2px; }
.zap-conv {
    display: flex; align-items: center; gap: .75rem; padding: .65rem .5rem;
    border-radius: 12px; cursor: pointer;
}
.zap-conv:active { background: rgba(47,109,246,.08); }
.zap-conv-body { flex: 1 1 auto; min-width: 0; }
.zap-conv-row { display: flex; align-items: center; gap: .5rem; }
.zap-conv-title { font-weight: 600; font-size: .98rem; flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zap-conv-time { font-size: .72rem; color: var(--zap-muted); flex: 0 0 auto; }
.zap-conv-preview { font-size: .85rem; color: var(--zap-muted); flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zap-mute-i { margin-right: 3px; }
.zap-conv-unread {
    flex: 0 0 auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
    background: var(--zap-primary); color: #fff; font-size: .72rem; font-weight: 700; line-height: 20px; text-align: center;
}

/* ---- Full-screen thread ---- */
.zap-thread {
    position: fixed; inset: 0; z-index: 40;
    display: flex; flex-direction: column;
    background: var(--zap-bg);
}
.zap-thread-head {
    flex: 0 0 auto; display: flex; align-items: center; gap: .6rem;
    height: calc(var(--zap-topbar-h) + var(--zap-safe-top)); padding-top: var(--zap-safe-top);
    padding-left: .5rem; padding-right: .5rem;
    background: var(--zap-navy); color: #fff;
}
.zap-thread-back, .zap-thread-act {
    background: none; border: 0; color: #fff; font-size: 1.25rem; padding: .35rem;
    display: inline-flex; align-items: center; justify-content: center;
}
.zap-thread-id { flex: 1 1 auto; min-width: 0; line-height: 1.2; }
.zap-thread-name { font-weight: 600; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zap-thread-sub { font-size: .74rem; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zap-typing-inline { color: #7ce2b0; }

.zap-thread-msgs {
    flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain;
    padding: .75rem .75rem 1rem;
    display: flex; flex-direction: column; gap: 3px;
}

.zap-date-divider { text-align: center; margin: .5rem 0; }
.zap-date-divider span {
    background: rgba(3,23,61,.06); color: var(--zap-muted); font-size: .72rem;
    padding: 3px 10px; border-radius: 999px;
}
.zap-system { text-align: center; margin: .3rem 0; }
.zap-system span { background: rgba(3,23,61,.06); color: var(--zap-muted); font-size: .75rem; padding: 4px 12px; border-radius: 999px; }

.zap-msg {
    position: relative; max-width: 82%; width: fit-content;
    padding: .45rem .6rem .3rem; border-radius: 12px; font-size: .92rem; line-height: 1.35;
    box-shadow: 0 1px 1px rgba(3,23,61,.08);
}
.zap-msg.in { align-self: flex-start; background: var(--zap-surface); color: var(--zap-text); border-top-left-radius: 4px; }
.zap-msg.out { align-self: flex-end; background: var(--zap-primary); color: #fff; border-top-right-radius: 4px; }
.zap-msg.img { padding: .25rem; }
.zap-msg-sender { font-size: .74rem; font-weight: 700; color: #6b53f6; margin-bottom: 2px; }
.zap-msg-text { white-space: pre-wrap; word-break: break-word; }
.zap-deleted { font-style: italic; opacity: .7; }
.zap-msg-meta { display: flex; align-items: center; justify-content: flex-end; gap: 3px; font-size: .66rem; margin-top: -1px; opacity: .75; }
.zap-msg.out .zap-msg-meta { color: #dbe7ff; }
.zap-msg-img { max-width: 100%; border-radius: 9px; display: block; }
.zap-msg-file { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: inherit; padding: .2rem; }
.zap-msg-file-ic { font-size: 1.4rem; }
.zap-msg-file-body { display: flex; flex-direction: column; min-width: 0; }
.zap-msg-file-name { font-weight: 600; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.zap-msg-file-size { font-size: .7rem; opacity: .8; }
.zap-msg-del {
    position: absolute; top: -8px; left: -8px; width: 24px; height: 24px; border-radius: 50%;
    background: #e5484d; color: #fff; border: 0; font-size: .7rem; display: none; align-items: center; justify-content: center;
}
.zap-msg.out:active .zap-msg-del { display: inline-flex; }

/* Composer */
.zap-composer {
    flex: 0 0 auto; display: flex; align-items: flex-end; gap: .5rem;
    padding: .5rem .6rem calc(.5rem + var(--zap-safe-bottom));
    background: var(--zap-surface); border-top: 1px solid var(--zap-border);
}
.zap-attach { color: var(--zap-muted); font-size: 1.3rem; padding: .4rem .2rem; cursor: pointer; flex: 0 0 auto; }
.zap-attach input { display: none; }
.zap-composer textarea {
    flex: 1 1 auto; resize: none; border: 1px solid var(--zap-border); background: var(--zap-bg);
    color: var(--zap-text); border-radius: 18px; padding: .55rem .9rem; font-size: .95rem;
    line-height: 1.3; max-height: 120px; outline: none;
}
.zap-send {
    flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; border: 0;
    background: var(--zap-primary); color: #fff; font-size: 1.05rem;
    display: inline-flex; align-items: center; justify-content: center;
}
.zap-send:disabled { opacity: .5; }

/* ---- Bottom sheets (new chat / group / info) ---- */
.zap-sheet-scrim { position: fixed; inset: 0; z-index: 49; background: rgba(3,23,61,.45); }
.zap-sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    max-height: 85vh; display: flex; flex-direction: column;
    background: var(--zap-surface); border-radius: 18px 18px 0 0;
    padding-bottom: var(--zap-safe-bottom);
    animation: zap-sheet-up .18s ease-out;
}
@keyframes zap-sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.zap-sheet-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: .9rem 1rem .5rem; font-weight: 600; font-size: 1.05rem;
}
.zap-sheet-list { overflow-y: auto; padding: .25rem .5rem 1rem; }
.zap-sheet-subhead { font-size: .78rem; font-weight: 700; color: var(--zap-muted); text-transform: uppercase; padding: .6rem .5rem .2rem; }
.zap-sheet-foot { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-top: 1px solid var(--zap-border); }
.zap-sheet-foot .text-muted { margin-right: auto; font-size: .85rem; }

.zap-contact { display: flex; align-items: center; gap: .7rem; padding: .55rem .5rem; border-radius: 10px; cursor: pointer; }
.zap-contact:active { background: rgba(47,109,246,.08); }
.zap-contact-name { font-weight: 600; font-size: .92rem; }
.zap-contact-role { font-size: .76rem; color: var(--zap-muted); }

.zap-empty.sm { padding: 1.5rem 1rem; }

/* ===================== My Tasks ===================== */
.zap-tasks-summary {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: .6rem;
}
.zap-tasks-count { font-size: 1.35rem; font-weight: 700; }
.zap-tasks-overdue {
    font-size: .8rem; font-weight: 600; color: #e5484d;
    background: #fdeaea; padding: .25rem .6rem; border-radius: 999px;
}

.zap-filter-row { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .5rem; margin-bottom: .5rem; -webkit-overflow-scrolling: touch; }
.zap-filter {
    flex: 0 0 auto; border: 1px solid var(--zap-border); background: var(--zap-surface);
    color: var(--zap-muted); border-radius: 999px; padding: .35rem .85rem; font-size: .82rem; font-weight: 600; white-space: nowrap;
}
.zap-filter.active { background: var(--zap-primary); border-color: var(--zap-primary); color: #fff; }

.zap-task-list { display: flex; flex-direction: column; gap: .6rem; }
.zap-task-card {
    background: var(--zap-surface); border: 1px solid var(--zap-border); border-left: 3px solid var(--zap-border);
    border-radius: 12px; padding: .75rem .85rem;
}
.zap-task-card:active { background: rgba(47,109,246,.05); }
.zap-task-card.overdue { border-left-color: #e5484d; }
.zap-task-top { display: flex; align-items: center; gap: .45rem; margin-bottom: .3rem; }
.zap-status-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.zap-status-name { font-size: .78rem; font-weight: 600; color: var(--zap-muted); }
.zap-task-prio { margin-left: auto; font-size: .74rem; font-weight: 700; }
.zap-task-title { font-size: .98rem; font-weight: 600; line-height: 1.3; margin-bottom: .35rem; }
.zap-task-meta { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; font-size: .78rem; color: var(--zap-muted); }
.zap-task-parent { display: inline-flex; align-items: center; gap: .3rem; }
.zap-task-due { display: inline-flex; align-items: center; gap: .3rem; }
.zap-task-due.overdue { color: #e5484d; font-weight: 600; }

/* ---- Task detail (uses .zap-thread frame) ---- */
.zap-detail { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 1rem 1rem calc(1.5rem + var(--zap-safe-bottom)); }
.zap-detail-badges { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.zap-badge-type { font-size: .72rem; font-weight: 700; background: #e7effe; color: var(--zap-primary); padding: .2rem .6rem; border-radius: 6px; }
.zap-badge-prio { font-size: .72rem; font-weight: 700; border: 1px solid; padding: .2rem .6rem; border-radius: 6px; }
.zap-badge-overdue { font-size: .72rem; font-weight: 700; background: #fdeaea; color: #e5484d; padding: .2rem .6rem; border-radius: 6px; }
.zap-detail-title { font-size: 1.25rem; font-weight: 700; line-height: 1.3; margin: 0 0 1rem; }
.zap-detail-rows { display: flex; flex-direction: column; gap: .1rem; background: var(--zap-surface); border: 1px solid var(--zap-border); border-radius: 12px; padding: .5rem .85rem; margin-bottom: 1rem; }
.zap-detail-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--zap-border); }
.zap-detail-row:last-child { border-bottom: 0; }
.zap-detail-k { color: var(--zap-muted); font-size: .85rem; display: inline-flex; align-items: center; gap: .45rem; flex: 0 0 auto; }
.zap-detail-v { font-size: .9rem; font-weight: 600; text-align: right; }
.zap-detail-v.overdue { color: #e5484d; }
.zap-detail-desc-label { font-size: .78rem; font-weight: 700; color: var(--zap-muted); text-transform: uppercase; margin-bottom: .4rem; }
.zap-detail-desc { background: var(--zap-surface); border: 1px solid var(--zap-border); border-radius: 12px; padding: .85rem; font-size: .92rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; margin-bottom: 1rem; }
.zap-detail-audit { font-size: .76rem; color: var(--zap-muted); margin-top: 1rem; text-align: center; }

.zap-status-picker { display: flex; flex-direction: column; gap: .4rem; }
.zap-status-opt {
    display: flex; align-items: center; gap: .6rem; width: 100%;
    background: var(--zap-surface); border: 1px solid var(--zap-border); border-radius: 10px;
    padding: .7rem .85rem; font-size: .92rem; color: var(--zap-text); text-align: left;
}
.zap-status-opt .zap-status-opt-label { flex: 1 1 auto; }
.zap-status-opt.current { border-color: var(--zap-primary); background: rgba(47,109,246,.06); font-weight: 700; color: var(--zap-primary); }
.zap-status-opt:disabled { opacity: .6; }

/* ---- Notifications feed ---- */
.zap-push-banner {
    display: flex; align-items: center; gap: .6rem;
    background: rgba(47,109,246,.08); border: 1px solid var(--zap-primary);
    color: var(--zap-text); border-radius: 12px; padding: .7rem .85rem; margin-bottom: .75rem;
    font-size: .85rem; line-height: 1.35;
}
.zap-push-banner i { font-size: 1.2rem; color: var(--zap-primary); flex: 0 0 auto; }
.zap-push-cta { margin-left: auto; font-weight: 700; color: var(--zap-primary); flex: 0 0 auto; }
.zap-notif-list { display: flex; flex-direction: column; gap: .6rem; }
.zap-notif-card {
    display: flex; align-items: flex-start; gap: .7rem;
    background: var(--zap-surface); border: 1px solid var(--zap-border);
    border-radius: 12px; padding: .75rem .85rem; position: relative;
}
.zap-notif-card:active { background: rgba(47,109,246,.05); }
.zap-notif-card.read { opacity: .55; }
.zap-notif-icon { font-size: 1.3rem; color: var(--zap-primary); line-height: 1; margin-top: .1rem; }
.zap-notif-body { flex: 1 1 auto; min-width: 0; }
.zap-notif-top { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.zap-notif-title { font-size: .95rem; font-weight: 600; line-height: 1.3; }
.zap-notif-time { font-size: .74rem; color: var(--zap-muted); flex: 0 0 auto; }
.zap-notif-text { font-size: .84rem; color: var(--zap-muted); line-height: 1.4; margin-top: .15rem; }
.zap-notif-dot { width: 9px; height: 9px; border-radius: 50%; background: #e5484d; flex: 0 0 auto; margin-top: .35rem; }

/* ===================== Vault ===================== */
.zap-vault-list { display: flex; flex-direction: column; gap: .5rem; }
.zap-vault-card {
    display: flex; align-items: center; gap: .75rem;
    background: var(--zap-surface); border: 1px solid var(--zap-border); border-radius: 12px; padding: .7rem .85rem;
}
.zap-vault-card:active { background: rgba(47,109,246,.05); }
.zap-vault-icon {
    width: 40px; height: 40px; border-radius: 10px; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    background: #e7effe; color: var(--zap-primary); font-size: 1.15rem;
}
.zap-vault-body { flex: 1 1 auto; min-width: 0; }
.zap-vault-name { font-weight: 600; font-size: .96rem; display: flex; align-items: center; gap: .4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zap-fav { color: #f0b429; font-size: .8rem; }
.zap-vault-sub { font-size: .8rem; color: var(--zap-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zap-vault-shared { color: #6b53f6; font-size: .95rem; flex: 0 0 auto; }
.zap-vault-chev { color: var(--zap-muted); flex: 0 0 auto; }

.zap-shared-note {
    display: flex; align-items: center; gap: .5rem; font-size: .82rem;
    background: rgba(107,83,246,.1); color: #6b53f6; padding: .6rem .8rem; border-radius: 10px; margin-bottom: 1rem;
}

.zap-vault-field { margin-bottom: .9rem; }
.zap-vault-field-label { font-size: .74rem; font-weight: 700; color: var(--zap-muted); text-transform: uppercase; margin-bottom: .3rem; }
.zap-vault-field-row {
    display: flex; align-items: center; gap: .5rem;
    background: var(--zap-surface); border: 1px solid var(--zap-border); border-radius: 10px; padding: .6rem .75rem;
}
.zap-vault-field-val { flex: 1 1 auto; min-width: 0; font-size: .92rem; word-break: break-all; }
.zap-secret { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .5px; }
.zap-secret.masked { letter-spacing: 2px; color: var(--zap-muted); }
.zap-link { color: var(--zap-primary); text-decoration: none; }
.zap-copy-btn {
    flex: 0 0 auto; width: 34px; height: 34px; border-radius: 8px; border: 0;
    background: rgba(47,109,246,.1); color: var(--zap-primary); font-size: 1rem;
    display: inline-flex; align-items: center; justify-content: center;
}
.zap-copy-btn:active { background: rgba(47,109,246,.2); }
.zap-vault-field-hint { font-size: .72rem; color: var(--zap-muted); margin-top: .3rem; }
.zap-vault-notes {
    background: var(--zap-surface); border: 1px solid var(--zap-border); border-radius: 10px; padding: .75rem;
    font-size: .9rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word;
}

/* ---- Dark mode ---- */
@media (prefers-color-scheme: dark) {
    :root {
        --zap-bg: #0f1522;
        --zap-surface: #17203a;
        --zap-text: #e9eef7;
        --zap-muted: #8595b3;
        --zap-border: #232f4d;
    }
    .zap-tab .zap-badge { box-shadow: 0 0 0 2px var(--zap-surface); }
    .zap-date-divider span,
    .zap-system span { background: rgba(255,255,255,.08); }
    .zap-msg { box-shadow: 0 1px 2px rgba(0,0,0,.35); }
    .zap-tasks-overdue,
    .zap-badge-overdue { background: rgba(229,72,77,.18); }
    .zap-badge-type { background: rgba(47,109,246,.18); }
    .zap-vault-icon { background: rgba(47,109,246,.18); }
}
