/* SPECOMSYS Cloud — same "equipment panel" look as the controllers' web UI */
@font-face { font-family: 'Manrope'; font-weight: 200 800; font-display: swap; src: url(manrope-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-weight: 200 800; font-display: swap; src: url(manrope-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122; }
:root {
    --bg: #121417; --side: #0d0f12; --panel: #171a1e; --raise: #1d2126; --zebra: #1a1d22; --hover: #22272d;
    --line: #252a30; --line-2: #323840; --text: #dde1e5; --soft: #b3bac1; --muted: #7f878f; --dim: #5a6168;
    --blue: #4c9dff; --blue-deep: #2a6fc4; --green: #3cc480; --red: #ff5d52; --amber: #e6a83c;
    --mono: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: 'Manrope', 'Segoe UI', Roboto, Arial, sans-serif; font-size: 14px; line-height: 1.55; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; font-weight: 300; color: #fff; margin: 4px 0 18px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.ok { color: var(--green); } .no { color: var(--red); } .warn { color: var(--amber); }

.side { position: fixed; inset: 0 auto 0 0; width: 232px; background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.side { z-index: 30; transition: transform .25s ease; }
.brand { display: block; padding: 22px 24px 20px; border-bottom: 1px solid var(--line); transition: opacity .2s; }
.brand:hover { opacity: .85; }
.brand img { display: block; width: 100%; height: auto; }
.nav { flex: 1; padding: 14px 0; overflow-y: auto; }
.nav a { transition: color .15s, background .15s; }
.badge { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 6px; border-radius: 9px; background: var(--amber); color: #121417;
    font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; vertical-align: 1px; }
/* the maker's logo (SPECOMSYS.BG) at the bottom of the menu: plain, no box */
.maker-link { display: flex; align-items: center; margin: 0 24px 12px; padding: 4px 0; opacity: .8; transition: opacity .25s; }
.maker-link img { height: 18px; width: auto; transition: transform .35s ease; }
.maker-link small { font-size: 10.5px; color: var(--muted); letter-spacing: .04em; }
.maker-link:hover { text-decoration: none; opacity: 1; }
.maker-link:hover img { transform: scale(1.04); }
.logout { display: block; width: calc(100% - 48px); margin: 2px 24px 20px; height: 34px; border: 1px solid var(--line-2); background: transparent;
    color: var(--muted); border-radius: 6px; font: inherit; font-size: 13px; cursor: pointer; transition: color .15s, border-color .15s; }
.logout:hover { color: var(--text); border-color: var(--muted); }
.nav a { display: block; padding: 7px 24px; color: var(--soft); font-size: 13.5px; }
.nav a:hover { color: #fff; text-decoration: none; background: rgba(255, 255, 255, .025); }
.nav a.active { color: #fff; background: rgba(255, 255, 255, .055); }
.nav-group { padding: 18px 24px 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--dim); }
.main { margin-left: 232px; min-height: 100vh; display: flex; flex-direction: column; }
.plate { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 18px; padding: 0 32px; height: 62px;
    background: rgba(18, 20, 23, .94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.plate-id { flex: 1; min-width: 0; }
.plate-name { font-size: 15px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plate-model { font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leds { display: flex; align-items: center; gap: 18px; }
.led { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); }
.led i { width: 7px; height: 7px; border-radius: 50%; background: #3a4047; }
.led.on { color: var(--soft); }
.led.on i { background: var(--green); box-shadow: 0 0 8px rgba(60, 196, 128, .7); }
.led-link { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.led-link:hover { color: #fff; text-decoration: none; }
.burger { display: none; width: 36px; height: 36px; background: none; border: 1px solid var(--line-2); border-radius: 6px; padding: 9px 8px; cursor: pointer; }
.burger i { display: block; height: 1.5px; background: var(--soft); margin: 3.5px 0; }
.scrim { display: none; }
.page { padding: 26px 32px 48px; max-width: 1240px; width: 100%; }
.crumb { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--dim); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 20px; overflow-x: auto; }
.panel-title { padding: 12px 20px; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.panel-title .grow { flex: 1; }
.row { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; padding: 13px 20px; border-bottom: 1px solid var(--line); align-items: center; }
.row:last-child { border-bottom: 0; }
.row small { display: block; color: var(--muted); font-size: 12px; }
.actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; background: var(--raise); border-top: 1px solid var(--line); }
.head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.head h1 { margin-bottom: 0; }
.head .grow { flex: 1; }

.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; background: var(--panel); margin-bottom: 20px; }
.stats div { padding: 16px 20px; border-right: 1px solid var(--line); }
.stats div:last-child { border-right: 0; }
.stats b { display: block; font-size: 26px; font-weight: 300; color: #fff; }
.stats span { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 10px 16px; font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); background: var(--raise); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
td { padding: 10px 16px; color: var(--soft); border-bottom: 1px solid #1f2328; }
tbody tr:nth-child(even) td { background: var(--zebra); }
tbody tr:hover td { background: var(--hover); }
tr.off td { color: var(--dim); }
td.strong { color: var(--text); }
/* row buttons wrap onto more lines instead of running past the right edge */
td.act { text-align: right; white-space: normal; min-width: 220px; }
td.act > .btn, td.act > form.i { display: inline-block; margin: 2px 0 2px 4px; }
td.act > .btn { line-height: 26px; }
.empty { padding: 26px 20px; text-align: center; color: var(--muted); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3a4047; margin-right: 6px; vertical-align: 1px; }
.dot.on { background: var(--green); box-shadow: 0 0 6px rgba(60, 196, 128, .7); }

input[type=text], input[type=password], input[type=number], input[type=date], input[type=email], select, textarea {
    height: 36px; width: 100%; max-width: 440px; background: #0f1114; border: 1px solid var(--line-2); border-radius: 6px; color: var(--text); padding: 0 11px; font: inherit; font-size: 13.5px; outline: none;
}
textarea { height: 80px; padding: 8px 11px; }
select[multiple] { height: 110px; padding: 6px; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(76, 157, 255, .16); }
input[type=date]::-webkit-calendar-picker-indicator { filter: invert(.75); }
.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline input, .inline select { width: auto; flex: 1; min-width: 120px; }
.btn { display: inline-flex; align-items: center; height: 34px; padding: 0 15px; border-radius: 6px; border: 1px solid var(--line-2); background: transparent; color: var(--soft); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--muted); color: #fff; text-decoration: none; }
.btn-accent { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.btn-accent:hover { background: #3480dc; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn-danger { border-color: rgba(255, 93, 82, .45); color: #ff8a82; }
form.i { display: inline; }
.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 13px; border: 1px solid var(--line-2); background: var(--raise); }
.flash.err { border-color: rgba(255, 93, 82, .4); color: #ffb0aa; }
.flash.ok { border-color: rgba(60, 196, 128, .4); color: #9de2bd; }
.secret { background: #0d0f12; border: 1px solid var(--line-2); border-radius: 6px; padding: 14px 16px; font-family: var(--mono); color: #cfe3ff; overflow-wrap: anywhere; }

/* login */
body.login { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px 16px; background: radial-gradient(1200px 600px at 50% -10%, #1b2129 0%, var(--bg) 60%); }
.login-box { width: 100%; max-width: 340px; }
.login-box img.logo { display: block; width: 260px; margin: 0 auto; }
.login-tag { text-align: center; margin: 14px 0 30px; font-size: 11px; text-transform: uppercase; letter-spacing: .22em; color: var(--muted); }
.login-box form { display: flex; flex-direction: column; gap: 8px; }
.login-box label { font-size: 12px; color: var(--muted); margin-top: 4px; }
.login-box input { max-width: none; height: 42px; font-size: 15px; }
.cap { display: flex; gap: 10px; align-items: center; }
.cap img { border-radius: 6px; border: 1px solid var(--line-2); height: 44px; }
.cap input { flex: 1; letter-spacing: .3em; font-family: var(--mono); }
.login-box .btn { margin-top: 14px; height: 42px; justify-content: center; font-size: 14px; }
.login-err { margin-top: 10px; padding: 9px 12px; border: 1px solid rgba(255, 93, 82, .35); background: rgba(255, 93, 82, .1); color: #ffb0aa; font-size: 13px; border-radius: 6px; }

@media (max-width: 860px) {
    .side { transform: translateX(-100%); }
    body.nav-open .side { transform: none; }
    body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .5); }
    .main { margin-left: 0; }
    .burger { display: block; }
    .plate { padding: 0 16px; gap: 12px; }
    .page { padding: 18px 16px 40px; }
    .panel { overflow-x: auto; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

/* public "how it works" page */
body.doc-page { background: radial-gradient(1200px 600px at 50% -10%, #1b2129 0%, var(--bg) 60%); }
.doc { max-width: 860px; margin: 0 auto; padding: 40px 20px 60px; }
.doc-logo { height: 40px; width: auto; margin-bottom: 26px; }
.doc h1 { font-size: 30px; margin: 0 0 10px; }
.doc h2 { font-size: 18px; font-weight: 400; color: #fff; margin: 32px 0 10px; }
.doc-lead { color: var(--soft); font-size: 15px; max-width: 700px; }
.doc ul { color: var(--soft); padding-left: 20px; }
.doc li { margin: 6px 0; }
.doc-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.doc-steps div { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; }
.doc-steps b { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; align-items: center; justify-content: center;
    background: var(--blue-deep); color: #fff; font-size: 13px; }
.doc-steps h3 { margin: 10px 0 6px; font-size: 15px; font-weight: 500; color: #fff; }
.doc-steps p { margin: 0; color: var(--muted); font-size: 13.5px; }
.doc-foot { margin-top: 30px; display: flex; gap: 10px; }
.login-how { display: block; text-align: center; margin-top: 18px; font-size: 13px; color: var(--muted); }
.login-how:hover { color: var(--blue); }
/* help inside the portal */
.help { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.help-toc { position: sticky; top: 80px; padding: 8px 0; }
.help-toc a { display: block; padding: 6px 16px; color: var(--soft); font-size: 13px; }
.help-toc a:hover { color: #fff; text-decoration: none; background: rgba(255, 255, 255, .03); }
.help-text { padding: 6px 20px 14px; color: var(--soft); font-size: 13.5px; }
.help-text li { margin: 5px 0; }
@media (max-width: 860px) {
    .doc-steps { grid-template-columns: minmax(0, 1fr); }
    .help { grid-template-columns: minmax(0, 1fr); }
    .help-toc { position: static; }
}
