/* RinaBet BackOffice — site paleti: #0c1321 / #ff7b02 / #8afcff */
body.admin-bo {
  --bo-bg: #0c1321;
  --bo-panel: #171e2c;
  --bo-card: #1d2b42;
  --bo-line: #3e4758;
  --bo-line-2: #3c475a;
  --bo-text: #fff;
  --bo-muted: #bbb;
  --bo-dim: #777;
  --bo-accent: #ff7b02;
  --bo-accent-2: #fe8100;
  --bo-cyan: #8afcff;
  --bo-green: #109121;
  --bo-red: #e5484d;
  --bo-orange: #ff7b02;
  --bo-violet: #8afcff;
  --bo-side: 256px;
  --bo-side-bg: #0c1321;
  --bo-side-bg-2: #171e2c;
  --bo-side-text: #bbb;
  --bo-gold: #ff7b02;
  --bo-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  --bo-shadow-lg: 0 12px 24px -6px rgba(0, 0, 0, .45);
  background: var(--bo-bg);
  color: var(--bo-text);
  color-scheme: dark;
}
body.admin-bo #app,
body.admin-bo .admin-page {
  background: var(--bo-bg);
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  color: var(--bo-text);
}
body.admin-bo .toast-wrap { z-index: 80; }

.bo-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(255, 123, 2, .22), transparent 55%),
    radial-gradient(700px 380px at 90% 110%, rgba(138, 252, 255, .12), transparent 50%),
    linear-gradient(180deg, #171e2c, #0c1321 40%, #0a101a);
}
.bo-login-card {
  width: min(420px, 100%);
  background: #171e2c;
  border: 1px solid #3e4758;
  border-radius: 16px;
  padding: 32px 28px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  text-align: left;
}
.bo-login-card h1 { margin: 8px 0 4px; font-size: 22px; color: var(--bo-text); }
.bo-login-card .meta { margin: 0 0 18px; color: var(--bo-muted); font-size: 13px; }
.bo-brand { display: flex; align-items: center; gap: 12px; }
.bo-brand img { width: 42px; height: 42px; }
.bo-word { display: grid; line-height: 1; }
.bo-word b {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  letter-spacing: .18em;
  background: linear-gradient(100deg, #c45e00, #ff7b02 36%, #ffc078 50%, #ff7b02 64%, #c45e00);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.bo-word small { margin-top: 6px; font-size: 10px; font-weight: 800; letter-spacing: .28em; color: #8afcff; text-transform: uppercase; }

.bo-shell { min-height: 100vh; }
.bo-side {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: var(--bo-side);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--bo-side-bg-2), var(--bo-side-bg) 40%);
  color: #fff;
}
.bo-side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 72px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  color: inherit;
  text-decoration: none;
}
.bo-nav { flex: 1; overflow: auto; padding: 14px 12px; display: grid; align-content: start; gap: 2px; }
.bo-label {
  padding: 14px 12px 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #777;
}
.bo-label:first-child { padding-top: 2px; }
.bo-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--bo-side-text);
  font-weight: 600;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.bo-link:hover { background: rgba(255,255,255,.05); color: #fff; }
.bo-link.is-on { background: rgba(255, 123, 2, .18); color: #fff; }
.bo-link.is-on::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #ff7b02;
}
.bo-link .ic { width: 19px; height: 19px; flex: none; }
.bo-link.is-on .ic { color: #8afcff; }
.bo-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #ff7b02;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.bo-side-foot {
  flex: none;
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.07);
  display: grid;
  gap: 6px;
}

.bo-main { margin-left: var(--bo-side); min-height: 100vh; display: flex; flex-direction: column; }
.bo-top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
  padding: 0 28px;
  background: rgba(23, 30, 44, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bo-line);
}
.bo-top h1 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.01em; color: var(--bo-text); }
.bo-search { position: relative; margin-left: 12px; width: min(320px, 34vw); }
.bo-search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--bo-dim); }
.bo-search input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 38px;
  border-radius: 8px;
  border: 1px solid var(--bo-line);
  background: #1d2b42;
  outline: none;
  font-size: 13px;
  color: var(--bo-text);
}
.bo-search input:focus { background: #222b3e; border-color: var(--bo-accent); box-shadow: 0 0 0 4px rgba(255,123,2,.22); }
.bo-top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.bo-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: #1d2b42;
  border: 1px solid var(--bo-line);
  font-size: 12px;
  font-weight: 600;
  color: var(--bo-muted);
  cursor: pointer;
}
.bo-pill:hover { color: var(--bo-text); }
.bo-pill b { color: var(--bo-text); }
.bo-pill.warn { background: rgba(255, 123, 2, .16); border-color: #ff7b02; color: #ffc078; }
.bo-pill.warn b { color: #ff7b02; }
.bo-clock { font-variant-numeric: tabular-nums; color: var(--bo-text); font-weight: 700; font-size: 12px; }
.bo-user { display: flex; align-items: center; gap: 10px; padding-left: 12px; border-left: 1px solid var(--bo-line); }
.bo-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 123, 2, .18);
  color: var(--bo-accent);
  font-size: 12px;
  font-weight: 800;
}
.bo-user b { display: block; font-size: 13px; color: var(--bo-text); }
.bo-user small { color: var(--bo-dim); font-size: 11px; font-weight: 600; }

.bo-content { flex: 1; padding: 24px 28px 48px; width: 100%; max-width: 1560px; }
.bo-foot {
  padding: 16px 28px;
  color: var(--bo-dim);
  font-size: 12px;
  border-top: 1px solid var(--bo-line);
}

.bo-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.bo-kpi {
  display: grid;
  gap: 4px;
  padding: 18px;
  border-radius: 12px;
  background: #171e2c;
  border: 1px solid var(--bo-line);
  box-shadow: var(--bo-shadow);
  text-align: left;
  cursor: pointer;
  --k: #ff7b02;
  --kb: rgba(255, 123, 2, .16);
}
.bo-kpi:nth-child(4n+2) { --k: #109121; --kb: rgba(16, 145, 33, .16); }
.bo-kpi:nth-child(4n+3) { --k: #8afcff; --kb: rgba(138, 252, 255, .14); }
.bo-kpi:nth-child(4n+4) { --k: #ff7b02; --kb: rgba(255, 123, 2, .16); }
.bo-kpi:hover { transform: translateY(-2px); box-shadow: var(--bo-shadow-lg); }
.bo-kpi-label { display: flex; align-items: center; gap: 10px; color: var(--bo-muted); font-size: 13px; font-weight: 600; }
.bo-kpi-ico {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 10px;
  background: var(--kb);
  color: var(--k);
  order: -1;
}
.bo-kpi-ico svg { width: 20px; height: 20px; display: block; }
.bo-kpi-value { margin-top: 8px; font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bo-kpi-sub { color: var(--bo-muted); font-size: 12.5px; }

.bo-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; }
.bo-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bo-stack { display: grid; gap: 16px; align-content: start; }
.bo-panel {
  border-radius: 12px;
  background: #171e2c;
  border: 1px solid var(--bo-line);
  box-shadow: var(--bo-shadow);
  overflow: hidden;
}
.bo-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--bo-line);
  flex-wrap: wrap;
}
.bo-panel-head h2 { margin: 0; font-size: 15px; font-weight: 700; }
.bo-panel-head .more { margin-left: auto; color: var(--bo-accent); font-size: 13px; font-weight: 600; background: none; border: 0; cursor: pointer; }
.bo-panel-head .more:hover { text-decoration: underline; }
.bo-panel-body { padding: 20px; }
.bo-sub { margin: 4px 0 0; font-size: 12.5px; color: var(--bo-muted); }

.bo-table-wrap { overflow-x: auto; }
.bo-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bo-table th {
  background: #1d2b42;
  color: var(--bo-muted);
  font-size: 11.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-align: left;
  padding: 10px 16px;
  border-bottom: 1px solid var(--bo-line);
  white-space: nowrap;
}
.bo-table td {
  padding: 12px 16px;
  border-top: 1px solid var(--bo-line);
  color: #fff;
  vertical-align: middle;
}
.bo-table tbody tr:hover td { background: #1d2b42; }
.bo-table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.bo-table .mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.bo-table .meta { font-size: 11px; color: var(--bo-muted); margin-top: 2px; }
.bo-empty { text-align: center; color: var(--bo-muted); padding: 22px 8px !important; }

.bo-st {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid transparent;
}
.bo-st-ok, .bo-st-aktif, .bo-st-onaylandı, .bo-st-tamamlandı { background: rgba(16, 145, 33, .18); color: #7dff9a; border-color: #109121; }
.bo-st-pending, .bo-st-beklemede { background: rgba(255, 123, 2, .16); color: #ffc078; border-color: #ff7b02; }
.bo-st-no, .bo-st-reddedildi, .bo-st-kapalı, .bo-st-askıda { background: rgba(229, 72, 77, .18); color: #ff8b8e; border-color: #e5484d; }
.bo-st-off, .bo-st-çevrimdışı { background: #222b3e; color: #bbb; border-color: #3e4758; }
.bo-st-live, .bo-st-çevrimiçi { background: rgba(16, 145, 33, .18); color: #7dff9a; border-color: #109121; }

.bo-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.bo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--bo-line);
  background: #1d2b42;
  color: var(--bo-text);
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
}
.bo-btn:hover { background: #222b3e; }
.bo-btn-pri {
  background: linear-gradient(180deg, #ff9a3d, #ff7b02);
  border-color: #ff7b02;
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 123, 2, .28);
}
.bo-btn-pri:hover { filter: brightness(1.05); color: #fff; }
.bo-btn-ok { background: #109121; border-color: #109121; color: #fff; }
.bo-btn-danger { color: #ff8b8e; border-color: #e5484d; background: rgba(229, 72, 77, .16); }
.bo-field { margin-bottom: 12px; text-align: left; }
.bo-field label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; color: var(--bo-muted); }
.bo-field input, .bo-field textarea, .bo-field select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--bo-line);
  border-radius: 8px;
  background: #1d2b42;
  color: var(--bo-text);
  font-size: 13.5px;
}
.bo-field textarea { height: auto; padding: 10px 12px; min-height: 84px; }
.bo-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bo-check { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--bo-text); margin: 8px 0 12px; }
.bo-check input { width: 16px; height: 16px; }
.bo-method { display: flex; align-items: center; gap: 10px; }
.bo-method img { width: 36px; height: 24px; object-fit: contain; background: #1d2b42; border: 1px solid var(--bo-line); border-radius: 6px; padding: 2px; }
.bo-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.bo-quick button {
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px dashed var(--bo-line-2);
  background: #1d2b42;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
  color: var(--bo-text);
}
.bo-quick button:hover { border-color: var(--bo-accent); color: var(--bo-accent); }
.bo-todo { display: grid; gap: 8px; }
.bo-todo a, .bo-todo button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: 10px;
  background: #1d2b42;
  border: 1px solid var(--bo-line);
  color: var(--bo-text);
  font-weight: 650;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.bo-todo b { color: var(--bo-cyan); }
.bo-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bo-filters input, .bo-filters select {
  height: 36px;
  border: 1px solid var(--bo-line);
  border-radius: 8px;
  padding: 0 10px;
  background: #1d2b42;
  color: var(--bo-text);
}
.bo-bal { display: flex; gap: 6px; align-items: center; }
.bo-bal input,
.bo-table input,
.bo-table select {
  width: 92px;
  height: 32px;
  border: 1px solid var(--bo-line);
  border-radius: 8px;
  padding: 0 8px;
  background: #1d2b42;
  color: #fff;
}
.bo-table input { width: auto; min-width: 88px; }
.bo-editor { max-width: 560px; }
.bo-chat { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 520px; border: 1px solid var(--bo-line); border-radius: 12px; overflow: hidden; background: #171e2c; }
.bo-chat-list { border-right: 1px solid var(--bo-line); overflow: auto; background: #1d2b42; }
.bo-chat-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--bo-line);
  background: transparent;
  cursor: pointer;
}
.bo-chat-item.active { background: rgba(255, 123, 2, .16); }
.bo-chat-pane { display: flex; flex-direction: column; min-height: 520px; }
.bo-chat-log { flex: 1; overflow: auto; padding: 16px; background: #171e2c; }
.bo-chat-compose { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--bo-line); }
.bo-chat-compose input { flex: 1; height: 40px; border: 1px solid var(--bo-line); border-radius: 8px; padding: 0 12px; background: #1d2b42; color: #fff; }
body.admin-bo .chat-bubble { max-width: 80%; }
body.admin-bo .chat-bubble .chat-text { color: #fff; }
body.admin-bo .chat-bubble.user { background: #1d2b42; }
body.admin-bo .chat-bubble.agent { background: rgba(16, 145, 33, .22); }
body.admin-bo .form-error { color: var(--bo-red); font-size: 13px; margin: 0 0 10px; }

.bo-popup {
  position: relative;
  margin: 0 12px 12px;
  padding: 16px 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, #222b3e, #171e2c);
  color: #fff;
  box-shadow: var(--bo-shadow-lg);
  border: 1px solid #3e4758;
}
.bo-popup h3 { margin: 0 0 6px; }
.bo-popup p { margin: 0 0 12px; color: #bbb; font-size: 13px; }
.bo-popup-x {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .bo-kpis, .bo-grid, .bo-grid-2, .bo-split { grid-template-columns: 1fr; }
  .bo-search { display: none; }
  .bo-chat { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .bo-side { transform: translateX(-100%); }
  .bo-main { margin-left: 0; }
  body.admin-bo.bo-nav-open .bo-side { transform: none; }
}
