/* ========================================
   경주시 현수막 예약시스템 - 사용자 페이지
   Unified Color System v3.0
   ======================================== */

/* Pretendard Variable Font (DESIGN.md) */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

/* ========================================
   통일된 색상 변수 (Unified Color Variables)
   ======================================== */
:root {
    /* 메인 컬러 - 경주시 공식 느낌의 블루 계열 */
    --primary-color: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --primary-gradient: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);

    /* 보조 컬러 */
    --secondary-color: #0ea5e9;
    --secondary-gradient: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);

    /* 상태 컬러 */
    --success-color: #059669;
    --success-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --warning-color: #d97706;
    --warning-gradient: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    --danger-color: #dc2626;
    --danger-gradient: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);

    /* 다크 컬러 (푸터용) */
    --dark-bg: #1e3a8a;
    --darker-bg: #172554;
    --dark-gradient: linear-gradient(180deg, #1e3a8a 0%, #172554 100%);

    /* Warm Gray Neutrals - DESIGN.md 정의 */
    --gray-50: #faf9f7;   /* 페이지 배경 */
    --gray-100: #f5f3f0;  /* 카드/섹션 배경 */
    --gray-200: #e8e5e1;  /* 보더 */
    --gray-300: #d6d3cf;
    --gray-400: #9c9590;  /* 연한 텍스트 */
    --gray-500: #6b6560;  /* 보조 텍스트 */
    --gray-600: #524e49;
    --gray-700: #3a3835;
    --gray-800: #2c2925;  /* 본문 텍스트 */
    --gray-900: #1a1917;

    /* UI 설정 */
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radius 계층 - DESIGN.md 정의 */
    --radius-sm: 4px;     /* 버튼, 입력, 배지 */
    --radius-md: 8px;     /* 카드, 검색박스 */
    --radius-lg: 12px;    /* 모달, 큰 카드 */
    --radius-full: 9999px; /* 원형 */
}

/* ========================================
   Base Styles
   ======================================== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Noto Sans KR', sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

*, .uk-h1, .uk-h2, .uk-h3, .uk-h4, .uk-h5, .uk-h6,
h1, h2, h3, h4, h5, h6,
.uk-navbar-item, .uk-navbar-nav>li>a, .uk-navbar-toggle {
    font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Noto Sans KR', sans-serif;
}

/* Container */
.uk-container-small {
    max-width: 1000px;
}

/* ========================================
   Header Styles (통일된 스타일)
   ======================================== */
.section-content {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.header-wrapper {
    background: var(--primary-gradient) !important;
    box-shadow: 0 4px 6px -1px rgba(30, 64, 175, 0.3);
}

/* ========================================
   Footer Styles (헤더와 통일)
   ======================================== */
.footer {
    background: var(--dark-gradient) !important;
    padding: 40px 0 24px 0 !important;
    margin-top: 40px;
}

.footer .uk-container {
    max-width: 1000px;
}

.footer-logo {
    color: white;
    margin-bottom: 20px;
}

.footer-logo img {
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.footer-logo img:hover {
    opacity: 1;
}

.logo-text {
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
}

.footer h5 {
    color: #93c5fd;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 16px;
    margin-top: 24px;
}

.footer center a {
    display: inline-block;
    color: #bfdbfe;
    font-size: 0.85rem;
    text-decoration: none;
    margin: 0 12px;
    padding: 6px 12px;
    border-radius: 6px;
    transition: var(--transition);
}

.footer center a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.footer-text {
    color: #93c5fd;
    font-size: 0.8rem !important;
    margin-top: 24px !important;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    line-height: 1.8;
}

.footer-text a {
    color: #bfdbfe;
    transition: color 0.3s ease;
}

.footer-text a:hover {
    color: white;
    text-decoration: none;
}

/* ========================================
   Quick Menu Sidebar
   ======================================== */
.baby-sub-quick-menu-area {
    position: fixed;
    right: 20px;
    top: 120px;
    left: auto;
    margin-left: 0;
    width: 220px;
    z-index: 99;
    background: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--card-shadow);
    line-height: 1.8;
}

.baby-sub-quick-menu-area h5 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
}

.baby-sub-quick-menu-area a {
    display: block;
    text-decoration: none;
    color: var(--gray-600);
    font-size: 0.85rem;
    padding: 6px 0;
    transition: var(--transition);
}

.baby-sub-quick-menu-area a:hover {
    color: var(--primary-color);
    padding-left: 8px;
}

/* ========================================
   Navigation
   ======================================== */
#navul {
    float: right;
    list-style: none;
    margin: 0;
    padding: 0;
}

#navul li {
    float: left;
    margin-right: 8px;
}

#navul li a {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    padding: 8px 14px;
    border-radius: 8px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#navul li a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    text-decoration: none;
}

#navul li a img {
    width: 16px;
    height: 16px;
    opacity: 0.9;
}

.nodeco {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.nodeco:hover {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

/* ========================================
   Table Styles
   ======================================== */
.uk-table {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
}

.uk-table thead {
    background: var(--primary-gradient);
}

.uk-table thead th {
    color: white !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 16px 12px;
    border: none !important;
}

.uk-table tbody tr {
    transition: var(--transition);
    border-bottom: 1px solid var(--gray-100);
}

.uk-table tbody tr:hover {
    background-color: #eff6ff;
}

.uk-table tbody tr:last-child {
    border-bottom: none;
}

.uk-table td {
    padding: 14px 12px;
    vertical-align: middle;
    border: none !important;
    color: var(--gray-800);
    font-size: 0.9rem;
}

.uk-table-small td {
    padding: 10px 8px;
}

.uk-table-divider>:first-child>tr:not(:first-child),
.uk-table-divider>:not(:first-child)>tr,
.uk-table-divider>tr:not(:first-child) {
    border-top: 1px solid var(--gray-200);
}

th {
    color: white !important;
    font-weight: 600 !important;
}

/* ========================================
   Button Styles (통일된 스타일)
   ======================================== */
.uk-button {
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 10px 20px;
    transition: var(--transition);
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.4;
    border: none;
}

.uk-button-default {
    background: white;
    border: 2px solid var(--gray-200);
    color: var(--gray-600);
}

.uk-button-default:hover {
    background: var(--gray-50);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.uk-button-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 14px rgba(30, 64, 175, 0.4);
}

.uk-button-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.5);
}

.uk-button-secondary {
    background: var(--secondary-gradient);
    color: white;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.4);
}

.uk-button-secondary:hover {
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
}

.uk-button-danger {
    background: var(--danger-gradient);
    color: white;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4);
}

.uk-button-danger:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    transform: translateY(-2px);
}

.uk-button-success {
    background: var(--success-gradient);
    color: white;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.4);
}

.uk-button-success:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    transform: translateY(-2px);
}

/* 예약 버튼 (노란색 유지 - 강조용) */
.yeyakbtn {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    color: var(--gray-800) !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.yeyakbtn:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

/* Custom Reservation Button */
.btn-yeyak {
    background: var(--success-gradient);
    color: white !important;
    border: none;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.4);
}

.btn-yeyak:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.5);
}

/* Map Button */
.btn-map {
    background: var(--secondary-gradient);
    color: white !important;
    border: none;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.4);
}

.btn-map:hover {
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
}

/* ========================================
   Form Styles
   ======================================== */
.uk-input, .uk-select, .uk-textarea {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: var(--transition);
    background: white;
}

.uk-input:focus, .uk-select:focus, .uk-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.1);
    outline: none;
}

.uk-input::placeholder {
    color: var(--gray-400);
}

.uk-input:disabled, .uk-select:disabled, .uk-textarea:disabled {
    background-color: var(--gray-100);
    border-color: var(--gray-200);
    color: var(--gray-500);
}

select, input {
    background-color: white;
    border-width: 2px;
    border-style: solid;
    border-color: var(--gray-200);
    border-radius: var(--radius-sm);
}

/* ========================================
   Search Box
   ======================================== */
.uk-search-box {
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--card-shadow);
}

.uk-search-box--content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.uk-search-box--content .uk-input {
    min-width: 200px;
}

/* ========================================
   Cards
   ======================================== */
.uk-card {
    box-shadow: var(--card-shadow);
    border-radius: var(--radius-md);
    transition: var(--transition);
    background: white;
}

.uk-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.uk-card-body {
    padding: 24px;
}

/* Card Header with Primary Color */
.uk-card-header {
    background: var(--primary-gradient);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

/* ========================================
   Status Indicators
   ======================================== */
.status-available {
    color: var(--success-color);
    font-weight: 600;
}

.status-unavailable {
    color: var(--danger-color);
    font-weight: 600;
}

/* ========================================
   Section Styles
   ======================================== */
.uk-section {
    padding: 24px 0;
}

.uk-section-default {
    background: var(--gray-50);
}

hr {
    margin-top: 24px !important;
    margin-bottom: 24px !important;
    border: none;
    border-top: 1px solid var(--gray-200);
}

/* ========================================
   Typography
   ======================================== */
.item-title {
    font-weight: 700;
    color: var(--gray-800);
}

.item-content {
    color: var(--gray-600);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--gray-800);
    font-weight: 700;
}

/* ========================================
   Scrollbar Styling
   ======================================== */
::-webkit-scrollbar-track {
    background-color: var(--gray-100);
    border-radius: 4px;
}

::-webkit-scrollbar {
    width: 8px;
    background-color: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ========================================
   Dialog / Modal
   ======================================== */
.ui-dialog {
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow-hover);
    border: none;
}

.ui-dialog-titlebar {
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 16px 20px;
}

.ui-dialog-title {
    color: white;
    font-weight: 600;
}

.ui-dialog-content {
    padding: 20px;
}

/* ========================================
   Loading Indicator
   ======================================== */
#loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    color: var(--gray-500);
    font-size: 1rem;
}

#loading img {
    width: 60px;
    margin-bottom: 16px;
    opacity: 0.7;
}

/* ========================================
   Alert / Notice Boxes
   ======================================== */
.alert-info {
    background: #dbeafe;
    border: 2px solid #93c5fd;
    color: var(--primary-dark);
    padding: 15px;
    border-radius: 8px;
}

.alert-warning {
    background: #fef3c7;
    border: 2px solid #fcd34d;
    color: #92400e;
    padding: 15px;
    border-radius: 8px;
}

.alert-danger {
    background: #fee2e2;
    border: 2px solid #fca5a5;
    color: #991b1b;
    padding: 15px;
    border-radius: 8px;
}

.alert-success {
    background: #d1fae5;
    border: 2px solid #6ee7b7;
    color: #065f46;
    padding: 15px;
    border-radius: 8px;
}

/* ========================================
   Utility Classes
   ======================================== */
.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-danger { color: var(--danger-color) !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-success { background-color: var(--success-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-danger { background-color: var(--danger-color) !important; }

.shadow-sm { box-shadow: var(--card-shadow); }
.shadow-lg { box-shadow: var(--card-shadow-hover); }
.rounded { border-radius: var(--radius-md); }

.cursor-pointer:hover {
    cursor: pointer;
}

.cursor-not:hover {
    cursor: not-allowed !important;
}

img {
    border: 0;
}

ul {
    list-style: none;
    padding: 0;
}

/* ========================================
   Modern UX Enhancements (2026)
   ======================================== */

/* Smooth page transition */
html {
    scroll-behavior: smooth;
}

/* Sticky header */
.header-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

/* Table row hover with left accent bar */
.uk-table tbody tr {
    position: relative;
    border-left: 3px solid transparent;
}

.uk-table tbody tr:hover {
    border-left-color: var(--primary-light);
    background-color: #f0f7ff;
}

/* Focus-visible for accessibility */
*:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
    border-radius: 4px;
}

button:focus-visible, a:focus-visible, input:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

/* Smooth entrance for content sections */
.uk-section {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Button press effect */
.uk-button:active {
    transform: translateY(0) scale(0.98) !important;
    transition: transform 0.1s ease;
}

/* Input focus glow animation */
.uk-input:focus, .uk-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

/* Status badge modern pill style */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    min-width: 60px;
    letter-spacing: 0.02em;
}

/* Toast notification animation */
.toast-container .toast {
    animation: toastSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastSlide {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Search box modern style */
.uk-search-box {
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.uk-search-box:focus-within {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.08);
}

/* Card subtle entrance */
.uk-card {
    animation: cardIn 0.4s ease-out;
}

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

/* Reservation button pulse on available */
.btn-yeyak, .yeyakbtn {
    position: relative;
    overflow: hidden;
}

.btn-yeyak::after, .yeyakbtn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-yeyak:hover::after, .yeyakbtn:hover::after {
    transform: translateX(100%);
}

/* Modern checkbox styling */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* Skeleton loading effect */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

/* Better disabled state */
.uk-button:disabled, .uk-button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Modern select dropdown */
.uk-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Link hover underline animation */
.footer center a, #navul li a {
    position: relative;
}

.footer center a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 12px;
    right: 12px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.footer center a:hover::after {
    transform: scaleX(1);
}

/* Empty state with icon */
.empty-state {
    padding: 80px 20px;
}

.empty-state-icon {
    font-size: 56px;
    margin-bottom: 20px;
    opacity: 0.4;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.6; }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.uk-animation-fade {
    animation: fadeIn 0.4s ease-out;
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1200px) {
    .baby-sub-quick-menu-area {
        display: none;
    }
}

@media (max-width: 960px) {
    .uk-container-small {
        padding: 0 16px;
    }

    .uk-search-box--content {
        flex-direction: column;
        align-items: stretch;
    }

    .uk-search-box--content .uk-input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .uk-table {
        font-size: 0.85rem;
    }

    .uk-table td, .uk-table th {
        padding: 10px 8px;
    }

    .uk-button {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .footer center a {
        display: block;
        margin: 8px 0;
    }

    .footer-text {
        font-size: 0.75rem !important;
    }

    /* 테이블 가로 스크롤 래퍼 */
    .uk-overflow-auto,
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 터치 타겟 최소 44px */
    a, button, .uk-button, input[type="submit"], span[onclick] {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* 로그인 페이지 배너 축소 */
    .login-banner-img,
    img[alt="banner size"] {
        max-height: 120px;
        width: auto;
    }

    /* 고정폭 요소 모바일 대응 */
    div[style*="width:900px"],
    div[style*="width:680px"],
    div[style*="width:800px"] {
        width: 100% !important;
        float: none !important;
    }

    /* 예약 폼 입력필드 모바일 */
    .uk-input, .uk-select, .uk-textarea {
        font-size: 16px; /* iOS 줌 방지 */
    }
}

/* ========================================
   jQuery UI Datepicker Override
   ======================================== */
.ui-datepicker {
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow-hover);
    border: none;
    padding: 12px;
}

.ui-datepicker-header {
    background: var(--primary-gradient);
    border: none;
    border-radius: 8px 8px 0 0;
}

.ui-datepicker-title {
    color: white;
}

.ui-datepicker th {
    color: var(--primary-color);
    font-weight: 600;
}

.ui-datepicker td a {
    border-radius: 6px;
    transition: var(--transition);
}

.ui-datepicker td a:hover {
    background: var(--primary-light);
    color: white;
}

.ui-datepicker td a.ui-state-active {
    background: var(--primary-color);
    color: white;
}

/* ========================================
   Status Badges (상태 배지)
   ======================================== */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    min-width: 60px;
}

.status-proceed {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.status-approve {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.status-deny {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.status-expired {
    background: #e5e7eb;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.status-disabled {
    background: #f3f4f6;
    color: #9ca3af;
    border: 1px solid #e5e7eb;
}

/* ========================================
   Empty State Message
   ======================================== */
.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--gray-500);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-600);
}

.empty-state-text {
    font-size: 0.9rem;
    color: var(--gray-400);
}

/* ========================================
   Design System Components (taste-skill)
   ======================================== */

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    text-decoration: none;
    line-height: 1.4;
    min-height: 40px;
}

.btn:active {
    transform: scale(0.98) translateY(1px);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.3);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
    background: var(--gray-200);
    color: var(--gray-800);
    text-decoration: none;
}

.btn-ghost {
    background: transparent;
    color: var(--primary-color);
    padding: 8px 12px;
}

.btn-ghost:hover {
    background: rgba(30, 64, 175, 0.06);
    text-decoration: none;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
    color: white;
    text-decoration: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    min-height: 32px;
}

.btn-xs {
    padding: 3px 8px;
    font-size: 0.75rem;
    min-height: 26px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 6px;
    min-height: auto;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--gray-500);
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-icon:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

/* --- Compact Table (관리자용) --- */
.table-compact {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.825rem;
    font-variant-numeric: tabular-nums;
}

.table-compact thead {
    background: var(--primary-color);
}

.table-compact thead th {
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    padding: 10px 8px;
    text-align: left;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 2;
}

.table-compact tbody td {
    padding: 8px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-800);
    vertical-align: middle;
}

.table-compact tbody tr:hover {
    background: rgba(30, 64, 175, 0.03);
}

.table-compact tbody tr.detail-row {
    background: var(--gray-50);
}

.table-compact tbody tr.detail-row td {
    padding: 12px 16px;
    border-bottom: 2px solid var(--gray-200);
    font-size: 0.8rem;
    color: var(--gray-600);
}

.table-compact .col-check { width: 40px; text-align: center; }
.table-compact .col-action { width: 80px; text-align: center; }

/* 행 확장 토글 */
.row-toggle {
    cursor: pointer;
}

.row-toggle:hover {
    background: rgba(30, 64, 175, 0.05);
}

.detail-row {
    display: none;
}

.detail-row.show {
    display: table-row;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px 24px;
}

.detail-item {
    display: flex;
    gap: 8px;
}

.detail-label {
    color: var(--gray-400);
    font-size: 0.75rem;
    white-space: nowrap;
}

.detail-value {
    color: var(--gray-700);
    font-size: 0.8rem;
    font-weight: 500;
}

/* --- Toast Notification --- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: toast-in 0.25s ease-out;
    max-width: 360px;
}

.toast-success { background: var(--success-color); }
.toast-warning { background: var(--warning-color); }
.toast-error { background: var(--danger-color); }
.toast-info { background: var(--primary-color); }

@keyframes toast-in {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* --- Responsive Helpers --- */
@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
    .table-compact { font-size: 0.8rem; }
    .table-compact thead th,
    .table-compact tbody td { padding: 6px 4px; }
}

@media (max-width: 1024px) {
    .hide-tablet { display: none !important; }
}

/* --- Data Formatting --- */
.text-mono {
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}
