        :root {
            --primary: #3b82f6;
            --secondary: #10B981;
            --dark: #1f2937;
            --light: #f9fafb;
            --accent: #f59e0b;
        }

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

        body {
            line-height: 1.6;
            color: var(--dark);
            background-color: #fff;
        }

        /* Header */
        header {
            background: #fff;
            padding: 1rem 5%;
            position: fixed;
            width: 100%;
            top: 0;
            z-index: 1000;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary);
            display: flex;          /* Kích hoạt flexbox */
            align-items: center;    /* Căn giữa ảnh và chữ theo chiều dọc */
            gap: 12px;
        }

        .logo span { color: var(--accent); }
           
        .logo-img {
            height: 40px;        /* Điều chỉnh chiều cao khớp với cỡ chữ */
            width: auto;         /* Giữ nguyên tỉ lệ ảnh */
            object-fit: contain;
            display: block;
        }
           
        .btn-zalo-top {
            background: var(--primary);
            color: white;
            padding: 0.6rem 1.2rem;
            border-radius: 50px;
            text-decoration: none;
            font-weight: 600;
            transition: 0.3s;
        }

        /* Hero Section */
        .hero {
            padding: 8rem 5% 4rem;
            background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
            text-align: center;
        }

        .hero h1 {
            font-size: 2.8rem;
            margin-bottom: 1.5rem;
            line-height: 1.2;
        }

        .hero h1 span { color: var(--primary); }

        .hero p {
            font-size: 1.2rem;
            color: #4b5563;
            max-width: 800px;
            margin: 0 auto 2rem;
        }

        .cta-group {
            display: flex;
            gap: 1rem;
            justify-content: center;
        }

        .btn {
            padding: 1rem 2rem;
            border-radius: 8px;
            text-decoration: none;
            font-weight: 700;
            transition: 0.3s;
        }

        .btn-main { background: var(--primary); color: white; }
        .btn-sub { background: var(--secondary); color: white; }
        .btn:hover { opacity: 0.9; transform: translateY(-2px); }

        /* Intro & Mission */
        .section { padding: 5rem 5%; }
        .text-center { text-align: center; }

        .mission-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 2rem;
            margin-top: 3rem;
        }

        .mission-card {
            padding: 2rem;
            background: var(--light);
            border-radius: 12px;
            border-bottom: 4px solid var(--primary);
        }

        /* Features */
        .features { background: #f3f4f6; }

        .feature-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 1.5rem;
            margin-top: 3rem;
        }

        .feature-item {
            background: white;
            padding: 1.5rem;
            border-radius: 12px;
            display: flex;
            gap: 1rem;
            transition: 0.3s;
            box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
        }

        .feature-item:hover { transform: scale(1.02); }

        .feature-item i {
            font-size: 1.5rem;
            color: var(--primary);
            margin-top: 5px;
        }

        .feature-item h3 { margin-bottom: 0.5rem; font-size: 1.1rem; }

        /* Zalo Floating Button */
        .zalo-float {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: #0068ff;
            color: white;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 30px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.3);
            z-index: 1000;
            text-decoration: none;
            animation: pulse 2s infinite;
        }

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

        /* Footer */
        footer {
            background: var(--dark);
            color: white;
            padding: 3rem 5%;
            text-align: center;
        }

        .contact-info { margin: 1.5rem 0; font-size: 1.2rem; }
        .contact-info a { color: var(--accent); text-decoration: none; font-weight: bold; }

        /* Responsive */
        @media (max-width: 768px) {
            .hero h1 { font-size: 2rem; }
            .cta-group { flex-direction: column; }
        }
/* Tối ưu giao diện cho điện thoại (Mobile) */
@media (max-width: 768px) {
    /* 1. Thu nhỏ padding của header để tiết kiệm không gian */
    header {
        padding: 0.8rem 3%;
    }

    /* 2. Thu nhỏ logo và chữ */
    .logo {
        font-size: 1.1rem; /* Giảm từ 1.5rem xuống 1.1rem */
        gap: 6px;         /* Thu hẹp khoảng cách ảnh và chữ */
    }

    .logo-img {
        height: 30px;     /* Giảm chiều cao ảnh logo từ 40px xuống 30px */
    }

    /* 3. Thu nhỏ nút Tư vấn ngay */
    .btn-zalo-top {
        padding: 0.5rem 0.8rem; /* Giảm độ dày của nút */
        font-size: 0.85rem;      /* Thu nhỏ cỡ chữ trong nút */
        white-space: nowrap;    /* Đảm bảo chữ trong nút không bao giờ bị xuống dòng */
    }
    
    /* 4. Ẩn icon Zalo nếu vẫn còn quá chật (tùy chọn) */
    .btn-zalo-top i {
        display: none; 
    }
}

/* Cho các màn hình cực nhỏ (iPhone 5/SE...) */
@media (max-width: 375px) {
    .logo {
        font-size: 1rem;
    }
    .btn-zalo-top {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
}

.partner-slider {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 3rem;
}
.partner-slider img {
    height: 70px;
    transition: 0.3s;
}
.partner-slider img:hover {
    transform: scale(1.1); /* Phóng to logo lên 10% để tạo điểm nhấn */
}


/* style của report */
:root {
  --primary: #4A6FDC;      /* Màu chủ đạo */
  --secondary: #64748B;    /* Màu xám xanh */
  --success: #10B981;
  --info: #3B82F6;
  --warning: #F59E0B;
  --danger: #EF4444;
  --light: #F3F4F6;        /* Màu nền sáng mới */
  --dark: #1E293B;         /* Màu chữ đậm hơn */
  --background: #F1F5F9;   /* Màu nền xám lạnh */
  --text: #334155;         /* Màu chữ xám đen */
  --border: #E2E8F0;       /* Viền nhạt */
  --card-bg: #FFFFFF;      /* Nền trắng tinh */
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'Inter', system-ui, sans-serif;
  background: var(--background);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.container {
  width: 95%;
  margin: 0 auto;
  padding: 20px;
}

.header {
  text-align: center;
  margin-bottom: 15px;
}

.header h1 {
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.header p {
  color: #666;
  font-size: 1rem;
}

.header-icon {
  width: 36px;
  height: 36px;
}

.nav-tabs {
  display: flex;
  justify-content: center;
  margin: 0 auto 15px auto;
  background: #FFFFFF;
  padding: 5px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  width: fit-content;
  border: 1px solid var(--border);
}

.nav-tab {
  padding: 8px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  color: #64748B;
  transition: all 0.2s ease;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  font-size: 14px;
}

.nav-tab:hover {
  color: var(--primary);
  background: #F8FAFC;
}

.nav-tab.active {
  background: var(--primary); /* Hoặc dùng gradient nếu thích */
  color: white;
  box-shadow: 0 2px 4px rgba(74, 111, 220, 0.2);
}

.nav-tab i {
  font-size: 16px;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* Buttons */
.btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 14px;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--secondary);
}

.btn-success {
  background: var(--success);
}

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

.btn-sm {
  padding: 4px 6px;
  font-size: 12px;
}

.btn i {
  font-size: 14px;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  transition: all 0.3s ease;
  font-size: 14px;
  color: var(--text);
}

.form-control::placeholder {
  color: #999;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(74, 111, 220, 0.2);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    align-items: center;
    justify-content: center;
}

/* Blur background khi login modal hiển thị */
body.login-blur .container {
    filter: blur(5px);
    pointer-events: none;
}

/* Login modal đặc biệt */
#login-modal {
    backdrop-filter: blur(10px);
}

#login-modal .modal-content {
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}


.modal-content {
    background: white;
    border-radius: 8px;
    padding: 24px;
    max-width: 650px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    color: var(--text);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    position: relative;
}

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

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

.modal-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
}

.close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close:hover {
  background: rgba(0,0,0,0.1);
  color: var(--danger);
}


.glass-card {
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  padding: 15px;
  border: 1px solid var(--border);
  margin-bottom: 15px;
  position: relative;
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  background: #F8FAFC;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
  width: 100%;
  overflow-x: auto;
}

.filter-controls .form-control,
.filter-controls .btn,
.toggle-columns-btn {
    height: 36px;
    margin-bottom: 0 !important;
    font-size: 13px;
    white-space: nowrap;
}

.search-input {
    flex: 1; 
    min-width: 150px;
}

.filter-select {
    flex: 0 0 auto;
    width: auto;
    min-width: 130px; 
}

/* Table styling */
.table-container {
  border-radius: 12px;
  border: 1px solid var(--border);
  width: 100%;
  overflow-x: auto;
  position: relative;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
  background: white;
}

.data-table th {
  background: #F1F5F9;
}

.data-table th, 
.data-table td {
  white-space: nowrap;
  padding: 4px 8px;
  border-bottom: 1px solid #F1F5F9;
  border-right: 1px solid #f0f0f0;
  vertical-align: middle;
}

.note-cell {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: help;
}

.data-table th:last-child,
.data-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 5;
  border-left: 1px solid #e2e8f0;
}

.data-table td:last-child {
  background-color: white;
}

.data-table th:last-child {
  background-color: #F1F5F9;
  z-index: 10;
}

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

.data-table tr:hover {
  background-color: #F8FAFC;
}

.data-table .actions {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}

.contact-info div {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 0.8;
}


.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  min-width: 110px; 
}

/* Care history */
.care-history {
  max-height: 400px;
  overflow-y: auto;
}

.care-entry {
  background: #f8f8f8;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.care-entry:hover {
  background: #f0f0f0;
}

.care-date {
  font-weight: 600;
  color: var(--primary);
}

.care-content {
  line-height: 1.5;
  color: var(--text);
}

.care-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #666;
}

/* Loading states */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  color: #666;
}

.data-table td.loading-cell {
  text-align: center;
  padding: 60px 20px;
}

.data-table .loading {
  margin: 0 auto;
  justify-content: center;
  min-height: auto;
}

.loading::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0,0,0,0.1);
  border-top: 2px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

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

/* Settings Page */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.settings-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}

.settings-card h3 {
  margin-bottom: 15px;
  font-size: 18px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-card h3 i {
  color: var(--primary);
}

.settings-list {
  margin-bottom: 15px;
}

.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

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

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-muted { color: #666; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.justify-content-end { justify-content: flex-end; }
.align-items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

/* Thêm các style cho nút không có nền */
.btn-no-bg {
  background: transparent;
  color: var(--primary);
  border: none;
  box-shadow: none;
}

.btn-no-bg.btn-secondary {
  background: transparent;
  color: var(--secondary);
}

.btn-no-bg.btn-success {
  background: transparent;
  color: var(--success);
}

.btn-no-bg.btn-danger {
  background: transparent;
  color: var(--danger);
}

.btn-no-bg:hover {
  background: rgba(0,0,0,0.05);
  transform: none;
}

/* Color picker styling */
.color-input-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-picker {
  width: 50px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  background: white;
  padding: 2px;
}

.color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
  border: none;
}

.color-picker::-webkit-color-swatch {
  border: none;
  border-radius: 2px;
}

.color-preview {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: inline-block;
  margin-right: 8px;
}

.color-text {
  font-family: monospace;
  font-size: 14px;
  color: #666;
}

/* Thêm vào cuối file CSS.html */
.customer-name-wrapper {
  position: relative;
  display: inline-block;
}

.care-count-badge {
  position: absolute;
  top: -14px;
  right: -14px;
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
  line-height: 1.2;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* 1-2 lần: Xanh lá */
.care-count-low {
  background: #10B981;
}

/* 3-5 lần: Cam */
.care-count-medium {
  background: #F59E0B;
}

/* 6+ lần: Đỏ */
.care-count-high {
  background: #EF4444;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--text);
  background: linear-gradient(90deg, rgba(74, 111, 220, 0.1) 0%, rgba(74, 111, 220, 0.05) 100%);
  padding: 4px 8px;
  border-radius: 4px;
  border-left: 3px solid var(--primary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.required-star {
  color: var(--danger);
  font-weight: bold;
}

.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
  padding: 15px;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.pagination-info {
  font-size: 14px;
  color: #666;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.items-per-page {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.items-per-page select {
  width: 80px;
  padding: 4px 8px;
  font-size: 14px;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 15px;
}

.page-info {
  font-size: 14px;
  color: #666;
  white-space: nowrap;
}

.pagination-buttons button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.today-filter {
  display: flex;
  align-items: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  gap: 2px;
  margin: 0;
}

.reports-grid {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.overview-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.overview-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  border: none;
  border-left: 5px solid var(--primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.3s ease;
}

.overview-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.card-icon {
  width: 54px;
  height: 54px;
  background: rgba(74, 111, 220, 0.1);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0; 
}

.charts-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
}

.chart-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
}

.chart-card h3 {
  margin: 0 0 20px 0;
  color: var(--text);
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-card h3 i {
  color: var(--primary);
}

.chart-card canvas {
  max-height: 250px;
  min-height: 200px;
  margin-bottom: 10px;
}

.chart-card .top-list {
  max-height: 250px;
  min-height: 200px;
  overflow-y: auto;
}

.performance-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 3px solid var(--primary);
}

.performance-metric .metric-name {
  font-weight: 600;
  color: var(--text);
}

.performance-metric .metric-value {
  font-weight: bold;
  color: var(--primary);
}

.top-list {
  max-height: 200px;
  overflow-y: auto;
}

.top-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  margin-bottom: 8px;
  background: #f8f9fa;
  border-radius: 8px;
}

.top-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-item-rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.top-item-count {
  background: var(--success);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}

.user-info-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.9);
  padding: 6px 12px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: 1px solid var(--border);
  font-size: 14px;
  width: fit-content;
}

#login-modal .d-flex {
  justify-content: center !important;
}

.required-star {
  color: var(--danger);
  font-weight: bold;
}

.manager-only {
  display: none;
}

.manager-user .manager-only {
  display: block;
}

body:not(.manager-user) .nav-tab[data-tab="settings"] {
  display: none !important;
}

.user-info-header .btn-secondary {
  background: #ef4444;
}

.user-info-header .btn-secondary:hover {
  background: #dc2626;
}

#closed-fields {
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 8px;
  padding: 15px;
  margin-top: 10px;
  position: relative;
}

#closed-fields::before {
  content: "Thông tin đơn hàng";
  position: absolute;
  top: -12px;
  left: 15px;
  background: white;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: #F59E0B;
}

#customer-order-value {
  text-align: right;
}

.settings-card .text-muted small {
  font-style: italic;
  display: block;
  margin-top: 2px;
}

.status-badge.status-closed {
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
  border: none;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.order-value-cell {
  text-align: right;
  font-weight: 600;
  color: #059669;
}

.source-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.source-cell i {
  color: #6366F1;
  opacity: 0.7;
}

.form-control:disabled {
  background-color: #f8f9fa;
  opacity: 0.8;
}

.form-control.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

.form-control.is-valid {
  border-color: #28a745;
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.closed-indicator {
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  display: inline-block;
  margin-left: 5px;
}

.table-order-value {
  color: #059669;
  font-weight: 600;
  text-align: right;
}

.table-order-value.has-value {
  background: rgba(16, 185, 129, 0.1);
  border-radius: 4px;
  padding: 4px 8px;
}

#source-modal .modal-content {
  max-width: 500px;
}

.settings-item .fa-share-alt {
  color: #6366F1;
  margin-right: 6px;
}

.hide-order-columns .order-column {
  display: none;
}

.toggle-columns-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #666;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  white-space: nowrap;
}

.toggle-columns-btn:hover {
  background: rgba(74, 111, 220, 0.1);
  color: var(--primary);
}

.toggle-columns-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.custom-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  min-width: 300px;
  border-left: 4px solid var(--success);
  animation: slideInRight 0.3s ease;
}

.custom-notification.error {
  border-left-color: var(--danger);
  background: #fef2f2;
}

.custom-notification.success {
  border-left-color: var(--success);
  background: #f0fdf4;
}

.custom-notification.info {
  border-left-color: var(--info);
  background: #eff6ff;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.care-needed-filter {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.care-needed-filter .checkbox-label {
  height: 36px;
  margin-bottom: 0;
  padding: 0 10px;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.care-needed-filter .checkbox-label:hover {
  background: rgba(74, 111, 220, 0.1);
  border-color: var(--primary);
}

.care-needed-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
}

.care-needed-filter .checkbox-label span {
  font-weight: 500;
  color: var(--text);
}

.reports-filter-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
  padding: 15px 0;
}

.date-range-filter {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.date-range-filter label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
}

.date-range-filter .form-control {
  width: 150px;
  margin-bottom: 0;
}

.reports-filter-controls .btn {
  height: fit-content;
  padding: 8px 16px;
}

.data-table td:nth-child(6) {
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-info-header .btn-secondary[style*="F59E0B"]:hover {
  background: #D97706 !important;
}

.status-tabs-wrapper {
  display: flex;
  gap: -15px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding: 10px 5px;
  border-bottom: 2px solid #eee;
  justify-content: center; /* Căn giữa */
}

.status-pipeline-tab {
  position: relative;
  padding: 12px 20px 12px 35px;
  background: #f8f9fa;
  color: #555;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none !important;
  border-radius: 0 !important;
  margin-right: -12px;
  z-index: 1;
  
  clip-path: polygon(
      0 0, 
      calc(100% - 15px) 0, 
      100% 50%, 
      calc(100% - 15px) 100%, 
      0 100%, 
      15px 50%
  );
}

.status-pipeline-tab:first-child {
  padding-left: 20px;
  clip-path: polygon(
      0 0, 
      calc(100% - 15px) 0, 
      100% 50%, 
      calc(100% - 15px) 100%, 
      0 100%
  );
  border-top-left-radius: 4px !important;
  border-bottom-left-radius: 4px !important;
}

.status-pipeline-tab:last-child {
  margin-right: 0;
  clip-path: polygon(
      0 0, 
      100% 0, 
      100% 100%, 
      0 100%, 
      15px 50%
  );
  border-top-right-radius: 4px !important;
  border-bottom-right-radius: 4px !important;
  padding-right: 20px;
}

.status-pipeline-tab:hover {
  z-index: 5;
  transform: translateX(3px);
}

.status-pipeline-tab.active {
  z-index: 10;
  color: white !important; 
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.status-count-badge {
  background: #ffffff !important;
  color: #333333 !important;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  margin-left: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  min-width: 22px;
  display: inline-block;
  text-align: center;
}

#customer-detail-modal .modal-content {
    max-width: 650px;
    padding: 0; /* Quan trọng: Xóa padding mặc định để Header dính sát mép */
    overflow-x: hidden;
}

/* 2. Header cố định (Sticky) */
.modal-detail-header {
    background: #fff; /* Nền trắng che nội dung khi cuộn */
    padding: 20px 25px 15px 25px; /* Padding bên trong header */
    border-bottom: 1px solid #eee;
    
    /* Sticky Magic */
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 6px -2px rgba(0,0,0,0.05); /* Bóng nhẹ khi cuộn */
}

.modal-detail-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-detail-stats {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.stat-item {
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 4px;
    border-left: 3px solid var(--primary);
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-label { font-size: 10px; color: #666; text-transform: uppercase; font-weight: 700; }
.stat-value { font-size: 13px; font-weight: 700; color: var(--dark); }

/* 3. Body nội dung có padding riêng */
.detail-stack {
    padding: 15px 25px 25px 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: var(--background);
}

.detail-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 15px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    width: 100%;
}

.detail-card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 4px;
}

/* Grid Thông tin liên hệ: Siêu gọn */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 20px; /* Giảm khoảng cách dòng xuống tối thiểu */
}

.contact-item {
    display: flex;
    align-items: center; /* Căn giữa theo chiều dọc */
    font-size: 13px;
    border-bottom: 1px dashed #f5f5f5;
    padding: 3px 0; /* Giảm padding trên dưới */
}

.contact-item.full-width { grid-column: span 2; }

.info-label {
    min-width: 85px;
    font-weight: 600;
    color: #888;
    font-size: 11px;
    text-transform: uppercase;
}

.info-value { color: #333; font-weight: 500; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Ghi chú: Fix hiển thị xuống dòng */
.note-content {
    background: #FFFBEB;
    padding: 8px;
    border-radius: 4px;
    font-size: 13px;
    color: #444;
    border: 1px dashed #FCD34D;
    white-space: pre-wrap; /* Giữ định dạng xuống dòng */
    line-height: 1.4;
}

/* Các thành phần khác giữ nguyên style gọn */
.timeline { position: relative; padding-left: 15px; border-left: 2px solid #e2e8f0; margin-top: 5px; }
.timeline-item { position: relative; margin-bottom: 12px; }
.timeline-dot { position: absolute; left: -21px; top: 3px; width: 10px; height: 10px; background: var(--primary); border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #e2e8f0; }
.timeline-header { font-size: 11px; color: #888; margin-bottom: 2px; display: flex; align-items: center; gap: 5px; }
.timeline-content-compact { background: #f9fafb; padding: 6px 10px; border-radius: 4px; font-size: 12.5px; border: 1px solid #eee; display: flex; justify-content: space-between; align-items: flex-start; }

.bg-warning { background-color: #F59E0B !important; }
.bg-success { background-color: #10B981 !important; }
.bg-danger { background-color: #EF4444 !important; }
.bg-secondary { background-color: #64748B !important; }

/* Thêm vào cuối file CSS */
.reminder-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.2s;
    border-left: 4px solid #ddd;
}
.reminder-card:hover { transform: translateY(-2px); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }

.reminder-card.priority-High { border-left-color: #EF4444; }
.reminder-card.priority-Normal { border-left-color: #10B981; }
.reminder-card.status-done { opacity: 0.6; background: #f9fafb; text-decoration: line-through; }

.remind-meta { font-size: 12px; color: #888; margin-top: 5px; display: flex; gap: 10px; align-items: center; }
.remind-tag { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-weight: 600; font-size: 10px; }

.assign-options { display: flex; gap: 20px; margin-bottom: 5px; }
.staff-check-item { display: flex; align-items: center; gap: 5px; margin-bottom: 5px; font-size: 13px; }

.tab-notification-badge {
    background-color: #EF4444; /* Màu đỏ */
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    transition: all 0.3s ease;
}

.remind-tab-btn {
  padding: 5px 15px;
  border: 1px solid #E2E8F0;
  background: white;
  color: #64748B;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 5px;
}

.remind-tab-btn:hover {
  background: #F1F5F9;
}

.remind-tab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 4px rgba(74, 111, 220, 0.2);
}

.form-group label.staff-check-item {
    background: #fffaf3;
    border-left-color: #ffdeba;
    text-transform: none;
    margin-bottom: 4px;
}
.login-toggle-container {
    display: flex;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
    position: relative;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
}

.btn-toggle {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px;
    font-weight: 600;
    font-size: 14px;
    color: #64748b;
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
}

.btn-toggle.active {
    color: #fff;
}

/* Hiệu ứng mảng màu trượt bên dưới */
.login-toggle-bg {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: #3b82f6; /* Màu xanh chủ đạo */
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

/* Di chuyển mảng màu khi chọn Phụ huynh */
.is-parent .login-toggle-bg {
    left: 50%;
}

/* Layout chung cho Carousel */
 .carousel-container {
    width: 100%;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.carousel-slide {
    display: flex;
    transition: transform 0.8s ease-in-out;
}

/* 📱 Mobile: Hiện 1 slide */
.slide-item {
    min-width: 100%; 
    position: relative;
    box-sizing: border-box;
    padding: 5px; /* Khoảng cách giữa các slide */
}

/* 💻 Desktop: Hiện 2 slide */
@media (min-width: 768px) {
    .slide-item {
        min-width: 50%; /* Chia đôi màn hình */
    }
}

/* Khung chứa ảnh để làm hiệu ứng Blur */
.image-wrapper {
    position: relative;
    width: 100%;
    height: 450px; /* Đã tăng độ cao lên 450px */
    overflow: hidden;
    background-color: #000;
    border-radius: 10px;
}

/* Lớp ảnh nền mờ (phủ kín khung) */
.img-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(20px);
    opacity: 0.5; /* Độ trong suốt của nền mờ */
    transform: scale(1.1); /* Phóng to nhẹ để không lộ viền trắng */
}

/* Lớp ảnh chính (giữ nguyên tỷ lệ, không bị mất chi tiết) */
.img-main {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain; /* QUAN TRỌNG: Giúp ảnh không bị crop */
}

.slide-caption {
    position: absolute;
    bottom: 25px;
    left: 25px;
    right: 25px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-family: sans-serif;
    font-size: 14px;
    z-index: 2;
}
/* Tối ưu bộ lọc báo cáo trên Mobile */
@media (max-width: 768px) {
    .reports-filter-controls {
        flex-direction: column; /* Chuyển thành hàng dọc */
        align-items: stretch;    /* Cho phép các phần tử con giãn hết chiều ngang */
        gap: 12px;
        padding: 10px;
    }

    .date-range-filter {
        flex-direction: row;     /* Giữ label và input nằm cùng hàng hoặc chuyển column tùy bạn */
        justify-content: space-between;
        width: 100%;
    }

    .date-range-filter label {
        min-width: 80px;         /* Cố định độ rộng label để các ô input thẳng hàng */
    }

    .date-range-filter .form-control {
        width: 100% !important;  /* Ghi đè lại width 150px để giãn theo màn hình */
        flex: 1;
    }

    .reports-filter-controls .btn {
        width: 100%;             /* Nút Reset giãn hết chiều ngang cho dễ bấm */
        justify-content: center;
        margin-top: 5px;
    }

}

