/* ===== پنل مدیریت ===== */
.admin-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px;
  position: sticky; top: 8px; z-index: 50;
}
.admin-topbar .at-title { font-weight: 800; font-size: 17px; display: flex; align-items: center; gap: 10px; }
.admin-topbar .at-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-badge { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.save-flash { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--accent); color:#fff; padding: 10px 22px; border-radius: 999px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow); opacity: 0; transition: all .25s; z-index: 100; pointer-events: none; }
.save-flash.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ورود (لاگین) */
.login-wrap { max-width: 420px; margin: 60px auto; }
.login-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 26px; text-align: center; }
.login-card .lc-ic { font-size: 44px; }
.login-card h1 { font-size: 20px; margin: 10px 0 4px; }
.login-card p { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.login-hint { font-size: 12px; color: var(--muted); margin-top: 12px; }

/* تب‌های پنل */
.admin-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 8px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; }
.admin-tabs button { flex: 0 0 auto; padding: 9px 14px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: all .15s; }
.admin-tabs button:hover { color: var(--text); background: var(--chip-bg); }
.admin-tabs button.active { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }

.admin-panel { display: none; }
.admin-panel.active { display: block; }

.a-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 16px; }
.a-card h3 { margin: 0 0 4px; font-size: 15.5px; display:flex; align-items:center; gap:8px; }
.a-card .a-sub { color: var(--muted); font-size: 12.5px; margin-bottom: 14px; }

.a-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.a-field label { font-size: 13px; color: var(--muted); font-weight: 600; }
.a-input, .a-textarea, .a-select {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; color: var(--text);
  font-family: inherit; font-size: 14px; padding: 10px 12px; outline: none; transition: border-color .15s; width: 100%;
}
.a-input:focus, .a-textarea:focus, .a-select:focus { border-color: var(--accent); }
.a-textarea { min-height: 90px; resize: vertical; line-height: 1.9; }
.a-textarea.tall { min-height: 200px; }
.a-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.a-row.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 680px){ .a-row, .a-row.three { grid-template-columns: 1fr; } }

.a-btn { padding: 9px 16px; border-radius: 10px; font-family: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; border: 1px solid var(--border); background: var(--bg-soft); color: var(--text); transition: all .15s; }
.a-btn:hover { border-color: var(--accent); color: var(--accent); }
.a-btn.primary { background: var(--accent); color:#fff; border-color: var(--accent); }
.a-btn.primary:hover { filter: brightness(.92); color:#fff; }
.a-btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.a-btn.danger:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); }
.a-btn.sm { padding: 6px 12px; font-size: 12.5px; }

.a-item { border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 12px; background: var(--bg-soft); }
.a-item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.a-item-head .a-item-title { font-weight: 700; font-size: 14px; }
.a-item-actions { display: flex; gap: 6px; }

.a-list-line { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.a-list-line .a-input { flex: 1 1 auto; }

.a-actions-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.a-help { font-size: 12px; color: var(--muted); background: var(--panel-2); border: 1px dashed var(--border); border-radius: 10px; padding: 10px 12px; line-height: 1.9; }
