@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --bg: #071018;
  --bg-soft: #0b141c;
  --panel: #101b26;
  --panel-2: #131f2b;
  --line: #233445;
  --line-strong: #1fb7b633;
  --text: #dae3ef;
  --muted: #9aacbd;
  --teal: #1fb7b6;
  --teal-2: #54d9d8;
  --teal-dark: #006a69;
  --copper: #d88a2a;
  --danger: #ff7f86;
  --ok: #70e3bd;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Manrope, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 540px at 50% -100px, rgba(31, 183, 182, 0.12), transparent 60%),
    radial-gradient(900px 420px at 85% 10%, rgba(216, 138, 42, 0.10), transparent 58%),
    linear-gradient(180deg, #060f17 0%, var(--bg) 100%);
  min-height: 100vh;
}

a { color: inherit; }
.container { width: min(1240px, 94%); margin: 0 auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 14, 21, 0.82);
  backdrop-filter: blur(12px);
}
.topbar .inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  gap: 16px;
}
.brand-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #ffffff1f;
  background: #0a1520;
  object-fit: cover;
  padding: 2px;
}
.brand {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: .01em;
  color: #dfe9f6;
  white-space: nowrap;
}
.brand-sub {
  color: var(--teal-2);
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.nav a {
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 12px;
  color: #b8c7d8;
  font-size: 14px;
  transition: all .2s ease;
}
.nav a:hover {
  color: #eaf4ff;
  border-color: #2f455a;
  background: #101c2a;
}

.hero { padding: 38px 0 28px; }
.hero h1 {
  margin: 0 0 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(30px, 5vw, 48px);
  letter-spacing: -0.02em;
}
.hero p {
  margin: 0;
  color: var(--muted);
  max-width: 860px;
  line-height: 1.55;
}

.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: linear-gradient(180deg, rgba(19, 31, 44, 0.94), rgba(9, 20, 32, 0.94));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  box-shadow: inset 0 1px 0 #ffffff08, 0 10px 28px #0000003d;
}
.card h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 26px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #2b3f53;
  background: #0c1823;
  color: #9cb0c4;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
}

.btn, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 10px 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: .2s ease;
}
.btn:hover, button:hover { transform: translateY(-1px); }
.btn:disabled, button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(180deg, var(--teal-2), var(--teal));
  border-color: #66f5f432;
  color: #073437;
}
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 0 22px rgba(31, 183, 182, 0.28); }
.btn-secondary {
  background: #101d2a;
  color: #d8e6f5;
  border-color: #2b4053;
}
.btn-secondary:hover { border-color: #42607b; background: #142435; }
.btn-danger {
  background: linear-gradient(180deg, #ff6f78, #d94850);
  color: #fff;
  border-color: #ff9ca2;
}
.btn-mini { padding: 6px 10px; font-size: 12px; }

.form input, .form select, .form textarea {
  width: 100%;
  border-radius: 11px;
  border: 1px solid #2a3f52;
  background: #060f18;
  color: var(--text);
  padding: 10px 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
  transition: all .2s ease;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(31, 183, 182, 0.22);
}
.form input[readonly] {
  color: #abc0d7;
  background: #0a1622;
}
.form input:disabled, .form select:disabled, .form textarea:disabled {
  opacity: .64;
  cursor: not-allowed;
}
.form label {
  display: block;
  margin-bottom: 6px;
  color: #9eb3c8;
  font-size: 13px;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: .03em;
}

.form-row { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.form-row-3 { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); }

.mt-12 { margin-top: 12px; }
.mt-20 { margin-top: 20px; }

.flash {
  padding: 11px 12px;
  margin-bottom: 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-weight: 600;
}
.flash.ok { color: var(--ok); border-color: #2f7159; background: #0d221b; }
.flash.err { color: #ffb2b7; border-color: #7f3f4b; background: #2a1318; }

.table-wrap {
  overflow: auto;
  border: 1px solid #273b4f;
  border-radius: 12px;
  background: #08131e;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 660px;
}
th, td {
  text-align: left;
  padding: 11px 10px;
  border-bottom: 1px solid #1d2f40;
  font-size: 13px;
}
th {
  color: #9eb4c8;
  background: #0b1926;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: .04em;
}
tbody tr:hover td { background: #0c1d2d; }

.overlay-preview {
  border: 1px dashed #366180;
  border-radius: 12px;
  padding: 12px;
  background: #07121d;
}

.favorite-list, .search-results {
  border: 1px solid #2a4155;
  border-radius: 12px;
  background: #081420;
  padding: 10px;
  max-height: 260px;
  overflow: auto;
}
.search-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border: 1px solid #234056;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  background: linear-gradient(180deg, #0a1927, #0b1723);
}
.search-item:last-child { margin-bottom: 0; }
.si-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  font-weight: 700;
}
.si-meta { color: #95aabf; font-size: 12px; margin-top: 4px; }
.si-actions { display: flex; gap: 6px; }
.search-empty { color: #8ca3ba; font-size: 13px; padding: 8px 4px; }

/* Overlay base */
.overlay-bar {
  width: 100%;
  min-height: 96px;
  background: linear-gradient(180deg, rgba(10, 25, 36, .95), rgba(4, 13, 20, .95));
  border: 1px solid rgba(84, 217, 216, 0.34);
  border-radius: 14px;
  display: grid;
  grid-template-columns: 2.1fr 1fr 1fr 1.2fr 1fr 1.2fr;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.55);
}
.ov-slot { display: flex; gap: 12px; align-items: center; min-width: 0; }
.ov-thumb {
  width: 86px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid #38586f;
  background: #0d1a27;
}
.ov-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ov-provider {
  font-size: 13px;
  color: #98b5cf;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ov-metric { text-align: center; border-left: 1px solid #ffffff1e; padding-left: 8px; }
.ov-label {
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  color: #8da5ba;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.ov-value {
  font-family: "Space Grotesk", sans-serif;
  font-size: 39px;
  font-weight: 700;
  margin-top: 3px;
}
.ov-value.red { color: #f7c8c8; }
.ov-value.green { color: #75e9d7; }
.ov-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 999px;
  border: 2px solid rgba(84, 217, 216, 0.7);
  background: #071018;
}

.footer { color: #91a7bd; text-align: center; padding: 26px 0; }

/* Auth split */
.auth-shell {
  width: min(1120px, 94%);
  margin: 68px auto;
  border: 1px solid #2a3e52;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: linear-gradient(180deg, #0c1723, #08131f);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.5);
}
.auth-left {
  padding: 34px;
  background:
    radial-gradient(360px 360px at 80% 80%, rgba(31,183,182,.18), transparent 70%),
    linear-gradient(120deg, rgba(255,255,255,.05), rgba(255,255,255,.01));
  border-right: 1px solid #2a3e52;
}
.auth-right { padding: 34px; }

@media (max-width: 980px) {
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .overlay-bar { grid-template-columns: 1.7fr repeat(4, 1fr); }
  .ov-logo { display: none; }
  .auth-shell { grid-template-columns: 1fr; margin-top: 22px; }
  .auth-left { border-right: 0; border-bottom: 1px solid #2a3e52; }
}
