/* GoWash24 Common Styles - 디자인 모던화 */

/* ============================================================
   CSS Variables (통합)
   ============================================================ */
:root {
    /* 배경색 */
    --color-bg-primary: #0a0d14;      /* navy-950 */
    --color-bg-secondary: #0f1219;    /* navy-900 */
    --color-bg-tertiary: #1e293b;     /* navy-800 */

    /* 테두리 */
    --color-border-subtle: #1a1f2e;   /* navy-800 대체 */
    --color-border-medium: #252b3a;   /* navy-700 대체 */

    /* 텍스트 */
    --color-text-primary: #e8ecf2;    /* 약간 따뜻한 white */
    --color-text-secondary: #9ba3b8;  /* slate-400 */
    --color-text-tertiary: #6b7280;   /* slate-500 */

    /* 브랜드 컬러 */
    --color-primary: #FF4F00;
    --color-primary-hover: #E64600;
    --color-brand-glow: rgba(255, 79, 0, 0.12);

    /* 상태 컬러 */
    --color-success: #22c55e;
    --color-warning: #eab308;
    --color-danger: #ef4444;
    --color-info: #3b82f6;

    /* 트랜지션 */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* 모달 애니메이션 (iOS Container Transform) */
    --transition-modal-open: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-modal-close: 0.25s cubic-bezier(0.32, 0, 0.67, 0);

    /* 반경 */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    /* 그림자 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(255, 79, 0, 0.3);
}

/* ===== 타이포그래피 밀도 ===== */
body, button, input, textarea, select {
    letter-spacing: -0.02em;
}

/* ===== Page Transition Keyframes ===== */
@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pageExit {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

.page-wrapper {
    opacity: 0;
    transform: translateY(8px);
    animation: pageEnter 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.page-exit {
    animation: pageExit 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ===== Scrollbar (커스텀 색상 적용) ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--color-border-subtle);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-border-medium);
}

/* ===== Base (커스텀 색상 적용) ===== */
body {
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
}

/* ===== Animations → animation.css로 분리됨 ===== */

/* ===== Admin Table ===== */
.admin-table th {
    @apply text-xs font-medium text-slate-400 uppercase tracking-wider text-left py-3 px-4 border-b border-navy-800;
}
.admin-table td {
    @apply py-3 px-4 border-b border-navy-800 text-sm text-slate-300;
}
.admin-table tr:hover {
    @apply bg-navy-800/50 transition-colors;
}

/* ===== Form Inputs ===== */
.form-input {
    @apply w-full bg-navy-950 border border-navy-800 rounded-lg px-4 py-2.5 text-white
           focus:outline-none focus:border-primary transition-colors;
}
.form-label {
    @apply block text-xs font-medium text-slate-400 mb-1;
}

/* ===== Buttons (레거시 .btn-* 제거됨, .u-btn-* 사용) ===== */

/* ===== Cards ===== */
.card {
    @apply bg-navy-900 border border-navy-800 rounded-xl;
}
.card-header {
    @apply p-4 border-b border-navy-800;
}
.card-body {
    @apply p-4;
}

/* ===== Status Badges ===== */
.badge {
    @apply px-2 py-0.5 rounded text-xs font-bold;
}
.badge-primary {
    @apply bg-primary/10 text-primary border border-primary/20;
}
.badge-success {
    @apply bg-green-500/10 text-green-500 border border-green-500/20;
}
.badge-warning {
    @apply bg-yellow-500/10 text-yellow-500 border border-yellow-500/20;
}
.badge-danger {
    @apply bg-red-500/10 text-red-500 border border-red-500/20;
}
.badge-muted {
    @apply bg-slate-800 text-slate-400 border border-slate-700;
}

/* ===== Sidebar ===== */
#sidebar {
    transition: transform 0.3s ease;
}

#sidebar-overlay {
    transition: opacity 0.3s ease;
}

/* Sidebar Transition (Linear-style smooth animation) */
.sidebar-transition {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar Active State Styling */
.nav-item.active {
    background-color: rgba(255, 79, 0, 0.1); /* Primary color with opacity */
    color: #FF4F00; /* Primary Text */
}

.nav-item.active i {
    color: #FF4F00; /* Icon Color */
}

.nav-item:hover {
    transform: translateX(4px); /* Hover 시 살짝 오른쪽 이동 */
}

/* Collapsed Sidebar - Disable hover transform */
.sidebar-collapsed .nav-item:hover {
    transform: none;
}

/* Collapsed Sidebar - Tooltip on hover */
.sidebar-collapsed .nav-item {
    position: relative;
}

.sidebar-collapsed .nav-item:hover::after {
    content: attr(data-title);
    position: absolute;
    left: 56px;
    top: 50%;
    transform: translateY(-50%);
    background: #1e293b;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 99999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid #334155;
}

/* ===== Pulse Animation (for status indicators) ===== */
.pulse-dot {
    @apply relative flex h-2 w-2;
}
.pulse-dot::before {
    @apply animate-ping absolute inline-flex h-full w-full rounded-full bg-current opacity-75;
    content: '';
}
.pulse-dot::after {
    @apply relative inline-flex rounded-full h-2 w-2 bg-current;
    content: '';
}

/* ===== Custom Scrollbar ===== */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 2px;
}

/* ===== Network Status Pulse → animation.css 참조 ===== */
.pulse-online {
    animation: pulseGreen 2s infinite;
}

.pulse-offline {
    animation: pulseRed 1.5s infinite;
}

/* ===== Icon Tooltips ===== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    padding: 6px 10px;
    background: #1e293b;
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 6px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    pointer-events: none;
    border: 1px solid #334155;
    z-index: 99999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(2px);
    border: 5px solid transparent;
    border-top-color: #334155;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    pointer-events: none;
    z-index: 99999;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Tooltip position variants */
[data-tooltip-pos="bottom"]::after {
    bottom: auto;
    top: 100%;
    transform: translateX(-50%) translateY(4px);
}

[data-tooltip-pos="bottom"]::before {
    bottom: auto;
    top: 100%;
    transform: translateX(-50%) translateY(-8px);
    border-top-color: transparent;
    border-bottom-color: #334155;
}

[data-tooltip-pos="left"]::after {
    bottom: auto;
    left: auto;
    right: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
}

[data-tooltip-pos="left"]::before {
    bottom: auto;
    left: auto;
    right: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    border-top-color: transparent;
    border-left-color: #334155;
}

[data-tooltip-pos="right"]::after {
    bottom: auto;
    left: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(4px);
}

[data-tooltip-pos="right"]::before {
    bottom: auto;
    left: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(-6px);
    border-top-color: transparent;
    border-right-color: #334155;
}

/* ============================================================
   UNIFIED COMPONENTS (Pure CSS - CDN Compatible)
   로그인 페이지 기준으로 통일된 스타일
   ============================================================ */

/* ===== Unified Button Styles ===== */
.u-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
}

.u-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.u-btn:active:not(:disabled) {
    transform: scale(0.98);
}

/* Primary Button */
.u-btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.u-btn-primary:hover:not(:disabled) {
    background-color: var(--color-primary-hover);
    box-shadow: var(--shadow-glow);
}

/* Secondary Button */
.u-btn-secondary {
    background-color: #020617;
    color: #94a3b8;
    border: 1px solid #1e293b;
}

.u-btn-secondary:hover:not(:disabled) {
    background-color: #1e293b;
    color: white;
    border-color: #334155;
}

/* Danger Button */
.u-btn-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.u-btn-danger:hover:not(:disabled) {
    background-color: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

/* Ghost Button (Outline) */
.u-btn-ghost {
    background-color: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.u-btn-ghost:hover:not(:disabled) {
    background-color: var(--color-primary);
    color: white;
}

/* Button with Loading State */
.u-btn.loading {
    pointer-events: none;
}

.u-btn.loading .btn-text {
    opacity: 0;
}

.u-btn.loading .btn-spinner {
    position: absolute;
    display: block;
}

.btn-spinner {
    display: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;  /* → animation.css 참조 */
}

/* ===== Unified Modal System (iOS 앱 스타일) ===== */

/* 모달 오버레이 */
.u-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.u-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 모달 콘텐츠 - iOS 스타일 Container Transform */
.u-modal-content {
    background-color: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.85);
    transform-origin: center center;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                opacity 0.3s ease,
                border-radius 0.35s ease;
    will-change: transform, opacity, border-radius;
}

.u-modal-overlay.active .u-modal-content {
    transform: scale(1);
    opacity: 1;
    border-radius: 16px;
}

/* 모달 닫힐 때 */
.u-modal-overlay.closing .u-modal-content {
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.32, 0, 0.67, 0),
                opacity 0.2s ease;
}

/* 모달 크기 규격 */
.u-modal-sm { width: 100%; max-width: 400px; }   /* 확인 다이얼로그, 알림 */
.u-modal-md { width: 100%; max-width: 500px; }   /* 상세 정보, 폼 */
.u-modal-lg { width: 100%; max-width: 640px; }   /* 설정, 목록 */
.u-modal-xl { width: 100%; max-width: 800px; }   /* 대형 폼, 미리보기 */
.u-modal-full { width: 95%; max-width: 1200px; } /* 전체 화면급 */

/* 모달 헤더 (통일) */
.u-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #1e293b;
}

.u-modal-header h2,
.u-modal-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.u-modal-close {
    padding: 0.5rem;
    color: #64748b;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.u-modal-close:hover {
    color: white;
    background-color: #1e293b;
}

/* 모달 바디 (통일) */
.u-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* 모달 푸터 (통일) */
.u-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #1e293b;
}

/* ===== Secondary Password Modal (member-detail 스타일 통일) ===== */
.secondary-pw-modal-overlay {
    z-index: 9999;
}

.secondary-pw-modal-content {
    width: 90%;
    max-width: 420px;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.secondary-pw-modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #1e293b;
    background: linear-gradient(to right, #0f172a, #1e293b);
}

.secondary-pw-modal-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: rgba(255, 79, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.secondary-pw-modal-icon i,
.secondary-pw-modal-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--color-primary);
}

.secondary-pw-modal-title {
    margin: 0 0 0.25rem 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
}

.secondary-pw-modal-message {
    margin: 0;
    font-size: 0.875rem;
    color: #94a3b8;
    line-height: 1.4;
}

.secondary-pw-modal-body {
    padding: 1.5rem;
}

.secondary-pw-modal-input-wrapper {
    position: relative;
}

.secondary-pw-modal-input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 1rem;
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 0.75rem;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-align: center;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.secondary-pw-modal-input:focus {
    border-color: var(--color-primary);
    outline: none;
}

.secondary-pw-modal-input::placeholder {
    letter-spacing: normal;
    font-weight: 400;
    color: #64748b;
}

.secondary-pw-modal-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast);
    border-radius: 0.375rem;
}

.secondary-pw-modal-toggle i,
.secondary-pw-modal-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
}

.secondary-pw-modal-toggle:hover {
    color: white;
    background: #1e293b;
}

.secondary-pw-modal-error {
    margin: 0.75rem 0 0;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 0.5rem;
    display: none;
}

.secondary-pw-modal-error.is-visible {
    display: block;
}

.secondary-pw-modal-footer {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #1e293b;
    background-color: #0a0f1a;
}

.secondary-pw-modal-footer .u-btn {
    flex: 1;
}

.secondary-pw-modal-cancel {
    background-color: #020617;
    color: #94a3b8;
    border: 1px solid #1e293b;
}

.secondary-pw-modal-cancel:hover {
    background-color: #1e293b;
    color: white;
    border-color: #334155;
}

.secondary-pw-modal-confirm {
    background-color: var(--color-primary);
    color: white;
}

.secondary-pw-modal-confirm:hover {
    background-color: var(--color-primary-hover);
}

/* ===== Unified Card Hover Effect ===== */
.u-card-hover {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.u-card-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: #334155;
}

/* ===== Unified Input Focus Effect ===== */
.u-input-focus {
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.u-input-focus:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(255, 79, 0, 0.1);
    outline: none;
}

/* ===== Shake Animation (for errors) → animation.css 참조 ===== */
.u-shake {
    animation: shake 0.5s ease-in-out;
}

/* Error State */
.u-error {
    border-color: var(--color-danger) !important;
}

.u-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* ===== Toast Notification ===== */
.u-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: #0f172a;
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow);
}

.u-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.u-toast.success {
    border: 1px solid var(--color-success);
}

.u-toast.error {
    border: 1px solid var(--color-danger);
}

.u-toast.warning {
    border: 1px solid var(--color-warning);
}

.u-toast-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.u-toast.success .u-toast-icon {
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--color-success);
}

.u-toast.error .u-toast-icon {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
}

.u-toast-message {
    font-size: 0.9375rem;
    font-weight: 500;
    color: white;
}

/* ===== Loading Skeleton → animation.css 참조 ===== */
.u-skeleton {
    background: linear-gradient(
        90deg,
        #1e293b 0%,
        #334155 50%,
        #1e293b 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

/* ===== Stagger Animation (for lists) → animation.css 참조 ===== */
.u-stagger > * {
    opacity: 0;
    transform: translateY(10px);
    animation: staggerIn 0.3s ease-out forwards;
}

.u-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.u-stagger > *:nth-child(2) { animation-delay: 0.1s; }
.u-stagger > *:nth-child(3) { animation-delay: 0.15s; }
.u-stagger > *:nth-child(4) { animation-delay: 0.2s; }
.u-stagger > *:nth-child(5) { animation-delay: 0.25s; }
.u-stagger > *:nth-child(6) { animation-delay: 0.3s; }
.u-stagger > *:nth-child(7) { animation-delay: 0.35s; }
.u-stagger > *:nth-child(8) { animation-delay: 0.4s; }

/* ===== Focus Ring (Accessibility) ===== */
.u-focus-ring:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Global focus-visible for interactive elements */
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Remove outline for mouse users but keep for keyboard */
:focus:not(:focus-visible) {
    outline: none;
}

/* ===== Interactive Ripple Effect ===== */
.u-ripple {
    position: relative;
    overflow: hidden;
}

.u-ripple::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.u-ripple:active::after {
    opacity: 1;
}

/* ===== Empty State → animation.css 참조 ===== */
.u-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: #64748b;
    animation: emptyStateFadeIn 0.5s ease-out;
}

.u-empty-state-icon {
    width: 4rem;
    height: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.4;
    color: #475569;
    animation: emptyStateFloat 3s ease-in-out infinite;
}

.u-empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.u-empty-state-desc {
    font-size: 0.875rem;
    max-width: 280px;
    line-height: 1.5;
}

.u-empty-state-action {
    margin-top: 1.5rem;
}

.u-empty-state-action button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: #FF4F00;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.u-empty-state-action button:hover {
    background: #e64500;
    transform: translateY(-1px);
}

.u-empty-state-action button:active {
    transform: translateY(0);
}

/* ===== Status Indicator ===== */
.u-status-dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.u-status-dot.live::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: inherit;
    animation: pulseRing 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;  /* → animation.css 참조 */
}

/* ===== Transition Utilities ===== */
.u-transition-fast { transition: all var(--transition-fast); }
.u-transition-normal { transition: all var(--transition-normal); }
.u-transition-slow { transition: all var(--transition-slow); }
.u-transition-smooth { transition: all var(--transition-smooth); }

/* ===== Skeleton Loading → animation.css 참조 ===== */
/* (위 .u-skeleton과 중복, shimmer 애니메이션 사용) */

.u-skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.u-skeleton-text.short {
    width: 40%;
}

.u-skeleton-text.medium {
    width: 70%;
}

.u-skeleton-text.full {
    width: 100%;
}

.u-skeleton-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
}

.u-skeleton-card {
    height: 8rem;
    border-radius: 0.5rem;
}

.u-skeleton-button {
    height: 2.5rem;
    width: 6rem;
    border-radius: 0.5rem;
}

/* 스켈레톤 카드 그리드 */
.u-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

/* 스켈레톤 리스트 아이템 */
.u-skeleton-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #0f172a;
    border-radius: 0.5rem;
}

.u-skeleton-list-item .u-skeleton-avatar {
    flex-shrink: 0;
}

.u-skeleton-list-item .u-skeleton-content {
    flex: 1;
}

/* ===== Lazy Loading ===== */
.u-lazy {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.u-lazy-loaded {
    /* 로드 완료 후 즉시 표시하지 않음 (onload 대기) */
}

.u-lazy-visible {
    opacity: 1;
}

/* 로딩 중 placeholder → animation.css 참조 */
.u-lazy-placeholder {
    background: linear-gradient(
        90deg,
        #1e293b 0%,
        #334155 50%,
        #1e293b 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

/* ============================================================
   IME 비활성화 (한글 입력 방지)
   ============================================================ */
.ime-disabled {
    ime-mode: disabled;
    -webkit-ime-mode: disabled;
    -moz-ime-mode: disabled;
    -ms-ime-mode: disabled;
}

/* ============================================================
   모바일 세로 모드 차단 오버레이
   - 세로 방향 + 모바일 크기에서만 표시
   ============================================================ */
.mobile-block-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

/* 세로 모드 + 터치 디바이스(모바일)에서 표시 */
@media (orientation: portrait) and (max-width: 768px) {
    .mobile-block-overlay {
        display: flex !important;
    }

    /* 메인 콘텐츠 숨김 */
    body > *:not(.mobile-block-overlay) {
        display: none !important;
    }
}

/* 모바일 블록 아이콘 */
.mobile-block-icon {
    width: 5rem;
    height: 5rem;
    margin-bottom: 2rem;
    color: #FF4F00;
    opacity: 0.9;
}

/* 회전 아이콘 애니메이션 → animation.css 참조 */
.mobile-block-icon.rotate-animate {
    animation: rotateDevice 2s ease-in-out infinite;
}

/* 모바일 블록 제목 */
.mobile-block-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
}

/* 모바일 블록 메시지 */
.mobile-block-message {
    font-size: 1rem;
    color: #94a3b8;
    line-height: 1.6;
    max-width: 280px;
}

/* 모바일 블록 힌트 */
.mobile-block-hint {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.875rem;
}

.mobile-block-hint svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* ============================================================
   알림 패널 (사이드바)
   ============================================================ */
.notification-panel {
    position: fixed;
    top: 28px;
    bottom: 126px;
    left: 8px;
    width: min(580px, calc(100vw - 24px));
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notification-panel.hidden {
    display: none;
}

.notification-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #334155;
    background: #0f172a;
    flex-shrink: 0;
}

.notification-panel-body {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.notification-item {
    display: flex;
    width: 100%;
    gap: 1rem;
    padding: 1.125rem 1.25rem;
    border-bottom: 1px solid #334155;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease;
    color: inherit;
}

.notification-item:hover {
    background: #334155;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background: rgba(255, 79, 0, 0.05);
}

.notification-item-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-item-icon.info {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.notification-item-icon.success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.notification-item-icon.warning {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.notification-item-icon.error {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.notification-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.notification-item-title {
    display: block;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.35;
}

.notification-item-desc {
    display: block;
    font-size: 0.8125rem;
    color: #94a3b8;
    line-height: 1.55;
    white-space: normal;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: keep-all;
}

.notification-item-time {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.125rem;
    text-align: right;
}

@media (max-width: 768px) {
    .notification-panel {
        inset: 12px;
        width: auto;
    }
}

/* ============================================================
   페이지 로딩 오버레이
   ============================================================ */
.page-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(10, 13, 20, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.page-loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.page-loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 79, 0, 0.2);
    border-top-color: #FF4F00;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.page-loading-text {
    position: absolute;
    margin-top: 80px;
    font-size: 0.875rem;
    color: #94a3b8;
}

/* ============================================================
   콘텐츠 로딩 상태
   ============================================================ */
.content-loading {
    position: relative;
    min-height: 200px;
}

.content-loading::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 13, 20, 0.7);
    z-index: 10;
    border-radius: inherit;
}

.content-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 79, 0, 0.2);
    border-top-color: #FF4F00;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 11;
}

/* ============================================================
   테이블 스켈레톤
   ============================================================ */
.table-skeleton {
    width: 100%;
}

.table-skeleton-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #1e293b;
}

.table-skeleton-cell {
    height: 1rem;
    background: linear-gradient(90deg, #1e293b 0%, #334155 50%, #1e293b 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.table-skeleton-cell.w-10 { width: 2.5rem; }
.table-skeleton-cell.w-20 { width: 5rem; }
.table-skeleton-cell.w-32 { width: 8rem; }
.table-skeleton-cell.w-40 { width: 10rem; }
.table-skeleton-cell.w-48 { width: 12rem; }
.table-skeleton-cell.flex-1 { flex: 1; }

/* ============================================================
   카드 스켈레톤
   ============================================================ */
.card-skeleton {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.card-skeleton-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-skeleton-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: linear-gradient(90deg, #1e293b 0%, #334155 50%, #1e293b 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.card-skeleton-title {
    flex: 1;
}

.card-skeleton-line {
    height: 0.875rem;
    background: linear-gradient(90deg, #1e293b 0%, #334155 50%, #1e293b 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.card-skeleton-line:last-child {
    margin-bottom: 0;
    width: 60%;
}

/* ============================================================
   인라인 로딩 스피너
   ============================================================ */
.inline-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 79, 0, 0.2);
    border-top-color: #FF4F00;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

.inline-spinner.sm {
    width: 0.75rem;
    height: 0.75rem;
    border-width: 1.5px;
}

.inline-spinner.lg {
    width: 1.5rem;
    height: 1.5rem;
    border-width: 3px;
}

/* ============================================================
   데이터 로딩 플레이스홀더
   ============================================================ */
.data-placeholder {
    color: #64748b;
    font-style: italic;
}

.data-placeholder.loading::before {
    content: '';
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    border: 2px solid rgba(255, 79, 0, 0.2);
    border-top-color: #FF4F00;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}
