/*
 * NetOps theme. Loaded after the W3CRM stylesheet by _Layout and by _AuthLayout, so it restyles
 * the framework's console without forking it: Peach.Core still owns the markup, this file owns
 * the look. Colours are tokens on :root; change them here, not in a view.
 *
 * Why the !important on a handful of rules: W3CRM colours its chrome through attribute selectors
 * on <body> ([data-sidebarbg="color_1"] .deznav ...) that out-rank a plain class selector. They
 * are confined to the header, nav header and sidebar.
 */

:root {
    /* Surfaces */
    --no-ink: #0b1220;          /* sidebar, nav header, sign-in panel */
    --no-ink-2: #111a2e;        /* top header, raised dark surfaces */
    --no-ink-line: #1e293b;     /* hairlines on dark */
    --no-page: #f3f5f8;         /* console page background */
    --no-card: #ffffff;
    --no-line: #e2e8f0;

    /* Text */
    --no-text: #0f172a;
    --no-text-2: #475569;
    --no-text-on-ink: #e2e8f0;
    --no-text-on-ink-2: #94a3b8;

    /* Signal. Teal is the brand; the three status colours are reserved for device state and
       finding severity, so they are never used decoratively. */
    --no-accent: #0d9488;
    --no-accent-hover: #0f766e;
    --no-accent-bright: #2dd4bf;  /* on dark surfaces only */
    --no-ok: #16a34a;
    --no-warn: #d97706;
    --no-crit: #dc2626;

    --no-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --no-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

    /* Re-point the theme's own variables so every .btn-primary, link and badge follows. */
    --primary: var(--no-accent);
    --primary-hover: var(--no-accent-hover);
    --primary-dark: #134e4a;
    --bs-primary: var(--no-accent);
    --bs-primary-rgb: 13, 148, 136;
    --bs-success: var(--no-ok);
    --bs-warning: var(--no-warn);
    --bs-danger: var(--no-crit);
    --font-family-base: var(--no-font);
    --font-family-title: var(--no-font);
    --title: var(--no-text);
}

/* ---------------------------------------------------------------------------------------------
   Console
   --------------------------------------------------------------------------------------------- */

body {
    font-family: var(--no-font);
    background: var(--no-page);
    color: var(--no-text);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--no-font);
    color: var(--no-text);
}

/* Technical values read as data, not prose. Views opt in with .mono; hostnames, addresses,
   rule keys and config bodies already sit in <code>/<pre>. */
.mono, code, kbd, pre, samp {
    font-family: var(--no-mono);
    font-size: .875em;
}

code {
    color: var(--no-accent-hover);
}

/* Chrome: one dark rail down the left and across the top, so content is the only light area. */
.nav-header,
.header,
.deznav {
    background: var(--no-ink) !important;
}

.header {
    border-bottom: 1px solid var(--no-ink-line);
    box-shadow: none !important;
}

.nav-header {
    border-right: 1px solid var(--no-ink-line);
}

.deznav {
    border-right: 1px solid var(--no-ink-line);
    box-shadow: none !important;
}

.nav-header .brand-logo {
    display: flex;
    align-items: center;
    gap: .7rem;
    text-decoration: none;
}

.nav-header .no-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
}

.nav-header .no-wordmark {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -.01em;
    color: #fff;
    line-height: 1.1;
}

.nav-header .no-wordmark small {
    display: block;
    font-weight: 500;
    font-size: .68rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--no-text-on-ink-2);
}

/* Collapsed sidebar: the theme hides .brand-title; hide the wordmark the same way. */
[data-sidebar-style="mini"] .nav-header .no-wordmark,
.menu-toggle .nav-header .no-wordmark {
    display: none;
}

.nav-header .hamburger .line {
    background: var(--no-text-on-ink-2) !important;
}

.deznav .metismenu > li > a,
.deznav .metismenu > li > a .nav-text {
    color: var(--no-text-on-ink-2) !important;
    font-weight: 500;
}

.deznav .metismenu > li > a i,
.deznav .metismenu > li > a [class*="fa-"] {
    color: var(--no-text-on-ink-2) !important;
}

.deznav .metismenu > li:hover > a,
.deznav .metismenu > li:hover > a .nav-text,
.deznav .metismenu > li:hover > a i {
    color: #fff !important;
}

.deznav .metismenu > li.mm-active > a {
    background: rgba(45, 212, 191, .1) !important;
    box-shadow: inset 3px 0 0 var(--no-accent-bright) !important;
}

.deznav .metismenu > li.mm-active > a,
.deznav .metismenu > li.mm-active > a .nav-text,
.deznav .metismenu > li.mm-active > a i {
    color: var(--no-accent-bright) !important;
}

.deznav .metismenu ul a {
    color: var(--no-text-on-ink-2) !important;
}

.deznav .metismenu ul a:hover,
.deznav .metismenu ul .mm-active > a {
    color: #fff !important;
}

.header .search-area .form-control,
.header .search-area .input-group-text {
    background: var(--no-ink-2) !important;
    border-color: var(--no-ink-line) !important;
    color: var(--no-text-on-ink);
}

.header .header-right .nav-link,
.header .header-right .header-info span,
.header .header-right .header-info small {
    color: var(--no-text-on-ink) !important;
}

.content-body {
    background: var(--no-page);
}

.page-titles {
    background: transparent;
    border-bottom: 1px solid var(--no-line);
    box-shadow: none;
}

.page-titles h3 {
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: -.01em;
}

.card {
    border: 1px solid var(--no-line);
    border-radius: .6rem;
    box-shadow: none;
}

.table > thead th {
    font-size: .75rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--no-text-2);
}

.btn-primary {
    background-color: var(--no-accent);
    border-color: var(--no-accent);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--no-accent-hover) !important;
    border-color: var(--no-accent-hover) !important;
}

.btn-outline-primary {
    color: var(--no-accent);
    border-color: var(--no-accent);
}

.btn-outline-primary:hover {
    background-color: var(--no-accent);
    border-color: var(--no-accent);
    color: #fff;
}

a {
    color: var(--no-accent-hover);
}

.footer {
    background: transparent;
    border-top: 1px solid var(--no-line);
}

.footer .copyright p {
    color: var(--no-text-2);
    font-size: .8rem;
}

/* ---------------------------------------------------------------------------------------------
   Signed-out pages (_AuthLayout): sign in, forgot / reset password, lockout, access denied.
   --------------------------------------------------------------------------------------------- */

.auth {
    display: flex;
    min-height: 100vh;
    background: var(--no-page);
}

.auth-brand {
    position: relative;
    flex: 1 1 46%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 3.5rem;
    color: var(--no-text-on-ink);
    background: var(--no-ink);
    overflow: hidden;
}

/* The topology drawing sits behind the copy; it is decoration, so it never takes pointer events
   and is hidden from assistive tech in the markup. */
.auth-brand .auth-topology {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.auth-brand > * {
    position: relative;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: .8rem;
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -.01em;
}

.auth-logo img {
    width: 40px;
    height: 40px;
}

.auth-logo small {
    display: block;
    font-weight: 500;
    font-size: .7rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--no-text-on-ink-2);
}

/* Colour stated on every heading here: W3CRM carries a bare h1 { color: #2c2c2c } which would
   otherwise render near-black on the dark panel. */
.auth-brand h1 {
    font-size: 2.3rem;
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.15;
    color: #fff;
    margin: 0 0 1rem;
    max-width: 34rem;
}

.auth-brand h1 span {
    color: var(--no-accent-bright);
}

.auth-brand .lead-line {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--no-text-on-ink-2);
    max-width: 29rem;
    margin: 0 0 2rem;
}

.auth-points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .9rem;
    max-width: 29rem;
}

.auth-points li {
    display: flex;
    gap: .8rem;
    align-items: flex-start;
    font-size: .92rem;
    line-height: 1.5;
    color: var(--no-text-on-ink);
}

.auth-points .dot {
    flex: 0 0 .55rem;
    height: .55rem;
    margin-top: .45rem;
    border-radius: 50%;
    background: var(--no-accent-bright);
    box-shadow: 0 0 0 4px rgba(45, 212, 191, .15);
}

.auth-foot {
    font-family: var(--no-mono);
    font-size: .72rem;
    color: #64748b;
    letter-spacing: .02em;
}

.auth-main {
    flex: 1 1 54%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.25rem;
}

.auth-card {
    width: 100%;
    max-width: 25rem;
}

/* Only shown once the brand panel is hidden on small screens. */
.auth-card .auth-logo {
    display: none;
    color: var(--no-text);
    margin-bottom: 2rem;
}

.auth-card h2 {
    font-size: 1.55rem;
    font-weight: 600;
    letter-spacing: -.015em;
    color: var(--no-text);
    margin: 0 0 .35rem;
}

.auth-card .sub {
    color: var(--no-text-2);
    font-size: .93rem;
    line-height: 1.55;
    margin-bottom: 1.75rem;
}

.auth-card .form-label {
    font-size: .82rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: .35rem;
}

.auth-card .form-control {
    height: 2.9rem;
    border-radius: .5rem;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: var(--no-text);
    font-size: .95rem;
}

/* The theme's placeholder grey measured 2.4:1. This clears 4.5:1 while staying lighter than
   typed text, so a hint never reads as a filled-in value. */
.auth-card .form-control::placeholder {
    color: #64748b;
    opacity: 1;
}

.auth-card .form-control:focus {
    border-color: var(--no-accent);
    box-shadow: 0 0 0 .2rem rgba(13, 148, 136, .18);
}

.auth-card .pw-wrap {
    position: relative;
}

.auth-card .pw-wrap .form-control {
    padding-right: 3.5rem;
}

.auth-card .pw-toggle {
    position: absolute;
    top: 0;
    right: 0;
    height: 2.9rem;
    padding: 0 .9rem;
    border: 0;
    background: none;
    color: #475569;
    font-size: .78rem;
    font-weight: 600;
}

.auth-card .pw-toggle:hover {
    color: var(--no-accent);
}

.auth-card .form-check-label {
    font-size: .875rem;
    color: #334155;
}

.auth-card .form-check-input:checked {
    background-color: var(--no-accent);
    border-color: var(--no-accent);
}

.auth-card a.auth-link {
    font-size: .875rem;
    font-weight: 500;
    color: var(--no-accent-hover);
    text-decoration: none;
}

.auth-card a.auth-link:hover {
    text-decoration: underline;
}

.auth-card .btn-auth {
    height: 2.9rem;
    border-radius: .5rem;
    font-weight: 600;
    font-size: .95rem;
    background: var(--no-accent);
    border-color: var(--no-accent);
    color: #fff;
}

.auth-card .btn-auth:hover,
.auth-card .btn-auth:focus {
    background: var(--no-accent-hover);
    border-color: var(--no-accent-hover);
    color: #fff;
}

.auth-card .btn-outline-secondary {
    height: 2.9rem;
    border-radius: .5rem;
    font-weight: 500;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.6rem 0 1.2rem;
    color: #64748b;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--no-line);
}

/* A status line for the confirmation / lockout / denied pages: the same three signal colours
   the fleet uses, so "locked" looks like a warning and "denied" like a fault. */
.auth-status {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--no-mono);
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .03em;
    padding: .3rem .65rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
}

.auth-status::before {
    content: "";
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: currentColor;
}

.auth-status.ok { color: var(--no-ok); background: rgba(22, 163, 74, .1); }
.auth-status.warn { color: #b45309; background: rgba(217, 119, 6, .12); }
.auth-status.crit { color: var(--no-crit); background: rgba(220, 38, 38, .1); }

@media (max-width: 991.98px) {
    .auth-brand {
        display: none;
    }

    .auth-card .auth-logo {
        display: flex;
    }

    .auth-main {
        flex: 1 1 100%;
    }
}
