/* BizNetAI Developer Portal — single-page UI styles. */
:root {
  --bg: #0e1116;
  --surface: #171b22;
  --surface-2: #1f2530;
  --border: #2a3140;
  --text: #e6e9ef;
  --muted: #8b94a7;
  --primary: #4f8cff;
  --primary-hover: #3d78e6;
  --danger: #ff5f6d;
  --warn-bg: #2a2410;
  --warn-border: #6b5a13;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 0.875rem; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.brand { font-weight: 700; font-size: 1.1rem; }
.brand span { color: var(--muted); font-weight: 400; margin-left: 6px; }
.session { display: flex; align-items: center; gap: 12px; }

.container { max-width: 880px; margin: 0 auto; padding: 32px 24px; }

h1 { font-size: 1.5rem; margin: 0 0 4px; }
h2 { font-size: 1.2rem; margin: 0 0 16px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.auth-card { max-width: 380px; margin: 48px auto; }

.tabs { display: flex; gap: 4px; margin-bottom: 20px; }
.tab {
  flex: 1; padding: 8px; background: transparent; border: none;
  border-bottom: 2px solid var(--border); color: var(--muted);
  cursor: pointer; font-size: 0.95rem;
}
.tab.active { color: var(--text); border-bottom-color: var(--primary); }

.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; }
.form input, .form select {
  padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 0.95rem;
}
.form input:focus, .form select:focus { outline: none; border-color: var(--primary); }

.btn {
  padding: 9px 16px; border-radius: 8px; border: 1px solid transparent;
  font-size: 0.9rem; cursor: pointer; font-weight: 500;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--border); padding: 5px 10px; font-size: 0.8rem; }
.btn-danger:hover { background: rgba(255,95,109,0.1); }

.row-between { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 16px; }
.row-end { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.store-card { cursor: pointer; transition: border-color 0.15s; }
.store-card:hover { border-color: var(--primary); }
.store-card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; }
.badge-connected { background: rgba(79,140,255,0.15); color: var(--primary); }
.badge-empty { background: var(--surface-2); color: var(--muted); }

.keys-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.keys-table th, .keys-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.keys-table th { color: var(--muted); font-weight: 500; }
.keys-table code { background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }
.env-live { color: var(--primary); }
.env-test { color: #d6a13f; }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 50;
}
.modal { width: 100%; max-width: 440px; }

.warn { background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: 8px; padding: 12px; font-size: 0.88rem; }
.secret-box { display: flex; align-items: center; gap: 8px; margin: 16px 0; }
.secret-box code {
  flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px; font-size: 0.85rem; word-break: break-all;
}

.error { color: var(--danger); font-size: 0.85rem; margin: 4px 0 0; }
