/* ═══════════════════════════════════════
   ADMIN PANEL — Dark Premium Theme
   ═══════════════════════════════════════ */
:root {
  --adm-bg:    #0a0b0e;
  --adm-card:  #111318;
  --adm-card2: #16181f;
  --adm-border:#1e2030;
  --adm-green: #05f072;
  --adm-white: #eef0f6;
  --adm-muted: #6b7084;
  --adm-r:     14px;
}

/* ── Sidebar ── */
.adm-sidebar {
  width: 260px; background: var(--adm-card); border-right: 1px solid var(--adm-border);
  display: flex; flex-direction: column; padding: 0; flex-shrink: 0;
  transition: width .3s;
}
.adm-sidebar__logo {
  display: flex; align-items: center; gap: 12px; padding: 28px 24px 24px;
}
.adm-sidebar__logo-icon {
  width: 40px; height: 40px; background: var(--adm-green); border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--head); font-weight: 900; font-size: .92rem; color: #000;
}
.adm-sidebar__logo-text { font-family: var(--head); font-weight: 700; font-size: 1rem; color: var(--adm-white); }
.adm-sidebar__logo-text small { display: block; font-size: .62rem; color: var(--adm-muted); font-weight: 400; margin-top: 1px; }

.adm-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }
.adm-tab {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 11px;
  font-size: .82rem; color: var(--adm-muted); cursor: pointer; transition: all .18s;
  border: none; background: none; width: 100%; text-align: left;
}
.adm-tab i { width: 18px; text-align: center; font-size: .78rem; color: var(--adm-green); }
.adm-tab:hover { background: rgba(255,255,255,.03); color: var(--adm-white); }
.adm-tab.active { background: rgba(5,240,114,.06); color: var(--adm-white); font-weight: 600; }

.adm-sidebar__foot { padding: 16px 12px; border-top: 1px solid var(--adm-border); }
.adm-sidebar__foot button,
.adm-sidebar__foot a {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px;
  font-size: .78rem; color: var(--adm-muted); cursor: pointer; text-decoration: none;
  border: none; background: none; width: 100%; border-radius: 10px; transition: all .18s;
}
.adm-sidebar__foot button:hover,
.adm-sidebar__foot a:hover { color: var(--adm-white); background: rgba(255,255,255,.03); }

/* ── Main area ── */
.adm-main {
  flex: 1; overflow-y: auto; padding: 32px 36px; background: var(--adm-bg);
  scrollbar-width: thin; scrollbar-color: var(--adm-border) transparent;
}

/* ── Top bar ── */
.adm-topbar {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px;
}
.adm-topbar__h { font-family: var(--head); font-size: 1.4rem; font-weight: 800; color: var(--adm-white); }
.adm-topbar__h span { color: var(--adm-green); }
.adm-topbar__right { display: flex; align-items: center; gap: 12px; }
.adm-topbar__badge {
  padding: 5px 14px; border-radius: 50px; font-size: .68rem; font-weight: 600;
  background: rgba(5,240,114,.08); color: var(--adm-green); border: 1px solid rgba(5,240,114,.12);
}
.adm-topbar__time { font-size: .72rem; color: var(--adm-muted); font-family: var(--mono, monospace); }

/* ── Section cards ── */
.adm-section {
  background: var(--adm-card); border: 1px solid var(--adm-border); border-radius: 18px;
  margin-bottom: 14px; overflow: hidden;
}
.adm-section__head {
  display: flex; align-items: center; gap: 10px; padding: 18px 22px;
  cursor: pointer; user-select: none;
}
.adm-section__head:hover { background: rgba(255,255,255,.015); }
.adm-section__icon {
  width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  background: rgba(5,240,114,.08); color: var(--adm-green); font-size: .82rem;
}
.adm-section__title { font-family: var(--head); font-weight: 700; font-size: .88rem; color: var(--adm-white); }
.adm-section__cnt { font-size: .62rem; padding: 2px 8px; border-radius: 50px; background: var(--adm-card2); color: var(--adm-muted); margin-left: auto; }
.adm-section__toggle { color: var(--adm-muted); font-size: .6rem; transition: transform .25s; margin-left: 8px; }
.adm-section.collapsed .adm-section__toggle { transform: rotate(-90deg); }
.adm-section__body { padding: 0 22px 22px; }
.adm-section.collapsed .adm-section__body { display: none; }

.adm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.adm-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.adm-span2 { grid-column: span 2; }

/* ── Save button ── */
.adm-save-bar {
  position: sticky; bottom: 0; z-index: 20; padding: 14px 0;
  background: linear-gradient(transparent, var(--adm-bg) 30%);
  display: flex; align-items: center; gap: 14px;
}
.adm-save-btn {
  padding: 12px 32px; border-radius: 50px; font-weight: 700; font-size: .85rem;
  background: var(--adm-green); color: #000; border: none; cursor: pointer;
  transition: transform .18s, box-shadow .18s;
  display: flex; align-items: center; gap: 8px;
}
.adm-save-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(5,240,114,.25); }
.adm-save-btn:active { transform: scale(.97); }
.adm-save-ok { color: var(--adm-green); font-size: .8rem; display: none; align-items: center; gap: 6px; animation: fadeIn .3s; }

/* ── Mini Chat ── */
.adm-chat {
  position: fixed; bottom: 24px; right: 24px; z-index: 100;
  width: 360px; max-height: 480px; display: flex; flex-direction: column;
  background: var(--adm-card); border: 1px solid var(--adm-border); border-radius: 18px;
  box-shadow: 0 12px 48px rgba(0,0,0,.55); overflow: hidden;
  transition: all .3s cubic-bezier(.4,0,.2,1);
}
.adm-chat.minimized { max-height: 52px; border-radius: 50px; width: 200px; }
.adm-chat__head {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px;
  border-bottom: 1px solid var(--adm-border); cursor: pointer; user-select: none;
  flex-shrink: 0;
}
.adm-chat__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--adm-green); animation: pulse 2s infinite; }
.adm-chat__head-title { font-family: var(--head); font-size: .82rem; font-weight: 700; color: var(--adm-white); }
.adm-chat__head-actions { margin-left: auto; display: flex; gap: 6px; }
.adm-chat__head-btn {
  width: 28px; height: 28px; border-radius: 7px; display: flex; align-items: center; justify-content: center;
  background: var(--adm-card2); border: 1px solid var(--adm-border); color: var(--adm-muted);
  cursor: pointer; font-size: .65rem; transition: all .15s;
}
.adm-chat__head-btn:hover { color: var(--adm-white); background: rgba(255,255,255,.06); }
.adm-chat.minimized .adm-chat__head { border-bottom: none; }
.adm-chat.minimized .adm-chat__body,
.adm-chat.minimized .adm-chat__input { display: none; }

.adm-chat__body {
  flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px;
  max-height: 320px; scrollbar-width: thin; scrollbar-color: var(--adm-border) transparent;
}
.adm-chat__msg {
  padding: 10px 14px; border-radius: 12px; font-size: .78rem; line-height: 1.5;
  max-width: 88%; animation: chatIn .25s;
}
.adm-chat__msg--admin { background: rgba(5,240,114,.08); color: var(--adm-white); align-self: flex-end; border-bottom-right-radius: 4px; }
.adm-chat__msg--system { background: var(--adm-card2); color: var(--adm-muted); align-self: flex-start; border-bottom-left-radius: 4px; }
.adm-chat__msg time { display: block; font-size: .58rem; color: var(--adm-muted); margin-top: 4px; }
.adm-chat__empty { text-align: center; color: var(--adm-muted); font-size: .75rem; padding: 32px 0; }

.adm-chat__input {
  display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--adm-border);
}
.adm-chat__input input {
  flex: 1; background: var(--adm-card2); border: 1px solid var(--adm-border); border-radius: 10px;
  padding: 9px 14px; font-size: .78rem; color: var(--adm-white); outline: none;
}
.adm-chat__input input:focus { border-color: var(--adm-green); }
.adm-chat__input button {
  padding: 9px 14px; border-radius: 10px; background: var(--adm-green); color: #000;
  font-weight: 700; font-size: .75rem; cursor: pointer; border: none; transition: transform .15s;
}
.adm-chat__input button:hover { transform: scale(1.04); }

/* ── Partner / Bento row editors ── */
.adm-row-editor {
  display: grid; gap: 8px; align-items: end; background: var(--adm-card2);
  border-radius: 12px; padding: 12px; margin-bottom: 6px;
}
.adm-row-del {
  width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: rgba(239,68,68,.06); border: 1px solid rgba(239,68,68,.12); color: #ef4444;
  cursor: pointer; font-size: .7rem; transition: all .15s;
}
.adm-row-del:hover { background: rgba(239,68,68,.14); }
.adm-add-btn {
  padding: 8px 18px; border-radius: 50px; border: 1px dashed var(--adm-green);
  color: var(--adm-green); font-size: .75rem; cursor: pointer; background: none;
  margin-top: 8px; transition: all .15s;
}
.adm-add-btn:hover { background: rgba(5,240,114,.05); }

/* ── Animations ── */
@keyframes chatIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

/* ── Responsive admin ── */
@media (max-width: 900px) {
  .adm-sidebar { width: 64px; overflow: hidden; }
  .adm-sidebar__logo-text, .adm-tab span, .adm-sidebar__foot span, .adm-sidebar__foot a span { display: none; }
  .adm-tab { justify-content: center; padding: 12px 8px; }
  .adm-tab i { width: auto; }
  .adm-main { padding: 20px 16px; }
  .adm-grid { grid-template-columns: 1fr; }
  .adm-span2 { grid-column: span 1; }
  .adm-chat { width: 300px; right: 12px; bottom: 12px; }
}
@media (max-width: 600px) {
  .adm-sidebar { display: none; }
  .adm-chat { width: calc(100vw - 24px); right: 12px; }
}
