/* ==========================================================================
   Unilib Admin & Modal Styles — mbkbucket-inspired Design
   ========================================================================== */

/* --------------------------------------------------------------------------
   Modal Overlay
   -------------------------------------------------------------------------- */
.modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  overflow: auto;
  background: rgba(15, 42, 42, 0.50);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* Modal Content Panel */
.modal-content {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  margin: auto;
  padding: 1.75rem;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 14px;
  width: 90%;
  max-width: 540px;
  box-shadow: 0 20px 40px rgba(15, 42, 42, 0.16), 0 8px 16px rgba(0,0,0,0.06);
  position: relative;
}

/* Modal Header */
.modal-content h2,
.modal-content h3 {
  font-family: "Sora", "Segoe UI", system-ui, sans-serif;
  font-weight: 700;
  color: #1f2a2a;
  margin-bottom: 1rem;
}

/* Close Button */
.close {
  color: #667c79;
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease;
  background: none;
  border: none;
}

.close:hover,
.close:focus {
  color: #0f766e;
}

/* --------------------------------------------------------------------------
   Form Groups
   -------------------------------------------------------------------------- */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #425855;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
}

.form-group .required {
  color: #dc2626;
  margin-left: 2px;
}

.error-message {
  color: #dc2626;
  font-size: 0.72rem;
  margin-top: 0.25rem;
  display: none;
}

.form-group.error .input-classic {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.10);
}

/* --------------------------------------------------------------------------
   Loading Overlay
   -------------------------------------------------------------------------- */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(244, 247, 243, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-content {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  padding: 1.75rem 2.25rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  box-shadow: 0 10px 30px rgba(15, 42, 42, 0.12);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  color: #425855;
  font-size: 0.85rem;
}

/* Spinner */
.spinner {
  width: 2.25rem;
  height: 2.25rem;
  border: 3px solid rgba(15, 118, 110, 0.15);
  border-top-color: #0f766e;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   Empty State Card
   -------------------------------------------------------------------------- */
.empty-state {
  text-align: center;
  padding: 3rem 1.75rem;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.empty-state i {
  font-size: 2.5rem;
  color: #a0b2af;
  margin-bottom: 0.85rem;
  display: block;
}

.empty-state h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2a2a;
  margin-bottom: 0.3rem;
  font-family: "Sora", "Segoe UI", system-ui, sans-serif;
}

.empty-state p {
  color: #667c79;
  font-size: 0.82rem;
  margin-bottom: 1.4rem;
}

/* --------------------------------------------------------------------------
   Alert Banners
   -------------------------------------------------------------------------- */
.alert-success {
  background: rgba(22, 163, 74, 0.10);
  border: 1px solid rgba(22, 163, 74, 0.30);
  color: #14532d;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-error {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.28);
  color: #7f1d1d;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-info {
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.22);
  color: #0b4f4a;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* --------------------------------------------------------------------------
   Admin Shell & Sidebar (mbkbucket-inspired Glassmorphism)
   -------------------------------------------------------------------------- */
.admin-shell {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

.admin-main-pane {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Mobile Admin Bar */
.admin-mobile-bar {
  display: none;
}

@media (max-width: 1023px) {
  .admin-shell {
    flex-direction: column;
  }
  .admin-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(15, 118, 110, 0.18);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.06);
    width: 100%;
  }
}

.admin-mobile-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  background: var(--primary, #0f766e);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.25);
}

.admin-mobile-toggle-btn:hover {
  background: var(--primary-dk, #0b4f4a);
}

/* Sidebar Drawer Backdrop for Mobile */
#adminSidebarBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 42, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

#adminSidebarBackdrop.open {
  display: block;
  opacity: 1;
}

/* Sidebar Component */
.admin-sidebar {
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(15, 118, 110, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .admin-sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 76px;
    height: calc(100vh - 96px);
    z-index: 40;
  }
}

@media (max-width: 1023px) {
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    border-radius: 0;
    border-top: none;
    border-bottom: none;
    border-left: none;
    border-right: 1px solid rgba(15, 118, 110, 0.22);
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.20);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
}

.admin-sidebar-header {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(15, 118, 110, 0.12);
  background: rgba(255, 255, 255, 0.70);
  flex-shrink: 0;
}

.admin-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.admin-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.admin-nav-group-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5f7a76;
  padding: 0 0.5rem 0.35rem;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.65rem;
  border-radius: 9px;
  color: #2d4542;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.admin-nav-item:hover {
  background: rgba(15, 118, 110, 0.07);
  color: #0f766e;
  border-color: rgba(15, 118, 110, 0.14);
  transform: translateX(2px);
}

.admin-nav-item.active {
  background: rgba(15, 118, 110, 0.12);
  color: #0b4f4a;
  font-weight: 700;
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: 0 1px 3px rgba(15, 118, 110, 0.08);
}

.admin-nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(15, 118, 110, 0.06);
  border: 1px solid rgba(15, 118, 110, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #0f766e;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.admin-nav-item:hover .admin-nav-icon {
  background: rgba(15, 118, 110, 0.14);
}

.admin-nav-item.active .admin-nav-icon {
  background: #0f766e;
  color: #fff;
  border-color: #0b4f4a;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.30);
}

.admin-nav-content {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.admin-nav-label {
  font-size: 12px;
  font-weight: 600;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-nav-sub {
  font-size: 10px;
  color: #6c8a86;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-nav-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(15, 118, 110, 0.10);
  color: #0f766e;
  border: 1px solid rgba(15, 118, 110, 0.20);
  font-family: monospace;
}

.admin-sem-jump-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.2rem;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  color: #2d4542;
  background: rgba(255, 255, 255, 0.70);
  border: 1px solid rgba(15, 118, 110, 0.14);
  text-decoration: none;
  transition: all 0.15s ease;
}

.admin-sem-jump-pill:hover {
  background: #0f766e;
  color: #fff;
  border-color: #0f766e;
}

.admin-sidebar-footer {
  padding: 0.75rem 0.85rem;
  border-top: 1px solid rgba(15, 118, 110, 0.12);
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.60);
}

