:root {
  --bg: #0f1419; --panel: #1a2129; --panel2: #222b35; --line: #2c3743;
  --text: #e6edf3; --muted: #8b98a5; --accent: #2f81f7; --accent2: #1f6feb;
  --green: #2ea043; --red: #da3633; --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.nav {
  display: flex; align-items: center; gap: 24px; padding: 14px 28px;
  background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 700; font-size: 18px; color: var(--text); }
.nav nav { display: flex; gap: 20px; }
.nav nav a { color: var(--muted); font-weight: 500; }
.nav nav a:hover { color: var(--text); text-decoration: none; }
.run-form { margin-left: auto; }

main { max-width: 1080px; margin: 0 auto; padding: 28px; }
footer { text-align: center; color: var(--muted); padding: 30px; font-size: 13px; }

h1 { font-size: 26px; margin: 0 0 4px; }
h2 { font-size: 19px; margin: 32px 0 12px; }
.page-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.muted { color: var(--muted); font-size: 13px; }

.btn {
  display: inline-block; background: var(--panel2); color: var(--text); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 500;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn-accent { background: var(--accent2); border-color: var(--accent2); color: #fff; }
.btn-accent:hover { background: var(--accent); }
.btn-ghost { background: transparent; }
.btn-danger { color: #ff7b72; }
.btn-danger:hover { border-color: var(--red); }
.btn-small { padding: 5px 10px; font-size: 13px; }

.filters, .form-inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
input, select { background: var(--panel); color: var(--text); border: 1px solid var(--line); padding: 9px 11px; border-radius: 8px; font-size: 14px; }
input::placeholder { color: var(--muted); }
select[multiple] { min-width: 220px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; background: var(--panel); position: sticky; top: 0; }
tbody tr:hover { background: var(--panel); }
td.price { font-weight: 700; font-size: 16px; color: #7ee787; }
.row-actions, .card-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.tag { font-size: 11px; padding: 2px 8px; border-radius: 20px; background: var(--panel2); color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.tag-ryanair { background: #0b3d91; color: #cfe0ff; }
.tag-google { background: #3d2e0b; color: #ffe9b0; }
.tag-on { background: #123d1f; color: #7ee787; }
.tag-off { background: #3d1212; color: #ff9d96; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card-off { opacity: .55; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.card-head h3 { margin: 0; font-size: 16px; }
.card .meta { list-style: none; padding: 0; margin: 0 0 14px; font-size: 13px; }
.card .meta li { padding: 2px 0; color: var(--muted); }
.card .meta b { color: var(--text); font-weight: 500; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.form-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
.form-grid > button { grid-column: 1 / -1; justify-self: start; }
.form-grid small { color: var(--muted); font-size: 11px; }
.pair { display: flex; gap: 10px; }
.pair label { flex: 1; }
.dow { display: flex; gap: 6px; flex-wrap: wrap; }
.chk { flex-direction: row !important; align-items: center; gap: 6px !important; color: var(--text) !important; }
.chk input { width: auto; }

.ac { position: relative; display: inline-block; }
.ac-list { position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; min-width: 280px; max-height: 340px; overflow-y: auto; margin: 0; padding: 4px; list-style: none; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.ac-item { padding: 8px 11px; border-radius: 6px; cursor: pointer; font-size: 14px; white-space: nowrap; }
.ac-item:hover, .ac-item.active { background: var(--accent2); color: #fff; }
.ac-item.ac-city { font-weight: 600; }
.ac-item.ac-city::before { content: "🏙 "; }

.drop { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 700; color: #7ee787; background: #123d1f; padding: 1px 7px; border-radius: 20px; vertical-align: middle; }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 20px 0; }

.chip { display: inline-block; background: var(--accent2); color: #fff; padding: 2px 10px; border-radius: 20px; font-size: 13px; font-weight: 600; margin-right: 6px; }
.chip:hover { background: var(--red); text-decoration: none; }

.globe-head { margin-bottom: 8px; }
.globe { width: 100%; min-height: 440px; cursor: grab; }
.globe:active { cursor: grabbing; }
.globe-loading { text-align: center; padding: 60px; font-size: 16px; }
.glabel { background: rgba(20,26,34,.92); border: 1px solid var(--line); padding: 8px 12px; border-radius: 8px; font-size: 13px; color: var(--text); }

.empty { text-align: center; padding: 50px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } .nav { padding: 12px 16px; gap: 14px; } main { padding: 16px; } }
