/* cyberstrux.com, light UI
   Location: /htdocs/assets/css/style.css */

:root {
  --bg:         #ffffff;
  --bg-subtle:  #f6f8fa;
  --bg-input:   #ffffff;
  --fg:         #111111;
  --fg-muted:   #5b6570;
  --fg-faint:   #8b949e;
  --accent:     #0a5fd8;
  --accent-dk:  #084bab;
  --border:     #d8dee4;
  --border-str: #b9c2cc;
  --red:        #c0392b;
  --red-bg:     #fdeceb;
  --green:      #1a7f4b;
  --amber:      #8a5a00;
  --amber-bg:   #fff6e0;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "IBM Plex Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dk); text-decoration: underline; }

h1, h2, h3 { font-weight: 600; margin: 0 0 .6em; }
code { font-family: var(--mono); font-size: .9em; background: var(--bg-subtle);
       border: 1px solid var(--border); border-radius: 3px; padding: .1em .35em; }

/* ------------------------------------------------------------------ *
 * Login screen
 * ------------------------------------------------------------------ */
/* Public pages: header / main / footer stacked, footer pinned to the bottom. */
body.public { display: flex; flex-direction: column; min-height: 100vh; background: var(--bg-subtle); }
body.public main { flex: 1 0 auto; width: 100%; }
body.public .topbar, body.public .foot { background: var(--bg); flex-shrink: 0; }

body.login main {
  flex: 0 0 auto;            /* don't stretch, footer follows the box */
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2.5rem 1rem 2.5rem;
}

.login-box {
  width: 100%;
  max-width: 420px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
  overflow: hidden;
}

.login-box .logo {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
  margin: 0 auto;
  padding: 2rem 1.5rem .5rem;
}

.login-body { padding: .5rem 1.75rem 2rem; }

.login-intro {
  text-align: center;
  color: var(--fg-muted);
  font-size: 13px;
  margin: 0 0 1.75rem;
}

/* ------------------------------------------------------------------ *
 * Forms
 * ------------------------------------------------------------------ */
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 .35rem;
}

input[type=text],
input[type=email],
input[type=password],
textarea,
select {
  width: 100%;
  padding: .55rem .7rem;
  margin-bottom: 1.1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-str);
  border-radius: 6px;
  color: var(--fg);
  font: inherit;
  outline: none;
}

textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10, 95, 216, .15);
}

input::placeholder { color: var(--fg-faint); }

.check {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.1rem;
  font-size: 14px;
  color: var(--fg);
  font-weight: 400;
}
.check input { width: auto; margin: 0; }

button, .btn {
  display: inline-block;
  padding: .55rem 1.1rem;
  background: var(--bg);
  border: 1px solid var(--border-str);
  border-radius: 6px;
  color: var(--fg);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
button:hover, .btn:hover { background: var(--bg-subtle); text-decoration: none; }

button[type=submit], .btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
button[type=submit]:hover, .btn-primary:hover {
  background: var(--accent-dk);
  border-color: var(--accent-dk);
  color: #fff;
}

button.block { width: 100%; }

.btn-danger, button.btn-danger {
  background: var(--bg);
  border-color: var(--border-str);
  color: var(--red);
}
.btn-danger:hover, button.btn-danger:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.btn-sm { padding: .3rem .65rem; font-size: 13px; }

/* ------------------------------------------------------------------ *
 * Flash / alerts
 * ------------------------------------------------------------------ */
.flash {
  padding: .65rem .85rem;
  margin-bottom: 1.1rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  background: var(--bg-subtle);
  font-size: 14px;
}
.flash-err  { border-left-color: var(--red);   color: var(--red);   background: var(--red-bg);   border-color: #f3c9c5; }
.flash-warn { border-left-color: var(--amber); color: var(--amber); background: var(--amber-bg); border-color: #f0dfb4; }

/* ------------------------------------------------------------------ *
 * Admin chrome
 * ------------------------------------------------------------------ */
.topbar {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
  padding: .65rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.brand { display: flex; align-items: center; line-height: 0; }
.brand img { height: 32px; width: auto; display: block; }

.topnav { display: flex; gap: 1.25rem; font-size: 14px; }
.topnav a { color: var(--fg-muted); padding: .15rem 0; border-bottom: 2px solid transparent; }
.topnav a:hover { color: var(--fg); text-decoration: none; }
.topnav a.on { color: var(--fg); font-weight: 600; border-bottom-color: var(--accent); }

.session { margin-left: auto; display: flex; gap: 1rem; align-items: center; font-size: 14px; }
.who { color: var(--fg-muted); }

.wrap { max-width: 1000px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.page-title { font-size: 22px; margin-bottom: 1.5rem; }

.panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  padding: 1.35rem;
  margin-bottom: 1.5rem;
}
.panel h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--fg-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: .6rem;
  margin-bottom: 1.15rem;
}

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .9rem 1rem;
  background: var(--bg-subtle);
}
.stat .n { font-size: 24px; font-weight: 600; color: var(--fg); line-height: 1.25; }
.stat .k { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--fg-muted); }

.cols { display: grid; gap: 1.25rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .cols { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ *
 * Tables
 * ------------------------------------------------------------------ */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td {
  text-align: left;
  padding: .6rem .65rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--fg-muted);
  border-bottom: 1px solid var(--border-str);
}
tbody tr:hover { background: var(--bg-subtle); }
tbody tr:last-child td { border-bottom: 0; }
td.actions { display: flex; gap: .5rem; }

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: .12rem .5rem;
  border-radius: 999px;
  border: 1px solid var(--border-str);
  color: var(--fg-muted);
  background: var(--bg-subtle);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.tag-on  { color: var(--green); border-color: #a8d5be; background: #eaf6ef; }
.tag-off { color: var(--red);   border-color: #f0bdb7; background: var(--red-bg); }
.tag-you { color: var(--amber); border-color: #e8cf94; background: var(--amber-bg); }

.muted { color: var(--fg-muted); font-size: 13px; }

.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 1.5rem 2rem;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--fg-faint);
}
.foot-public {
  justify-content: center;
  gap: 1rem 2rem;
  padding: 1rem 1.5rem;
  background: var(--bg);
}

/* ------------------------------------------------------------------ *
 * Inline block buttons (stats pages)
 * ------------------------------------------------------------------ */
.blk-form { display: inline; }
.blk, button.blk {
  display: inline-block;
  padding: 0 .2rem;
  margin: 0;
  border: 0;
  background: none;
  font-size: 12px;
  line-height: 1;
  opacity: .35;
  cursor: pointer;
  vertical-align: middle;
  text-decoration: none;
}
.blk:hover, button.blk:hover { opacity: 1; background: none; }
.blk-on { opacity: 1; }

/* ------------------------------------------------------------------ *
 * Home page
 * ------------------------------------------------------------------ */
body.home main {
  flex: 0 0 auto;            /* don't stretch, footer sits right under the content */
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2.5rem 1rem 2.5rem;
}
.home-box { max-width: 960px; width: 100%; text-align: center; }
.home-box .logo { display: block; width: 100%; max-width: 320px; height: auto; margin: 0 auto 1.5rem; }
.home-box p { font-size: 17px; line-height: 1.6; color: var(--fg-muted); margin: 0 0 1rem; }
.home-box p:last-child { margin-bottom: 0; }

/* intro: text left, photo right */
.home-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;     /* text | photo, equal halves */
  gap: 2.5rem;
  align-items: stretch;
  text-align: left;
  margin-top: .5rem;
}
.home-about { margin-top: 1.5rem; }
.home-about h2 { font-size: 20px; margin: 0 0 .6rem; color: var(--fg); }
.home-about p  { font-size: 15px; }
.home-about ul { margin: 0 0 1rem 1.2rem; padding: 0; font-size: 15px; line-height: 1.7; color: var(--fg-muted); }
.home-photo { position: relative; min-height: 260px; }
.home-photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;               /* fills the column to match the text height */
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
}
@media (max-width: 720px) {
  .home-box .logo { max-width: 240px; margin-bottom: 1.25rem; }
  .home-intro { grid-template-columns: 1fr; gap: 1.25rem; text-align: left; margin-top: 0; }
  .home-text { padding: 0 .25rem; }
  .home-box p { font-size: 16px; margin: 0 0 .9rem; }
  .home-about { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
  .home-about h2 { font-size: 19px; text-align: left; }
  .home-about ul { margin: .25rem 0 1rem 1.25rem; columns: 2; column-gap: 1.25rem; font-size: 15px; }
  .home-about li { break-inside: avoid; margin-bottom: .2rem; }
  .home-photo { order: -1; min-height: 0; }
  .home-photo img { position: static; width: 100%; height: 190px; object-fit: cover; }
  .home-tools { margin-top: 1.5rem; gap: .75rem; }
  .home-tool { flex-basis: 100%; padding: .5rem .75rem; }
}
.home-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 2.25rem; }
.home-tool {
  display: inline-block;
  flex: 1 1 380px;
  max-width: 460px;
  padding: .75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  transition: box-shadow .15s, border-color .15s;
}
.home-tool:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(16, 24, 40, .08); text-decoration: none; }
.home-tool img { display: block; width: 100%; height: auto; }

/* ------------------------------------------------------------------ *
 * Fixed-width site column: header, content, and footer share one
 * 1000px column instead of the header/footer spanning the viewport.
 * ------------------------------------------------------------------ */
.topbar, .foot {
  width: 100%;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
body.public .topbar { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
body.public .foot   { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
body.public main    { max-width: 1000px; margin-left: auto; margin-right: auto; background: var(--bg);
                      border-left: 1px solid var(--border); border-right: 1px solid var(--border); box-sizing: border-box; }

/* ------------------------------------------------------------------ *
 * Contact page
 * ------------------------------------------------------------------ */
body.contact main {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2.5rem 1.5rem;
}
.contact-box { width: 100%; max-width: 640px; }
.contact-box h1 { font-size: 26px; margin: 0 0 .4rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.grecaptcha-badge { visibility: hidden; }   /* allowed because the form shows Google's notice text */

/* ------------------------------------------------------------------ *
 * Flight tracker
 * ------------------------------------------------------------------ */
body.flights main { padding: 1.25rem 1.5rem 1.5rem; }
.ft-wrap { max-width: 100%; }
.ft-bar { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; margin-bottom: .9rem; }
.ft-search { display: flex; gap: .5rem; flex: 1 1 420px; min-width: 0; }
.ft-search input[type=text] { margin: 0; flex: 1; }
.ft-search button { white-space: nowrap; }
.ft-tools { display: flex; align-items: center; gap: 1rem; font-size: 13px; flex-wrap: wrap; }
.ft-follow { display: flex; align-items: center; gap: .35rem; font-size: 13px; font-weight: normal; margin: 0; }
.ft-follow input { margin: 0; }
.ft-main { position: relative; }
#ft-map { height: 620px; max-height: 75vh; border: 1px solid var(--border); border-radius: 8px; background: #e6edf3; }
.ft-plane { background: none; border: 0; }
.ft-plane-sel { position: relative; overflow: visible; }
.ft-plane-sel > svg { position: relative; z-index: 2; }
.ft-halo, .ft-ring {
  position: absolute; left: 50%; top: 50%; border-radius: 50%;
  transform: translate(-50%, -50%); pointer-events: none;
}
.ft-halo { width: 44px; height: 44px; background: rgba(255, 204, 0, .35); border: 3px solid #ffcc00; z-index: 1;
           box-shadow: 0 0 0 2px rgba(0,0,0,.15), 0 0 12px rgba(255, 204, 0, .9); }
.ft-ring { width: 44px; height: 44px; border: 3px solid #ffcc00; z-index: 0; animation: ft-pulse 1.6s ease-out infinite; }
@keyframes ft-pulse {
  0%   { transform: translate(-50%, -50%) scale(1);   opacity: .9; }
  100% { transform: translate(-50%, -50%) scale(2.4); opacity: 0; }
}
#ft-title-row { display: flex; align-items: center; gap: .4rem; }
.ft-copy {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; padding: 0; margin: 0;
  background: none; border: 1px solid var(--border); border-radius: 5px;
  color: var(--fg-muted); cursor: pointer;
}
.ft-copy:hover { color: var(--accent); border-color: var(--accent); background: none; }
.ft-copied { font-size: 11px; font-weight: 600; color: var(--green); }
.ft-panel {
  position: absolute; top: 12px; right: 12px; z-index: 1000;
  width: 280px; max-width: calc(100% - 24px);
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(16, 24, 40, .12);
  padding: .9rem 1rem 1rem;
}
.ft-panel h2 { font-size: 18px; margin: 0 1.5rem .6rem 0; }
.ft-close { position: absolute; top: 6px; right: 8px; background: none; border: 0; font-size: 20px; line-height: 1; padding: .2rem .4rem; color: var(--fg-muted); cursor: pointer; }
.ft-close:hover { color: var(--fg); background: none; }
.ft-panel dl { display: grid; grid-template-columns: auto 1fr; gap: .25rem .75rem; margin: 0; font-size: 13px; }
.ft-panel dt { color: var(--fg-muted); white-space: nowrap; }
.ft-panel dd { margin: 0; }
.ft-credit { font-size: 12px; margin: .75rem 0 0; }
.ft-foot { min-height: 2.2rem; margin-top: .6rem; }
.ft-status { font-size: 13px; line-height: 1.5; min-height: 1.5em; }
.ft-notice {
  position: relative;
  margin-top: .6rem;
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .7rem 2.2rem .7rem 1rem; border-radius: 8px;
  font-size: 14px; line-height: 1.45;
}
.ft-notice[hidden] { display: none; }
.ft-notice-warn { background: var(--amber-bg); color: var(--amber); border: 1px solid #e8cf94; }
.ft-notice-err  { background: var(--red-bg);   color: var(--red);   border: 1px solid #f0bdb7; }
.ft-notice-close {
  position: absolute; top: 4px; right: 6px;
  background: none; border: 0; padding: .1rem .35rem;
  font-size: 18px; line-height: 1; color: inherit; cursor: pointer; opacity: .7;
}
.ft-notice-close:hover { opacity: 1; background: none; }
@media (max-width: 720px) {
  #ft-map { height: 70vh; }
  .ft-panel { top: auto; bottom: 12px; left: 12px; right: 12px; width: auto; }
}

/* ------------------------------------------------------------------ *
 * Footer links + legal / document pages
 * ------------------------------------------------------------------ */
.foot-links { display: flex; gap: 1.25rem; }
.foot-links a { color: var(--fg-faint); }
.foot-links a:hover { color: var(--fg); }

body.doc main { flex: 0 0 auto; padding: 2.5rem 1.5rem; }
.doc-box { max-width: 760px; margin: 0 auto; }
.doc-box h1 { font-size: 28px; margin: 0 0 .25rem; }
.doc-box h2 { font-size: 18px; margin: 1.75rem 0 .5rem; }
.doc-box p, .doc-box li { font-size: 15px; line-height: 1.65; }
.doc-box ul { margin: .5rem 0 1rem 1.3rem; padding: 0; }
.doc-box li { margin-bottom: .35rem; }

/* ------------------------------------------------------------------ *
 * Mobile navigation (hamburger)
 * ------------------------------------------------------------------ */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px; height: 36px; padding: 6px 8px;
  background: none; border: 1px solid var(--border); border-radius: 6px;
  cursor: pointer;
  flex-direction: column; justify-content: space-between;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--fg); border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-toggle:hover { background: var(--bg-subtle); }
.nav-toggle.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

@media (max-width: 720px) {
  .topbar { position: relative; flex-wrap: nowrap; gap: 1rem; }
  .nav-toggle { display: flex; }
  .topnav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 20px rgba(16, 24, 40, .10);
    z-index: 2000;
  }
  .topnav.open { display: flex; }
  .topnav a {
    padding: .85rem 1.5rem;
    border-bottom: 1px solid var(--border);
    border-left: 3px solid transparent;
    font-size: 15px;
  }
  .topnav a:last-child { border-bottom: 0; }
  .topnav a.on { border-left-color: var(--accent); border-bottom-color: var(--border); }
}

/* ------------------------------------------------------------------ *
 * Weather
 * ------------------------------------------------------------------ */
body.weather main { flex: 0 0 auto; padding: 2rem 1.5rem 2.5rem; }
.wx-wrap { max-width: 760px; margin: 0 auto; }
.wx-wrap h1 { font-size: 26px; margin: 0 0 .25rem; }
.wx-form { display: flex; gap: .5rem; max-width: 360px; margin-bottom: 1.25rem; }
.wx-form input { margin: 0; flex: 1; font-size: 17px; letter-spacing: .05em; }
.wx-form button { white-space: nowrap; }
.wx-now {
  border: 1px solid var(--border); border-radius: 12px; background: var(--bg);
  padding: 1.25rem 1.5rem; margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(16,24,40,.06);
}
.wx-now-main { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1rem; }
.wx-icon { flex: 0 0 auto; }
.wx-place { font-size: 15px; font-weight: 600; }
.wx-temp { font-size: 56px; font-weight: 700; line-height: 1.05; letter-spacing: -1px; }
.wx-unit { font-size: 24px; font-weight: 600; color: var(--fg-muted); margin-left: .1em; }
.wx-desc { font-size: 18px; margin-top: .15rem; }
.wx-obs { font-size: 13px; margin-top: .25rem; }
.wx-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem 1rem;
  margin: 0; padding-top: 1rem; border-top: 1px solid var(--border);
}
.wx-stats dt { font-size: 12px; color: var(--fg-muted); text-transform: uppercase; letter-spacing: .04em; }
.wx-stats dd { margin: .1rem 0 0; font-size: 15px; font-weight: 600; }
.wx-h2 { font-size: 18px; margin: 0 0 .75rem; }
.wx-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: .75rem; }
.wx-day {
  text-align: center; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); padding: .85rem .5rem;
}
.wx-day-name { font-weight: 600; font-size: 14px; }
.wx-day-name .muted { font-weight: normal; font-size: 12px; }
.wx-day-icon { margin: .35rem 0; }
.wx-day-desc { font-size: 13px; min-height: 2.4em; line-height: 1.2; }
.wx-day-temp { font-size: 16px; margin-top: .3rem; }
.wx-day-rain { font-size: 12px; margin-top: .2rem; }
.wx-credit { font-size: 12px; margin: 1.25rem 0 0; }
@media (max-width: 720px) {
  .wx-stats { grid-template-columns: repeat(2, 1fr); }
  .wx-days { grid-template-columns: repeat(2, 1fr); }
  .wx-days .wx-day:last-child { grid-column: span 2; }
  .wx-temp { font-size: 48px; }
}
