/* ============================================
   MODERN DASHBOARD THEME
   ============================================ */

/* --- Global Refinements --- */
body {
  font-family: 'Poppins', sans-serif;
  background-color: #f0f2f5;
  color: #333;
}

/* --- Icon Badge --- */
.icon-button__badge {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 20px;
  height: 20px;
  background: rgb(253, 61, 61);
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  font-size: 10px;
}

/* --- Text Truncation  --- */
.wrap-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wrap-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Image Upload --- */
.imagePreview {
  width: 100%;
  height: 180px;
  background-position: center center;
  background: url(http://cliquecities.com/assets/no-image-e3699ae23f866f6cbdf8ba2443ee5c4e.jpg);
  background-color: #fff;
  background-size: cover;
  background-repeat: no-repeat;
  display: inline-block;
  box-shadow: 0px -3px 6px 2px rgba(0,0,0,0.2);
}
.btn-primary-c {
  display: block;
  border-radius: 0px;
  box-shadow: 0px 4px 6px 2px rgba(0,0,0,0.2);
  margin-top: -5px;
}
.imgUp { margin-bottom: 15px; }
.del {
  position: absolute;
  top: 0px;
  right: 15px;
  width: 30px;
  height: 30px;
  text-align: center;
  line-height: 30px;
  background-color: rgba(255,255,255,0.6);
  cursor: pointer;
}
.imgAdd {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #4bd7ef;
  color: #fff;
  box-shadow: 0px 0px 2px 1px rgba(0,0,0,0.2);
  text-align: center;
  line-height: 30px;
  margin-top: 0px;
  cursor: pointer;
  font-size: 15px;
}

/* --- Form Validation --- */
.error { color: #ec536c; }
.parsley-error { border-color: #ec536c; }
.parsley-errors-list { display: none; margin: 0; padding: 0; }
.parsley-errors-list.filled { display: block; }
.parsley-errors-list > li {
  font-size: 12px;
  list-style: none;
  color: #ec536c;
  margin-top: 5px;
}

/* --- Search Bar --- */
.search-header {
  padding: 6px 15px;
  align-items: center;
  background: #F5F6F7;
  color: #90949C;
  font-size: 0.8rem;
  text-transform: uppercase;
}
.dropdown-menu { font-size: 0.91rem; }

/* ============================================
   MODERN CARD STYLES
   ============================================ */
.card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  overflow: hidden;
}
.card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.10);
}
.card-body {
  padding: 1.5rem;
}
.card-title {
  font-weight: 600;
  font-size: 1rem;
  color: #1a1a2e;
  margin-bottom: 0.75rem;
}

/* ============================================
   STAT WIDGET CARDS (Dashboard)
   ============================================ */
.card.stat-widget {
  border-radius: 16px;
  border-left: 4px solid transparent;
}
.card.stat-widget:nth-child(1) { border-left-color: #4361ee; }
.card.stat-widget:nth-child(2) { border-left-color: #2ec4b6; }
.card.stat-widget:nth-child(3) { border-left-color: #ff6b6b; }
.card.stat-widget:nth-child(4) { border-left-color: #845ef7; }

/* ============================================
   WELCOME BANNER (Admin Dashboard)
   ============================================ */
.welcome-banner {
  background: linear-gradient(135deg, #4361ee 0%, #7c3aed 100%);
  border-radius: 20px;
  padding: 2rem 2.5rem;
  color: #fff;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}
.welcome-banner::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.welcome-banner h4 {
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}
.welcome-banner p {
  opacity: 0.85;
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* ============================================
   MODERN TABLE
   ============================================ */
.table-widget .table {
  border-collapse: separate;
  border-spacing: 0;
}
.table-widget .table thead th {
  background: #f8f9fb;
  border: none;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6c757d;
  padding: 0.85rem 1rem;
}
.table-widget .table tbody td {
  border-bottom: 1px solid #f0f0f0;
  padding: 0.85rem 1rem;
  vertical-align: middle;
}
.table-widget .table tbody tr:hover {
  background-color: #f8f9fb;
}

/* ============================================
   BADGE STYLES
   ============================================ */
.badge {
  font-weight: 500;
  font-size: 0.75rem;
  padding: 0.4em 0.8em;
  border-radius: 8px;
  letter-spacing: 0.3px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.5rem 1.25rem;
  transition: all 0.2s ease;
  letter-spacing: 0.2px;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:disabled {
  background: linear-gradient(135deg, #4361ee, #3a56d4) !important;
  border: none !important;
  color: #fff !important;
}
.btn-success,
.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-success:disabled {
  background: linear-gradient(135deg, #2ec4b6, #20a89c) !important;
  border: none !important;
  color: #fff !important;
}
.btn-info,
.btn-info:hover,
.btn-info:focus,
.btn-info:active,
.btn-info:disabled {
  background: linear-gradient(135deg, #4361ee, #4cc9f0) !important;
  border: none !important;
  color: #fff !important;
}
.btn-danger,
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active,
.btn-danger:disabled {
  background: linear-gradient(135deg, #ff6b6b, #e85656) !important;
  border: none !important;
  color: #fff !important;
}
.btn-warning,
.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active,
.btn-warning:disabled {
  background: linear-gradient(135deg, #e67700, #cc6a00) !important;
  border: none !important;
  color: #fff !important;
}
.btn-secondary,
.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active,
.btn-secondary:disabled {
  background: linear-gradient(135deg, #4a5568, #3d4656) !important;
  border: none !important;
  color: #fff !important;
}
.btn-outline-primary {
  border: 1.5px solid #4361ee;
  color: #4361ee;
  background: transparent;
}
.btn-outline-primary:hover {
  background: #4361ee;
  color: #fff;
}
.btn-outline-secondary {
  border: 1.5px solid #a0aec0;
  color: #4a5568;
  background: transparent;
}
.btn-outline-secondary:hover {
  background: #4a5568;
  color: #fff;
}
.btn-outline-danger {
  border: 1.5px solid #ff6b6b;
  color: #ff6b6b;
  background: transparent;
}
.btn-outline-danger:hover {
  background: #ff6b6b;
  color: #fff;
}
.btn:disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ============================================
   SIDEBAR MODERNIZATION
   ============================================ */
.page-sidebar {
  background: #ffffff;
  border-right: 1px solid #eef0f3;
  box-shadow: 2px 0 12px rgba(0,0,0,0.03);
}
.page-sidebar .sidebar-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #a0aec0;
  padding: 1rem 1.25rem 0.5rem;
}
.page-sidebar .accordion-menu > li > a {
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  margin: 2px 10px;
  color: #4a5568;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s ease;
}
.page-sidebar .accordion-menu > li > a:hover,
.page-sidebar .accordion-menu > li > a.active {
  background: #f0f4ff;
  color: #4361ee;
}
.page-sidebar .accordion-menu > li.active-page > a {
  background: linear-gradient(90deg, #eef3ff 0%, #f7f9ff 100%);
  color: #3650d4;
  box-shadow: 0 1px 0 rgba(67, 97, 238, 0.08) inset;
}
.page-sidebar .accordion-menu > li > a svg {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  stroke-width: 2;
}
.page-sidebar .accordion-menu > li > a:focus-visible,
.page-sidebar .accordion-menu ul li a:focus-visible {
  outline: 2px solid rgba(67, 97, 238, 0.3);
  outline-offset: 1px;
}
.page-sidebar .accordion-menu > li > a i.fas {
  font-size: 0.6rem;
}
.page-sidebar .accordion-menu > li.open > ul {
  background: #f8faff;
  border-radius: 10px;
  margin: 2px 10px 6px;
  padding: 4px 0;
  border: 1px solid #ebeffa;
}
.page-sidebar .accordion-menu ul li a {
  font-size: 0.84rem;
  padding: 0.45rem 1rem 0.45rem 2.6rem;
  color: #718096;
  border-radius: 8px;
  margin: 0 6px;
}
.page-sidebar .accordion-menu ul li a:hover {
  color: #4361ee;
  background: #eef3ff;
}
.page-sidebar .accordion-menu ul li a.active {
  background: #e9efff;
  color: #2f45bc;
  font-weight: 600;
}
.page-sidebar .accordion-menu li a .dropdown-icon {
  opacity: 0.6;
}
.page-sidebar .accordion-menu li.open > a .dropdown-icon,
.page-sidebar .accordion-menu > li.active-page > a .dropdown-icon {
  opacity: 1;
}

/* ============================================
   NAVBAR MODERNIZATION
   ============================================ */
.page-header {
  background: #ffffff;
  border-bottom: 1px solid #eef0f3;
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}
.page-header .navbar {
  padding: 0.5rem 1.5rem;
}
.page-header .navbar .navbar-brand,
.page-header .navbar .logo p {
  font-weight: 700;
  font-size: 1.1rem;
  color: #1a1a2e;
  letter-spacing: -0.3px;
}
.page-header .navbar #headerNav > ul > li > a {
  color: #4a5568;
  transition: color 0.2s;
}
.page-header .navbar #headerNav > ul > li > a:hover {
  color: #4361ee;
}
.page-header .navbar #headerNav > ul > li > a.profile-dropdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
  min-height: 40px;
  padding: 0 2px;
}
.page-header .navbar #headerNav > ul > li > a.profile-dropdown .dropdown-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 0.72rem;
  transform: translateY(0);
}
.profile-dropdown {
  font-weight: 600;
  font-size: 0.85rem;
}

/* --- Grid Dropdown (Apps menu) --- */
.grid-drop-menu {
  border: none;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  padding: 1rem;
}
.grid-drop-menu .apps {
  border-radius: 12px;
  transition: background 0.2s, transform 0.2s;
}
.grid-drop-menu .apps:hover {
  background: #f0f4ff;
  transform: translateY(-2px);
}
.apps-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.apps-name {
  font-size: 0.75rem;
  font-weight: 500;
}

/* --- Notification Dropdown --- */
.notif-drop-menu {
  border: none;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.profile-drop-menu {
  border: none;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.profile-drop-menu .dropdown-item {
  padding: 0.55rem 1.25rem;
  font-size: 0.88rem;
  border-radius: 8px;
  margin: 2px 6px;
}
.profile-drop-menu .dropdown-item:hover {
  background: #f0f4ff;
  color: #4361ee;
}

/* ============================================
   PAGE CONTENT AREA
   ============================================ */
.page-content .main-wrapper {
  padding: 1.5rem;
}

/* ============================================
   FORM CONTROLS
   ============================================ */
.form-control, .form-select {
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus, .form-select:focus {
  border-color: #4361ee;
  box-shadow: 0 0 0 3px rgba(67,97,238,0.12);
}

/* ============================================
   MODAL STYLES
   ============================================ */
.modal-content {
  border: none;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}
.modal-header {
  border-bottom: 1px solid #f0f0f0;
  padding: 1.25rem 1.5rem;
}
.modal-footer {
  border-top: 1px solid #f0f0f0;
  padding: 1rem 1.5rem;
}

/* ============================================
   EMPLOYEE LOG CARDS
   ============================================ */
.log-action-card {
  border-radius: 16px;
  border: none;
  padding: 1.75rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.log-action-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}
.log-action-card.start::before { background: linear-gradient(90deg, #4361ee, #4cc9f0); }
.log-action-card.break-start::before { background: linear-gradient(90deg, #2ec4b6, #38d9a9); }
.log-action-card.break-end::before { background: linear-gradient(90deg, #ff6b6b, #ffa500); }
.log-action-card.end-day::before { background: linear-gradient(90deg, #845ef7, #7048e8); }

.log-action-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}
.log-action-card .card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #4a5568;
}
.log-action-card .log-time {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a2e;
}

/* ============================================
   EVENTS / TRANSACTIONS LIST
   ============================================ */
.transactions-list {
  border-bottom: 1px solid #f0f2f5;
  padding: 0.75rem 0;
}
.transactions-list:last-child {
  border-bottom: none;
}
.tr-item {
  display: flex;
  align-items: center;
}
.tr-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tr-text h4 {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 2px;
  color: #1a1a2e;
}
.tr-text p {
  font-size: 0.78rem;
  color: #718096;
  margin-bottom: 0;
}

/* ============================================
   USEFUL APPS SECTION
   ============================================ */
.useful-apps-divider {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #a0aec0;
}

/* ============================================
   ALERT MESSAGES
   ============================================ */
.alert {
  border-radius: 12px;
  border: none;
  font-size: 0.88rem;
  font-weight: 500;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

/* ============================================
   DATATABLE OVERRIDES
   ============================================ */
table.dataTable thead th {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6c757d;
  border-bottom: 2px solid #eef0f3 !important;
}
table.dataTable tbody td {
  font-size: 0.88rem;
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid #f0f2f5;
}
table.dataTable tbody tr:hover {
  background-color: #f8f9fb !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 8px !important;
  margin: 0 2px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: linear-gradient(135deg, #4361ee, #3a56d4) !important;
  color: #fff !important;
  border: none !important;
}
.dataTables_wrapper .dataTables_filter input {
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  padding: 0.4rem 0.8rem;
}
.dataTables_wrapper .dataTables_length select {
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
}
