@font-face {
  font-family: Montserrat;
  src: url('/assets/fonts/Montserrat-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Montserrat;
  src: url('/assets/fonts/Montserrat-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --background: #f3f6f8;
  --foreground: #17212b;
  --card: #fff;
  --card-foreground: #17212b;
  --primary: #0f3446;
  --primary-foreground: #fff;
  --secondary: #edf2f5;
  --secondary-foreground: #17212b;
  --muted: #edf2f5;
  --muted-foreground: #647282;
  --accent: #e4edf3;
  --accent-foreground: #17212b;
  --border: #d9e2e8;
  --ring: #347fb6;
  --sidebar: #fff;
  --font-fallback: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: Montserrat;
  --font-body: Montserrat;
}

* { box-sizing: border-box; border-color: var(--border); }
html { min-height: 100%; background: var(--background); color-scheme: light; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 80% 0%, rgba(0,54,74,.07), transparent 28rem), var(--background); color: var(--foreground); font: 600 14px/1.5 var(--font-body), var(--font-fallback); text-rendering: optimizeLegibility; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
h1, h2, h3, h4, h5, h6, strong, .font-bold { font-family: var(--font-heading), var(--font-body), var(--font-fallback); font-weight: 700; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { padding: 0; }
button:not(:disabled), a, [role='button'], summary, select, input[type='checkbox'], input[type='radio'] { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .65; }
button, a, summary, input[type='checkbox'] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible, input[type='checkbox']:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
[hidden] { display: none !important; }
::selection { background: rgba(52,127,182,.22); color: #0f3446; }
.icon { display: block; width: 18px; height: 18px; flex-shrink: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 8px 15px; border: 1px solid transparent; border-radius: 3px; color: #fff; background: #347fb6; font-size: 13px; font-weight: 700; line-height: 20px; text-align: center; transition: background-color .15s; }
.button:hover { background: #2e73a6; }
.button-secondary { border-color: #cbd5df; color: #17212b; background: #fff; }
.button-secondary:hover { background: #edf2f5; }
.button .icon { width: 16px; height: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 16px; z-index: 100; padding: 8px 12px; transform: translateY(-150%); border-radius: 3px; color: #fff; background: var(--primary); }
.skip-link:focus { transform: translateY(0); }

/* Monitoring login, including its dimensions, colours and local fonts. */
.login-main { position: relative; display: flex; min-height: 100vh; align-items: center; justify-content: center; overflow: hidden; padding: 40px 16px; background: #eef3f7; color: #020617; }
.login-main::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 18%, rgba(0,54,74,.1), transparent 34rem); }
.login-card { position: relative; z-index: 1; width: 100%; max-width: 450px; padding: 24px; border-radius: 3px; background: #fff; box-shadow: 0 16px 40px rgba(0,0,0,.22); }
.login-brand { margin-bottom: 20px; text-align: center; }
.login-logo { display: block; width: 220px; max-width: 100%; height: auto; margin: 0 auto 8px; object-fit: contain; }
.login-brand h1 { color: #020617; font-size: 18px; line-height: 28px; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.form-field { display: flex; flex-direction: column; gap: 4px; }
.form-field label { color: #020617; font-size: 14px; line-height: 20px; }
.login-input { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 34px; padding: 0 12px; border: 1px solid #cbd5e1; border-radius: 2px; color: #0f172a; background: #fff; font-size: 14px; font-weight: 600; outline: none; box-shadow: none; }
.login-input::placeholder { color: #64748b; opacity: 1; }
.login-input:hover, .login-input:focus, .login-input:focus-visible, .login-input:active { border-color: #cbd5e1; outline: none; box-shadow: none; transform: none; }
.login-input:-webkit-autofill, .login-input:-webkit-autofill:hover, .login-input:-webkit-autofill:focus, .login-input:-webkit-autofill:active { -webkit-text-fill-color: #0f172a; border-color: #cbd5e1; box-shadow: 0 0 0 1000px #fff inset; caret-color: #0f172a; outline: none; transition: background-color 999999s ease-in-out 0s; }
.password-field { position: relative; }
.password-field input { padding-right: 40px; }
.password-toggle { position: absolute; top: 0; right: 0; bottom: 0; display: grid; width: 40px; place-items: center; border: 0; border-radius: 2px; color: #475569; background: transparent; }
.password-toggle:hover { color: #020617; }
.password-toggle .icon { width: 16px; height: 16px; }
.remember-field { display: flex; width: fit-content; align-items: center; gap: 8px; color: #020617; font-size: 14px; line-height: 20px; }
.remember-field input { width: 15px; height: 15px; margin: 0; border-radius: 2px; accent-color: #347fb6; }
.login-submit { width: 100%; height: 36px; margin-top: 4px; padding-top: 0; padding-bottom: 0; font-size: 14px; }
.login-footer { position: absolute; right: 0; bottom: 20px; left: 0; z-index: 1; display: flex; justify-content: center; padding: 0 16px; color: #475569; font-size: 14px; font-weight: 700; text-align: center; }
.form-error { margin-bottom: 16px; padding: 10px 12px; border: 1px solid #f1b8be; border-radius: 3px; background: #fff3f4; color: #a32134; font-size: 12px; line-height: 19px; overflow-wrap: anywhere; }
.form-error strong { display: block; margin-bottom: 2px; }
/* The Monitoring 2FA card has its own size and typography. */
.mfa-card { max-width: 470px; padding: 24px; }
.mfa-brand .login-logo { width: 200px; }
.mfa-brand h1 { font-size: 18px; line-height: 28px; }
.mfa-brand>p { margin-top: 8px; color: #475569; font-size: 13px; font-weight: 600; line-height: 20px; }
.mfa-form .code-input { height: 38px; padding: 0 12px; text-align: center; font-size: 18px; font-weight: 700; letter-spacing: .25em; line-height: 28px; }
.mfa-form .code-input::placeholder { color: #94a3b8; }
.mfa-form .code-input:focus, .mfa-form .code-input:focus-visible { border-color: #009bd3; }
.mfa-form .login-submit, .mfa-recovery .login-submit { margin-top: 16px; flex-shrink: 0; box-shadow: none; }
.mfa-form { gap: 0; }
.mfa-form .button:disabled { opacity: .5; pointer-events: none; }
.mfa-form .button:focus-visible, .mfa-recovery .button:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(52,127,182,.4); }
.mfa-recovery { margin-top: 20px; padding: 16px; border: 1px solid #fde68a; border-radius: 3px; background: #fffbeb; }
.mfa-recovery h2 { color: #020617; font-size: 14px; line-height: 20px; }
.recovery-codes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.recovery-codes li { min-width: 0; padding: 4px 8px; border-radius: 3px; background: #fff; text-align: center; }
.recovery-codes code { font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; font-size: 12px; font-weight: 700; line-height: 16px; letter-spacing: .08em; color: #1e293b; overflow-wrap: anywhere; }
.monitoring-notifications { position: fixed; left: 16px; top: 16px; z-index: 50; display: flex; width: min(360px,calc(100vw - 32px)); flex-direction: column; gap: 8px; }
.monitoring-notification { padding: 12px 16px; border: 1px solid transparent; border-radius: 4px; box-shadow: 0 12px 28px rgba(0,0,0,.2); transform: translateX(0); opacity: 1; transition: transform 300ms,opacity 300ms; }
.monitoring-notification.notification-hidden { transform: translateX(-120%); opacity: 0; }
.notification-success { background: #10b981; color: #fff; border-color: rgba(16,185,129,.3); }
.notification-error { background: #ef4444; color: #fff; border-color: rgba(239,68,68,.3); }
.notification-warning { background: #fbbf24; color: #020617; border-color: rgba(251,191,36,.4); }
.notification-title { font-size: 14px; font-weight: 700; line-height: 20px; }
.notification-message { margin-top: 4px; font-size: 12px; line-height: 20px; opacity: .9; }
@media (min-width: 640px) { .mfa-card { padding-right: 28px; padding-left: 28px; } }

/* Monitoring application frame. */
.app-shell { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }
.app-sidebar { display: flex; width: 222px; height: 100%; flex: 0 0 222px; flex-direction: column; background: #00364a; color: #fff; }
.sidebar-brand { display: flex; height: 54px; flex-shrink: 0; align-items: center; padding: 0 12px; color: #fff; font-size: 24px; font-weight: 700; line-height: 1; letter-spacing: -.08em; white-space: nowrap; }
.sidebar-brand span { white-space: pre; letter-spacing: -.05em; }
.sidebar-navigation { flex: 1; }
.sidebar-link { display: flex; height: 36px; align-items: center; gap: 12px; padding: 0 12px; color: rgba(255,255,255,.95); font-size: 14px; line-height: 1; }
.sidebar-link .icon { width: 16px; height: 16px; color: rgba(255,255,255,.9); stroke-width: 1.7; }
.sidebar-link:hover { background: #002f43; }
.sidebar-link.active { background: #002d40; font-weight: 700; }
.sidebar-bottom { display: flex; height: 36px; flex-shrink: 0; align-items: center; justify-content: flex-end; padding: 0 12px; border-bottom: 2px solid #6e2c77; color: rgba(255,255,255,.7); }
.sidebar-bottom .icon { width: 16px; height: 16px; }
.sidebar-bottom .icon:first-child { margin-right: -4px; }
.sidebar-bottom .icon:last-child { margin-left: -8px; }
.app-workspace { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.app-header { display: flex; height: 47px; flex-shrink: 0; align-items: center; justify-content: flex-end; padding: 0 16px; border-bottom: 1px solid #d8dde2; background: #fff; color: #1e293b; }
.account-menu { position: relative; }
.header-icon { display: grid; width: 20px; height: 20px; place-items: center; }
.header-icon:hover { color: #006fa3; }
.header-icon .icon { width: 18px; height: 18px; }
.account-popover { position: absolute; top: 32px; right: 0; z-index: 40; width: 236px; overflow: hidden; border: 1px solid #c9d1d9; border-radius: 3px; background: #fff; color: #020617; box-shadow: 0 8px 24px rgba(15,23,42,.14); }
.account-identity { display: flex; align-items: center; gap: 12px; padding: 12px; }
.account-identity:hover { background: #eef6fb; }
.avatar { display: grid; width: 32px; height: 32px; flex-shrink: 0; place-items: center; border-radius: 50%; background: #dbe3ea; color: #334155; font-size: 11px; font-weight: 700; }
.account-text { min-width: 0; flex: 1; }
.account-text strong { display: block; overflow: hidden; font-size: 14px; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; }
.account-text > span { display: block; overflow: hidden; color: #64748b; font-size: 12px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.account-identity > .icon { width: 16px; height: 16px; color: #94a3b8; }
.account-logout { width: 100%; padding: 10px 12px; border: 0; border-top: 1px solid #d8dde2; background: #fff; color: #020617; font-size: 13px; font-weight: 600; text-align: left; }
.account-logout:hover { background: #eef6fb; }
.app-content { min-width: 0; min-height: 0; flex: 1; overflow: auto; }
.app-footer { position: relative; display: flex; height: 30px; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 12px; padding: 0 8px; border-top: 1px solid #d8dde2; background: #fff; color: #475569; font-size: 12px; font-weight: 600; }
.footer-links { display: flex; height: 100%; align-items: center; gap: 16px; }
.footer-links a, .privacy-menu summary { color: #1c65b0; }
.footer-links a:hover, .privacy-menu summary:hover { text-decoration: underline; }
.privacy-menu { position: relative; height: 100%; }
.privacy-menu summary { display: flex; height: 100%; align-items: center; gap: 4px; }
.privacy-menu summary .icon { width: 14px; height: 14px; }
.privacy-menu[open] summary .icon { transform: rotate(180deg); }
.privacy-popover { position: absolute; bottom: 30px; left: 0; z-index: 40; width: 212px; padding: 8px 0; border: 1px solid #d8dde2; border-radius: 2px 2px 0 0; background: #fff; box-shadow: 0 8px 24px rgba(15,23,42,.12); }
.privacy-popover a { display: block; padding: 4px 8px; }

@media (min-width: 640px) { .login-card { padding-right: 28px; padding-left: 28px; } }
@media (max-width: 900px) {
  .app-shell { flex-direction: column; }
  .app-sidebar { width: 100%; height: auto; flex: 0 0 auto; }
  .sidebar-brand { height: 46px; }
  .sidebar-navigation { display: flex; }
  .sidebar-link { min-height: 38px; flex: 1; }
  .sidebar-bottom { display: none; }
  .app-workspace { min-height: 0; }
  .app-header { height: 40px; }
}
@media (max-width: 440px) {
  .app-footer { font-size: 10px; }
  .footer-links { gap: 12px; }
  .sidebar-link { gap: 8px; font-size: 12px; }
}
@media (max-height: 660px) {
  .login-main { padding-bottom: 64px; }
  .login-footer { position: absolute; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
