/* ═══════════════════════════════════════════
   Enhancements CSS — Steps 61-70
   ═══════════════════════════════════════════ */

/* ── 61. Skeleton Loading Screens ── */
.skeleton {
  background: linear-gradient(90deg, rgba(20,40,60,0.3) 25%, rgba(40,60,80,0.4) 50%, rgba(20,40,60,0.3) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 8px;
  min-height: 60px;
  color: transparent !important;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
}
.skeleton * { visibility: hidden; }
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
[data-theme="light"] .skeleton {
  background: linear-gradient(90deg, rgba(200,200,210,0.4) 25%, rgba(220,220,230,0.6) 50%, rgba(200,200,210,0.4) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
}
.skeleton-card { min-height: 120px; }
.skeleton-chart { min-height: 250px; }
.skeleton-table { min-height: 200px; }

/* ── 63. Page Transition Animations ── */
.section {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.section.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ── 65. Last Refreshed Timestamp ── */
#last-refreshed {
  font-size: 0.82em;
  opacity: 0.7;
}

/* ── 66. Notification Bell ── */
.notification-bell {
  position: relative;
  cursor: pointer;
  font-size: 1.3em;
  padding: 4px 8px;
  border: none;
  background: none;
  transition: transform 0.2s;
}
.notification-bell:hover { transform: scale(1.15); }
.notification-badge {
  position: absolute;
  top: -2px; right: 0;
  background: #e74c3c;
  color: #fff;
  font-size: 0.55em;
  font-weight: 700;
  border-radius: 50%;
  min-width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.notification-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  width: 320px;
  background: var(--card-bg, rgba(15,25,40,0.95));
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 9999;
  max-height: 360px;
  overflow-y: auto;
  padding: 8px 0;
}
.notification-dropdown.open { display: block; }
.notification-item {
  padding: 10px 16px;
  font-size: 0.85em;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: var(--text, #e0e8f0);
  transition: background 0.15s;
}
.notification-item:last-child { border-bottom: none; }
.notification-item:hover { background: rgba(255,255,255,0.05); }
.notification-dropdown-title {
  padding: 8px 16px 4px;
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.5;
  font-weight: 600;
}
[data-theme="light"] .notification-dropdown {
  background: rgba(255,255,255,0.97);
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
[data-theme="light"] .notification-item {
  color: #2a3a4a;
  border-bottom-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .notification-item:hover { background: rgba(0,0,0,0.03); }

/* ── 67. Fullscreen Button ── */
.fullscreen-btn {
  cursor: pointer;
  font-size: 1.2em;
  padding: 4px 8px;
  border: none;
  background: none;
  opacity: 0.8;
  transition: opacity 0.2s, transform 0.2s;
}
.fullscreen-btn:hover { opacity: 1; transform: scale(1.1); }

/* ── 64. Keyboard Shortcuts Overlay ── */
.shortcuts-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 99999;
  align-items: center;
  justify-content: center;
}
.shortcuts-overlay.open { display: flex; }
.shortcuts-box {
  background: var(--card-bg, rgba(15,25,40,0.97));
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  padding: 28px 36px;
  max-width: 420px;
  width: 90%;
  color: var(--text, #e0e8f0);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.shortcuts-box h3 {
  margin: 0 0 16px;
  font-size: 1.1em;
  font-weight: 600;
}
.shortcuts-box table { width: 100%; border-collapse: collapse; }
.shortcuts-box td { padding: 5px 0; font-size: 0.88em; }
.shortcuts-box td:first-child {
  font-family: monospace;
  background: rgba(255,255,255,0.08);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.82em;
  width: 60px;
  text-align: center;
}
[data-theme="light"] .shortcuts-box {
  background: rgba(255,255,255,0.98);
  border-color: rgba(0,0,0,0.12);
  color: #2a3a4a;
}
[data-theme="light"] .shortcuts-box td:first-child {
  background: rgba(0,0,0,0.06);
}

/* ── 69. Quick Stats Bar ── */
.quick-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 6px 16px;
  background: rgba(8,16,28,0.7);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 0.78em;
  color: rgba(224,232,240,0.7);
  flex-wrap: wrap;
}
.quick-stats span {
  white-space: nowrap;
  letter-spacing: 0.02em;
}
[data-theme="light"] .quick-stats {
  background: rgba(240,242,248,0.9);
  border-bottom-color: rgba(0,0,0,0.08);
  color: rgba(42,58,74,0.7);
}

/* ── 70. Mobile-Responsive Nav ── */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.6em;
  cursor: pointer;
  padding: 6px 10px;
  color: var(--text, #e0e8f0);
  z-index: 10001;
}
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
}
.mobile-nav-overlay.open { display: block; }

@media (max-width: 768px) {
  .hamburger-btn { display: block; }
  .nav {
    position: fixed;
    top: 0; left: -280px;
    width: 260px;
    height: 100vh;
    background: var(--card-bg, rgba(10,20,35,0.98));
    flex-direction: column;
    padding: 60px 16px 16px;
    z-index: 10000;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,0.4);
  }
  .nav.mobile-open { left: 0; }
  .nav .nav-btn {
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    font-size: 0.95em;
  }

  /* Cards stack single-column */
  .kpi-grid, .cards-grid, .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr !important;
  }
  /* KPI cards 2-column */
  .kpi-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Tables scroll horizontally */
  .table-container, .crm-table-wrap, table {
    overflow-x: auto;
    display: block;
    -webkit-overflow-scrolling: touch;
  }

  /* Header adjustments */
  .header-mp-logo { max-height: 30px !important; }
  .header-status { display: none !important; }
  .header-content { padding: 8px 12px; }
  .header-title { font-size: 1em !important; }
  .header-sub, .header-sub-sub { font-size: 0.7em !important; }
  .header-beach-strip { display: none; }

  /* Quick stats compact */
  .quick-stats { gap: 12px; font-size: 0.7em; padding: 4px 8px; }

  /* Notification dropdown full width */
  .notification-dropdown { width: calc(100vw - 24px); right: -40px; }
}
