/* Custom Styling - Hệ thống Quản lý Lớp 12A2 (Pastel & Modern Palette) */
@import url('../vendor/fonts.css');

:root {
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    
    /* Nền chính */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    
    /* Bảng màu Pastel & Nhã nhặn */
    --brand-sage: #2D5A46;
    --brand-sage-light: #E8F3ED;
    --brand-sage-border: #C2DFD1;
    --brand-amber: #D97706;
    --brand-amber-light: #FEF3C7;
    
    --pastel-lavender: #D4C5F9;
    --pastel-lavender-dark: #C9B8FF;
    --pastel-yellow: #FFE8A3;
    --pastel-pink: #FFD6E0;
    --pastel-mint: #B8E6D8;
    --pastel-blue: #C5DFFF;
    --pastel-lime: #D4EDBC;
    
    /* Text rõ nét, loại bỏ xám mờ khó nhìn */
    --text-primary: #0F172A;
    --text-secondary: #334155;
    --text-muted: #64748B;
}

/* Tăng độ tương phản cho các lớp text xám mờ */
.text-slate-400, .text-gray-400 {
    color: #64748b !important;
}
.text-slate-500, .text-gray-500 {
    color: #475569 !important;
}
.text-\[\#8A8A8A\] {
    color: #555F6D !important;
}

/* Hiệu ứng màu nền trang nhã khi focus vào ô nhập liệu */
input:focus, select:focus, textarea:focus {
    background-color: #F8FCF9 !important;
    border-color: #2D5A46 !important;
    box-shadow: 0 0 0 3px rgba(45, 90, 70, 0.12) !important;
}

body {
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Slim Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Pastel Solid Shadow Helpers */
.shadow-soft {
    box-shadow: 0 4px 20px -2px rgba(148, 163, 184, 0.15);
}

.shadow-card {
    box-shadow: 0 2px 12px -1px rgba(100, 116, 139, 0.08);
}

/* Keyframe Animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.animate-shake {
    animation: shake 0.4s ease-in-out;
}

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

.animate-slide-up {
    animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Interactive Card Elevation (Clean Flat Transition) */
.hover-elevate {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.hover-elevate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -4px rgba(100, 116, 139, 0.12);
}

/* Sidebar Menu Items Styling - Nổi bật, có đường nét rõ ràng */
.nav-btn, .mobile-nav-btn {
    border: 1px solid #E2E8F0 !important;
    background-color: #FAFCFE;
    transition: all 0.18s ease-in-out !important;
}

.nav-btn:hover, .mobile-nav-btn:hover {
    background-color: #FFE8A3 !important;
    border-color: #F6D878 !important;
    color: #1A1A1A !important;
    transform: translateX(2px);
}

.nav-btn.active, .mobile-nav-btn.active {
    background-color: #D4EDBC !important;
    border-color: #B5DC92 !important;
    color: #1A1A1A !important;
    box-shadow: 0 2px 8px -1px rgba(181, 220, 146, 0.4) !important;
    font-weight: 800 !important;
}

/* Tùy chỉnh Flatpickr: Hiển thị đầy đủ Tháng và Năm, có thể chọn năm dễ dàng */
.flatpickr-calendar {
    font-family: var(--font-sans) !important;
    border-radius: 1rem !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #E2E8F0 !important;
    padding: 6px !important;
    z-index: 999999 !important;
}

.flatpickr-months {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: relative !important;
}

.flatpickr-months .flatpickr-month {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
    height: auto !important;
    overflow: visible !important;
}

.flatpickr-current-month {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 4px 0 !important;
    font-size: 14px !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    font-weight: 700 !important;
    font-size: 14px !important;
    color: #1A1A1A !important;
    padding: 3px 8px !important;
    border-radius: 8px !important;
    background: #F1F5F9 !important;
    border: 1px solid #CBD5E1 !important;
    outline: none !important;
    cursor: pointer !important;
    display: inline-block !important;
}

.flatpickr-current-month .numInputWrapper {
    display: inline-flex !important;
    width: 76px !important;
    position: relative !important;
}

.flatpickr-current-month input.cur-year {
    font-weight: 700 !important;
    font-size: 14px !important;
    color: #1A1A1A !important;
    background: #F1F5F9 !important;
    border: 1px solid #CBD5E1 !important;
    border-radius: 8px !important;
    padding: 3px 18px 3px 8px !important;
    text-align: center !important;
    box-shadow: none !important;
    display: inline-block !important;
    width: 100% !important;
}

.flatpickr-current-month input.cur-year:focus {
    border-color: #2D5A46 !important;
    background: #FFFFFF !important;
}

.flatpickr-current-month .numInputWrapper span.arrowUp,
.flatpickr-current-month .numInputWrapper span.arrowDown {
    display: block !important;
    opacity: 0.8 !important;
}

.flatpickr-day.selected {
    background: #2D5A46 !important;
    border-color: #2D5A46 !important;
}

/* ============================================================
   QUILL RICH TEXT EDITOR STYLES
   ============================================================ */
.quill-editor-wrapper {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.quill-editor-wrapper .ql-toolbar.ql-snow {
    border: none !important;
    border-bottom: 1px solid #E2E8F0 !important;
    background-color: #F8FAFC !important;
    padding: 8px 10px !important;
    border-top-left-radius: 0.75rem !important;
    border-top-right-radius: 0.75rem !important;
}

.quill-editor-wrapper .ql-container.ql-snow {
    border: none !important;
    font-family: inherit !important;
    font-size: 0.8125rem !important;
}

.quill-editor-wrapper .ql-editor {
    min-height: 160px;
    max-height: 420px;
    overflow-y: auto;
    padding: 12px 14px !important;
    line-height: 1.65;
    color: #1E293B;
}

.quill-editor-wrapper .ql-editor.ql-blank::before {
    color: #94A3B8;
    font-style: normal;
    font-size: 0.8125rem;
    left: 14px;
}

/* ============================================================
   RICH TEXT CONTENT DISPLAY (For Feeds & Detail Modals)
   ============================================================ */
.rich-text-content {
    line-height: 1.65;
    color: #1E293B;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.rich-text-content p {
    margin-bottom: 0.5rem;
}

.rich-text-content p:last-child {
    margin-bottom: 0;
}

.rich-text-content h1 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0F172A;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.rich-text-content h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0F172A;
    margin-top: 0.65rem;
    margin-bottom: 0.4rem;
    line-height: 1.35;
}

.rich-text-content h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1E293B;
    margin-top: 0.5rem;
    margin-bottom: 0.35rem;
}

.rich-text-content ul {
    list-style-type: disc !important;
    padding-left: 1.35rem !important;
    margin-bottom: 0.5rem !important;
}

.rich-text-content ol {
    list-style-type: decimal !important;
    padding-left: 1.35rem !important;
    margin-bottom: 0.5rem !important;
}

.rich-text-content li {
    margin-bottom: 0.25rem;
    display: list-item !important;
}

.rich-text-content a {
    color: #4F46E5 !important;
    text-decoration: underline !important;
    font-weight: 600;
    transition: color 0.15s ease;
}

.rich-text-content a:hover {
    color: #3730A3 !important;
}

.rich-text-content blockquote {
    border-left: 3px solid #6366F1;
    padding-left: 0.75rem;
    margin: 0.5rem 0;
    color: #475569;
    font-style: italic;
    background: #F8FAFC;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

.rich-text-content pre,
.rich-text-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    background: #F1F5F9;
    color: #0F172A;
    padding: 0.15rem 0.35rem;
    border-radius: 0.375rem;
}

.rich-text-content pre {
    padding: 0.75rem;
    overflow-x: auto;
    margin: 0.5rem 0;
}

.rich-text-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 0.5rem 0;
    border: 1px solid #E2E8F0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

/* Responsive Video Embeds (YouTube / Vimeo / etc.) */
.rich-text-content iframe,
.rich-text-content .ql-video {
    width: 100% !important;
    max-width: 640px;
    aspect-ratio: 16 / 9;
    height: auto !important;
    border-radius: 0.75rem;
    margin: 0.5rem 0;
    border: 1px solid #E2E8F0;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    display: block;
}

/* Tables pasted from Word / HTML */
.rich-text-content table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 0.5rem 0 !important;
    font-size: 0.75rem !important;
}

.rich-text-content th,
.rich-text-content td {
    border: 1px solid #CBD5E1 !important;
    padding: 0.4rem 0.6rem !important;
    text-align: left !important;
}

.rich-text-content th {
    background-color: #F1F5F9 !important;
    font-weight: 700 !important;
}

/* Line clamp preview for feeds */
.line-clamp-feed {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card hover animation */
.item-card, .btn-open-item-popup {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.item-card:hover, .btn-open-item-popup:hover {
    transform: translateY(-1px);
}



