/* PlanTech RMM Dashboard — Global Styles */

:root {
  --navy:        #1a2744;
  --navy-deep:   #0f1c36;
  --navy-mid:    #243156;
  --navy-light:  #2e3f6b;
  --teal:        #3ecfbe;
  --teal-dim:    #2aaa9c;
  --teal-faint:  rgba(62,207,190,0.12);
  --white:       #ffffff;
  --w70:         rgba(255,255,255,0.70);
  --w40:         rgba(255,255,255,0.40);
  --w20:         rgba(255,255,255,0.20);
  --w10:         rgba(255,255,255,0.08);
  --green:       #22c55e;
  --amber:       #f59e0b;
  --red:         #ef4444;
  --purple:      #a78bfa;
  --green-bg:    rgba(34,197,94,0.13);
  --amber-bg:    rgba(245,158,11,0.13);
  --red-bg:      rgba(239,68,68,0.13);
  --purple-bg:   rgba(167,139,250,0.13);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 13px;
  background: var(--navy-deep);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; font-size: inherit; }
code { font-family: ui-monospace, monospace; }

/* ── Top nav ─────────────────────────────────────────────────────────── */
.topnav {
  height: 46px;
  background: var(--navy-deep);
  border-bottom: 0.5px solid var(--w20);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 6px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 8px;
}
.nav-logo-text { font-size: 13px; font-weight: 500; }
.logo-plan { color: var(--white); }
.logo-tech { color: var(--teal); }
.logo-rmm  { color: var(--w40); font-weight: 400; }

.nav-link {
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 12px;
  color: var(--w70);
  transition: all .15s;
}
.nav-link:hover { color: var(--white); background: var(--w10); }
.nav-link.active { color: var(--white); background: var(--w10); }

.topnav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-user { display: flex; align-items: center; gap: 7px; }
.nav-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--teal-faint);
  border: 0.5px solid rgba(62,207,190,.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 500; color: var(--teal);
}
.nav-username { font-size: 12px; color: var(--w70); }
.nav-signout {
  font-size: 11px; color: var(--w40);
  padding: 3px 8px; border-radius: 4px;
  border: 0.5px solid var(--w20);
  transition: all .15s;
}
.nav-signout:hover { color: var(--white); border-color: var(--w40); }

/* ── Main content ────────────────────────────────────────────────────── */
.main-content { height: calc(100vh - 46px); overflow: hidden; }

/* Simple pages (non-dashboard) scroll normally */
.main-content.page-scrollable { overflow-y: auto; overflow-x: hidden; }

/* ── Alerts ──────────────────────────────────────────────────────────── */
.alert {
  padding: 10px 14px; border-radius: 7px; margin-bottom: 14px;
  font-size: 12px; line-height: 1.5;
}
.alert-warn   { background: var(--amber-bg); color: #fbbf24; border: 0.5px solid rgba(245,158,11,.25); }
.alert-danger { background: var(--red-bg);   color: #f87171; border: 0.5px solid rgba(239,68,68,.25); }

/* ── Login page ──────────────────────────────────────────────────────── */
.login-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: var(--navy-deep);
}
.login-wrap { width: 100%; max-width: 380px; padding: 24px; }
.login-card {
  background: var(--navy);
  border: 0.5px solid var(--w20);
  border-radius: 12px;
  padding: 32px 28px;
  margin-bottom: 16px;
}
.login-logo {
  display: flex; align-items: center; gap: 10px; margin-bottom: 24px;
}
.login-logo-text { font-size: 16px; font-weight: 500; }
.logo-rmm-lg { color: var(--w40); font-weight: 400; }
.login-title { font-size: 20px; font-weight: 500; margin-bottom: 6px; }
.login-sub   { font-size: 12px; color: var(--w40); margin-bottom: 20px; }
.btn-ms-signin {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 16px; border-radius: 6px;
  background: var(--w10); border: 0.5px solid var(--w20);
  color: var(--white); font-size: 13px; font-weight: 500;
  transition: all .15s;
}
.btn-ms-signin:hover { background: var(--w20); border-color: var(--w40); }
.login-footer { text-align: center; font-size: 11px; color: var(--w40); }

/* ── Scrollbar ───────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--w20); border-radius: 2px; }

/* ── Page layout (shared across all pages) ── */
.page-wrap { padding: 20px 24px; max-width: 1400px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; gap: 12px; }
.page-title { font-size: 22px; font-weight: 600; color: var(--white); margin: 0 0 4px; }
.page-sub { font-size: 12px; color: var(--w40); margin: 0; }
