@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* --- 기본 설정 --- */
/* --- 기본 설정 --- */
body {
    background-color: #e2e8f0;
    /* Metallic Silver Base */
    font-family: 'Outfit', sans-serif;
    color: #1e293b;
    margin: 0;
    overflow-x: hidden;
    background-image:
        linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
    min-height: 100vh;
}

/* --- 유틸리티 --- */
/* 글래스모피즘 패널 (Metallic/Glass Hybrid) */
.glass-panel {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(241, 245, 249, 0.8));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    border-left: 1px solid rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    border-right: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow:
        0 8px 32px 0 rgba(31, 38, 135, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Metallic Sheen Effect on Hover */
.glass-panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right,
            transparent 0%,
            rgba(255, 255, 255, 0.3) 50%,
            transparent 100%);
    transform: skewX(-25deg);
    transition: 0.5s;
    pointer-events: none;
}

.glass-panel:hover::after {
    left: 150%;
    transition: 0.7s ease-in-out;
}

.glass-panel:hover {
    transform: translateY(-2px);
    box-shadow:
        0 20px 40px -5px rgba(0, 0, 0, 0.1),
        0 10px 20px -5px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

/* 툴팁 전용 스타일 (Metallic Premium) */
.tooltip-panel {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
    backdrop-filter: blur(12px);
    border: 1px solid #cbd5e1;
    box-shadow:
        0 15px 35px -5px rgba(0, 0, 0, 0.15),
        0 5px 15px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    animation: tooltipSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    z-index: 100 !important;
}

.tooltip-arrow {
    width: 0.75rem;
    height: 0.75rem;
    background: #f8fafc;
    border-left: 1px solid #cbd5e1;
    border-top: 1px solid #cbd5e1;
    transform: translateX(-50%) rotate(45deg);
    position: absolute;
    top: -0.375rem;
    left: 50%;
    box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.05);
}

@keyframes tooltipSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
}

/* 텍스트 그라디언트 유틸리티 (Silver/Gold feel or Sleek Dark) */
.text-gradient {
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* --- 공통 폼 요소 --- */
.input-base {
    background: linear-gradient(to bottom, #ffffff, #f8fafc);
    border: 1px solid #cbd5e1;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    color: #334155;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.input-base:focus {
    border-color: #94a3b8;
    background: white;
    box-shadow:
        0 0 0 3px rgba(148, 163, 184, 0.2),
        inset 0 1px 2px rgba(0, 0, 0, 0.02);
    outline: none;
    transform: translateY(-1px);
}

/* Vibrant Button Interactive */
.btn-neon {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    font-weight: 700;
    border: none;
    border-radius: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3), 0 2px 4px -1px rgba(79, 70, 229, 0.1);
}

.btn-neon:hover {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4), 0 4px 6px -2px rgba(79, 70, 229, 0.2);
}

.btn-neon:active {
    transform: translateY(0);
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
}

/* --- 대시보드 전용 스타일 --- */
/* --- 대시보드 전용 스타일 --- */
.dashboard-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(203, 213, 225, 0.6);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* 네비게이션 및 서브메뉴 */
.nav-item-wrapper {
    position: relative;
    padding: 0.5rem 0;
}

/* 서브메뉴 드롭다운 (Metallic) */
.submenu-dropdown {
    display: block;
    visibility: hidden;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    min-width: 180px;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    z-index: 100;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item-wrapper:hover .submenu-dropdown {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* @keyframes fadeIn 제거됨 - transition으로 대체 */

.submenu-item {
    display: block;
    padding: 0.6rem 1.25rem;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.submenu-item:hover {
    background: #f1f5f9;
    color: #1e293b;
    padding-left: 1.5rem;
    border-left: 3px solid #94a3b8;
    /* Silver accent */
}

/* 스케줄 테이블 스타일 (Metallic) */
.schedule-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0.75rem;
    border: 1px solid #cbd5e1;
    position: relative;
    padding-bottom: 2rem;
    background: #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.schedule-table {
    width: 100%;
    min-width: max-content;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
}

.schedule-table th {
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    /* Silver Gradient */
    color: #475569;
    font-weight: 700;
    padding: 0.875rem 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #cbd5e1;
    border-right: 1px solid #e2e8f0;
    white-space: nowrap;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.schedule-table td {
    padding: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    font-size: 0.8125rem;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    color: #334155;
}

/* 테이블 스티키 컬럼 */
.schedule-table th:first-child,
.schedule-table td:first-child {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 10;
    border-right: 1px solid #cbd5e1;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.02);
}

.schedule-table th:first-child {
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
}

.schedule-table tr:hover td {
    background-color: #f8fafc;
}

.schedule-table tr:hover td:first-child {
    background-color: #f8fafc;
}

/* 상태 배지 (Refined) */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.6rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.025em;
}

.badge-blue {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.badge-red {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.badge-green {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.badge-gray {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* 퀵 링크 카드 Interactive (Brushed Metal) */
.quick-link-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.quick-link-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border-color: #94a3b8;
}

.quick-link-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #64748b;
    /* Slate-500 */
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.quick-link-card:hover::after {
    transform: scaleX(1);
}

/* 스케줄 이벤트 스타일 (Sleek) */
.schedule-event-cell {
    padding: 0 !important;
    vertical-align: middle !important;
    height: 100%;
}

.schedule-block {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 36px;
    width: 100%;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
    /* Highlighting */
}

/* 렌트 (Darker Purple/Blue, Solid look) */
.schedule-rent-start {
    background: linear-gradient(to bottom, #eff6ff, #dbeafe);
    border: 1px solid #7c3aed;
    border-right: none;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    color: #5b21b6;
    margin-right: -1px;
}

.schedule-rent-middle {
    background: linear-gradient(to bottom, #eff6ff, #dbeafe);
    border-top: 1px solid #7c3aed;
    border-bottom: 1px solid #7c3aed;
    color: #5b21b6;
}

.schedule-rent-end {
    background: linear-gradient(to bottom, #eff6ff, #dbeafe);
    border: 1px solid #7c3aed;
    border-left: none;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    color: #5b21b6;
    margin-left: -1px;
}

.schedule-rent-same {
    background: linear-gradient(to bottom, #eff6ff, #dbeafe);
    border: 1px solid #7c3aed;
    border-radius: 8px;
    color: #5b21b6;
    width: calc(100% - 4px);
    margin: 0 2px;
}

/* 예약 (Refined Red) */
.schedule-reserve-start {
    background: linear-gradient(to bottom, #fff, #fff1f2);
    border: 1px solid #dc2626;
    border-right: none;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    color: #991b1b;
    margin-right: -1px;
}

.schedule-reserve-middle {
    background: linear-gradient(to bottom, #fff, #fff1f2);
    border-top: 1px solid #dc2626;
    border-bottom: 1px solid #dc2626;
    color: #991b1b;
}

.schedule-reserve-end {
    background: linear-gradient(to bottom, #fff, #fff1f2);
    border: 1px solid #dc2626;
    border-left: none;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    color: #991b1b;
    margin-left: -1px;
}

.schedule-reserve-same {
    background: linear-gradient(to bottom, #fff, #fff1f2);
    border: 1px solid #dc2626;
    border-radius: 8px;
    color: #991b1b;
    width: calc(100% - 4px);
    margin: 0 2px;
}

/* 이벤트 상세 툴팁 (Previously updated to Metallic Premium, keeping same class structure but ensuring content matches) */
.event-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    min-width: 280px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow:
        0 10px 30px -10px rgba(0, 0, 0, 0.2),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 16px 20px;
    z-index: 100;
    text-align: left;
    font-size: 12px;
    line-height: 1.6;
    pointer-events: none;
    animation: tooltipSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.event-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #fff;
    border-left: 1px solid #cbd5e1;
    border-top: 1px solid #cbd5e1;
    box-shadow: -1px -1px 1px rgba(0, 0, 0, 0.02);
}

.schedule-block.relative:hover .event-tooltip {
    display: block;
}

.et-title {
    color: #1e293b !important;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 10px;
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 8px;
}

.et-usage {
    color: #6366f1;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.et-price-value {
    color: #be123c;
    /* Rose-700 */
    font-weight: 800;
    font-size: 14px;
}

/* Animations (Same) */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.animate-slide-in {
    animation: slideInRight 0.3s ease-out forwards;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

.animate-slide-in-left {
    animation: slideInLeft 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.2s ease-out forwards;
}

/* --- Dark Mode Styles (Titanium/Gunmetal) --- */
body.dark-mode {
    background-color: #111827 !important;
    /* Gray-900 */
    color: #f3f4f6;
    background-image: none !important;
}

body.dark-mode .glass-panel {
    background: linear-gradient(145deg, rgba(31, 41, 55, 0.9), rgba(17, 24, 39, 0.8));
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(0, 0, 0, 0.5);
    border-right: 1px solid rgba(0, 0, 0, 0.5);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

body.dark-mode .glass-panel:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    border-top-color: rgba(255, 255, 255, 0.25);
}

body.dark-mode .tooltip-panel {
    background: linear-gradient(145deg, #1f2937, #111827);
    border-color: #4b5563;
    color: #e5e7eb;
}

body.dark-mode .tooltip-arrow {
    background: #1f2937;
    border-left-color: #4b5563;
    border-top-color: #4b5563;
}

body.dark-mode .dashboard-header {
    background: rgba(17, 24, 39, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dark Mode Text Colors */
body.dark-mode .text-gray-800,
body.dark-mode .text-gray-700 {
    color: #f9fafb !important;
}

body.dark-mode .text-gray-600 {
    color: #9CA3AF !important;
}

body.dark-mode .text-gray-500 {
    color: #6B7280 !important;
}

body.dark-mode .bg-gray-50 {
    background-color: #1f2937 !important;
}

body.dark-mode .bg-white {
    background-color: #1f2937 !important;
    color: #f3f4f6;
}

body.dark-mode .border-gray-200 {
    border-color: #374151 !important;
}

body.dark-mode .schedule-table {
    background: #111827;
    color: #f3f4f6;
}

body.dark-mode .schedule-table th {
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
    color: #9ca3af;
    border-bottom-color: #374151;
    border-right-color: #374151;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

body.dark-mode .schedule-table td {
    border-bottom-color: #374151;
    border-right-color: #374151;
    color: #d1d5db;
}

body.dark-mode .schedule-table th:first-child,
body.dark-mode .schedule-table td:first-child {
    background: #1f2937;
    border-right-color: #374151;
}

body.dark-mode .schedule-table tr:hover td {
    background-color: #374151;
}

body.dark-mode .schedule-table-container {
    background: #1f2937;
    border-color: #374151;
}

body.dark-mode .input-base {
    background: #1f2937;
    border-color: #4b5563;
    color: #f9fafb;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

body.dark-mode .input-base:focus {
    background: #111827;
    border-color: #60a5fa;
}

body.dark-mode .quick-link-card {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-color: #374151;
}

body.dark-mode .quick-link-card:hover {
    background: #374151;
    border-color: #94a3b8;
}

body.dark-mode .submenu-dropdown {
    background: #1f2937;
    border-color: #374151;
}

body.dark-mode .submenu-item {
    color: #d1d5db;
}

body.dark-mode .submenu-item:hover {
    background: #374151;
    color: #f9fafb;
}

body.dark-mode .submenu-item:hover {
    background: #374151;
    color: #f9fafb;
}

/* Custom Nav Menu Colors */
.nav-menu-item {
    color: #151515 !important;
    transition: all 0.2s ease;
}

.nav-menu-item:hover {
    color: #4F46E5 !important; /* Indigo 600 */
    background-color: #F1F5F9; /* Slate 100 */
    font-weight: 700;
}

body.dark-mode .nav-menu-item {
    color: #FDFCFC !important;
}

body.dark-mode .nav-menu-item:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* --- Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: white;
    width: 600px;
    max-width: 90%;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
}

.modal-close {
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.2s;
    font-size: 1.5rem;
}

.modal-close:hover {
    color: #4b5563;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    display: flex;
    gap: 1rem;
    background-color: #ffffff;
}

.form-grid-box {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 1rem;
    align-items: center;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4b5563;
}

/* Dark Mode Modal */
body.dark-mode .modal-content,
body.dark-mode .modal-footer {
    background: #1f2937;
    color: #f3f4f6;
}

body.dark-mode .modal-header {
    border-bottom-color: #374151;
}

body.dark-mode .modal-title {
    color: #f3f4f6;
}

body.dark-mode .form-grid-box {
    border-color: #374151;
}

body.dark-mode .form-label {
    color: #9ca3af;
}

body.dark-mode .modal-close {
    color: #6b7280;
}

body.dark-mode .modal-close:hover {
    color: #d1d5db;
}

/* Dark Mode - Modal Container Backgrounds */
body.dark-mode [id$="Modal"] > div,
body.dark-mode [id*="modal"] > div {
    background: #1f2937 !important;
    color: #f3f4f6;
}

/* Dark Mode - Form Elements in Modals */
body.dark-mode input[type="text"],
body.dark-mode input[type="number"],
body.dark-mode input[type="date"],
body.dark-mode input[type="email"],
body.dark-mode input[type="password"],
body.dark-mode input[type="tel"],
body.dark-mode select,
body.dark-mode textarea {
    background: #374151 !important;
    border-color: #4b5563 !important;
    color: #f9fafb !important;
}

body.dark-mode input[type="text"]:focus,
body.dark-mode input[type="number"]:focus,
body.dark-mode input[type="date"]:focus,
body.dark-mode input[type="email"]:focus,
body.dark-mode input[type="password"]:focus,
body.dark-mode input[type="tel"]:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus {
    background: #1f2937 !important;
    border-color: #60a5fa !important;
}

/* Dark Mode - Labels */
body.dark-mode label {
    color: #d1d5db !important;
}

/* Dark Mode - Form Wrapper */
body.dark-mode form {
    background: #1f2937;
}

/* Dark Mode - Placeholder Text */
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #6b7280 !important;
}

/* Dark Mode - Modal Action Buttons Container */
body.dark-mode .sticky.bottom-0 {
    background: rgba(30, 41, 59, 0.95) !important;
    border-color: #475569 !important;
}

/* Dark Mode - Form backgrounds */
body.dark-mode .bg-white,
body.dark-mode .bg-gray-50 {
    background-color: #1f2937 !important;
}