/* Giới hạn chiều rộng container trên màn hình lớn, căn giữa */
@media (min-width: 992px) {
  .container {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }
}
body {
  font-family: 'Roboto', Arial, sans-serif;
  background: #fafbfc;
  margin: 0;
  padding: 0;
}
.custom-card {
  border-radius: 18px;
  border: 1px solid #e6e6e6;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  height: 200px; /* Fixed height for all cards */
}
.custom-card .card-body {display:flex; flex-direction:column; padding:12px 14px 10px 14px;}
.custom-card .card-title {
  font-weight: 700;
  font-size: 1.08rem;
  color: #222;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  line-height: 1.15;
}
.custom-card .card-content {
  font-size: 1rem;
  color: #444;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
  padding-right: 8px;
  max-height: calc(200px - 46px - 24px - 4px); /* 4px gap */
  scrollbar-gutter: stable both-edges;
}
.custom-card .card-content.small {
  font-size: 0.97rem;
}

/* Scrollbar styling for card content */
.custom-card .card-content::-webkit-scrollbar {
  width: 4px;
}

.custom-card .card-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 2px;
}

.custom-card .card-content::-webkit-scrollbar-thumb {
  background: gray; /* Changed color to gray */
  border-radius: 2px;
}

.custom-card .card-content::-webkit-scrollbar-thumb:hover {
  background: darkgray; /* Adjusted hover color to a darker gray */
}

/* Clickable items in cards */
.card-clickable-item {
  cursor: pointer;
  transition: background-color 0.2s, padding 0.1s;
  border-radius: 6px;
  margin: 1px 0;
  padding: 4px 6px;
}

.card-clickable-item:hover {
  background-color: rgba(166, 206, 57, 0.1);
  padding-left: 10px;
}
.highlight {
  color: #A6CE39;
  font-weight: 700;
}
.link {
  color: inherit; /* use normal card text color, not green */
  text-decoration: none;
  cursor: pointer;
}
.link:hover {
  color: #444; /* subtle hover color */
}

/* Hành chính nhân sự bullet styling */
.hcns-item {
  line-height: 1.4;
  font-size: 0.95rem;
}
.link:hover {
  text-decoration: underline;
}
.red {
  color: #e74c3c;
}
.progress-bar {
  background: #f0f0f0;
  border-radius: 6px;
  height: 8px;
  margin: 8px 0 10px 0;
  overflow: hidden;
  position: relative;
  display: block;
  width: 100%;
}
.progress {
  background: #A6CE39;
  border-radius: 6px 0 0 6px;
  height: 100%;
  transition: width 0.3s ease;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  min-width: 1px;
}

/* Resource progress (Bootstrap based) */
.resource-progress {height:8px; background:#f0f0f0; border-radius:6px; overflow:hidden;}
.resource-progress .progress-bar {background:#A6CE39;}
/* Remove old custom bar (kept for reference - can delete later) */
/* .storage-bar, .storage-bar-fill { display:none !important; } */

/* Override Bootstrap .text-success to custom green */
.text-success {
  color: #A6CE39 !important;
}
.clean-btn {
  background: #f5f5f5;
  border: none;
  border-radius: 8px;
  padding: 7px 0;
  width: 100%;
  color: #444;
  font-weight: 500;
  font-size: 1rem;
  margin-top: 4px;
  cursor: pointer;
  transition: background 0.2s;
}
.clean-btn:hover {
  background: #e6e6e6;
}
@media (max-width: 600px) {
  .custom-card .card-title {
    font-size: 1rem;
  }
  .custom-card .card-content {
    font-size: 0.97rem;
  }
  .chip { font-size: 0.78rem; padding: 8px 8px; }
}

/* Filter Modal Styles */
.filter-modal-content {
  border-radius: 18px;
  border: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  max-width: 380px;
}

.filter-modal-header {
  background: white;
  border-bottom: none;
  border-radius: 18px 18px 0 0;
  padding: 0;
  display: none; /* Hide default header */
}

.filter-tabs {
  display: flex;
  background: #f8f9fa;
  border-radius: 18px 18px 0 0;
  margin: 0;
  padding: 0;
  align-items: stretch;
}

.filter-tab {
  flex: 1 1 0; /* equal width */
  padding: 12px 10px;
  background: none;
  border: none;
  font-size: 0.84rem;
  color: #888;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  font-weight: 400;
  text-align: center;
  white-space: nowrap; /* keep text on one line */
}

/* vertical separators between tabs */
.filter-tab + .filter-tab::before {
  content: "";
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 1px;
  background: #e5e7eb;
}

.filter-tab:first-child {
  border-radius: 18px 0 0 0;
}

.filter-tab:last-child {
  border-radius: 0 18px 0 0;
}

.filter-tab.active {
  color: #fff !important;
  background: #A6CE39 !important;
  font-weight: 600;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  padding: 12px 10px; /* match base padding to prevent reflow */
}

.filter-tab.active:hover {
  color: #fff;
  background: #95b832; /* slightly darker on hover */
}

.filter-tab:hover:not(.active) {
  background: #f0f0f0;
  color: #666;
}

.tab-content {
  padding: 20px;
  background: white;
  border-radius: 0 0 18px 18px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.form-label {
  font-weight: 400;
  color: #666;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.form-control {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 0.85rem;
  color: #333;
  background: #f8f9fa;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: #A6CE39;
  box-shadow: none;
  background: white;
}

.input-group-text {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-left: none;
  border-radius: 0 8px 8px 0;
  color: #A6CE39;
  padding: 12px 15px;
}

.filter-apply-btn {
  background: #A6CE39;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-weight: 500;
  font-size: 0.9rem;
  color: white;
  width: 100%;
  margin-top: 10px;
}

.filter-apply-btn:hover {
  background: #95b832;
}

.form-check {
  margin-bottom: 12px;
}

.form-check-input {
  margin-top: 0.2rem;
}

.form-check-input:checked {
  background-color: transparent !important; /* no fill */
  border-color: #000 !important;           /* black border */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M12.97 4.97a.75.75 0 0 1 0 1.06l-4.99 4.99a.75.75 0 0 1-1.06 0L3.03 8.13a.75.75 0 1 1 1.06-1.06l2.35 2.35 4.46-4.45a.75.75 0 0 1 1.06 0z'/%3E%3C/svg%3E") !important;
  background-position: center;
  background-size: 80% 80%;
  background-repeat: no-repeat;
}

.form-check-input:focus {
  border-color: #000;
  box-shadow: 0 0 0 0.25rem rgba(0,0,0,0.15);
}

.form-check-label {
  font-size: 0.85rem;
  color: #666;
  font-weight: 400;
}

.priority-options {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
}

/* inline priority row */
.priority-inline { 
  display: grid; 
  grid-template-columns: 1fr 1fr 1fr; 
  align-items: center; 
  gap: 12px; 
}

/* chips group (quick range) */
.chip-group {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap; /* stay on one line */
  overflow-x: hidden; /* no scroll */
  padding-bottom: 2px;
}

.chip {
  border: 1px solid #e0e0e0;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.82rem;
  color: #555;
  cursor: pointer;
  text-align: center;
  flex: 1 1 0; /* distribute equally */
}

.chip.active {
  background: #A6CE39;
  border-color: #A6CE39;
  color: #fff;
  box-shadow: none;
}

.chip:hover { filter: brightness(0.98); }
.chip.active:hover { background: #95b832; }
.chip:focus-visible { outline: 2px solid #A6CE39; outline-offset: 2px; }

.chip-primary {
  background: #A6CE39;
  color: #fff;
  border-color: #A6CE39;
}

/* underline inputs with icon */
.underline-input {
  position: relative;
  display: flex;
  align-items: center;
}

.underline-input input {
  width: 100%;
  border: none;
  border-bottom: 2px solid #e5e7eb; /* light gray */
  padding: 8px 32px 8px 0;
  outline: none;
  background: transparent;
  color: #333;
  font-size: 0.9rem;
}

.underline-input input:focus {
  border-bottom-color: #A6CE39;
}

.underline-input i {
  position: absolute;
  right: 0;
  color: #A6CE39;
  cursor: pointer;
}

/* placeholder subtle color */
.underline-input input::placeholder {
  color: #9ca3af; /* gray-400 */
}

/* the native date input is hidden, we show the display text input */
.underline-input .hidden-date {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none; /* prevent double focus */
}

/* hide native datepicker icon (Chrome/Edge) so only our green icon shows */
.underline-input input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  display: none;
}

/* Dropdown style input for date fields */
.date-input-wrapper {
  position: relative;
}

.date-input-wrapper select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
}

/* Make card icons clickable */
.card-title i.text-success {
  cursor: pointer;
  transition: all 0.2s;
  padding: 6px;
  border-radius: 6px;
  margin-left: 8px;
}

.card-title i.text-success:hover {
  background: rgba(166, 206, 57, 0.15);
  transform: scale(1.1);
}

/* Modal position: slightly upper than center */
.filter-modal-dialog {
  display: flex;
  align-items: flex-start;
  min-height: calc(100% - 1rem);
  margin-top: 6vh;
}

/* Close button styling */
.btn-close {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 10;
  background: none;
  border: none;
  font-size: 1.2rem;
  opacity: 0.5;
}

.btn-close:hover {
  opacity: 0.8;
}

/* Report card styling */
.report-category {
  margin-bottom: 0.75rem;
}

.report-title {
  font-weight: 700 !important;
  color: #A6CE39 !important;
  font-size: 0.95rem;
  line-height: 1.3;
  margin-bottom: 0.25rem !important;
}

.report-title a {
  color: #A6CE39 !important;
  text-decoration: none !important;
  font-weight: 700;
}

.report-title a:hover {
  color: #8bb332 !important;
  text-decoration: underline !important;
}

.report-items {
  padding-left: 0.5rem;
}

.report-item {
  font-size: 0.85rem !important;
  color: #666 !important;
  line-height: 1.4;
  margin-bottom: 0.15rem;
}

.report-item:last-child {
  margin-bottom: 0;
}
