/*
 * TicketOS agent login, "Dark NOC" like the staff panel: dark page with a
 * faint grid and glows, a dark card, cyan accents. Loaded after login.css
 * (include/staff/login.header.php). A backdrop or logo uploaded in Admin
 * Panel -> Settings -> Company is still used: the plain page applies only
 * with body.tos-plain (no custom backdrop).
 */
:root {
    color-scheme: dark;
    --ui-bg: #0b1220; --ui-surface: #111a2e; --ui-raised: #16213a; --ui-input: #0c1528;
    --ui-border: #1f2c48; --ui-border-strong: #2b3c60; --ui-text: #e6edf7; --ui-text-2: #c3cee0;
    --ui-muted: #8b9bb8; --ui-faint: #5f708f; --ui-cyan: #6b9bd8; --ui-link: #8db4e6; --ui-danger: #f87171;
    --ui-gradient: linear-gradient(180deg, #3d70c9, #3463b5);
    --ui-font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
body, input, button { font-family: var(--ui-font); }
body.tos-plain {
    background-color: var(--ui-bg);
    background-image:
        radial-gradient(700px 380px at 15% 0%, rgba(64, 104, 170, .14), transparent 60%),
        radial-gradient(600px 360px at 90% 100%, rgba(96, 140, 200, .08), transparent 60%),
        linear-gradient(rgba(148, 163, 184, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, .04) 1px, transparent 1px);
    background-size: auto, auto, 44px 44px, 44px 44px;
    background-attachment: fixed;
}
body.tos-plain #brickwall, body.tos-plain #blur, body.tos-plain #background, body.tos-plain #background-compat { display: none; }

#loginBox {
    width: 380px;
    margin-left: -190px;
    top: 14%;
    padding: 32px 32px 24px;
    text-align: left;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(22, 33, 58, .95), rgba(17, 26, 46, .97));
    border: 1px solid var(--ui-border-strong);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(96, 140, 200, .03), inset 0 1px 0 rgba(255, 255, 255, .04);
    color: var(--ui-text);
}
#loginBox::before {   /* a thin glowing line along the top of the card */
    content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96, 140, 200, .44), rgba(64, 104, 170, .40), transparent);
}
#loginBox:after { display: none; }
#logo a { text-align: left; height: auto; }
#logo .valign-helper { display: none; }
.tos-wordmark {
    display: inline-flex; align-items: center; gap: 10px;
    color: #fff; font-size: 20px; font-weight: 650; letter-spacing: -.01em;
}
#logo a .tos-wordmark img {
    width: 34px; height: 34px; max-height: none; border-radius: 9px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .08);
}
#loginBox form { width: auto; margin: 0; }
#loginBox fieldset { margin: 0; }
.tos-login-title { margin: 22px 0 4px; font-size: 18px; font-weight: 600; color: #fff; }
.tos-login-sub { margin: 0 0 16px; font-size: 13px; color: var(--ui-muted); }
#login-message { margin: 0 0 10px; font-size: 13px; font-weight: 500; color: var(--ui-danger); text-align: left; }
#login-message:empty { display: none; }
form, fieldset { margin: 0; padding: 0; border: 0; }
#loginBox fieldset input, #loginBox fieldset input[type=password] {
    display: block; box-sizing: border-box; width: 100%; height: 42px; margin: 0 0 12px;
    padding: 8px 12px; border: 1px solid var(--ui-border-strong); border-radius: 8px;
    font-size: 14px; color: var(--ui-text); background: var(--ui-input); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .3);
}
#loginBox fieldset input::placeholder { color: var(--ui-faint); }
fieldset input:focus, input:focus {
    outline: none; border-color: var(--ui-cyan); box-shadow: 0 0 0 3px rgba(96, 140, 200, .10);
}
fieldset h3 { display: block !important; margin: 0 0 14px; text-align: right; font-size: 13px; font-weight: 500; }
fieldset h3 a { color: var(--ui-link); }
#loginBox .button, #loginBox button[type=submit], #loginBox input[type=submit] {
    float: none !important; display: block; width: 100%; height: 42px; margin: 4px 0 0; padding: 0;
    border: 0; border-radius: 8px; background: var(--ui-gradient); color: #fff;
    font-size: 14px; font-weight: 600; cursor: pointer;
    box-shadow: 0 6px 18px rgba(64, 104, 170, .17), inset 0 1px 0 rgba(255, 255, 255, .18);
    transition: filter .15s ease, box-shadow .15s ease;
}
#loginBox .button:hover, #loginBox button[type=submit]:hover, #loginBox input[type=submit]:hover {
    color: #fff; filter: brightness(1.1); box-shadow: 0 8px 24px rgba(96, 140, 200, .25), inset 0 1px 0 rgba(255, 255, 255, .2);
}
div.banner:not(:empty) { border-radius: 8px; border-color: var(--ui-border); background: var(--ui-raised); color: var(--ui-text-2); text-align: left; }
#loginBox hr { display: none; }
#company { position: static; width: auto; margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--ui-border); }
#company .content {
    display: block; padding: 0; background: none; box-shadow: none; border-radius: 0;
    color: var(--ui-faint); font-size: 12px; text-align: center; text-shadow: none;
}
#company .nettxio-tm { color: var(--ui-muted); }
#poweredBy { background: transparent; color: var(--ui-faint); text-shadow: none; box-shadow: none; }
#poweredBy a, #poweredBy .nettxio-tm { color: var(--ui-muted); }
@media (max-width: 440px) {
    #loginBox { width: auto; left: 16px; right: 16px; margin-left: 0; padding: 24px 20px 18px; }
}

/* ---- Motion (subtle; off when the device asks for reduced motion) ------- */
@keyframes tos-rise  { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes tos-drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-44px, -44px, 0); } }
@keyframes tos-breathe { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }
@keyframes tos-glow {
    0%, 100% { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
    50%      { box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); }
}
@keyframes tos-sweep { from { background-position: 200% 0; } to { background-position: -200% 0; } }
body.tos-plain { background-image: none; }
body.tos-plain::before, body.tos-plain::after { content: ""; position: fixed; pointer-events: none; z-index: -1; }
body.tos-plain::before { content: none; }
body.tos-plain::after { content: none; }
#loginBox { animation: tos-rise .6s cubic-bezier(.2, .8, .2, 1) backwards; }
#loginBox::before {
    background: linear-gradient(90deg, transparent, rgba(96, 140, 200, .35), transparent);
    animation: none;
}
#logo a .tos-wordmark img { animation: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
#loginBox fieldset input { transition: border-color .15s ease, box-shadow .2s ease; }
#loginBox .button, #loginBox button[type=submit], #loginBox input[type=submit] {
    background-image: var(--ui-gradient);
    background-size: 100% 100%;
    background-position: 0% 50%;
    transition: background-position .6s ease, box-shadow .2s ease, transform .15s ease, filter .2s ease;
}
#loginBox .button:hover, #loginBox button[type=submit]:hover, #loginBox input[type=submit]:hover { background-position: 100% 50%; transform: translateY(-1px); }
#loginBox .button:active, #loginBox button[type=submit]:active { transform: scale(.98); }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
