/* ==========================================================================
   NCF Unified Reporting Portal — Design System & Theme
   Optimized for high responsiveness, mobile screen space, and glassmorphism.
   ========================================================================== */

:root {
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.35);
  --primary-light: #60a5fa;
  --gold: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.35);
  --bg-deep: #090e1a;
  --bg-surface: rgba(17, 24, 39, 0.88);
  --bg-card: rgba(15, 23, 42, 0.75);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-glass: rgba(59, 130, 246, 0.2);
  --border-glass-hover: rgba(59, 130, 246, 0.45);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-full: 9999px;
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Ambient background overlay */
body::before {
  content: "";
  position: fixed;
  top: -20px; left: -20px; right: -20px; bottom: -20px;
  background: url('fyf.jpg') center center / cover no-repeat fixed;
  filter: blur(8px) brightness(0.35);
  z-index: -2;
}

/* Compact Portal Header */
.portal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 14, 26, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  padding: 0.55rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.portal-logo-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 10px var(--primary-glow);
  flex-shrink: 0;
}

.portal-logo-wrap img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.portal-title-wrap h1 {
  font-family: 'Playfair Display', serif;
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.15;
}

.portal-title-wrap p {
  font-size: 0.65rem;
  color: var(--primary-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

.portal-header-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.portal-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Center Navigation (PC View) - Blends seamlessly with header */
.header-center-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.header-center-nav .tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.header-center-nav .tab-btn:hover {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.25);
}

.header-center-nav .tab-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border-color: transparent;
}

.tab-btn:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.tab-btn.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
  box-shadow: 0 3px 12px rgba(59, 130, 246, 0.4) !important;
}

.tab-icon {
  font-size: 0.95rem;
}

/* Pending Alert Bar */
.pending-alert-wrap {
  width: 100%;
  max-width: 960px;
  margin: 0.35rem auto;
  padding: 0 0.75rem;
  transition: all 0.25s ease;
}

.pending-alert-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(17, 24, 39, 0.9) 100%);
  border: 1px solid var(--border-glass);
  border-left: 3.5px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.95rem;
  box-shadow: var(--shadow-card);
}

.pending-alert-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.pending-alert-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-light);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pending-alert-desc {
  font-size: 0.74rem;
  color: #94a3b8;
  margin-bottom: 0.4rem;
}

.pending-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pending-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.24rem 0.65rem;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid var(--border-glass);
  color: var(--primary-light);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pending-badge:hover, .pending-badge:active {
  background: var(--primary);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px var(--primary-glow);
}

/* Viewport Iframe Container */
.portal-viewport-wrap {
  width: 100%;
  max-width: 900px;
  margin: 0.6rem auto 1.75rem auto;
  padding: 0 0.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.portal-frame {
  width: 100%;
  min-height: 800px;
  height: 100%;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  background: transparent;
  box-shadow: var(--shadow-card);
  transition: opacity 0.2s ease;
}

/* Mobile Screens (Phones < 640px) */
@media (max-width: 640px) {
  .portal-header {
    padding: 0.45rem 0.85rem;
  }
  .portal-logo-wrap {
    width: 32px;
    height: 32px;
  }
  .portal-logo-wrap img {
    width: 24px;
    height: 24px;
  }
  .portal-title-wrap h1 {
    font-size: 0.9rem;
  }
  .portal-title-wrap p {
    font-size: 0.6rem;
  }
  .portal-date {
    display: none;
  }
  .pending-alert-wrap {
    padding: 0 0.4rem;
    margin: 0.35rem auto 0.5rem auto;
  }
  .pending-alert-card {
    padding: 0.55rem 0.75rem;
  }
  .portal-viewport-wrap {
    padding: 0 0.25rem;
    margin: 0.35rem auto 1.5rem auto;
  }
  .portal-frame {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
  }
}
