/* ══════════════════════════════════════════
   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;
}

/* ── 상단 헤더 (다크) ── */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    padding: 0 1.25rem;
    background: #1a1a2e;
    flex-shrink: 0;
    position: relative;
    z-index: 30;
    box-shadow: 0 1px 8px rgba(0, 0, 0, .12);
}

/* ── 상단 내비게이션 (다크 배경용) ── */
.top-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 14px 10px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, .5);
    transition: all .15s ease;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.top-nav-link:hover {
    color: rgba(255, 255, 255, .85);
}
.top-nav-link.active {
    color: #fff;
    font-weight: 600;
    border-bottom-color: #e6007e;
}
.top-nav-link svg {
    color: rgba(255, 255, 255, .35);
    transition: color .15s;
}
.top-nav-link:hover svg {
    color: rgba(255, 255, 255, .7);
}
.top-nav-link.active svg {
    color: #e6007e;
}

.header-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    color: rgba(255, 255, 255, .45);
    transition: all .15s ease;
    border: none;
    background: transparent;
    cursor: pointer;
}
.header-icon-btn:hover {
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .9);
}

/* ── 하단 푸터 ── */
.app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 36px;
    padding: 0 1.25rem;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    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 { animation: page-fade-in .3s ease both; }
@keyframes page-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── 콘텐츠 스크롤바 ── */
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;
}
