:root {
  --bg: #090a0f;
  --panel: #11131b;
  --panel-2: #171a24;
  --border: rgba(255, 255, 255, 0.09);
  --text: #eef0f6;
  --muted: #8b92a5;
  --accent: #ffffff;
  --amber: #fbbf24;
  --green: #34d399;
  --red: #fb7185;
  --sky: #38bdf8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 24px; border-bottom: 1px solid var(--border);
  background: rgba(11, 13, 19, 0.9); backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; cursor: pointer; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn {
  border: 1px solid var(--border); background: var(--panel-2); color: var(--text);
  padding: 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: 0.15s; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { border-color: rgba(255,255,255,0.25); }
.btn.primary { background: var(--accent); color: #090a0f; border-color: transparent; }
.btn.primary:hover { opacity: 0.9; }
.btn.danger { color: var(--red); border-color: rgba(251,113,133,0.3); }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn.icon { width: 36px; height: 36px; justify-content: center; padding: 0; font-size: 18px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.pill {
  font-family: ui-monospace, SFMono-Regular, monospace; font-size: 11px;
  padding: 4px 9px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border);
}
.pill.amber { color: var(--amber); border-color: rgba(251,191,36,0.3); }
.pill.green { color: var(--green); border-color: rgba(52,211,153,0.3); }
.pill.red { color: var(--red); border-color: rgba(251,113,133,0.3); }
.pill.sky { color: var(--sky); border-color: rgba(56,189,248,0.3); }

.container { max-width: 1180px; margin: 0 auto; padding: 28px 24px 160px; }
.dropzone-active { outline: 2px dashed var(--sky); outline-offset: -8px; background: rgba(56,189,248,0.04); }
.auth-wrap { max-width: 420px; margin: 80px auto; background: var(--panel); border: 1px solid var(--border); border-radius: 20px; padding: 28px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; color: var(--muted); }
.input, select, textarea {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; font-size: 13px; outline: none;
}
.input:focus, select:focus, textarea:focus { border-color: rgba(255,255,255,0.3); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; transition: 0.15s;
}
.card:hover { border-color: rgba(255,255,255,0.22); }
.card-media {
  aspect-ratio: 16/10; background: #05060a; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.card-media img, .card-media video { width: 100%; height: 100%; object-fit: cover; }
.card-overlay {
  position: absolute; top: 8px; right: 8px; display: flex; gap: 6px;
  opacity: 0; transition: 0.15s;
}
.card:hover .card-overlay { opacity: 1; }
.card-body { padding: 12px 14px; }
.muted { color: var(--muted); font-size: 12px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

.dock {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  width: min(840px, calc(100% - 28px)); background: rgba(17, 19, 27, 0.96);
  border: 1px solid var(--border); border-radius: 18px; padding: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6); backdrop-filter: blur(16px); z-index: 40;
}
.dock-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 10px;
  font-size: 11px;
}
.chip img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.chip-tag { font-family: ui-monospace, monospace; font-weight: 700; color: var(--sky); }
.chip-x { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px; padding: 0 4px; }
.chip-x:hover { color: #fff; }
.dock-controls { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; align-items: center; }
.dock-controls select { width: auto; padding: 6px 10px; font-size: 12px; }
.dock-row { display: flex; gap: 8px; align-items: center; }
.dock-row input { flex: 1; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }

.toast {
  position: fixed; top: 70px; right: 20px; background: var(--panel-2);
  border: 1px solid var(--border); padding: 12px 16px; border-radius: 12px;
  font-size: 13px; z-index: 100; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.hidden { display: none; }
