/* assets/css/style.css */

/* ===== Layout ===== */
body {
  background: #f0f2f5;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 14px;
  color: #333;
}

.main-content {
  min-height: calc(100vh - 112px);
}

/* ===== Navbar ===== */
.app-navbar {
  background: #1e293b;
  padding: 0 0;
  min-height: 52px;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.app-navbar .navbar-brand { color: #e2e8f0 !important; letter-spacing: .02em; }
.app-navbar .nav-link { color: #94a3b8 !important; font-size: 13.5px; padding: .65rem .9rem; }
.app-navbar .nav-link:hover { color: #fff !important; }
.app-navbar .dropdown-menu { border: none; box-shadow: 0 4px 16px rgba(0,0,0,.15); }
.app-navbar .navbar-toggler { border-color: rgba(255,255,255,.2); }
.app-navbar .navbar-toggler-icon { filter: invert(1); }

/* ===== Footer ===== */
.app-footer { background: #f8f9fa; border-top: 1px solid #e9ecef; }

/* ===== Cards ===== */
.card { border: none; border-radius: 10px; }
.card-header { background: #fff; border-bottom: 1px solid #f0f0f0; padding: .75rem 1rem; border-radius: 10px 10px 0 0 !important; }
.card-footer { background: #fff; border-top: 1px solid #f0f0f0; border-radius: 0 0 10px 10px !important; }

/* ===== Tables ===== */
.table th { font-size: 12.5px; font-weight: 600; color: #666; letter-spacing: .02em; }
.table td { vertical-align: middle; }
.sort-link { color: inherit; text-decoration: none; }
.sort-link:hover { color: #0d6efd; }

/* ===== Content body (WYSIWYG output) ===== */
.content-body { font-size: 15px; line-height: 1.8; }
.content-body img { max-width: 100%; height: auto; border-radius: 6px; margin: .5rem 0; }
.content-body table { width: 100%; border-collapse: collapse; }
.content-body td, .content-body th { border: 1px solid #ddd; padding: .4rem .6rem; }

/* ===== Content banner image ===== */
.content-banner { width: 100%; height: 220px; object-fit: cover; border-radius: 8px 8px 0 0; }

/* ===== Autocomplete ===== */
.autocomplete-dropdown {
  position: absolute;
  z-index: 1050;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
  min-width: 100%;
  max-height: 260px;
  overflow-y: auto;
}
.ac-item {
  padding: .45rem .8rem;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ac-item:hover { background: #f0f7ff; }
.ac-item.ac-new { color: #0d6efd; border-top: 1px solid #eee; }

/* ===== Badges ===== */
.badge { font-weight: 500; font-size: 11px; }

/* ===== Toast container ===== */
#toastContainer {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

/* ===== Responsive helpers ===== */
@media (max-width: 576px) {
  .card-header { font-size: 13.5px; }
  .table td, .table th { font-size: 12.5px; }
}

/* ===== Print ===== */
@media print {
  .app-navbar, .app-footer, .no-print, .btn, nav[aria-label] { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none !important; border: 1px solid #ccc !important; }
}
