/* --- BUTTONS --- */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary,
.btn-submit {
    background: var(--aura-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 91, 150, 0.4);
}

.btn-primary:hover,
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 91, 150, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

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

/* Badges */
.priority-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    margin-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.priority-badge.high {
    background-color: var(--priority-high-color);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.priority-badge.medium {
    background-color: var(--priority-medium-color);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.priority-badge.low {
    background-color: var(--priority-low-color);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.tag-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color-primary);
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    font-size: 0.75rem;
    margin-right: 5px;
    margin-bottom: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}


/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
    background: var(--aura-gradient);
    border-color: transparent;
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--primary-blue);
}

input:checked+.slider:before {
    transform: translateX(22px);
}

/* Color Picker */
.color-picker-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.color-picker-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color-primary);
}

.color-picker-group input[type="color"] {
    width: 100%;
    height: 40px;
    border: none;
    padding: 0;
    background: none;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
}

/* Duplicate Group */
.duplicate-group {
    background: var(--glass-bg);
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
    border: var(--glass-border);
}

.duplicate-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.duplicate-item strong {
    color: var(--aura-color-2);
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    /* Dark backdrop */
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--aura-color-1);
    border-right: 4px solid var(--aura-color-2);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(0, 91, 150, 0.3);
}

.loading-text {
    font-weight: 600;
    color: var(--white);
    letter-spacing: 1px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Notification */
#notification-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.notification {
    background: rgba(30, 41, 59, 0.9);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 280px;
    border-left: 4px solid var(--primary-blue);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification.success {
    border-left-color: var(--success-color);
    background: linear-gradient(to right, rgba(16, 185, 129, 0.1), rgba(30, 41, 59, 0.9));
}

.notification.error {
    border-left-color: var(--danger-color);
    background: linear-gradient(to right, rgba(239, 68, 68, 0.1), rgba(30, 41, 59, 0.9));
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Scroll To Top */
#btn-scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--aura-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 91, 150, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#btn-scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

#btn-scroll-top:hover {
    transform: translateY(-5px) rotate(360deg);
    box-shadow: 0 6px 20px rgba(0, 91, 150, 0.6);
}

/* Print Mode */
@media print {

    /* Ẩn tất cả những thứ không cần thiết khi in */
    .btn-goto-app,
    .btn-qr,
    .social-bar,
    .ach-filter-bar,
    .ach-show-more-btn,
    .message-form-box,
    #btn-scroll-top,
    footer,
    .hero-avatar,
    .btn-submit {
        display: none !important;
    }

    /* Chỉnh lại màu sắc cho rõ trên giấy trắng */
    body,
    .hero-title,
    h1,
    h2,
    h3,
    p {
        color: #000 !important;
        background: #fff !important;
        -webkit-text-fill-color: #000 !important;
    }

    /* Căn chỉnh khổ giấy */
    .section-container {
        padding: 0;
        margin: 0;
        page-break-inside: avoid;
    }

    /* Đảm bảo danh sách thành tích hiện đầy đủ */
    .ach-item {
        display: flex !important;
        border: none !important;
        border-bottom: 1px solid #ccc !important;
        padding: 10px 0 !important;
        page-break-inside: avoid;
    }

    /* Ẩn ảnh trong list thành tích để tiết kiệm mực (tùy chọn) */
    .ach-image {
        display: none !important;
    }

    /* Hiện link ra giấy để người đọc biết */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8rem;
        color: #666;
    }
}

/* Appointment Modal (Glassmorphism) */
.appt-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
}

.appt-modal {
    background: rgba(30, 41, 59, 0.8);
    width: 90%;
    max-width: 500px;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 280px;
    border-left: 4px solid var(--primary-blue);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification.success {
    border-left-color: var(--success-color);
    background: linear-gradient(to right, rgba(16, 185, 129, 0.1), rgba(30, 41, 59, 0.9));
}

.notification.error {
    border-left-color: var(--danger-color);
    background: linear-gradient(to right, rgba(239, 68, 68, 0.1), rgba(30, 41, 59, 0.9));
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Scroll To Top */
#btn-scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--aura-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 91, 150, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#btn-scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

#btn-scroll-top:hover {
    transform: translateY(-5px) rotate(360deg);
    box-shadow: 0 6px 20px rgba(0, 91, 150, 0.6);
}

/* Print Mode */
@media print {

    /* Ẩn tất cả những thứ không cần thiết khi in */
    .btn-goto-app,
    .btn-qr,
    .social-bar,
    .ach-filter-bar,
    .ach-show-more-btn,
    .message-form-box,
    #btn-scroll-top,
    footer,
    .hero-avatar,
    .btn-submit {
        display: none !important;
    }

    /* Chỉnh lại màu sắc cho rõ trên giấy trắng */
    body,
    .hero-title,
    h1,
    h2,
    h3,
    p {
        color: #000 !important;
        background: #fff !important;
        -webkit-text-fill-color: #000 !important;
    }

    /* Căn chỉnh khổ giấy */
    .section-container {
        padding: 0;
        margin: 0;
        page-break-inside: avoid;
    }

    /* Đảm bảo danh sách thành tích hiện đầy đủ */
    .ach-item {
        display: flex !important;
        border: none !important;
        border-bottom: 1px solid #ccc !important;
        padding: 10px 0 !important;
        page-break-inside: avoid;
    }

    /* Ẩn ảnh trong list thành tích để tiết kiệm mực (tùy chọn) */
    .ach-image {
        display: none !important;
    }

    /* Hiện link ra giấy để người đọc biết */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8rem;
        color: #666;
    }
}

/* Appointment Modal (Glassmorphism) */
.appt-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
}

.appt-modal {
    background: rgba(30, 41, 59, 0.8);
    width: 90%;
    max-width: 500px;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color-primary);
}

@keyframes popIn {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.appt-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    color: var(--text-color-secondary);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s;
}

.appt-close:hover {
    color: var(--danger-color);
}

/* ===== PAGE HEADINGS AND FILTER BUTTONS ===== */

/* Content section headings - xanh đậm gradient */
.content-section h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #003366 0%, #005B96 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid;
    border-image: var(--aura-gradient) 1;
}

/* Task filter buttons - cải thiện style */
.task-filter-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 91, 150, 0.2);
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.8) 0%,
            rgba(240, 247, 255, 0.6) 100%);
    color: var(--text-color-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: linear-gradient(135deg,
            rgba(0, 91, 150, 0.12) 0%,
            rgba(255, 122, 0, 0.08) 100%);
    border-color: var(--aura-color-1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 91, 150, 0.15);
}

.filter-btn.active {
    background: var(--aura-gradient);
    color: #ffffff;
    border: none;
    box-shadow: 0 6px 20px rgba(0, 91, 150, 0.3);
}

/* Task controls container */
.task-controls {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Calendar header controls improvements */
#current-view-range {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color-primary);
    margin: 0 1rem;
}

```