/* ══════════════════════════════════════════
   Simple.Lab Analytics — Global Styles
   Tailwind CSS 는 CDN. 여기는 커스텀만.
   ══════════════════════════════════════════ */

/* ── Alpine x-cloak ── */
[x-cloak] { display: none !important; }

/* ── 공통 카드 베이스 ── */
.card-base {
    border-radius: 0.75rem;
    background: #fff;
    border: 1px solid #f3f4f6;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    padding: 1.25rem;
}

/* ── 사이드바 ── */
.sidebar {
    min-width: 60px;
    scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { width: 0; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(255,255,255,.55);
    transition: all .15s ease;
}
.nav-link:hover {
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.9);
}
.nav-link.active {
    background: rgba(230,0,126,.9);
    color: #fff;
    box-shadow: 0 2px 8px rgba(230,0,126,.25);
}

.nav-label {
    white-space: nowrap;
    overflow: hidden;
    transition: opacity .2s ease;
}

.nav-section-label {
    padding: 0 0.75rem;
    padding-bottom: 0.375rem;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #6b7280;
}

.sub-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,.42);
    transition: all .15s ease;
}
.sub-link:hover {
    color: rgba(255,255,255,.85);
    background: rgba(255,255,255,.04);
}
.sub-link.active {
    color: #e6007e;
    background: rgba(230,0,126,.08);
}
.sub-link.active .sub-dot {
    background: #e6007e;
    box-shadow: 0 0 6px rgba(230,0,126,.5);
}

.sub-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    transition: all .15s ease;
}

/* ── 사이드바 토글 버튼 ── */
.sidebar-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.625rem;
    border-radius: 0.5rem;
    color: rgba(255,255,255,.4);
    font-weight: 500;
    transition: all .15s ease;
    border: none;
    background: transparent;
    cursor: pointer;
}
.sidebar-toggle-btn:hover {
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.8);
}

/* ── 상단 헤더 ── */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 1.5rem;
    background: #fff;
    border-bottom: 1px solid #f3f4f6;
    flex-shrink: 0;
    position: relative;
    z-index: 30;
}

.header-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    color: #9ca3af;
    transition: all .15s ease;
    border: none;
    background: transparent;
    cursor: pointer;
}
.header-icon-btn:hover {
    background: #f3f4f6;
    color: #4b5563;
}

/* ── 하단 푸터 ── */
.app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
    padding: 0 1.5rem;
    background: #fff;
    border-top: 1px solid #f3f4f6;
    flex-shrink: 0;
}

/* ── 유틸리티 ── */
table tbody tr { transition: background-color .12s ease; }

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── 콘텐츠 스크롤바 ── */
main::-webkit-scrollbar { width: 5px; }
main::-webkit-scrollbar-track { background: transparent; }
main::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
main::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ══════════════════════════════════════════
   Page Loading → Reveal 전환 (대시보드)
   ══════════════════════════════════════════ */
.page-content {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .45s cubic-bezier(.4,0,.2,1), transform .45s cubic-bezier(.4,0,.2,1);
}
.page-content.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* 스켈레톤 애니메이션 */
@keyframes skeleton-pulse {
    0%, 100% { opacity: .45; }
    50%      { opacity: .8; }
}
@keyframes skeleton-shimmer {
    0%   { background-position: 200% 200%; }
    100% { background-position: -200% -200%; }
}

.skeleton {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    background: #fff;
    border: 1px solid #f3f4f6;
    padding: 1.25rem;
}

.skel-block {
    border-radius: 6px;
    background: #f0f1f3;
    animation: skeleton-pulse 1.6s ease-in-out infinite;
}
.skel-title { width: 40%; height: 14px; margin-bottom: 6px; }
.skel-desc  { width: 55%; height: 10px; margin-bottom: 16px; }
.skel-chart {
    width: 100%;
    border-radius: 8px;
    background: linear-gradient(135deg, #f3f4f6 25%, #ecedf0 50%, #f3f4f6 75%);
    background-size: 200% 200%;
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
}
.skel-kpi {
    height: 76px;
    border-radius: 0.875rem;
    background: linear-gradient(135deg, #f3f4f6 25%, #ecedf0 50%, #f3f4f6 75%);
    background-size: 200% 200%;
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
    border: 1px solid #f3f4f6;
}
.skel-bar {
    height: 7px;
    border-radius: 4px;
    background: #f0f1f3;
    animation: skeleton-pulse 1.6s ease-in-out infinite;
}
