/* ===== Base ===== */
body { font-family: 'Noto Sans KR', sans-serif; background: #f0f5f4; font-size: 14px; }

/* ===== Document Status Badges ===== */
.badge-active   { background: #e8f5e9; color: #2e7d32; font-size: .76rem; font-weight: 600; }
.badge-expired  { background: #fff3e0; color: #e65100; font-size: .76rem; font-weight: 600; }
.badge-destroyed{ background: #ffebee; color: #c62828; font-size: .76rem; font-weight: 600; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #00bcd4; outline-offset: 2px; }

/* ===== Header / Navbar ===== */
.header-custom { background: linear-gradient(135deg, #263238, #37474f); border-bottom: 2px solid #1a252b; box-shadow: 0 6px 20px rgba(0,0,0,.3), 0 2px 6px rgba(0,0,0,.15); }
/* 모바일 메뉴 버튼: 가로 막대 3개만 흰색으로 */
.header-custom .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23fff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.brand-icon { width: 38px; height: 38px; background: rgba(255,255,255,.15); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.2); border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 16px; }
.nav-custom { color: #fff; }
.nav-custom:hover { color: rgba(255,255,255,.6); }
.nav-active { background: rgba(0,0,0,.15); color: #fff; }
.nb-avatar { width: 36px; height: 36px; border-radius: 50%; background: #8bc34a; border: 2px solid rgba(0,77,64,.3); display: grid; place-items: center; color: #333; font-weight: 700; font-size: .8rem; position: relative; }
.nb-avatar::after { content:''; position: absolute; bottom: 0; right: 0; width: 9px; height: 9px; background: #a5d6a7; border: 2px solid #fff; border-radius: 50%; }

/* ===== Skip Navigation ===== */
.skip-nav { position: absolute; top: -40px; left: 0; background: #00838f; color: #fff; padding: 8px 16px; z-index: 9999; transition: top .2s; }
.skip-nav:focus { top: 0; }

/* ===== Footer ===== */
.foot-light { background: #546e7a; }

/* ===== Animations ===== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.anim { animation: fadeUp .4s ease both; }
.anim-d1 { animation-delay: .06s; }
.anim-d2 { animation-delay: .12s; }
.anim-d3 { animation-delay: .18s; }
@media (prefers-reduced-motion: reduce) {
    .anim, .anim-d1, .anim-d2, .anim-d3 { animation: none; }
}

/* ===== Mobile Offcanvas Menu (right slide, SPACE293 style) ===== */
#navOffcanvas {
    width: 280px;
    max-width: 85vw;
}
#navOffcanvas .offcanvas-header {
    background: linear-gradient(135deg, #263238, #37474f);
    border-bottom: 2px solid #1a252b;
    padding: 1rem 1.25rem;
}
#navOffcanvas .offcanvas-title {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
}
#navOffcanvas .btn-close {
    filter: invert(1);
    opacity: .8;
}
#navOffcanvas .offcanvas-body {
    background: #37474f;
    padding: 0;
}
#navOffcanvas .nav-mobile-menu .nav-link {
    color: rgba(255,255,255,.9);
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
#navOffcanvas .nav-mobile-menu .nav-link:hover,
#navOffcanvas .nav-mobile-menu .nav-link:focus {
    background: rgba(0,0,0,.15);
    color: #fff;
}
#navOffcanvas .nav-mobile-menu .nav-link.nav-active {
    background: rgba(0,0,0,.2);
    color: #fff;
    font-weight: 600;
}
#navOffcanvas .nav-mobile-avatar-wrap {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,.1);
    margin-top: auto;
}

/* ===== Common Responsive ===== */
@media (max-width: 320px) {
    body { font-size: 13px; }
    .brand-icon { width: 32px; height: 32px; font-size: 14px; }
    .nb-avatar { width: 32px; height: 32px; font-size: .75rem; }
}

.navbar-collapse {
    flex-grow: unset !important;
}
/* ===== Stats Card (통계 카드) ===== */
.stats-card {
    background: #fff;
    border: none;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
}
.stats-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #667eea 0%, #5568d3 100%);
}
.stats-card.green::before  { background: linear-gradient(180deg, #28a745 0%, #1e7e34 100%); }
.stats-card.orange::before { background: linear-gradient(180deg, #ffc107 0%, #e0a800 100%); }
.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.stats-card .card-body { padding: 1.5rem 1.75rem; }
.stats-card .stats-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
    margin-bottom: 0.4rem;
}
.stats-card.green  .stats-value { color: #28a745; }
.stats-card.orange .stats-value { color: #ffc107; }
.stats-card .stats-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #495057;
}
.stats-card .stats-icon {
    position: absolute;
    right: 1.25rem; top: 1.25rem;
    font-size: 2.75rem;
    opacity: 0.08;
    color: #667eea;
}
@media (max-width: 768px) {
    .stats-card .stats-value { font-size: 1.75rem; }
}
