/* AS Panel–inspired script usage dashboard */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: #0a0a0a;
  background-image:
    linear-gradient(rgba(30, 58, 95, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 58, 95, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  background-repeat: repeat;
  background-position: 0 0;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #e5e5e5;
  background: transparent;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 28px 48px;
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  color: #94a3b8;
  font-size: 15px;
  font-weight: 600;
}

.logo-text {
  font-weight: 700;
  font-size: 17px;
  color: #fff;
}

.nav-muted {
  color: #64748b;
  font-size: 14px;
  margin-left: 8px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pill {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid #334155;
}

.pill-live {
  background: #14532d;
  color: #86efac;
  border-color: #166534;
}

.signout-muted {
  font-size: 14px;
  color: #64748b;
}

/* Hero */
.hero {
  margin-bottom: 28px;
}

.hero-title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.hero-sub {
  margin: 0;
  font-size: 15px;
  color: #64748b;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 720px;
}

/* Cards */
.card {
  background: #141414;
  border: 1px solid #262626;
  border-radius: 12px;
  padding: 20px 22px;
}

.card-head {
  margin-bottom: 18px;
}

.card-head-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.card-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #f5f5f5;
}

.card-note {
  margin: 4px 0 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
}

.card-note code {
  font-size: 12px;
  color: #94a3b8;
  background: #0a0a0a;
  padding: 1px 6px;
  border-radius: 4px;
}

.field {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 8px;
}

.field-row {
  display: flex;
  gap: 10px;
}

.input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  font-size: 13px;
  color: #e5e5e5;
  background: #0a0a0a;
  border: 1px solid #333;
  border-radius: 8px;
  outline: none;
}

.input:focus {
  border-color: #3b82f6;
}

.btn {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  flex-shrink: 0;
}

.btn-primary {
  background: #3b82f6;
  color: #fff;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-danger {
  background: #292524;
  color: #fecaca;
  border: 1px solid #57534e;
}

.btn-danger:hover {
  background: #44403c;
  border-color: #78716c;
}

.hint {
  margin: 0 0 16px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

.hint code {
  font-size: 11px;
  color: #94a3b8;
  background: #0a0a0a;
  padding: 1px 5px;
  border-radius: 4px;
}

.mono {
  font-family: ui-monospace, monospace;
  font-size: 13px;
}

.muted {
  color: #64748b;
}

/* Script list */
.script-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
}

.script-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 12px;
  border-radius: 10px;
  border: 1px solid #262626;
  background: #0f0f0f;
  margin-bottom: 10px;
}

.script-item:last-child {
  margin-bottom: 0;
}

.script-item:hover {
  background: #171717;
  border-color: #333;
}

.script-item-dim .script-name {
  color: #d4d4d4;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  margin-top: 5px;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.45);
}

.status-dot-off {
  background: #525252;
  box-shadow: none;
}

.script-body {
  flex: 1;
  min-width: 0;
}

.script-name {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  margin-bottom: 2px;
}

.script-sub {
  font-size: 13px;
  color: #a3a3a3;
  margin-bottom: 4px;
  word-break: break-word;
}

.script-meta {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  word-break: break-word;
}

.script-actions {
  flex-shrink: 0;
  text-align: right;
}

.action-muted {
  font-size: 12px;
  color: #64748b;
}

.empty {
  padding: 20px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
  border: 1px dashed #333;
  border-radius: 10px;
}
