/* ========== SIDEBAR STYLING ========== */

/* Sidebar submenu styling */
.sidebar-menu .sidebar-submenu ul>li {
  position: relative;
  padding-left: 20px;
}

.sidebar-menu .sidebar-submenu ul>li::before {
  content: "•";
  position: absolute;
  left: 40px;
  top: 45%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 14px;
  font-weight: normal;
  letter-spacing: -2px;
}

/* Hover effect for submenu items */
.sidebar-menu .sidebar-submenu ul>li:hover::before {
  color: #4267cd;
}

/* Active state for submenu items */
.sidebar-menu .sidebar-submenu ul>li.active::before {
  color: #4267cd;
  font-weight: bold;
}

/* Nested submenu styling (if you have deeper nesting) */
.sidebar-menu .sidebar-submenu .sidebar-submenu ul>li::before {
  content: "◦";
  color: #adb5bd;
  font-size: 14px;
}

/* Dashboard Styles */
.page-header .page-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
}

.page-header p {
  margin: 0.5rem 0 0 0;
  opacity: 0.9;
}

/* Icon font-size utilities (dùng class thay cho inline style) */
.icon-fs-1 { font-size: 1rem; }
.icon-fs-sm { font-size: 0.9rem; }

/* Stats Tiles */
.dashboard-stat-row .col-xxl-6 .card {
  height: 100%;
}

.dashboard-stat-row .stats-tile {
  min-height: 120px;
}

.stats-tile {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stats-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.sale-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  flex-shrink: 0;
}

/* Mobile responsive styling */
@media (max-width: 768px) {
  .sale-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

.sale-details h3 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.sale-details p {
  margin: 0.25rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: #6c757d;
}

.sale-details small {
  font-size: 0.875rem;
  color: #adb5bd;
}

/* Text Colors for Statistics */
.text-blue {
  color: #667eea !important;
}

.text-green {
  color: #11998e !important;
}

.text-yellow {
  color: #f093fb !important;
}

.text-red {
  color: #fcb69f !important;
}

.text-purple {
  color: #667eea !important;
}

.text-orange {
  color: #f093fb !important;
}

/* Sale Icon Border Styles */
.sale-icon-bdr {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  flex-shrink: 0;
  border: 3px solid;
}

/* Mobile responsive styling for bordered icons */
@media (max-width: 768px) {
  .sale-icon-bdr {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    border: 2px solid;
  }
}

/* Sale Graph Styles */
.sale-graph {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.mini-chart {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* Growth Text Styles */
.growth {
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0.25rem 0 0 0;
}

.growth.text-green {
  color: #11998e !important;
}

.growth.text-blue {
  color: #667eea !important;
}

.growth.text-warning {
  color: #f093fb !important;
}

.growth.text-info {
  color: #17a2b8 !important;
}

.growth.text-danger {
  color: #dc3545 !important;
}

.growth.text-primary {
  color: #007bff !important;
}

.growth.text-success {
  color: #28a745 !important;
}

/* Activity Timeline */
.activity-timeline {
  position: relative;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #e9ecef;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  flex-shrink: 0;
}

.activity-content h6 {
  margin: 0 0 0.25rem 0;
  font-weight: 600;
  color: #495057;
}

.activity-content p {
  margin: 0 0 0.5rem 0;
  color: #6c757d;
  font-size: 0.875rem;
}

.activity-content small {
  color: #adb5bd;
  font-size: 0.75rem;
}

/* Quick Actions */
.btn-outline-primary:hover,
.btn-outline-success:hover,
.btn-outline-info:hover,
.btn-outline-warning:hover {
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

/* Graph Controls */
.graph-day-selection {
  margin-bottom: 1rem;
}

.graph-day-selection .btn {
  border: 1px solid #dee2e6;
  background: white;
  color: #6c757d;
  padding: 0.5rem 1rem;
  margin-right: 0.5rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.graph-day-selection .btn:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
}

.graph-day-selection .btn.active {
  background: #4267cd;
  border-color: #4267cd;
  color: white;
}

/* Reports Summary */
.reports-summary {
  padding: 1rem;
}

.reports-summary-block {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 0.5rem;
}

.reports-summary-block i {
  font-size: 1.25rem;
  margin-right: 0.75rem;
}

.reports-summary-block h6 {
  margin: 0;
  font-size: 0.875rem;
  color: #6c757d;
  font-weight: 500;
}

.reports-summary-block h5 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #495057;
}

.download-reports {
  width: 100%;
  margin-top: 1rem;
}

/* Alerts */
.alert {
  border: none;
  border-radius: 0.5rem;
  padding: 1rem;
}

.alert-warning {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  color: #856404;
}

.alert-danger {
  background: linear-gradient(135deg, #f8d7da 0%, #fab1a0 100%);
  color: #721c24;
}

.alert-info {
  background: linear-gradient(135deg, #d1ecf1 0%, #81ecec 100%);
  color: #0c5460;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .stats-tile {
    margin-bottom: 1rem;
  }

  .sale-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }

  .sale-details h3 {
    font-size: 1.5rem;
  }

  .page-header {
    padding: 1.5rem 1.5rem
  }

  .page-header .page-title {
    font-size: 1.5rem;
  }
}

/* Chart containers */
#revenueGraph,
#occupancyGraph {
  min-height: 300px;
}

.auto-align-graph {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Enhanced card styling */
.card {
  border: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 1px solid #dee2e6;
  border-radius: 1rem 1rem 0 0 !important;
  padding: 1rem 1.5rem;
}

.card-title {
  margin: 0;
  font-weight: 600;
  color: #495057;
}

/* Progress bars */
.progress {
  border-radius: 0.5rem;
  background: #e9ecef;
}

.progress-bar {
  border-radius: 0.5rem;
}

/* Badges */
.badge {
  font-size: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
}

/* Avatar styles */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #eee;
  font-weight: 600;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 0.875rem;
}

.avatar-xs {
  width: 24px;
  height: 24px;
  font-size: 0.75rem;
}

.avatar-text {
  color: #4267cd;
}

/* Enhanced table styling */
.table {
  border-radius: 0.5rem;
  overflow: hidden;
}

.table th {
  border-top: none;
  background: #f8f9fa;
  font-weight: 600;
  color: #495057;
}

.table td {
  vertical-align: middle;
}

/* Pagination enhancement */
.pagination .page-link {
  border: 1px solid #dee2e6;
  color: #4267cd;
  border-radius: 0.375rem;
  margin: 0 0.125rem;
}

.pagination .page-link:hover {
  background: #4267cd;
  border-color: #4267cd;
  color: white;
}

.pagination .page-item.active .page-link {
  background: #4267cd;
  border-color: #4267cd;
  color: #fff;
}

/* Button enhancements */
.btn {
  border-radius: 0.5rem;
  font-weight: 500;
}

.btn-primary {
  background: linear-gradient(135deg, #4267cd 0%, #5a6fd8 100%);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3a5bb8 0%, #4f5fc7 100%);
}

/* Form enhancements */
.form-control,
.form-select {
  border-radius: 0.5rem;
  border: 1px solid #dee2e6;
}

.form-control:focus,
.form-select:focus {
  border-color: #4267cd;
  box-shadow: 0 0 0 0.2rem rgba(66, 103, 205, 0.25);
}

/* Loading states */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Animation classes */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hover effects */
.hover-lift {
  transition: transform 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.alert ul {
  list-style-type: disc;
  font-size: 12px;
  margin: 0 15px;
  line-height: 24px;
}

.btn-group .btn {
  padding: .2rem .75rem;
}


.floor-container {
  margin-bottom: 2rem;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  overflow: hidden;
}

.floor-header {
  background-color: #f8f9fa;
  padding: 0.75rem 1rem;
  font-weight: 600;
  border-bottom: 1px solid #dee2e6;
}

.room-card {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  margin: 10px 10px 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.room-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.diagram-status-filter {
  cursor: pointer !important;
  user-select: none;
}

.diagram-status-clear {
  white-space: nowrap;
  flex-shrink: 0;
}

.diagram-header-right {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.diagram-building-title {
  min-width: 0;
  max-width: 50%;
}

.diagram-quick-search-wrap {
  width: 180px;
  min-width: 140px;
}

.diagram-search-highlight {
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.6);
  animation: diagram-highlight-pulse 1.5s ease-out;
}

@keyframes diagram-highlight-pulse {
  0% { box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.8); }
  100% { box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.4); }
}

/* Diagram: lọc theo tầng, màu trống/đầy */
.diagram-floor-filters {
  border-radius: 8px;
  padding: 0.5rem 0;
}
.diagram-floor-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 70px;
  max-width: 100px;
  padding: 0.4rem 0.6rem;
  border: 1px solid #dc3545;
  border-radius: 8px;
  background-color: #fff5f5;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.diagram-floor-chip:hover {
  background-color: #ffe5e8;
  border-color: #c82333;
}
.diagram-floor-chip.active {
  background-color: #dc3545;
  border-color: #bd2130;
  color: #fff;
  box-shadow: 0 2px 6px rgba(220, 53, 69, 0.35);
}
.diagram-floor-chip-label {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.diagram-floor-chip-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: #dee2e6;
}
.diagram-floor-bar-available {
  background: #0dcaf0;
  min-width: 0;
}
.diagram-floor-bar-occupied {
  background: #dc3545;
  min-width: 0;
}
.diagram-floor-chip.active .diagram-floor-bar-available {
  background: rgba(255,255,255,0.9);
}
.diagram-floor-chip.active .diagram-floor-bar-occupied {
  background: rgba(255,255,255,0.6);
}

.room-header {
  padding: 12px 15px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  font-weight: 600;
  font-size: 14px;
}

.room-body {
  padding: 15px;
  background-color: #fff;
}

.room-details {
  padding: 0.5rem 0;
}

.room-details .row {
  margin: 0;
}

.room-details .col-6,
.room-details .col-12 {
  padding: 0.25rem;
}

.room-details .small {
  font-size: 0.85rem;
}

.room-details i {
  font-size: 0.8rem;
  margin-right: 0.25rem;
}

.bed-item {
  display: flex;
  align-items: center;
  font-size: .8rem;
  margin-bottom: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  background-color: #f8f9fa;
}

.bed-item.available {
  background-color: #d1e7dd;
}

.bed-item.occupied {
  background-color: #f8d7da;
}

.bed-item.maintenance {
  background-color: #fff3cd;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.status-available {
  background-color: #28a745;
}

.status-deposit {
  background-color: #ffc107;
}

.status-occupied {
  background-color: #dc3545;
}

.status-soon-available {
  background-color: #17a2b8;
}

.status-maintenance {
  background-color: #6c757d;
}

.status-unknown {
  background-color: #e9ecef;
}

/* Room header colors based on status */
.room-header.available {
  background-color: #d4edda;
  color: #155724;
  border-left: 4px solid #28a745;
}

.room-header.deposit {
  background-color: #fff3cd;
  color: #856404;
  border-left: 4px solid #ffc107;
}

.room-header.occupied {
  background-color: #f8d7da;
  color: #721c24;
  border-left: 4px solid #dc3545;
}

.room-header.soon-available {
  background-color: #d1ecf1;
  color: #0c5460;
  border-left: 4px solid #17a2b8;
}

.room-header.maintenance {
  background-color: #e2e3e5;
  color: #383d41;
  border-left: 4px solid #6c757d;
}

.room-header.unknown {
  background-color: #f8f9fa;
  color: #6c757d;
  border-left: 4px solid #e9ecef;
}

.room-footer {
  padding: 0.5rem 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  background-color: #f8f9fa;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 0.25rem;
}

.room-footer-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.25rem;
  border: none;
  background: transparent;
  color: #6c757d;
  font-size: 0.75rem;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: all 0.2s;
  text-decoration: none;
}

.room-footer-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: #495057;
}

.room-footer-btn i {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.room-footer-btn span {
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
  font-size: 0px !important;
  height: 36px;
}

/* ========== PAGE: LOGIN (Layout = null) ========== */
.page-login {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.page-login .login-container {
  background: white;
  border-radius: 15px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: 100%;
  max-width: 400px;
}

.page-login .login-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem;
  text-align: center;
}

.page-login .login-body {
  padding: 2rem;
}

.page-login .login-body .form-control {
  border: none;
  border-bottom: 2px solid #e9ecef;
  border-radius: 0;
  padding: 0.75rem 0;
  background: transparent;
}

.page-login .login-body .form-control:focus {
  border-bottom-color: #667eea;
  box-shadow: none;
  background: transparent;
}

.page-login .btn-login {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 25px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.page-login .btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.page-login .input-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.page-login .input-group i {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  color: #6c757d;
}

.page-login .input-group .form-control {
  padding-left: 2rem;
}

.page-login .alert {
  border-radius: 10px;
  border: none;
}

/* ========== REPORT PAGES - LAYOUT & TABLES (scope: .report-page) ========== */
.report-page.container-fluid,
.report-page .container-fluid {
  max-width: 100%;
  overflow-x: hidden;
}

.report-page .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.report-page .table {
  width: 100%;
  margin-bottom: 0;
  table-layout: auto;
}

.report-page .table th,
.report-page .table td {
  white-space: nowrap;
  vertical-align: middle;
}

.report-page .table th:first-child,
.report-page .table td:first-child {
  white-space: normal;
}

@media (max-width: 768px) {

  .report-page .table th,
  .report-page .table td {
    white-space: normal;
    font-size: 0.875rem;
    padding: 0.5rem;
  }
}

.report-page .card {
  margin-bottom: 1.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.report-page .row>[class*="col-"] {
  padding-left: 15px;
  padding-right: 15px;
}

.report-page .avatar-sm {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
}

.report-page .progress {
  height: 6px;
}

.report-page .badge {
  font-weight: 500;
  padding: 0.35em 0.65em;
}

.report-page .card-header {
  font-weight: 600;
}

/* ========== REPORT PAGES - PRINT ========== */
@media print {

  .no-print,
  .dataTables_length,
  .dataTables_filter,
  .dt-buttons,
  .pagination {
    display: none !important;
  }

  body {
    font-size: 11pt;
  }

  .card {
    border: none;
    box-shadow: none !important;
    page-break-inside: avoid;
  }

  .table {
    font-size: 10pt;
  }

  .row {
    display: block;
  }

  .col-md-6 {
    width: 100%;
    margin-bottom: 20px;
  }

  .badge {
    border: 1px solid #000;
    color: #000 !important;
    background-color: transparent !important;
  }

  .text-success {
    color: #000 !important;
  }

  .text-danger {
    color: #000 !important;
    text-decoration: line-through;
  }

  #paymentChart,
  #depositChart,
  #excessMoneyChart,
  #revenueChart,
  #expenseChart,
  #taskTypeChart,
  #completionTrendChart,
  #taskTrendChart,
  #statusChart,
  #priorityChart {
    max-height: 250px !important;
  }
}

/* ========== CUSTOMERS INDEX - AVATAR & THUMBNAILS ========== */
.customer-avatar {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
}

.customer-avatar-placeholder {
  width: 40px;
  height: 40px;
  background-color: #343a40;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
}

.cccd-thumbnail {
  width: 60px;
  height: 40px;
  object-fit: cover;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cccd-thumbnail:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 10;
  position: relative;
}

.cccd-thumbnail-placeholder {
  width: 60px;
  height: 40px;
  background-color: #f8f9fa;
  border: 1px dashed #dee2e6;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-size: 12px;
}

#imageModal .modal-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ========== CONTRACTS INDEX - STATS TILE (compact, only on this page) ========== */
.page-contracts .stats-tile {
  padding: 0.75rem !important;
}

.page-contracts .sale-icon {
  width: 3.5rem !important;
  height: 3.5rem !important;
  font-size: 1rem !important;
  padding: 0.5rem !important;
}

.page-contracts .sale-details {
  padding-left: 0.5rem !important;
}

.page-contracts .sale-details h6 {
  font-size: 0.9rem !important;
  margin-bottom: 0.25rem !important;
  line-height: 1.2 !important;
}

.page-contracts .sale-details p {
  font-size: 0.75rem !important;
  margin-bottom: 0 !important;
}

/* ========== CUSTOMERS FORM - IMAGE UPLOAD ========== */
.image-upload-placeholder {
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.image-upload-placeholder:hover {
  border-color: #007bff;
  background-color: #f8f9fa;
}

.image-upload-placeholder img {
  border-radius: 4px;
}

/* ========== IMPORT PAGES - SCROLL AREA ========== */
.max-height-300 {
  max-height: 300px;
}

.overflow-auto {
  overflow-y: auto;
}

/* ========== CALENDAR - LEGEND ========== */
.legend-status {
  width: 20px;
  height: 20px;
  border-radius: 3px;
}

.legend-priority {
  width: 20px;
  height: 20px;
  border-radius: 3px;
}

/* ========== DOCUMENTS DETAILS ========== */
.document-content {
  max-height: 600px;
  overflow-y: auto;
}

.document-content img {
  max-width: 100%;
  height: auto;
}

.document-content table {
  width: 100%;
  border-collapse: collapse;
}

.document-content table,
.document-content th,
.document-content td {
  border: 1px solid #dee2e6;
}

.document-content th,
.document-content td {
  padding: 8px;
  text-align: left;
}

/* Documents Details page */
.document-detail-page .page-title {
  font-size: 1.5rem;
  font-weight: 600;
}

.document-detail-title {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.3;
}

.document-detail-meta .badge {
  font-weight: 500;
}

.document-detail-meta code {
  font-size: 0.85em;
  background: rgba(0, 0, 0, 0.06);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.document-detail-desc {
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 72ch;
}

.document-detail-content {
  max-height: 560px;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.6;
}

.document-detail-content img {
  max-width: 100%;
  height: auto;
}

.document-detail-content table {
  width: 100%;
  border-collapse: collapse;
}

.document-detail-content table,
.document-detail-content th,
.document-detail-content td {
  border: 1px solid #dee2e6;
}

.document-detail-content th,
.document-detail-content td {
  padding: 8px 10px;
  text-align: left;
}

.document-detail-page .tracking {
  letter-spacing: 0.04em;
}

.document-detail-codes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.document-code-tag {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  padding: 0.5rem 0.75rem;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.document-code-tag:hover {
  border-color: #cbd5e0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.document-code-placeholder {
  color: #0d6efd;
  font-weight: 500;
  background: rgba(13, 110, 253, 0.08);
  padding: 0.2em 0.45em;
  border-radius: 4px;
}

.document-code-desc {
  color: #6c757d;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Documents: Mã (Codes) panel – chọn mã rồi chèn */
.doc-codes-panel .doc-code-item {
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.doc-codes-panel .doc-code-item:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.doc-codes-panel .doc-code-item:last-child {
  border-bottom: none !important;
}

.doc-codes-panel .line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.doc-codes-panel .doc-codes-list .doc-code-item.border-primary {
  border-left-width: 3px !important;
}

/* ========== DASHBOARD – (alert notice) ========== */
.alert-notice {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid;
}

.alert-notice-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
}

.alert-notice-warning {
  background-color: rgba(255, 193, 7, 0.12);
  border-color: rgba(255, 193, 7, 0.5);
}

.alert-notice-warning .alert-notice-icon {
  background-color: rgba(255, 193, 7, 0.25);
  color: #856404;
}

.alert-notice-danger {
  background-color: rgba(220, 53, 69, 0.08);
  border-color: rgba(220, 53, 69, 0.4);
}

.alert-notice-danger .alert-notice-icon {
  background-color: rgba(220, 53, 69, 0.2);
  color: #721c24;
}

.alert-notice-info {
  background-color: rgba(13, 202, 240, 0.1);
  border-color: rgba(13, 202, 240, 0.4);
}

.alert-notice-info .alert-notice-icon {
  background-color: rgba(13, 202, 240, 0.25);
  color: #055160;
}

.alert-notice-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: inherit;
}

.alert-notice-summary {
  font-size: 0.875rem;
  color: var(--bs-secondary-color);
}

.alert-notice-list {
  list-style: none;
  padding-left: 0;
  font-size: 0.8125rem;
}

.alert-notice-list li {
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.alert-notice-list li:last-child {
  border-bottom: none;
}

/* Danh sách chỉ số công tơ: hover nhẹ, tránh nền xám đậm gây cảm giác double icon */
.meter-readings-table tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}