﻿:root {
  --bg: #0b1020;
  --panel: rgba(255, 255, 255, 0.06);
  --panel2: rgba(255, 255, 255, 0.09);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.65);
  --line: rgba(255, 255, 255, 0.12);
  --brand: #7c5cff;
  --brand2: #39d98a;
  --danger: #ff5c7a;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --radius2: 24px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  background-color: var(--bg);
  background-image: url("/assets/page-bg-v3.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  color: var(--text);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.wrap {
  width: min(1120px, 92vw);
  margin: 0 auto;
  padding: 28px 0 70px;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: rgba(11, 16, 32, 0.94);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  position: sticky;
  top: 14px;
  z-index: 40;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 320px;
  justify-self: start;
}

.logo {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: #3f5db8;
  box-shadow: 0 12px 30px rgba(124, 92, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.brand h1 {
  font-size: 30px;
  margin: 0;
  line-height: 1;
  letter-spacing: 1.2px;
  font-weight: 800;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  justify-self: center;
}

.chip {
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(11, 16, 32, 0.74);
  color: var(--muted);
  font-size: 13px;
  transition: 0.15s ease;
}

.chip:hover,
.chip.active {
  background: rgba(124, 92, 255, 0.16);
  border-color: rgba(124, 92, 255, 0.45);
  color: var(--text);
}

.actions { display: flex; gap: 10px; align-items: center; }
.actions { justify-self: end; }
.btn {
  border: 1px solid var(--line);
  background: rgba(11, 16, 32, 0.8);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: 0.15s ease;
}

.btn:hover { background: rgba(255, 255, 255, 0.07); transform: translateY(-1px); }
.btn.primary { background: rgba(124, 92, 255, 0.22); border-color: rgba(124, 92, 255, 0.55); }
.btn.success { background: rgba(57, 217, 138, 0.18); border-color: rgba(57, 217, 138, 0.42); }
.btn.danger { background: rgba(255, 92, 122, 0.18); border-color: rgba(255, 92, 122, 0.45); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.hero,
.panel,
.section {
  margin-top: 22px;
  padding: 20px;
  border-radius: var(--radius2);
  border: 1px solid var(--line);
  background: rgba(11, 16, 32, 0.9);
  box-shadow: var(--shadow);
}
.hero {
  overflow: hidden;
  position: relative;
}
.hero > * {
  position: relative;
}

.hero h2,
.panel h2,
.section h3 { margin: 0; }
.muted { color: var(--muted); }
.about-section {
  display: flex;
  justify-content: center;
}
.about-card {
  width: min(860px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(11, 16, 32, 0.68);
  padding: 18px 20px;
}
.about-card h3 {
  text-align: center;
}
.about-points {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.about-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(124, 92, 255, 0.12);
}
.about-card p {
  margin: 12px 0 0;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.86);
  text-wrap: pretty;
}
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.space { justify-content: space-between; }
.pill {
  border: 1px solid var(--line);
  background: rgba(11, 16, 32, 0.82);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}

.grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.card {
  grid-column: span 4;
  border: 1px solid var(--line);
  background: rgba(11, 16, 32, 0.88);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.35);
  transition: 0.18s ease;
  display: flex;
  flex-direction: column;
  min-height: 260px;
}
.card:hover {
  transform: translateY(-2px);
  background: rgba(11, 16, 32, 0.92);
}
.thumb {
  height: 120px;
  background: #101a33;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
  color: var(--muted);
}
.badge.green {
  border-color: rgba(57, 217, 138, 0.45);
  color: rgba(200, 255, 231, 0.9);
  background: rgba(57, 217, 138, 0.10);
}
.badge.purple {
  border-color: rgba(124, 92, 255, 0.55);
  color: rgba(233, 228, 255, 0.95);
  background: rgba(124, 92, 255, 0.12);
}
.card-body {
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.card h4 { margin: 0; font-size: 16px; }
.card .meta { font-size: 12px; color: var(--muted); }
.card .footer {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.10);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.tag {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.highlights {
  grid-template-columns: 1fr 1fr;
}
.highlights .card {
  grid-column: auto;
}
.map-thumb {
  background-size: cover;
  background-position: center;
}

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form .full { grid-column: 1 / -1; }
label { font-size: 12px; color: var(--muted); margin-bottom: 4px; display: block; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(11, 16, 32, 0.82);
  color: var(--text);
  outline: none;
}

textarea { min-height: 110px; resize: vertical; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
.files-scroll { max-height: 520px; overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
th { color: var(--muted); font-weight: 600; background: rgba(0, 0, 0, 0.15); }

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.auth-card {
  width: min(460px, 96vw);
  border: 1px solid var(--line);
  border-radius: var(--radius2);
  background: rgba(12, 19, 39, 0.92);
  box-shadow: var(--shadow);
  padding: 24px;
}

.message { font-size: 13px; color: var(--muted); min-height: 20px; }
.message.error { color: #ff92a6; }
.message.success { color: #93ffcd; }

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 20, 0.72);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 9999;
  padding: 16px;
}
.popup-card {
  width: min(520px, 96vw);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(14, 20, 38, 0.97);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  padding: 16px;
}
.popup-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.popup-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  border: 1px solid var(--line);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.popup-icon.error {
  border-color: rgba(255, 92, 122, 0.5);
  background: rgba(255, 92, 122, 0.22);
}
.popup-icon.success {
  border-color: rgba(57, 217, 138, 0.5);
  background: rgba(57, 217, 138, 0.22);
}
.popup-icon.warning {
  border-color: rgba(255, 191, 92, 0.55);
  background: rgba(255, 191, 92, 0.20);
}
.popup-title {
  margin: 0;
  font-size: 18px;
}
.popup-message {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.5;
  white-space: pre-wrap;
}
.popup-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.popup-btn {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 8px 12px;
  cursor: pointer;
}
.popup-btn.primary {
  background: rgba(124, 92, 255, 0.24);
  border-color: rgba(124, 92, 255, 0.55);
}
.popup-btn.danger {
  background: rgba(255, 92, 122, 0.2);
  border-color: rgba(255, 92, 122, 0.45);
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.analytics-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(11, 16, 32, 0.72);
  padding: 12px;
}
.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 190px;
}
.mini-bar-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.mini-bar {
  width: 100%;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, rgba(124, 92, 255, 0.95), rgba(57, 217, 138, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.14);
  min-height: 2px;
}
.mini-count {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1;
}
.mini-label {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

footer {
  margin-top: 20px;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  padding: 0 6px;
  border: none;
  border-radius: 0;
  background: rgba(11, 16, 32, 0.9);
  box-shadow: none;
  text-align: center;
}

@media (max-width: 980px) {
  .split:not(.highlights),
  .form { grid-template-columns: 1fr; }
  .card { grid-column: span 6; }
  .analytics-grid { grid-template-columns: 1fr; }
  .topbar {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .brand { min-width: 0; justify-self: center; }
  .actions { justify-self: center; }
}
@media (max-width: 620px) {
  .highlights { grid-template-columns: 1fr; }
  .card { grid-column: span 12; }
  .about-card {
    padding: 16px 14px;
  }
  .about-card p {
    line-height: 1.75;
  }
}
