:root {
    --bg-main: #f4f7fb;
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --text-dark: #1e293b;
    --text-light: #94a3b8;
    --white: #ffffff;
    --border: #e2e8f0;
    
    --status-pending: #f59e0b;
    --status-confirmed: #3b82f6;
    --status-completed: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', sans-serif;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden !important;
    background-color: var(--bg-main);
    color: var(--text-dark);
}

.admin-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden !important;
}

/* Horizontal Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0 2rem;
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.navbar .logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.navbar .logo span {
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-left: 5px;
}

.nav-menu {
    display: flex;
    flex-direction: row;
    height: 100%;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    height: 100%;
    border-bottom: 3px solid transparent;
}

.nav-item:hover, .nav-item.active {
    color: var(--primary);
    background-color: rgba(59, 130, 246, 0.05);
    border-bottom: 3px solid var(--primary);
}

.nav-item-special {
    display: flex;
    align-items: center;
    padding: 0.6rem 1.2rem;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.85rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    gap: 8px;
}

.nav-item-special:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
}

.nav-item-special.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.user-info {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
    background: #f8fafc;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

/* Main Content */
.main-content {
    flex: 1;
    padding-top: 1rem;
    max-width: 100vw;
    overflow-x: hidden !important;
}

.top-header {
    padding: 1.5rem 2rem 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-stats {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
}

.stat-card {
    background-color: var(--white);
    flex: 1;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
}

.stat-card h3 {
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* Table Section */
.table-container {
    background-color: var(--white);
    margin: 1.5rem 2rem 2.5rem 2rem !important;
    border-radius: 24px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.8);
    padding: 2.5rem !important;
    position: relative;
    overflow: hidden;
}

.table-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa, #93c5fd);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.refresh-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

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

.booking-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto; /* Changed back to auto for better content-based flow */
}

/* Crew Table Specific Styles (v215) */
.crew-table-wrapper {
    margin: 0 !important; /* Reset nested margin to fix centering shift */
    box-shadow: none !important;
}

.crew-table th, .crew-table td {
    padding: 15px 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

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

/* Column Width Golden Ratio (v211) */
/* Main Booking Table specific logic */
#sectionBookings .booking-table { table-layout: fixed !important; width: 100%; min-width: 1350px; } /* Increased min-width for 12 columns (v27.6) */

.booking-table th:nth-child(1), .booking-table td:nth-child(1) { width: 40px; text-align: center; } /* Checkbox */
.booking-table th:nth-child(2), .booking-table td:nth-child(2) { width: 7%; } /* Booking ID */
.booking-table th:nth-child(3), .booking-table td:nth-child(3) { width: 7%; text-align: center; } /* Status */
.booking-table th:nth-child(4), .booking-table td:nth-child(4) { width: 9%; } /* Phone */
.booking-table th:nth-child(5), .booking-table td:nth-child(5) { width: 13%; } /* Service Items */
.booking-table th:nth-child(6), .booking-table td:nth-child(6) { width: 4%; text-align: center; } /* Qty */
.booking-table th:nth-child(7), .booking-table td:nth-child(7) { width: 18%; } /* Address - Weight Adjusted */
.booking-table th:nth-child(8), .booking-table td:nth-child(8) { width: 10%; } /* Absent Req */
.booking-table th:nth-child(9), .booking-table td:nth-child(9) { width: 7%; } /* Date */
.booking-table th:nth-child(10), .booking-table td:nth-child(10) { width: 8%; } /* Time */
.booking-table th:nth-child(11), .booking-table td:nth-child(11) { width: 8%; text-align: center; } /* Discount/Coupon (NEW) */
.booking-table th:nth-child(12), .booking-table td:nth-child(12) { width: 135px; text-align: center; } /* Service Management */

.booking-table th, .booking-table td {
    padding: 0.85rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    word-break: break-word; /* Allow text wrapping if needed */
}

.booking-table th {
    background-color: #f8fafc;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: middle;
}

.booking-table td {
    font-size: 0.9rem;
    vertical-align: middle;
}

.text-center {
    text-align: center !important;
}

/* Badges / Selects */
.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.status-pending { 
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af; 
    border: 1px solid #93c5fd;
    position: relative;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
    animation: status-glow 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

.status-pending::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #3b82f6;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

@keyframes status-glow {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 12px rgba(59, 130, 246, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.status-confirmed { 
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%); 
    color: #9a3412; 
    border: 1px solid #fdba74; 
}

.status-completed { 
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%); 
    color: #14532d; 
    border: 1px solid #86efac; 
}

.status-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    color: #fff;
    transition: all 0.3s ease;
}

.confirm-btn {
    background: #2563eb;
    position: relative;
    overflow: hidden;
}

.confirm-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 40%;
    height: 200%;
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(25deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 150%; }
}

.confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    background: #1d4ed8 !important;
}

.complete-btn {
    background: #059669;
}

.complete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
    background: #047857 !important;
}

/* Settings Section Styles */
.settings-container {
    padding: 1rem 2rem 2rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.settings-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.card-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.card-header h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
}

.helper-text {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 5px;
}

.form-group-item {
    margin-bottom: 1.2rem;
}

.form-group-item label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.form-group-item input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
}

.service-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    border: 1px solid var(--border);
}

.service-name-text {
    font-weight: 600;
    color: var(--text-dark);
}

.settings-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 2rem;
}

.save-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.save-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.status-select {
    padding: 0.4rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
}

/* Animation */
.fade-in {
    animation: fadeIn 0.5s ease;
}

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

/* Responsive adjustments for horizontal layout */
@media screen and (max-width: 768px) {
    .navbar {
        height: auto;
        flex-direction: column;
        padding: 1rem;
        gap: 10px;
    }
    
    .navbar .logo {
        margin-bottom: 5px;
    }

    .nav-menu {
        width: 100%;
        justify-content: space-between;
        border-top: 1px solid var(--border);
        padding-top: 5px;
    }

    .nav-item {
        padding: 0.8rem 0.5rem;
        font-size: 0.8rem;
        border-bottom: none;
        border-top: 3px solid transparent;
    }

    .nav-item:hover, .nav-item.active {
        border-bottom: none;
        border-top: 3px solid var(--primary);
    }

    .user-info {
        display: none;
    }

    .dashboard-stats {
        flex-direction: column;
        padding: 1rem 2rem;
        gap: 1rem;
    }

    .table-container {
        margin: 0 1rem 1rem 1rem;
        overflow-x: auto;
        padding: 1rem;
    }

    .booking-table {
        min-width: 600px;
    }
}
/* Banner Management Responsive Layout */
.banner-item-container {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

.banner-preview-container {
    flex-shrink: 0;
    width: 180px;
    height: 110px;
    background: #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.banner-inputs-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.banner-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.banner-row-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

@media screen and (max-width: 768px) {
    .banner-item-container {
        flex-direction: column;
    }

    .banner-preview-container {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .banner-grid {
        grid-template-columns: 1fr;
    }

    .banner-row-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .banner-row-actions > div {
        width: 100%;
    }

    .delete-banner-btn {
        width: 100%;
        margin-top: 5px;
    }
}

/* 서비스 분야(카테고리) 설정 스타일 */
.category-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.category-item-row:hover {
    border-color: #2ecc71;
    background: #f0fff4;
}

.category-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.category-name-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.category-active-label {
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    cursor: pointer;
}

.service-category-select {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-size: 0.85rem;
    background: white;
    margin-right: 10px;
    max-width: 150px;
}

.delete-category-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    transition: transform 0.2s;
}

.delete-category-btn:hover {
    transform: scale(1.2);
}

/* --- Dashboard Sortable Container (v216) --- */
#dashboardSortableContainer {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* --- Drag and Drop Reordering Styles --- */
.drag-handle {
    cursor: grab;
    padding-right: 12px;
    color: #cbd5e1;
    font-size: 1.2rem;
    user-select: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.drag-handle:hover {
    color: var(--primary);
}

.drag-handle:active {
    cursor: grabbing;
}

/* SortableJS Classes */
.sortable-ghost {
    opacity: 0.4;
    background: #e2e8f0 !important;
    border: 2px dashed var(--primary) !important;
}

.sortable-chosen {
    background: #fff !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

.sortable-drag {
    cursor: grabbing;
}

/* --- Mobile Table to Card Transformation (v35) --- */
@media (max-width: 768px) {
    /* GLOBAL LOCKDOWN FOR MOBILE (v101) */
    * {
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }

    html, body {
        width: 100% !important;
        overflow-x: hidden !important;
        position: relative !important;
    }

    .admin-container {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .booking-table {
        display: block;
        width: 100% !important;
        border-bottom: 0;
        table-layout: fixed !important; /* STRICT OVERFLOW CONTROL */
        margin: 0 !important;
    }

    .booking-table thead {
        display: none; /* Hide table headers on mobile */
    }

    .booking-table tbody, .booking-table tr, .booking-table td {
        display: block;
        width: 100%;
    }

    .booking-table tr {
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 12px;
        margin-bottom: 1rem !important;
        padding: 0.15rem !important; /* ULTRA TIGHT */
        box-shadow: none !important;
        overflow: hidden;
        width: 96% !important; /* RETRACT FROM EDGES */
        margin-left: 2% !important;
        margin-right: 2% !important;
        box-sizing: border-box !important;
    }

    .booking-table td {
        display: flex;
        justify-content: flex-start; /* Shift to left for more space */
        align-items: center;
        text-align: left;
        padding: 0.75rem 0.6rem;
        border-bottom: 1px solid #f1f5f9;
        width: 100% !important;
        box-sizing: border-box;
    }

    .booking-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #64748b;
        font-size: 0.75rem;
        width: 85px; /* Fixed small width to maximize content space */
        min-width: 85px;
        flex-shrink: 0;
        margin-right: 0.75rem;
    }

    .booking-table td[data-label="번호"] {
        background: #f8fafc;
        margin: 0;
        padding: 1rem 0.8rem;
        border-radius: 12px 12px 0 0;
        font-weight: 800;
        color: var(--primary);
        font-size: 1.05rem;
        justify-content: center;
        border-bottom: 1px solid var(--border);
    }
    .booking-table td[data-label="번호"]::before {
        display: none !important;
    }

    .booking-table td[data-label="관리"] {
        justify-content: center;
        background: #fafafa;
        padding: 1.25rem 0.5rem;
    }
    .booking-table td[data-label="관리"]::before {
        display: none !important;
    }

    .action-buttons {
        width: 100%;
        display: flex;
        flex-wrap: wrap !important;
        justify-content: center;
        gap: 4px;
    }
    .status-btn {
        flex: 1;
        min-width: 70px; /* SLIMMER MIN WIDTH */
        padding: 8px 4px !important; /* REDUCED PADDING */
        font-size: 0.75rem !important; /* COMPACT FONT */
        white-space: normal !important; /* ALLOW WRAP IF NEEDED */
        text-align: center;
    }

    /* Additional v39 Ultra-Strict Fixes */
    .navbar {
        padding: 0.5rem !important;
        height: auto !important;
        flex-direction: column !important;
        width: 100% !important;
    }

    .nav-menu {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important; /* STACK IN MOBILE */
        align-items: center !important;
        gap: 0.25rem !important;
        padding: 0.5rem 0 !important;
    }
    
    .nav-item {
        width: 100% !important;
        text-align: center !important;
        padding: 0.6rem !important;
        font-size: 0.85rem !important;
        white-space: normal !important; /* ALLOW TEXT WRAPPING */
        background: rgba(0,0,0,0.03);
        border: none !important;
        border-radius: 8px !important;
    }

    .main-content {
        padding: 0.25rem !important; /* ULTRA TIGHT */
        width: 100%;
        max-width: 100vw;
    }

    .table-container {
        margin: 0 !important; /* ABSOLUTE ZERO MARGINS FOR MOBILE */
        padding: 0.5rem !important;
        border-radius: 0;
        border: none;
        box-shadow: none !important;
        width: 100% !important;
    }

    .table-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
        padding: 0.75rem !important;
    }

    .table-actions {
        width: 100% !important;
        justify-content: flex-end !important;
        display: flex !important;
        flex-direction: row !important;
        gap: 6px !important;
    }

    .dashboard-stats {
        flex-direction: column !important;
        padding: 0.5rem !important;
        gap: 0.5rem !important;
        width: 100% !important;
        margin: 0 !important;
    }

    .stat-card {
        margin: 0 !important;
        width: 100% !important;
        box-shadow: none !important;
        padding: 1rem !important;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: #fff;
    }

    .booking-table td {
        display: flex;
        justify-content: flex-start;
        align-items: flex-start;
        text-align: left;
        padding: 0.6rem 0.5rem;
        border-bottom: 1px solid #f1f5f9;
        width: 100% !important;
        box-sizing: border-box;
        word-break: keep-all !important; /* BREAK AT SPACES */
        overflow-wrap: break-word !important; /* FALLBACK FOR LONG WORDS */
        white-space: normal !important;
    }

    .booking-table td::before {
        min-width: 68px !important;
        width: 68px;
        flex-shrink: 0;
        margin-right: 0.4rem;
        padding-top: 2px;
    }

    /* SPECIFIC FIX FOR WRAPPABLE CONTENT */
    .booking-table td > small,
    .booking-table td > span:not(.status-badge) {
        flex: 1; /* ALLOW TO TAKE ALL REMAINING SPACE AND WRAP */
        line-height: 1.4;
    }

    .booking-table td[data-label="번호"] {
        padding: 0.8rem 0.5rem;
        font-size: 0.95rem;
        align-items: center; /* KEEP CENTERED */
    }
}

/* Hide native number spinners */
input[type=number].no-spinners::-webkit-inner-spin-button, 
input[type=number].no-spinners::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}
input[type=number].no-spinners { 
  -moz-appearance: textfield; 
  appearance: none;
}
/* Sophisticated Timeline Styles (v6.0) */
.timeline-container {
    margin: 1.5rem 2rem 2.5rem 2rem !important;
    background: #ffffff !important;
    padding: 2.5rem !important;
    border-radius: 24px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    position: relative !important;
    overflow: hidden !important;
}

.timeline-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa, #93c5fd);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 12px;
}

.timeline-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.timeline-nav button {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    width: 36px !important;
    height: 36px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    color: #64748b !important;
    font-size: 0.8rem !important;
}

.timeline-nav button:hover {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

#timelineCurrentDate {
    font-weight: 800 !important;
    color: #1e293b !important;
    padding: 0 20px !important;
    font-size: 1rem !important;
    background: transparent !important;
    min-width: 180px;
    text-align: center;
}

.timeline-wrapper {
    position: relative !important;
    padding: 10px 0 50px 0 !important;
    overflow-x: auto !important;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    -webkit-overflow-scrolling: touch;
}

.timeline-wrapper::-webkit-scrollbar {
    height: 6px;
}

.timeline-wrapper::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}

#timelineContent {
    position: relative !important;
    min-width: 1000px !important;
    height: 150px !important;
    background: #ffffff !important;
}

.timeline-grid-line {
    position: absolute;
    top: 35px;
    bottom: 0;
    border-left: 1px dashed #f1f5f9;
    z-index: 1;
}

.timeline-grid-line.hour {
    border-left: 1px solid #e2e8f0;
}

.timeline-marker-label {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    background: #fff;
    padding: 0 4px;
    z-index: 2;
}

#timelineTracks {
    position: absolute !important;
    top: 50px !important;
    left: 0 !important;
    width: 100% !important;
    height: 80px !important;
    background: rgba(241, 245, 249, 0.3) !important;
    border-radius: 20px !important;
    border: 1px solid #f1f5f9 !important;
    z-index: 2 !important;
}

.timeline-block {
    position: absolute !important;
    height: 60px !important;
    top: 10px !important;
    border-radius: 16px !important;
    padding: 10px 16px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    color: #ffffff !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    cursor: pointer !important;
    z-index: 10 !important;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(4px);
}

.timeline-block:hover {
    transform: translateY(-6px) scale(1.03) !important;
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.2) !important;
    z-index: 20 !important;
}

.timeline-block-pending {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
}

.timeline-block-confirmed {
    background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%) !important;
}

.timeline-block-completed {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%) !important;
}

.timeline-block-title {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.timeline-block-time {
    font-size: 0.7rem;
    opacity: 0.85;
    font-weight: 500;
}

.timeline-block-pending::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: block-shimmer 3s infinite linear;
}

@keyframes block-shimmer {
    0% { transform: translateX(-150%); }
    100% { transform: translateX(150%); }
}

.timeline-travel {
    position: absolute !important;
    height: 100% !important;
    background: repeating-linear-gradient(
        45deg,
        rgba(226, 232, 240, 0.2),
        rgba(226, 232, 240, 0.2) 8px,
        rgba(203, 213, 225, 0.2) 8px,
        rgba(203, 213, 225, 0.2) 16px
    ) !important;
}

.timeline-lunch {
    position: absolute !important;
    height: 100% !important;
    background: rgba(241, 245, 249, 0.6) !important;
    backdrop-filter: blur(4px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.75rem !important;
    color: #94a3b8 !important;
    font-weight: 900 !important;
    letter-spacing: 0.2em !important;
}

.timeline-now-line {
    position: absolute !important;
    top: 35px !important;
    bottom: 0 !important;
    width: 2px !important;
    background: #ef4444 !important;
    z-index: 30 !important;
}

.timeline-now-line::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
}

.timeline-now-line::before {
    content: "LIVE";
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.timeline-legend {
    display: flex !important;
    gap: 24px !important;
    margin-top: 2.5rem !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: #475569 !important;
    flex-wrap: wrap !important;
    background: #f8fafc !important;
    padding: 1.5rem 2rem !important;
    border-radius: 20px !important;
    border: 1px solid rgba(226, 232, 240, 0.5) !important;
}

.legend-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.legend-color {
    width: 14px !important;
    height: 14px !important;
    border-radius: 5px !important;
}

/* --- Monthly Calendar Premium Styles (v2.0) --- */
.monthly-calendar-container {
    margin: 1.5rem 2rem 2.5rem 2rem !important;
    background: #ffffff !important;
    padding: 2.5rem !important;
    border-radius: 24px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    position: relative !important;
    overflow: hidden !important;
}

.monthly-calendar-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa, #93c5fd);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dash-label {
    font-size: 1.3rem !important;
    font-weight: 900 !important;
    color: #0f172a !important;
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-label::before {
    content: "\f142"; /* fa-grip-vertical */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 12px;
    color: #cbd5e1;
    cursor: grab;
    font-size: 1.1rem;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 10px 5px; /* Increase click area */
    margin-left: -5px;
}

.dash-label:hover::before {
    color: var(--primary);
    transform: scale(1.1);
}

/* --- SortableJS Premium Enhancements (v7.2) --- */
.sortable-ghost {
    opacity: 0.1 !important;
    background: #e2e8f0 !important;
    border: 3px dashed var(--primary) !important;
    border-radius: 24px !important;
    box-shadow: none !important;
    transform: scale(0.97);
    margin: 10px 0 !important;
}

.sortable-chosen {
    background: #ffffff !important;
    box-shadow: 0 30px 60px -12px rgba(50, 50, 93, 0.25), 0 18px 36px -18px rgba(0, 0, 0, 0.3) !important;
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1) !important;
    z-index: 1000 !important;
}

.sortable-drag {
    opacity: 0.95 !important;
    transform: rotate(0.5deg) scale(1.01) !important;
    cursor: grabbing !important;
    box-shadow: 0 30px 60px -12px rgba(50, 50, 93, 0.35) !important;
}

/* Add a transition to all sections when something is being dragged */
.is-dragging section:not(.sortable-chosen) {
    transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}

.dash-label i {
    color: var(--primary);
    font-size: 1.1rem;
}

#monthlyCalendar {
    background: transparent;
    border: none !important;
}

/* FullCalendar Customization v2.0 */
.fc .fc-toolbar {
    margin-bottom: 2rem !important;
}

.fc .fc-toolbar-title {
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    color: #1e293b;
    font-family: 'Pretendard', sans-serif;
}

.fc .fc-button {
    border-radius: 12px !important;
    font-weight: 700 !important;
    padding: 8px 16px !important;
    font-size: 0.85rem !important;
    transition: all 0.2s ease !important;
}

.fc .fc-button-primary {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
}

.fc .fc-button-primary:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    background: #1e293b !important;
    border-color: #1e293b !important;
    color: #fff !important;
}

.fc .fc-today-button {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
    opacity: 1 !important;
}

.fc th {
    border: none !important;
}

.fc-theme-standard td, .fc-theme-standard th {
    border: 1px solid #f1f5f9 !important;
}

.fc .fc-col-header-cell-cushion {
    font-size: 0.8rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 15px 0 !important;
}

.fc .fc-daygrid-day-number {
    font-size: 0.95rem;
    font-weight: 700;
    color: #475569;
    padding: 12px !important;
    text-decoration: none !important;
}

.fc .fc-daygrid-day {
    cursor: pointer !important;
    transition: background-color 0.15s ease !important;
}

.fc .fc-daygrid-day:hover {
    background-color: rgba(0, 0, 0, 0.04) !important;
}

/* 내부 요소들이 클릭을 방해하지 않도록 처리 (v12.5.2) */
.fc .fc-daygrid-day-number,
.fc .fc-daygrid-day-top,
.fc .fc-daygrid-day-frame {
    pointer-events: none !important;
}

.fc .fc-daygrid-day.fc-day-today {
    background-color: rgba(37, 99, 235, 0.04) !important;
}

.fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
    background: var(--primary);
    color: #fff !important;
    border-radius: 8px;
    min-width: 38px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 6px;
    padding: 0 8px !important;
}

/* Day Overlays/Busy States */
.fc-day-busy {
    background: repeating-linear-gradient(
        -45deg,
        rgba(239, 68, 68, 0.02),
        rgba(239, 68, 68, 0.02) 10px,
        rgba(239, 68, 68, 0.04) 10px,
        rgba(239, 68, 68, 0.04) 20px
    ) !important;
}

.fc-day-holiday {
    background-color: rgba(239, 68, 68, 0.02) !important;
}

.fc-day-sun .fc-daygrid-day-number,
.fc-day-holiday .fc-daygrid-day-number,
.fc .fc-col-header-cell.fc-day-sun .fc-col-header-cell-cushion {
    color: #ef4444 !important;
}

.fc-day-sat .fc-daygrid-day-number,
.fc .fc-col-header-cell.fc-day-sat .fc-col-header-cell-cushion {
    color: #3b82f6 !important;
}

/* Event Styling v2.0 */
.fc-v-event, .fc-daygrid-event {
    border-radius: 6px !important;
    padding: 2px 6px !important;
    border: none !important;
    margin-top: 2px !important;
    font-family: 'Pretendard', sans-serif !important;
}

.custom-event-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 1px 0;
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
}

.evt-t {
    font-size: 0.68rem;
    font-weight: 800;
    color: #fff;
    background: rgba(15, 23, 42, 0.4);
    padding: 1px 6px;
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.evt-m {
    font-size: 0.72rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

.evt-p {
    font-size: 0.65rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.15);
    padding: 0 5px;
    border-radius: 4px;
    flex-shrink: 0;
}
.fc-daygrid-event-dot {
    display: none !important; /* Hide standard dots */
}

/* Legend and Legend Animation */
.calendar-legend-premium {
    display: flex;
    gap: 20px;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.legend-premium-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
}

.legend-premium-box {
    width: 12px;
    height: 12px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .monthly-calendar-container, #monthlyCalendarSection, #dailyStatusSection {
        margin: 2px !important;
        padding: 10px 4px !important;
        border-radius: 20px !important;
        box-shadow: 0 8px 25px rgba(0,0,0,0.06) !important;
    }
    
    .fc .fc-toolbar {
        flex-direction: column;
        gap: 8px;
    }

    .fc .fc-daygrid-day-number {
        font-size: 0.85rem !important;
        font-weight: 700 !important;
        padding: 4px 6px !important;
    }

    .custom-event-compact {
        padding: 2px 0 !important;
    }

    .evt-t {
        font-size: 0.6rem !important;
        padding: 1px 4px !important;
    }

    .evt-m {
        font-size: 0.65rem !important;
        letter-spacing: -0.3px !important;
    }
    
    .event-price-tag {
        display: none;
    }

    .toggle-section-btn, .drag-handle {
        display: none !important; /* [Update] 섹션 접기 및 드래그 핸들 숨김 (v27.4) */
    }
}

/* Unified Section Nav Styling */
.section-nav, .timeline-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

/* --- Section Toggle/Minimize Styles --- */
.toggle-section-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: 0.8rem !important;
}

.toggle-section-btn:hover {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

.toggle-section-btn.active {
    transform: rotate(180deg) !important;
}

.toggle-section-btn.active:hover {
    transform: rotate(180deg) translateY(2px) !important;
}

.section-content-wrapper {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 2500px;
    opacity: 1;
    overflow: hidden;
}

.section-collapsed .section-content-wrapper {
    max-height: 0;
    opacity: 0;
    margin: 0 !important;
    padding: 0 !important;
}

.section-collapsed {
    padding-bottom: 1.5rem !important;
}

.calendar-header, .timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Timeline LIVE indicator (v7.5) */
.timeline-now-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ef4444;
    z-index: 100;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    pointer-events: none;
}

.timeline-live-label {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    animation: live-blink 1s infinite;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.timeline-live-label::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #ef4444;
}

@keyframes live-blink {
    0% { opacity: 1; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.7; transform: translateX(-50%) scale(0.95); }
    100% { opacity: 1; transform: translateX(-50%) scale(1); }
}

