/* =====================================================
   global-polish.css — System-wide UI enhancements
   Non-breaking, additive CSS improvements for AdminLTE
   Applied AFTER custom.css and modern.css
   ===================================================== */

/* --- Improved font stack & rendering --- */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* --- Smoother transitions on interactive elements --- */
a,
.btn,
.nav-link,
.sidebar-menu a,
.box,
.info-box,
.small-box {
  transition: all 0.2s ease;
}

/* --- Cards / Boxes — subtle lift & rounded corners --- */
.box {
  border-radius: 6px;
  border-top-width: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
}

.box:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.box .box-header {
  border-radius: 6px 6px 0 0;
}

/* --- Info boxes — polish --- */
.info-box {
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.info-box:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,.1);
}

.info-box .info-box-icon {
  border-radius: 6px 0 0 6px;
}

/* --- Small boxes — softer corners --- */
.small-box {
  border-radius: 6px;
  overflow: hidden;
}

.small-box > .small-box-footer {
  border-radius: 0 0 6px 6px;
}

/* --- Buttons — modern feel --- */
.btn {
  border-radius: 4px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.btn:active {
  transform: translateY(1px);
}

/* --- Tables — cleaner look --- */
.table > thead > tr > th {
  border-bottom: 2px solid #ddd;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #555;
}

.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #fafbfc;
}

.table > tbody > tr:hover {
  background-color: #f0f7f8 !important;
}

/* --- DataTable wrapper — cleaner spacing --- */
.dataTables_wrapper {
  padding: 5px 0;
}

.dataTables_wrapper .dataTables_filter input {
  border-radius: 4px;
  border: 1px solid #d2d6de;
  padding: 5px 10px;
  transition: border-color 0.2s;
}

.dataTables_wrapper .dataTables_filter input:focus {
  border-color: #20808D;
  outline: none;
  box-shadow: 0 0 0 2px rgba(32,128,141,.15);
}

/* --- Form inputs — focus teal highlight --- */
.form-control:focus {
  border-color: #20808D;
  box-shadow: 0 0 0 2px rgba(32,128,141,.12);
}

/* --- Sidebar — subtle refinements --- */
.sidebar-menu > li > a {
  border-radius: 0;
  transition: background-color 0.15s, padding-left 0.15s;
}

.sidebar-menu > li:hover > a,
.sidebar-menu > li.active > a {
  border-left: 3px solid #20808D;
}

.sidebar-menu > li.active > a {
  background-color: rgba(32,128,141,.08);
}

/* --- Content header — improved spacing --- */
.content-header {
  padding: 18px 15px 8px;
}

.content-header > h1 {
  font-size: 22px;
  font-weight: 600;
  color: #2c3e50;
}

/* --- Modal — modern style --- */
.modal-content {
  border-radius: 8px;
  border: none;
  box-shadow: 0 10px 40px rgba(0,0,0,.15);
}

.modal-header {
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid #e9ecef;
}

.modal-footer {
  border-radius: 0 0 8px 8px;
  border-top: 1px solid #e9ecef;
}

/* --- Breadcrumb — cleaner --- */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 5px;
}

.breadcrumb > li + li:before {
  color: #adb5bd;
}

/* --- Badge / Label improvements --- */
.label {
  border-radius: 3px;
  font-weight: 500;
  padding: 3px 8px;
}

/* --- Scrollbar styling (webkit) --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* --- Print improvements --- */
@media print {
  .box {
    box-shadow: none !important;
    border: 1px solid #ddd;
  }
  
  .sidebar,
  .main-header,
  .no-print {
    display: none !important;
  }
}

/* --- Loading state animation (reusable) --- */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}

.loading-shimmer {
  background: linear-gradient(to right, #f0f0f0 8%, #e0e0e0 18%, #f0f0f0 33%);
  background-size: 400px 100%;
  animation: shimmer 1.2s infinite linear;
}

/* --- Toastr overrides for cleaner notifications --- */
#toast-container > .toast {
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

/* --- Status badges (system-wide) --- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.status-success {
  background: #eafaf1;
  color: #27ae60;
}

.status-badge.status-warning {
  background: #fff8e6;
  color: #f39c12;
}

.status-badge.status-danger {
  background: #fdecea;
  color: #e74c3c;
}

.status-badge.status-info {
  background: #e8f5f7;
  color: #20808D;
}
