/* Copyright (c) 2026 Maxx Gamble. All rights reserved.
 * Part of CommandCentre. Unauthorized copying, modification, or distribution is prohibited. */
/* ═══ APP SHELL ═══ */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bk);
}

/* ═══ HEADER ═══ */
.hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--bd);
  background: var(--bk);
  position: sticky;
  top: 0;
  z-index: 60;
}

.logo { display: flex; align-items: center; gap: 9px; }
.lm { width: 32px; height: 32px; background: var(--gold); border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.lm svg { width: 17px; height: 17px; }
.lt { font-family: 'Space Grotesk', sans-serif; font-size: 17px; font-weight: 700; letter-spacing: -.3px; }
.lt span { color: var(--gold); }

.hdr-r { display: flex; align-items: center; gap: 12px; }
.date-badge { font-size: 12px; color: var(--m1); background: var(--s1); border: 1px solid var(--bd); padding: 5px 10px; border-radius: 20px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* User Menu */
.user-menu { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--s1); border: 1px solid var(--bd); border-radius: 8px;
  padding: 6px 12px; cursor: pointer; color: var(--txt); font-family: inherit; font-size: 13px;
}
.user-btn:hover { border-color: var(--bd2); }
.user-avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: var(--bk);
  display: grid; place-items: center; font-size: 12px; font-weight: 600;
}
.user-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 180px;
  background: var(--s1); border: 1px solid var(--bd); border-radius: var(--r);
  overflow: hidden; z-index: 100; box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.user-dropdown-header { padding: 10px 14px; border-bottom: 1px solid var(--bd); }
.user-role-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .5px;
  color: var(--gold); background: var(--gold-dim); padding: 3px 8px; border-radius: 4px; display: inline-block;
}
.dropdown-item {
  display: block; width: 100%; text-align: left;
  background: none; border: none; color: var(--txt); font-family: inherit; font-size: 13px;
  padding: 10px 14px; cursor: pointer;
}
.dropdown-item:hover { background: var(--s2); }
.dropdown-item.danger { color: var(--red); }
.dropdown-divider { height: 1px; background: var(--bd); }

/* ═══ TOP NAV ═══ */
.top-nav {
  display: flex; padding: 0 20px; border-bottom: 1px solid var(--bd);
  background: var(--bk); gap: 0; overflow-x: auto; scrollbar-width: none;
}
.top-nav::-webkit-scrollbar { display: none; }
.nav-btn {
  background: none; border: none; color: #666;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500;
  padding: 14px 18px; cursor: pointer; border-bottom: 2px solid transparent;
  transition: all .2s; white-space: nowrap; display: flex; align-items: center; gap: 7px;
}
.nav-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
.nav-btn:hover:not(.active) { color: var(--txt); }
.nav-icon { font-size: 15px; }
.badge {
  background: var(--gold); color: var(--bk);
  font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 20px; min-width: 18px; text-align: center;
}

/* ═══ CONTENT ═══ */
.content { flex: 1; padding: 20px; max-width: 1400px; width: 100%; margin: 0 auto; }

/* ═══ VIEWS ═══ */
.view { display: none; }
.view.active { display: block; }

/* ═══ MOBILE NAV ═══ */
.bot-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--s3); border-top: 1px solid var(--bd);
  padding: 8px 0 12px; z-index: 200;
}
.bot-nav { display: flex; justify-content: space-around; }
.bn-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; padding: 4px 12px; border-radius: 8px;
  background: none; border: none; color: var(--m2); font-family: inherit;
  transition: all .2s;
}
.bn-btn.active { color: var(--gold); }
.bn-icon { font-size: 20px; }
.bn-label { font-size: 10px; font-weight: 500; }

/* ═══ LOGIN ═══ */
.login-screen {
  min-height: 100vh; display: grid; place-items: center;
  background: var(--bk); padding: 20px;
}
.login-card {
  width: 100%; max-width: 380px;
  background: var(--s1); border: 1px solid var(--bd); border-radius: var(--rl);
  padding: 32px 28px;
}
.login-logo { display: flex; align-items: center; gap: 9px; justify-content: center; margin-bottom: 24px; }
.login-title { text-align: center; font-size: 15px; color: var(--m1); margin-bottom: 24px; }
.login-error {
  background: var(--red-dim); border: 1px solid rgba(255,82,82,.3);
  color: var(--red); padding: 10px 14px; border-radius: var(--r); font-size: 13px; margin-bottom: 16px;
}
.login-hint { text-align: center; font-size: 11px; color: var(--m2); margin-top: 16px; line-height: 1.5; }

/* ═══ RESPONSIVE ═══ */
@media (min-width: 641px) {
  .bot-nav { display: none !important; }
}
@media (max-width: 640px) {
  .content { padding: 12px; padding-bottom: max(80px, calc(72px + env(safe-area-inset-bottom))); }
  .top-nav { display: none; }
  .bot-nav { display: flex; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .kpi-strip { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
  .view-toolbar { flex-direction: column; gap: 10px; }
  .search-wrap { max-width: 100% !important; }
  .search-wrap input { font-size: 16px; min-height: 40px; }
  .hdr { padding: 10px 12px; }
  .hdr .logo-text { font-size: 15px; }
  .btn { min-height: 40px; font-size: 13px; }
  .modal { padding: 12px; }
  .modal-content { width: 100%; max-width: 100%; border-radius: 12px; max-height: 90vh; }
  .modal-content input, .modal-content select, .modal-content textarea { font-size: 16px; min-height: 44px; }
  .drawer { width: 100%; max-width: 100vw; }
}
@media (max-width: 480px) {
  .content { padding: 8px; padding-bottom: max(76px, calc(68px + env(safe-area-inset-bottom))); }
  .kpi-card { padding: 10px; }
  .kpi-val { font-size: 20px; }
  .kpi-label { font-size: 10px; }
}
