/*
  SwiftRemote - the whole stylesheet.

  Dark, because this is a program people open in front of a remote desktop and a bright page beside a dark
  session is the thing that makes eyes hurt. Everything is a custom property so a light theme can be added by
  redefining this block and nothing else.
*/
:root {
    --bg:          #0b0d10;
    --bg-raised:   #14171c;
    --bg-hover:    #1b1f26;
    --line:        #262b33;
    --text:        #e6e9ee;
    --text-dim:    #9aa3b0;
    --text-faint:  #6b7482;
    --accent:      #3ea6ff;
    --accent-dim:  #2b7fc4;
    --good:        #4ccf7f;
    --warn:        #e0b341;
    --bad:         #e5615e;
    --radius:      10px;
    --gutter:      16px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* The 16px side gutter is the phone's, and nothing may scroll sideways out of it. */
.wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ---------------------------------------------------------------- header */

header.site {
    border-bottom: 1px solid var(--line);
    background: rgba(11, 13, 16, 0.9);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 10;
}
header.site .wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 58px;
}
.brand {
    font-weight: 650;
    font-size: 17px;
    letter-spacing: -0.01em;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 9px;
}
.brand:hover { text-decoration: none; }
.brand svg { display: block; }
.spacer { flex: 1; }
.nav-link { color: var(--text-dim); font-size: 14px; }
.nav-link:hover { color: var(--text); text-decoration: none; }

/* ---------------------------------------------------------------- buttons */

.btn {
    display: inline-block;
    border: 1px solid var(--line);
    background: var(--bg-raised);
    color: var(--text);
    border-radius: 8px;
    padding: 9px 16px;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
}
.btn:hover { background: var(--bg-hover); text-decoration: none; }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #04121f;
    font-weight: 600;
}
.btn-primary:hover { background: var(--accent-dim); border-color: var(--accent-dim); }
.btn-block { display: block; width: 100%; }

/* ---------------------------------------------------------------- forms */

label { display: block; font-size: 13px; color: var(--text-dim); margin: 0 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=tel], select {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    padding: 10px 12px;
    font: inherit;
    font-size: 15px;   /* never below 16px-ish on iOS or it zooms the page on focus */
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.field { margin: 0 0 16px; }
.row-check { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; }
.row-check label { margin: 0; color: var(--text); font-size: 14px; }

.msg { border-radius: 8px; padding: 10px 12px; font-size: 14px; margin: 0 0 16px; display: none; }
.msg.show { display: block; }
.msg-error { background: rgba(229, 97, 94, 0.12); border: 1px solid rgba(229, 97, 94, 0.4); color: #ffb3b1; }
.msg-info  { background: rgba(62, 166, 255, 0.10); border: 1px solid rgba(62, 166, 255, 0.35); color: #b3dcff; }

/* ---------------------------------------------------------------- cards / panels */

.card {
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
}
.card-narrow { max-width: 400px; margin: 56px auto; }
.card h1 { margin: 0 0 6px; font-size: 21px; letter-spacing: -0.01em; }
.card .sub { margin: 0 0 22px; color: var(--text-dim); font-size: 14px; }

.sep {
    display: flex; align-items: center; gap: 12px;
    color: var(--text-faint); font-size: 12px; margin: 20px 0;
}
.sep::before, .sep::after { content: ""; height: 1px; background: var(--line); flex: 1; }

/* ---------------------------------------------------------------- landing */

.hero { padding: 88px 0 72px; text-align: center; }
.hero h1 {
    margin: 0 0 18px;
    font-size: 46px;
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-weight: 700;
}
.hero p {
    margin: 0 auto 30px;
    max-width: 580px;
    color: var(--text-dim);
    font-size: 18px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
    padding: 0 0 80px;
}
.feature h3 { margin: 0 0 8px; font-size: 16px; }
.feature p { margin: 0; color: var(--text-dim); font-size: 14px; }

footer.site {
    border-top: 1px solid var(--line);
    padding: 26px 0;
    color: var(--text-faint);
    font-size: 13px;
}
footer.site .wrap { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------- machine list */

.toolbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 20px 0 14px;
}
.toolbar h1 { margin: 0; font-size: 20px; }
.count { color: var(--text-dim); font-size: 14px; }

.machines { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; padding: 0 0 40px; }
.machine {
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.machine.offline { opacity: 0.55; }
.machine .top { display: flex; align-items: baseline; gap: 8px; }
.machine .name { font-weight: 600; font-size: 15px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.machine .meta { color: var(--text-faint); font-size: 12.5px; line-height: 1.5; }
.machine .meta div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot-on   { background: var(--good); }
.dot-busy { background: var(--warn); }
.dot-off  { background: var(--text-faint); }

.state { font-size: 12.5px; color: var(--text-dim); }

.empty { text-align: center; color: var(--text-dim); padding: 70px 0; }

/* ---------------------------------------------------------------- phone */

@media (max-width: 640px) {
    .hero { padding: 56px 0 44px; }
    .hero h1 { font-size: 34px; }
    .hero p { font-size: 16px; }
    .card-narrow { margin: 28px auto; }
    .machines { grid-template-columns: 1fr; }
}
