/* ── 전역 토스트 ── */
.bn-toast-stack {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: calc(100vw - 40px);
}
.bn-toast {
    pointer-events: auto;
    padding: 14px 22px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--bn-chrome-fg, #fff);
    background: var(--bn-ok, #3cb371);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
    transform: translateX(420px);
    opacity: 0;
    transition: transform .28s ease, opacity .28s ease;
    line-height: 1.4;
    word-break: keep-all;
    max-width: 360px;
}
.bn-toast.show {
    transform: translateX(0);
    opacity: 1;
}
.bn-toast.error { background: var(--bn-up, #d44a3f); }
.bn-toast.warn { background: var(--bn-warn, #f59e0b); }
@media (max-width: 520px) {
    .bn-toast-stack { top: 12px; right: 12px; left: 12px; max-width: none; }
    .bn-toast { max-width: none; }
}

/* ── 풀스크린 로딩 오버레이 ── */
.bn-loading {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.bn-loading.show { display: flex; }
.bn-loading-box {
    background: var(--bn-bg, #fff);
    padding: 32px 40px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
    max-width: 360px;
    width: 100%;
}
.bn-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--bn-line, #e5e7eb);
    border-top-color: var(--bn-ok, #3cb371);
    border-radius: 50%;
    animation: bnSpin .8s linear infinite;
    margin: 0 auto 14px;
}
.bn-loading-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--bn-ink2, #1f2937);
    margin: 0;
}
.bn-loading-sub {
    font-size: 12px;
    color: var(--bn-mutedSoft, #6b7280);
    margin: 6px 0 0;
}
@keyframes bnSpin { to { transform: rotate(360deg); } }

/* ── 글로벌 헤더 빠른 검색 ── */
.sh-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: 12px;
    z-index: 1100;
}
input.sh-search-input,
.sh-search input[type="search"].sh-search-input {
    height: 30px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--bn-ink, #1f2937);
    font-size: 13px;
    line-height: 30px;
    min-width: 200px;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s, background .15s;
}
.sh-search-input::placeholder { color: var(--bn-mutedSoft, #9ca3af); }
.sh-search-input:focus {
    border-color: var(--bn-ok, #3cb371);
    background: #fff;
}
.sh-search-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0 8px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
}
.sh-search-btn:hover { background: rgba(255, 255, 255, 0.12); }

/* 헤더 검색창 자리 확보 — 인사말 옆 날짜 숨김 */
.sh-greeting-date { display: none !important; }

/* ── 대시보드 단일 우선 액션 카드 ── */
.dash-priority {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    border-radius: 14px;
    background: linear-gradient(135deg, #3cb371 0%, #2d5016 100%);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(60,179,113,0.25);
    margin-bottom: 22px;
    transition: transform .15s, box-shadow .15s;
}
.dash-priority:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(60,179,113,0.35);
    text-decoration: none;
    color: #fff;
}
.dash-priority--urgent {
    background: linear-gradient(135deg, #d44a3f 0%, #a33028 100%);
    box-shadow: 0 4px 16px rgba(212,74,63,0.25);
}
.dash-priority--urgent:hover { box-shadow: 0 6px 22px rgba(212,74,63,0.35); }
.dash-priority--warning {
    background: linear-gradient(135deg, #f59e0b 0%, #c97e07 100%);
    box-shadow: 0 4px 16px rgba(245,158,11,0.25);
}
.dash-priority--warning:hover { box-shadow: 0 6px 22px rgba(245,158,11,0.35); }
.dash-priority__icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.22);
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dash-priority__icon i { width: 22px; height: 22px; }
.dash-priority__body { flex: 1; min-width: 0; }
.dash-priority__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
    margin-bottom: 2px;
}
.dash-priority__title {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 4px;
    line-height: 1.3;
}
.dash-priority__desc {
    font-size: 13px;
    opacity: 0.92;
    line-height: 1.5;
}
.dash-priority__cta {
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    padding: 8px 16px;
    background: rgba(255,255,255,0.22);
    border-radius: 8px;
    white-space: nowrap;
}
@media (max-width: 720px) {
    .dash-priority { flex-wrap: wrap; }
    .dash-priority__cta { width: 100%; text-align: center; margin-top: 6px; }
}

/* 다크 모드: 강한 그린 그라디언트 → surface + 그린 액센트로 톤다운 */
[data-theme="vault"] .dash-priority {
    background: var(--bn-surface);
    border: 1px solid color-mix(in srgb, var(--bn-ok) 35%, var(--bn-line));
    border-left: 4px solid var(--bn-ok);
    color: var(--bn-ink);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
[data-theme="vault"] .dash-priority:hover {
    color: var(--bn-ink);
    box-shadow: 0 6px 22px rgba(0,0,0,0.32);
}
[data-theme="vault"] .dash-priority__icon {
    background: color-mix(in srgb, var(--bn-ok) 18%, var(--bn-bg));
    color: var(--bn-ok);
}
[data-theme="vault"] .dash-priority__label { color: var(--bn-ok); opacity: 1; }
[data-theme="vault"] .dash-priority__title { color: var(--bn-ink); }
[data-theme="vault"] .dash-priority__desc { color: var(--bn-muted); opacity: 1; }
[data-theme="vault"] .dash-priority__cta {
    background: var(--bn-ok);
    color: var(--bn-chrome-fg, #15110A);
}

/* 다크 모드 + urgent: 빨간 좌측 보더 */
[data-theme="vault"] .dash-priority--urgent {
    border-left-color: var(--bn-up, #d44a3f);
    border-color: color-mix(in srgb, var(--bn-up, #d44a3f) 35%, var(--bn-line));
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
[data-theme="vault"] .dash-priority--urgent .dash-priority__icon {
    background: color-mix(in srgb, var(--bn-up, #d44a3f) 18%, var(--bn-bg));
    color: var(--bn-up, #d44a3f);
}
[data-theme="vault"] .dash-priority--urgent .dash-priority__label { color: var(--bn-up, #d44a3f); }
[data-theme="vault"] .dash-priority--urgent .dash-priority__cta { background: var(--bn-up, #d44a3f); color: #fff; }

/* 다크 모드 + warning: 주황 좌측 보더 */
[data-theme="vault"] .dash-priority--warning {
    border-left-color: var(--bn-warn, #f59e0b);
    border-color: color-mix(in srgb, var(--bn-warn, #f59e0b) 35%, var(--bn-line));
}
[data-theme="vault"] .dash-priority--warning .dash-priority__icon {
    background: color-mix(in srgb, var(--bn-warn, #f59e0b) 18%, var(--bn-bg));
    color: var(--bn-warn, #f59e0b);
}
[data-theme="vault"] .dash-priority--warning .dash-priority__label { color: var(--bn-warn, #f59e0b); }
[data-theme="vault"] .dash-priority--warning .dash-priority__cta { background: var(--bn-warn, #f59e0b); color: #15110A; }

/* ── 모바일앱 띠배너 닫기 버튼 ── */
.mobile-app-promo { position: relative; }
.mobile-app-promo__close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 1;
}
.mobile-app-promo__close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}
.sh-search-recent {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bn-bg, #fff);
    border: 1px solid var(--bn-line, #e5e7eb);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    padding: 4px;
    z-index: 1101;
    max-height: 240px;
    overflow-y: auto;
}
.sh-search-recent-label {
    padding: 6px 10px 4px;
    font-size: 11px;
    color: var(--bn-mutedSoft, #9ca3af);
    font-weight: 600;
}
.sh-search-recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    padding: 7px 10px;
    background: transparent;
    border: none;
    color: var(--bn-ink2, #1f2937);
    font-size: 13px;
    cursor: pointer;
    border-radius: 5px;
}
.sh-search-recent-item:hover { background: var(--bn-surface, #f3f4f6); }
.sh-search-recent-remove {
    background: none;
    border: none;
    color: var(--bn-mutedSoft, #9ca3af);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0 4px;
}
.sh-search-recent-remove:hover { color: var(--bn-up, #d44a3f); }
@media (max-width: 1100px) {
    .sh-search-input { min-width: 160px; }
}
@media (max-width: 900px) {
    .sh-search { display: none; }
}

.sh-search-mobile {
    display: none;
    position: relative;
    margin: 0 0 12px;
}
.sh-search-mobile-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--bn-line, #e5e7eb);
    border-radius: 9px;
    background: var(--bn-bg, #fff);
    color: var(--bn-ink, #111827);
    font-size: 14px;
    outline: none;
}
.sh-search-mobile-input:focus { border-color: var(--bn-ok, #3cb371); }
@media (max-width: 900px) {
    .sh-search-mobile { display: block; }
}
