/**
 * Stylesheet cho Frontend Wedding Planner
 * Thiết kế theo phong cách Glassmorphism & Tone màu Wedding Pastel sang trọng
 */

:root {
    --wp-primary: #f26d85;
    --wp-primary-hover: #d9526a;
    --wp-secondary: #fcebeb;
    --wp-text-dark: #2d3748;
    --wp-text-muted: #718096;
    --wp-bg-glass: rgba(255, 255, 255, 0.75);
    --wp-border-glass: rgba(242, 109, 133, 0.15);
    --wp-shadow: 0 8px 32px 0 rgba(242, 109, 133, 0.08);
    --wp-radius: 16px;
    --wp-font: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Light Mode Elements */
    --wp-card-bg: rgba(255, 255, 255, 0.85);
    --wp-card-border: #edf2f7;
    --wp-btn-sec-bg: #f7fafc;
    --wp-btn-sec-border: #e2e8f0;
    --wp-btn-sec-hover-bg: #edf2f7;
    --wp-auth-bg: rgba(255, 255, 255, 0.6);
    --wp-auth-border: rgba(255, 255, 255, 0.5);
    --wp-auth-tab-inactive-bg: rgba(242, 109, 133, 0.05);
    --wp-auth-tab-active-bg: rgba(255, 255, 255, 0.9);
    --wp-input-bg: rgba(255, 255, 255, 0.8);
    --wp-input-border: #e2e8f0;
    --wp-progress-bg: rgba(255, 255, 255, 0.8);
    --wp-progress-border: #e2e8f0;
    --wp-progress-bar-track: #edf2f7;
    --wp-nav-border: #e2e8f0;
    --wp-nav-btn-bg: rgba(255, 255, 255, 0.8);
    --wp-nav-btn-border: #e2e8f0;
    --wp-stage-dashed-border: rgba(242, 109, 133, 0.15);
    --wp-cat-title-color: #2c5282;
    --wp-task-bg: rgba(255, 255, 255, 0.4);
    --wp-task-border: #edf2f7;
    --wp-task-hover-bg: rgba(255, 255, 255, 0.95);
    --wp-checkmark-bg: #fff;
    --wp-checkmark-border: #cbd5e0;
    --wp-textarea-border: #cbd5e0;
    --wp-textarea-bg: rgba(255, 255, 255, 0.7);
    --wp-textarea-focus-bg: #fff;
}

.wedding-planner-front-container.wedding-dark-mode {
    --wp-text-dark: #f7fafc;
    --wp-text-muted: #a0aec0;
    --wp-bg-glass: rgba(26, 32, 44, 0.85);
    --wp-border-glass: rgba(242, 109, 133, 0.3);
    --wp-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    /* Dark Mode Elements */
    --wp-card-bg: rgba(45, 55, 72, 0.85);
    --wp-card-border: rgba(255, 255, 255, 0.08);
    --wp-btn-sec-bg: #2d3748;
    --wp-btn-sec-border: #4a5568;
    --wp-btn-sec-hover-bg: #4a5568;
    --wp-auth-bg: rgba(45, 55, 72, 0.6);
    --wp-auth-border: rgba(255, 255, 255, 0.1);
    --wp-auth-tab-inactive-bg: rgba(242, 109, 133, 0.15);
    --wp-auth-tab-active-bg: rgba(45, 55, 72, 0.9);
    --wp-input-bg: rgba(26, 32, 44, 0.8);
    --wp-input-border: #4a5568;
    --wp-progress-bg: rgba(45, 55, 72, 0.8);
    --wp-progress-border: rgba(255, 255, 255, 0.08);
    --wp-progress-bar-track: #1a202c;
    --wp-nav-border: #4a5568;
    --wp-nav-btn-bg: rgba(45, 55, 72, 0.8);
    --wp-nav-btn-border: #4a5568;
    --wp-stage-dashed-border: rgba(242, 109, 133, 0.3);
    --wp-cat-title-color: #63b3ed;
    --wp-task-bg: rgba(45, 55, 72, 0.4);
    --wp-task-border: rgba(255, 255, 255, 0.05);
    --wp-task-hover-bg: rgba(45, 55, 72, 0.95);
    --wp-checkmark-bg: #2d3748;
    --wp-checkmark-border: #4a5568;
    --wp-textarea-border: #4a5568;
    --wp-textarea-bg: rgba(26, 32, 44, 0.7);
    --wp-textarea-focus-bg: #1a202c;
}

.wedding-planner-front-container {
    font-family: var(--wp-font);
    color: var(--wp-text-dark);
    max-width: 1400px;
    margin: 40px auto;
    padding: 30px;
    background: var(--wp-bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--wp-border-glass);
    border-radius: var(--wp-radius);
    box-shadow: var(--wp-shadow);
    position: relative; /* Cho phép định vị nút chuyển đổi theme */
}

/* Hiệu ứng chuyển tiếp màu mượt mà */
.wedding-planner-front-container,
.wedding-planner-front-container *,
.wedding-planner-front-container *::before,
.wedding-planner-front-container *::after {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

/* Nút Theme Switcher */
.wedding-theme-toggle-btn {
    position: absolute;
    top: 25px;
    right: 30px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--wp-card-bg);
    border: 1px solid var(--wp-card-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--wp-shadow);
    z-index: 99;
    padding: 0;
}

.wedding-theme-toggle-btn:hover {
    transform: scale(1.1) rotate(15deg);
    border-color: var(--wp-primary);
}

.wedding-theme-toggle-btn .theme-icon-sun {
    display: block;
    font-size: 16px;
}

.wedding-theme-toggle-btn .theme-icon-moon {
    display: none;
    font-size: 16px;
}

.wedding-dark-mode .wedding-theme-toggle-btn .theme-icon-sun {
    display: none;
}

.wedding-dark-mode .wedding-theme-toggle-btn .theme-icon-moon {
    display: block;
}

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

/* Nút bấm (Buttons) */
.wedding-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: var(--wp-font);
    text-decoration: none;
    line-height: 1.2;
}

.wedding-btn-primary {
    background: linear-gradient(135deg, #f26d85 0%, #ff8e97 100%);
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(242, 109, 133, 0.3);
}

.wedding-btn-primary:hover {
    background: linear-gradient(135deg, #d9526a 0%, #f26d85 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(242, 109, 133, 0.4);
}

.wedding-btn-secondary {
    background: var(--wp-btn-sec-bg);
    color: var(--wp-text-dark) !important;
    border: 1px solid var(--wp-btn-sec-border);
}

.wedding-btn-secondary:hover {
    background: var(--wp-btn-sec-hover-bg);
    transform: translateY(-2px);
}

.wedding-btn-outline {
    background: transparent;
    color: var(--wp-primary) !important;
    border: 2px solid var(--wp-primary);
}

.wedding-btn-outline:hover {
    background: var(--wp-secondary);
    transform: translateY(-2px);
}

/* --- FORM ĐĂNG NHẬP / ĐĂNG KÝ (AUTH) --- */
.wedding-auth-wrapper {
    max-width: 500px;
    margin: 30px auto 0;
    background: var(--wp-auth-bg);
    border-radius: var(--wp-radius);
    border: 1px solid var(--wp-auth-border);
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.03);
}

.wedding-auth-tabs {
    display: flex;
    background: var(--wp-auth-tab-inactive-bg);
    border-bottom: 1px solid var(--wp-border-glass);
}

.auth-tab-btn {
    flex: 1;
    padding: 16px;
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    color: var(--wp-text-muted);
    transition: all 0.3s ease;
    font-family: var(--wp-font);
}

.auth-tab-btn.active {
    color: var(--wp-primary);
    background: var(--wp-auth-tab-active-bg);
    position: relative;
}

.auth-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--wp-primary);
}

.auth-tab-content {
    display: none;
    padding: 30px;
}

.auth-tab-content.active {
    display: block;
}

.wedding-auth-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.wedding-auth-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--wp-text-dark);
}

.wedding-auth-form input[type="text"],
.wedding-auth-form input[type="email"],
.wedding-auth-form input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--wp-input-border);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: var(--wp-input-bg);
    box-sizing: border-box;
}

.wedding-auth-form input:focus {
    border-color: var(--wp-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(242, 109, 133, 0.15);
}

.form-group-checkbox {
    margin-bottom: 20px;
    text-align: left;
    font-size: 14px;
}

.wedding-auth-form .wedding-btn {
    width: 100%;
}

.auth-message {
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.auth-message.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.auth-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* --- MÀN HÌNH CHỌN LỘ TRÌNH (TIMELINE SELECTION) --- */
.selection-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--wp-text-dark);
}

.selection-header p {
    color: var(--wp-text-muted);
    font-size: 16px;
    margin-bottom: 40px;
}

.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.selection-card {
    background: var(--wp-card-bg);
    border: 1px solid var(--wp-card-border);
    border-radius: var(--wp-radius);
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.selection-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(242, 109, 133, 0.12);
    border-color: var(--wp-primary);
}

.card-icon {
    font-size: 44px;
    margin-bottom: 15px;
}

.selection-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 10px;
}

.card-meta {
    font-size: 13px;
    color: var(--wp-text-muted);
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.card-desc {
    font-size: 14px;
    color: var(--wp-text-muted);
    line-height: 1.5;
    margin-bottom: 25px;
    flex-grow: 1;
}

/* --- MÀN HÌNH DASHBOARD TIMELINE CÁ NHÂN --- */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding-right: 50px; /* Tránh đè lên nút Theme Switcher */
}

.dashboard-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 5px 0;
}

.dashboard-header p {
    margin: 0;
    color: var(--wp-text-muted);
}

/* Progress Bar */
.wedding-progress-container {
    background: var(--wp-progress-bg);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 35px;
    border: 1px solid var(--wp-progress-border);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 14px;
}

.progress-label {
    color: var(--wp-text-dark);
}

.progress-percent {
    color: var(--wp-primary);
}

.progress-bar-bg {
    background: var(--wp-progress-bar-track);
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f26d85 0%, #fca3b1 100%);
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

/* Stages Navigation (Tabs) */
.wedding-stages-navigation {
    position: sticky;
    top: 95px;
    z-index: 90;
    background: var(--wp-bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin-bottom: 30px;
    border-bottom: 1px solid var(--wp-nav-border);
    padding: 10px 15px;
    border-radius: 12px;
}

.stage-nav-scroll {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(242, 109, 133, 0.3) transparent;
}

.stage-nav-scroll::-webkit-scrollbar {
    height: 6px;
}

.stage-nav-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.stage-nav-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(242, 109, 133, 0.3);
    border-radius: 3px;
}

.stage-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--wp-nav-btn-bg);
    border: 1px solid var(--wp-nav-btn-border);
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--wp-font);
    font-size: 14px;
    font-weight: 500;
    color: var(--wp-text-dark);
    white-space: nowrap;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.stage-nav-btn.active {
    background: var(--wp-primary);
    color: #fff;
    border-color: var(--wp-primary);
    box-shadow: 0 4px 12px rgba(242, 109, 133, 0.2);
}

.stage-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(242, 109, 133, 0.1);
    color: var(--wp-primary);
    font-size: 12px;
    font-weight: 700;
    transition: all 0.25s ease;
}

.stage-nav-btn.active .stage-num {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Panel content */
.stage-tab-panel {
    display: none;
}

.stage-tab-panel.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

.stage-panel-title {
    font-size: 20px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px dashed var(--wp-stage-dashed-border);
}

/* Category group card */
.cat-group-card {
    background: var(--wp-card-bg);
    border: 1px solid var(--wp-card-border);
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.01);
}

.cat-group-title {
    font-size: 16px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--wp-cat-title-color);
}

.cat-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Task row */
.task-row {
    display: flex;
    align-items: flex-start;
    padding: 12px 15px;
    border-radius: 8px;
    background: var(--wp-task-bg);
    border: 1px solid var(--wp-task-border);
    transition: all 0.25s ease;
}

.task-row:hover {
    background: var(--wp-task-hover-bg);
    border-color: rgba(242, 109, 133, 0.2);
    box-shadow: 0 4px 10px rgba(242,109,133,0.04);
}

.task-row.completed {
    background: rgba(242, 109, 133, 0.02);
    border-color: rgba(242, 109, 133, 0.1);
}

.task-checkbox-col {
    margin-right: 15px;
    margin-top: 2px;
}

.task-main-col {
    flex-grow: 1;
}

.task-title {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    transition: all 0.25s ease;
}

.task-row.completed .task-title {
    text-decoration: line-through;
    color: var(--wp-text-muted);
}

.task-desc {
    font-size: 13px;
    color: var(--wp-text-muted);
    margin-top: 5px;
    line-height: 1.4;
}

.task-desc ul {
    margin: 5px 0 0 15px;
    padding: 0;
    list-style-type: circle;
}

.task-desc li {
    margin-bottom: 2px;
}

/* Custom Checkbox */
.checkbox-container {
    display: block;
    position: relative;
    width: 20px;
    height: 20px;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: var(--wp-checkmark-bg);
    border: 2px solid var(--wp-checkmark-border);
    border-radius: 50%;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--wp-primary);
    background-color: var(--wp-secondary);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--wp-primary);
    border-color: var(--wp-primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Notes Section */
.task-notes-panel {
    margin-top: 8px;
}

.notes-toggle-btn {
    background: transparent;
    border: none;
    font-size: 12px;
    font-weight: 500;
    color: var(--wp-text-muted);
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--wp-font);
    transition: color 0.2s ease;
}

.notes-toggle-btn:hover {
    color: var(--wp-primary);
}

.notes-editor-wrapper {
    margin-top: 8px;
    animation: fadeIn 0.25s ease;
}

.task-notes-textarea {
    width: 100%;
    min-height: 60px;
    padding: 10px;
    border: 1px dashed var(--wp-textarea-border);
    border-radius: 6px;
    font-size: 13px;
    font-family: var(--wp-font);
    resize: vertical;
    background: var(--wp-textarea-bg);
    color: var(--wp-text-dark);
    box-sizing: border-box;
    display: block;
}

.task-notes-textarea:focus {
    outline: none;
    border: 1px solid var(--wp-primary);
    background: var(--wp-textarea-focus-bg);
}

.notes-save-status {
    font-size: 11px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--wp-text-muted);
    height: 15px;
}

.notes-save-status.saving .save-icon {
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 2px solid rgba(242, 109, 133, 0.3);
    border-radius: 50%;
    border-top-color: var(--wp-primary);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Floating Save Button */
.wedding-floating-save {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wedding-floating-save.show {
    transform: translateY(0);
    opacity: 1;
}

.float-save-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--wp-text-dark);
    color: var(--wp-checkmark-bg);
    border: none;
    padding: 14px 24px;
    border-radius: 50px;
    font-family: var(--wp-font);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

.float-save-btn:hover {
    background: #1a202c;
    transform: scale(1.05);
}

.wedding-dark-mode .float-save-btn:hover {
    background: #fff;
    color: #1a202c;
}

/* Notification Toast */
.wedding-toast {
    position: fixed;
    bottom: 90px;
    right: 30px;
    background: #2f855a;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    z-index: 10000;
    animation: slideUp 0.3s ease;
    font-family: var(--wp-font);
}

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

/* Responsive */
@media (max-width: 768px) {
    .wedding-planner-front-container {
        padding: 15px;
        margin: 15px auto;
    }

    .wedding-theme-toggle-btn {
        top: 15px;
        right: 15px;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        padding-right: 0;
        margin-top: 35px; /* Để chừa chỗ cho Theme Switcher trên mobile */
    }
    
    .header-action .wedding-btn {
        width: 100%;
        margin-top: 10px;
    }
    
    .selection-grid {
        grid-template-columns: 1fr;
    }

    .cat-group-card {
        padding: 15px;
    }

    .task-row {
        padding: 10px;
    }
}

/* ==========================================================================
   Trường nhập liệu tuỳ chỉnh (Custom Fields) Styles
   ========================================================================== */
.task-custom-field-container {
    margin-top: 14px;
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
}

.task-custom-field-input,
.task-custom-field-select,
.task-custom-field-textarea {
    width: 100%;
    max-width: 500px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--wp-textarea-border);
    background: var(--wp-textarea-bg);
    color: var(--wp-text-dark);
    font-family: var(--wp-font);
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.task-custom-field-input:focus,
.task-custom-field-select:focus,
.task-custom-field-textarea:focus {
    outline: none;
    border-color: var(--wp-primary);
    background: var(--wp-textarea-focus-bg);
    box-shadow: 0 0 0 3px rgba(242, 109, 133, 0.15);
}

.task-custom-field-select {
    cursor: pointer;
    height: 40px;
}

.task-custom-field-textarea {
    resize: vertical;
    min-height: 70px;
}

.task-custom-field-radio-group,
.task-custom-field-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
}

.custom-radio-label,
.custom-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--wp-text-dark);
    user-select: none;
    background: var(--wp-task-bg);
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid var(--wp-task-border);
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-radio-label:hover,
.custom-checkbox-label:hover {
    border-color: var(--wp-primary);
    background: var(--wp-task-hover-bg);
    transform: translateY(-2px);
}

.task-custom-field-radio,
.task-custom-field-checkbox-single,
.task-custom-field-checkbox-multi {
    accent-color: var(--wp-primary);
    margin: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Highlight nhãn khi được checked */
.custom-radio-label:has(input:checked),
.custom-checkbox-label:has(input:checked) {
    background: var(--wp-secondary);
    border-color: var(--wp-primary);
    color: var(--wp-primary);
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(242, 109, 133, 0.15);
}

.wedding-dark-mode .custom-radio-label:has(input:checked),
.wedding-dark-mode .custom-checkbox-label:has(input:checked) {
    background: rgba(242, 109, 133, 0.15);
    border-color: var(--wp-primary);
    color: #fff;
}

/* ==========================================================================
   Thanh tìm kiếm công việc (Task Search Bar) Styles
   ========================================================================== */
.wedding-search-container {
    position: sticky;
    top: 15px;
    margin-bottom: 25px;
    z-index: 100;
    background: var(--wp-bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--wp-input-bg);
    border: 1px solid var(--wp-input-border);
    border-radius: 12px;
    padding: 0 16px;
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    border-color: var(--wp-primary);
    box-shadow: 0 0 0 3px rgba(242, 109, 133, 0.15);
}

.search-icon {
    font-size: 16px;
    margin-right: 12px;
    color: var(--wp-text-muted);
}

#wedding-task-search-input {
    flex-grow: 1;
    border: none;
    background: transparent;
    padding: 14px 0;
    font-size: 15px;
    font-family: var(--wp-font);
    color: var(--wp-text-dark);
    outline: none;
    width: 100%;
}

#wedding-search-clear-btn {
    background: transparent;
    border: none;
    color: var(--wp-text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    margin-left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

#wedding-search-clear-btn:hover {
    color: var(--wp-primary);
}

/* Dropdown kết quả tìm kiếm */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--wp-card-bg);
    border: 1px solid var(--wp-card-border);
    border-radius: 12px;
    box-shadow: var(--wp-shadow);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
}

.search-result-item {
    padding: 12px 18px;
    cursor: pointer;
    border-bottom: 1px solid var(--wp-card-border);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.search-result-item:hover {
    background: rgba(242, 109, 133, 0.08);
}

.wedding-dark-mode .search-result-item:hover {
    background: rgba(242, 109, 133, 0.15);
}

.search-result-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--wp-text-dark);
}

.search-result-stage {
    font-size: 12px;
    color: var(--wp-primary);
    font-weight: 500;
}

.search-no-results {
    padding: 18px;
    text-align: center;
    color: var(--wp-text-muted);
    font-size: 14px;
}

/* Hiệu ứng nhấp nháy viền và nền khi highlight công việc */
.task-row.search-highlight {
    animation: pulseHighlight 2s ease-in-out;
}

@keyframes pulseHighlight {
    0% {
        border-color: var(--wp-primary);
        box-shadow: 0 0 0 4px rgba(242, 109, 133, 0.4);
        background: rgba(242, 109, 133, 0.15);
    }
    25% {
        background: rgba(242, 109, 133, 0.05);
        box-shadow: none;
    }
    50% {
        border-color: var(--wp-primary);
        box-shadow: 0 0 0 4px rgba(242, 109, 133, 0.4);
        background: rgba(242, 109, 133, 0.15);
    }
    75% {
        background: rgba(242, 109, 133, 0.05);
        box-shadow: none;
    }
    100% {
        border-color: var(--wp-task-border);
        background: var(--wp-task-bg);
    }
}

/* ==========================================================================
   Bố cục 2 cột & Sidebar Mục lục (TOC) Styles
   ========================================================================== */
.wedding-dashboard-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-top: 30px;
}

.wedding-dashboard-sidebar {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 95px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    z-index: 5;
    padding-right: 5px; /* Khoảng đệm cho scrollbar */
}

/* Tùy chỉnh thanh cuộn cho Sidebar mục lục */
.wedding-dashboard-sidebar::-webkit-scrollbar {
    width: 4px;
}

.wedding-dashboard-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.wedding-dashboard-sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(242, 109, 133, 0.2);
    border-radius: 2px;
}

.wedding-dashboard-sidebar:hover::-webkit-scrollbar-thumb {
    background-color: rgba(242, 109, 133, 0.4);
}

.wedding-dashboard-main {
    flex-grow: 1;
    min-width: 0; /* Tránh flex items bị tràn */
}

/* Card Mục lục */
.wedding-toc-card {
    background: var(--wp-card-bg);
    border: 1px solid var(--wp-card-border);
    border-radius: var(--wp-radius);
    padding: 24px;
    box-shadow: var(--wp-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.toc-title {
    font-size: 16px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--wp-text-dark);
    border-bottom: 1px solid var(--wp-border-glass);
    padding-bottom: 12px;
}

.wedding-toc-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Nhóm Giai đoạn trong mục lục */
.toc-stage-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toc-stage-header {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: var(--wp-text-dark);
    padding: 6px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.toc-stage-header:hover {
    background: rgba(242, 109, 133, 0.08);
    color: var(--wp-primary);
}

.toc-stage-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(242, 109, 133, 0.1);
    color: var(--wp-primary);
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
}

.toc-stage-title {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Danh sách công việc con trong mục lục */
.toc-tasks-list {
    list-style: none;
    margin: 0 0 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-left: 1px dashed var(--wp-border-glass);
    padding-left: 14px;
}

.toc-task-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--wp-text-muted);
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.toc-task-item:hover {
    background: rgba(242, 109, 133, 0.05);
    color: var(--wp-primary);
}

.toc-task-item.active-highlight {
    background: rgba(242, 109, 133, 0.1);
    color: var(--wp-primary);
    font-weight: 600;
}

.wedding-dark-mode .toc-task-item.active-highlight {
    background: rgba(242, 109, 133, 0.2);
    color: #fff;
}


.toc-task-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-grow: 1;
}

/* Chấm tròn trạng thái hoàn thành */
.toc-task-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--wp-checkmark-border);
    flex-shrink: 0;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.toc-task-item.completed .toc-task-title {
    text-decoration: line-through;
    color: var(--wp-text-muted);
    opacity: 0.7;
}

.toc-task-item.completed .toc-task-status-dot,
.toc-task-status-dot.completed {
    background-color: var(--wp-primary);
    box-shadow: 0 0 6px var(--wp-primary);
}

.wedding-dark-mode .toc-task-item.completed .toc-task-status-dot,
.wedding-dark-mode .toc-task-status-dot.completed {
    background-color: var(--wp-primary);
    box-shadow: 0 0 6px var(--wp-primary);
}

/* Responsive: Ẩn Sidebar mục lục trên thiết bị di động (màn hình dưới 992px) */
@media (max-width: 992px) {
    .wedding-dashboard-layout {
        flex-direction: column;
        align-items: stretch;
    }
    
    .wedding-dashboard-sidebar {
        display: none; /* Ẩn mục lục trên mobile */
    }
    
    /* Tắt sticky cho ô tìm kiếm và các giai đoạn trên di động */
    .wedding-search-container,
    .wedding-stages-navigation {
        position: static !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
        background: transparent !important;
        padding: 0 !important;
        margin-bottom: 20px !important;
    }
}

/* ==========================================================================
   Modal Xem Trước Bản Tóm Tắt (Preview Modal) Styles
   ========================================================================== */
.wedding-modal-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    box-sizing: border-box;
}

.wedding-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.wedding-modal-container {
    position: relative;
    background: var(--wp-bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
    border-radius: 0;
    box-shadow: none;
    width: 100vw;
    height: 100vh;
    max-width: 100vw !important;
    max-height: 100vh !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeInFullModal 0.25s ease-out;
}

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

.wedding-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--wp-border-glass);
}

.wedding-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--wp-text-dark);
}

.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-close-btn {
    background: transparent;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: var(--wp-text-muted);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: var(--wp-primary);
}

.wedding-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(242, 109, 133, 0.3) transparent;
}

.wedding-modal-body::-webkit-scrollbar {
    width: 6px;
}

.wedding-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.wedding-modal-body::-webkit-scrollbar-thumb {
    background-color: rgba(242, 109, 133, 0.3);
    border-radius: 3px;
}

/* Bộ lọc xem */
.preview-filter-bar {
    padding: 12px 18px;
    background: rgba(242, 109, 133, 0.05);
    border-radius: 8px;
    border: 1px solid var(--wp-border-glass);
}

.filter-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--wp-text-dark);
    font-weight: 500;
    user-select: none;
}

#preview-filter-completed-only {
    accent-color: var(--wp-primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
}

/* Tiến độ tổng quan */
.preview-progress-overview {
    padding: 16px 20px;
    background: var(--wp-task-bg);
    border: 1px solid var(--wp-task-border);
    border-radius: 8px;
}

.overview-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--wp-text-dark);
}

.overview-stat .stat-value {
    color: var(--wp-primary);
    font-size: 18px;
}

/* Các giai đoạn tóm tắt */
.preview-stages-summary {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.preview-stage-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.preview-stage-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--wp-cat-title-color);
    border-bottom: 2px dashed var(--wp-stage-dashed-border);
    padding-bottom: 8px;
    margin: 0;
}

.preview-stage-tasks {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Hàng công việc preview */
.preview-task-item {
    padding: 15px 18px;
    background: var(--wp-task-bg);
    border: 1px solid var(--wp-task-border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.25s ease;
}

.preview-task-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--wp-text-dark);
}

.preview-task-status-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.preview-task-title {
    line-height: 1.4;
}

.preview-task-item.is-completed .preview-task-title {
    text-decoration: line-through;
    color: var(--wp-text-muted);
}

/* Trường tuỳ chỉnh preview */
.preview-task-custom-value {
    font-size: 13px;
    color: var(--wp-text-dark);
    background: rgba(0, 0, 0, 0.02);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.wedding-dark-mode .preview-task-custom-value {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.04);
}

.preview-task-custom-value strong {
    color: var(--wp-text-muted);
    font-weight: 500;
}

.custom-value-text {
    margin-left: 5px;
    color: var(--wp-primary);
    font-weight: 600;
}

/* Ghi chú preview */
.preview-task-notes {
    font-size: 13px;
    color: var(--wp-text-dark);
}

.preview-task-notes strong {
    color: var(--wp-text-muted);
    font-weight: 500;
}

.notes-content-box {
    margin-top: 5px;
    padding: 10px 14px;
    background: rgba(242, 109, 133, 0.03);
    border-left: 3px solid var(--wp-primary);
    border-radius: 0 6px 6px 0;
    font-family: var(--wp-font);
    line-height: 1.5;
    color: var(--wp-text-dark);
    white-space: pre-line;
}

.wedding-dark-mode .notes-content-box {
    background: rgba(242, 109, 133, 0.08);
}

/* Logic ẩn hiện qua bộ lọc */
.preview-summary-content.filter-active .preview-task-item.empty-data {
    display: none;
}

/* Ẩn các Giai đoạn không có công việc có dữ liệu hiển thị */
.preview-summary-content.filter-active .preview-stage-section:not(:has(.preview-task-item.has-data)) {
    display: none;
}

/* ==========================================================================
   CSS Tối ưu hoá In ấn (Print Stylesheet)
   ========================================================================== */
@media print {
    /* Ẩn toàn bộ UI thừa của trang web khi in */
    body > *:not(#wedding-preview-modal),
    .wedding-planner-front-container > *:not(#wedding-preview-modal) {
        display: none !important;
    }
    
    body {
        background: #fff !important;
        color: #000 !important;
        overflow: visible !important;
    }

    #wedding-preview-modal {
        position: relative !important;
        display: block !important;
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        z-index: auto !important;
    }

    .wedding-modal-backdrop,
    .modal-header-actions,
    .preview-filter-bar {
        display: none !important;
    }

    .wedding-modal-container {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        box-shadow: none !important;
        border: none !important;
        background: #fff !important;
        color: #000 !important;
        padding: 0 !important;
        margin: 0 !important;
        transform: none !important;
        animation: none !important;
    }

    .wedding-modal-body {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .preview-summary-content {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }

    .preview-progress-overview {
        border: 1px solid #000 !important;
        background: #fff !important;
        margin-bottom: 20px !important;
        padding: 10px !important;
    }
    
    .overview-stat,
    .overview-stat .stat-value {
        color: #000 !important;
    }

    .preview-stages-summary {
        display: block !important;
    }

    .preview-stage-section {
        display: block !important;
        page-break-inside: avoid;
    }

    .preview-stage-title {
        color: #000 !important;
        border-bottom: 2px solid #000 !important;
        padding-bottom: 5px !important;
        margin-top: 30px !important;
    }

    .preview-stage-tasks {
        display: block !important;
    }

    .preview-task-item {
        display: block !important;
        border: 1px solid #ccc !important;
        background: #fff !important;
        page-break-inside: avoid;
        margin-bottom: 10px !important;
        padding: 10px !important;
    }

    .preview-task-header {
        color: #000 !important;
    }

    .preview-task-custom-value {
        background: #f5f5f5 !important;
        border: 1px solid #ddd !important;
        color: #000 !important;
        margin-top: 5px !important;
    }

    .custom-value-text {
        color: #000 !important;
        text-decoration: underline !important;
    }

    .notes-content-box {
        background: #f9f9f9 !important;
        border-left: 3px solid #000 !important;
        color: #000 !important;
        margin-top: 5px !important;
    }

    /* Mặc định in ấn luôn lọc chỉ in các mục có dữ liệu để tiết kiệm giấy và cô đọng nhất */
    .preview-summary-content .preview-task-item.empty-data {
        display: none !important;
    }
    
    .preview-summary-content .preview-stage-section:not(:has(.preview-task-item.has-data)) {
        display: none !important;
    }
}

/* ==========================================================================
   Widget Đếm Ngược Ngày Quan Trọng (Countdown Widget)
   ========================================================================== */
.wedding-countdown-widget-wrapper {
    background: var(--wp-card-bg);
    border: 1px solid var(--wp-card-border);
    border-radius: var(--wp-radius);
    padding: 24px;
    margin-bottom: 25px;
    box-shadow: var(--wp-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

/* Khi không có ngày nào được thiết lập */
.wedding-countdown-empty {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: center;
    text-align: left;
    padding: 10px 0;
}

.empty-heart-icon {
    font-size: 40px;
    animation: heartBeat 1.5s infinite;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.wedding-countdown-empty .empty-info h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--wp-text-dark);
}

.wedding-countdown-empty .empty-info p {
    margin: 0;
    font-size: 13px;
    color: var(--wp-text-muted);
}

/* Khi đã có ngày thiết lập */
.wedding-countdown-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
    align-items: center;
}

.countdown-main-timer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid var(--wp-card-border);
    padding-right: 30px;
}

.timer-title {
    margin: 0 0 15px 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--wp-text-muted);
}

.timer-digits-wrapper {
    display: flex;
    gap: 15px;
}

.digit-box {
    flex: 1;
    background: rgba(242, 109, 133, 0.05);
    border: 1px solid rgba(242, 109, 133, 0.1);
    border-radius: 12px;
    padding: 12px 6px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
    min-width: 65px;
}

.wedding-dark-mode .digit-box {
    background: rgba(242, 109, 133, 0.12);
    border-color: rgba(242, 109, 133, 0.2);
}

.anniversary-mode .digit-box {
    background: rgba(47, 133, 90, 0.05);
    border-color: rgba(47, 133, 90, 0.1);
}

.wedding-dark-mode .anniversary-mode .digit-box {
    background: rgba(47, 133, 90, 0.12);
    border-color: rgba(47, 133, 90, 0.2);
}

.digit-box .number {
    font-size: 26px;
    font-weight: 700;
    color: var(--wp-primary);
    line-height: 1;
    margin-bottom: 6px;
}

.anniversary-mode .digit-box .number {
    color: #2f855a;
}

.digit-box .label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--wp-text-muted);
    letter-spacing: 0.5px;
}

/* Cột bên phải: danh sách các mốc thời gian */
.countdown-dates-list {
    display: flex;
    flex-direction: column;
}

.countdown-dates-list .list-title {
    margin: 0 0 12px 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--wp-text-muted);
}

.countdown-dates-list .list-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.countdown-list-item {
    display: flex;
    align-items: center;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--wp-task-border);
    background: var(--wp-task-bg);
    cursor: pointer;
    transition: all 0.2s ease;
}

.countdown-list-item:hover {
    transform: translateX(4px);
    border-color: var(--wp-primary);
}

.countdown-list-item .item-title {
    font-weight: 600;
    color: var(--wp-text-dark);
    margin-right: 6px;
}

.countdown-list-item .item-date {
    color: var(--wp-text-muted);
    font-size: 12px;
    margin-right: auto;
}

.countdown-list-item .item-status {
    font-size: 12px;
    font-weight: 500;
    padding: 2px 10px;
    border-radius: 50px;
}

/* Trạng thái */
.status-pending .item-status {
    background: rgba(242, 109, 133, 0.1);
    color: var(--wp-primary);
}

.status-today .item-status {
    background: #feebc8;
    color: #dd6b20;
    animation: flashBg 1.5s infinite;
}

@keyframes flashBg {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.status-passed .item-status {
    background: rgba(0, 0, 0, 0.05);
    color: var(--wp-text-muted);
}

.wedding-dark-mode .status-passed .item-status {
    background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   Bảng nhập liệu động (Dynamic Table) Styles
   ========================================================================== */
.task-custom-field-table-wrapper {
    margin-top: 10px;
    width: 100%;
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--wp-task-border);
}

.wedding-custom-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: var(--wp-text-dark);
    background: var(--wp-task-bg);
}

.wedding-custom-table th {
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 2px solid var(--wp-task-border);
    padding: 10px 12px;
    font-weight: 600;
    text-align: left;
}

.wedding-dark-mode .wedding-custom-table th {
    background: rgba(255, 255, 255, 0.02);
}

.wedding-custom-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--wp-task-border);
    vertical-align: middle;
}

.wedding-custom-table tbody tr:last-child td {
    border-bottom: none;
}

/* Tế bào nhập liệu */
.table-cell-input {
    width: 100%;
    height: 34px;
    padding: 4px 10px;
    border: 1px solid var(--wp-input-border);
    background: var(--wp-input-bg);
    color: var(--wp-text-dark);
    font-family: var(--wp-font);
    font-size: 13px;
    border-radius: 6px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.table-cell-input:focus {
    outline: none;
    border-color: var(--wp-primary);
    background: var(--wp-textarea-focus-bg);
    box-shadow: 0 0 0 2px rgba(242, 109, 133, 0.1);
}

select.table-cell-input {
    height: 34px;
    cursor: pointer;
}

/* Nút xóa dòng trong bảng */
.btn-delete-table-row {
    background: transparent;
    border: none;
    color: var(--wp-text-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.btn-delete-table-row:hover {
    background: #fed7d7;
    color: #e53e3e;
}

.wedding-dark-mode .btn-delete-table-row:hover {
    background: rgba(229, 62, 62, 0.2);
    color: #fc8181;
}

/* Static table cho in ấn/preview */
.preview-static-table th {
    background: #edf2f7;
    font-weight: 600;
}

/* ==========================================================================
   Popup Hướng Dẫn Chi Tiết (Guide Popup)
   ========================================================================== */
.task-guide-btn {
    background: rgba(242, 109, 133, 0.08);
    border: 1px solid rgba(242, 109, 133, 0.2);
    color: var(--wp-primary);
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    font-family: var(--wp-font);
}

.task-guide-btn:hover {
    background: var(--wp-primary);
    color: #fff;
    border-color: var(--wp-primary);
    transform: translateY(-1px);
}

.guide-modal-container {
    max-width: 600px !important;
    height: auto !important;
    max-height: 80vh !important;
    border-radius: var(--wp-radius) !important;
    margin: auto !important;
}

#guide-modal-body-content {
    line-height: 1.6;
    font-size: 14px;
    color: var(--wp-text-dark);
}

#guide-modal-body-content p {
    margin-top: 0;
    margin-bottom: 12px;
}

#guide-modal-body-content ul, 
#guide-modal-body-content ol {
    margin-top: 0;
    margin-bottom: 12px;
    padding-left: 20px;
}

#guide-modal-body-content li {
    margin-bottom: 4px;
}

/* ==========================================================================
   Responsive cho Widget Countdown
   ========================================================================== */
@media (max-width: 768px) {
    .wedding-countdown-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .countdown-main-timer {
        border-right: none;
        border-bottom: 1px solid var(--wp-card-border);
        padding-right: 0;
        padding-bottom: 20px;
    }
    
    .wedding-countdown-empty {
        flex-direction: column;
        text-align: center;
    }
}

/* ==========================================================================
   Khung Cẩm Nang Nghi Lễ Đám Cưới (Ceremony Guide Card)
   ========================================================================== */
.wedding-ceremony-guide-card {
    background: var(--wp-card-bg);
    border: 1px solid var(--wp-card-border);
    border-radius: var(--wp-radius);
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: var(--wp-shadow);
    transition: all 0.3s ease;
    animation: borderGlowPulse 4s infinite ease-in-out;
}

.wedding-dark-mode .wedding-ceremony-guide-card {
    animation: borderGlowPulseDark 4s infinite ease-in-out;
}

.wedding-ceremony-guide-card:hover {
    border-color: rgba(242, 109, 133, 0.25);
    box-shadow: 0 10px 25px rgba(242, 109, 133, 0.05);
}

@keyframes borderGlowPulse {
    0% {
        border-color: var(--wp-card-border);
        box-shadow: var(--wp-shadow);
    }
    50% {
        border-color: rgba(242, 109, 133, 0.5);
        box-shadow: 0 0 15px rgba(242, 109, 133, 0.2);
    }
    100% {
        border-color: var(--wp-card-border);
        box-shadow: var(--wp-shadow);
    }
}

@keyframes borderGlowPulseDark {
    0% {
        border-color: var(--wp-card-border);
        box-shadow: var(--wp-shadow);
    }
    50% {
        border-color: rgba(242, 109, 133, 0.6);
        box-shadow: 0 0 20px rgba(242, 109, 133, 0.35);
    }
    100% {
        border-color: var(--wp-card-border);
        box-shadow: var(--wp-shadow);
    }
}

.item-guide-btn {
    cursor: pointer;
    font-size: 13px;
    padding: 4px 6px;
    border-radius: 50%;
    background: rgba(242, 109, 133, 0.08);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}

.item-guide-btn:hover {
    background: var(--wp-primary);
    color: #fff;
    transform: scale(1.2);
}

.item-guide-btn.loading-spin {
    animation: itemSpin 1s linear infinite;
    pointer-events: none;
}

@keyframes itemSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.wedding-ceremony-guide-card.glow-highlight {
    animation: borderGlowFlash 1.5s ease-out !important;
}

@keyframes borderGlowFlash {
    0% {
        box-shadow: 0 0 0px var(--wp-primary);
        border-color: var(--wp-primary);
    }
    30% {
        box-shadow: 0 0 25px var(--wp-primary);
        border-color: var(--wp-primary);
        transform: scale(1.02);
    }
    100% {
        box-shadow: var(--wp-shadow);
        border-color: var(--wp-card-border);
        transform: scale(1);
    }
}

.ceremony-guide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--wp-card-border);
    padding-bottom: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.ceremony-guide-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ceremony-guide-icon {
    font-size: 24px;
}

.ceremony-guide-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--wp-text-dark);
}

.ceremony-guide-countdown .badge {
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
}

.ceremony-guide-countdown .badge-today {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fee2e2;
    animation: pulse 2s infinite;
}

.ceremony-guide-countdown .badge-days {
    background: var(--wp-secondary);
    color: var(--wp-primary);
    border: 1px solid var(--wp-border-glass);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Tabs Navigation */
.ceremony-guide-tabs {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 10px;
    margin-bottom: 18px;
    scrollbar-width: none; /* Ẩn scrollbar trên Firefox */
}

.ceremony-guide-tabs::-webkit-scrollbar {
    display: none; /* Ẩn scrollbar trên Chrome/Safari */
}

.ceremony-tab-btn {
    background: var(--wp-btn-sec-bg);
    border: 1px solid var(--wp-btn-sec-border);
    color: var(--wp-text-muted);
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--wp-font);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.ceremony-tab-btn:hover {
    border-color: var(--wp-primary);
    color: var(--wp-primary);
    background: var(--wp-secondary);
}

.ceremony-tab-btn.active {
    background: var(--wp-primary);
    color: #fff;
    border-color: var(--wp-primary);
    box-shadow: 0 4px 10px rgba(242, 109, 133, 0.2);
}

/* Tab Content */
.ceremony-guide-contents {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
    border: 1px dashed var(--wp-card-border);
}

.wedding-dark-mode .ceremony-guide-contents {
    background: rgba(0, 0, 0, 0.2);
}

.ceremony-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.ceremony-tab-content.active {
    display: block;
}

.ceremony-section-body {
    font-size: 14px;
    line-height: 1.6;
    color: var(--wp-text-dark);
}

.ceremony-section-body p {
    margin-top: 0;
    margin-bottom: 12px;
}

.ceremony-section-body p:last-child {
    margin-bottom: 0;
}

.ceremony-section-body ul {
    margin-top: 0;
    margin-bottom: 12px;
    padding-left: 20px;
}

.ceremony-section-body li {
    margin-bottom: 6px;
}

/* Đảm bảo tab responsive trên mobile */
@media (max-width: 576px) {
    .wedding-ceremony-guide-card {
        padding: 16px;
    }
    
    .ceremony-guide-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ceremony-guide-countdown {
        align-self: flex-end;
    }
}

/* ==========================================================================
   Giao diện Wizard Thiết lập Nhanh (Wizard Steps Styles)
   ========================================================================== */
.wedding-wizard-container {
    background: var(--wp-card-bg);
    border: 1px solid var(--wp-card-border);
    border-radius: var(--wp-radius);
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: var(--wp-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    animation: fadeIn 0.4s ease;
}

.wizard-header h2 {
    margin: 0 0 10px 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--wp-text-dark);
}

.wizard-header p {
    margin: 0 0 30px 0;
    font-size: 14px;
    color: var(--wp-text-muted);
}

/* Steps Indicator */
.wizard-steps-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    cursor: default;
    width: 70px;
}

.step-num {
    width: 40px;
    height: 40px;
    background: var(--wp-btn-sec-bg);
    border: 2px solid var(--wp-btn-sec-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--wp-text-muted);
    transition: all 0.3s ease;
}

.step-title {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--wp-text-muted);
    white-space: nowrap;
    transition: all 0.3s ease;
}

.step-line {
    flex-grow: 1;
    height: 2px;
    background: var(--wp-btn-sec-border);
    margin: 0 -10px;
    position: relative;
    top: -10px;
    z-index: 1;
    transition: background 0.3s ease;
}

/* Steps Active State */
.step-indicator.active .step-num {
    background: var(--wp-secondary);
    border-color: var(--wp-primary);
    color: var(--wp-primary);
    box-shadow: 0 0 15px rgba(242, 109, 133, 0.3);
    transform: scale(1.1);
}

.step-indicator.active .step-title {
    color: var(--wp-primary);
    font-weight: 700;
}

.step-indicator.active ~ .step-line,
.step-indicator.active + .step-line {
    background: var(--wp-primary);
}

/* Form & Inputs */
.wedding-wizard-form {
    max-width: 600px;
    margin: 0 auto;
}

.wizard-step {
    animation: fadeIn 0.3s ease;
}

.step-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--wp-text-dark);
    margin-top: 0;
    margin-bottom: 25px;
    border-left: 4px solid var(--wp-primary);
    padding-left: 10px;
}

.wizard-field-group {
    margin-bottom: 20px;
    text-align: left;
}

.wizard-field-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--wp-text-dark);
    margin-bottom: 8px;
}

.wizard-field-group input[type="text"],
.wizard-field-group input[type="date"],
.wizard-field-group select,
.wizard-field-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--wp-btn-sec-border);
    border-radius: 8px;
    background: var(--wp-card-bg);
    color: var(--wp-text-dark);
    font-family: var(--wp-font);
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.wizard-field-group input:focus,
.wizard-field-group select:focus,
.wizard-field-group textarea:focus {
    outline: none;
    border-color: var(--wp-primary);
    box-shadow: 0 0 0 3px rgba(242, 109, 133, 0.15);
}

/* Radio & Checkbox layouts */
.wizard-radio-group,
.wizard-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
}

.wizard-radio-label,
.wizard-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(242, 109, 133, 0.03);
    border: 1px solid var(--wp-btn-sec-border);
    padding: 10px 18px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 13px;
    color: var(--wp-text-dark);
    font-weight: 500;
    transition: all 0.25s ease;
    user-select: none;
}

.wedding-dark-mode .wizard-radio-label,
.wedding-dark-mode .wizard-checkbox-label {
    background: rgba(255, 255, 255, 0.02);
}

.wizard-radio-label:hover,
.wizard-checkbox-label:hover {
    border-color: var(--wp-primary);
    color: var(--wp-primary);
}

.wizard-radio-label input:checked + span,
.wizard-checkbox-label input:checked + span {
    color: var(--wp-primary);
    font-weight: 600;
}

.wizard-radio-label input,
.wizard-checkbox-label input {
    accent-color: var(--wp-primary);
    margin: 0;
    cursor: pointer;
}

.wizard-radio-label input:checked,
.wizard-checkbox-label input:checked {
    transform: scale(1.1);
}

/* Summary Step */
.wizard-summary-table-wrapper {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 10px;
    padding: 10px;
    border: 1px solid var(--wp-btn-sec-border);
    margin-bottom: 20px;
}

.wedding-dark-mode .wizard-summary-table-wrapper {
    background: rgba(255, 255, 255, 0.01);
}

.wizard-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}

.wizard-summary-table th,
.wizard-summary-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--wp-btn-sec-border);
}

.wizard-summary-table th {
    font-weight: 700;
    color: var(--wp-text-dark);
    background: rgba(242, 109, 133, 0.05);
}

.wedding-dark-mode .wizard-summary-table th {
    background: rgba(255, 255, 255, 0.03);
}

.wizard-summary-table tr:last-child td {
    border-bottom: none;
}

.wizard-summary-table td {
    color: var(--wp-text-dark);
}

/* Actions Buttons */
.wizard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 35px;
    border-top: 1px solid var(--wp-btn-sec-border);
    padding-top: 20px;
}

.wizard-actions button {
    font-size: 14px;
    padding: 10px 20px;
}

.wedding-btn-link {
    background: transparent !important;
    border: none !important;
    color: var(--wp-text-muted) !important;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}

.wedding-btn-link:hover {
    color: var(--wp-primary) !important;
}

/* Responsive */
@media (max-width: 576px) {
    .wizard-steps-indicator {
        margin-bottom: 25px;
    }
    .step-indicator {
        width: 55px;
    }
    .step-num {
        width: 32px;
        height: 32px;
        font-size: 15px;
    }
    .step-title {
        font-size: 10px;
    }
    .step-line {
        top: -15px;
    }
    .wedding-wizard-container {
        padding: 20px 15px;
    }
    .wizard-actions {
        flex-direction: column-reverse;
        gap: 15px;
        align-items: stretch;
    }
    .actions-right {
        flex-direction: column;
        align-items: stretch;
    }
    .wizard-radio-group,
    .wizard-checkbox-group {
        flex-direction: column;
        align-items: stretch;
    }
    .wizard-radio-label,
    .wizard-checkbox-label {
        display: flex;
    }
}





